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