Salome HOME
Update of CheckDone
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_Preferences_ScalarBarDlg.h
1 // Copyright (C) 2007-2024  CEA, EDF, 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, or (at your option) any later version.
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 class QButtonGroup;
44 class QLabel;
45
46 class SMESHGUI;
47 class SMESH_Actor;
48 class SMESHGUI_SpinBox;
49 class SalomeApp_IntSpinBox;
50 class QtxColorButton;
51 class LightApp_SelectionMgr;
52
53 class vtkLookupTable;
54
55 class SMESHGUI_EXPORT SMESHGUI_Preferences_ScalarBarDlg : public QDialog
56
57   Q_OBJECT
58
59 private:
60   SMESHGUI_Preferences_ScalarBarDlg( SMESHGUI* );
61
62   static SMESHGUI_Preferences_ScalarBarDlg* myDlg;
63
64 public:
65   ~SMESHGUI_Preferences_ScalarBarDlg();
66
67   static void              ScalarBarProperties( SMESHGUI* );
68
69   void                     setOriginAndSize( const double,
70                                              const double,
71                                              const double,
72                                              const double );
73   void                     initScalarBarFromResources();
74
75 protected:
76   void                     applyThreshold(double min, double max);
77   void                     applyWireframeOff();
78
79 protected slots:
80   virtual void             reject();
81
82 protected slots:
83   void                     onOk();
84   bool                     onApply();
85   void                     onHelp();
86   void                     onSelectionChanged();
87   void                     onXYChanged();
88   void                     onMinMaxChanged();
89   void                     onOrientationChanged();
90   void                     onDistributionChanged( int );
91   void                     onDistributionActivated( bool );
92
93 private:
94   SMESHGUI*                mySMESHGUI;
95   LightApp_SelectionMgr*   mySelectionMgr;
96   SMESH_Actor*             myActor;
97   double                   myIniX, myIniY, myIniW, myIniH;
98   int                      myIniOrientation;
99   double                   DEF_VER_X, DEF_VER_Y, DEF_VER_H, DEF_VER_W;
100   double                   DEF_HOR_X, DEF_HOR_Y, DEF_HOR_H, DEF_HOR_W;
101
102   QGroupBox*               myRangeGrp;
103   QLineEdit*               myMinEdit;
104   QLineEdit*               myMaxEdit;
105   QCheckBox*               myLogarithmicCheck;
106   QCheckBox*               myThresholdCheck;
107   QCheckBox*               myWireframeOffCheck;
108
109   QGroupBox*               myFontGrp;
110   QtxColorButton*          myTitleColorBtn;
111   QComboBox*               myTitleFontCombo;
112   QCheckBox*               myTitleBoldCheck;
113   QCheckBox*               myTitleItalicCheck;
114   QCheckBox*               myTitleShadowCheck;
115   QtxColorButton*          myLabelsColorBtn;
116   QComboBox*               myLabelsFontCombo;
117   QCheckBox*               myLabelsBoldCheck;
118   QCheckBox*               myLabelsItalicCheck;
119   QCheckBox*               myLabelsShadowCheck;
120   
121   QGroupBox*               myLabColorGrp;
122   SalomeApp_IntSpinBox*    myColorsSpin;
123   SalomeApp_IntSpinBox*    myLabelsSpin;
124
125   QGroupBox*               myOrientationGrp;
126   QRadioButton*            myVertRadioBtn;
127   QRadioButton*            myHorizRadioBtn;
128
129   QGroupBox*               myOriginDimGrp;
130   SMESHGUI_SpinBox*        myXSpin;
131   SMESHGUI_SpinBox*        myYSpin;
132   SMESHGUI_SpinBox*        myWidthSpin;
133   SMESHGUI_SpinBox*        myHeightSpin;
134
135   QGroupBox*               myDistributionGrp;
136   QRadioButton*            myDMonoColor;
137   QRadioButton*            myDMultiColor;
138   QtxColorButton*          myMonoColorBtn;
139   QLabel*                  myDistributionColorLbl;
140
141   QGroupBox*               myButtonGrp;
142   QButtonGroup*            myDistribColorGrp;
143   QPushButton*             myOkBtn;
144   QPushButton*             myApplyBtn;
145   QPushButton*             myCancelBtn;
146   QPushButton*             myHelpBtn;
147
148   QString                  myHelpFileName;
149 };
150
151 #endif // SMESHGUI_PREFERENCES_SCALARBARDLG_H