Salome HOME
Visualization preferences for sketcher are created
[modules/shaper.git] / src / Config / Config_Prop.h
1 // File:        Config_Prop.h
2 // Created:     12 Aug 2014
3 // Author:      Vitaly SMETANNIKOV
4
5 #ifndef Config_Prop_H
6 #define Config_Prop_H
7
8 #include "Config_def.h"
9
10 #include <string>
11 #include <list>
12
13 /// Class which describes a one property
14 class Config_Prop
15 {
16 public:
17
18   enum PropType { Auto, Space, Bool, Color, String, Selector,
19                   DblSpin, IntSpin, Double, Integer,
20                   GroupBox, Tab, Frame, Font, DirList, File,
21                               Slider, Shortcut, ShortcutTree, BiColor, Background };
22
23
24   /** 
25   * Creates a one property
26   * \param theSection - name of section (domain of using) of the property.
27   * \param theName - name (title) of the value.
28   * \param theType - type of the value.
29   * \param theValue - initial value of the property.
30   */
31   Config_Prop(const std::string& theSection,
32               const std::string& theName,
33               const std::string& theTitle,
34               PropType theType,
35               const std::string& theValue ) {
36     mySection = theSection;
37     myName = theName;
38     myTitle = theTitle;
39     myType = theType;
40     myValue = theValue;
41   }
42
43   std::string section() const { return mySection; }
44   std::string name() const { return myName; }
45   std::string title() const { return myTitle; }
46   PropType type() const { return myType; }
47   std::string value() const { return myValue; }
48
49 private:
50   std::string mySection;
51   std::string myName;
52   std::string myTitle;
53   PropType myType;
54   std::string myValue;
55 };
56
57 typedef std::list<Config_Prop*> Config_Properties;
58
59 #endif