Salome HOME
Add tools
[modules/shaper.git] / src / PartSet / PartSet_Module.h
index 1fb0d38815d76979278b15c96ec1abda2c0dfb15..f43efaf94702da0da6957f2595f59f13917c6693 100644 (file)
@@ -69,11 +69,21 @@ public:
   /// Call back forlast tuning of property panel before operation performance
   virtual void propertyPanelDefined(ModuleBase_Operation* theOperation);
 
+  /// Creates an operation and send it to loop
+  /// \param theCmdId the operation name
+  virtual void launchOperation(const QString& theCmdId);
+
   /// Realizes some functionality by an operation start
   /// Displays all sketcher sub-Objects, hides sketcher result, appends selection filters
+  /// Activate the operation presentation
   /// \param theOperation a started operation
   virtual void onOperationStarted(ModuleBase_Operation* theOperation);
 
+  /// Realizes some functionality by an operation resume
+  /// Activate the operation presentation
+  /// \param theOperation a resumed operation
+  virtual void onOperationResumed(ModuleBase_Operation* theOperation);
+
   /// Realizes some functionality by an operation commit
   /// Restarts sketcher operation automatically of it is necessary
   /// \param theOperation a committed operation
@@ -147,8 +157,10 @@ public:
 
   PartSet_SketcherMgr* sketchMgr() const { return mySketchMgr; }
 
+#ifdef ModuleDataModel
   /// Returns data model object for representation of data tree in Object browser
   virtual ModuleBase_IDocumentDataModel* dataModel() const { return myDataModel; }
+#endif
 
   /// Performs functionality on closing document
   virtual void closeDocument();
@@ -168,8 +180,10 @@ public:
   * If the object is result with the color attribute value set, it is used,
   * otherwise the customize is applyed to the object's feature if it is a custom prs
   * \param theObject an object instance
+  * \param theUpdateViewer the parameter whether the viewer should be update immediatelly
+  * \returns true if the object is modified
   */
-  virtual void customizeObject(ObjectPtr theObject);
+  virtual bool customizeObject(ObjectPtr theObject, const bool theUpdateViewer);
 
   /// This method is called on object browser creation for customisation of module specific features
   /// \param theObjectBrowser a pinter on Object Browser widget
@@ -185,6 +199,11 @@ public:
   /// \param theStdActions - a map of standard actions
   virtual void updateViewerMenu(const QMap<QString, QAction*>& theStdActions); 
 
+  //! Returns the feature error if the current state of the feature in the module is not correct
+  //! If the feature is correct, it returns an empty value
+  //! \return string value
+  virtual QString getFeatureError(const FeaturePtr& theFeature);
+
 public slots:
   /// SLOT, that is called by no more widget signal emitted by property panel
   /// Set a specific flag to restart the sketcher operation
@@ -267,7 +286,10 @@ protected slots:
   PartSet_CustomPrs* myCustomPrs;
   int myVisualLayerId;
 
+  bool myHasConstraintShown;
+#ifdef ModuleDataModel
   PartSet_DocumentDataModel* myDataModel;
+#endif
 
   QModelIndex aActivePartIndex;
 };