Moka Ihm Qt
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
options-vue.qt.hh
Go to the documentation of this file.
1 /*
2  * Moka : Un modeleur de 3-G-cartes.
3  * Copyright (C) 2004, Moka Team, Université de Poitiers, Laboratoire SIC
4  * http://www.sic.sp2mi.univ-poitiers.fr/
5  * Copyright (C) 2009, Guillaume Damiand, CNRS, LIRIS,
6  * guillaume.damiand@liris.cnrs.fr, http://liris.cnrs.fr/
7  *
8  * This file is part of Moka
9  *
10  * This program is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation, either version 3 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program. If not, see <http://www.gnu.org/licenses/>.
22  */
23 
24 #ifndef OPTIONSVUE_QT_HH
25 #define OPTIONSVUE_QT_HH
26 
27 
28 #include "controler-gmap.hh"
29 #include "IdWidgets.qt.hh"
30 
31 #include <QtGui/QSpinBox>
32 #include <QtGui/QCheckBox>
33 #include <QtGui/QComboBox>
34 #include <QtGui/QSlider>
35 #include <QtGui/QLabel>
36 #include <QtGui/QPushButton>
37 #include <QtGui/QGroupBox>
38 
39 class Window ;
40 
41 class OptionsFrame ;
42 
43 class OptionsVue : public QWidget
44 {
45  Q_OBJECT
46 
47 public :
48 
49  typedef enum { Compact, SemiBurst, Burst, AltBurst,
52 
54  OptionsVue ( Window * parent ,
55  OptionsFrame * parentTab ) ;
56 
58  ~OptionsVue ( ) ;
59 
61  void update ( ) ;
62 
63 
65  void setPresetting ( int /*enum Presetting*/ ) ;
66 
67  void setAlphaCoefs ( float , float , float , float ) ;
68  void setSewposCoefs ( float , float , float , float ) ;
69  void setSewsDisplay ( bool , bool , bool , bool ) ;
70 
71  void setInteractive ( bool ) ;
72  void setAlphaCoef ( int , float ) ;
73  void setSewposCoef ( int , float ) ;
74  void setSewDisplay ( int , bool ) ;
75  void setSewWidth ( int , int ) ;
76 
77 
79  bool getInteractive ( ) const ;
80  float getAlphaCoef ( int ) const ;
81  float getSewposCoef ( int ) const ;
82  bool getSewDisplay ( int ) const;
83  int getSewWidth ( int) const ;
84 
85 
86 protected :
87  void applyValues ( ) ;
88 
89 public slots :
90  void callbackBurstView ( int id );
91 
92  void callbackBurstAlpha0 ( ) ;
93  void callbackSewposAlpha0 ( ) ;
94  void callbackSew0Width ( ) ;
95 
96  void callbackBurstAlpha1 ( ) ;
97  void callbackSewposAlpha1 ( ) ;
98  void callbackSew1Width ( ) ;
99 
100  void callbackBurstAlpha2 ( ) ;
101  void callbackSewposAlpha2 ( ) ;
102  void callbackSew2Width ( ) ;
103 
104  void callbackBurstAlpha3 ( ) ;
105  void callbackSewposAlpha3 ( ) ;
106  void callbackSew3Width ( ) ;
107 
108  void callbackSew0 ( ) ;
109  void callbackSew1 ( ) ;
110  void callbackSew2 ( ) ;
111  void callbackSew3 ( ) ;
112 
117  void callbackToggleInteractive ( ) ;
118 
123  void callbackApply ( ) ;
124 
129  void callbackRecover ( ) ;
130 
131  void callbackPresetting0 ( ) ;
132  void callbackPresetting1 ( ) ;
133  void callbackPresetting2 ( ) ;
134  void callbackPresetting3 ( ) ;
135  void callbackPresetting4 ( ) ;
136  void callbackPresetting5 ( ) ;
137  void callbackPresetting6 ( ) ;
138  void callbackPresetting7 ( ) ;
139 
140 private :
141 
142  void setValueEclatement ( TCoordinate , int i ) ;
143  void setValuePosition ( float , int i ) ;
144 
145  OptionsFrame * FParentTab ;
146  Window * FParent ;
147  bool FUpdate ;
148 
149  QGroupBox * FInteractivite, * FTypeEclatement, * FPrereglages , * FParametres ;
150 
151  /* --- Interactivite --- */
152 
153  QPushButton * FIAppliquer , * FIRecuperer ;
154 
155  /* --- Prereglages --- */
156  QPushButton * FPCompacte , * FPSemiEclatee , * FPMoka , * FPTopofil ,
157  * FPSommets , * FPAretes , * FPFaces , * FPVolumes ;
158 
159  IdRadioButton * FBurstView [ 2 ] ;
160 
161  /* --- Parametres --- */
162  QCheckBox * FParCouture [4];
163  QLabel * FParAlpha [4];
164  QLabel * FParAffEclatement[4];
165  QLabel * FParAffPosition [4];
166  QLabel * FAffEclatement;
167  QLabel * FAffPosition;
168  QLabel * FAffEpaisseur;
169  QLabel * FRegTypeEcla;
170  QSlider * FParEclatement[4];
171  QSlider * FParPosition [4];
172  QSpinBox * FParEpaisseur [4];
173 };
174 
175 #endif