Salome HOME
f436c649cafb9010fafcfd2beaadde817eda7623
[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
45 class QtxDblSpinBox;
46
47 class SalomeApp_SelectionMgr;
48
49 class SMESH_Actor;
50
51 class SMESHGUI_Preferences_ScalarBarDlg : public QDialog
52
53   Q_OBJECT
54
55 public:
56   ~SMESHGUI_Preferences_ScalarBarDlg();
57   static void ScalarBarPreferences( QWidget* parent );
58   static void ScalarBarProperties ( QWidget* parent, SalomeApp_SelectionMgr* Sel );
59
60 protected:
61   SMESHGUI_Preferences_ScalarBarDlg( QWidget* parent = 0, SalomeApp_SelectionMgr* Sel = 0, bool modal = FALSE );
62   static SMESHGUI_Preferences_ScalarBarDlg* myDlg;
63   void closeEvent( QCloseEvent* e );
64   void setOriginAndSize( const double x, const double y, const double w, const double h );
65
66 protected slots:
67   void onOk();
68   bool onApply();
69   void onCancel();
70   void onTitleColor();
71   void onLabelsColor();
72   void onSelectionChanged();
73   void onXYChanged();
74   void onOrientationChanged();
75
76 private:
77   SalomeApp_SelectionMgr*  mySelectionMgr;
78   SMESH_Actor*             myActor;
79   double                   myIniX, myIniY, myIniW, myIniH;
80   int                      myIniOrientation;
81
82   QGroupBox*         myRangeGrp;
83   QLineEdit*         myMinEdit;
84   QLineEdit*         myMaxEdit;
85
86   QGroupBox*         myFontGrp;
87   QToolButton*       myTitleColorBtn;
88   QComboBox*         myTitleFontCombo;
89   QCheckBox*         myTitleBoldCheck;
90   QCheckBox*         myTitleItalicCheck;
91   QCheckBox*         myTitleShadowCheck;
92   QToolButton*       myLabelsColorBtn;
93   QComboBox*         myLabelsFontCombo;
94   QCheckBox*         myLabelsBoldCheck;
95   QCheckBox*         myLabelsItalicCheck;
96   QCheckBox*         myLabelsShadowCheck;
97   
98   QGroupBox*         myLabColorGrp;
99   QSpinBox*          myColorsSpin;
100   QSpinBox*          myLabelsSpin;
101
102   QButtonGroup*      myOrientationGrp;
103   QRadioButton*      myVertRadioBtn;
104   QRadioButton*      myHorizRadioBtn;
105
106   QGroupBox*         myOriginDimGrp;
107   QtxDblSpinBox*     myXSpin;
108   QtxDblSpinBox*     myYSpin;
109   QtxDblSpinBox*     myWidthSpin;
110   QtxDblSpinBox*     myHeightSpin;
111
112   QGroupBox*         myButtonGrp;
113   QPushButton*       myOkBtn;
114   QPushButton*       myApplyBtn;
115   QPushButton*       myCancelBtn;
116 };
117
118 #endif // SMESHGUI_PREFERENCES_SCALARBARDLG_H