Salome HOME
New files added.
[modules/hydro.git] / src / HYDROData / HYDROData_VisualState.h
1 #ifndef HYDROData_VisualState_HeaderFile
2 #define HYDROData_VisualState_HeaderFile
3
4 #include <HYDROData_Object.h>
5
6 #include <QString>
7
8 DEFINE_STANDARD_HANDLE(HYDROData_VisualState, HYDROData_Object)
9
10 /**\class HYDROData_VisualState
11  * \brief Class that stores/retreives information about the visual state.
12  *
13  * Keeps the visual state as encoded text string.
14  */
15 class HYDROData_VisualState : public HYDROData_Object
16 {
17 protected:
18   /**
19    * Enumeration of tags corresponding to the persistent object parameters.
20    */
21   enum DataTag
22   {
23     DataTag_First = HYDROData_Object::DataTag_First + 100, ///< first tag, to reserve
24     DataTag_State ///< encoded visual state
25   };
26
27 public:
28   DEFINE_STANDARD_RTTI(HYDROData_VisualState);
29
30   /**
31    * Returns the kind of this object. Must be redefined in all objects of known type.
32    */
33   HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_VISUAL_STATE; }
34
35   /**
36    * Stores the encoded visual state
37    * \param theState new state
38    */
39   HYDRODATA_EXPORT void SetState( const QString& theState );
40
41   /**
42    * Returns the encoded visual state
43    */
44   HYDRODATA_EXPORT QString GetState() const;
45
46 protected:
47
48   friend class HYDROData_Iterator;
49
50   /**
51    * Creates new object in the internal data structure. Use higher level objects 
52    * to create objects with real content.
53    */
54   HYDROData_VisualState();
55
56   /**
57    * Destructs properties of the object and object itself, removes it from the document.
58    */
59   ~HYDROData_VisualState();
60
61 };
62
63 #endif