#define HYDROGUI_VTKPRSDISPLAYER_H
#include "HYDROGUI_AbstractDisplayer.h"
-#include <vtkNew.h>
+#include <vtkSmartPointer.h>
#include <vtkScalarBarActor.h>
+#include <QMap>
class HYDROGUI_VTKPrsDriver;
/**
* \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:
/**
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