Salome HOME
Update copyright information
[modules/visu.git] / src / VISUGUI / VisuGUI_PrimitiveBox.h
1 // Copyright (C) 2007-2012  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_PrimitiveBox.h
22 //  Author : Oleg UVAROV
23 //  Module : VISU
24 //
25 #ifndef VISUGUI_PRIMITIVEBOX_H
26 #define VISUGUI_PRIMITIVEBOX_H
27
28 #include <QGroupBox>
29
30 class QLabel;
31 class QLineEdit;
32 class QPushButton;
33 class QRadioButton;
34
35 class SalomeApp_DoubleSpinBox;
36 class SalomeApp_IntSpinBox;
37
38 class VisuGUI_PrimitiveBox : public QGroupBox
39 {
40   Q_OBJECT
41
42 public:
43   VisuGUI_PrimitiveBox( QWidget* );
44   ~VisuGUI_PrimitiveBox() {}
45
46 public:
47   int                      getPrimitiveType() const { return myPrimitiveType; }
48   void                     setPrimitiveType( int );
49
50   float                    getClamp() const;
51   void                     setClamp( float );
52   void                     setClampMaximum( float );
53
54   QString                  getMainTexture() const { return myMainTexture; }
55   void                     setMainTexture( const QString& );
56
57   QString                  getAlphaTexture() const { return myAlphaTexture; }
58   void                     setAlphaTexture( const QString& );
59
60   float                    getAlphaThreshold() const;
61   void                     setAlphaThreshold( float );
62
63   int                      getResolution() const;
64   void                     setResolution( int );
65
66   int                      getFaceNumber() const;
67   void                     setFaceNumber( int );
68
69   int                      getFaceLimit() const;
70   void                     setFaceLimit( int );
71
72 protected slots:
73   void                     onTogglePointSprite();
74   void                     onToggleOpenGLPoint();
75   void                     onToggleGeomSphere();
76
77   void                     onBrowseMainTexture();
78   void                     onBrowseAlphaTexture();
79
80   void                     onResolutionChanged( int );
81
82 private:
83   int                      myPrimitiveType;
84
85   QRadioButton*            myPointSpriteButton;
86   QRadioButton*            myOpenGLPointButton;
87   QRadioButton*            myGeomSphereButton;
88
89   QString                  myMainTexture;
90   QString                  myAlphaTexture;
91
92   QLabel*                  myClampLabel;
93   SalomeApp_DoubleSpinBox* myClampSpinBox;
94
95   QLabel*                  myMainTextureLabel;
96   QLineEdit*               myMainTextureLineEdit;
97   QPushButton*             myMainTextureButton;
98
99   QLabel*                  myAlphaTextureLabel;
100   QLineEdit*               myAlphaTextureLineEdit;
101   QPushButton*             myAlphaTextureButton;
102
103   QLabel*                  myAlphaThresholdLabel;
104   SalomeApp_DoubleSpinBox* myAlphaThresholdSpinBox;
105
106   QLabel*                  myResolutionLabel;
107   SalomeApp_IntSpinBox*    myResolutionSpinBox;
108
109   QLabel*                  myFaceNumberLabel;
110   QLineEdit*               myFaceNumberLineEdit;
111
112   QLabel*                  myFaceLimitLabel;
113   SalomeApp_IntSpinBox*    myFaceLimitSpinBox;
114 };
115
116
117
118 #endif