4 * Copyright (C) 2015 Samsung Electronics Co., Ltd. All rights reserved.
7 * GiWoong Kim <giwoong.kim@samsung.com>
8 * Sangho Park <sangho1206.park@samsung.com>
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
30 #ifndef GENERALPURPOSECON_H
31 #define GENERALPURPOSECON_H
33 #include "layout/hardwarekey.h"
34 #include "controller/hwkeybutton.h"
35 #include "layout/controllerform.h"
36 #include "uiinformation.h"
38 #define GPC_HEAD_BAR_HEIGHT (5)
39 #define GPC_BORDER_SIZE (1.0)
40 #define GPC_HEAD_SPACING (8) + GPC_HEAD_BAR_HEIGHT
41 #define GPC_LEFT_SPACING (8)
42 #define GPC_TAIL_SPACING (8)
43 #define GPC_KEYBUTTON_WIDTH (35)
44 #define GPC_KEYBUTTON_HEIGHT (35)
45 #define GPC_KEYBUTTON_VSPACING (15)
46 #define GPC_KEYBUTTON_HSPACING (15)
47 #define GPC_MINIUM_HEIGHT (272)
49 class GeneralPurposeCon
55 void createHeaderBarAndBorder(QGraphicsScene *scene, UiInformation *uiInfo, bool isFloating);
56 QList<HWKeyButton *> createButtons(QGraphicsScene *scene, QWidget *parent, ControllerForm *form);
59 void createKeyList(QWidget *parent, QList<HardwareKey *> keyList, QPoint topLeft, int count, QList<HWKeyButton *> &buttonList);
62 #endif // GENERALPURPOSECON_H