Salome HOME
Fix for the bug #130: bathymetry sign is wrong
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_VTKPrsDisplayer.h
index 2be387c1d1f0b0d679f0ebfd64ae86b18ed2dd85..7a47a6f8402f51b288d6fe8357d4ae43352a33f1 100644 (file)
@@ -24,8 +24,9 @@
 #define HYDROGUI_VTKPRSDISPLAYER_H
 
 #include "HYDROGUI_AbstractDisplayer.h"
-#include <vtkNew.h>
+#include <vtkSmartPointer.h>
 #include <vtkScalarBarActor.h>
+#include <QMap>
 
 class HYDROGUI_VTKPrsDriver;
 
@@ -63,12 +64,18 @@ public:
   /**
    * \brief Set the range of Z values for the color legend bar.
    */
-  void             SetZRange( double theRange[] );
+  void             SetZRange( const int theViewerId, double theRange[] );
 
   /**
    * \brief Get the range of Z values for the color legend bar.
    */
-  double*          GetZRange() const;
+  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:
   /**
@@ -105,15 +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;
 
-  vtkNew< vtkScalarBarActor > myScalarBar; //!< The colors legend presentation
+  QMap<int, vtkSmartPointer<vtkScalarBarActor>> myScalarBars; //!< Colors legend presentations
 };
 
 #endif