Salome HOME
Drawing of zones in OCC view improved.
[modules/hydro.git] / src / HYDROData / HYDROData_Object.h
index 04e83ed99649a275f942dacc065f26d9be85a3bb..a44ffdb5affa77eee20a992de5b729a8ca50b1f8 100644 (file)
@@ -7,6 +7,7 @@
 #include <TDF_Label.hxx>
 #include <QMap>
 
+class QColor;
 class QString;
 class QVariant;
 class QStringList;
@@ -26,6 +27,7 @@ const ObjectKind KIND_PROFILE        = 6;
 const ObjectKind KIND_PROFILES_GROUP = 7;
 const ObjectKind KIND_GUIDE_LINE     = 8;
 const ObjectKind KIND_ZONE           = 9;
+const ObjectKind KIND_LAST           = KIND_ZONE;
 
 DEFINE_STANDARD_HANDLE(HYDROData_Object, MMgt_TShared)
 
@@ -212,11 +214,26 @@ protected:
    */
   void ClearReferenceObjects( const int theTag = 0 );
 
+  /**
+   * Internal method that used to store the color attribute
+   * \param theTag tag of a label that keeps the attribute (for 0 this is myLab)
+   * \param theColor color to save
+   */
+  void SetColor( const QColor& theColor, const int theTag = 0 );
+
+  /**
+   * Internal method that used to retreive the color attribute
+   * \param theTag tag of a label that keeps the attribute (for 0 this is myLab)
+   * \param theDefColor default color to return if attribute has not been set before
+   */
+  QColor GetColor( const QColor& theDefColor, const int theTag = 0 ) const;
+
 protected:
 
   Handle(TDataStd_ReferenceList) getReferenceList( const int  theTag,
                                                    const bool theIsCreate ) const;
 
+
 protected:
   /// Array of pointers to the properties of this object; index in this array is returned by \a AddProperty.
   TDF_Label myLab; ///< label of this object