Salome HOME
Merge from V6_main 01/04/2013
[modules/gui.git] / src / Plot2d / Plot2d_SetupViewDlg.h
1 // Copyright (C) 2007-2013  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
23 // File   : Plot2d_SetupViewDlg.cxx
24 // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
25 //
26 #ifndef PLOT2D_SETUPVIEWDLG_H
27 #define PLOT2D_SETUPVIEWDLG_H
28
29 #include "Plot2d.h"
30
31 #include <QDialog>
32
33 class QSpinBox;
34 class QCheckBox;
35 class QLineEdit;
36 class QComboBox;
37 class QPushButton;
38 class QtxColorButton;
39 class QtxFontEdit;
40
41 class PLOT2D_EXPORT Plot2d_SetupViewDlg : public QDialog
42
43   Q_OBJECT
44
45 public:
46   Plot2d_SetupViewDlg( QWidget* = 0, bool = false, bool = false );
47   ~Plot2d_SetupViewDlg();
48
49   void            setMainTitle( bool, const QString& = QString() );
50   bool            isMainTitleEnabled();
51   QString         getMainTitle();
52
53   void            setXTitle( bool, const QString& = QString() );
54   bool            isXTitleEnabled();
55   QString         getXTitle();
56
57   void            setYTitle( bool, const QString& = QString() );
58   void            setY2Title( bool, const QString& = QString() );
59   bool            isYTitleEnabled();
60   bool            isY2TitleEnabled();
61   QString         getYTitle();
62   QString         getY2Title();
63
64   void            setCurveType( const int );
65   int             getCurveType();
66
67   bool            getLMaxNormMode();
68   void            setLMaxNormMode(const bool);
69   bool            getLMinNormMode();
70   void            setLMinNormMode(const bool);
71   bool            getRMaxNormMode();
72   void            setRMaxNormMode(const bool);
73   bool            getRMinNormMode();
74   void            setRMinNormMode(const bool);
75
76   void            setLegend( bool, int, const QFont&, const QColor& );
77   bool            isLegendEnabled();
78   int             getLegendPos();
79   QFont           getLegendFont();
80   QColor          getLegendColor();
81   
82   void            setMarkerSize( const int );
83   int             getMarkerSize();
84
85   void            setBackgroundColor( const QColor& );
86   QColor          getBackgroundColor();
87
88   void            setMajorGrid( bool, const int, bool, const int, bool, const int );
89   void            getMajorGrid( bool&, int&, bool&, int&, bool&, int& );
90   void            setMinorGrid( bool, const int, bool, const int, bool, const int );
91   void            getMinorGrid( bool&, int&, bool&, int&, bool&, int& );
92
93   void            setScaleMode( const int, const int );
94   int             getXScaleMode();
95   int             getYScaleMode();
96
97   void            setDeviationMarkerLw( const int);
98   int             getDeviationMarkerLw() const;
99
100   void            setDeviationMarkerTs( const int);
101   int             getDeviationMarkerTs() const;
102
103   void            setDeviationMarkerCl( const QColor&);
104   QColor          getDeviationMarkerCl() const;
105
106   bool            isSetAsDefault();
107
108 protected slots:
109   void            onMainTitleChecked();
110   void            onXTitleChecked();
111   void            onYTitleChecked();
112   void            onY2TitleChecked();
113   void            onLegendChecked();
114   void            onXGridMajorChecked();
115   void            onYGridMajorChecked();
116   void            onY2GridMajorChecked();
117   void            onXGridMinorChecked();
118   void            onYGridMinorChecked();
119   void            onY2GridMinorChecked();
120   void            onNormLMaxChecked();
121   void            onNormLMinChecked();
122   void            onNormRMaxChecked();
123   void            onNormRMinChecked();
124   void            onHelp();
125
126 private:
127   QCheckBox*      myTitleCheck;
128   QLineEdit*      myTitleEdit;
129   QCheckBox*      myTitleXCheck;
130   QLineEdit*      myTitleXEdit;
131   QCheckBox*      myTitleYCheck;
132   QCheckBox*      myTitleY2Check;
133   QLineEdit*      myTitleYEdit;
134   QLineEdit*      myTitleY2Edit;
135   QtxColorButton* myBackgroundBtn;
136   QtxColorButton* myLegendColor;
137   QtxFontEdit*    myLegendFont;
138   QCheckBox*      myXGridCheck;
139   QSpinBox*       myXGridSpin;
140   QCheckBox*      myYGridCheck;
141   QCheckBox*      myY2GridCheck;
142   QSpinBox*       myYGridSpin;
143   QSpinBox*       myY2GridSpin;
144   QCheckBox*      myXMinGridCheck;
145   QSpinBox*       myXMinGridSpin;
146   QCheckBox*      myYMinGridCheck;
147   QCheckBox*      myY2MinGridCheck;
148   QSpinBox*       myYMinGridSpin;
149   QSpinBox*       myY2MinGridSpin;
150   QComboBox*      myCurveCombo;
151   QCheckBox*      myLegendCheck;
152   QComboBox*      myLegendCombo;
153   QSpinBox*       myMarkerSpin;
154   QComboBox*      myXModeCombo;
155   QComboBox*      myYModeCombo;
156   QCheckBox*      myNormLMaxCheck;
157   QCheckBox*      myNormLMinCheck;
158   QCheckBox*      myNormRMaxCheck;
159   QCheckBox*      myNormRMinCheck;
160   QComboBox*      myY2ModeCombo;
161   QCheckBox*      myDefCheck;
162   QPushButton*    myOkBtn;
163   QPushButton*    myCancelBtn;
164   QPushButton*    myHelpBtn;
165   QSpinBox*       myDeviationLw;
166   QSpinBox*       myDeviationTs;
167   QtxColorButton* myDeviationCl;
168   bool            mySecondAxisY;
169 };
170
171 #endif // PLOT2D_SETUPVIEWDLG_H