+class VisuGUI_ScalarBarPane : public QVBox
+{
+ Q_OBJECT;
+
+ public:
+ VisuGUI_ScalarBarPane(QWidget* parent, bool SetPref);
+ ~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();}
+ int getOrientation();
+ void setPosAndSize( double x, double y, double w, double h, bool vert );
+ double getX() {return XSpin->value();}
+ double getY() {return YSpin->value();}
+ double getWidth() {return WidthSpin->value();}
+ double getHeight() {return HeightSpin->value();}
+ void setScalarBarData( int colors, int labels );
+ int getNbColors() {return ColorSpin->value();}
+ int getNbLabels() {return LabelSpin->value();}
+ bool isLogarithmic() {return CBLog->isChecked();}
+ void setLogarithmic( bool on ) {CBLog->setChecked( on );}
+ bool isToSave() {return CBSave ? CBSave->isChecked() : false;}
+
+ void initFromResources();
+ void storeToResources();
+
+ void initFromPrsObject(VISU::ScalarMap_i* thePrs);
+ int storeToPrsObject(VISU::ScalarMap_i* thePrs);
+
+ bool check();
+ void deletePreview();
+
+ protected:
+ QButtonGroup* RangeGroup;
+ QRadioButton* RBFrange;
+ QRadioButton* RBIrange;
+ QLineEdit* MinEdit;
+ QLineEdit* MaxEdit;
+
+ QRadioButton* RBhori;
+ QRadioButton* RBvert;
+
+ QtxDblSpinBox* XSpin;
+ QtxDblSpinBox* YSpin;
+
+ QtxDblSpinBox* WidthSpin;
+ QtxDblSpinBox* HeightSpin;
+
+ QSpinBox* ColorSpin;
+ QSpinBox* LabelSpin;
+
+ QCheckBox* CBSave;
+ QCheckBox* CBLog;
+ QLabel* myModeLbl;
+ QComboBox* myModeCombo;
+ QPushButton* myTextBtn;
+ VisuGUI_TextPrefDlg* myTextDlg;
+
+ double Imin, Imax, /* Fmin, Fmax,*/ Rmin, Rmax;
+ double myHorX, myHorY, myHorW, myHorH;
+ double myVerX, myVerY, myVerW, myVerH;
+ int myRangeMode;
+ bool myIsStoreTextProp;
+
+ private slots:
+ 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;
+};