Salome HOME
Merge from V5_1_4_BR 07/05/2010
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_Preferences_ScalarBarDlg.h
1 //  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  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 // SMESH SMESHGUI : GUI for SMESH component
24 // File   : SMESHGUI_Preferences_ScalarBarDlg.h
25 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
26 //
27 #ifndef SMESHGUI_PREFERENCES_SCALARBARDLG_H
28 #define SMESHGUI_PREFERENCES_SCALARBARDLG_H
29
30 // SMESH includes
31 #include "SMESH_SMESHGUI.hxx"
32
33 // Qt includes
34 #include <QDialog>
35
36 class QCheckBox;
37 class QComboBox;
38 class QGroupBox;
39 class QLineEdit;
40 class QPushButton;
41 class QToolButton;
42 class QRadioButton;
43
44 class SMESHGUI;
45 class SMESH_Actor;
46 class SMESHGUI_SpinBox;
47 class SalomeApp_IntSpinBox;
48 class QtxColorButton;
49 class LightApp_SelectionMgr;
50
51 class SMESHGUI_EXPORT SMESHGUI_Preferences_ScalarBarDlg : public QDialog
52
53   Q_OBJECT
54
55 private:
56   SMESHGUI_Preferences_ScalarBarDlg( SMESHGUI* );
57
58   static SMESHGUI_Preferences_ScalarBarDlg* myDlg;
59
60 public:
61   ~SMESHGUI_Preferences_ScalarBarDlg();
62
63   static void              ScalarBarProperties( SMESHGUI* );
64
65   void                     closeEvent( QCloseEvent* );
66   void                     setOriginAndSize( const double,
67                                              const double,
68                                              const double,
69                                              const double );
70   void                     initScalarBarFromResources();
71
72 protected slots:
73   void                     onOk();
74   bool                     onApply();
75   void                     onCancel();
76   void                     onHelp();
77   void                     onSelectionChanged();
78   void                     onXYChanged();
79   void                     onOrientationChanged();
80
81 private:
82   SMESHGUI*                mySMESHGUI;
83   LightApp_SelectionMgr*   mySelectionMgr;
84   SMESH_Actor*             myActor;
85   double                   myIniX, myIniY, myIniW, myIniH;
86   int                      myIniOrientation;
87   double                   DEF_VER_X, DEF_VER_Y, DEF_VER_H, DEF_VER_W;
88   double                   DEF_HOR_X, DEF_HOR_Y, DEF_HOR_H, DEF_HOR_W;
89
90   QGroupBox*               myRangeGrp;
91   QLineEdit*               myMinEdit;
92   QLineEdit*               myMaxEdit;
93
94   QGroupBox*               myFontGrp;
95   QtxColorButton*          myTitleColorBtn;
96   QComboBox*               myTitleFontCombo;
97   QCheckBox*               myTitleBoldCheck;
98   QCheckBox*               myTitleItalicCheck;
99   QCheckBox*               myTitleShadowCheck;
100   QtxColorButton*          myLabelsColorBtn;
101   QComboBox*               myLabelsFontCombo;
102   QCheckBox*               myLabelsBoldCheck;
103   QCheckBox*               myLabelsItalicCheck;
104   QCheckBox*               myLabelsShadowCheck;
105   
106   QGroupBox*               myLabColorGrp;
107   SalomeApp_IntSpinBox*    myColorsSpin;
108   SalomeApp_IntSpinBox*    myLabelsSpin;
109
110   QGroupBox*               myOrientationGrp;
111   QRadioButton*            myVertRadioBtn;
112   QRadioButton*            myHorizRadioBtn;
113
114   QGroupBox*               myOriginDimGrp;
115   SMESHGUI_SpinBox*        myXSpin;
116   SMESHGUI_SpinBox*        myYSpin;
117   SMESHGUI_SpinBox*        myWidthSpin;
118   SMESHGUI_SpinBox*        myHeightSpin;
119
120   QGroupBox*               myButtonGrp;
121   QPushButton*             myOkBtn;
122   QPushButton*             myApplyBtn;
123   QPushButton*             myCancelBtn;
124   QPushButton*             myHelpBtn;
125
126   QString                  myHelpFileName;
127 };
128
129 #endif // SMESHGUI_PREFERENCES_SCALARBARDLG_H