Salome HOME
Fix for bug PAL9160 ( No shading on visualizations ).
[modules/visu.git] / src / VISUGUI / VisuGUI_ScalarBarDlg.h
index ad8f4f18f9fb4883c6180620ba8df64dc30064b4..33c55f963a00f7f129da10b59560dd424e653b63 100644 (file)
@@ -59,8 +59,9 @@ class QVBox;
 class QToolButton;
 
 class QtxDblSpinBox;
-
+class SalomeApp_Module;
 class VisuGUI_FontWg;
+class VISU_ScalarMapAct;
 
 class VisuGUI_TextPrefDlg: public QDialog
 {
@@ -117,6 +118,7 @@ class VisuGUI_ScalarBarPane : public QVBox
   int storeToPrsObject(VISU::ScalarMap_i* thePrs);
 
   bool check();
+  void deletePreview();
 
  protected:
   QButtonGroup*   RangeGroup;
@@ -155,6 +157,16 @@ class VisuGUI_ScalarBarPane : public QVBox
   void changeRange( int );
   void XYChanged( double );
   void onTextPref();
+  void onPreviewCheck(bool thePreview);
+  void updatePreview();
+
+ private:
+  void createScalarBar();
+  void deleteScalarBar();
+
+  QCheckBox* myPreviewCheck;
+  VISU_ScalarMapAct* myPreviewActor;
+  VISU::ScalarMap_i* myScalarMap;
 };
 
 
@@ -163,7 +175,7 @@ class VisuGUI_ScalarBarDlg : public QDialog
   Q_OBJECT;
 
  public:
-  VisuGUI_ScalarBarDlg( QWidget* parent = 0, bool SetPref = FALSE );
+  VisuGUI_ScalarBarDlg (SalomeApp_Module* theModule, bool SetPref = FALSE);
   ~VisuGUI_ScalarBarDlg() {};
 
   bool isToSave() {return myScalarPane->isToSave();}
@@ -176,6 +188,7 @@ class VisuGUI_ScalarBarDlg : public QDialog
 
  protected slots:
   void accept();
+  void reject();
 
  protected:
   VisuGUI_ScalarBarPane* myScalarPane;