skin: make menu key button
[sdk/emulator/qemu.git] / tizen / src / ui / controller / generalpurposecon.cpp
index aacb467..e4925e2 100644 (file)
@@ -44,13 +44,25 @@ QList<HWKeyButton *> GeneralPurposeCon::createButtons(QWidget *parent, Controlle
     topLeft.setY(topLeft.y() + GPC_HEAD_SPACING);
 
     QList<HWKeyButton *> buttonList;
     topLeft.setY(topLeft.y() + GPC_HEAD_SPACING);
 
     QList<HWKeyButton *> buttonList;
+
     // H/W key list
     createKeyList(parent, form->getKeyList(), topLeft, buttonList);
     // H/W key list
     createKeyList(parent, form->getKeyList(), topLeft, buttonList);
+    topLeft.setY(topLeft.y()
+            + (GPC_KEYBUTTON_VSPACING + GPC_KEYBUTTON_HEIGHT) * form->getKeyList().count());
+
+    // Menu key list
+    for (int i = 0; i < form->getSubFormList().count(); i++) {
+        ControllerForm *subForm = form->getSubFormList().at(i);
+        createKeyList(parent, subForm->getKeyList(), topLeft, buttonList);
+        topLeft.setY(topLeft.y()
+                + (GPC_KEYBUTTON_VSPACING + GPC_KEYBUTTON_HEIGHT) * subForm->getKeyList().count());
+    }
 
     return buttonList;
 }
 
 
     return buttonList;
 }
 
-void GeneralPurposeCon::createKeyList(QWidget *parent, QList<HardwareKey *> keyList, QPoint topLeft, QList<HWKeyButton *> &buttonList)
+void GeneralPurposeCon::createKeyList(QWidget *parent, QList<HardwareKey *> keyList,
+                                        QPoint topLeft, QList<HWKeyButton *> &buttonList)
 {
     HardwareKey *hwKey = NULL;
     HWKeyButton *keyButton = NULL;
 {
     HardwareKey *hwKey = NULL;
     HWKeyButton *keyButton = NULL;