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