28 #include <Qt3Support/Q3Accel>
29 #include <QtGui/QVBoxLayout>
35 : QDialog ( parent ) ,
38 valid_btn =
new QPushButton(
"OK");
39 valid_btn->setMaximumSize(75,50);
40 connect(valid_btn, SIGNAL(clicked()),
43 main_tab =
new QTabWidget(
this);
46 main_tab -> addTab ( FAffichage ,
"&Display") ;
49 main_tab -> addTab ( FVue ,
"&Splitted View" ) ;
52 main_tab -> addTab ( FPonderation ,
"Weights of &deformations") ;
55 main_tab -> addTab ( FExtrusion ,
"&Extrusions/thickening" ) ;
59 main_tab -> addTab ( FInterpolation ,
"&Interpolations/Smoothing" ) ;
63 main_tab -> addTab ( FDivers ,
"&Misc" ) ;
66 Q3Accel * Raccourci =
new Q3Accel (
this ) ;
68 Raccourci -> insertItem ( QKeySequence ( Qt::Key_F2 ) , 2 ) ;
71 Raccourci -> insertItem ( QKeySequence ( Qt::Key_F3 ) , 3 ) ;
74 Raccourci -> insertItem ( QKeySequence ( Qt::Key_F4 ) , 4 ) ;
77 Raccourci -> insertItem ( QKeySequence ( Qt::Key_F5 ) , 5 ) ;
80 Raccourci -> insertItem ( QKeySequence ( Qt::Key_F6 ) , 6 ) ;
83 Raccourci -> insertItem ( QKeySequence ( Qt::Key_F7 ) , 7 ) ;
89 Raccourci -> insertItem ( QKeySequence (
"Alt+F9" ) , 8 ) ;
92 Raccourci -> insertItem ( QKeySequence ( Qt::Key_F9 ) , 9 ) ;
95 Raccourci -> insertItem ( QKeySequence ( Qt::Key_F10 ) , 10 ) ;
98 Raccourci -> insertItem ( QKeySequence ( Qt::Key_F11 ) , 11 ) ;
101 Raccourci -> insertItem ( QKeySequence ( Qt::Key_F12 ) , 12 ) ;
104 Raccourci->insertItem ( QKeySequence ( Qt :: Key_Space ) , 13 ) ;
105 Raccourci->connectItem(13, parent, SLOT (callbackHideAllWindow()));
107 Raccourci -> insertItem ( QKeySequence (
"Alt+F11" ) , 14 ) ;
110 connect(main_tab,SIGNAL(currentChanged(
int)),
this,SLOT(
updateTab(
int)));
112 QVBoxLayout* layout =
new QVBoxLayout();
113 layout->addWidget(main_tab);
114 layout->addWidget(valid_btn);
115 layout->setAlignment(valid_btn, Qt::AlignCenter);
118 setWindowTitle (
"Options" ) ;
129 FAffichage ->
update ( ) ;
136 if ( FVisible && main_tab->currentWidget ( ) == FAffichage ) {
142 FAffichage ->
update ( ) ;
143 main_tab->setCurrentWidget ( FAffichage ) ; break ;
146 if ( FVisible && main_tab->currentWidget ( ) == FVue ) {
153 main_tab->setCurrentWidget ( FVue ) ; break ;
156 if ( FVisible && main_tab->currentWidget ( ) == FPonderation ){
161 FPonderation ->
update ( ) ;
163 main_tab->setCurrentWidget ( FPonderation ) ; break ;
166 if ( FVisible && main_tab->currentWidget ( ) == FExtrusion ) {
171 FExtrusion ->
update ( ) ;
173 main_tab->setCurrentWidget ( FExtrusion ) ; break ;
176 if ( FVisible && main_tab->currentWidget ( ) == FInterpolation ) {
181 FInterpolation ->
update ( ) ;
183 main_tab->setCurrentWidget ( FInterpolation ) ; break ;
186 if ( FVisible && main_tab->currentWidget ( ) == FDivers ) {
193 main_tab->setCurrentWidget ( FDivers ) ; break ;
201 QWidget * current = main_tab->currentWidget();
203 if (current == FAffichage) FAffichage ->
update();
204 else if (current == FPonderation) FPonderation ->
update();
205 else if (current == FInterpolation) FInterpolation ->
update();
206 else if (current == FExtrusion) FExtrusion ->
update();
207 else if (current == FVue) FVue ->
update();
208 else if (current == FDivers) FDivers ->
update();
268 FAffichage -> setFMain ( ) ;
275 FAffichage -> setFMain ( ) ;
282 FAffichage -> setFMain ( ) ;
289 FAffichage -> setFMain ( ) ;
295 if ( FAffichage ->getFacesDisplay ( ) )
302 else { assert(
false); }
313 FAffichage -> setFMain ( ) ;
314 FAffichage -> callbackToggleGrid ( ) ;
315 FAffichage -> setFMain ( ) ;
316 FAffichage -> callbackToggleAxis ( ) ;
322 done(QDialog::Accepted);