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