Salome HOME
Merge from OCC_development_generic_2006
[modules/visu.git] / src / VISUGUI / VisuGUI_ScalarBarDlg.h
index c8ddc6ab4116933e582de69a094c7639d8c06925..4f53a39bdc4e221c2cb076d7ff432af730d5795b 100644 (file)
@@ -60,7 +60,8 @@ class QToolButton;
 
 class QtxDblSpinBox;
 class SalomeApp_Module;
-class VisuGUI_FontWg;
+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;
 };
 
 
@@ -176,6 +192,7 @@ class VisuGUI_ScalarBarDlg : public QDialog
 
  protected slots:
   void accept();
+  void reject();
 
  protected:
   VisuGUI_ScalarBarPane* myScalarPane;