/* tab */
tabWidget = new QTabWidget(this);
+ {
+ /* VM information table */
+ vmInfoTable = createVmInfoTable();
+ tabWidget->addTab(vmInfoTable, tr(DETAILED_INFO_VMTAB_TITLE));
- /* VM information table */
- vmInfoTable = createVmInfoTable();
- tabWidget->addTab(vmInfoTable, tr(DETAILED_INFO_VMTAB_TITLE));
+ /* shortcut information table */
+ QTabWidget *shortcutTab = new QTabWidget(tabWidget);
- /* shortcut info table */
- shortcutInfoTable = createShortcutInfoTable();
- tabWidget->addTab(shortcutInfoTable, tr(DETAILED_INFO_SHORTCUTTAB_TITLE));
+ menuShortcutTable = createShortcutInfoTable();
+ shortcutTab->addTab(menuShortcutTable, "Menu");
+ keyShortcutTable = createShortcutInfoTable();
+ shortcutTab->addTab(keyShortcutTable, "HW Key");
+
+ tabWidget->addTab(shortcutTab, DETAILED_INFO_SHORTCUTTAB_TITLE);
+ }
upsideLayout->addWidget(tabWidget);
baseLayout->addLayout(upsideLayout);
void DetailedInfoDialog::updateShortcutTableItems()
{
- qDebug() << "clear" << shortcutInfoTable->rowCount() << "shortcut items";
- removeTableRows(shortcutInfoTable, 0, shortcutInfoTable->rowCount());
-
/* insert menu shortcut info */
- insertMenuShortcutInfo(win->getUiInfo()->getMenuList());
+ {
+ qDebug() << "clear" <<
+ menuShortcutTable->rowCount() << "menu shortcut items";
+ removeTableRows(menuShortcutTable, 0, menuShortcutTable->rowCount());
- // TODO: consider getHwKeyShortcutMap()
- /* insert HW key shortcut info */
- insertHwKeyShortcutInfo(win->getUiInfo()->getMainForm()->getKeyList());
+ insertMenuShortcutInfo(win->getUiInfo()->getMenuList());
- /* insert Controller's HW key shortcut info */
- ControllerForm *conForm = win->getUiInfo()->getConForm();
- if (conForm != NULL) {
- insertHwKeyShortcutInfo(win->getUiInfo()->getConForm()->getKeyList(),
- QString(" (controller)"));
+ menuShortcutTable->resizeColumnsToContents();
+ qDebug() << menuShortcutTable->rowCount() <<
+ "menu shortcut items have been inserted";
}
- qDebug() << shortcutInfoTable->rowCount() << "shortcut items have been inserted";
+ /* insert HW key shortcut info */
+ {
+ qDebug() << "clear" <<
+ keyShortcutTable->rowCount() << "key shortcut items";
+ removeTableRows(keyShortcutTable, 0, keyShortcutTable->rowCount());
+
+ // TODO: consider getHwKeyShortcutMap()
+ insertHwKeyShortcutInfo(
+ win->getUiInfo()->getMainForm()->getKeyList());
+
+ ControllerForm *conForm = win->getUiInfo()->getConForm();
+ if (conForm != NULL) {
+ insertHwKeyShortcutInfo(
+ win->getUiInfo()->getConForm()->getKeyList(),
+ QString(" (controller)"));
+ }
+
+ keyShortcutTable->resizeColumnsToContents();
+ qDebug() << keyShortcutTable->rowCount() <<
+ "key shortcut items have been inserted";
+ }
}
void DetailedInfoDialog::insertMenuShortcutInfo(QList<MenuItem *> &list)
keySequence.replace("Ctrl", "Cmd");
#endif
- insertTableRow(shortcutInfoTable, function, keySequence);
+ insertTableRow(menuShortcutTable, function, keySequence);
}
}
}
hwKey = list.at(i);
if (hwKey && hwKey->getKeySequence().isEmpty() == false &&
hwKey->getName().isEmpty() == false) {
- insertTableRow(shortcutInfoTable,
+ insertTableRow(keyShortcutTable,
hwKey->getName() + source, hwKey->getKeySequence().toString());
}
}