]> SALOME platform Git repositories - modules/visu.git/blob - src/VVTK/VVTK_SizeBox.h
Salome HOME
Merge from BR_V5_DEV 16Feb09
[modules/visu.git] / src / VVTK / VVTK_SizeBox.h
1 //  Copyright (C) 2007-2008  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 //  VISU VISUGUI : GUI of VISU component
23 //  File   : VVTK_SizeBox.h
24 //  Author : Oleg UVAROV
25 //  Module : VISU
26 //
27 #ifndef VVTK_SIZEBOX_H
28 #define VVTK_SIZEBOX_H
29
30 #include "VVTK.h"
31
32 #include <QWidget>
33
34 class QLabel;
35 class QLineEdit;
36 class QPushButton;
37 class QCheckBox;
38 class QGroupBox;
39
40 class QtxDoubleSpinBox;
41 class QtxIntSpinBox;
42 class QtxColorButton;
43
44 class VVTK_EXPORT VVTK_SizeBox : public QWidget
45 {
46   Q_OBJECT
47
48 public:
49   enum { Results = 0, Geometry, Inside, Outside };
50
51 public:
52   VVTK_SizeBox( QWidget* );
53   ~VVTK_SizeBox() {}
54
55 public:
56   int                      getType() const { return myType; }
57   void                     setType( int );
58
59   float                    getOutsideSize() const;
60   void                     setOutsideSize( float );
61
62   float                    getGeomSize() const;
63   void                     setGeomSize( float );
64
65   float                    getMinSize() const;
66   void                     setMinSize( float );
67
68   float                    getMaxSize() const;
69   void                     setMaxSize( float );
70
71   float                    getMagnification() const;
72   void                     setMagnification( float );
73
74   float                    getIncrement() const;
75   void                     setIncrement( float );
76
77   bool                     getUniform() const;
78   void                     setUniform( bool );
79
80   QColor                   getColor() const;
81   void                     setColor( const QColor& );
82
83   void                     enableSizeControls( bool enabled );
84
85 protected slots:
86   void                     onToggleResults();
87   void                     onToggleGeometry();
88   void                     onToggleInside();
89   void                     onToggleOutside();
90
91   //void                     onColorButtonPressed();
92
93 private:
94   int                      myType;
95
96   QLabel*                  myOutsideSizeLabel;
97   QtxIntSpinBox*           myOutsideSizeSpinBox;
98
99   QLabel*                  myGeomSizeLabel;
100   QtxIntSpinBox*           myGeomSizeSpinBox;
101
102   QLabel*                  myMinSizeLabel;
103   QtxIntSpinBox*           myMinSizeSpinBox;
104
105   QLabel*                  myMaxSizeLabel;
106   QtxIntSpinBox*           myMaxSizeSpinBox;
107
108   QLabel*                  myMagnificationLabel;
109   QtxIntSpinBox*           myMagnificationSpinBox;
110
111   QLabel*                  myIncrementLabel;
112   QtxDoubleSpinBox*        myIncrementSpinBox;
113
114   QCheckBox*               myUniformCheckBox;  
115
116   QGroupBox*               myColorGroup;
117   QLabel*                  myColorLabel;
118   QtxColorButton*          myColorButton;
119 };
120
121
122
123 #endif