Version: 8.3.0
SMESHGUI_PropertiesDlg.h
Go to the documentation of this file.
1 // Copyright (C) 2007-2016 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 QtxDoubleSpinBox;
42 class VTKViewer_MarkerWidget;
43 
45 {
46  Q_OBJECT
47 
48 public:
49  SMESHGUI_PropertiesDlg( const VTK::MarkerMap&, QWidget* parent );
51 
52  void setNodeColor( const QColor& );
53  QColor nodeColor() const;
54  void setNodeMarker( VTK::MarkerType, VTK::MarkerScale );
55  void setNodeCustomMarker( int );
56  VTK::MarkerType nodeMarkerType() const;
57  VTK::MarkerScale nodeMarkerScale() const;
58  int nodeMarkerId() const;
59 
60  void setEdgeColor( const QColor& );
61  QColor edgeColor() const;
62  void setEdgeWidth( int );
63  int edgeWidth() const;
64 
65  void setFaceColor( const QColor&, int );
66  QColor faceColor() const;
67  int faceColorDelta() const;
68 
69  void setVolumeColor( const QColor&, int );
70  QColor volumeColor() const;
71  int volumeColorDelta() const;
72 
73  void setOutlineColor( const QColor& );
74  QColor outlineColor() const;
75  void setOutlineWidth( int );
76  int outlineWidth() const;
77 
78  void setElem0dColor( const QColor& );
79  QColor elem0dColor() const;
80  void setElem0dSize( int );
81  int elem0dSize() const;
82 
83  void setBallColor( const QColor& );
84  QColor ballColor() const;
85  // void setBallSize( int );
86  // int ballSize() const;
87  void setBallScale( double );
88  double ballScale() const;
89 
90  void setOrientationColor( const QColor& );
91  QColor orientationColor() const;
92  void setOrientationSize( int );
93  int orientationSize() const;
94  void setOrientation3d( bool );
95  bool orientation3d() const;
96 
97  void setShrinkCoef( int );
98  int shrinkCoef() const;
99 
100  VTK::MarkerMap customMarkers() const;
101 
102  void showControls( int, bool );
103 
104 private slots:
105  void onHelp();
106 
107 private:
108  // group boxes
118  // widgets
119  // - nodes
120  QtxColorButton* myNodeColor;
121  VTKViewer_MarkerWidget* myNodeMarker;
122  // - edges
123  QtxColorButton* myEdgeColor;
124  QtxIntSpinBox* myEdgeWidth;
125  // - faces
126  QtxBiColorTool* myFaceColor;
127  // - volumes
128  QtxBiColorTool* myVolumeColor;
129  // - outlines
130  QtxColorButton* myOutlineColor;
131  QtxIntSpinBox* myOutlineWidth;
132  // - 0d elements
133  QtxColorButton* myElem0dColor;
134  QtxIntSpinBox* myElem0dSize;
135  // - balls
136  QtxColorButton* myBallColor;
137  // QtxIntSpinBox* myBallSize;
138  QtxDoubleSpinBox* myBallScale;
139  // - orientation vectors
140  QtxColorButton* myOrientationColor;
141  QtxIntSpinBox* myOrientationSize;
142  QCheckBox* myOrientation3d;
143  // - shrink coefficient
144  QtxIntSpinBox* myShrinkSize;
145 };
146 
147 #endif // SMESHGUI_PROPERTIESDLG_H