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