Salome HOME
Redesign SALOME documentation
[modules/gui.git] / src / Plot2d / Plot2d_SetupViewDlg.cxx
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 #include "Plot2d_SetupViewDlg.h"
27
28 #ifndef NO_SUIT
29 #include <SUIT_Session.h>
30 #include <SUIT_Application.h>
31 #endif
32 #include <QtxColorButton.h>
33 #include <QtxFontEdit.h>
34
35 #include <QCheckBox>
36 #include <QLineEdit>
37 #include <QComboBox>
38 #include <QSpinBox>
39 #include <QGridLayout>
40 #include <QHBoxLayout>
41 #include <QGroupBox>
42 #include <QLabel>
43 #include <QPushButton>
44 #include <QTabWidget>
45
46 const int MARGIN_SIZE     = 11;
47 const int SPACING_SIZE    = 6;
48 const int MIN_EDIT_WIDTH  = 200;
49 const int MIN_COMBO_WIDTH = 100;
50 const int MIN_SPIN_WIDTH  = 70;
51
52 /*!
53   \class Plot2d_SetupViewDlg
54   \brief Dialog box to setup Plot2d view window.
55 */
56
57 /*!
58   \brief Constructor.
59   \param parent parent widget
60   \param showDefCheck if \c true, show "Set settings as default" check box
61   \param secondAxisY if \c true, show widgets for the second (right) vertical axis
62 */
63 Plot2d_SetupViewDlg::Plot2d_SetupViewDlg( QWidget* parent,
64                                           bool showDefCheck,
65                                           bool secondAxisY )
66 : QDialog( parent ),
67   mySecondAxisY( secondAxisY )
68 {
69   setModal( true );
70   setWindowTitle( tr("TLT_SETUP_PLOT2D_VIEW") );
71   setSizeGripEnabled( true );
72
73   QGridLayout* topLayout = new QGridLayout( this );
74   topLayout->setSpacing( SPACING_SIZE );
75   topLayout->setMargin( MARGIN_SIZE );
76
77   // main title
78   myTitleCheck = new QCheckBox( tr( "PLOT2D_ENABLE_MAIN_TITLE" ), this );
79   myTitleEdit  = new QLineEdit( this );
80   myTitleEdit->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
81   myTitleEdit->setMinimumWidth( MIN_EDIT_WIDTH );
82
83   // curve type : points, lines, spline
84   QLabel* aCurveLab = new QLabel( tr( "PLOT2D_CURVE_TYPE_LBL" ), this );
85   myCurveCombo      = new QComboBox( this );
86   myCurveCombo->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
87   myCurveCombo->setMinimumWidth( MIN_COMBO_WIDTH );
88   myCurveCombo->addItem( tr( "PLOT2D_CURVE_TYPE_POINTS" ) );
89   myCurveCombo->addItem( tr( "PLOT2D_CURVE_TYPE_LINES" ) );
90   myCurveCombo->addItem( tr( "PLOT2D_CURVE_TYPE_SPLINE" ) );
91
92   // marker size
93   QLabel* aMarkerLab  = new QLabel( tr( "PLOT2D_MARKER_SIZE_LBL" ), this );
94   myMarkerSpin = new QSpinBox( this );
95   myMarkerSpin->setMinimum( 0 );
96   myMarkerSpin->setMaximum( 100 );
97   myMarkerSpin->setSingleStep( 1 );
98   myMarkerSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
99   myMarkerSpin->setMinimumWidth( MIN_SPIN_WIDTH );
100
101   // background color
102   QLabel* aBGLab  = new QLabel( tr( "PLOT2D_BACKGROUND_COLOR_LBL" ), this );
103   myBackgroundBtn = new QtxColorButton( this );
104
105   // selection color
106   QLabel* aSelectionLab  = new QLabel( tr( "PLOT2D_SELECTION_COLOR_LBL" ), this );
107   mySelectionBtn = new QtxColorButton( this );
108
109   QHBoxLayout* ViewerColorLayout = new QHBoxLayout;
110   ViewerColorLayout->addWidget( aBGLab );
111   ViewerColorLayout->addWidget( myBackgroundBtn );
112   ViewerColorLayout->addStretch();
113   ViewerColorLayout->addWidget( aSelectionLab );
114   ViewerColorLayout->addWidget( mySelectionBtn );
115   ViewerColorLayout->addStretch();
116
117   // legend
118   QGroupBox* aLegendGrp = new QGroupBox( tr( "PLOT2D_LEGEND_GROUP" ), this );
119   QGridLayout* aLegendLayout = new QGridLayout( aLegendGrp );
120   aLegendLayout->setMargin( MARGIN_SIZE ); aLegendLayout->setSpacing( SPACING_SIZE );
121   aLegendGrp->setLayout( aLegendLayout );
122
123   myLegendCheck = new QCheckBox( tr( "PLOT2D_ENABLE_LEGEND" ), this );
124
125   QLabel* aLegendPosition = new QLabel( tr( "PLOT2D_LEGEND_POSITION" ), this );
126   myLegendCombo = new QComboBox( this );
127   myLegendCombo->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
128   myLegendCombo->setMinimumWidth( MIN_COMBO_WIDTH );
129   myLegendCombo->addItem( tr( "PLOT2D_LEGEND_POSITION_LEFT" ) );
130   myLegendCombo->addItem( tr( "PLOT2D_LEGEND_POSITION_RIGHT" ) );
131   myLegendCombo->addItem( tr( "PLOT2D_LEGEND_POSITION_TOP" ) );
132   myLegendCombo->addItem( tr( "PLOT2D_LEGEND_POSITION_BOTTOM" ) );
133
134   QLabel* aLegendSymbolType = new QLabel( tr( "PLOT2D_LEGEND_SYMBOL_TYPE" ), this );
135   myLegendSymbolType = new QComboBox( this );
136   myLegendSymbolType->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
137   myLegendSymbolType->setMinimumWidth( MIN_COMBO_WIDTH );
138   myLegendSymbolType->addItem( tr( "PLOT2D_MARKER_ON_LINE" ) );
139   myLegendSymbolType->addItem( tr( "PLOT2D_MARKER_ABOVE_LINE" ) );
140
141   QLabel* aLegendFontLab = new QLabel( tr( "PLOT2D_LEGEND_FONT" ), this );
142   myLegendFont = new QtxFontEdit( this );
143
144   QLabel* aLegendFontColor = new QLabel( tr( "PLOT2D_LEGEND_FONT_COLOR" ), this );
145   myLegendFontColor = new QtxColorButton( this );
146
147   QLabel* aSelectLegendFontColor = new QLabel( tr( "PLOT2D_SELECTED_LEGEND_FONT_COLOR" ), this );
148   mySelectedLegendFontColor = new QtxColorButton( this );
149
150   QHBoxLayout* FontLayout = new QHBoxLayout;
151   FontLayout->addWidget( aLegendFontColor );
152   FontLayout->addWidget( myLegendFontColor );
153   FontLayout->addStretch();
154   FontLayout->addWidget( aSelectLegendFontColor );
155   FontLayout->addWidget( mySelectedLegendFontColor );
156   FontLayout->addStretch();
157
158   aLegendLayout->addWidget( myLegendCheck,      0, 0 );
159   aLegendLayout->addWidget( aLegendPosition,    1, 0 );
160   aLegendLayout->addWidget( myLegendCombo,      1, 1 );
161   aLegendLayout->addWidget( aLegendSymbolType,  2, 0 );
162   aLegendLayout->addWidget( myLegendSymbolType, 2, 1 );
163   aLegendLayout->addWidget( aLegendFontLab,     3, 0 );
164   aLegendLayout->addWidget( myLegendFont,       3, 1 );
165   aLegendLayout->addLayout( FontLayout,         4, 0, 1, 2 );
166
167   //Deviation marker parameters
168   QGroupBox* aDeviationGrp = new QGroupBox( tr( "PLOT2D_DEVIATION_MARKER_TLT" ), this );
169   QHBoxLayout* aDeviationLayout = new QHBoxLayout(aDeviationGrp);
170
171   //Deviation marker parameters : Line width
172   QLabel* aDeviationLwLbl  = new QLabel( tr( "PLOT2D_DEVIATION_LW_LBL" ), aDeviationGrp );
173   myDeviationLw  = new QSpinBox( aDeviationGrp );
174   myDeviationLw->setMinimum( 1 );
175   myDeviationLw->setMaximum( 5 );
176   myDeviationLw->setSingleStep( 1 );
177   myDeviationLw->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
178
179   //Deviation marker parameters : Line width
180   QLabel* aDeviationTsLbl  = new QLabel( tr( "PLOT2D_DEVIATION_TS_LBL" ), aDeviationGrp );
181   myDeviationTs  =  new QSpinBox( aDeviationGrp );
182   myDeviationTs->setMinimum( 1 );
183   myDeviationTs->setMaximum( 5 );
184   myDeviationTs->setSingleStep( 1 );
185   myDeviationTs->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
186
187   //Deviation marker parameters : Color
188   QLabel* aDeviationClLbl  = new QLabel( tr( "PLOT2D_DEVIATION_CL_LBL" ), aDeviationGrp );
189   myDeviationCl = new QtxColorButton( aDeviationGrp );
190
191   aDeviationLayout->addWidget( aDeviationLwLbl );
192   aDeviationLayout->addWidget( myDeviationLw );
193   aDeviationLayout->addWidget( aDeviationTsLbl );
194   aDeviationLayout->addWidget( myDeviationTs );
195   aDeviationLayout->addWidget( aDeviationClLbl );
196   aDeviationLayout->addWidget( myDeviationCl );
197
198   // normalize mode
199   QGroupBox* aNormalizeGrp = new QGroupBox( tr( "PLOT2D_NORMALIZE_TLT" ), this );
200   QGridLayout* aNormalizeLayout = new QGridLayout( aNormalizeGrp );
201   aNormalizeLayout->setMargin( MARGIN_SIZE ); aNormalizeLayout->setSpacing( SPACING_SIZE );
202   aNormalizeGrp->setLayout( aNormalizeLayout );
203   QLabel* aYLeftLab  = new QLabel( tr( "PLOT2D_NORMALIZE_LEFT_AXIS" ), aNormalizeGrp );
204   myNormLMinCheck = new QCheckBox( tr( "PLOT2D_NORMALIZE_MODE_MIN" ), aNormalizeGrp );
205   myNormLMaxCheck = new QCheckBox( tr( "PLOT2D_NORMALIZE_MODE_MAX" ), aNormalizeGrp );
206   QLabel* aYRightLab  = new QLabel( tr( "PLOT2D_NORMALIZE_RIGHT_AXIS" ), aNormalizeGrp );
207   myNormRMinCheck = new QCheckBox( tr( "PLOT2D_NORMALIZE_MODE_MIN" ), aNormalizeGrp );
208   myNormRMaxCheck = new QCheckBox( tr( "PLOT2D_NORMALIZE_MODE_MAX" ), aNormalizeGrp );
209
210   aNormalizeLayout->addWidget( aYLeftLab,    0, 0 );
211   aNormalizeLayout->addWidget( myNormLMaxCheck,    0, 1 );
212   aNormalizeLayout->addWidget( myNormLMinCheck, 0, 2 );
213   aNormalizeLayout->addWidget( aYRightLab,    1, 0 );
214   aNormalizeLayout->addWidget( myNormRMaxCheck,    1, 1 );
215   aNormalizeLayout->addWidget( myNormRMinCheck, 1, 2 );
216
217   // scale mode
218   QGroupBox* aScaleGrp = new QGroupBox( tr( "PLOT2D_SCALE_TLT" ), this );
219   QGridLayout* aScaleLayout = new QGridLayout( aScaleGrp );
220   aScaleLayout->setMargin( MARGIN_SIZE ); aScaleLayout->setSpacing( SPACING_SIZE );
221   aScaleGrp->setLayout( aScaleLayout );
222
223   QLabel* xScaleLab = new QLabel( tr( "PLOT2D_SCALE_MODE_HOR" ), aScaleGrp );
224   myXModeCombo = new QComboBox( aScaleGrp );
225   myXModeCombo->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
226   myXModeCombo->setMinimumWidth( MIN_COMBO_WIDTH );
227   myXModeCombo->addItem( tr( "PLOT2D_SCALE_MODE_LINEAR" ) );
228   myXModeCombo->addItem( tr( "PLOT2D_SCALE_MODE_LOGARITHMIC" ) );
229
230   QLabel* yScaleLab = new QLabel( tr( "PLOT2D_SCALE_MODE_VER" ), aScaleGrp );
231   myYModeCombo = new QComboBox( aScaleGrp );
232   myYModeCombo->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
233   myYModeCombo->setMinimumWidth( MIN_COMBO_WIDTH );
234   myYModeCombo->addItem( tr( "PLOT2D_SCALE_MODE_LINEAR" ) );
235   myYModeCombo->addItem( tr( "PLOT2D_SCALE_MODE_LOGARITHMIC" ) );
236
237   aScaleLayout->addWidget( xScaleLab,    0, 0 );
238   aScaleLayout->addWidget( myXModeCombo, 0, 1 );
239   aScaleLayout->addWidget( yScaleLab,    0, 2 );
240   aScaleLayout->addWidget( myYModeCombo, 0, 3 );
241
242   // tab widget for choose properties of axis
243   QTabWidget* aTabWidget = new QTabWidget( this );
244
245   // widget for parameters on Ox
246   QWidget* aXWidget = new QWidget(aTabWidget);
247   QGridLayout* aXLayout = new QGridLayout( aXWidget );
248   aXLayout->setSpacing( SPACING_SIZE );
249   aXLayout->setMargin( MARGIN_SIZE );
250
251   // axis title
252   myTitleXCheck = new QCheckBox( tr( "PLOT2D_ENABLE_HOR_TITLE" ), aXWidget );
253   myTitleXEdit  = new QLineEdit( aXWidget );
254   myTitleXEdit->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
255   myTitleXEdit->setMinimumWidth( MIN_EDIT_WIDTH );
256   aXLayout->addWidget( myTitleXCheck,1,    0    );
257   aXLayout->addWidget( myTitleXEdit, 1, 1, 1, 3 );
258
259   // grid
260   QGroupBox* aGridGrpX = new QGroupBox( tr( "PLOT2D_GRID_TLT" ), aXWidget );
261   QGridLayout* aGridLayoutX = new QGridLayout( aGridGrpX );
262   aGridLayoutX->setMargin( MARGIN_SIZE );
263   aGridLayoutX->setSpacing( SPACING_SIZE );
264
265   myXGridCheck      = new QCheckBox( tr( "PLOT2D_GRID_ENABLE_HOR_MAJOR" ), aGridGrpX );
266
267   QLabel* aXMajLbl  = new QLabel( tr( "PLOT2D_MAX_INTERVALS" ), aGridGrpX);
268   myXGridSpin       = new QSpinBox( aGridGrpX );
269   myXGridSpin->setMinimum( 1 );
270   myXGridSpin->setMaximum( 100 );
271   myXGridSpin->setSingleStep( 1 );
272   myXGridSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
273   myXGridSpin->setMinimumWidth( MIN_SPIN_WIDTH );
274
275   myXMinGridCheck      = new QCheckBox( tr( "PLOT2D_GRID_ENABLE_HOR_MINOR" ), aGridGrpX );
276
277   QLabel* aXMinLbl     = new QLabel( tr( "PLOT2D_MAX_INTERVALS" ), aGridGrpX);
278   myXMinGridSpin       = new QSpinBox( aGridGrpX );
279   myXMinGridSpin->setMinimum( 1 );
280   myXMinGridSpin->setMaximum( 100 );
281   myXMinGridSpin->setSingleStep( 1 );
282   myXMinGridSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
283   myXMinGridSpin->setMinimumWidth( MIN_SPIN_WIDTH );
284
285   aGridLayoutX->addWidget( myXGridCheck,    0, 0 );
286   aGridLayoutX->addWidget( aXMajLbl,        0, 1 );
287   aGridLayoutX->addWidget( myXGridSpin,     0, 2 );
288   aGridLayoutX->addWidget( myXMinGridCheck, 1, 0 );
289   aGridLayoutX->addWidget( aXMinLbl,        1, 1 );
290   aGridLayoutX->addWidget( myXMinGridSpin,  1, 2 );
291   aXLayout->addWidget( aGridGrpX, 3, 0, 1, 4 );
292
293   aTabWidget->addTab( aXWidget, tr( "INF_AXES_X" ) );
294
295   // widget for parameters on Oy
296   QWidget* aYWidget = new QWidget(aTabWidget);
297   QGridLayout* aYLayout = new QGridLayout( aYWidget );
298   aYLayout->setSpacing( SPACING_SIZE );
299   aYLayout->setMargin( MARGIN_SIZE );
300
301   // axis title
302   myTitleYCheck = new QCheckBox( tr( "PLOT2D_ENABLE_VER_TITLE" ), aYWidget );
303   myTitleYEdit  = new QLineEdit( aYWidget );
304   myTitleYEdit->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
305   myTitleYEdit->setMinimumWidth( MIN_EDIT_WIDTH );
306   aYLayout->addWidget( myTitleYCheck,1,    0    );
307   aYLayout->addWidget( myTitleYEdit, 1, 1, 1, 3 );
308
309   // grid
310   QGroupBox* aGridGrpY = new QGroupBox( tr( "PLOT2D_GRID_TLT" ), aYWidget );
311   QGridLayout* aGridLayoutY = new QGridLayout( aGridGrpY );
312   aGridGrpY->setLayout( aGridLayoutY );
313   aGridLayoutY->setMargin( MARGIN_SIZE ); aGridLayoutY->setSpacing( SPACING_SIZE );
314
315   myYGridCheck      = new QCheckBox( tr( "PLOT2D_GRID_ENABLE_VER_MAJOR" ), aGridGrpY );
316
317   QLabel* aYMajLbl  = new QLabel( tr( "PLOT2D_MAX_INTERVALS" ), aGridGrpY);
318   myYGridSpin       = new QSpinBox( aGridGrpY );
319   myYGridSpin->setMinimum( 1 );
320   myYGridSpin->setMaximum( 100 );
321   myYGridSpin->setSingleStep( 1 );
322   myYGridSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
323   myYGridSpin->setMinimumWidth( MIN_SPIN_WIDTH );
324
325   myYMinGridCheck      = new QCheckBox( tr( "PLOT2D_GRID_ENABLE_VER_MINOR" ), aGridGrpY );
326
327   QLabel* aYMinLbl     = new QLabel( tr( "PLOT2D_MAX_INTERVALS" ), aGridGrpY);
328   myYMinGridSpin       = new QSpinBox( aGridGrpY );
329   myYMinGridSpin->setMinimum( 1 );
330   myYMinGridSpin->setMaximum( 100 );
331   myYMinGridSpin->setSingleStep( 1 );
332   myYMinGridSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
333   myYMinGridSpin->setMinimumWidth( MIN_SPIN_WIDTH );
334
335   aGridLayoutY->addWidget( myYGridCheck,    0, 0 );
336   aGridLayoutY->addWidget( aYMajLbl,       0, 1 );
337   aGridLayoutY->addWidget( myYGridSpin,     0, 2 );
338   aGridLayoutY->addWidget( myYMinGridCheck, 1, 0 );
339   aGridLayoutY->addWidget( aYMinLbl,        1, 1 );
340   aGridLayoutY->addWidget( myYMinGridSpin,  1, 2 );
341   aYLayout->addWidget( aGridGrpY, 3, 0, 1, 4 );
342
343   aTabWidget->addTab( aYWidget, tr( "INF_AXES_Y_LEFT" ) );
344
345   // if exist second axis Oy, addition new tab widget for right axis
346   if ( mySecondAxisY ) {
347     // widget for parameters on Oy
348     QWidget* aYWidget2 = new QWidget( aTabWidget );
349     QGridLayout* aYLayout2 = new QGridLayout( aYWidget2 );
350     aYLayout2->setSpacing( SPACING_SIZE );
351     aYLayout2->setMargin( MARGIN_SIZE );
352
353     // axis title
354     myTitleY2Check = new QCheckBox( tr( "PLOT2D_ENABLE_VER_TITLE" ), aYWidget2 );
355     myTitleY2Edit  = new QLineEdit( aYWidget2 );
356     myTitleY2Edit->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
357     myTitleY2Edit->setMinimumWidth( MIN_EDIT_WIDTH );
358     aYLayout2->addWidget( myTitleY2Check,1,    0    );
359     aYLayout2->addWidget( myTitleY2Edit, 1, 1, 1, 3 );
360
361     // grid
362     QGroupBox* aGridGrpY2 = new QGroupBox( tr( "PLOT2D_GRID_TLT" ), aYWidget2 );
363     QGridLayout* aGridLayoutY2 = new QGridLayout( aGridGrpY2 );
364     aGridGrpY2->setLayout( aGridLayoutY2 );
365     aGridLayoutY2->setMargin( MARGIN_SIZE ); aGridLayoutY2->setSpacing( SPACING_SIZE );
366
367     myY2GridCheck      = new QCheckBox( tr( "PLOT2D_GRID_ENABLE_VER_MAJOR" ), aGridGrpY2 );
368
369     QLabel* aY2MajLbl  = new QLabel( tr( "PLOT2D_MAX_INTERVALS" ), aGridGrpY2);
370     myY2GridSpin       = new QSpinBox( aGridGrpY2 );
371     myY2GridSpin->setMinimum( 1 );
372     myY2GridSpin->setMaximum( 100 );
373     myY2GridSpin->setSingleStep( 1 );
374     myY2GridSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
375     myY2GridSpin->setMinimumWidth( MIN_SPIN_WIDTH );
376
377     myY2MinGridCheck      = new QCheckBox( tr( "PLOT2D_GRID_ENABLE_VER_MINOR" ), aGridGrpY2 );
378
379     QLabel* aY2MinLbl     = new QLabel( tr( "PLOT2D_MAX_INTERVALS" ), aGridGrpY2);
380     myY2MinGridSpin       = new QSpinBox( aGridGrpY2 );
381     myY2MinGridSpin->setMinimum( 1 );
382     myY2MinGridSpin->setMaximum( 100 );
383     myY2MinGridSpin->setSingleStep( 1 );
384     myY2MinGridSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
385     myY2MinGridSpin->setMinimumWidth( MIN_SPIN_WIDTH );
386
387     aGridLayoutY2->addWidget( myY2GridCheck,    0, 0 );
388     aGridLayoutY2->addWidget( aY2MajLbl,        0, 1 );
389     aGridLayoutY2->addWidget( myY2GridSpin,     0, 2 );
390     aGridLayoutY2->addWidget( myY2MinGridCheck, 1, 0 );
391     aGridLayoutY2->addWidget( aY2MinLbl,        1, 1 );
392     aGridLayoutY2->addWidget( myY2MinGridSpin,  1, 2 );
393     aYLayout2->addWidget( aGridGrpY2, 3, 0, 1, 4 );
394
395     aTabWidget->addTab( aYWidget2, tr( "INF_AXES_Y_RIGHT" ) );
396   }
397   else {
398     myTitleY2Check   = 0;
399     myTitleY2Edit    = 0;
400     myY2GridCheck    = 0;
401     myY2GridSpin     = 0;
402     myY2MinGridCheck = 0;
403     myY2MinGridSpin  = 0;
404     myY2ModeCombo    = 0;
405   }
406
407   aTabWidget->setCurrentIndex( 0 );
408   /* "Set as default" check box */
409
410   myDefCheck = new QCheckBox( tr( "PLOT2D_SET_AS_DEFAULT_CHECK" ), this );
411
412   /* OK/Cancel buttons */
413   myOkBtn = new QPushButton( tr( "BUT_OK" ), this );
414   myOkBtn->setAutoDefault( true );
415   myOkBtn->setDefault( true );
416   myCancelBtn = new QPushButton( tr( "BUT_CANCEL" ), this );
417   myCancelBtn->setAutoDefault( true );
418   myHelpBtn = new QPushButton( tr( "BUT_HELP" ), this );
419   myHelpBtn->setAutoDefault( true );
420   QHBoxLayout* btnLayout = new QHBoxLayout;
421   btnLayout->addWidget( myOkBtn );
422   btnLayout->addStretch();
423   btnLayout->addWidget( myCancelBtn );
424   btnLayout->addWidget( myHelpBtn );
425
426   // layout widgets
427   topLayout->addWidget( myTitleCheck,      0, 0       );
428   topLayout->addWidget( myTitleEdit,       0, 1, 1, 3 );
429   topLayout->addWidget( aCurveLab,         1, 0       );
430   topLayout->addWidget( myCurveCombo,      1, 1       );
431   topLayout->addWidget( aMarkerLab,        2, 0       );
432   topLayout->addWidget( myMarkerSpin,      2, 1       );
433   topLayout->addLayout( ViewerColorLayout, 3, 0, 1, 4 );
434   topLayout->addWidget( aLegendGrp,        4, 0, 1, 4 );
435   topLayout->addWidget( aDeviationGrp,     5, 0, 1, 4 );
436   topLayout->addWidget( aNormalizeGrp,     6, 0, 1, 4 );
437   topLayout->addWidget( aScaleGrp,         7, 0, 1, 4 );
438   topLayout->addWidget( aTabWidget,        8, 0, 1, 4 );
439   topLayout->addWidget( myDefCheck,        9, 0, 1, 4 );
440   topLayout->setRowStretch( 10, 5 );
441   topLayout->addLayout( btnLayout,         11, 0, 1, 4 );
442
443   if ( !showDefCheck )
444     myDefCheck->hide();
445
446   connect( myTitleCheck,    SIGNAL( clicked() ), this, SLOT( onMainTitleChecked() ) );
447   connect( myTitleXCheck,   SIGNAL( clicked() ), this, SLOT( onXTitleChecked() ) );
448   connect( myTitleYCheck,   SIGNAL( clicked() ), this, SLOT( onYTitleChecked() ) );
449   connect( myLegendCheck,   SIGNAL( clicked() ), this, SLOT( onLegendChecked() ) );
450   connect( myXGridCheck,    SIGNAL( clicked() ), this, SLOT( onXGridMajorChecked() ) );
451   connect( myYGridCheck,    SIGNAL( clicked() ), this, SLOT( onYGridMajorChecked() ) );
452   connect( myXMinGridCheck, SIGNAL( clicked() ), this, SLOT( onXGridMinorChecked() ) );
453   connect( myYMinGridCheck, SIGNAL( clicked() ), this, SLOT( onYGridMinorChecked() ) );
454   connect( myNormLMaxCheck, SIGNAL( clicked() ), this, SLOT( onNormLMaxChecked() ) );
455   connect( myNormLMinCheck, SIGNAL( clicked() ), this, SLOT( onNormLMinChecked() ) );
456   connect( myNormRMaxCheck, SIGNAL( clicked() ), this, SLOT( onNormRMaxChecked() ) );
457   connect( myNormRMinCheck, SIGNAL( clicked() ), this, SLOT( onNormRMinChecked() ) );
458
459
460   connect( myOkBtn,         SIGNAL( clicked() ), this, SLOT( accept() ) );
461   connect( myCancelBtn,     SIGNAL( clicked() ), this, SLOT( reject() ) );
462   connect( myHelpBtn,       SIGNAL( clicked() ), this, SLOT( onHelp() ) );
463
464   if ( mySecondAxisY ) {
465     connect( myTitleY2Check,   SIGNAL( clicked() ), this, SLOT( onY2TitleChecked() ) );
466     connect( myY2GridCheck,    SIGNAL( clicked() ), this, SLOT( onY2GridMajorChecked() ) );
467     connect( myY2MinGridCheck, SIGNAL( clicked() ), this, SLOT( onY2GridMinorChecked() ) );
468   }
469
470   // init fields
471   setBackgroundColor( Qt::gray );
472   onMainTitleChecked();
473   onXTitleChecked();
474   onYTitleChecked();
475   onLegendChecked();
476   onXGridMajorChecked();
477   onYGridMajorChecked();
478   onXGridMinorChecked();
479   onNormLMaxChecked();
480   onNormLMinChecked();
481   onNormRMaxChecked();
482   onNormRMinChecked();
483   if ( mySecondAxisY ) {
484     onY2TitleChecked();
485     onY2GridMajorChecked();
486     onY2GridMinorChecked();
487   }
488 }
489
490 /*!
491   \brief Destructor.
492 */
493 Plot2d_SetupViewDlg::~Plot2d_SetupViewDlg()
494 {
495 }
496
497 /*!
498   \brief Set main title attributes.
499   \param enable if \c true main title is enabled
500   \param title main title
501   \sa isMainTitleEnabled(), getMainTitle()
502 */
503 void Plot2d_SetupViewDlg::setMainTitle( bool enable, const QString& title )
504 {
505   myTitleCheck->setChecked( enable );
506   if ( !title.isNull() )
507     myTitleEdit->setText( title );
508   onMainTitleChecked();
509 }
510
511 /*!
512   \brief Check if main title is enabled.
513   \return \c true if main title is enabled
514   \sa setMainTitle()
515 */
516 bool Plot2d_SetupViewDlg::isMainTitleEnabled()
517 {
518   return myTitleCheck->isChecked();
519 }
520
521 /*!
522   \brief Get main title.
523   \return main title
524   \sa setMainTitle()
525 */
526 QString Plot2d_SetupViewDlg::getMainTitle()
527 {
528   return myTitleEdit->text();
529 }
530
531 /*!
532   \brief Set horizontal axis title attributes.
533   \param enable if \c true horizontal axis title is enabled
534   \param title horizontal axis title
535   \sa isXTitleEnabled(), getXTitle()
536 */
537 void Plot2d_SetupViewDlg::setXTitle( bool enable, const QString& title )
538 {
539   myTitleXCheck->setChecked( enable );
540   if ( !title.isNull() )
541     myTitleXEdit->setText( title );
542   onXTitleChecked();
543 }
544
545 /*!
546   \brief Check if main title is enabled.
547   \return \c true if horizontal axis title is enabled
548   \sa setXTitle()
549 */
550 bool Plot2d_SetupViewDlg::isXTitleEnabled()
551 {
552   return myTitleXCheck->isChecked();
553 }
554
555 /*!
556   \brief Get horizontal axis title.
557   \return horizontal axis title
558   \sa setXTitle()
559 */
560 QString Plot2d_SetupViewDlg::getXTitle()
561 {
562   return myTitleXEdit->text();
563 }
564
565 /*!
566   \brief Set left vertical axis title attributes.
567   \param enable if \c true left vertical axis title is enabled
568   \param title left vertical axis title
569   \sa setY2Title(), isYTitleEnabled(), getYTitle()
570 */
571 void Plot2d_SetupViewDlg::setYTitle( bool enable, const QString& title )
572 {
573   myTitleYCheck->setChecked( enable );
574   if ( !title.isNull() )
575     myTitleYEdit->setText( title );
576   onYTitleChecked();
577 }
578
579 /*!
580   \brief Set right vertical axis title attributes.
581   \param enable if \c true right vertical axis title is enabled
582   \param title right vertical axis title
583   \sa setYTitle(), isY2TitleEnabled(), getY2Title()
584 */
585 void Plot2d_SetupViewDlg::setY2Title( bool enable, const QString& title )
586 {
587   myTitleY2Check->setChecked( enable );
588   if ( !title.isNull() )
589     myTitleY2Edit->setText( title );
590   onY2TitleChecked();
591 }
592
593 /*!
594   \brief Check if left vertical axis title is enabled.
595   \return \c true if right vertical axis title is enabled
596   \sa setYTitle()
597 */
598 bool Plot2d_SetupViewDlg::isYTitleEnabled()
599 {
600   return myTitleYCheck->isChecked();
601 }
602
603 /*!
604   \brief Check if right vertical axis title is enabled.
605   \return \c true if right vertical axis title is enabled
606   \sa setY2Title()
607 */
608 bool Plot2d_SetupViewDlg::isY2TitleEnabled()
609 {
610   return myTitleY2Check->isChecked();
611 }
612
613 /*!
614   \brief Get left vertical axis title.
615   \return left vertical axis title
616   \sa setYTitle()
617 */
618 QString Plot2d_SetupViewDlg::getYTitle()
619 {
620   return myTitleYEdit->text();
621 }
622
623 /*!
624   \brief Get right vertical axis title.
625   \return right vertical axis title
626   \sa setY2Title()
627 */
628 QString Plot2d_SetupViewDlg::getY2Title()
629 {
630   return myTitleY2Edit->text();
631 }
632
633 /*!
634   \brief Set curve type.
635   \param type curve type: 0 (points), 1 (lines) or 2 (splines)
636   \sa getCurveType()
637 */
638 void Plot2d_SetupViewDlg::setCurveType( const int type )
639 {
640   myCurveCombo->setCurrentIndex( type );
641 }
642
643 /*!
644   \brief Get curve type.
645   \return curve type: 0 (points), 1 (lines) or 2 (splines)
646   \sa setCurveType()
647 */
648 int Plot2d_SetupViewDlg::getCurveType()
649 {
650   return myCurveCombo->currentIndex();
651 }
652
653 /*!
654   \brief Set normalization to maximum by left Y axis.
655   \param type normalizatoin type: true,false
656   \sa getMaxNormMode()
657 */
658 void Plot2d_SetupViewDlg::setLMaxNormMode( const bool type )
659 {
660   myNormLMaxCheck->setChecked( type );
661 }
662
663 /*!
664   \brief Check if normalization to maximum by left Y axis sets.
665   \return curve normalizatoin type: true,false
666   \sa setMaxNormMode()
667 */
668 bool Plot2d_SetupViewDlg::getLMaxNormMode()
669 {
670   return myNormLMaxCheck->isChecked();
671 }
672
673 /*!
674   \brief Set normalization to minimum by left Y axis.
675   \param type normalizatoin type: true,false
676   \sa getMinNormMode()
677 */
678 void Plot2d_SetupViewDlg::setLMinNormMode( const bool type )
679 {
680   myNormLMinCheck->setChecked( type );
681 }
682
683 /*!
684   \brief Check if normalization to minimum by left Y axis sets.
685   \return curve normalizatoin type: true,false
686   \sa setMinNormMode()
687 */
688 bool Plot2d_SetupViewDlg::getLMinNormMode()
689 {
690   return myNormLMinCheck->isChecked();
691 }
692
693 /*!
694   \brief Set normalization to maximum by right Y axis.
695   \param type normalizatoin type: true,false
696   \sa getMaxNormMode()
697 */
698 void Plot2d_SetupViewDlg::setRMaxNormMode( const bool type )
699 {
700   myNormRMaxCheck->setChecked( type );
701 }
702
703 /*!
704   \brief Check if normalization to maximum by right Y axis sets.
705   \return curve normalizatoin type: true,false
706   \sa setMaxNormMode()
707 */
708 bool Plot2d_SetupViewDlg::getRMaxNormMode()
709 {
710   return myNormRMaxCheck->isChecked();
711 }
712
713 /*!
714   \brief Set normalization to minimum by right Y axis.
715   \param type normalizatoin type: true,false
716   \sa getMinNormMode()
717 */
718 void Plot2d_SetupViewDlg::setRMinNormMode( const bool type )
719 {
720   myNormRMinCheck->setChecked( type );
721 }
722
723 /*!
724   \brief Check if normalization to minimum by right Y axis sets.
725   \return curve normalizatoin type: true,false
726   \sa setMinNormMode()
727 */
728 bool Plot2d_SetupViewDlg::getRMinNormMode()
729 {
730   return myNormRMinCheck->isChecked();
731 }
732
733 /*!
734   \brief Set legend attribute.
735   \param if \c true legend is shown
736   \param pos legend position: 0 (left), 1 (right), 2 (top), 3 (bottom)
737   \param fnt legend font
738   \param col legend font color
739   \sa isLegendEnabled(), getLegendPos(), getLegendFont()
740 */
741 void Plot2d_SetupViewDlg::setLegend( bool enable, int pos, int symbolType,
742                                      const QFont& fnt, const QColor& fontColor, const QColor& selFontColor )
743 {
744   myLegendCheck->setChecked( enable );
745   myLegendCombo->setCurrentIndex( pos );
746   myLegendSymbolType->setCurrentIndex( symbolType );
747   myLegendFont->setCurrentFont( fnt );
748   myLegendFontColor->setColor( fontColor );
749   mySelectedLegendFontColor->setColor( selFontColor );
750   onLegendChecked();
751 }
752
753 /*!
754   \brief Check if legend is enabled.
755   \return \c true if legend is enabled
756   \sa setLegend()
757 */
758 bool Plot2d_SetupViewDlg::isLegendEnabled()
759 {
760   return myLegendCheck->isChecked();
761 }
762
763 /*!
764   \brief Get legend position.
765   \return legend position: 0 (left), 1 (right), 2 (top), 3 (bottom)
766   \sa setLegend()
767 */
768 int Plot2d_SetupViewDlg::getLegendPos()
769 {
770   return myLegendCombo->currentIndex();
771 }
772
773 /*!
774   \brief Get legend symbol type.
775   \return legend symbol type: 0 (marker on line), 1 (marker above line)
776   \sa setLegend()
777 */
778 int Plot2d_SetupViewDlg::getLegendSymbolType()
779 {
780   return myLegendSymbolType->currentIndex();
781 }
782
783 /*!
784   \brief Get legend font.
785   \return legend font
786   \sa setLegend()
787 */
788 QFont Plot2d_SetupViewDlg::getLegendFont()
789 {
790   return myLegendFont->currentFont();
791 }
792
793 /*!
794   \brief Get legend font color.
795   \return legend font color
796   \sa setLegend()
797 */
798 QColor Plot2d_SetupViewDlg::getLegendColor()
799 {
800   return myLegendFontColor->color();
801 }
802
803 /*!
804   \brief Get selected legend font color.
805   \return selected legend font color
806   \sa setLegend()
807 */
808 QColor Plot2d_SetupViewDlg::getSelectedLegendColor()
809 {
810   return mySelectedLegendFontColor->color();
811 }
812
813 /*!
814   \brief Set marker size.
815   \param size marker size
816   \sa getMarkerSize()
817 */
818 void Plot2d_SetupViewDlg::setMarkerSize( const int size )
819 {
820   myMarkerSpin->setValue( size );
821 }
822
823 /*!
824   \brief Get marker size.
825   \return marker size
826   \sa setMarkerSize()
827 */
828 int Plot2d_SetupViewDlg::getMarkerSize()
829 {
830   return myMarkerSpin->value();
831 }
832 /*!
833   \brief Set deviation marker line width.
834   \param width marker line width
835   \sa getDeviationMarkerLw()
836 */
837 void Plot2d_SetupViewDlg::setDeviationMarkerLw( const int width ){
838   myDeviationLw->setValue(width);
839 }
840
841 /*!
842   \brief Get deviation marker line width.
843   \return marker line width
844   \sa setMarkerSize()
845 */
846 int Plot2d_SetupViewDlg::getDeviationMarkerLw() const {
847   return myDeviationLw->value();
848 }
849
850 /*!
851   \brief Set deviation marker tick size.
852   \param size marker tick size
853   \sa getDeviationMarkerTs()
854 */
855 void Plot2d_SetupViewDlg::setDeviationMarkerTs( const int size) {
856   myDeviationTs->setValue(size);
857 }
858
859 /*!
860   \brief Get deviation marker tick size.
861   \return marker tick size
862   \sa setDeviationMarkerTs()
863 */
864 int Plot2d_SetupViewDlg::getDeviationMarkerTs() const {
865   return myDeviationTs->value();
866 }
867
868 /*!
869   \brief Set color of the deviation marker.
870   \param color marker color
871   \sa getDeviationMarkerCl()
872 */
873 void Plot2d_SetupViewDlg::setDeviationMarkerCl( const QColor& col) {
874   myDeviationCl->setColor( col );
875 }
876
877 /*!
878   \brief Get color of the deviation marker.
879   \return marker color
880   \sa setDeviationMarkerCl()
881 */
882 QColor Plot2d_SetupViewDlg::getDeviationMarkerCl() const {
883  return myDeviationCl->color();
884 }
885
886 /*!
887   \brief Set background color.
888   \param color background color
889   \sa getBackgroundColor()
890 */
891 void Plot2d_SetupViewDlg::setBackgroundColor( const QColor& color )
892 {
893   myBackgroundBtn->setColor( color );
894 }
895
896 /*!
897   \brief Get background color.
898   \return background color
899   \sa setBackgroundColor()
900 */
901 QColor Plot2d_SetupViewDlg::getBackgroundColor()
902 {
903   return myBackgroundBtn->color();
904 }
905
906 /*!
907   \brief Set selection color.
908   \param color selection color
909   \sa getSelectionColor()
910 */
911 void Plot2d_SetupViewDlg::setSelectionColor( const QColor& color )
912 {
913   mySelectionBtn->setColor( color );
914 }
915
916 /*!
917   \brief Get selection color.
918   \return selection color
919   \sa setSelectionColor()
920 */
921 QColor Plot2d_SetupViewDlg::getSelectionColor()
922 {
923   return mySelectionBtn->color();
924 }
925
926 /*!
927   \brief Set major grid parameters.
928   \param enableX if \c true, horizontal major grid is enabled
929   \param divX maximum number of ticks for horizontal major grid
930   \param enableY if \c true, left vertical major grid is enabled
931   \param divY maximum number of ticks for left vertical major grid
932   \param enableY2 if \c true, right vertical major grid is enabled
933   \param divY2 maximum number of ticks for right vertical major grid
934   \sa getMajorGrid()
935 */
936 void Plot2d_SetupViewDlg::setMajorGrid( bool enableX, const int divX,
937                                         bool enableY, const int divY,
938                                         bool enableY2, const int divY2 )
939 {
940   myXGridCheck->setChecked( enableX );
941   myXGridSpin->setValue( divX );
942   myYGridCheck->setChecked( enableY );
943   myYGridSpin->setValue( divY );
944   onXGridMajorChecked();
945   onYGridMajorChecked();
946   if (mySecondAxisY) {
947     myY2GridCheck->setChecked( enableY2 );
948     myY2GridSpin->setValue( divY2 );
949     onY2GridMajorChecked();
950   }
951 }
952
953 /*!
954   \brief Get major grid parameters.
955   \param enableX \c true if horizontal major grid is enabled
956   \param divX maximum number of ticks for horizontal major grid
957   \param enableY \c true if left vertical major grid is enabled
958   \param divY maximum number of ticks for left vertical major grid
959   \param enableY2 \c true if right vertical major grid is enabled
960   \param divY2 maximum number of ticks for right vertical major grid
961   \sa setMajorGrid()
962 */
963 void Plot2d_SetupViewDlg::getMajorGrid( bool& enableX, int& divX,
964                                         bool& enableY, int& divY,
965                                         bool& enableY2, int& divY2 )
966 {
967   enableX  = myXGridCheck->isChecked();
968   divX     = myXGridSpin->value();
969   enableY  = myYGridCheck->isChecked();
970   divY     = myYGridSpin->value();
971   if (mySecondAxisY) {
972     enableY2 = myY2GridCheck->isChecked();
973     divY2    = myY2GridSpin->value();
974   }
975   else {
976     enableY2 = false;
977     divY2    = 1;
978   }
979 }
980
981 /*!
982   \brief Set minor grid parameters.
983   \param enableX if \c true, horizontal minor grid is enabled
984   \param divX maximum number of ticks for horizontal minor grid
985   \param enableY if \c true, left vertical minor grid is enabled
986   \param divY maximum number of ticks for left vertical minor grid
987   \param enableY2 if \c true, right vertical minor grid is enabled
988   \param divY2 maximum number of ticks for right vertical minor grid
989   \sa getMinorGrid()
990 */
991 void Plot2d_SetupViewDlg::setMinorGrid( bool enableX, const int divX,
992                                         bool enableY, const int divY,
993                                         bool enableY2, const int divY2 )
994 {
995   myXMinGridCheck->setChecked( enableX );
996   myXMinGridSpin->setValue( divX );
997   myYMinGridCheck->setChecked( enableY );
998   myYMinGridSpin->setValue( divY );
999   onXGridMinorChecked();
1000   onYGridMinorChecked();
1001   if (mySecondAxisY) {
1002     myY2MinGridCheck->setChecked( enableY2 );
1003     myY2MinGridSpin->setValue( divY2 );
1004     onY2GridMinorChecked();
1005   }
1006 }
1007
1008 /*!
1009   \brief Get minor grid parameters.
1010   \param enableX \c true if horizontal minor grid is enabled
1011   \param divX maximum number of ticks for horizontal minor grid
1012   \param enableY \c true if left vertical minor grid is enabled
1013   \param divY maximum number of ticks for left vertical minor grid
1014   \param enableY2 \c true if right vertical minor grid is enabled
1015   \param divY2 maximum number of ticks for right vertical minor grid
1016   \sa setMinorGrid()
1017 */
1018 void Plot2d_SetupViewDlg::getMinorGrid( bool& enableX, int& divX,
1019                                         bool& enableY, int& divY,
1020                                         bool& enableY2, int& divY2 )
1021 {
1022   enableX  = myXMinGridCheck->isChecked();
1023   divX     = myXMinGridSpin->value();
1024   enableY  = myYMinGridCheck->isChecked();
1025   divY     = myYMinGridSpin->value();
1026   if ( mySecondAxisY ) {
1027     enableY2 = myY2MinGridCheck->isChecked();
1028     divY2    = myY2MinGridSpin->value();
1029   }
1030   else {
1031     enableY2 = false;
1032     divY2    = 1;
1033   }
1034 }
1035
1036 /*!
1037   \brief Set scale mode for horizontal and vertical axes.
1038   \param xMode horizontal axis scale mode: 0 (linear), 1 (logarithmic)
1039   \param yMode vertical axis scale mode: 0 (linear), 1 (logarithmic)
1040   \sa getXScaleMode(), getYScaleMode()
1041 */
1042 void Plot2d_SetupViewDlg::setScaleMode( const int xMode, const int yMode )
1043 {
1044   myXModeCombo->setCurrentIndex( xMode );
1045   myYModeCombo->setCurrentIndex( yMode );
1046 }
1047
1048 /*!
1049   \brief Get scale mode for horizontal axis.
1050   \return horizontal axis scale mode: 0 (linear), 1 (logarithmic)
1051   \sa setScaleMode()
1052 */
1053 int Plot2d_SetupViewDlg::getXScaleMode()
1054 {
1055   return myXModeCombo->currentIndex();
1056 }
1057
1058 /*!
1059   \brief Get scale mode for vertical axis.
1060   \return vertical axis scale mode: 0 (linear), 1 (logarithmic)
1061   \sa setScaleMode()
1062 */
1063 int  Plot2d_SetupViewDlg::getYScaleMode()
1064 {
1065   return myYModeCombo->currentIndex();
1066 }
1067
1068 /*!
1069   \brief Called when user clicks "Show main title" check box.
1070 */
1071 void Plot2d_SetupViewDlg::onMainTitleChecked()
1072 {
1073   myTitleEdit->setEnabled( myTitleCheck->isChecked() );
1074 }
1075
1076 /*!
1077   \brief Called when user clicks "Show horizontal axis title" check box.
1078 */
1079 void Plot2d_SetupViewDlg::onXTitleChecked()
1080 {
1081   myTitleXEdit->setEnabled( myTitleXCheck->isChecked() );
1082 }
1083
1084 /*!
1085   \brief Called when user clicks "Show vertical left axis title" check box.
1086 */
1087 void Plot2d_SetupViewDlg::onYTitleChecked()
1088 {
1089   myTitleYEdit->setEnabled( myTitleYCheck->isChecked() );
1090 }
1091
1092 /*!
1093   \brief Called when user clicks "Show vertical right axis title" check box.
1094 */
1095 void Plot2d_SetupViewDlg::onY2TitleChecked()
1096 {
1097   myTitleY2Edit->setEnabled( myTitleY2Check->isChecked() );
1098 }
1099
1100 /*!
1101   \brief Called when user clicks "Show Legend" check box.
1102 */
1103 void Plot2d_SetupViewDlg::onLegendChecked()
1104 {
1105   myLegendCombo->setEnabled( myLegendCheck->isChecked() );
1106 }
1107
1108 /*!
1109   \brief Called when user clicks "Enable horizontal major grid" check box.
1110 */
1111 void Plot2d_SetupViewDlg::onXGridMajorChecked()
1112 {
1113   myXMinGridCheck->setEnabled( myXGridCheck->isChecked() );
1114 }
1115
1116 /*!
1117   \brief Called when user clicks "Enable left vertical major grid" check box.
1118 */
1119 void Plot2d_SetupViewDlg::onYGridMajorChecked()
1120 {
1121   myYMinGridCheck->setEnabled( myYGridCheck->isChecked() );
1122 }
1123
1124 /*!
1125   \brief Called when user clicks "Enable right vertical major grid" check box.
1126 */
1127 void Plot2d_SetupViewDlg::onY2GridMajorChecked()
1128 {
1129   myY2MinGridCheck->setEnabled( myY2GridCheck->isChecked() );
1130 }
1131
1132 /*!
1133   \brief Called when user clicks "Enable horizontal minor grid" check box.
1134 */
1135 void Plot2d_SetupViewDlg::onXGridMinorChecked()
1136 {
1137 }
1138
1139 /*!
1140   \brief Called when user clicks "Enable left vertical minor grid" check box.
1141 */
1142 void Plot2d_SetupViewDlg::onYGridMinorChecked()
1143 {
1144 }
1145
1146 /*!
1147   \brief Called when user clicks "Enable right vertical minor grid" check box.
1148 */
1149 void Plot2d_SetupViewDlg::onY2GridMinorChecked()
1150 {
1151 }
1152
1153 /*!
1154   \brief Called when user clicks "Left Y Axis: Normalize to maximum" check box.
1155 */
1156 void Plot2d_SetupViewDlg::onNormLMaxChecked()
1157 {
1158 }
1159
1160 /*!
1161   \brief Called when user clicks "Left Y Axis: Normalize to minimum" check box.
1162 */
1163 void Plot2d_SetupViewDlg::onNormLMinChecked()
1164 {
1165 }
1166
1167 /*!
1168   \brief Called when user clicks "Right Y Axis: Normalize to maximum" check box.
1169 */
1170 void Plot2d_SetupViewDlg::onNormRMaxChecked()
1171 {
1172 }
1173
1174 /*!
1175   \brief Called when user clicks "Right Y Axis: Normalize to minimum" check box.
1176 */
1177 void Plot2d_SetupViewDlg::onNormRMinChecked()
1178 {
1179 }
1180
1181 /*!
1182   \brief Get "Set settings as default" check box value.
1183   \return \c true if "Set settings as default" check box is on
1184 */
1185 bool Plot2d_SetupViewDlg::isSetAsDefault()
1186 {
1187   return myDefCheck->isChecked();
1188 }
1189
1190 /*!
1191   Slot, called when user clicks "Help" button
1192 */
1193 void Plot2d_SetupViewDlg::onHelp()
1194 {
1195 #ifndef NO_SUIT
1196   SUIT_Application* app = SUIT_Session::session()->activeApplication();
1197   if ( app )
1198     app->onHelpContextModule( "GUI", "plot2d_viewer.html", "settings" );
1199 #endif
1200 }