00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include "options-affichage.qt.hh"
00025 #include "window.qt.hh"
00026 #include "HtmlEntities.hh"
00027
00028 #include <QtGui/QGridLayout>
00029 #include <QtGui/QLabel>
00030 #include <QtGui/QVBoxLayout>
00031 #include <QtGui/QHBoxLayout>
00032
00033
00034
00035
00036 OptionsAffichage :: OptionsAffichage ( Window * parent ,
00037 QTabWidget * parentTab )
00038 :
00039 QWidget ( parentTab ) ,
00040 FParent ( parent ) ,
00041 FUpdate ( false ) ,
00042 FMain ( false )
00043 {
00044 QVBoxLayout * placement = new QVBoxLayout ( this ) ;
00045
00046
00047 FElements = new QGroupBox(*HTML::decode("Eléments"));
00048 QHBoxLayout * elmts_hbl = new QHBoxLayout ( FElements ) ;
00049
00050 QWidget * pElmts = new QWidget ();
00051 QVBoxLayout * pElmtsLayout = new QVBoxLayout ( pElmts ) ;
00052
00053 FENormale = new QCheckBox ( "Normale ( Meta-F9 )" ) ;
00054 pElmtsLayout -> addWidget( FENormale );
00055
00056 connect ( FENormale , SIGNAL ( clicked ( ) ) ,
00057 this , SLOT ( callbackToggleNormal ( ) ) ) ;
00058
00059 FECoutures = new QCheckBox ( "Coutures (F9)" ) ;
00060 pElmtsLayout -> addWidget( FECoutures );
00061
00062 connect ( FECoutures , SIGNAL ( clicked ( ) ) ,
00063 this , SLOT ( callbackToggleSews ( ) ) ) ;
00064
00065 FESommets = new QCheckBox ( "Sommets (F10)" ) ;
00066 pElmtsLayout -> addWidget( FESommets );
00067
00068 connect ( FESommets , SIGNAL ( clicked ( ) ) ,
00069 this , SLOT ( callbackToggleVertices ( ) ) ) ;
00070
00071 FEFacesPleines = new QCheckBox ( "Faces pleines (F11)" );
00072 pElmtsLayout -> addWidget( FEFacesPleines );
00073
00074 connect ( FEFacesPleines , SIGNAL ( clicked ( ) ) ,
00075 this , SLOT ( callbackToggleFaces ( ) ) ) ;
00076
00077
00078
00079
00080
00081 bgroup = new QGroupBox(*HTML::decode("Couleurs Aléatoires"));
00082 QHBoxLayout * grp_hbl = new QHBoxLayout ( bgroup ) ;
00083
00084 QWidget * pAffich = new QWidget ();
00085 QVBoxLayout * plcmtAffich = new QVBoxLayout ( pAffich ) ;
00086
00087 FECoulGlobale = new QRadioButton( "inactif" );
00088 FECouleursAleatoire = new QRadioButton( "des faces" );
00089 FECoulVolumesAleatoire = new QRadioButton( "des volumes" );
00090
00091 FECouleursAleatoire -> setChecked(true);
00092
00093 plcmtAffich -> addWidget( FECoulGlobale );
00094 plcmtAffich -> addWidget( FECouleursAleatoire );
00095 plcmtAffich -> addWidget( FECoulVolumesAleatoire );
00096
00097 connect ( FECoulGlobale, SIGNAL ( toggled ( bool ) ) ,
00098 this , SLOT ( callbackToggleFaces ( ) ) );
00099
00100 connect ( FECouleursAleatoire , SIGNAL ( toggled ( bool ) ) ,
00101 this , SLOT ( callbackFacesCoulAlea( ) ) );
00102
00103 connect ( FECoulVolumesAleatoire, SIGNAL ( toggled ( bool ) ) ,
00104 this , SLOT ( callbackVolumesCoulAlea( ) ) );
00105
00106 connect ( FECoulGlobale, SIGNAL ( toggled ( bool ) ) ,
00107 this , SLOT ( callbackCoulFacesGlobale( ) ) );
00108
00109
00110 bgroup2 =
00111 new QGroupBox( *HTML::decode("Calculées à partir de"));
00112 QVBoxLayout * grp2_hbl = new QVBoxLayout ( bgroup2 ) ;
00113
00114 FECoulTopologie = new QRadioButton( "la Topologie" );
00115 FECoulGeometry = new QRadioButton( *HTML::decode("la Géometrie") );
00116
00117 grp2_hbl -> addWidget( FECoulTopologie );
00118
00119 #ifdef MODULE_ARCHITECTURE
00120 FECoulSemantique = new QRadioButton( *HTML::decode("la Sémantique") );
00121 grp2_hbl -> addWidget( FECoulSemantique );
00122 connect (FECoulSemantique , SIGNAL ( clicked ( ) ) ,
00123 this , SLOT (callbackCoulSemantique( ) ) ) ;
00124 #endif
00125
00126 grp2_hbl -> addWidget( FECoulGeometry );
00127
00128 FECoulTopologie -> setChecked(true);
00129
00130 connect (FECoulTopologie , SIGNAL ( clicked ( ) ) ,
00131 this , SLOT (callbackCoulTopologie( ) ) ) ;
00132
00133 connect (FECoulGeometry , SIGNAL ( clicked ( ) ) ,
00134 this , SLOT (callbackCoulGeometry( ) ) ) ;
00135
00136 grp_hbl -> addWidget(pAffich);
00137 grp_hbl -> addWidget(bgroup2);
00138
00139
00140 elmts_hbl -> addWidget( pElmts, 0, Qt::AlignLeft );
00141 elmts_hbl -> addWidget( bgroup, 0, Qt::AlignLeft );
00142 elmts_hbl -> addSpacing( 40 );
00143
00144
00145 QWidget* widget = new QWidget ;
00146 QHBoxLayout* wid_hbl = new QHBoxLayout(widget);
00147
00148
00149 FGrille = new QGroupBox ( "Grille (F12)" ) ;
00150 FGrille -> setCheckable ( true );
00151
00152 QVBoxLayout* gri_vbl = new QVBoxLayout(FGrille);
00153
00154 QWidget * pTaille = new QWidget ;
00155 QHBoxLayout * plcmtTaille = new QHBoxLayout ( pTaille ) ;
00156 plcmtTaille -> setSpacing ( 0 );
00157
00158 FSaisieTaille = new QSpinBox;
00159 FSaisieTaille -> setMinimum ( 0 );
00160 FSaisieTaille -> setMaximum ( 1000 );
00161 FSaisieTaille -> setAccelerated(true);
00162
00163 plcmtTaille -> addWidget ( new QLabel ( "Taille : " ), 0, Qt::AlignLeft ) ;
00164 plcmtTaille -> addWidget ( FSaisieTaille, 1, Qt::AlignLeft ) ;
00165 gri_vbl -> addWidget( pTaille );
00166
00167 QWidget * pPlan = new QWidget ( FGrille ) ;
00168 QGridLayout * plcmtPlan = new QGridLayout ( pPlan );
00169
00170 FPlanXY = new QCheckBox ( "Plan XY" ) ;
00171 FValOx = new QCheckBox ( "Valeurs positives sur Ox" ) ;
00172
00173 FPlanXZ = new QCheckBox ( "Plan XZ" ) ;
00174 FValOy = new QCheckBox ( "Valeurs positives sur Oy" ) ;
00175
00176 FPlanYZ = new QCheckBox ( "Plan YZ" ) ;
00177 FValOz = new QCheckBox ( "Valeurs positives sur Oz" ) ;
00178
00179 plcmtPlan -> addWidget ( FPlanXY , 0 , 0 ) ;
00180 plcmtPlan -> addWidget ( FValOx , 0 , 1 ) ;
00181 plcmtPlan -> addWidget ( FPlanXZ , 1 , 0 ) ;
00182 plcmtPlan -> addWidget ( FValOy , 1 , 1 ) ;
00183 plcmtPlan -> addWidget ( FPlanYZ , 2 , 0 ) ;
00184 plcmtPlan -> addWidget ( FValOz , 2 , 1 ) ;
00185
00186 gri_vbl -> addWidget( pPlan );
00187
00188
00189 FPlacage = new QGroupBox ( "Placage" ) ;
00190 QVBoxLayout * plc_vbl = new QVBoxLayout(FPlacage);
00191
00192 FOrientation = new QCheckBox ( "Orientation " ) ;
00193 FTaille = new QCheckBox ( "Taille " ) ;
00194 FPosition = new QCheckBox ( "Position " ) ;
00195
00196 plc_vbl -> setSpacing ( 0 ) ;
00197 plc_vbl -> addWidget ( FOrientation ) ;
00198 plc_vbl -> addWidget ( FTaille ) ;
00199 plc_vbl -> addWidget ( FPosition ) ;
00200
00201
00202 FAffAxes = new QCheckBox ( "Afficher les axes (F12)" ) ;
00203
00204 wid_hbl -> addWidget ( FGrille ) ;
00205 wid_hbl -> addWidget ( FPlacage ) ;
00206
00207 placement -> addWidget ( FElements ) ;
00208 placement -> addWidget ( widget ) ;
00209 placement -> addWidget ( FAffAxes );
00210
00211
00212 connect ( FGrille , SIGNAL ( clicked ( ) ) ,
00213 this , SLOT ( callbackToggleGrid ( ) ) ) ;
00214
00215 connect ( FAffAxes , SIGNAL ( clicked ( ) ) ,
00216 this , SLOT ( callbackToggleAxis ( ) ) ) ;
00217
00218 connect ( FSaisieTaille , SIGNAL ( valueChanged (int ) ) ,
00219 this , SLOT ( callbackSize ( ) ) ) ;
00220
00221 connect ( FPlanXY , SIGNAL ( clicked ( ) ) ,
00222 this , SLOT ( callbackToggleXy ( ) ) ) ;
00223
00224 connect ( FPlanXZ , SIGNAL ( clicked ( ) ) ,
00225 this , SLOT ( callbackToggleXz ( ) ) ) ;
00226
00227 connect ( FPlanYZ , SIGNAL ( clicked ( ) ) ,
00228 this , SLOT ( callbackToggleYz ( ) ) ) ;
00229
00230 connect ( FValOx , SIGNAL ( clicked ( ) ) ,
00231 this , SLOT ( callbackTogglePx ( ) ) ) ;
00232
00233 connect ( FValOy , SIGNAL ( clicked ( ) ) ,
00234 this , SLOT ( callbackTogglePy ( ) ) ) ;
00235
00236 connect ( FValOz , SIGNAL ( clicked ( ) ) ,
00237 this , SLOT ( callbackTogglePz ( ) ) ) ;
00238
00239 connect ( FOrientation , SIGNAL ( clicked ( ) ) ,
00240 this , SLOT ( callbackToggleOrientation ( ) ) ) ;
00241
00242 connect ( FTaille , SIGNAL ( clicked ( ) ) ,
00243 this , SLOT ( callbackToggleScale ( ) ) ) ;
00244
00245 connect ( FPosition , SIGNAL ( clicked ( ) ) ,
00246 this , SLOT ( callbackTogglePosition ( ) ) ) ;
00247 }
00248
00249
00250
00251 OptionsAffichage :: ~OptionsAffichage ( )
00252 {}
00253
00254
00255 #ifdef MODULE_ARCHITECTURE
00256 void OptionsAffichage :: hideSemantiqueColoration ( )
00257 {
00258 if (FParent -> getParameterArchi() -> isModeArchi())
00259 {
00260 FECoulSemantique -> setVisible(true);
00261 FECoulSemantique -> setChecked ( FParent -> getCoulSemantique() );
00262
00263 }
00264 else
00265 {
00266 if (FECoulSemantique -> isChecked())
00267 {
00268 callbackCoulTopologie();
00269 update();
00270 FParent -> repaint ( ) ;
00271 }
00272 FECoulSemantique -> setVisible(false);
00273 }
00274 }
00275 #endif // MODULE_ARCHITECTURE
00276
00277
00278
00279 void OptionsAffichage :: update ( )
00280 {
00281 FUpdate = true ;
00282
00283 FESommets -> setChecked ( FParent -> getVerticesDisplay ( ) ) ;
00284 FECoutures -> setChecked ( FParent -> getSewsDisplay ( ) ) ;
00285 FENormale -> setChecked ( FParent -> getNormalDisplay ( ) ) ;
00286 FEFacesPleines -> setChecked ( FParent -> getFacesDisplay ( ) ) ;
00287
00288 bgroup -> setEnabled ( FParent -> getFacesDisplay () );
00289 FECoulGlobale -> setChecked ( FParent -> getCoulFacesGlobale() );
00290 FECouleursAleatoire -> setChecked ( FParent -> getFacesCoulAlea() );
00291 FECoulVolumesAleatoire -> setChecked ( FParent -> getVolumesCoulAlea() );
00292
00293 bgroup2 -> setEnabled ( FParent -> getFacesDisplay () &&
00294 !FParent -> getCoulFacesGlobale() );
00295
00296 FECoulTopologie -> setChecked (
00297 #ifdef MODULE_ARCHITECTURE
00298 (!(FParent -> getCoulSemantique()))&&
00299 #endif
00300 (FParent -> getCoulTopologie()) );
00301
00302 FECoulGeometry -> setChecked (
00303 #ifdef MODULE_ARCHITECTURE
00304 (!(FParent -> getCoulSemantique()))&&
00305 #endif
00306 (FParent -> getCoulGeometry()) );
00307
00308 #ifdef MODULE_ARCHITECTURE
00309 FECoulSemantique -> setChecked ( FParent -> getCoulSemantique() );
00310 #endif
00311
00312 FGrille -> setChecked ( FParent -> getGridDisplay ( ) ) ;
00313
00314 FSaisieTaille -> setEnabled ( FParent -> getGridDisplay ( ) ) ;
00315
00316 FAffAxes -> setChecked ( FParent -> getAxisDisplay ( ) ) ;
00317
00318 FSaisieTaille -> setValue( FParent -> getParameterGrid ( ) -> getLGGrid ( ) ) ;
00319
00320 FPlanXY -> setChecked ( FParent -> getParameterGrid ( ) -> getDisplayGridXY ( ) ) ;
00321 FPlanXZ -> setChecked ( FParent -> getParameterGrid ( ) -> getDisplayGridXZ ( ) ) ;
00322 FPlanYZ -> setChecked ( FParent -> getParameterGrid ( ) -> getDisplayGridYZ ( ) ) ;
00323
00324 FValOx -> setChecked ( FParent -> getParameterGrid ( ) -> getDisplayPositiveGridX ( ) ) ;
00325 FValOy -> setChecked ( FParent -> getParameterGrid ( ) -> getDisplayPositiveGridY ( ) ) ;
00326 FValOz -> setChecked ( FParent -> getParameterGrid ( ) -> getDisplayPositiveGridZ ( ) ) ;
00327
00328 CParameterOperations * p = FParent -> getControler ( ) -> getParameterOperations ( ) ;
00329
00330 setOrientation ( p -> getRotateCells ( ) ) ;
00331 setScale ( p -> getScaleCells ( ) ) ;
00332 setPosition ( p -> getTranslateCells ( ) ) ;
00333
00334 FParent -> repaint ( ) ;
00335
00336 FUpdate = false ;
00337 FMain = false ;
00338 }
00339
00340
00341
00342
00343
00344 void OptionsAffichage :: callbackToggleNormal ( )
00345 {
00346 if ( ! FUpdate )
00347 {
00348 setNormalDisplay ( getNormalDisplay ( ) ) ;
00349 update() ;
00350 }
00351 }
00352
00353 void OptionsAffichage :: callbackToggleVertices ( )
00354 {
00355 if ( ! FUpdate ) {
00356 setVerticesDisplay ( getVerticesDisplay ( ) ) ;
00357 update() ;
00358 }
00359 }
00360
00361 void OptionsAffichage :: callbackToggleSews ( )
00362 {
00363 if ( ! FUpdate ) {
00364 setSewsDisplay ( getSewsDisplay ( ) ) ;
00365 update() ;
00366 }
00367 }
00368
00369 void OptionsAffichage :: callbackToggleFaces ( )
00370 {
00371 if ( ! FUpdate ) {
00372 setFacesDisplay ( getFacesDisplay ( ) ) ;
00373 update() ;
00374 }
00375 }
00376
00377 void OptionsAffichage :: callbackCoulFacesGlobale ( )
00378 {
00379 if ( ! FUpdate )
00380 {
00381 setCoulFacesGlobale();
00382 update() ;
00383 }
00384 }
00385
00386 void OptionsAffichage ::callbackFacesCoulAlea( )
00387 {
00388 if ( ! FUpdate )
00389 {
00390 setFacesCoulAlea();
00391 update ( ) ;
00392 }
00393 }
00394
00395 void OptionsAffichage ::callbackVolumesCoulAlea( )
00396 {
00397 if ( ! FUpdate )
00398 {
00399 setVolumesCoulAlea();
00400 update ( ) ;
00401 }
00402 }
00403
00404 void OptionsAffichage :: callbackCoulTopologie( )
00405 {
00406 if ( ! FUpdate )
00407 {
00408 setCoulTopologie();
00409 update ( ) ;
00410 }
00411 }
00412
00413
00414 #ifdef MODULE_ARCHITECTURE
00415
00416 void OptionsAffichage :: callbackCoulSemantique( )
00417 {
00418 if ( ! FUpdate )
00419 {
00420 setCoulSemantique();
00421 update ( ) ;
00422 }
00423 }
00424
00425 void OptionsAffichage :: setCoulSemantique()
00426 {
00427 FParent -> setCoulSemantique () ;
00428 update ( ) ;
00429 }
00430
00431 bool OptionsAffichage :: getCoulSemantique( ) const
00432 {
00433 if ( ! FMain )
00434 return FECoulSemantique -> isChecked ( );
00435 else
00436 return ! (FECoulSemantique -> isChecked ( ) ) ;
00437 }
00438
00439 #endif
00440
00441 void OptionsAffichage :: callbackCoulGeometry()
00442 {
00443 if ( ! FUpdate )
00444 {
00445 setCoulGeometry();
00446 update ( ) ;
00447 }
00448 }
00449
00450
00451 void OptionsAffichage :: callbackToggleGrid ( )
00452 {
00453 if ( ! FUpdate )
00454 {
00455 setGridDisplay ( getGridDisplay ( ) ) ;
00456 update ( ) ;
00457 }
00458 }
00459
00460 void OptionsAffichage :: callbackToggleAxis ( )
00461 {
00462 if ( ! FUpdate )
00463 {
00464 setAxisDisplay ( getAxisDisplay ( ) ) ;
00465 update ( ) ;
00466 }
00467 }
00468
00469 void OptionsAffichage :: callbackSize ( )
00470 {
00471 if ( ! FUpdate )
00472 {
00473 setSize ( getSize ( ) ) ;
00474 update ( ) ;
00475 }
00476 }
00477
00478 void OptionsAffichage :: callbackToggleXy ( )
00479 {
00480 if ( ! FUpdate )
00481 {
00482 setXy ( getXy ( ) ) ;
00483 update ( ) ;
00484 }
00485 }
00486
00487 void OptionsAffichage :: callbackToggleXz ( )
00488 {
00489 if ( ! FUpdate )
00490 {
00491 setXz ( getXz ( ) ) ;
00492 update ( ) ;
00493 }
00494 }
00495
00496 void OptionsAffichage :: callbackToggleYz ( )
00497 {
00498 if ( ! FUpdate )
00499 {
00500 setYz ( getYz ( ) ) ;
00501 update ( ) ;
00502 }
00503 }
00504
00505 void OptionsAffichage :: callbackTogglePx ( )
00506 {
00507 if ( ! FUpdate )
00508 {
00509 setPx ( getPx ( ) ) ;
00510 update ( ) ;
00511 }
00512 }
00513
00514 void OptionsAffichage :: callbackTogglePy ( )
00515 {
00516 if ( ! FUpdate )
00517 {
00518 setPy ( getPy ( ) ) ;
00519 update ( ) ;
00520 }
00521 }
00522
00523 void OptionsAffichage :: callbackTogglePz ( )
00524 {
00525 if ( ! FUpdate )
00526 {
00527 setPz ( getPz ( ) ) ;
00528 update ( ) ;
00529 }
00530 }
00531
00532
00533
00534 void OptionsAffichage :: callbackToggleOrientation ( )
00535 {
00536 if ( ! FUpdate ) {
00537 setOrientation ( FOrientation -> isChecked ( ) ) ;
00538 update ( ) ;
00539 }
00540 }
00541
00542 void OptionsAffichage :: callbackToggleScale ( )
00543 {
00544 if ( ! FUpdate ) {
00545 setScale ( FTaille -> isChecked ( ) ) ;
00546 update ( ) ;
00547 }
00548
00549 }
00550
00551 void OptionsAffichage :: callbackTogglePosition ( )
00552 {
00553 if ( ! FUpdate ) {
00554 setPosition ( FPosition -> isChecked ( ) ) ;
00555 update ( ) ;
00556 }
00557 }
00558
00559
00560
00561
00562
00563 bool OptionsAffichage :: getVerticesDisplay ( ) const
00564 {
00565 if ( ! FMain )
00566 return FESommets -> isChecked ( ) ;
00567 else
00568 return ! (FESommets -> isChecked ( ) ) ;
00569 }
00570
00571
00572 bool OptionsAffichage :: getSewsDisplay ( ) const
00573 {
00574 if ( ! FMain )
00575 return FECoutures -> isChecked ( ) ;
00576 else
00577 return ! ( FECoutures -> isChecked ( ) );
00578 }
00579
00580 bool OptionsAffichage :: getNormalDisplay ( ) const
00581 {
00582 if ( ! FMain )
00583 return FENormale -> isChecked ( ) ;
00584 else
00585 return ! ( FENormale -> isChecked ( ) ) ;
00586 }
00587
00588 bool OptionsAffichage :: getFacesDisplay ( ) const
00589 {
00590 if ( ! FMain )
00591 return FEFacesPleines -> isChecked ( ) ;
00592 else
00593 return ! ( FEFacesPleines -> isChecked ( ) ) ;
00594 }
00595
00596 bool OptionsAffichage :: getFacesCoulAlea ( ) const
00597 {
00598 if ( ! FMain )
00599 return FECouleursAleatoire -> isChecked ( );
00600 else
00601 return ! (FECouleursAleatoire -> isChecked ( ) ) ;
00602 }
00603
00604 bool OptionsAffichage :: getVolumesCoulAlea ( ) const
00605 {
00606 if ( ! FMain )
00607 return FECoulVolumesAleatoire -> isChecked ( );
00608 else
00609 return ! (FECoulVolumesAleatoire -> isChecked ( ) ) ;
00610 }
00611 bool OptionsAffichage :: getCoulFacesGlobale() const
00612 {
00613 if ( ! FMain )
00614 return FECoulGlobale -> isChecked ( );
00615 else
00616 return ! (FECoulGlobale -> isChecked ( ) ) ;
00617
00618 }
00619 bool OptionsAffichage :: getCoulTopologie( ) const
00620 {
00621 if ( ! FMain )
00622 return FECoulTopologie -> isChecked ( );
00623 else
00624 return ! (FECoulTopologie -> isChecked ( ) ) ;
00625 }
00626
00627
00628 bool OptionsAffichage :: getCoulGeometry( ) const
00629 {
00630 if ( ! FMain )
00631 return FECoulGeometry -> isChecked ( );
00632 else
00633 return ! (FECoulGeometry -> isChecked ( ) ) ;
00634 }
00635
00636
00637 bool OptionsAffichage :: getGridDisplay ( ) const
00638 {
00639 if ( ! FMain )
00640 return FGrille -> isChecked ( );
00641 else
00642 return ! (FGrille -> isChecked ( ) ) ;
00643 }
00644
00645 bool OptionsAffichage :: getAxisDisplay ( ) const
00646 {
00647 if ( ! FMain )
00648 return FAffAxes -> isChecked ( );
00649 else
00650 return ! ( FAffAxes -> isChecked ( ) ) ;
00651 }
00652
00653 int OptionsAffichage :: getSize ( ) const
00654 {
00655 return FSaisieTaille -> value ( ) ;
00656 }
00657
00658 bool OptionsAffichage :: getXy ( ) const
00659 {
00660 return FPlanXY -> isChecked ( );
00661 }
00662
00663 bool OptionsAffichage :: getXz ( ) const
00664 {
00665 return FPlanXZ -> isChecked ( );
00666 }
00667
00668 bool OptionsAffichage :: getYz ( ) const
00669 {
00670 return FPlanYZ -> isChecked ( );
00671 }
00672
00673 bool OptionsAffichage :: getPx ( ) const
00674 {
00675 return FValOx -> isChecked ( );
00676 }
00677
00678 bool OptionsAffichage :: getPy ( ) const
00679 {
00680 return FValOy -> isChecked ( );
00681 }
00682
00683 bool OptionsAffichage :: getPz ( ) const
00684 {
00685 return FValOz -> isChecked ( );
00686 }
00687
00688
00689
00690 void OptionsAffichage :: setNormalDisplay ( bool b )
00691 {
00692 FParent -> setNormalDisplay ( b ) ;
00693 update ( ) ;
00694 }
00695
00696 void OptionsAffichage :: setFacesDisplay ( bool b )
00697 {
00698 FParent -> setFacesDisplay ( b ) ;
00699 update ( ) ;
00700 }
00701
00702 void OptionsAffichage :: setCoulFacesGlobale ()
00703 {
00704 FParent->setCoulFacesGlobale();
00705 update();
00706 }
00707
00708 void OptionsAffichage :: setFacesCoulAlea ()
00709 {
00710 FParent->setFacesCoulAlea();
00711 update();
00712 }
00713
00714 void OptionsAffichage :: setVolumesCoulAlea ()
00715 {
00716 FParent->setVolumesCoulAlea() ;
00717 update();
00718 }
00719
00720 void OptionsAffichage :: setCoulTopologie()
00721 {
00722 FParent -> setCoulTopologie () ;
00723 update ( ) ;
00724 }
00725
00726
00727 void OptionsAffichage :: setCoulGeometry()
00728 {
00729 FParent -> setCoulGeometry () ;
00730
00731 update ( ) ;
00732 }
00733
00734 void OptionsAffichage :: setVerticesDisplay ( bool b )
00735 {
00736 FParent -> setVerticesDisplay ( b ) ;
00737 update ( ) ;
00738 }
00739
00740 void OptionsAffichage :: setSewsDisplay ( bool b )
00741 {
00742 FParent -> setSewsDisplay ( b ) ;
00743 update ( ) ;
00744 }
00745
00746
00747 void OptionsAffichage :: setOrientation ( bool b )
00748 {
00749 FOrientation -> setChecked ( b ) ;
00750 FParent -> getControler ( ) ->getParameterOperations ( ) -> setRotateCells ( b ) ;
00751 }
00752
00753 void OptionsAffichage :: setScale ( bool b )
00754 {
00755 FTaille -> setChecked ( b ) ;
00756 FParent -> getControler ( ) -> getParameterOperations ( ) -> setScaleCells ( b ) ;
00757 }
00758
00759 void OptionsAffichage :: setPosition ( bool b )
00760 {
00761 FPosition -> setChecked ( b ) ;
00762 FParent -> getControler ( ) -> getParameterOperations ( ) -> setTranslateCells ( b ) ;
00763 }
00764
00765
00766
00767 void OptionsAffichage :: applyValues ( )
00768 {
00769 FParent -> setVerticesDisplay ( getVerticesDisplay ( ) ) ;
00770 FParent -> setSewsDisplay ( getSewsDisplay ( ) ) ;
00771 FParent -> setNormalDisplay ( getNormalDisplay ( ) ) ;
00772 FParent -> setFacesDisplay ( getFacesDisplay ( ) ) ;
00773 FParent -> repaint ( ) ;
00774 }
00775
00776
00777 void OptionsAffichage :: setFMain ( )
00778 {
00779 FMain = true ;
00780 }
00781
00782
00783 void OptionsAffichage :: setGridDisplay ( bool b )
00784 {
00785 FGrille -> setChecked ( b ) ;
00786 FSaisieTaille -> setEnabled ( b ) ;
00787 FPlanXY -> setEnabled ( b ) ;
00788 FValOx -> setEnabled ( b ) ;
00789 FPlanXZ -> setEnabled ( b ) ;
00790 FValOy -> setEnabled ( b ) ;
00791 FPlanYZ -> setEnabled ( b ) ;
00792 FValOz -> setEnabled ( b ) ;
00793 FParent -> setGridDisplay ( b ) ;
00794 }
00795
00796 void OptionsAffichage :: setAxisDisplay ( bool b )
00797 {
00798 FAffAxes -> setChecked ( b ) ;
00799 FParent -> setAxisDisplay ( b ) ;
00800 }
00801
00802 void OptionsAffichage :: setSize ( int s )
00803 {
00804 assert ( s >= 0 ) ;
00805
00806 FSaisieTaille -> setValue ( s ) ;
00807 FParent -> getParameterGrid ( ) -> setLGGrid ( s ) ;
00808 }
00809
00810 void OptionsAffichage :: setXy ( bool b )
00811 {
00812 FPlanXY -> setChecked ( b ) ;
00813 FParent -> getParameterGrid ( ) -> setDisplayGridXY ( b ) ;
00814 }
00815
00816 void OptionsAffichage :: setXz ( bool b )
00817 {
00818 FPlanXZ -> setChecked ( b ) ;
00819 FParent -> getParameterGrid ( ) -> setDisplayGridXZ ( b ) ;
00820 }
00821
00822 void OptionsAffichage :: setYz ( bool b )
00823 {
00824 FPlanYZ -> setChecked ( b ) ;
00825 FParent -> getParameterGrid ( ) -> setDisplayGridYZ ( b ) ;
00826 }
00827
00828 void OptionsAffichage :: setPx ( bool b )
00829 {
00830 FValOx -> setChecked ( b ) ;
00831 FParent -> getParameterGrid ( ) -> setDisplayPositiveGridX ( b ) ;
00832 }
00833
00834 void OptionsAffichage :: setPy ( bool b )
00835 {
00836 FValOy -> setChecked ( b ) ;
00837 FParent -> getParameterGrid ( ) -> setDisplayPositiveGridY ( b ) ;
00838 }
00839
00840 void OptionsAffichage :: setPz ( bool b )
00841 {
00842 FValOz -> setChecked ( b ) ;
00843 FParent -> getParameterGrid ( ) -> setDisplayPositiveGridZ ( b ) ;
00844 }