Salome HOME
Merge from V5_1_main 14/05/2010
[modules/visu.git] / src / VISUGUI / VisuGUI_SizeBox.h
1 //  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  This library is free software; you can redistribute it and/or
4 //  modify it under the terms of the GNU Lesser General Public
5 //  License as published by the Free Software Foundation; either
6 //  version 2.1 of the License.
7 //
8 //  This library is distributed in the hope that it will be useful,
9 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 //  Lesser General Public License for more details.
12 //
13 //  You should have received a copy of the GNU Lesser General Public
14 //  License along with this library; if not, write to the Free Software
15 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 //  VISU VISUGUI : GUI of VISU component
21 //  File   : VisuGUI_SizeBox.h
22 //  Author : Oleg UVAROV
23 //  Module : VISU
24 //
25 #ifndef VISUGUI_SIZEBOX_H
26 #define VISUGUI_SIZEBOX_H
27
28 #include <QWidget>
29
30 class QLabel;
31 class QLineEdit;
32 class QPushButton;
33 class QCheckBox;
34 class QGroupBox;
35
36 class SalomeApp_DoubleSpinBox;
37 class SalomeApp_IntSpinBox;
38 class QtxColorButton;
39
40 class VisuGUI_SizeBox : public QWidget
41 {
42   Q_OBJECT
43
44 public:
45   enum { Results = 0, Geometry, Inside, Outside };
46
47 public:
48   VisuGUI_SizeBox( QWidget* );
49   ~VisuGUI_SizeBox() {}
50
51 public:
52   int                      getType() const { return myType; }
53   void                     setType( int );
54
55   float                    getOutsideSize() const;
56   void                     setOutsideSize( float );
57
58   float                    getGeomSize() const;
59   void                     setGeomSize( float );
60
61   float                    getMinSize() const;
62   void                     setMinSize( float );
63
64   float                    getMaxSize() const;
65   void                     setMaxSize( float );
66
67   float                    getMagnification() const;
68   void                     setMagnification( float );
69
70   float                    getIncrement() const;
71   void                     setIncrement( float );
72
73   bool                     getUniform() const;
74   void                     setUniform( bool );
75
76   QColor                   getColor() const;
77   void                     setColor( const QColor& );
78
79   void                     enableSizeControls( bool enabled );
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   SalomeApp_IntSpinBox*    myOutsideSizeSpinBox;
94
95   QLabel*                  myGeomSizeLabel;
96   SalomeApp_IntSpinBox*    myGeomSizeSpinBox;
97
98   QLabel*                  myMinSizeLabel;
99   SalomeApp_IntSpinBox*    myMinSizeSpinBox;
100
101   QLabel*                  myMaxSizeLabel;
102   SalomeApp_IntSpinBox*    myMaxSizeSpinBox;
103
104   QLabel*                  myMagnificationLabel;
105   SalomeApp_IntSpinBox*    myMagnificationSpinBox;
106
107   QLabel*                  myIncrementLabel;
108   SalomeApp_DoubleSpinBox* myIncrementSpinBox;
109
110   QCheckBox*               myUniformCheckBox;  
111
112   QGroupBox*               myColorGroup;
113   QLabel*                  myColorLabel;
114   QtxColorButton*          myColorButton;
115 };
116
117
118
119 #endif