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