- void onFeatureTriggered();
- /// SLOT, that is called after the operation is started. Perform some specific for module
- /// actions, e.g. connect the sketch feature to the viewer selection and show the sketch preview.
- void onOperationStarted();
- /// SLOT, that is called after the operation is stopped. Disconnect the sketch feature
- /// from the viewer selection and show the sketch preview.
- void onOperationStopped(ModuleBase_Operation* theOperation);
- /// SLOT, that is called by the selection in the viewer is changed.
- /// The selection is sent to the current operation if it listen the selection.
- void onViewSelectionChanged();
- /// SLOT, to apply to the current viewer the operation
- /// \param theX the X projection value
- /// \param theY the Y projection value
- /// \param theZ the Z projection value
- void onViewerProjectionChange(double theX, double theY, double theZ);
-
-private:
- /// Displays or erase the current operation preview, if it has it.
- /// \param isDisplay the state whether the presentation should be displayed or erased
- void visualizePreview(bool isDisplay);
-
-private:
- XGUI_Workshop* myWorkshop;
-
- std::map<std::string, std::string> myFeaturesInFiles;
+ /// SLOT, that is called by no more widget signal emitted by property panel
+ /// Set a specific flag to restart the sketcher operation
+ void onNoMoreWidgets();
+
+ /// Processes the context menu action click
+ /// \param isChecked a state of toggle if the action is checkable
+ void onAction(bool isChecked);
+
+protected slots:
+ /// Called when previous operation is finished
+ virtual void onSelectionChanged();
+
+ /// SLOT, that is called by key release in the viewer.
+ /// \param theWnd a view window
+ /// \param theEvent the key event
+ void onKeyRelease(ModuleBase_IViewWindow* theWnd, QKeyEvent* theEvent);
+
+ /// SLOT, that is called by enter key released
+ /// Set a specific type of restarting the current operation
+ void onEnterReleased();
+
+ /// SLOT, that is called by the current operation filling with the preselection.
+ /// It commits the operation of it is can be committed
+ void onOperationActivatedByPreselection();
+
+ protected:
+ /// Register validators for this module
+ virtual void registerValidators();
+
+ /// Register selection filters for this module
+ virtual void registerFilters();
+
+ /// Register properties of this module
+ virtual void registerProperties();
+
+ private slots:
+ /// Processing of vertex selected
+ void onVertexSelected();
+
+ private:
+ /// Breaks sequense of automatically resterted operations
+ void breakOperationSequence();
+
+ /// Create all actions for context menus. It is called on creation of module
+ /// Put the created actions into an internal map
+ void createActions();
+
+ /// Add action to the internal map
+ /// \param theId - string ID of the item
+ /// \param theAction - action to add
+ void addAction(const QString& theId, QAction* theAction);
+
+ //! Delete features
+ virtual bool deleteObjects();
+
+ private:
+ QString myLastOperationId;
+ FeaturePtr myLastFeature;
+
+ // Automatical restarting mode flag
+ RestartingMode myRestartingMode;
+
+ /// A filter which provides selection within a current document or whole PartSet
+ Handle(PartSet_GlobalFilter) myDocumentShapeFilter;
+
+ PartSet_SketcherMgr* mySketchMgr;
+
+ QMap<QString, QAction*> myActions; // the popup menu actions