Salome HOME
Merge branch 'master' of newgeom:newgeom
[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
17 class Config_FeatureMessage;
18 class Config_WidgetMessage;
19
20 class XGUI_Workshop: public QObject, public Event_Listener
21 {
22 Q_OBJECT
23 public:
24
25   XGUI_Workshop();
26   virtual ~XGUI_Workshop();
27
28   void startApplication();
29
30   XGUI_MainWindow* mainWindow() const
31   {
32     return myMainWindow;
33   }
34
35   XGUI_Workbench* addWorkbench(const QString& theName);
36
37   virtual void processEvent(const Event_Message* theMessage);
38
39 public slots:
40   void onNew();
41   void onOpen();
42   void onSave();
43   void onSaveAs();
44   void onExit();
45
46 protected:
47   //Event-loop processing methods:
48   void addFeature(const Config_FeatureMessage*);
49   void fillPropertyPanel(const Config_WidgetMessage*);
50
51 private:
52   void initMenu();
53
54   XGUI_Module* loadModule(const QString& theModule);
55   bool activateModule();
56
57   XGUI_MainWindow* myMainWindow;
58   XGUI_Module* myPartSetModule;
59 };
60
61 #endif