Salome HOME
Merge from OCC_development_generic_2006
[modules/visu.git] / src / VISUGUI / VisuGUI_ScalarBarDlg.h
index ad8f4f18f9fb4883c6180620ba8df64dc30064b4..4f53a39bdc4e221c2cb076d7ff432af730d5795b 100644 (file)
@@ -59,8 +59,9 @@ class QVBox;
 class QToolButton;
 
 class QtxDblSpinBox;
-
-class VisuGUI_FontWg;
+class SalomeApp_Module;
+class SVTK_FontWidget;
+class VISU_ScalarMapAct;
 
 class VisuGUI_TextPrefDlg: public QDialog
 {
@@ -77,8 +78,8 @@ class VisuGUI_TextPrefDlg: public QDialog
     { (isVisible)? myTitleEdt->show() : myTitleEdt->hide(); }
 
  public:
-  VisuGUI_FontWg* myTitleFont;
-  VisuGUI_FontWg* myLabelFont;
+  SVTK_FontWidget* myTitleFont;
+  SVTK_FontWidget* myLabelFont;
 
  private:
   QLineEdit* myTitleEdt;
@@ -94,6 +95,7 @@ class VisuGUI_ScalarBarPane : public QVBox
   ~VisuGUI_ScalarBarPane() {};
 
   void    setRange( double imin, double imax, /*double fmin, double fmax,*/ bool sbRange );
+  void    setDefaultRange(double imin, double imax);
   bool    isIRange() {return RBIrange->isChecked();}
   double  getMin() {return MinEdit->text().toDouble();}
   double  getMax() {return MaxEdit->text().toDouble();}
@@ -117,6 +119,7 @@ class VisuGUI_ScalarBarPane : public QVBox
   int storeToPrsObject(VISU::ScalarMap_i* thePrs);
 
   bool check();
+  void deletePreview();
 
  protected:
   QButtonGroup*   RangeGroup;
@@ -154,7 +157,20 @@ class VisuGUI_ScalarBarPane : public QVBox
   void changeDefaults( int );
   void changeRange( int );
   void XYChanged( double );
+  void changeScalarMode( int );
   void onTextPref();
+  void onPreviewCheck(bool thePreview);
+  void updatePreview();
+
+ private:
+  void createScalarBar();
+  void deleteScalarBar();
+
+  QCheckBox* myPreviewCheck;
+  VISU_ScalarMapAct* myPreviewActor;
+  VISU::ScalarMap_i* myScalarMap;
+
+  bool myBusy;
 };
 
 
@@ -163,7 +179,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 +192,7 @@ class VisuGUI_ScalarBarDlg : public QDialog
 
  protected slots:
   void accept();
+  void reject();
 
  protected:
   VisuGUI_ScalarBarPane* myScalarPane;