Salome HOME
Fixing of bug concerning the mesh info dialog after compute with quadratic elements
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_PropertiesDlg.h
1 // Copyright (C) 2007-2014  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, 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 //  File   : SMESHGUI_PropertiesDlg.h
23 //  Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
24
25 #ifndef SMESHGUI_PROPERTIESDLG_H
26 #define SMESHGUI_PROPERTIESDLG_H
27
28 #include "SMESH_SMESHGUI.hxx"
29 #include "SMESHGUI_Dialog.h"
30
31 #include <VTKViewer_MarkerDef.h>
32 #include <SALOMEconfig.h>
33 #include CORBA_CLIENT_HEADER(SMESH_Mesh)
34
35 class QCheckBox;
36 class QFrame;
37 class QGroupBox;
38 class QtxColorButton;
39 class QtxBiColorTool;
40 class QtxIntSpinBox;
41 class VTKViewer_MarkerWidget;
42
43 class SMESHGUI_EXPORT SMESHGUI_PropertiesDlg : public SMESHGUI_Dialog
44
45   Q_OBJECT
46     
47 public:
48   SMESHGUI_PropertiesDlg( const VTK::MarkerMap&, QWidget* parent );
49   ~SMESHGUI_PropertiesDlg();
50
51   void              setNodeColor( const QColor& );
52   QColor            nodeColor() const;
53   void              setNodeMarker( VTK::MarkerType, VTK::MarkerScale );
54   void              setNodeCustomMarker( int );
55   VTK::MarkerType   nodeMarkerType() const;
56   VTK::MarkerScale  nodeMarkerScale() const;
57   int               nodeMarkerId() const;
58
59   void              setEdgeColor( const QColor& );
60   QColor            edgeColor() const;
61   void              setEdgeWidth( int );
62   int               edgeWidth() const;
63
64   void              setFaceColor( const QColor&, int );
65   QColor            faceColor() const;
66   int               faceColorDelta() const;
67
68   void              setVolumeColor( const QColor&, int );
69   QColor            volumeColor() const;
70   int               volumeColorDelta() const;
71
72   void              setOutlineColor( const QColor& );
73   QColor            outlineColor() const;
74   void              setOutlineWidth( int );
75   int               outlineWidth() const;
76
77   void              setElem0dColor( const QColor& );
78   QColor            elem0dColor() const;
79   void              setElem0dSize( int );
80   int               elem0dSize() const;
81
82   void              setBallColor( const QColor& );
83   QColor            ballColor() const;
84   void              setBallSize( int );
85   int               ballSize() const;
86   void              setBallScale( int );
87   int               ballScale() const;
88
89   void              setOrientationColor( const QColor& );
90   QColor            orientationColor() const;
91   void              setOrientationSize( int );
92   int               orientationSize() const;
93   void              setOrientation3d( bool );
94   bool              orientation3d() const;
95
96   void              setShrinkCoef( int );
97   int               shrinkCoef() const;
98
99   VTK::MarkerMap    customMarkers() const;
100
101   void              showControls( int, bool );
102
103 private slots:
104   void              onHelp();
105
106 private:
107   // group boxes
108   QGroupBox*              myNodeGrp;
109   QGroupBox*              myEdgeGrp;
110   QGroupBox*              myFaceGrp;
111   QGroupBox*              myVolumeGrp;
112   QGroupBox*              myOutlineGrp;
113   QGroupBox*              myElem0dGrp;
114   QGroupBox*              myBallGrp;
115   QGroupBox*              myOrientationGrp;
116   QFrame*                 myExtraGrp;
117   // widgets
118   // - nodes
119   QtxColorButton*         myNodeColor;
120   VTKViewer_MarkerWidget* myNodeMarker;
121   // - edges
122   QtxColorButton*         myEdgeColor;
123   QtxIntSpinBox*          myEdgeWidth;
124   // - faces
125   QtxBiColorTool*         myFaceColor; 
126   // - volumes
127   QtxBiColorTool*         myVolumeColor; 
128   // - outlines
129   QtxColorButton*         myOutlineColor;
130   QtxIntSpinBox*          myOutlineWidth;
131   // - 0d elements
132   QtxColorButton*         myElem0dColor;
133   QtxIntSpinBox*          myElem0dSize;
134   // - balls
135   QtxColorButton*         myBallColor;
136   QtxIntSpinBox*          myBallSize;
137   QtxIntSpinBox*          myBallScale;
138   // - orientation vectors
139   QtxColorButton*         myOrientationColor;
140   QtxIntSpinBox*          myOrientationSize;
141   QCheckBox*              myOrientation3d;
142   // - shrink coefficient
143   QtxIntSpinBox*          myShrinkSize;
144 };
145
146 #endif // SMESHGUI_PROPERTIESDLG_H