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