Salome HOME
Copyrights update
[modules/gui.git] / src / Plot2d / Plot2d_SetupViewDlg.h
1 // Copyright (C) 2005  OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
2 // 
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either 
6 // version 2.1 of the License.
7 // 
8 // This library is distributed in the hope that it will be useful 
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of 
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public  
14 // License along with this library; if not, write to the Free Software 
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/
18 //
19 #ifndef PLOT2D_SETUPVIEWDLG_H
20 #define PLOT2D_SETUPVIEWDLG_H
21
22 #include "Plot2d.h"
23 #include <qdialog.h>
24
25 class QSpinBox;
26 class QCheckBox;
27 class QLineEdit;
28 class QComboBox;
29 class QToolButton;
30 class QPushButton;
31
32 class PLOT2D_EXPORT Plot2d_SetupViewDlg : public QDialog
33
34   Q_OBJECT
35
36 public:
37   Plot2d_SetupViewDlg( QWidget* parent = 0, bool showDefCheck = false, bool secondAxisY = false );
38   ~Plot2d_SetupViewDlg();
39
40   void    setMainTitle( bool enable, const QString& title = QString::null );
41   bool    isMainTitleEnabled();
42   QString getMainTitle();
43   void    setXTitle( bool enable, const QString& title = QString::null );
44   bool    isXTitleEnabled();
45   QString getXTitle();
46   void    setYTitle( bool enable, const QString& title = QString::null );
47   void    setY2Title( bool enable, const QString& title = QString::null );
48   bool    isYTitleEnabled();
49   bool    isY2TitleEnabled();
50   QString getYTitle();
51   QString getY2Title();
52   void    setCurveType( const int type );
53   int     getCurveType();
54   void    setLegend( bool enable, int pos );
55   bool    isLegendEnabled();
56   int     getLegendPos();
57   void    setMarkerSize( const int size );
58   int     getMarkerSize();
59   void    setBackgroundColor( const QColor& color );
60   QColor  getBackgroundColor();
61   void    setMajorGrid( bool enableX, const int xdiv, bool enableY, const int divY,
62                         bool enableY2, const int divY2 );
63   void    getMajorGrid( bool& enableX, int& xdiv, bool& enableY, int& divY,
64                         bool& enableY2, int& divY2);
65   void    setMinorGrid( bool enableX, const int xdiv, bool enableY, const int divY,
66                         bool enableY2, const int divY2);
67   void    getMinorGrid( bool& enableX, int& xdiv, bool& enableY, int& divY,
68                         bool& enableY2, int& divY2);
69   void    setScaleMode( const int xMode, const int yMode );
70   int     getXScaleMode();
71   int     getYScaleMode();
72   bool    isSetAsDefault();
73
74 protected slots:
75   void   onMainTitleChecked();
76   void   onXTitleChecked();
77   void   onYTitleChecked();
78   void   onY2TitleChecked();
79   void   onBackgroundClicked();
80   void   onLegendChecked();
81   void   onXGridMajorChecked();
82   void   onYGridMajorChecked();
83   void   onY2GridMajorChecked();
84   void   onXGridMinorChecked();
85   void   onYGridMinorChecked();
86   void   onY2GridMinorChecked();
87
88 private:
89   QCheckBox*     myTitleCheck;
90   QLineEdit*     myTitleEdit;
91   QCheckBox*     myTitleXCheck;
92   QLineEdit*     myTitleXEdit;
93   QCheckBox*     myTitleYCheck;
94   QCheckBox*     myTitleY2Check;
95   QLineEdit*     myTitleYEdit;
96   QLineEdit*     myTitleY2Edit;
97   QToolButton*   myBackgroundBtn;
98   QCheckBox*     myXGridCheck;
99   QSpinBox*      myXGridSpin;
100   QCheckBox*     myYGridCheck;
101   QCheckBox*     myY2GridCheck;
102   QSpinBox*      myYGridSpin;
103   QSpinBox*      myY2GridSpin;
104   QCheckBox*     myXMinGridCheck;
105   QSpinBox*      myXMinGridSpin;
106   QCheckBox*     myYMinGridCheck;
107   QCheckBox*     myY2MinGridCheck;
108   QSpinBox*      myYMinGridSpin;
109   QSpinBox*      myY2MinGridSpin;
110   QComboBox*     myCurveCombo;
111   QCheckBox*     myLegendCheck;
112   QComboBox*     myLegendCombo;
113   QSpinBox*      myMarkerSpin;
114   QComboBox*     myXModeCombo;
115   QComboBox*     myYModeCombo;
116   QComboBox*     myY2ModeCombo;
117   QCheckBox*     myDefCheck;
118
119   QPushButton*   myOkBtn;
120   QPushButton*   myCancelBtn;
121   bool           mySecondAxisY;
122 };
123
124 #endif