Salome HOME
Fix of bug with incorrect order of features in the workbench.
[modules/shaper.git] / src / XGUI / XGUI_Workshop.h
1 #ifndef XGUI_WORKSHOP_H
2 #define XGUI_WORKSHOP_H
3
4 #include <Event_Message.h>
5 #include <Event_Listener.h>
6
7 #include <QObject>
8 #include <QMap>
9 #include <QIcon>
10 #include <QKeySequence>
11
12 class XGUI_MainWindow;
13 class XGUI_Command;
14 class XGUI_Module;
15 class XGUI_Workbench;
16 class ModuleBase_Operation;
17
18 class Config_FeatureMessage;
19 class Config_PointerMessage;
20
21 class XGUI_Workshop: public QObject, public Event_Listener
22 {
23 Q_OBJECT
24 public:
25
26   XGUI_Workshop();
27   virtual ~XGUI_Workshop();
28
29   void startApplication();
30
31   XGUI_MainWindow* mainWindow() const
32   {
33     return myMainWindow;
34   }
35
36   XGUI_Workbench* addWorkbench(const QString& theName);
37
38   virtual void processEvent(const Event_Message* theMessage);
39
40 public slots:
41   void onNew();
42   void onOpen();
43   void onSave();
44   void onSaveAs();
45   void onExit();
46
47 protected:
48   //Event-loop processing methods:
49   void addFeature(const Config_FeatureMessage*);
50   void fillPropertyPanel(const Config_PointerMessage*);
51
52   void connectToPropertyPanel(ModuleBase_Operation* theOperation);
53
54 private:
55   void initMenu();
56
57   XGUI_Module* loadModule(const QString& theModule);
58   bool activateModule();
59
60   XGUI_MainWindow* myMainWindow;
61   XGUI_Module* myPartSetModule;
62
63   ModuleBase_Operation* myCurrentOperation;
64 };
65
66 #endif