1 #ifndef PartSet_Module_H
2 #define PartSet_Module_H
6 #include <XGUI_Module.h>
7 #include <XGUI_Command.h>
14 class PartSet_Listener;
16 class PARTSET_EXPORT PartSet_Module: public QObject, public XGUI_Module
21 PartSet_Module(XGUI_Workshop* theWshop);
22 virtual ~PartSet_Module();
24 virtual void createFeatures();
25 virtual void featureCreated(XGUI_Command* theFeature);
26 std::string featureFile(const std::string&);
28 virtual void launchOperation(const QString& theCmdId);
30 /// Displays or erase the current operation preview, if it has it.
31 /// \param isDisplay the state whether the presentation should be displayed or erased
32 void visualizePreview(bool isDisplay);
35 void onFeatureTriggered();
36 /// SLOT, that is called after the operation is started. Perform some specific for module
37 /// actions, e.g. connect the sketch feature to the viewer selection and show the sketch preview.
38 void onOperationStarted();
39 /// SLOT, that is called after the operation is stopped. Disconnect the sketch feature
40 /// from the viewer selection and show the sketch preview.
41 void onOperationStopped(ModuleBase_Operation* theOperation);
42 /// SLOT, that is called by the selection in the viewer is changed.
43 /// The selection is sent to the current operation if it listen the selection.
44 void onMouseReleased(QPoint thePoint);
45 /// SLOT, that is called by the selection in the viewer is changed.
46 /// The selection is sent to the current operation if it listen the selection.
47 /// \thePoint the mouse point
48 void onMouseMoved(QPoint thePoint);
50 /// SLOT, to apply to the current viewer the operation
51 /// \param theX the X projection value
52 /// \param theY the Y projection value
53 /// \param theZ the Z projection value
54 void onViewerProjectionChange(double theX, double theY, double theZ);
57 XGUI_Workshop* myWorkshop;
58 PartSet_Listener* myListener;
60 std::map<std::string, std::string> myFeaturesInFiles;