Salome HOME
NRI : Merge from V1_2.
[modules/kernel.git] / src / Plot2d / Plot2d_SetupViewDlg.h
1 //  Copyright (C) 2003  CEA/DEN, EDF R&D
2 //
3 //
4 //
5 //  File   : Plot2d_SetupViewDlg.h
6 //  Author : Vadim SANDLER
7 //  Module : SALOME
8 //  $Header$
9
10 #ifndef Plot2d_SetupViewDlg_H
11 #define Plot2d_SetupViewDlg_H
12
13 #include <qdialog.h>
14
15 //=================================================================================
16 // class    : Plot2d_SetupViewDlg
17 // purpose  : Settings dialog for Plot2d view
18 //=================================================================================
19
20 class QCheckBox;
21 class QLineEdit;
22 class QComboBox;
23 class QSpinBox;
24 class QToolButton;
25 class QPushButton;
26
27 class Plot2d_SetupViewDlg : public QDialog
28
29   Q_OBJECT
30
31 public:
32   Plot2d_SetupViewDlg( QWidget* parent = 0, bool showDefCheck = false );
33   ~Plot2d_SetupViewDlg();
34
35   void    setMainTitle( bool enable, const QString& title = QString::null );
36   bool    isMainTitleEnabled();
37   QString getMainTitle();
38   void    setXTitle( bool enable, const QString& title = QString::null );
39   bool    isXTitleEnabled();
40   QString getXTitle();
41   void    setYTitle( bool enable, const QString& title = QString::null );
42   bool    isYTitleEnabled();
43   QString getYTitle();
44   void    setCurveType( const int type );
45   int     getCurveType();
46   void    setLegend( bool enable, int pos );
47   bool    isLegendEnabled();
48   int     getLegendPos();
49   void    setMarkerSize( const int size );
50   int     getMarkerSize();
51   void    setBackgroundColor( const QColor& color );
52   QColor  getBackgroundColor();
53   void    setMajorGrid( bool enableX, const int xdiv, bool enableY, const int divY );
54   void    getMajorGrid( bool& enableX, int& xdiv, bool& enableY, int& divY );
55   void    setMinorGrid( bool enableX, const int xdiv, bool enableY, const int divY );
56   void    getMinorGrid( bool& enableX, int& xdiv, bool& enableY, int& divY );
57   void    setScaleMode( const int xMode, const int yMode );
58   int     getXScaleMode();
59   int     getYScaleMode();
60   bool    isSetAsDefault();
61
62 protected slots:
63   void   onMainTitleChecked();
64   void   onXTitleChecked();
65   void   onYTitleChecked();
66   void   onBackgroundClicked();
67   void   onLegendChecked();
68   void   onXGridMajorChecked();
69   void   onYGridMajorChecked();
70   void   onXGridMinorChecked();
71   void   onYGridMinorChecked();
72
73 private:
74   QCheckBox*     myTitleCheck;
75   QLineEdit*     myTitleEdit;
76   QCheckBox*     myTitleXCheck;
77   QLineEdit*     myTitleXEdit;
78   QCheckBox*     myTitleYCheck;
79   QLineEdit*     myTitleYEdit;
80   QToolButton*   myBackgroundBtn;
81   QCheckBox*     myXGridCheck;
82   QSpinBox*      myXGridSpin;
83   QCheckBox*     myYGridCheck;
84   QSpinBox*      myYGridSpin;
85   QCheckBox*     myXMinGridCheck;
86   QSpinBox*      myXMinGridSpin;
87   QCheckBox*     myYMinGridCheck;
88   QSpinBox*      myYMinGridSpin;
89   QComboBox*     myCurveCombo;
90   QCheckBox*     myLegendCheck;
91   QComboBox*     myLegendCombo;
92   QSpinBox*      myMarkerSpin;
93   QComboBox*     myXModeCombo;
94   QComboBox*     myYModeCombo;
95   QCheckBox*     myDefCheck;
96
97   QPushButton*   myOkBtn;
98   QPushButton*   myCancelBtn;
99 };
100
101 #endif // Plot2d_SetupViewDlg_H
102