1 #ifndef XGUI_WORKSHOP_H
2 #define XGUI_WORKSHOP_H
5 #include <Events_Listener.h>
10 #include <QKeySequence>
12 class XGUI_MainWindow;
16 class XGUI_SelectionMgr;
18 class XGUI_OperationMgr;
19 class ModuleBase_Operation;
20 class ModuleBase_PropPanelOperation;
22 class Config_FeatureMessage;
23 class Config_PointerMessage;
25 /**\class XGUI_Workshop
27 * \brief Class which defines a configuration of the application (Workshop) and launches it.
29 class XGUI_EXPORT XGUI_Workshop: public QObject, public Events_Listener
35 virtual ~XGUI_Workshop();
37 //! Starting of the application
38 void startApplication();
40 //! Returns main window (Desktop) of the application
41 XGUI_MainWindow* mainWindow() const
46 //! Returns selection manager object
47 XGUI_SelectionMgr* selector() const { return mySelector; }
50 XGUI_Displayer* displayer() const { return myDisplayer; }
52 //! ! Returns operation manager.
53 XGUI_OperationMgr* operationMgr() const { return myOperationMgr; }
55 //! Creates and adds a new workbench (menu group) with the given name and returns it
56 XGUI_Workbench* addWorkbench(const QString& theName);
58 //! Redefinition of Events_Listener method
59 virtual void processEvent(const Events_Message* theMessage);
62 void updateCommandStatus();
73 //Event-loop processing methods:
74 void addFeature(const Config_FeatureMessage*);
75 void connectWithOperation(ModuleBase_Operation* theOperation);
78 /// SLOT, that is called after the operation is started. Update workshop state according to
79 /// the started operation, e.g. visualizes the property panel and connect to it.
80 void onOperationStarted();
81 /// SLOT, that is called after the operation is stopped. Update workshop state, e.g.
82 /// hides the property panel and udpate the command status.
83 /// \param theOpertion a stopped operation
84 void onOperationStopped(ModuleBase_Operation* theOperation);
89 XGUI_Module* loadModule(const QString& theModule);
90 bool activateModule();
92 XGUI_MainWindow* myMainWindow;
93 XGUI_Module* myPartSetModule;
95 XGUI_SelectionMgr* mySelector;
96 XGUI_Displayer* myDisplayer;
98 XGUI_OperationMgr* myOperationMgr; ///< manager to manipulate through the operations