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