void VBoxSettingsToolBarSelector::settingsGroupChanged (int aIndex) { SelectorActionItem *item = findActionItemByTabWidget (qobject_cast<QTabWidget*> (sender()), aIndex); if (item) { if (item->page() && !item->tabWidget()) emit categoryChanged (item->id()); else { SelectorActionItem *child = static_cast<SelectorActionItem*> ( findItemByPage (static_cast<UISettingsPage*> (item->tabWidget()->currentWidget()))); if (child) emit categoryChanged (child->id()); } } }
int VBoxSettingsToolBarSelector::currentId () const { SelectorActionItem *action = findActionItemByAction (mActionGroup->checkedAction()); int id = -1; if (action) id = action->id(); return id; }
void VBoxSettingsToolBarSelector::settingsGroupChanged (QAction *aAction) { SelectorActionItem *item = findActionItemByAction (aAction); if (item) { emit categoryChanged (item->id()); // if (item->page() && // !item->tabWidget()) // emit categoryChanged (item->id()); // else // { // // item->tabWidget()->blockSignals (true); // item->tabWidget()->setCurrentIndex (0); // item->tabWidget()->blockSignals (false); // printf ("%s\n", qPrintable(item->text())); // SelectorActionItem *child = static_cast<SelectorActionItem*> ( // findItemByPage (static_cast<UISettingsPage*> (item->tabWidget()->currentWidget()))); // if (child) // emit categoryChanged (child->id()); // } } }