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