Salome HOME
Feature #86: The hierarchy in the Object Browser (T 19).
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_VTKPrsDisplayer.h
index 6e53647aa20fb0c15dcf311e4edcdf95c8defd23..7a47a6f8402f51b288d6fe8357d4ae43352a33f1 100644 (file)
@@ -24,6 +24,9 @@
 #define HYDROGUI_VTKPRSDISPLAYER_H
 
 #include "HYDROGUI_AbstractDisplayer.h"
+#include <vtkSmartPointer.h>
+#include <vtkScalarBarActor.h>
+#include <QMap>
 
 class HYDROGUI_VTKPrsDriver;
 
@@ -45,7 +48,6 @@ public:
    */
   virtual ~HYDROGUI_VTKPrsDisplayer();
 
-public:
   /**
    * \brief Force the specified objects to be updated.
    * \param theObjs sequence of objects to update
@@ -59,6 +61,22 @@ public:
    */
   virtual QString  GetType() const;
 
+  /**
+   * \brief Set the range of Z values for the color legend bar.
+   */
+  void             SetZRange( const int theViewerId, double theRange[] );
+
+  /**
+   * \brief Get the range of Z values for the color legend bar.
+   */
+  double*          GetZRange( const int theViewerId ) const;
+
+  /**
+   * \brief Delete scalar bar for the given viewer id.
+   * \param theViewerId viewer identifier
+   */
+  void             DeleteScalarBar( const int theViewerId );
+
 protected:
   /**
    * \brief Erase all viewer objects.
@@ -94,13 +112,22 @@ protected:
   void             purgeObjects( const int theViewerId );
 
 private:
+
+  /**
+   * \brief Create a new scalar bar for the given view id.
+   * \param theViewId view identifier
+   */
+  void             createScalarBar( const int theViewId );
+
   /**
    * \brief Get the presentation driver for the specified data object.
    * \param theObj data object
    */
-  HYDROGUI_VTKPrsDriver* getDriver( const Handle(HYDROData_Entity)& theObj );
+  HYDROGUI_VTKPrsDriver* getDriver( const int theViewId, const Handle(HYDROData_Entity)& theObj );
+
+  HYDROGUI_VTKPrsDriver*       myDriver;
 
-  HYDROGUI_VTKPrsDriver* myDriver;
+  QMap<int, vtkSmartPointer<vtkScalarBarActor>> myScalarBars; //!< Colors legend presentations
 };
 
 #endif