Salome HOME
Re-factoring: interfaces removed from "XGUI", "GeomModule" renamed to "PartSet"
[modules/shaper.git] / src / XGUI / XGUI_Workshop.h
1
2 #ifndef XGUI_WORKSHOP_H
3 #define XGUI_WORKSHOP_H
4
5 #include <Event_Message.hxx>
6 #include <Event_Listener.hxx>
7
8 #include <QObject>
9 #include <QMap>
10 #include <QIcon>
11 #include <QKeySequence>
12
13 class XGUI_MainWindow;
14 class XGUI_Command;
15 class XGUI_Module;
16 class XGUI_Workbench;
17
18 class Config_FeatureMessage;
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 { return myMainWindow; }
31
32     XGUI_Workbench* addWorkbench(const QString& theName);
33
34     virtual void ProcessEvent(const Event_Message* theMessage);
35
36 public slots:
37     void onNew();
38     void onOpen();
39     void onSave();
40     void onSaveAs();
41     void onExit();
42
43 protected:
44     //Event-loop processing methods:
45     void addFeature(const Config_FeatureMessage*);
46
47 private:
48     void initMenu();
49
50     XGUI_Module* loadModule(const QString& theModule);
51     bool activateModule();
52
53     XGUI_MainWindow* myMainWindow;
54 };
55
56 #endif