Salome HOME
Update mail address
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_Preferences_ScalarBarDlg.h
1 //  SMESH SMESHGUI : GUI for SMESH component
2 //
3 //  Copyright (C) 2003  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 //
24 //  File   : SMESHGUI_Preferences_ScalarBarDlg.h
25 //  Author : Nicolas REJNERI
26 //  Module : SMESH
27 //  $Header$
28
29 #ifndef SMESHGUI_PREFERENCES_SCALARBARDLG_H
30 #define SMESHGUI_PREFERENCES_SCALARBARDLG_H
31
32 #include <qdialog.h>
33
34 class QButtonGroup;
35 class QCheckBox;
36 class QComboBox;
37 class QGroupBox;
38 class QLabel;
39 class QLineEdit;
40 class QPushButton;
41 class QToolButton;
42 class QRadioButton;
43 class QSpinBox;
44 class SMESHGUI;
45
46 class QtxDblSpinBox;
47
48 class LightApp_SelectionMgr;
49
50 class SMESH_Actor;
51
52 class SMESHGUI_Preferences_ScalarBarDlg : public QDialog
53
54   Q_OBJECT
55
56 public:
57   ~SMESHGUI_Preferences_ScalarBarDlg();
58   static void ScalarBarPreferences( SMESHGUI* );
59   static void ScalarBarProperties ( SMESHGUI* );
60
61 protected:
62   SMESHGUI_Preferences_ScalarBarDlg( SMESHGUI*, bool, bool modal = FALSE );
63   static SMESHGUI_Preferences_ScalarBarDlg* myDlg;
64   void closeEvent( QCloseEvent* e );
65   void setOriginAndSize( const double x, const double y, const double w, const double h );
66   void initScalarBarFromResources();
67
68 protected slots:
69   void onOk();
70   bool onApply();
71   void onCancel();
72   void onTitleColor();
73   void onLabelsColor();
74   void onSelectionChanged();
75   void onXYChanged();
76   void onOrientationChanged();
77
78 private:
79   SMESHGUI*                mySMESHGUI;
80   LightApp_SelectionMgr*   mySelectionMgr;
81   SMESH_Actor*             myActor;
82   double                   myIniX, myIniY, myIniW, myIniH;
83   int                      myIniOrientation;
84   double DEF_VER_X,DEF_VER_Y,DEF_VER_H,DEF_VER_W;
85   double DEF_HOR_X,DEF_HOR_Y,DEF_HOR_H,DEF_HOR_W;
86
87   QGroupBox*         myRangeGrp;
88   QLineEdit*         myMinEdit;
89   QLineEdit*         myMaxEdit;
90
91   QGroupBox*         myFontGrp;
92   QToolButton*       myTitleColorBtn;
93   QComboBox*         myTitleFontCombo;
94   QCheckBox*         myTitleBoldCheck;
95   QCheckBox*         myTitleItalicCheck;
96   QCheckBox*         myTitleShadowCheck;
97   QToolButton*       myLabelsColorBtn;
98   QComboBox*         myLabelsFontCombo;
99   QCheckBox*         myLabelsBoldCheck;
100   QCheckBox*         myLabelsItalicCheck;
101   QCheckBox*         myLabelsShadowCheck;
102   
103   QGroupBox*         myLabColorGrp;
104   QSpinBox*          myColorsSpin;
105   QSpinBox*          myLabelsSpin;
106
107   QButtonGroup*      myOrientationGrp;
108   QRadioButton*      myVertRadioBtn;
109   QRadioButton*      myHorizRadioBtn;
110
111   QGroupBox*         myOriginDimGrp;
112   QtxDblSpinBox*     myXSpin;
113   QtxDblSpinBox*     myYSpin;
114   QtxDblSpinBox*     myWidthSpin;
115   QtxDblSpinBox*     myHeightSpin;
116
117   QGroupBox*         myButtonGrp;
118   QPushButton*       myOkBtn;
119   QPushButton*       myApplyBtn;
120   QPushButton*       myCancelBtn;
121 };
122
123 #endif // SMESHGUI_PREFERENCES_SCALARBARDLG_H