topLeft.setY(topLeft.y() + GPC_HEAD_SPACING);
QList<HWKeyButton *> 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;
}
-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;