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