Salome HOME
Merge from V6_main (04/10/2012)
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_PropertiesDlg.h
1 // Copyright (C) 2007-2012  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 //  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
87   void              setOrientationColor( const QColor& );
88   QColor            orientationColor() const;
89   void              setOrientationSize( int );
90   int               orientationSize() const;
91   void              setOrientation3d( bool );
92   bool              orientation3d() const;
93
94   void              setShrinkCoef( int );
95   int               shrinkCoef() const;
96
97   VTK::MarkerMap    customMarkers() const;
98
99   void              showControls( int, bool );
100
101 private slots:
102   void              onHelp();
103
104 private:
105   // group boxes
106   QGroupBox*              myNodeGrp;
107   QGroupBox*              myEdgeGrp;
108   QGroupBox*              myFaceGrp;
109   QGroupBox*              myVolumeGrp;
110   QGroupBox*              myOutlineGrp;
111   QGroupBox*              myElem0dGrp;
112   QGroupBox*              myBallGrp;
113   QGroupBox*              myOrientationGrp;
114   QFrame*                 myExtraGrp;
115   // widgets
116   // - nodes
117   QtxColorButton*         myNodeColor;
118   VTKViewer_MarkerWidget* myNodeMarker;
119   // - edges
120   QtxColorButton*         myEdgeColor;
121   QtxIntSpinBox*          myEdgeWidth;
122   // - faces
123   QtxBiColorTool*         myFaceColor; 
124   // - volumes
125   QtxBiColorTool*         myVolumeColor; 
126   // - outlines
127   QtxColorButton*         myOutlineColor;
128   QtxIntSpinBox*          myOutlineWidth;
129   // - 0d elements
130   QtxColorButton*         myElem0dColor;
131   QtxIntSpinBox*          myElem0dSize;
132   // - balls
133   QtxColorButton*         myBallColor;
134   QtxIntSpinBox*          myBallSize;
135   // - orientation vectors
136   QtxColorButton*         myOrientationColor;
137   QtxIntSpinBox*          myOrientationSize;
138   QCheckBox*              myOrientation3d;
139   // - shrink coefficient
140   QtxIntSpinBox*          myShrinkSize;
141 };
142
143 #endif // SMESHGUI_PROPERTIESDLG_H