X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_WidgetSketchCreator.h;h=60a3cf30ea04b00a3775d2830107640fc556d1d9;hb=20ead226b1355fcf49d396036e6527b2ac043cb0;hp=b7b8b2f40df2969545389fc8c0ef55e198f426a9;hpb=ef735191febeda718b07736db7abdd728a81c17b;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_WidgetSketchCreator.h b/src/PartSet/PartSet_WidgetSketchCreator.h index b7b8b2f40..60a3cf30e 100644 --- a/src/PartSet/PartSet_WidgetSketchCreator.h +++ b/src/PartSet/PartSet_WidgetSketchCreator.h @@ -12,9 +12,7 @@ #include class QLabel; -class QLineEdit; class PartSet_Module; -class ModelAPI_Tools; class ModuleBase_Operation; class ModuleBase_IWorkshop; class PartSet_PreviewPlanes; @@ -56,7 +54,7 @@ public: /// This value should be processed in the widget according to the needs /// \param theValues the wrapped selection values /// \param theToValidate a validation of the values flag - virtual bool setSelection(QList& theValues, + virtual bool setSelection(QList>& theValues, const bool theToValidate); /// Editing mode depends on mode of current operation. This value is defined by it. @@ -68,7 +66,7 @@ public: /// restored.The valid/invalid value is cashed. /// \param theValue a selected presentation in the view /// \return a boolean value - virtual bool isValidSelection(const ModuleBase_ViewerPrs& theValue); + virtual bool isValidSelection(const std::shared_ptr& theValue); protected: /// If there is no operation in current session, start operation for modify parameters @@ -78,11 +76,11 @@ protected: /// Checks whether the selection presentation contains preview planes /// \param theValue a selection information /// \return a boolean value - virtual bool isValidSelectionCustom(const ModuleBase_ViewerPrs& theValue); + virtual bool isValidSelectionCustom(const std::shared_ptr& theValue); /// Saves the internal parameters to the given feature /// \return True in success - virtual bool storeValueCustom() const; + virtual bool storeValueCustom(); virtual bool restoreValueCustom(); @@ -101,7 +99,7 @@ protected: /// Retunrs a list of possible shape types /// \return a list of shapes - virtual QIntList getShapeTypes() const; + virtual QIntList shapeTypes() const; /// Emits model changed info, updates the current control by selection change /// \param theDone a state whether the selection is set @@ -117,6 +115,10 @@ private: /// \return boolean value bool isSelectionMode() const; + /// Returns true if the current composite feature contains at least one sub-object + /// \return boolean value + bool hasSubObjects() const; + private slots: void onResumed(ModuleBase_Operation* theOp); @@ -124,7 +126,7 @@ private: /// Append new Sketch, set the selected plane for the sketch and start Edit operation. /// \param theValues a selection list /// \return true if the sketch is started - bool startSketchOperation(const QList& theValues); + bool startSketchOperation(const QList>& theValues); /// Sets the sub-object to list of base. static void setSketchObjectToList(const CompositeFeaturePtr& theFeature, @@ -134,6 +136,12 @@ private: /// \return true if validation succeed bool validateSelectionList() const; + /// Change enable state of controls in the model widget by the attribute identifier + /// \param theModelWidget a model widget + /// \param theEnabled a state if the controls should be enabled/disabled + void setEnabledModelWidget(ModuleBase_ModelWidget* theModelWidget, + const bool theEnabled); + private: std::string myAttributeListID; @@ -146,9 +154,6 @@ private: /// Label of the widget QLabel* myLabel; - /// Input control of the widget - QLineEdit* myTextLine; - /// List of accepting shapes types QStringList myShapeTypes;