X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelHighAPI%2FModelHighAPI_Selection.h;h=db78cb69ee7c3911d1b2ca6cd3bc0e19a7397c46;hb=72719a4782fc317556d7b1a14d0ed62df12398dc;hp=fcea8f5a5ea80863de017130dad00858e78f0841;hpb=fb487c9f05bad69b5091b2eefdf4c0ef019c46d6;p=modules%2Fshaper.git diff --git a/src/ModelHighAPI/ModelHighAPI_Selection.h b/src/ModelHighAPI/ModelHighAPI_Selection.h index fcea8f5a5..db78cb69e 100644 --- a/src/ModelHighAPI/ModelHighAPI_Selection.h +++ b/src/ModelHighAPI/ModelHighAPI_Selection.h @@ -1,5 +1,6 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D // Name : ModelHighAPI_Selection.h -// Purpose: +// Purpose: // // History: // 06/06/16 - Sergey POKHODENKO - Creation of the file @@ -19,7 +20,8 @@ class ModelAPI_AttributeSelection; class ModelAPI_AttributeSelectionList; class ModelAPI_Result; //-------------------------------------------------------------------------------------- -typedef std::pair, std::shared_ptr > ResultSubShapePair; +typedef std::pair, std::shared_ptr > + ResultSubShapePair; typedef std::pair TypeSubShapeNamePair; //-------------------------------------------------------------------------------------- /**\class ModelHighAPI_Selection @@ -43,7 +45,8 @@ public: /// Constructor for result and sub-shape MODELHIGHAPI_EXPORT ModelHighAPI_Selection(const std::shared_ptr& theContext, - const std::shared_ptr& theSubShape = std::shared_ptr()); + const std::shared_ptr& theSubShape = + std::shared_ptr()); /// Constructor for sub-shape by the textual Name MODELHIGHAPI_EXPORT ModelHighAPI_Selection(const std::string& theType, @@ -53,12 +56,12 @@ public: virtual ~ModelHighAPI_Selection(); /// Fill attribute values - MODELHIGHAPI_EXPORT - virtual void fillAttribute(const std::shared_ptr & theAttribute) const; + MODELHIGHAPI_EXPORT virtual + void fillAttribute(const std::shared_ptr & theAttribute) const; /// Append to list attribute - MODELHIGHAPI_EXPORT - virtual void appendToList(const std::shared_ptr & theAttribute) const; + MODELHIGHAPI_EXPORT virtual + void appendToList(const std::shared_ptr & theAttribute) const; /// \return variant type. MODELHIGHAPI_EXPORT @@ -76,9 +79,17 @@ public: MODELHIGHAPI_EXPORT virtual std::string shapeType() const; - /// \return Result if exists. + /// Shortcut for result()->data()->setName() + MODELHIGHAPI_EXPORT + void setName(const std::string& theName); + + /// Change result's color + MODELHIGHAPI_EXPORT + void setColor(int theRed, int theGreen, int theBlue); + + /// Change result's deflection MODELHIGHAPI_EXPORT - virtual std::shared_ptr result() const; + void setDeflection(double theValue); private: VariantType myVariantType;