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