Salome HOME
c3083b6c42b8a7c831228fde8138f88b3868e7ab
[modules/gui.git] / src / Plot2d / Plot2d_FitDataDlg.h
1 #ifndef PLOT2D_FITDATADLG_H
2 #define PLOT2D_FITDATADLG_H
3
4 #include "Plot2d.h"
5 #include <qdialog.h>
6
7 class QButtonGroup;
8 class QRadioButton;
9 class QLineEdit;
10 class QPushButton;
11
12 class PLOT2D_EXPORT Plot2d_FitDataDlg : public QDialog
13 {
14   Q_OBJECT
15
16 public:
17 // constuctor
18   Plot2d_FitDataDlg( QWidget* parent, bool secondAxisY );
19
20 // sets range
21   void setRange(const double xMin, 
22                 const double xMax,
23                 const double yMin,
24                 const double yMax,
25                 const double y2Min = 0,
26                 const double y2Max = 0);
27 // gets range, returns mode (see getMode())
28   int getRange(double& xMin, 
29                double& xMax,
30                double& yMin,
31                double& yMax,
32                double& y2Min,
33                double& y2Max);
34 // gets mode : 0 - Fit all; 1 - Fit horizontal, 2 - Fit vertical
35   int getMode();
36
37 protected slots:
38 // called when range mode changed
39   void onModeChanged(int);
40
41 private:
42   QButtonGroup*           myRangeGrp;
43   QRadioButton*           myModeAllRB;
44   QRadioButton*           myModeHorRB;
45   QRadioButton*           myModeVerRB;
46   QLineEdit*              myXMinEdit;
47   QLineEdit*              myYMinEdit;
48   QLineEdit*              myY2MinEdit;
49   QLineEdit*              myXMaxEdit;
50   QLineEdit*              myYMaxEdit;
51   QLineEdit*              myY2MaxEdit;
52   QPushButton*            myOkBtn;
53   QPushButton*            myCancelBtn;
54   bool                    mySecondAxisY;
55 };
56
57 #endif