]> SALOME platform Git repositories - modules/shaper.git/blob - src/PartSet/PartSet_Module.h
Salome HOME
c7d8e8d3b8a476bdb383257b68c3674ac41cf4d8
[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 <QMap>
10 #include <QObject>
11
12 #include <string>
13
14 class PARTSET_EXPORT PartSet_Module: public QObject, public XGUI_Module
15 {
16 Q_OBJECT
17
18 public:
19   PartSet_Module(XGUI_Workshop* theWshop);
20   virtual ~PartSet_Module();
21
22   virtual void createFeatures();
23   virtual void featureCreated(XGUI_Command* theFeature);
24   std::string featureFile(const std::string&);
25
26 public slots:
27   void onFeatureTriggered();
28   /// SLOT, that is called after the operation is started. Perform some specific for module
29   /// actions, e.g. connect the sketch feature to the viewer selection and show the sketch preview.
30   void onOperationStarted();
31   /// SLOT, that is called after the operation is stopped. Disconnect the sketch feature
32   /// from the viewer selection and show the sketch preview.
33   void onOperationStopped(ModuleBase_Operation* theOperation);
34   /// SLOT, that is called by the selection in the viewer is changed.
35   /// The selection is sent to the current operation if it listen the selection.
36   void onViewSelectionChanged();
37   /// SLOT, to apply to the current viewer the operation
38   /// \param theX the X projection value
39   /// \param theY the Y projection value
40   /// \param theZ the Z projection value
41   void onViewerProjectionChange(double theX, double theY, double theZ);
42
43 private:
44   /// Displays or erase the current operation preview, if it has it.
45   /// \param isDisplay the state whether the presentation should be displayed or erased
46   void visualizePreview(bool isDisplay);
47
48 private:
49   XGUI_Workshop* myWorkshop;
50
51   std::map<std::string, std::string> myFeaturesInFiles;
52 };
53
54 #endif