28 #include <QtGui/QHBoxLayout>
29 #include <QtGui/QLabel>
34 QTabWidget * parentTab )
36 QWidget ( parentTab ) ,
40 QBoxLayout * placement =
new QBoxLayout ( QBoxLayout :: TopToBottom,
this ) ;
43 " adjacent extruded") ,
this ) ;
47 new QGroupBox (
"Extrusion following normal vector / thickening" ) ;
48 QHBoxLayout * avt_hbl =
new QHBoxLayout ( FAffVecteur ) ;
51 FAffCoef =
new QLabel (
"Coefficient:" ) ;
54 avt_hbl -> addWidget (FAffCoef, 0, Qt::AlignLeft);
55 avt_hbl -> addWidget (FSaisieCoef, 1, Qt::AlignLeft);
58 FAffRevolutionChemin =
new QGroupBox(*
HTML::decode(
"Extrusion following "
59 "path / Extrusion by revolution"));
60 QVBoxLayout* arc_vbl =
new QVBoxLayout(FAffRevolutionChemin);
62 QWidget * WidgetOrientation =
new QWidget ( FAffRevolutionChemin ) ;
63 QHBoxLayout * Orientation =
new QHBoxLayout ( WidgetOrientation ) ;
65 FAffOrientation =
new QLabel (
"Initial Orientation :" ) ;
66 FChoixOrientation =
new QComboBox ;
67 FChoixOrientation -> addItem (
"No rotation" ) ;
68 FChoixOrientation -> addItem (
"Cells -> Path" ) ;
69 FChoixOrientation -> addItem (
"Path -> Cells" ) ;
71 Orientation -> addWidget ( FAffOrientation, 0, Qt::AlignLeft ) ;
72 Orientation -> addWidget ( FChoixOrientation, 1, Qt::AlignLeft ) ;
75 new QCheckBox(*
HTML::decode(
"Orientate extruded cells "));
78 FPonderer =
new QCheckBox(*
HTML::decode(
"Weight radius of the "
81 arc_vbl -> addWidget (WidgetOrientation);
82 arc_vbl -> addWidget (FOrienter);
83 arc_vbl -> addWidget (FRedimensionner);
84 arc_vbl -> addWidget (FPonderer);
88 FAffChemin =
new QGroupBox (
"Extrusion from path " );
89 QHBoxLayout * acm_hbl =
new QHBoxLayout ( FAffChemin ) ;
91 FAffPlacement =
new QLabel (
"Original Position:" ) ;
92 FChoixPlacement =
new QComboBox ;
93 FChoixPlacement -> addItem (
"No translation" ) ;
94 FChoixPlacement -> addItem (
"Cells -> Path" ) ;
95 FChoixPlacement -> addItem (
"Path -> Cells" ) ;
97 acm_hbl -> addWidget(FAffPlacement, 0, Qt::AlignLeft);
98 acm_hbl -> addWidget(FChoixPlacement, 1, Qt::AlignLeft);
102 new QGroupBox ( *
HTML::decode(
"Extrusion by revolution"));
103 QHBoxLayout * arv_hbl =
new QHBoxLayout ( FAffRevolution ) ;
105 QWidget * Widgetdiv =
new QWidget ;
106 QHBoxLayout * div =
new QHBoxLayout ( Widgetdiv ) ;
108 FNbSubdivisions =
new QLabel (
"Number of subdivisions:" , Widgetdiv ) ;
109 FSaisieNbSubdivisions =
new QSpinBox ( Widgetdiv ) ;
110 FSaisieNbSubdivisions -> setMinimum ( 3 );
111 FSaisieNbSubdivisions -> setMaximum ( 1000 );
112 FSaisieNbSubdivisions -> setAccelerated(
true);
114 div -> addWidget ( FNbSubdivisions, 0, Qt::AlignLeft ) ;
115 div -> addWidget ( FSaisieNbSubdivisions, 1, Qt::AlignLeft ) ;
117 QWidget * WidgetAngle =
new QWidget ( FAffRevolution ) ;
118 QHBoxLayout * Angle =
new QHBoxLayout ( WidgetAngle ) ;
120 FAffAngle =
new QLabel ( *
HTML::decode(
"Angle of revolution:") ) ;
121 FSaisieAngle =
new FloatSpinBox ( 5 , -360 , 360 , 2 , 5 ) ;
122 FSaisieAngle -> setWrapping (
true ) ;
124 Angle -> addWidget ( FAffAngle, 0, Qt::AlignLeft ) ;
125 Angle -> addWidget ( FSaisieAngle, 1, Qt::AlignLeft ) ;
128 arv_hbl -> addWidget(Widgetdiv);
129 arv_hbl -> addWidget(WidgetAngle);
132 placement -> addWidget ( FAffVecteur ) ;
133 placement -> addWidget ( FAffRevolutionChemin ) ;
134 placement -> addWidget ( FAffChemin ) ;
135 placement -> addWidget ( FAffRevolution ) ;
136 placement -> addWidget ( FCoudre ) ;
138 QObject :: connect ( FCoudre,
139 SIGNAL ( clicked ( ) ) ,
142 QObject :: connect ( FOrienter ,
143 SIGNAL ( clicked ( ) ) ,
146 QObject :: connect ( FRedimensionner ,
147 SIGNAL ( clicked ( ) ) ,
150 QObject :: connect ( FPonderer ,
151 SIGNAL ( clicked ( ) ) ,
154 QObject :: connect ( FSaisieCoef ,
155 SIGNAL ( valueChanged (
double ) ) ,
158 QObject :: connect ( FSaisieAngle ,
159 SIGNAL ( valueChanged (
double ) ) ,
163 QObject :: connect ( FSaisieNbSubdivisions ,
164 SIGNAL ( valueChanged (
int ) ) ,
168 QObject :: connect ( FChoixOrientation ,
169 SIGNAL ( activated (
int ) ) ,
172 QObject :: connect ( FChoixPlacement ,
173 SIGNAL ( activated (
int ) ) ,
191 CParameterOperations * p = FParent -> getControler ( ) -> getParameterOperations ( ) ;
193 FCoudre -> setChecked ( p -> getExtrusionAdjacentSews ( ) ) ;
194 FChoixPlacement -> setCurrentIndex ( p -> getExtrusionInitialPositionMode ( ) );
195 FChoixOrientation -> setCurrentIndex ( p -> getExtrusionInitialDirectionMode ( ) ) ;
196 FOrienter -> setChecked ( p -> getExtrusionDirection ( ) ) ;
197 FRedimensionner -> setChecked ( p -> getExtrusionScale ( ) ) ;
198 FPonderer -> setChecked ( p -> getExtrusionPonderateSection ( ) ) ;
199 FSaisieCoef -> setValuef ( p -> getExtrusionCoef ( ) ) ;
200 FSaisieNbSubdivisions -> setValue ( p -> getExtrusionRevolutionNbEdges ( ) ) ;
201 FSaisieAngle -> setValuef ( p -> getExtrusionRevolutionAngle ( ) ) ;
237 setScale ( FRedimensionner -> isChecked ( ) ) ;
268 FParent -> getControler ( ) -> getParameterOperations ( )
269 -> setExtrusionAdjacentSews ( b ) ;
275 FParent -> getControler ( ) -> getParameterOperations ( )
276 -> setExtrusionInitialPositionMode ( m ) ;
282 FParent -> getControler ( ) -> getParameterOperations ( )
283 -> setExtrusionInitialDirectionMode ( m ) ;
289 FParent -> getControler ( ) -> getParameterOperations ( )
290 -> setExtrusionDirection ( b ) ;
296 FParent -> getControler ( ) -> getParameterOperations ( )
297 -> setExtrusionScale ( b ) ;
303 FParent -> getControler ( ) -> getParameterOperations ( )
304 -> setExtrusionPonderateSection ( b ) ;
310 FParent -> getControler ( ) -> getParameterOperations ( )
319 FParent -> getControler ( ) -> getParameterOperations ( )
320 -> setExtrusionRevolutionNbEdges ( n ) ;
326 while ( alpha < -360 )
329 while ( alpha > +360 )
332 CParameterOperations * p = FParent -> getControler ( ) -> getParameterOperations ( ) ;
334 if ( alpha == p -> getExtrusionRevolutionAngle ( ) )
337 p -> setExtrusionRevolutionAngle ( alpha ) ;