X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FModel%2FModel_ResultField.h;h=cbaa3efec852ca8d2d1c93b43fc443af349f1a6d;hb=c942db5a30da5f57a89e6d4835187d64a74f89ca;hp=52d0b82aac4a3e87df59b928066c8ad24d27b16c;hpb=6e421e939851e0de46554ae45a3ca0e1f67cd91d;p=modules%2Fshaper.git diff --git a/src/Model/Model_ResultField.h b/src/Model/Model_ResultField.h index 52d0b82aa..cbaa3efec 100644 --- a/src/Model/Model_ResultField.h +++ b/src/Model/Model_ResultField.h @@ -39,18 +39,27 @@ public: { public: Model_FieldStep(ModelAPI_ResultField* theParent, int theId) - : myParent(theParent), myId(theId) {}; + : ModelAPI_ResultField::ModelAPI_FieldStep(), myParent(theParent), myId(theId) + { + setData(myParent->data()); // it is not needed to have special data for the temporary + // step object, but data must be "valid" for GUI checks + }; virtual ModelAPI_ResultField* field() const { return myParent; } virtual int id() const { return myId; } + virtual std::shared_ptr document() const { return myParent->document(); } + + /// Returns a GUI name of this step + virtual std::string name(); + private: ModelAPI_ResultField* myParent; int myId; }; - /// Retuns the parameters of color definition in the resources config manager + /// Returns the parameters of color definition in the resources configuration manager MODEL_EXPORT virtual void colorConfigInfo(std::string& theSection, std::string& theName, std::string& theDefault); @@ -66,11 +75,15 @@ public: /// Returns step object /// \param theId an id of the object - MODEL_EXPORT virtual ModelAPI_ResultField::ModelAPI_FieldStep* step(int theId) const; + MODEL_EXPORT virtual std::shared_ptr + step(int theId) const; /// Removes the stored builders MODEL_EXPORT virtual ~Model_ResultField(); + /// To refresh the steps of a field + MODEL_EXPORT virtual void updateSteps(); + protected: /// Makes a body on the given feature data Model_ResultField(std::shared_ptr theOwnerData); @@ -78,9 +91,8 @@ protected: friend class Model_Objects; private: - void updateSteps(); - std::vector mySteps; + std::vector mySteps; }; #endif