Salome HOME
d53d1aa369db1b8dde8927a15a5d02d538bb8ffd
[modules/gui.git] / src / Plot2d / Plot2d_SetupViewDlg.h
1 #ifndef PLOT2D_SETUPVIEWDLG_H
2 #define PLOT2D_SETUPVIEWDLG_H
3
4 #include "Plot2d.h"
5
6 #include <qdialog.h>
7
8 class QSpinBox;
9 class QCheckBox;
10 class QLineEdit;
11 class QComboBox;
12 class QToolButton;
13 class QPushButton;
14
15 class PLOT2D_EXPORT Plot2d_SetupViewDlg : public QDialog
16
17   Q_OBJECT
18
19 public:
20   Plot2d_SetupViewDlg( QWidget* parent = 0, bool showDefCheck = false, bool secondAxisY = false );
21   ~Plot2d_SetupViewDlg();
22
23   void    setMainTitle( bool enable, const QString& title = QString::null );
24   bool    isMainTitleEnabled();
25   QString getMainTitle();
26   void    setXTitle( bool enable, const QString& title = QString::null );
27   bool    isXTitleEnabled();
28   QString getXTitle();
29   void    setYTitle( bool enable, const QString& title = QString::null );
30   void    setY2Title( bool enable, const QString& title = QString::null );
31   bool    isYTitleEnabled();
32   bool    isY2TitleEnabled();
33   QString getYTitle();
34   QString getY2Title();
35   void    setCurveType( const int type );
36   int     getCurveType();
37   void    setLegend( bool enable, int pos );
38   bool    isLegendEnabled();
39   int     getLegendPos();
40   void    setMarkerSize( const int size );
41   int     getMarkerSize();
42   void    setBackgroundColor( const QColor& color );
43   QColor  getBackgroundColor();
44   void    setMajorGrid( bool enableX, const int xdiv, bool enableY, const int divY,
45                         bool enableY2, const int divY2 );
46   void    getMajorGrid( bool& enableX, int& xdiv, bool& enableY, int& divY,
47                         bool& enableY2, int& divY2);
48   void    setMinorGrid( bool enableX, const int xdiv, bool enableY, const int divY,
49                         bool enableY2, const int divY2);
50   void    getMinorGrid( bool& enableX, int& xdiv, bool& enableY, int& divY,
51                         bool& enableY2, int& divY2);
52   void    setScaleMode( const int xMode, const int yMode );
53   int     getXScaleMode();
54   int     getYScaleMode();
55   bool    isSetAsDefault();
56
57 protected slots:
58   void   onMainTitleChecked();
59   void   onXTitleChecked();
60   void   onYTitleChecked();
61   void   onY2TitleChecked();
62   void   onBackgroundClicked();
63   void   onLegendChecked();
64   void   onXGridMajorChecked();
65   void   onYGridMajorChecked();
66   void   onY2GridMajorChecked();
67   void   onXGridMinorChecked();
68   void   onYGridMinorChecked();
69   void   onY2GridMinorChecked();
70
71 private:
72   QCheckBox*     myTitleCheck;
73   QLineEdit*     myTitleEdit;
74   QCheckBox*     myTitleXCheck;
75   QLineEdit*     myTitleXEdit;
76   QCheckBox*     myTitleYCheck;
77   QCheckBox*     myTitleY2Check;
78   QLineEdit*     myTitleYEdit;
79   QLineEdit*     myTitleY2Edit;
80   QToolButton*   myBackgroundBtn;
81   QCheckBox*     myXGridCheck;
82   QSpinBox*      myXGridSpin;
83   QCheckBox*     myYGridCheck;
84   QCheckBox*     myY2GridCheck;
85   QSpinBox*      myYGridSpin;
86   QSpinBox*      myY2GridSpin;
87   QCheckBox*     myXMinGridCheck;
88   QSpinBox*      myXMinGridSpin;
89   QCheckBox*     myYMinGridCheck;
90   QCheckBox*     myY2MinGridCheck;
91   QSpinBox*      myYMinGridSpin;
92   QSpinBox*      myY2MinGridSpin;
93   QComboBox*     myCurveCombo;
94   QCheckBox*     myLegendCheck;
95   QComboBox*     myLegendCombo;
96   QSpinBox*      myMarkerSpin;
97   QComboBox*     myXModeCombo;
98   QComboBox*     myYModeCombo;
99   QComboBox*     myY2ModeCombo;
100   QCheckBox*     myDefCheck;
101
102   QPushButton*   myOkBtn;
103   QPushButton*   myCancelBtn;
104   bool           mySecondAxisY;
105 };
106
107 #endif