Salome HOME
*** empty log message ***
[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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
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 SalomeApp_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
67 protected slots:
68   void onOk();
69   bool onApply();
70   void onCancel();
71   void onTitleColor();
72   void onLabelsColor();
73   void onSelectionChanged();
74   void onXYChanged();
75   void onOrientationChanged();
76
77 private:
78   SMESHGUI*                mySMESHGUI;
79   SalomeApp_SelectionMgr*  mySelectionMgr;
80   SMESH_Actor*             myActor;
81   double                   myIniX, myIniY, myIniW, myIniH;
82   int                      myIniOrientation;
83
84   QGroupBox*         myRangeGrp;
85   QLineEdit*         myMinEdit;
86   QLineEdit*         myMaxEdit;
87
88   QGroupBox*         myFontGrp;
89   QToolButton*       myTitleColorBtn;
90   QComboBox*         myTitleFontCombo;
91   QCheckBox*         myTitleBoldCheck;
92   QCheckBox*         myTitleItalicCheck;
93   QCheckBox*         myTitleShadowCheck;
94   QToolButton*       myLabelsColorBtn;
95   QComboBox*         myLabelsFontCombo;
96   QCheckBox*         myLabelsBoldCheck;
97   QCheckBox*         myLabelsItalicCheck;
98   QCheckBox*         myLabelsShadowCheck;
99   
100   QGroupBox*         myLabColorGrp;
101   QSpinBox*          myColorsSpin;
102   QSpinBox*          myLabelsSpin;
103
104   QButtonGroup*      myOrientationGrp;
105   QRadioButton*      myVertRadioBtn;
106   QRadioButton*      myHorizRadioBtn;
107
108   QGroupBox*         myOriginDimGrp;
109   QtxDblSpinBox*     myXSpin;
110   QtxDblSpinBox*     myYSpin;
111   QtxDblSpinBox*     myWidthSpin;
112   QtxDblSpinBox*     myHeightSpin;
113
114   QGroupBox*         myButtonGrp;
115   QPushButton*       myOkBtn;
116   QPushButton*       myApplyBtn;
117   QPushButton*       myCancelBtn;
118 };
119
120 #endif // SMESHGUI_PREFERENCES_SCALARBARDLG_H