Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
updated copyright message
[modules/shaper.git]
/
src
/
Model
/
Model_ResultField.h
diff --git
a/src/Model/Model_ResultField.h
b/src/Model/Model_ResultField.h
index 2226e5672c64d8b98d9bb95ea60cffe2a19bfea0..c321e03d55b58699f8a1919393c6a3eed47c686d 100644
(file)
--- a/
src/Model/Model_ResultField.h
+++ b/
src/Model/Model_ResultField.h
@@
-1,4
+1,4
@@
-// Copyright (C) 2014-20
17
CEA/DEN, EDF R&D
+// Copyright (C) 2014-20
23
CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@@
-12,10
+12,9
@@
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA
//
//
-// See http://www.salome-platform.org/ or
-// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#ifndef Model_ResultField_H_
//
#ifndef Model_ResultField_H_
@@
-40,18
+39,27
@@
public:
{
public:
Model_FieldStep(ModelAPI_ResultField* theParent, int theId)
{
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 ModelAPI_ResultField* field() const { return myParent; }
virtual int id() const { return myId; }
+ virtual std::shared_ptr<ModelAPI_Document> document() const { return myParent->document(); }
+
+ /// Returns a GUI name of this step
+ virtual std::wstring name();
+
private:
ModelAPI_ResultField* myParent;
int myId;
};
private:
ModelAPI_ResultField* myParent;
int myId;
};
- /// Retu
ns the parameters of color definition in the resources config
manager
+ /// Retu
rns the parameters of color definition in the resources configuration
manager
MODEL_EXPORT virtual void colorConfigInfo(std::string& theSection, std::string& theName,
std::string& theDefault);
MODEL_EXPORT virtual void colorConfigInfo(std::string& theSection, std::string& theName,
std::string& theDefault);
@@
-67,11
+75,15
@@
public:
/// Returns step object
/// \param theId an id of the object
/// 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<ModelAPI_ResultField::ModelAPI_FieldStep>
+ step(int theId) const;
/// Removes the stored builders
MODEL_EXPORT virtual ~Model_ResultField();
/// 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<ModelAPI_Data> theOwnerData);
protected:
/// Makes a body on the given feature data
Model_ResultField(std::shared_ptr<ModelAPI_Data> theOwnerData);
@@
-79,9
+91,8
@@
protected:
friend class Model_Objects;
private:
friend class Model_Objects;
private:
- void updateSteps();
- std::vector<
ModelAPI_FieldStep*
> mySteps;
+ std::vector<
FieldStepPtr
> mySteps;
};
#endif
};
#endif