1 #ifndef PartSet_Module_H
2 #define PartSet_Module_H
6 #include <XGUI_Module.h>
7 #include <XGUI_Command.h>
14 class XGUI_ViewWindow;
16 class PartSet_Listener;
18 class PARTSET_EXPORT PartSet_Module: public QObject, public XGUI_Module
23 PartSet_Module(XGUI_Workshop* theWshop);
24 virtual ~PartSet_Module();
26 virtual void createFeatures();
27 virtual void featureCreated(XGUI_Command* theFeature);
28 virtual QStringList nestedFeatures(QString theFeature);
29 std::string featureFile(const std::string&);
31 virtual void launchOperation(const QString& theCmdId);
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);
38 void onFeatureTriggered();
39 /// SLOT, that is called after the operation is started. Perform some specific for module
40 /// actions, e.g. connect the sketch feature to the viewer selection and show the sketch preview.
41 void onOperationStarted();
42 /// SLOT, that is called after the operation is stopped. Disconnect the sketch feature
43 /// from the viewer selection and show the sketch preview.
44 void onOperationStopped(ModuleBase_Operation* theOperation);
46 /// SLOT, that is called by the selection in the viewer is changed.
47 /// The selection is sent to the current operation if it listens selection.
48 void onSelectionChanged();
49 /// SLOT, that is called by mouse click in the viewer.
50 /// The mouse released point is sent to the current operation to be processed.
51 /// \param theWindow the window where the signal appears
52 /// \param theEvent the mouse event
53 void onMouseReleased(XGUI_ViewWindow* theWindow, QMouseEvent* theEvent);
54 /// SLOT, that is called by the selection in the viewer is changed.
55 /// The mouse moved point is sent to the current operation to be processed.
56 /// \param theWindow the window where the signal appears
57 /// \param theEvent the mouse event
58 void onMouseMoved(XGUI_ViewWindow* theWindow, QMouseEvent* theEvent);
60 /// SLOT, to apply to the current viewer the operation
61 /// \param theX the X projection value
62 /// \param theY the Y projection value
63 /// \param theZ the Z projection value
64 void onPlaneSelected(double theX, double theY, double theZ);
67 XGUI_Workshop* myWorkshop;
68 PartSet_Listener* myListener;
70 std::map<std::string, std::string> myFeaturesInFiles;