From: sbh Date: Wed, 13 Aug 2014 09:27:08 +0000 (+0400) Subject: Merge branch 'master' of newgeom:newgeom.git X-Git-Tag: V_0.4.4~109 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bc127d9f102f14206fd8a892600afd1778487458;p=modules%2Fshaper.git Merge branch 'master' of newgeom:newgeom.git --- bc127d9f102f14206fd8a892600afd1778487458 diff --cc src/XGUI/XGUI_MainMenu.cpp index a558cdb36,4e64c9e6e..273e248df --- a/src/XGUI/XGUI_MainMenu.cpp +++ b/src/XGUI/XGUI_MainMenu.cpp @@@ -115,11 -118,23 +118,11 @@@ QList XGUI_MainMenu::fea return aList; } -QList XGUI_MainMenu::workbenches() const -{ - QList aList; - for (int aTabIdx = 0; aTabIdx < myMenuTabs->count(); ++aTabIdx) { - XGUI_Workbench* aWb = dynamic_cast(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 diff --cc src/XGUI/XGUI_MainMenu.h index 718bd50a7,b583bf02c..29b87063f --- a/src/XGUI/XGUI_MainMenu.h +++ b/src/XGUI/XGUI_MainMenu.h @@@ -63,15 -65,12 +63,17 @@@ public //! 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;