X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FConfig%2FConfig_Prop.h;h=521ca64d8d7db146d98950f34f031fb2244ee75f;hb=77ce6d35ac8d2f0fdaecb4f23e0870bf74e36103;hp=d6ce44e41dbbcd6e7980c10b81c73080780b5ef0;hpb=a94fc319f2aa64b43c9a73b5ff7063923648faec;p=modules%2Fshaper.git diff --git a/src/Config/Config_Prop.h b/src/Config/Config_Prop.h index d6ce44e41..521ca64d8 100644 --- a/src/Config/Config_Prop.h +++ b/src/Config/Config_Prop.h @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// Copyright (C) 2014-2024 CEA, EDF // // 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 -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #ifndef CONFIG_PROP_H @@ -26,7 +25,7 @@ #include #include -const static char* SKETCH_TAB_NAME = "Sketch"; +static const char SKETCH_TAB_NAME[] = "Sketch"; /*! * \class Config_Prop @@ -61,7 +60,15 @@ class Config_Prop ShortcutTree, BiColor, Background, - Directory + Directory, + Cursor + }; + + enum CursorType + { + ArrowCursor, + CrossCursor, + HandCursor }; /** @@ -73,7 +80,9 @@ class Config_Prop * \param theDefaultValue - default value of the property. This is an initial property value */ Config_Prop(const std::string& theSection, const std::string& theName, - const std::string& theTitle, PropType theType, const std::string& theDefaultValue) + const std::string& theTitle, PropType theType, + const std::string& theDefaultValue, + const std::string& theMin, const std::string& theMax) { mySection = theSection; myName = theName; @@ -81,6 +90,8 @@ class Config_Prop myType = theType; myValue = theDefaultValue; myDefaultValue = theDefaultValue; + myMin = theMin; + myMax = theMax; } /// Get name of section @@ -133,6 +144,20 @@ class Config_Prop return (mySection == theProp->section()) && (myName == theProp->name()); } + /// Returns minimal value + std::string min() const { return myMin; } + + void setMin(const std::string& theMin) { + myMin = theMin; + } + + /// Returns maximal value + std::string max() const { return myMax; } + + void setMax(const std::string& theMax) { + myMax = theMax; + } + private: std::string mySection; ///< Name of section std::string myName; ///< Name of property @@ -140,6 +165,8 @@ class Config_Prop PropType myType; ///< Type of property std::string myValue; // Value in string format std::string myDefaultValue; // Default value + std::string myMin; // Minimal value + std::string myMax; // Maximal value }; typedef std::list Config_Properties;