Salome HOME
Refresh menu size after chnges in preferences
[modules/shaper.git] / src / XGUI / XGUI_MainMenu.h
index 3be908792422bc615f555073b0c96bc855d37718..4c3f0ec675cc2821cd6730120a0cef534cd7fd9a 100644 (file)
@@ -26,14 +26,6 @@ class XGUI_EXPORT XGUI_MainMenu: public QWidget
 {
   Q_OBJECT
 
-  //! Size of menu item
-  //TODO(sbh, vsv): Move to the settings
-  enum ItemSize {
-    Small = 20,
-    Medium = 25,
-    Large = 30
-  };
-
 public:
   XGUI_MainMenu(XGUI_MainWindow *parent);
   virtual ~XGUI_MainMenu();
@@ -56,8 +48,6 @@ public:
   //! Returns list of created commands
   QList<XGUI_Command*> features() const;
 
-  QList<XGUI_Workbench*> workbenches() const;
-
   virtual bool eventFilter(QObject *theWatched, QEvent *theEvent);
 
   //! Displays given console as a tab in the workbench
@@ -65,14 +55,22 @@ 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;
   XGUI_MenuGroupPanel* myGeneralPage;
+  QList<XGUI_Workbench*> myWorkbenches;
 
   QMap<XGUI_Command*, bool> myCommandState;
 };