Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Plot2d_SetupViewDlg.h
Go to the documentation of this file.
1 // Copyright (C) 2007-2016 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, or (at your option) any later version.
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 
42 {
43  Q_OBJECT
44 
45 public:
46  Plot2d_SetupViewDlg( QWidget* = 0, bool = false, bool = false );
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, int, const QFont&, const QColor&, const QColor& );
77  bool isLegendEnabled();
78  int getLegendPos();
79  int getLegendSymbolType();
80  QFont getLegendFont();
81  QColor getLegendColor();
82  QColor getSelectedLegendColor();
83 
84  void setMarkerSize( const int );
85  int getMarkerSize();
86 
87  void setBackgroundColor( const QColor& );
88  QColor getBackgroundColor();
89 
90  void setSelectionColor( const QColor& );
91  QColor getSelectionColor();
92 
93  void setMajorGrid( bool, const int, bool, const int, bool, const int );
94  void getMajorGrid( bool&, int&, bool&, int&, bool&, int& );
95  void setMinorGrid( bool, const int, bool, const int, bool, const int );
96  void getMinorGrid( bool&, int&, bool&, int&, bool&, int& );
97 
98  void setScaleMode( const int, const int );
99  int getXScaleMode();
100  int getYScaleMode();
101 
102  void setDeviationMarkerLw( const int);
103  int getDeviationMarkerLw() const;
104 
105  void setDeviationMarkerTs( const int);
106  int getDeviationMarkerTs() const;
107 
108  void setDeviationMarkerCl( const QColor&);
109  QColor getDeviationMarkerCl() const;
110 
111  bool isSetAsDefault();
112 
113 protected slots:
114  void onMainTitleChecked();
115  void onXTitleChecked();
116  void onYTitleChecked();
117  void onY2TitleChecked();
118  void onLegendChecked();
119  void onXGridMajorChecked();
120  void onYGridMajorChecked();
121  void onY2GridMajorChecked();
122  void onXGridMinorChecked();
123  void onYGridMinorChecked();
124  void onY2GridMinorChecked();
125  void onNormLMaxChecked();
126  void onNormLMinChecked();
127  void onNormRMaxChecked();
128  void onNormRMinChecked();
129  void onHelp();
130 
131 private:
132  QCheckBox* myTitleCheck;
134  QCheckBox* myTitleXCheck;
136  QCheckBox* myTitleYCheck;
137  QCheckBox* myTitleY2Check;
145  QCheckBox* myXGridCheck;
147  QCheckBox* myYGridCheck;
148  QCheckBox* myY2GridCheck;
151  QCheckBox* myXMinGridCheck;
153  QCheckBox* myYMinGridCheck;
154  QCheckBox* myY2MinGridCheck;
158  QCheckBox* myLegendCheck;
164  QCheckBox* myNormLMaxCheck;
165  QCheckBox* myNormLMinCheck;
166  QCheckBox* myNormRMaxCheck;
167  QCheckBox* myNormRMinCheck;
169  QCheckBox* myDefCheck;
170  QPushButton* myOkBtn;
171  QPushButton* myCancelBtn;
172  QPushButton* myHelpBtn;
177 };
178 
179 #endif // PLOT2D_SETUPVIEWDLG_H