return aList;
}
-QList<XGUI_Workbench*> XGUI_MainMenu::workbenches() const
-{
- QList<XGUI_Workbench*> aList;
- for (int aTabIdx = 0; aTabIdx < myMenuTabs->count(); ++aTabIdx) {
- XGUI_Workbench* aWb = dynamic_cast<XGUI_Workbench*>(myMenuTabs->widget(aTabIdx));
- if (aWb) {
- aList.append(aWb);
- }
- }
- return aList;
-}
-
int XGUI_MainMenu::menuItemSize() const
{
- //TODO(sbh, vsv): get this value from the preferences
- static const ItemSize DEFAULT_ITEM_SIZE = Medium;
- return (int) DEFAULT_ITEM_SIZE;
+ int DEFAULT_ITEM_SIZE = XGUI_Preferences::resourceMgr()->integerValue(
+ XGUI_Preferences::MENU_SECTION, "item_size");
+ return DEFAULT_ITEM_SIZE;
}
int XGUI_MainMenu::menuHeight() const
//! Removes already created tab with python console
void removeConsole();
+ //! Defines size of menu item.
+ //! In the future this value should be extracted from the preferences.
int menuItemSize() const;
+ //! Defines number of menu item rows.
+ //! In the future this value should be extracted from the preferences.
int menuItemRowsCount() const;
+ //! Defines height of the main menu. (Number of rows * row height)
int menuHeight() const;
+ void updateFromResources();
+
private:
XGUI_MainWindow* myDesktop;
QTabWidget* myMenuTabs;