]> SALOME platform Git repositories - modules/shaper.git/blob - src/PartSet/PartSet_Module.h
Salome HOME
60f78835cc6251f8be2cb3f07c7d6c1d8fbcfcd7
[modules/shaper.git] / src / PartSet / PartSet_Module.h
1 #ifndef PartSet_Module_H
2 #define PartSet_Module_H
3
4 #include "PartSet.h"
5
6 #include <XGUI_Module.h>
7 #include <XGUI_Command.h>
8
9 #include <QObject>
10
11 class PARTSET_EXPORT PartSet_Module: public QObject, public XGUI_Module
12 {
13 Q_OBJECT
14   std::string modulePlugin();
15
16 public:
17   PartSet_Module(XGUI_Workshop* theWshop);
18   virtual ~PartSet_Module();
19
20   virtual void createFeatures();
21   virtual void featureCreated(XGUI_Command* theFeature);
22
23 public slots:
24   void onFeatureTriggered();
25   /// SLOT, that is called after the operation is started. Perform some specific for module
26   /// actions, e.g. connect the sketch feature to the viewer selection and show the sketch preview.
27   void onOperationStarted();
28   /// SLOT, that is called after the operation is stopped. Disconnect the sketch feature
29   /// from the viewer selection and show the sketch preview.
30   void onOperationStopped(ModuleBase_Operation* theOperation);
31
32 private:
33   /// Displays or erase the current operation preview, if it has it.
34   /// \param isDisplay the state whether the presentation should be displayed or erased
35   void visualizePreview(bool isDisplay);
36
37 private:
38   XGUI_Workshop* myWorkshop;
39 };
40
41 #endif