Moka Ihm Qt
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
window.qt.cc
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 #include "window.qt.hh"
25 #include "HtmlEntities.hh"
26 //#include "icones.hh"
27 #include "gl-multi-window.qt.hh"
28 
29 #include <stdlib.h>
30 #include <stdio.h>
31 #include <string>
32 
33 #include <QtGui/QPixmap>
34 #include <QtGui/QToolButton>
35 #include <QtGui/QMessageBox>
36 #include <QtGui/QStatusBar>
37 #include <QtGui/QFileDialog>
38 #include <Qt3Support/Q3Accel>
39 
40 
41 //***************************************
42 // Constructeur
43 //***************************************
45  QMainWindow(),
46  LINK_COLOR(QColor(53, 200, 255)),
47  FControler(new CControlerGMap),
48  FCreationActive(NULL),
49  FOperationActive(NULL),
50  FOptionsFrame(NULL),
51  FOperationChanfreinage(NULL),
52  FOptionsCarac(NULL),
53  FOptionsSurfacicHomology(NULL),
54  FOptionsVolumicHomology(NULL),
55  FDialogDo(NULL) ,
56  FDoubleCliquee(NULL),
57  FCouleurs(NULL),
58  color_active(false),
59  current_dir("."),
60  FileDialog(NULL)
61 {
62  setWindowTitle("MOKA");
63  resize(800 , 600) ;
64 
65  setWindowIcon(QIcon(":/moka-logo.png")) ;
66 
67  // Creation des boites a outil
69 
70  // Creation du menu
71  main_menu = new MenuBar(this) ;
72  setMenuBar(main_menu);
73 
74  // Creation du workspace
75  FWorkspace = new QWorkspace(this) ;
76  setCentralWidget(FWorkspace) ;
77  connect(FWorkspace, SIGNAL(windowActivated(QWidget *)),
78  this, SLOT(windowActivated(QWidget *)));
79 
80  // Affectation du mode du controleur
81  FControler -> setMode(MODE_SELECTION) ;
82  FControler -> setUndoOnFile(true) ;
83 
84  // Fenetre mere
85 
86  FVueMere = new GLWindow(VIEW_XYZ , FWorkspace , this , FSelection) ;
87 
88  string str = "Main window: " + FVueMere->getViewTypeString();
89  FVueMere -> setWindowTitle(*HTML::decode(&str));
90  FVueMere -> setMinimumSize(200 , 200) ;
91  FVueMere -> showMaximized() ;
92 
93  // Création des racourcis clavier : todo passer tout en QT4
94  Q3Accel* Raccourci = new Q3Accel(this) ;
95 
96  Raccourci -> insertItem(QKeySequence("Alt+F9") , 8) ;
97  Raccourci -> connectItem(8 , this ,
98  SLOT(callbackToggleNormal())) ;
99 
100  Raccourci -> insertItem(QKeySequence(Qt::Key_F9) , 9) ;
101  Raccourci -> connectItem(9 , this ,
102  SLOT(callbackToggleSews())) ;
103 
104  Raccourci -> insertItem(QKeySequence(Qt::Key_F10) , 10) ;
105  Raccourci -> connectItem(10 , this ,
106  SLOT(callbackToggleVertices())) ;
107 
108  Raccourci -> insertItem(QKeySequence(Qt::Key_F11) , 11) ;
109  Raccourci -> connectItem(11 , this ,
110  SLOT(callbackToggleFaces())) ;
111 
112  Raccourci -> insertItem(QKeySequence(Qt::Key_F12) , 12) ;
113  Raccourci -> connectItem(12 , this ,
114  SLOT(callbackToggleGrille())) ;
115 
116  Raccourci -> insertItem(QKeySequence("Alt+F11") , 14) ;
117  Raccourci -> connectItem(14 , this ,
118  SLOT(callbackTournerButton())) ;
119 
120  Raccourci -> insertItem(QKeySequence(Qt::Key_Space) , 1) ;
121  Raccourci -> connectItem(1 , this ,
122  SLOT(callbackHideAllWindow())) ;
123 
124  Raccourci -> insertItem(QKeySequence(Qt::Key_Up) , 15) ;
125  Raccourci -> connectItem(15, this, SLOT(callbackKeyUp()));
126 
127  Raccourci -> insertItem(QKeySequence(Qt::Key_Down) , 16) ;
128  Raccourci -> connectItem(16, this, SLOT(callbackKeyDown()));
129 
130  Raccourci -> insertItem(QKeySequence(Qt::Key_Left) , 17) ;
131  Raccourci -> connectItem(17, this, SLOT(callbackKeyLeft()));
132 
133  Raccourci -> insertItem(QKeySequence(Qt::Key_Right) , 18) ;
134  Raccourci -> connectItem(18, this, SLOT(callbackKeyRight()));
135 
136  Raccourci -> insertItem(QKeySequence(Qt::CTRL + Qt::Key_Up) , 19) ;
137  Raccourci -> connectItem(19, this, SLOT(callbackKeyCtrlUp()));
138 
139  Raccourci -> insertItem(QKeySequence(Qt::CTRL + Qt::Key_Down) , 20) ;
140  Raccourci -> connectItem(20, this, SLOT(callbackKeyCtrlDown()));
141 
142  Raccourci -> insertItem(QKeySequence(Qt::CTRL + Qt::Key_Left) , 21) ;
143  Raccourci -> connectItem(21, this, SLOT(callbackKeyCtrlLeft()));
144 
145  Raccourci -> insertItem(QKeySequence(Qt::CTRL + Qt::Key_Right) , 22) ;
146  Raccourci -> connectItem(22, this, SLOT(callbackKeyCtrlRight()));
147 
148  Raccourci -> insertItem(QKeySequence(Qt::SHIFT + Qt::Key_Up) , 23) ;
149  Raccourci -> connectItem(23, this, SLOT(callbackKeyShiftUp()));
150 
151  Raccourci -> insertItem(QKeySequence(Qt::SHIFT + Qt::Key_Down) , 24) ;
152  Raccourci -> connectItem(24, this, SLOT(callbackKeyShiftDown()));
153 
154  Raccourci -> insertItem(QKeySequence(Qt::SHIFT + Qt::Key_Left) , 25) ;
155  Raccourci -> connectItem(25, this, SLOT(callbackKeyShiftLeft()));
156 
157  Raccourci -> insertItem(QKeySequence(Qt::SHIFT + Qt::Key_Right) , 26);
158  Raccourci -> connectItem(26, this, SLOT(callbackKeyShiftRight()));
159 
160  Raccourci -> insertItem(QKeySequence(Qt::SHIFT + Qt::Key_F8) , 27) ;
161  Raccourci -> connectItem(27 , this , SLOT(callbackVueCompacte())) ;
162 
163  Raccourci -> insertItem(QKeySequence(Qt::SHIFT + Qt::Key_F9) , 28) ;
164  Raccourci -> connectItem(28 , this , SLOT(callbackVueSemiEclatee()));
165 
166  Raccourci -> insertItem(QKeySequence(Qt::SHIFT + Qt::Key_F10) , 29) ;
167  Raccourci -> connectItem(29 , this , SLOT(callbackVueMoka())) ;
168 
169  Raccourci -> insertItem(QKeySequence(Qt::SHIFT + Qt::Key_F11) , 30) ;
170  Raccourci -> connectItem(30 , this , SLOT(callbackVueTopoFil())) ;
171 
172  // Creation des Toolbars
173  FCreationBrin = new CreationBrin(this , FControler);
174  FCreationCylindre = new CreationCylindre(this , FControler);
175  FCreationMaillage = new CreationMaillage(this , FControler);
176  FCreationPolygone = new CreationPolygone(this , FControler);
177  FCreationPyramide = new CreationPyramide(this , FControler);
178  FCreationSphere = new CreationSphere(this , FControler);
179  FCreationTore = new CreationTore(this , FControler);
180  FDialogRotation = new dialogRotation(this , FControler);
181  FDialogHomothetie = new dialogHomothetie(this , FControler);
182  FDialogTranslation = new dialogTranslation(this , FControler);
183  FDialogMoveto = new dialogMoveto(this , FControler);
184  FCouleurs = new OptionCouleurs(this) ;
185 
186  updateStatusBar() ;
187 }
188 
189 //***************************************
190 // Destructeur
191 //***************************************
193 { }
194 
195 //***************************************
196 // Accesseur sur le controleur
197 //***************************************
198 GMap3d :: CControlerGMap * Window :: getControler() const
199 {
200  return FControler ;
201 }
202 
204 {
205  string str;
206 
207  if (FDoubleCliquee != NULL)
208  {
209  if (FDoubleCliquee == FVueMere)
210  {
211  str = "M&egrave;re : " + FVueMere->getViewTypeString();
212  FVueMere->setWindowTitle(*HTML::decode(&str));
213  }
214 
215  else
216  {
217  str = FDoubleCliquee -> getViewTypeString();
218  FDoubleCliquee->setWindowTitle(*HTML::decode(&str));
219  }
220  }
221 
222  FDoubleCliquee = vue ;
223 
224  if (FDoubleCliquee == FVueMere)
225  {
226  str = "M&egrave;re : " + FVueMere->getViewTypeString()
227  + " : Double-Click";
228  FVueMere->setWindowTitle(*HTML::decode(&str));
229  }
230  else
231  {
232  str = FDoubleCliquee->getViewTypeString() + " : Double-Click";
233  FDoubleCliquee->setWindowTitle(*HTML::decode(&str));
234  }
235 }
236 //***************************************
237 // Methode qui demande a toutes les fenetres de se redessiner
238 //***************************************
240 {
241  static bool is_repainting = false; // Evite les recursions infinies.
242 
243  if (!is_repainting)
244  {
245  is_repainting = true;
246  QMainWindow::repaint() ; // Appel de la methode de la classe mere
247 
248  // Appel de la methode sur toutes les vues ouvertes
249  QWidgetList vues = FWorkspace -> windowList() ;
250  for (int i = 0 ; i < int (vues . count()) ; i++)
251  ((GLWindow *) vues.at(i))->updateGL(); //paintGL(); //update(); //repaint() ;
252 
253  updateStatusBar();
254  is_repainting = false;
255  }
256 }
257 
258 void Window::closeEvent(QCloseEvent *)
259 {
260  FControler -> saveAllParameters(getCurrentViewId());
261 }
262 
263 void Window::windowActivated(QWidget * w)
264 {
265  if (w == NULL) return;
266 
267  CreationObjet * boite = getCreationActive() ;
268  if (boite != NULL)
269  boite -> update() ;
270 
272  if (op != NULL)
273  op -> update() ;
274 
276  if (col != NULL)
277  col->changeColor();
278 
279  if (FOptionsFrame != NULL && FOptionsFrame -> isVisible())
280  FOptionsFrame -> update() ;
281 
282  OptionsCarac * carac = getOptionsCaracActive() ;
283  if (carac != NULL) carac -> update() ;
284 }
285 
286 //*****************************************
287 // Gestion de la barre de menu
288 //*****************************************
290 {
291  int darts = getControler()->getNbDarts();
292  int selected = getControler()->getNbSelectedDarts();
293  int vertices = getControler()->getNbVertices();
294 
295  QString texte = "Darts: " ;
296  texte += QString :: number(darts) ;
297  texte += "; Selected: " ;
298  texte += QString :: number(selected) ;
299  texte += "; Vertices: " ;
300  texte += QString :: number(vertices) ;
301  texte += "; " ;
302  texte += QString::fromUtf8(getControler()->getMessage().c_str()) ;
303  statusBar() -> showMessage(texte) ;
304 }
305 
306 //*****************************************
307 // Accesseur sur les boites de dialogues
308 //*****************************************
310 {
311  return FCreationActive ;
312 }
313 
315 {
316  return FOperationActive ;
317 }
318 
320 {
321  return FCouleurs ;
322 }
323 
325 {
326  return FOptionsCarac ;
327 }
328 
330 {
331  return FOptionsSurfacicHomology ;
332 }
333 
335 {
336  return FOptionsVolumicHomology ;
337 }
338 
339 //*****************************************
340 // Methode qui bascule l'affichage
341 //*****************************************
342 void Window :: bascule(TView type)
343 {
344  assert(FWorkspace->activeWindow() != NULL);
345 
346  bool find = false;
347  int actu = 0;
348  int first;
349 
350  // On cherche tout d'abord la vue active.
351  QWidgetList vues = FWorkspace -> windowList() ;
352 
353  while (!find && actu < int(vues.count()))
354  {
355  if ((GLWindow*)FWorkspace->activeWindow() == (GLWindow*)vues.at(actu))
356  find = true;
357  else
358  ++actu;
359  }
360 
361  assert(find);
362 
363  // Puis on part de cette vue active et on cherche la suivante de meme type.
364  find = false;
365  first = actu;
366  actu = (actu + 1) % vues.count();
367 
368  while (!find && actu != first)
369  {
370  if (((GLWindow*)vues.at(actu))->getViewType() == type)
371  find = true;
372  else
373  actu = (actu + 1) % vues.count();
374  }
375 
376  if (find)
377  {
378  // Soit on active la vue
379  ((GLWindow*)vues.at(actu))->setFocus();
380  }
381  else
382  {
383  if (((GLWindow*)FWorkspace->activeWindow())->getViewType() != type)
384  {
385  // Soit on cree une vue avec le bon type.
386  switch (type)
387  {
388  case VIEW_XYZ :
389  addView3D() ;
390  break ;
391  case VIEW_XY :
392  addViewXY() ;
393  break ;
394  case VIEW_YZ :
395  addViewYZ() ;
396  break ;
397  case VIEW_XZ :
398  addViewZX() ;
399  break ;
400  case VIEW_ISO :
401  addViewMulti() ;
402  break ;
403  }
404  }
405  }
406 }
407 
408 //*****************************************
409 // Methode qui fabrique les barres d'outils
410 //*****************************************
412 {
413  QIcon pf0(":/nouveau.png") ;
414  QIcon pf1(":/charger.png") ;
415  QIcon pf2(":/sauver.png") ;
416  QIcon pf5(":/file-import-48x48.png") ;
417  QIcon pf3(":/file-export-48x48.png") ;
418  QIcon pf4(":/ajouter.png") ;
419 
420  QIcon pe1(":/undo.png") ;
421  QIcon pe2(":/redo.png") ;
422  QIcon pe3(":/vider.png") ;
423 
424  QIcon pc1(":/polyligne.png") ;
425  QIcon pc2(":/polygone.png") ;
426  QIcon pc3(":/maillage.png") ;
427  QIcon pc4(":/sphere.png") ;
428  QIcon pc5(":/cylindre.png") ;
429  QIcon pc6(":/cone.png") ;
430  QIcon pc7(":/tore.png") ;
431 
432  QIcon pv1(":/addvue.png") ;
433  QIcon pv2(":/deletevue.png") ;
434  QIcon pv3(":/groupervues.png") ;
435  QIcon pv4(":/degroupervues.png") ;
436 
437  QIcon pop1(":/homothetie.png") ;
438  QIcon pop2(":/translation.png") ;
439  QIcon pop3(":/rotation.png") ;
440 
441  QIcon psel1(":/sel_prev.png");
442  QIcon psel2(":/sel_next.png");
443  QIcon psel3(":/suppression.png");
444  QIcon psel4(":/suppression_forcee.png");
445 
446  // Creation de la boite a outil fichier
447  fichier = new QToolBar("File" , this) ;
448  fichier -> addAction(pf0, "New", this, SLOT(callbackNettoyage()));
449  charger_act = fichier -> addAction(pf1, "Load", this,
450  SLOT(callbackLoad()));
451  fichier -> addAction(pf4, "Add", this, SLOT(callbackAdd()));
452  sauver_act = fichier -> addAction(pf2, "Save", this,
453  SLOT(callbackSave()));
454  exporter_act = fichier -> addAction(pf3, "Export", this,
455  SLOT(callbackExport()));
456  importer_act = fichier -> addAction(pf5, "Import", this,
457  SLOT(callbackImport()));
458  addToolBar(fichier);
459 
460  // Creation de la boite a outil edition
461  edition = new QToolBar("Undo/Redo", this) ;
462  edition -> addAction(pe1, "Undo", this, SLOT(callbackUndo()));
463  edition -> addAction(pe2, "Redo", this, SLOT(callbackRedo()));
464  edition -> addSeparator() ;
465  edition -> addAction(pe3, "Empty the stack", this,
466  SLOT(callbackEmptyUndoRedo()));
467  addToolBar(edition);
468 
469  // Creation de la boite a outil creations
470  creation = new QToolBar("Creation", this) ;
471  creation -> addAction(pc1, "Create polyline/dart/face",
472  this, SLOT(callbackPolyline()));
473  creation -> addAction(pc2, "Create polygon", this, SLOT(callbackPolygon()));
474  creation -> addAction(pc3, "Create mesh",
475  this, SLOT(callbackMeshCreation()));
476  creation -> addAction(pc4, "Create sphere",this, SLOT(callbackSphere()));
477  creation -> addAction(pc5, "Create cylinder",
478  this,SLOT(callbackCylinder()));
479  creation -> addAction(pc6, "Create cone/pyramid",
480  this, SLOT(callbackPyramide()));
481  creation -> addAction(pc7, "Create torus", this,SLOT(callbackTorus()));
482  addToolBar(creation);
483 
484  // Creation de la boite a outils operations
485  operations = new QToolBar("Operations", this) ;
486  operations -> addAction(pop2, "Translation", this,
487  SLOT(callbackTranslateWindow()));
488  operations -> addAction(pop3, "Rotation", this,
489  SLOT(callbackRotateWindow()));
490  operations -> addAction(pop1, "Scale", this,
491  SLOT(callbackScaleWindow()));
492  addToolBar(operations);
493 
494 
495  // Creation de la boite a outils vues
496  vues = new QToolBar("View", this) ;
497  vues -> addAction(pv1, "Add a 3D view", this, SLOT(addView3D()));
498  vues -> addAction(pv2, "Remove the view", this, SLOT(deleteView()));
499  vues -> addSeparator() ;
500  vues -> addAction(pv3, "Group all the views", this,
501  SLOT(OperationGroupAllGeneral()));
502  vues -> addAction(pv4, "Ungroup all the views", this,
504  addToolBar(vues);
505 
506  // Creation de la boite a outils selection
507  FSelection = new SelectBar(this) ;
508  addToolBar(Qt::LeftToolBarArea, FSelection);
509 }
510 
511 // Ouvre une boite de dialogue demandant le nom du fichier a ouvrir.
512 // Retourne l'adresse complete de ce fichier.
513 // Si 'ind_filter' est different de NULL, l'indice du filtre selectionne
514 // par l'utilisateur sera ecrit dans le pointeur.
515 std::string Window::getOpenFileName(const QString & caption,
516  const QStringList & filters,
517  int * ind_filter)
518 {
519  QString filename;
520  QFileDialog open_dialog(0, caption, current_dir.path());
521 
522  if (ind_filter != NULL) *ind_filter = -1;
523  open_dialog.setFilters(filters);
524  open_dialog.setAcceptMode(QFileDialog::AcceptOpen);
525  open_dialog.setFileMode(QFileDialog::ExistingFile);
526 
527  if (open_dialog.exec())
528  {
529  filename = open_dialog.selectedFiles().at(0);
530  current_dir = open_dialog.directory();
531 
532  if (ind_filter != NULL)
533  {
534  for ((*ind_filter) = 0;
535  filters.at(*ind_filter) != open_dialog.selectedFilter();
536  (*ind_filter)++);
537  }
538  return filename.toStdString();
539  }
540  return std::string("");
541 }
542 
543 void Window::filterSelected(const QString & selected)
544 {
545  QRegExp rxfilter(".*\\(.*\\.(.*)\\).*");
546  int pos = rxfilter.indexIn(selected);
547  if (pos > -1)
548  {
549  FileDialog->setDefaultSuffix(rxfilter.cap(1));
550  }
551 }
552 
553 // Ouvre une boite de dialogue demandant le nom du fichier a ouvrir.
554 // Retourne l'adresse complete de ce fichier.
555 // Si 'ind_filter' est different de NULL, l'indice du filtre selectionne
556 // par l'utilisateur sera ecrit dans le pointeur.
557 std::string Window::getSaveFileName(const QString & caption,
558  const QStringList & filters,
559  int * ind_filter)
560 {
561  assert(FileDialog == NULL);
562 
563  QString filename;
564  FileDialog = new QFileDialog(0, caption, current_dir.path());
565 
566  connect(FileDialog, SIGNAL(filterSelected(const QString &)),
567  this, SLOT(filterSelected(const QString &)));
568 
569  if (ind_filter != NULL) *ind_filter = -1;
570  FileDialog->setFilters(filters);
571  FileDialog->setAcceptMode(QFileDialog::AcceptSave);
572  FileDialog->setFileMode(QFileDialog::AnyFile);
573  filterSelected(filters.at(0));
574 
575  if (FileDialog->exec())
576  {
577  filename = FileDialog->selectedFiles().at(0);
578  current_dir = FileDialog->directory();
579 
580  if (ind_filter != NULL)
581  {
582  for ((*ind_filter) = 0;
583  filters.at(*ind_filter) != FileDialog->selectedFilter();
584  (*ind_filter)++);
585  }
586 
587  delete FileDialog; FileDialog = NULL;
588  return filename.toStdString();
589  }
590  delete FileDialog; FileDialog = NULL;
591  return std::string("");
592 }
593 
594 //------------------------------------------------------------------------------
596 {
597  return getControler()->viewIsEnabledPrecompile(getCurrentViewId(),
598  PRECOMPILE_VERTEX);
599 }
601 {
602  if (getVerticesDisplay() != b)
603  {
604  getControler()->viewTogglePrecompile(getCurrentViewId(),
605  PRECOMPILE_VERTEX);
606  }
607 }
608 //------------------------------------------------------------------------------
610 {
611  return getControler()->viewIsEnabledPrecompile(getCurrentViewId(),
612  PRECOMPILE_NORMAL_VECTOR);
613 }
615 {
616  if (getNormalDisplay() != b)
617  {
618  getControler()->viewTogglePrecompile(getCurrentViewId(),
619  PRECOMPILE_NORMAL_VECTOR);
620  }
621 }
622 //------------------------------------------------------------------------------
624 {
625  return getControler()->viewIsEnabledPrecompile(getCurrentViewId(),
626  PRECOMPILE_FACE);
627 }
629 {
630  if (getFacesDisplay() != b)
631  {
632  getControler()->viewTogglePrecompile(getCurrentViewId(), PRECOMPILE_FACE);
633 
634  toggleDarts(b);
635  }
636 }
637 
639 {
640  return getControler()->getParameterFace(getCurrentViewId())
641  ->getRandomCLFace();
642 }
643 
645 {
646  if (!getFacesCoulAlea())
647  {
648  getControler()->getParameterFace(getCurrentViewId())
649  ->setRandomCLFace(true);
650  getControler()->getParameterFace(getCurrentViewId())
651  ->setRandomCLVolume(false);
652 
653  toggleDarts(true);
654  }
655 }
656 
658 {
659  return getControler()->getParameterFace(getCurrentViewId())
660  ->getRandomCLVolume();
661 }
662 
664 {
665  if (!getVolumesCoulAlea())
666  {
667  getControler()->getParameterFace(getCurrentViewId())
668  ->setRandomCLVolume(true);
669  getControler()->getParameterFace(getCurrentViewId())
670  ->setRandomCLFace(false);
671 
672  toggleDarts(true);
673  }
674 }
675 
677 {
678  return
679  !getControler()->getParameterFace(getCurrentViewId())
680  ->getRandomCLFace() &&
681  !getControler()->getParameterFace(getCurrentViewId())
682  ->getRandomCLVolume();
683 }
684 
686 {
687  if (!getCoulFacesGlobale())
688  {
689  getControler()->getParameterFace(getCurrentViewId())
690  ->setRandomCLFace(false);
691  getControler()->getParameterFace(getCurrentViewId())
692  ->setRandomCLVolume(false);
693 
694  toggleDarts(true);
695  }
696 }
697 
699 {
700  return getControler()->getParameterFace(getCurrentViewId())
701  ->getRandomColorGeometry();
702 }
703 
705 {
706  if (!getCoulGeometry())
707  {
708  getControler()->getParameterFace(getCurrentViewId())
709  ->setRandomColorGeometry(true);
710 
711  toggleDarts(true);
712  }
713 }
714 
716 {
718  ->getRandomColorGeometry());
719 }
720 
722 {
723  if (!getCoulTopologie())
724  {
725  getControler()->getParameterFace(getCurrentViewId())
726  ->setRandomColorGeometry(false);
727  toggleDarts(true);
728  }
729 }
730 //------------------------------------------------------------------------------
732 {
733  return getControler()->viewIsEnabledPrecompile(getCurrentViewId(),
734  PRECOMPILE_SEW);
735 }
737 {
738  if (getSewsDisplay() != b)
739  {
740  getControler()->viewTogglePrecompile(getCurrentViewId(), PRECOMPILE_SEW);
741 
742  toggleDarts(b);
743  }
744 }
745 //------------------------------------------------------------------------------
747 {
748  return getControler()->viewIsEnabledPrecompile(getCurrentViewId(),
749  PRECOMPILE_GRID);
750 }
752 {
753  if (getGridDisplay() != b)
754  {
755  getControler()->viewTogglePrecompile(getCurrentViewId(), PRECOMPILE_GRID);
756  }
757 }
758 //------------------------------------------------------------------------------
760 {
761  return getControler()->viewIsEnabledPrecompile(getCurrentViewId(),
762  PRECOMPILE_AXIS);
763 }
765 {
766  if (getAxisDisplay() != b)
767  {
768  getControler()->viewTogglePrecompile(getCurrentViewId(), PRECOMPILE_AXIS);
769  getControler()->viewTogglePrecompile(getCurrentViewId(), PRECOMPILE_AIMED_POINT);
770  }
771 }
772 
774 {
775  assert(FWorkspace->activeWindow() != NULL);
776 
777  return ((GLWindow *) FWorkspace -> activeWindow())
778  -> getCliquedViewId() ;
779 }
780 
782 {
783 #ifdef MODULE_SPAMOD
784  // Si on est en vue spamod et qu'on affiche les coutures ou les faces
785  // pleines, alors on affiche egalement les brins.
786  if (getParameterSpamod()->getViewMode() != SPAMOD_NONE &&
787  getControler()->viewIsEnabledPrecompile(getCurrentViewId(),
788  PRECOMPILE_SPAMOD))
789  {
790  if (b)
791  getControler()->
792  viewEnablePrecompile(getCurrentViewId(), PRECOMPILE_DART);
793  else if (!getFacesDisplay() && !getSewsDisplay())
794  getControler()->
795  viewDisablePrecompile(getCurrentViewId(), PRECOMPILE_DART);
796  }
797 #endif // MODULE_SPAMOD
798 }
799 //***************************************
800 //***************************************
801 // CALLBACKS
802 //***************************************
803 //***************************************
805 {
806  int view = getCurrentViewId();
807 
808  switch (((GLWindow *) FWorkspace -> activeWindow()) -> getViewType())
809  {
810  case VIEW_XYZ :
811  {
812  FControler -> moveEye(view, true);
813  repaint();
814  break;
815  }
816  case VIEW_XY : FControler -> moveEyeY(view, true); repaint(); break;
817  case VIEW_XZ :
818  case VIEW_YZ : FControler -> moveEyeZ(view, true); repaint(); break;
819  }
820 }
821 
823 {
824  int view = getCurrentViewId();
825 
826  switch (((GLWindow *) FWorkspace -> activeWindow()) -> getViewType())
827  {
828  case VIEW_XYZ :
829  {
830  FControler -> moveEye(view, false);
831  repaint();
832  break;
833  }
834  case VIEW_XY : FControler -> moveEyeY(view, false); repaint(); break;
835  case VIEW_XZ :
836  case VIEW_YZ : FControler -> moveEyeZ(view, false); repaint(); break;
837  }
838 }
839 
841 {
842  int view = getCurrentViewId();
843 
844  switch (((GLWindow *) FWorkspace -> activeWindow()) -> getViewType())
845  {
846  case VIEW_XYZ :
847  {
848  FControler -> horizontalRotationEye(view, true);
849  repaint();
850  break;
851  }
852  case VIEW_XY :
853  case VIEW_XZ : FControler -> moveEyeX(view, false); repaint(); break;
854  case VIEW_YZ : FControler -> moveEyeY(view, false); repaint(); break;
855  }
856 }
857 
859 {
860  int view = getCurrentViewId();
861 
862  switch (((GLWindow *) FWorkspace -> activeWindow()) -> getViewType())
863  {
864  case VIEW_XYZ :
865  {
866  FControler -> horizontalRotationEye(view, false);
867  repaint();
868  break;
869  }
870  case VIEW_XY :
871  case VIEW_XZ : FControler -> moveEyeX(view, true); repaint(); break;
872  case VIEW_YZ : FControler -> moveEyeY(view, true); repaint(); break;
873  }
874 }
875 
877 {
878  if (((GLWindow *) FWorkspace -> activeWindow()) -> getViewType() == VIEW_XYZ)
879  {
880  FControler -> verticalRotationEye(getCurrentViewId(), true);
881  repaint();
882  }
883 }
884 
886 {
887  if (((GLWindow *) FWorkspace -> activeWindow()) -> getViewType() == VIEW_XYZ)
888  {
889  FControler -> verticalRotationEye(getCurrentViewId(), false);
890  repaint();
891  }
892 }
893 
895 {
896  if (((GLWindow *) FWorkspace -> activeWindow()) -> getViewType() == VIEW_XYZ)
897  {
898  FControler -> moveEyeLateral(getCurrentViewId(), false);
899  repaint();
900  }
901 }
902 
904 {
905  if (((GLWindow *) FWorkspace -> activeWindow()) -> getViewType() == VIEW_XYZ)
906  {
907  FControler -> moveEyeLateral(getCurrentViewId(), true);
908  repaint();
909  }
910 }
911 
913 {
914  if (((GLWindow *) FWorkspace -> activeWindow()) -> getViewType() == VIEW_XYZ)
915  {
916  TViewId AView = getCurrentViewId();
917  float coeff =
918  FControler -> getParameterEyePosition(AView) -> getPasAvancement();
919  FControler -> moveEye(AView, true, coeff * 5);
920  repaint();
921  }
922 }
923 
925 {
926  if (((GLWindow *) FWorkspace -> activeWindow()) -> getViewType() == VIEW_XYZ)
927  {
928  TViewId AView = getCurrentViewId();
929  float coeff =
930  FControler -> getParameterEyePosition(AView) -> getPasAvancement();
931  FControler -> moveEye(AView, false, coeff * 5);
932  repaint();
933  }
934 }
935 
937 {
938  if (((GLWindow *) FWorkspace -> activeWindow()) -> getViewType() == VIEW_XYZ)
939  {
940  FControler -> horizontalRotationEye(getCurrentViewId(), true, 90);
941  repaint();
942  }
943 }
944 
946 {
947  if (((GLWindow *) FWorkspace -> activeWindow()) -> getViewType() == VIEW_XYZ)
948  {
949  FControler -> horizontalRotationEye(getCurrentViewId(), false, 90);
950  repaint();
951  }
952 }
953 
955 {
956  if (FOptionsFrame == NULL)
957  FOptionsFrame = new OptionsFrame(this) ;
958 
959  FOptionsFrame -> getOptionsVue() -> callbackPresetting0();
960 }
961 
963 {
964  if (FOptionsFrame == NULL)
965  FOptionsFrame = new OptionsFrame(this) ;
966 
967  FOptionsFrame -> getOptionsVue() -> callbackPresetting1();
968 }
969 
971 {
972  if (FOptionsFrame == NULL)
973  FOptionsFrame = new OptionsFrame(this) ;
974 
975  FOptionsFrame -> getOptionsVue() -> callbackPresetting2();
976 }
977 
979 {
980  if (FOptionsFrame == NULL)
981  FOptionsFrame = new OptionsFrame(this) ;
982 
983  FOptionsFrame -> getOptionsVue() -> callbackPresetting3();
984 }
985 //***************************************
986 // Slots Menu Fichier
987 //***************************************
988 
989 //------------ Nouveau --------------
991 {
992  if (getControler()->empty()) repaint();
993  else updateStatusBar();
994 }
995 //------------ Chargement --------------
997 {
998  // Ouverture d'un QFileDialog
999  QStringList type_load;
1000  type_load << "Moka file (*.moka)";
1001 
1002  std::string filename = getOpenFileName("Load", type_load) ;
1003 
1004  // Si l'utilisateur n'a pas annule -> appel au controleur
1005  if (filename != "")
1006  {
1007  if (getControler() -> loadMap(filename.c_str())) repaint() ;
1008  else updateStatusBar() ;
1009  }
1010 }
1011 //------------ Ajout --------------
1013 {
1014  int type;
1015  QStringList type_load;
1016 
1017  type_load << "Moka file (*.moka)";
1018 
1019  std::string filename = getOpenFileName("Add a file",
1020  type_load, &type) ;
1021 
1022  if (filename != "")
1023  {
1024  int res = 0;
1025 
1026  switch (type)
1027  {
1028  case 0 :
1029  case 1 : res = getControler()->addMap(filename.c_str()); break;
1030  default : break;
1031  }
1032 
1033  if (res) repaint() ;
1034  else updateStatusBar() ;
1035  }
1036 }
1037 //------------ Sauvegarde --------------
1039 {
1040  int type;
1041  QStringList type_save;
1042 
1043  type_save << "ASCII format (*.moka)" << "Binary format (*.moka)";
1044  std::string filename = getSaveFileName("Save", type_save, &type);
1045 
1046  if (filename != "")
1047  {
1048  int res = 0;
1049 
1050  switch (type)
1051  {
1052  case 0: res = getControler()->saveMapAscii(filename.c_str()); break;
1053  case 1: res = getControler()->saveMapBinary(filename.c_str()); break;
1054  default : break;
1055  }
1056 
1057  if (res) repaint() ;
1058  else updateStatusBar() ;
1059  }
1060 }
1061 //------------ Importer --------------
1063 {
1064  int type;
1065  QStringList type_load;
1066 
1067  type_load << "Off (*.off)";
1068 
1069  std::string filename = getOpenFileName("Import a file",
1070  type_load, &type) ;
1071 
1072  if (filename != "")
1073  {
1074  int res = 0;
1075 
1076  switch (type)
1077  {
1078  case 0 :
1079  case 1 : res = getControler()->importOff(filename.c_str()); break;
1080  default : break;
1081  }
1082 
1083  if (res) repaint() ;
1084  else updateStatusBar() ;
1085  }
1086 }
1087 //------------ Exporter --------------
1089 {
1090  int type;
1091  QStringList type_save;
1092 
1093  type_save << "XFig G-map (*.fig)"
1094  << "XFig map (*.fig)"
1095  << "XFig Intervoxel (*.fig)"
1096  << "Pov (*.pov)"
1097  << "Off2D (*.off)"
1098  << "Off3D (*.off)";
1099  std::string filename = getSaveFileName("Export", type_save, &type);
1100 
1101  // Si l'utilisateur n'a pas annule on exporte selon son choix
1102  if (filename != "")
1103  {
1104  switch (type)
1105  {
1106  case 0 :
1107  FControler -> exportXfig(filename.c_str() , getCurrentViewId() ,
1108  false, getFacesDisplay() ,
1109  getSewsDisplay() , false ,
1110  getVerticesDisplay()) ;
1111  break ;
1112 
1113  case 1 :
1114  FControler -> exportXfig(filename.c_str() , getCurrentViewId() ,
1115  true, getFacesDisplay() ,
1116  getSewsDisplay() , false ,
1117  getVerticesDisplay()) ;
1118  break ;
1119 
1120  case 2 :
1121  FControler -> exportXfigAsIntervoxel(filename.c_str(),
1122  getCurrentViewId());
1123  break ;
1124 
1125  case 3 :
1126  FControler -> exportPov(filename.c_str()) ;
1127  break ;
1128  case 4 :
1129  FControler -> exportOff(filename.c_str()) ;
1130  break ;
1131  case 5 :
1132  FControler -> exportOff3D(filename.c_str()) ;
1133  break ;
1134  }
1135  updateStatusBar() ;
1136  }
1137 }
1138 
1140 {
1141  int type;
1142  QStringList type_load;
1143 
1144  type_load << "Moka file (*.moka)" << "Off (*.off)";
1145 
1146  std::string filename = getOpenFileName("Search a sub-map",
1147  type_load, &type) ;
1148 
1149  if (filename != "")
1150  {
1151  int res = 0;
1152 
1153  switch (type)
1154  {
1155  case 0 : res = getControler()->findMotifMoka(filename.c_str()); break;
1156  case 1 : res = getControler()->findMotifOff(filename.c_str()); break;
1157  default : break;
1158  }
1159 
1160  if (res) repaint() ;
1161  else updateStatusBar() ;
1162  }
1163 }
1164 
1166 {
1167  int type;
1168  QStringList type_load;
1169 
1170  type_load << "Moka file (*.moka)" << "Off (*.off)";
1171 
1172  std::string filename = getOpenFileName("Count all the sub-maps",
1173  type_load, &type) ;
1174 
1175  if (filename != "")
1176  {
1177  int res = 0;
1178 
1179  switch (type)
1180  {
1181  case 0 :
1182  res = getControler()->countNumberOfMotifsMoka(filename.c_str());
1183  break;
1184  case 1 :
1185  res = getControler()->countNumberOfMotifsOff(filename.c_str());
1186  break;
1187  default : break;
1188  }
1189 
1190  if (res) repaint() ;
1191  else updateStatusBar() ;
1192  }
1193 }
1194 
1195 //------------ Quitter --------------
1197 {
1198  this -> close() ;
1199 }
1200 
1201 //***************************************
1202 // Slots Menu Edition
1203 //***************************************
1204 
1205 //----------- Annuler --------------
1207 {
1208  if (getControler() -> undo()) repaint() ;
1209  else updateStatusBar() ;
1210 }
1211 //----------- Refaire --------------
1213 {
1214  if (getControler() -> redo()) repaint() ;
1215  else updateStatusBar() ;
1216 }
1217 //---------- Vider la pile ----------
1219 {
1220  getControler() -> emptyUndoRedo() ;
1221  updateStatusBar() ;
1222 }
1223 //---------- Configuration ----------
1225 {
1226  FDialogDo = new DialogDo(this) ;
1227  FDialogDo -> show() ;
1228 }
1229 //***************************************
1230 // Slots Menu Options
1231 //***************************************
1233 {
1234 }
1236 {
1237  if (FOptionsFrame == NULL)
1238  FOptionsFrame = new OptionsFrame(this) ;
1239 
1240  FOptionsFrame -> setOption(3) ;
1241  FOptionsFrame -> show() ;
1242 }
1243 
1245 {
1246  if (FOptionsFrame == NULL)
1247  FOptionsFrame = new OptionsFrame(this) ;
1248 
1249  FOptionsFrame -> setOption(4) ;
1250  FOptionsFrame -> show() ;
1251 }
1252 
1254 {
1255  if (FOptionsFrame == NULL)
1256  FOptionsFrame = new OptionsFrame(this) ;
1257 
1258  FOptionsFrame -> setOption(5) ;
1259  FOptionsFrame -> show() ;
1260 }
1261 
1263 {
1264  if (FOptionsFrame == NULL)
1265  FOptionsFrame = new OptionsFrame(this) ;
1266 
1267  FOptionsFrame -> setOption(6) ;
1268  FOptionsFrame -> show() ;
1269 }
1270 
1272 {
1273  if (FOptionsFrame == NULL)
1274  FOptionsFrame = new OptionsFrame(this) ;
1275 
1276  FOptionsFrame -> setOption(7) ;
1277  FOptionsFrame -> show() ;
1278 }
1279 
1281 {
1282  if (FOptionsFrame == NULL)
1283  FOptionsFrame = new OptionsFrame(this) ;
1284 
1285  FOptionsFrame -> setOption(2) ;
1286  FOptionsFrame -> show() ;
1287 }
1288 
1290 {
1291  if (FOptionsFrame == NULL)
1292  FOptionsFrame = new OptionsFrame(this) ;
1293 
1294  FOptionsFrame -> setOption(8) ;
1295  FOptionsFrame -> show() ;
1296 }
1297 
1299 {
1300  if (FOptionsCarac == NULL)
1301  FOptionsCarac = new OptionsCarac(this) ;
1302 
1303  FOptionsCarac -> show_impl() ;
1304 }
1305 
1307 {
1308  if (FOptionsSurfacicHomology == NULL)
1309  FOptionsSurfacicHomology = new OptionsSurfacicHomology(this) ;
1310 
1311  FOptionsSurfacicHomology -> show_impl() ;
1312  repaint();
1313 }
1314 
1316 {
1317  if (FOptionsVolumicHomology == NULL)
1318  FOptionsVolumicHomology = new OptionsVolumicHomology(this) ;
1319 
1320  FOptionsVolumicHomology -> show_impl() ;
1321  repaint();
1322 }
1323 
1325 {
1326  getControler()->countNonLocalDegreeTwoEdges();
1327  updateStatusBar();
1328 }
1329 
1331 {
1332  resetActiveOperations();
1333  color_active = true;
1334  FCouleurs -> show();
1335  repaint();
1336 }
1337 
1338 // Pour afficher les coutures
1340 {
1341  if (FOptionsFrame == NULL)
1342  FOptionsFrame = new OptionsFrame(this) ;
1343  FOptionsFrame -> callbackToggleSews() ;
1344 }
1345 
1346 // Pour afficher les normales
1348 {
1349  if (FOptionsFrame == NULL)
1350  FOptionsFrame = new OptionsFrame(this) ;
1351  FOptionsFrame -> callbackToggleNormal() ;
1352 }
1353 
1354 // Pour afficher les sommets
1356 {
1357  if (FOptionsFrame == NULL)
1358  FOptionsFrame = new OptionsFrame(this) ;
1359  FOptionsFrame -> callbackToggleVertices() ;
1360 }
1361 
1362 // Pour afficher les faces
1364 {
1365  if (FOptionsFrame == NULL)
1366  FOptionsFrame = new OptionsFrame(this);
1367  FOptionsFrame -> callbackToggleFaces() ;
1368 }
1369 
1371 {
1372  if (FOptionsFrame == NULL)
1373  FOptionsFrame = new OptionsFrame(this);
1374  FOptionsFrame ->callbackTournerButton();
1375 }
1376 
1378 {
1379  if (FOptionsFrame == NULL)
1380  FOptionsFrame = new OptionsFrame(this) ;
1381  FOptionsFrame -> callbackToggleGrille() ;
1382 }
1383 
1385 {
1386  if (FOperationChanfreinage == NULL)
1387  FOperationChanfreinage = new OperationChanfreinage(this) ;
1388  FOperationChanfreinage -> show() ;
1389 }
1390 
1391 void Window :: resetActiveOperations()
1392 {
1393  // Si il y a une fenetre de creation ou d'operation
1394  // deja ouverte, on la ferme
1395  if (FCreationActive != NULL)
1396  {
1397  FCreationActive -> cancel() ;
1398  FCreationActive = NULL ;
1399  }
1400  else if (FOperationActive != NULL)
1401  {
1402  FOperationActive -> close() ;
1403  FOperationActive = NULL ;
1404  }
1405  else if (color_active)
1406  {
1407  FCouleurs -> close();
1408  color_active = false;
1409  }
1411  {
1412  FOptionsSurfacicHomology->close();
1413  delete FOptionsSurfacicHomology;
1414  FOptionsSurfacicHomology = NULL;
1415  }
1416  else if (getOptionsVolumicHomologyActive() )
1417  {
1418  FOptionsVolumicHomology->close();
1419  delete FOptionsVolumicHomology;
1420  FOptionsSurfacicHomology = NULL;
1421  }
1422 }
1423 
1424 // Slots Menu Creer
1425 //-----------------
1427 {
1428  resetActiveOperations();
1429  getControler() -> setMode(MODE_CREATION_POLYLINE) ;
1430  FCreationActive = FCreationBrin ;
1431  FCreationActive -> setVisible(true);
1432  updateStatusBar();
1433  repaint();
1434 }
1435 
1437 {
1438  resetActiveOperations();
1439  getControler() -> setMode(MODE_CREATION_POLYGON) ;
1440  FCreationActive = FCreationPolygone ;
1441  FCreationActive -> setVisible(true);
1442  updateStatusBar();
1443  repaint();
1444 }
1445 
1447 {
1448  resetActiveOperations();
1449  getControler() -> setMode(MODE_CREATION_MESH) ;
1450  FCreationActive = FCreationMaillage ;
1451  FCreationActive -> setVisible(true);
1452  updateStatusBar();
1453  repaint();
1454 }
1455 
1457 {
1458  resetActiveOperations();
1459  getControler() -> setMode(MODE_CREATION_SPHERE) ;
1460  FCreationActive = FCreationSphere ;
1461  FCreationActive -> setVisible(true);
1462  updateStatusBar();
1463  repaint();
1464 }
1465 
1467 {
1468  resetActiveOperations();
1469  getControler() -> setMode(MODE_CREATION_CYLINDER) ;
1470  FCreationActive = FCreationCylindre ;
1471  FCreationActive -> setVisible(true);
1472  updateStatusBar();
1473  repaint();
1474 }
1475 
1477 {
1478  resetActiveOperations();
1479  getControler() -> setMode(MODE_CREATION_PYRAMID) ;
1480  FCreationActive = FCreationPyramide ;
1481  FCreationActive -> setVisible(true);
1482  updateStatusBar();
1483  repaint();
1484 }
1485 
1487 {
1488  resetActiveOperations();
1489  getControler() -> setMode(MODE_CREATION_TORUS) ;
1490  FCreationActive = FCreationTore ;
1491  FCreationActive -> setVisible(true);
1492  updateStatusBar();
1493  repaint();
1494 }
1495 
1497 {
1498  getControler()->randomizeDarts();
1499  updateStatusBar();
1500 }
1501 
1502 //***************************************
1503 // Slots Menu Operations
1504 //***************************************
1505 // -- translation/rotation/homothetie
1507 {
1508  resetActiveOperations();
1509  getControler() -> setMode(MODE_TRANSLATION);
1510  FOperationActive = FDialogTranslation ;
1511  FOperationActive -> update();
1512  FOperationActive -> setVisible(true);
1513  updateStatusBar() ;
1514  repaint();
1515 }
1516 
1518 {
1519  resetActiveOperations();
1520  getControler() -> setMode(MODE_ROTATION);
1521  FOperationActive = FDialogRotation ;
1522  FOperationActive -> update();
1523  FOperationActive -> setVisible(true);
1524  updateStatusBar() ;
1525  repaint();
1526 }
1527 
1529 {
1530  resetActiveOperations();
1531  getControler() -> setMode(MODE_SCALE);
1532  FOperationActive = FDialogHomothetie ;
1533  FOperationActive -> update();
1534  FOperationActive -> setVisible(true);
1535  updateStatusBar() ;
1536  repaint();
1537 }
1538 
1540 {
1541  resetActiveOperations();
1542  getControler() -> setMode(MODE_SELECTION);
1543  FOperationActive = FDialogMoveto ;
1544  FOperationActive -> update();
1545  FOperationActive -> setVisible(true);
1546  updateStatusBar() ;
1547  repaint();
1548 }
1549 
1550 // -- coudre
1552 {
1553  if (getControler() -> intuitiveTopoSew()) repaint() ;
1554  else updateStatusBar() ;
1555 }
1556 
1558 {
1559  if (getControler() -> intuitiveGeoSew()) repaint() ;
1560  else updateStatusBar() ;
1561 }
1562 
1564 {
1565  if (getControler() -> topoSew(0)) repaint() ;
1566  else updateStatusBar() ;
1567 }
1568 
1570 {
1571  if (getControler() -> topoSew(1)) repaint() ;
1572  else updateStatusBar() ;
1573 }
1574 
1576 {
1577  if (getControler() -> geoSew(1)) repaint() ;
1578  else updateStatusBar() ;
1579 }
1580 
1582 {
1583  if (getControler() -> topoSew(2)) repaint() ;
1584  else updateStatusBar() ;
1585 }
1586 
1588 {
1589  if (getControler() -> geoSew(2)) repaint() ;
1590  else updateStatusBar() ;
1591 }
1592 
1594 {
1595  if (getControler() -> topoSew(3)) repaint() ;
1596  else updateStatusBar() ;
1597 }
1598 
1600 {
1601  if (getControler() -> geoSew(3)) repaint() ;
1602  else updateStatusBar() ;
1603 }
1604 
1606 {
1607  if (getControler() -> topoSewBorders(1)) repaint() ;
1608  else updateStatusBar() ;
1609 }
1610 
1612 {
1613  if (getControler() -> geoSewBorders(1)) repaint() ;
1614  else updateStatusBar() ;
1615 }
1616 
1618 {
1619  if (getControler() -> topoSewBorders(2)) repaint() ;
1620  else updateStatusBar() ;
1621 }
1622 
1624 {
1625  if (getControler() -> geoSewBorders(2)) repaint();
1626  else updateStatusBar() ;
1627 }
1628 
1630 {
1631  if (getControler() -> invertLastOperation()) repaint() ;
1632  else updateStatusBar() ;
1633 }
1634 
1636 {
1637  if (getControler() -> invertLastOperationGeometry()) repaint() ;
1638  else updateStatusBar() ;
1639 }
1640 
1641 // -- decoudre
1643 {
1644  if (getControler() -> intuitiveUnsew()) repaint() ;
1645  else updateStatusBar() ;
1646 }
1647 
1649 {
1650  if (getControler() -> unsew(0)) repaint();
1651  else updateStatusBar() ;
1652 }
1653 
1655 {
1656  if (getControler() -> unsew(1)) repaint() ;
1657  else updateStatusBar() ;
1658 }
1659 
1661 {
1662  if (getControler() -> unsew(2)) repaint() ;
1663  else updateStatusBar() ;
1664 }
1665 
1667 {
1668  if (getControler() -> unsew(3)) repaint() ;
1669  else updateStatusBar() ;
1670 }
1671 
1672 // -- placage
1674 {
1675  if (getControler() -> intuitivePlate()) repaint() ;
1676  else updateStatusBar() ;
1677 }
1678 
1680 {
1681  if (getControler() -> plate(0)) repaint() ;
1682  else updateStatusBar() ;
1683 }
1684 
1686 {
1687  if (getControler() -> plate(1)) repaint() ;
1688  else updateStatusBar() ;
1689 }
1690 
1692 {
1693  if (getControler() -> plate(2)) repaint() ;
1694  else updateStatusBar() ;
1695 }
1696 
1698 {
1699  if (getControler() -> plateBorders(1)) repaint() ;
1700  else updateStatusBar() ;
1701 }
1702 
1704 {
1705  if (getControler() -> plateBorders(2)) repaint() ;
1706  else updateStatusBar() ;
1707 }
1708 
1709 // -- Fusionner
1711 {
1712  if (getControler() -> intuitiveMerge()) repaint() ;
1713  else updateStatusBar() ;
1714 }
1715 
1717 {
1718  if (getControler() -> merge(1)) repaint() ;
1719  else updateStatusBar() ;
1720 }
1721 
1723 {
1724  if (getControler() -> merge(2)) repaint() ;
1725  else updateStatusBar() ;
1726 }
1727 
1729 {
1730  if (getControler() -> merge(3)) repaint() ;
1731  else updateStatusBar() ;
1732 }
1733 
1735 {
1736  if (getControler() -> mergeColinearEdges()) repaint() ;
1737  else updateStatusBar() ;
1738 }
1739 
1741 {
1742  if (getControler() -> mergeCoplanarFaces()) repaint() ;
1743  else updateStatusBar() ;
1744 }
1745 
1748 {
1749  if (getControler()->removeMarkedEdgesWithoutDisconnection()) repaint();
1750  else updateStatusBar() ;
1751 }
1752 
1754 {
1755  if (getControler()->removeMarkedFacesButKeepBalls()) repaint();
1756  else updateStatusBar() ;
1757 }
1758 
1761 {
1762  if (getControler() -> shiftAllEdgesIncidentToVertex()) repaint() ;
1763  else updateStatusBar() ;
1764 }
1765 
1768 {
1769  if (getControler() -> removeDanglingEdges()) repaint() ;
1770  else updateStatusBar() ;
1771 }
1772 
1774 {
1775  if (getControler() -> simplify2DObject()) repaint() ;
1776  else updateStatusBar() ;
1777 }
1778 
1780 {
1781  if (getControler() -> simplify3DObject()) repaint() ;
1782  else updateStatusBar() ;
1783 }
1784 
1785 // -- Contracter
1787 {
1788  if (getControler() -> contextContract()) repaint() ;
1789  else updateStatusBar() ;
1790 }
1791 
1793 {
1794  if (getControler() -> contract(1)) repaint() ;
1795  else updateStatusBar() ;
1796 }
1797 
1799 {
1800  if (getControler() -> contract(2)) repaint() ;
1801  else updateStatusBar() ;
1802 }
1803 
1805 {
1806  if (getControler() -> contract(3)) repaint() ;
1807  else updateStatusBar() ;
1808 }
1809 
1811 {
1812  if (getControler() -> delNullEdges()) repaint() ;
1813  else updateStatusBar() ;
1814 }
1815 
1817 {
1818  if (getControler() -> delFlatFaces()) repaint() ;
1819  else updateStatusBar() ;
1820 }
1821 
1823 {
1824  if (getControler() -> delFlatVolumes()) repaint() ;
1825  else updateStatusBar() ;
1826 }
1827 
1828 // -- Inserer
1830 {
1831  if (getControler() -> insertVertex()) repaint() ;
1832  else updateStatusBar() ;
1833 }
1834 
1836 {
1837  if (getControler() -> insertEdge()) repaint() ;
1838  else updateStatusBar() ;
1839 }
1840 
1842 {
1843  if (getControler() -> insertFace()) repaint() ;
1844  else updateStatusBar() ;
1845 }
1846 
1847 // -- Fermer
1849 {
1850  if (getControler() -> intuitiveStopUp()) repaint() ;
1851  else updateStatusBar() ;
1852 }
1853 
1855 {
1856  if (getControler() -> stopUp(0)) repaint() ;
1857  else updateStatusBar() ;
1858 }
1859 
1861 {
1862  if (getControler() -> stopUp(1)) repaint() ;
1863  else updateStatusBar() ;
1864 }
1865 
1867 {
1868  if (getControler() -> stopUp(2)) repaint() ;
1869  else updateStatusBar() ;
1870 }
1871 
1873 {
1874  if (getControler() -> stopUp(3)) repaint() ;
1875  else updateStatusBar() ;
1876 }
1877 
1878 // -- Trianguler
1880 {
1881  if (getControler() -> contextTriangulate()) repaint() ;
1882  else updateStatusBar() ;
1883 }
1884 
1886 {
1887  if (getControler() -> triangulate(1)) repaint() ;
1888  else updateStatusBar() ;
1889 }
1890 
1892 {
1893  if (getControler() -> triangulate(2)) repaint() ;
1894  else updateStatusBar() ;
1895 }
1896 
1898 {
1899  if (getControler() -> triangulate(3)) repaint() ;
1900  else updateStatusBar() ;
1901 }
1902 
1904 {
1905  if (getControler() -> swapEdge()) repaint() ;
1906  else updateStatusBar() ;
1907 }
1908 
1910 {
1911  if (getControler() -> triangulateGeoFaces()) repaint() ;
1912  else updateStatusBar() ;
1913 }
1914 
1915 
1916 // -- Quadranguler
1918 {
1919  if (getControler() -> quadrangulateFaces()) repaint() ;
1920  else updateStatusBar() ;
1921 }
1922 
1924 {
1925  if (getControler() -> basicQuadrangulateFaces()) repaint() ;
1926  else updateStatusBar() ;
1927 }
1928 
1929 // -- Calculer Dual
1931 {
1932  if (getControler() -> dual2d()) repaint() ;
1933  else updateStatusBar() ;
1934 }
1935 
1937 {
1938  if (getControler() -> dual3d()) repaint() ;
1939  else updateStatusBar() ;
1940 }
1941 
1942 // -- Extruder
1944 {
1945  if (getControler() -> intuitiveExtrudeByNormal()) repaint() ;
1946  else updateStatusBar() ;
1947 }
1948 
1950 {
1951  if (getControler() -> extrudeByNormal(0)) repaint() ;
1952  else updateStatusBar() ;
1953 }
1954 
1956 {
1957  if (getControler() ->extrudeByNormal(1)) repaint() ;
1958  else updateStatusBar() ;
1959 }
1960 
1962 {
1963  if (getControler() -> extrudeByNormal(2)) repaint() ;
1964  else updateStatusBar() ;
1965 }
1966 
1968 {
1969  if (getControler() -> extrudeByPath(1)) repaint() ;
1970  else updateStatusBar() ;
1971 }
1972 
1974 {
1975  if (getControler() -> extrudeByPath(2)) repaint() ;
1976  else updateStatusBar() ;
1977 }
1978 
1980 {
1981  if (getControler() -> extrudeByRevolution(1)) repaint() ;
1982  else updateStatusBar() ;
1983 }
1984 
1986 {
1987  if (getControler() -> extrudeByRevolution(2)) repaint() ;
1988  else updateStatusBar() ;
1989 }
1990 
1992 {
1993  if (getControler() -> thicken()) repaint() ;
1994  else updateStatusBar() ;
1995 }
1996 
1997 //--------------------------------------------------------------------
1998 // -- Interpoler
2000 {
2001 #ifdef MODULE_MESH
2002  if (getControler() -> meshEdges()) repaint() ;
2003  else updateStatusBar() ;
2004 #endif //MODULE_MESH
2005 }
2007 {
2008 #ifdef MODULE_MESH
2009  callbackMeshSquare(0 , 1) ;
2010 #endif //MODULE_MESH
2011 }
2012 
2014 {
2015 #ifdef MODULE_MESH
2016  callbackMeshSquare(0 , 2) ;
2017 #endif //MODULE_MESH
2018 }
2019 
2021 {
2022 #ifdef MODULE_MESH
2023  callbackMeshSquare(1 , 2) ;
2024 #endif //MODULE_MESH
2025 }
2026 
2027 void Window::callbackMeshSquare(int i , int j)
2028 {
2029 #ifdef MODULE_MESH
2030  if (getControler() -> meshSquares(i , j)) repaint() ;
2031  else updateStatusBar() ;
2032 #endif //MODULE_MESH
2033 }
2034 
2036 {
2037 #ifdef MODULE_MESH
2038  callbackMeshCube(0 , 1) ;
2039 #endif //MODULE_MESH
2040 }
2041 
2043 {
2044 #ifdef MODULE_MESH
2045  callbackMeshCube(0 , 2) ;
2046 #endif //MODULE_MESH
2047 }
2048 
2050 {
2051 #ifdef MODULE_MESH
2052  callbackMeshCube(0 , 3) ;
2053 #endif //MODULE_MESH
2054 }
2055 
2057 {
2058 #ifdef MODULE_MESH
2059  callbackMeshCube(1 , 2) ;
2060 #endif //MODULE_MESH
2061 }
2062 
2064 {
2065 #ifdef MODULE_MESH
2066  callbackMeshCube(1 , 3) ;
2067 #endif //MODULE_MESH
2068 }
2069 
2071 {
2072 #ifdef MODULE_MESH
2073  callbackMeshCube(2 , 3) ;
2074 #endif //MODULE_MESH
2075 }
2076 
2077 void Window::callbackMeshCube(int i , int j)
2078 {
2079 #ifdef MODULE_MESH
2080  if (getControler() -> meshCubes(i , j)) repaint() ;
2081  else updateStatusBar() ;
2082 #endif //MODULE_MESH
2083 }
2084 // -- Lisser
2086 {
2087 #ifdef MODULE_MESH
2088  if (getControler() -> smoothEdges()) repaint() ;
2089  else updateStatusBar();
2090 #endif //MODULE_MESH
2091 }
2092 
2094 {
2095 #ifdef MODULE_MESH
2096  if (getControler() -> smoothSquares()) repaint() ;
2097  else updateStatusBar();
2098 #endif //MODULE_MESH
2099 }
2100 
2102 {
2103 #ifdef MODULE_MESH
2104  if (getControler() -> smoothCubes()) repaint() ;
2105  else updateStatusBar();
2106 #endif //MODULE_MESH
2107 }
2108 //------------------------------------------------------------------------------
2109 // -- Arrondir
2111 {
2112 #ifdef MODULE_ROUNDING
2113  roundVertices(false);
2114 #endif // MODULE_ROUNDING
2115 }
2116 
2118 {
2119 #ifdef MODULE_ROUNDING
2120  roundVertices(true);
2121 #endif // MODULE_ROUNDING
2122 }
2123 
2124 void Window::roundVertices(bool ADig)
2125 {
2126 #ifdef MODULE_ROUNDING
2127  if (getControler() -> roundVertices(ADig)) repaint() ;
2128  else updateStatusBar() ;
2129 #endif // MODULE_ROUNDING
2130 }
2131 
2133 {
2134 #ifdef MODULE_ROUNDING
2135  roundEdges(false, false, false);
2136 #endif // MODULE_ROUNDING
2137 }
2138 
2140 {
2141 #ifdef MODULE_ROUNDING
2142  roundEdges(false, true, false);
2143 #endif // MODULE_ROUNDING
2144 }
2145 
2147 {
2148 #ifdef MODULE_ROUNDING
2149  roundEdges(true, false, false);
2150 #endif // MODULE_ROUNDING
2151 }
2152 
2154 {
2155 #ifdef MODULE_ROUNDING
2156  roundEdges(true, true, false);
2157 #endif // MODULE_ROUNDING
2158 }
2159 
2161 {
2162 #ifdef MODULE_ROUNDING
2163  roundEdges(false, false, true);
2164 #endif // MODULE_ROUNDING
2165 }
2166 
2168 {
2169 #ifdef MODULE_ROUNDING
2170  roundEdges(false, true, true);
2171 #endif // MODULE_ROUNDING
2172 }
2173 
2175 {
2176 #ifdef MODULE_ROUNDING
2177  roundEdges(true, false, true);
2178 #endif // MODULE_ROUNDING
2179 }
2180 
2182 {
2183 #ifdef MODULE_ROUNDING
2184  roundEdges(true, true, true);
2185 #endif // MODULE_ROUNDING
2186 }
2187 
2188 void Window::roundEdges(bool A3D, bool ADig, bool ASetback)
2189 {
2190 #ifdef MODULE_ROUNDING
2191  if (getControler() -> roundEdges(A3D, ADig, ASetback)) repaint() ;
2192  else updateStatusBar() ;
2193 #endif // MODULE_ROUNDING
2194 }
2195 //#endif // MODULE_ROUNDING
2196 //------------------------------------------------------------------------------
2197 // -- Triangulation
2199 {
2200 #ifdef MODULE_TRIANGULATION
2201  if (getControler() -> triangulateTopoFaces()) repaint() ;
2202  else updateStatusBar() ;
2203 #endif // MODULE_TRIANGULATION
2204 }
2205 
2207 {
2208 #ifdef MODULE_TRIANGULATION
2209  if (getControler() -> markNonUniformFaces()) repaint() ;
2210  else updateStatusBar() ;
2211 #endif // MODULE_TRIANGULATION
2212 }
2213 
2215 {
2216 #ifdef MODULE_TRIANGULATION
2217  if (getControler() -> optimizeSelectedEdges()) repaint() ;
2218  else updateStatusBar() ;
2219 #endif // MODULE_TRIANGULATION
2220 }
2221 
2223 {
2224 #ifdef MODULE_TRIANGULATION
2225  if (getControler() -> createDelaunayTriangulation()) repaint() ;
2226  else updateStatusBar() ;
2227 #endif // MODULE_TRIANGULATION
2228 }
2229 
2231 {
2232 #ifdef MODULE_TRIANGULATION
2233  if (getControler() -> createOptimizedDelaunayTriangulation()) repaint() ;
2234  else updateStatusBar() ;
2235 #endif // MODULE_TRIANGULATION
2236 }
2237 //------------------------------------------------------------------------------
2238 // -- Co-raffiner
2240 {
2241 #ifdef MODULE_COREFINEMENT
2242  if (getControler() ->corefine2dSegmentsSweeping()) repaint() ;
2243  else updateStatusBar() ;
2244 #endif // COREFINEMENT
2245 }
2246 
2248 {
2249 #ifdef MODULE_COREFINEMENT
2250  if (getControler() ->corefine2dSegmentsPropagation()) repaint() ;
2251  else updateStatusBar() ;
2252 #endif // COREFINEMENT
2253 }
2254 
2256 {
2257 #ifdef MODULE_COREFINEMENT
2258  if (getControler() ->booleanOperations2d()) repaint() ;
2259  else updateStatusBar() ;
2260 #endif // COREFINEMENT
2261 }
2262 
2264 {
2265 #ifdef MODULE_COREFINEMENT
2266  if (getControler() ->corefine3dMeshes()) repaint() ;
2267  else updateStatusBar() ;
2268 #endif // COREFINEMENT
2269 }
2270 
2272 {
2273 #ifdef MODULE_COREFINEMENT
2274  if (getControler() ->corefine3dFaces()) repaint() ;
2275  else updateStatusBar() ;
2276 #endif // COREFINEMENT
2277 }
2278 
2280 {
2281 #ifdef MODULE_COREFINEMENT
2282  if (getControler() ->corefineMarked3dFaces()) repaint() ;
2283  else updateStatusBar() ;
2284 #endif // COREFINEMENT
2285 }
2286 
2288 {
2289 #ifdef MODULE_COREFINEMENT
2290  if (getControler() ->corefineMarked3dMeshesWith()) repaint() ;
2291  else updateStatusBar() ;
2292 #endif // COREFINEMENT
2293 }
2294 
2296 {
2297 #ifdef MODULE_COREFINEMENT
2298  if (getControler() ->booleanOperations3d()) repaint() ;
2299  else updateStatusBar() ;
2300 #endif // COREFINEMENT
2301 }
2302 //------------------------------------------------------------------------------
2303 //- GEOLOGIE
2305 {
2306 #ifdef MODULE_GEOLOGY
2307  if (getControler() ->createUncertainZone()) repaint() ;
2308  else updateStatusBar() ;
2309 #endif // MODULE_GEOLOGY
2310 }
2311 
2313 {
2314 #ifdef MODULE_GEOLOGY
2315  if (getControler() ->createNearestIntersections()) repaint() ;
2316  else updateStatusBar() ;
2317 #endif // MODULE_GEOLOGY
2318 }
2319 
2321 {
2322 #ifdef MODULE_GEOLOGY
2323  if (getControler() ->extendSelectedBorders()) repaint() ;
2324  else updateStatusBar() ;
2325 #endif // MODULE_GEOLOGY
2326 }
2327 
2329 {
2330 #ifdef MODULE_GEOLOGY
2331  if (getControler() ->extendSelectedBordersToSurface()) repaint() ;
2332  else updateStatusBar() ;
2333 #endif // MODULE_GEOLOGY
2334 }
2335 
2337 {
2338 #ifdef MODULE_GEOLOGY
2339  if (getControler() ->smoothSelection()) repaint() ;
2340  else updateStatusBar() ;
2341 #endif // MODULE_GEOLOGY
2342 }
2343 
2345 {
2346 #ifdef MODULE_GEOLOGY
2347  if (getControler() ->relaxSelection()) repaint() ;
2348  else updateStatusBar() ;
2349 #endif // MODULE_GEOLOGY
2350 }
2351 
2353 {
2354 #ifdef MODULE_GEOLOGY
2355  if (getControler() ->simplifyMesh()) repaint() ;
2356  else updateStatusBar() ;
2357 #endif // MODULE_GEOLOGY
2358 }
2359 
2361 {
2362 #ifdef MODULE_GEOLOGY
2363  if (getControler() ->centerSelection()) repaint() ;
2364  else updateStatusBar() ;
2365 #endif // MODULE_GEOLOGY
2366 }
2367 
2369 {
2370 #ifdef MODULE_GEOLOGY
2371  if (getControler() ->plateVerticesOnFaces()) repaint() ;
2372  else updateStatusBar() ;
2373 #endif // MODULE_GEOLOGY
2374 }
2375 
2377 {
2378 #ifdef MODULE_GEOLOGY
2379  if (getControler() ->plateVerticesOnEdges()) repaint() ;
2380  else updateStatusBar() ;
2381 #endif // MODULE_GEOLOGY
2382 }
2383 
2385 {
2386 #ifdef MODULE_GEOLOGY
2387  if (getControler() ->plateVerticesOnVertices()) repaint() ;
2388  else updateStatusBar() ;
2389 #endif // MODULE_GEOLOGY
2390 }
2391 
2393 {
2394 #ifdef MODULE_GEOLOGY
2395  if (getControler() ->selectMacroVertices()) repaint() ;
2396  else updateStatusBar() ;
2397 #endif // MODULE_GEOLOGY
2398 }
2399 
2401 {
2402 #ifdef MODULE_GEOLOGY
2403  if (getControler() ->selectAllMacroEdges()) repaint() ;
2404  else updateStatusBar() ;
2405 #endif // MODULE_GEOLOGY
2406 }
2407 
2409 {
2410 #ifdef MODULE_GEOLOGY
2411  if (getControler() ->selectMacroEdges()) repaint() ;
2412  else updateStatusBar() ;
2413 #endif // MODULE_GEOLOGY
2414 }
2415 
2417 {
2418 #ifdef MODULE_GEOLOGY
2419  if (getControler() ->selectMacroFaces()) repaint() ;
2420  else updateStatusBar() ;
2421 #endif // MODULE_GEOLOGY
2422 }
2423 
2425 {
2426 #ifdef MODULE_GEOLOGY
2427  if (getControler() ->selectBordersBetweenSelectedDarts()) repaint() ;
2428  else updateStatusBar() ;
2429 #endif // MODULE_GEOLOGY
2430 }
2431 
2433 {
2434 #ifdef MODULE_GEOLOGY
2435  // Si il y a une fenetre de creation ou d'operation
2436  // deja ouverte, on la ferme
2437  if (FCreationActive != NULL)
2438  {
2439  FCreationActive -> cancel() ;
2440  FCreationActive = NULL ;
2441  }
2442  else if (FOperationActive != NULL)
2443  {
2444  FOperationActive -> close() ;
2445  FOperationActive = NULL ;
2446  }
2447  else if (FMeshActive != NULL)
2448  {
2449  FMeshActive -> reject() ;
2450  FMeshActive = NULL ;
2451  }
2452 
2453  FMeshActive = new MeshHolesGestion(this , getControler()) ;
2454  FMeshActive -> show() ;
2455  updateStatusBar();
2456 #endif // MODULE_GEOLOGY
2457 }
2458 
2460 {
2461 #ifdef MODULE_GEOLOGY
2462  if (getControler() ->triangulateHoles()) repaint() ;
2463  else updateStatusBar() ;
2464 #endif // MODULE_GEOLOGY
2465 }
2466 
2468 {
2469 #ifdef MODULE_GEOLOGY
2470  if (getControler() ->fillHolesOnMeshes()) repaint() ;
2471  else updateStatusBar() ;
2472 #endif // MODULE_GEOLOGY
2473 }
2474 
2476 {
2477 #ifdef MODULE_GEOLOGY
2478  // Si il y a une fenetre de creation ou d'operation
2479  // deja ouverte, on la ferme
2480  if (FCreationActive != NULL)
2481  {
2482  FCreationActive -> cancel() ;
2483  FCreationActive = NULL ;
2484  }
2485  else if (FOperationActive != NULL)
2486  {
2487  FOperationActive -> close() ;
2488  FOperationActive = NULL ;
2489  }
2490  else if (FMeshActive != NULL)
2491  {
2492  FMeshActive -> reject() ;
2493  FMeshActive = NULL ;
2494  }
2495 
2496  FMeshActive = new MeshFailleGestion(this , getControler()) ;
2497  FMeshActive -> show() ;
2498  updateStatusBar();
2499 #endif // MODULE_GEOLOGY
2500 }
2501 
2503 {
2504 #ifdef MODULE_GEOLOGY
2505  if (getControler() ->extractDetectedFailles()) repaint() ;
2506  else updateStatusBar() ;
2507 #endif // MODULE_GEOLOGY
2508 }
2509 
2511 {
2512 #ifdef MODULE_GEOLOGY
2513  // Si il y a une fenetre de creation ou d'operation
2514  // deja ouverte, on la ferme
2515  if (FCreationActive != NULL)
2516  {
2517  FCreationActive -> cancel() ;
2518  FCreationActive = NULL ;
2519  }
2520  else if (FOperationActive != NULL)
2521  {
2522  FOperationActive -> close() ;
2523  FOperationActive = NULL ;
2524  }
2525  else if (FMeshActive != NULL)
2526  {
2527  FMeshActive -> reject() ;
2528  FMeshActive = NULL ;
2529  }
2530 
2531  FMeshActive = new MeshExtension(this , getControler()) ;
2532  FMeshActive -> show() ;
2533  updateStatusBar();
2534 #endif // MODULE_GEOLOGY
2535 }
2536 /*
2537 void Window :: callbackGetIntersectionSurface ( )
2538 {
2539 #ifdef MODULE_GEOLOGY
2540  if (getControler ( ) ->getIntersectionSurface ( ) ) repaint ( ) ;
2541  else updateStatusBar ( ) ;
2542 #endif // MODULE_GEOLOGY
2543 }*/
2544 
2546 {
2547 #ifdef MODULE_GEOLOGY
2548  // Si il y a une fenetre de creation ou d'operation
2549  // deja ouverte, on la ferme
2550  if (FCreationActive != NULL)
2551  {
2552  FCreationActive -> cancel() ;
2553  FCreationActive = NULL ;
2554  }
2555  else if (FOperationActive != NULL)
2556  {
2557  FOperationActive -> close() ;
2558  FOperationActive = NULL ;
2559  }
2560  else if (FMeshActive != NULL)
2561  {
2562  FMeshActive -> reject() ;
2563  FMeshActive = NULL ;
2564  }
2565 
2566  FMeshActive = new MeshSimplification(this , getControler()) ;
2567  FMeshActive -> show() ;
2568  updateStatusBar();
2569 #endif // MODULE_GEOLOGY
2570 }
2571 
2572 /*void Window :: callbackCollapseEdge ( )
2573 {
2574 #ifdef MODULE_GEOLOGY
2575  if (getControler ( ) ->collapseEdge ( ) ) repaint ( ) ;
2576  else updateStatusBar ( ) ;
2577 #endif // MODULE_GEOLOGY
2578 }
2579 
2580 void Window :: callbackRemoveVertex ( )
2581 {
2582 #ifdef MODULE_GEOLOGY
2583  if (getControler ( ) ->removeVertex ( ) ) repaint ( ) ;
2584  else updateStatusBar ( ) ;
2585 #endif // MODULE_GEOLOGY
2586 }
2587 */
2588 
2590 {
2591 #ifdef MODULE_GEOLOGY
2592  char* filename = getOpenFileName("Importer Gr2D") ;
2593  if (filename != NULL)
2594  {
2595  if (getControler() -> importGr2d(filename)) repaint() ;
2596  else updateStatusBar() ;
2597  }
2598 #endif // MODULE_GEOLOGY
2599 }
2600 
2602 {
2603 #ifdef MODULE_GEOLOGY
2604  char* filename = getOpenFileName("Importer XYZ") ;
2605  if (filename != NULL)
2606  {
2607  if (getControler() -> importXyz(filename)) repaint() ;
2608  else updateStatusBar() ;
2609  }
2610 #endif // MODULE_GEOLOGY
2611 
2612 }
2613 
2615 {
2616 #ifdef MODULE_GEOLOGY
2617 
2618  char* filename = getOpenFileName("Importer TS") ;
2619  if (filename != NULL)
2620  {
2621  if (getControler() -> importTs(filename)) repaint() ;
2622  else updateStatusBar() ;
2623  }
2624 #endif // MODULE_GEOLOGY
2625 }
2626 
2628 {
2629 #ifdef MODULE_GEOLOGY
2630  char* filename = getOpenFileName("Importer Nuage de point") ;
2631  if (filename != NULL)
2632  {
2633  if (getControler() -> importCloud(filename)) repaint() ;
2634  else updateStatusBar() ;
2635  }
2636 #endif // MODULE_GEOLOGY
2637 }
2638 
2640 {
2641 #ifdef MODULE_GEOLOGY
2642 
2643  char* filename = getOpenFileName("Importer VRML") ;
2644 
2645  if (filename != NULL)
2646  {
2647  if (getControler() -> importVrml(filename)) repaint() ;
2648  else updateStatusBar() ;
2649  }
2650 #endif // MODULE_GEOLOGY
2651 }
2652 
2654 {
2655 #ifdef MODULE_GEOLOGY
2656 
2657  char* filename = getSaveFileName("Exporter TS") ;
2658 
2659  if (filename != NULL)
2660  {
2661  if (getControler() -> exportTs(filename)) repaint() ;
2662  else updateStatusBar() ;
2663  }
2664 #endif // MODULE_GEOLOGY
2665 }
2666 
2668 {
2669 #ifdef MODULE_GEOLOGY
2670 // string filename = fileSelection->get_filename ( ) ;
2671 // if (getControler ( ) ->importGr2d(filename.c_str ( ) )) repaint ( ) ;
2672  // else updateStatusBar ( ) ;
2673 #endif // MODULE_GEOLOGY
2674 }
2675 
2677 {
2678 #ifdef MODULE_GEOLOGY
2679 // string filename = fileSelection->get_filename ( ) ;
2680 // if (getControler ( ) ->importXyz(filename.c_str ( ) )) repaint ( ) ;
2681 // else updateStatusBar ( ) ;
2682 #endif // MODULE_GEOLOGY
2683 }
2684 
2686 {
2687 #ifdef MODULE_GEOLOGY
2688 // string filename = fileSelection->get_filename ( ) ;
2689 // if (getControler ( ) ->importTs(filename.c_str ( ) )) repaint ( ) ;
2690 // else updateStatusBar ( ) ;
2691 #endif // MODULE_GEOLOGY
2692 }
2693 
2695 {
2696 #ifdef MODULE_GEOLOGY
2697 // string filename = fileSelection->get_filename ( ) ;
2698 // if (getControler ( ) ->importCloud(filename.c_str ( ) )) repaint ( ) ;
2699  //else updateStatusBar ( ) ;
2700 #endif // MODULE_GEOLOGY
2701 }
2702 
2703 //***************************************
2704 // Slots Menu Materialiser
2705 //***************************************
2707 {
2708  if (getControler() ->materializeBarycenter()) repaint() ;
2709  else updateStatusBar() ;
2710 }
2711 
2713 {
2714  if (getControler() ->materializeAxe()) repaint() ;
2715  else updateStatusBar() ;
2716 }
2717 
2719 {
2720  if (getControler() ->materializePlane()) repaint() ;
2721  else updateStatusBar() ;
2722 }
2723 
2725 {
2726  if (getControler() ->materializeNormalVector()) repaint() ;
2727  else updateStatusBar() ;
2728 }
2729 
2731 {
2732  if (getControler() ->materializeOrthoPlane()) repaint() ;
2733  else updateStatusBar() ;
2734 }
2735 
2737 {
2738  if (getControler() ->materializeReferential()) repaint() ;
2739  else updateStatusBar() ;
2740 }
2741 
2742 //***************************************
2743 // Slots Menu Selection
2744 //***************************************
2746 {
2747  if (getControler() -> unmarkAllCurrentSelectionLevel()) repaint() ;
2748  else updateStatusBar() ;
2749 }
2750 
2752 {
2753  if (getControler() -> negateAllCurrentSelectionLevel()) repaint() ;
2754  else updateStatusBar() ;
2755 }
2756 
2758 {
2759  if (getControler() -> swapCurrentSelectionLevelWithNext()) repaint() ;
2760  else updateStatusBar() ;
2761 }
2762 
2764 {
2765  if (getControler() -> duplicateSelection()) repaint() ;
2766  else updateStatusBar() ;
2767 }
2768 
2770 {
2771  if (getControler() -> deleteSelection()) repaint() ;
2772  else updateStatusBar() ;
2773 }
2774 
2776 {
2777  if (getControler() -> goForward1()) repaint() ;
2778  else updateStatusBar() ;
2779 }
2780 
2782 {
2783  if (getControler() -> goBackward1()) repaint() ;
2784  else updateStatusBar();
2785 }
2786 
2788 {
2789  if (getControler() -> goLeft1()) repaint() ;
2790  else updateStatusBar();
2791 }
2792 
2794 {
2795  if (getControler() -> goRight1()) repaint() ;
2796  else updateStatusBar();
2797 }
2799 {
2800  if (getControler() -> goForward1Rep()) repaint() ;
2801  else updateStatusBar();
2802 }
2803 
2805 {
2806  if (getControler() -> goBackward1Rep()) repaint() ;
2807  else updateStatusBar();
2808 }
2809 
2811 {
2812  if (getControler() -> goLeft1Rep()) repaint() ;
2813  else updateStatusBar();
2814 }
2815 
2817 {
2818  if (getControler() -> goRight1Rep()) repaint() ;
2819  else updateStatusBar();
2820 }
2821 
2823 {
2824  if (getControler() -> goForward0()) repaint() ;
2825  else updateStatusBar();
2826 }
2827 
2829 {
2830  if (getControler() -> goBackward0()) repaint() ;
2831  else updateStatusBar();
2832 }
2833 
2835 {
2836  if (getControler() -> goLeft0()) repaint() ;
2837  else updateStatusBar();
2838 }
2839 
2841 {
2842  if (getControler() -> goRight1()) repaint() ;
2843  else updateStatusBar();
2844 }
2845 
2847 {
2848  if (getControler() -> goForward0Rep()) repaint() ;
2849  else updateStatusBar();
2850 }
2851 
2853 {
2854  if (getControler() -> goBackward0Rep()) repaint() ;
2855  else updateStatusBar();
2856 }
2857 
2859 {
2860  if (getControler() -> goLeft0Rep()) repaint() ;
2861  else updateStatusBar();
2862 }
2863 
2865 {
2866  if (getControler() -> goRight0Rep()) repaint() ;
2867  else updateStatusBar();
2868 }
2869 
2871 {
2872  if (getControler() ->markInterior(2)) repaint() ;
2873  else updateStatusBar() ;
2874 }
2875 
2877 {
2878  if (getControler() ->markInterior(3)) repaint() ;
2879  else updateStatusBar() ;
2880 }
2881 
2883 {
2884  if (getControler() ->intuitiveSelectBorders()) repaint() ;
2885  else updateStatusBar() ;
2886 }
2887 
2889 {
2890  if (getControler() ->selectBorders(0)) repaint() ;
2891  else updateStatusBar() ;
2892 }
2893 
2895 {
2896  if (getControler() ->selectBorders(1)) repaint() ;
2897  else updateStatusBar() ;
2898 }
2899 
2901 {
2902  if (getControler() ->selectBorders(2)) repaint() ;
2903  else updateStatusBar() ;
2904 }
2905 
2907 {
2908  if (getControler() ->selectBorders(3)) repaint() ;
2909  else updateStatusBar() ;
2910 }
2911 
2913 {
2914  if (getControler() ->selectNonPlanarFaces()) repaint() ;
2915  else updateStatusBar() ;
2916 }
2917 
2919 {
2920  if (getControler() ->selectIncidents()) repaint() ;
2921  else updateStatusBar() ;
2922 }
2923 
2925 {
2926  if (getControler() ->goAlpha0()) repaint() ;
2927  else updateStatusBar() ;
2928 }
2930 {
2931  if (getControler() ->goAlpha1()) repaint() ;
2932  else updateStatusBar() ;
2933 }
2935 {
2936  if (getControler() ->goAlpha2()) repaint() ;
2937  else updateStatusBar() ;
2938 }
2940 {
2941  if (getControler() ->goAlpha3()) repaint() ;
2942  else updateStatusBar() ;
2943 }
2944 //***************************************
2945 // Slots Menu Vues
2946 //***************************************
2948 {
2949  FWorkspace -> tile() ;
2950 }
2951 
2953 {
2954  FWorkspace -> cascade() ;
2955 }
2956 
2958 {
2959  GLWindow * vue = new GLWindow(VIEW_XYZ , FWorkspace ,
2960  this , FVueMere , FSelection) ;
2961  vue -> setMinimumSize(200 , 200) ;
2962  vue -> show() ;
2963 }
2964 
2966 {
2967  GLMultiWindow * vue = new GLMultiWindow(FWorkspace , this , FVueMere,
2968  FSelection) ;
2969  vue -> setMinimumSize(200 , 200) ;
2970  vue -> show() ;
2971 }
2972 
2974 {
2975  GLWindow * vue = new GLWindow(VIEW_XY , FWorkspace ,
2976  this , FVueMere , FSelection) ;
2977  vue -> setMinimumSize(200 , 200) ;
2978  vue -> show() ;
2979 }
2980 
2982 {
2983  GLWindow * vue = new GLWindow(VIEW_YZ , FWorkspace ,
2984  this , FVueMere , FSelection) ;
2985  vue -> setMinimumSize(200 , 200) ;
2986  vue -> show() ;
2987 }
2988 
2990 {
2991  GLWindow * vue = new GLWindow(VIEW_XZ , FWorkspace ,
2992  this , FVueMere , FSelection) ;
2993  vue -> setMinimumSize(200 , 200) ;
2994  vue -> show() ;
2995 }
2996 
2998 {
2999  bascule(VIEW_XYZ) ;
3000 }
3001 
3003 {
3004  bascule(VIEW_XY) ;
3005 }
3006 
3008 {
3009  bascule(VIEW_YZ) ;
3010 }
3011 
3013 {
3014  bascule(VIEW_XZ) ;
3015 }
3016 
3018 {
3019  bascule(VIEW_ISO) ;
3020 }
3021 
3023 {
3024  GLWindow * active = ((GLWindow *) FWorkspace -> activeWindow()) ;
3025  active -> closeEvent(NULL) ;
3026 }
3027 
3029 {
3030  FControler -> viewUngroupAll() ;
3031  repaint() ;
3032 }
3033 
3035 {
3036  FControler -> viewUngroupAllPrecompiles() ;
3037  repaint() ;
3038 }
3039 
3041 {
3042  FControler -> viewUngroupAllParameter(PARAMETER_EYE_POSITION) ;
3043  repaint() ;
3044 }
3045 
3047 {
3048  FControler -> viewUngroupAllParameter(PARAMETER_AIMED_POSITION) ;
3049  repaint() ;
3050 }
3051 
3053 {
3054  FControler -> viewUngroupAllParameter(PARAMETER_DRAWING) ;
3055  repaint() ;
3056 }
3057 
3059 {
3060  GLWindow * active = ((GLWindow *) FWorkspace -> activeWindow()) ;
3061  FControler -> viewUngroup(active -> getCliquedViewId()) ;
3062  repaint() ;
3063 }
3064 
3066 {
3067  GLWindow * active = ((GLWindow *) FWorkspace -> activeWindow()) ;
3068  FControler -> viewUngroupPrecompiles(active -> getCliquedViewId()) ;
3069  repaint() ;
3070 }
3071 
3073 {
3074  GLWindow * active = ((GLWindow *) FWorkspace -> activeWindow()) ;
3075  FControler -> viewUngroupParameter(active -> getCliquedViewId() ,
3076  PARAMETER_EYE_POSITION) ;
3077  repaint() ;
3078 }
3079 
3081 {
3082  GLWindow * active = ((GLWindow *) FWorkspace -> activeWindow()) ;
3083  FControler -> viewUngroupParameter(active -> getCliquedViewId() ,
3084  PARAMETER_AIMED_POSITION) ;
3085  repaint() ;
3086 }
3087 
3089 {
3090  GLWindow * active = ((GLWindow *) FWorkspace -> activeWindow()) ;
3091  FControler -> viewUngroupParameter(active -> getCliquedViewId() ,
3092  PARAMETER_DRAWING) ;
3093  repaint() ;
3094 }
3095 
3097 {
3098  GLWindow * active = ((GLWindow *) FWorkspace -> activeWindow()) ;
3099  FControler -> viewGroupAll(active -> getCliquedViewId()) ;
3100  repaint() ;
3101 }
3102 
3104 {
3105  GLWindow * active = ((GLWindow *) FWorkspace -> activeWindow()) ;
3106  FControler -> viewGroupAllPrecompiles(active -> getCliquedViewId()) ;
3107  repaint() ;
3108 }
3109 
3111 {
3112  GLWindow * active = ((GLWindow *) FWorkspace -> activeWindow()) ;
3113  FControler -> viewGroupAllParameter(active -> getCliquedViewId() ,
3114  PARAMETER_EYE_POSITION) ;
3115  repaint() ;
3116 }
3117 
3119 {
3120  GLWindow * active = ((GLWindow *) FWorkspace -> activeWindow()) ;
3121  FControler -> viewGroupAllParameter(active -> getCliquedViewId() ,
3122  PARAMETER_AIMED_POSITION) ;
3123  repaint() ;
3124 }
3125 
3127 {
3128  GLWindow * active = ((GLWindow *) FWorkspace -> activeWindow()) ;
3129  FControler -> viewGroupAllParameter(active -> getCliquedViewId() ,
3130  PARAMETER_DRAWING) ;
3131  repaint() ;
3132 }
3133 
3135 {
3136  GLWindow * active = ((GLWindow *) FWorkspace -> activeWindow()) ;
3137  FControler -> viewGroup(active -> getCliquedViewId(),
3138  FDoubleCliquee -> getDoubleCliquedViewId());
3139  repaint() ;
3140 }
3141 
3143 {
3144  GLWindow * active = ((GLWindow *) FWorkspace -> activeWindow()) ;
3145  FControler->viewGroupPrecompiles(active -> getCliquedViewId(),
3146  FDoubleCliquee->getDoubleCliquedViewId());
3147  repaint() ;
3148 }
3149 
3151 {
3152  GLWindow * active = ((GLWindow *) FWorkspace -> activeWindow()) ;
3153  FControler -> viewGroupParameter(active -> getCliquedViewId() ,
3154  FDoubleCliquee -> getDoubleCliquedViewId(),
3155  PARAMETER_EYE_POSITION) ;
3156  repaint() ;
3157 }
3158 
3160 {
3161  GLWindow * active = ((GLWindow *) FWorkspace -> activeWindow()) ;
3162  FControler -> viewGroupParameter(active -> getCliquedViewId() ,
3163  FDoubleCliquee -> getDoubleCliquedViewId(),
3164  PARAMETER_AIMED_POSITION) ;
3165  repaint() ;
3166 }
3167 
3169 {
3170  GLWindow * active = ((GLWindow *) FWorkspace -> activeWindow()) ;
3171  FControler -> viewGroupParameter(active -> getCliquedViewId() ,
3172  FDoubleCliquee -> getDoubleCliquedViewId(),
3173  PARAMETER_DRAWING) ;
3174  repaint() ;
3175 }
3176 
3178 {
3179  if (getControler()->lookAtOrigin(getCurrentViewId()))
3180  repaint();
3181  else updateStatusBar();
3182 }
3183 
3185 {
3186  if (getControler()->lookAtFaceBary(getCurrentViewId()))
3187  repaint();
3188  else updateStatusBar() ;
3189 }
3190 
3192 {
3193  if (getControler()->lookAtLast(getCurrentViewId()))
3194  repaint();
3195  else updateStatusBar();
3196 }
3197 
3199 {
3200  if (getControler()->lookAtVolumeBary(getCurrentViewId()))
3201  repaint();
3202  else updateStatusBar();
3203 }
3204 
3206 {
3207  if (getControler()->lookAtCcBary(getCurrentViewId()))
3208  repaint();
3209  else updateStatusBar();
3210 }
3211 
3213 {
3214  if (getControler()->lookAtSelectedBary(getCurrentViewId()))
3215  repaint();
3216  else updateStatusBar();
3217 }
3218 
3220 {
3221  if (getControler()->lookAtAllBary(getCurrentViewId()))
3222  repaint() ;
3223  else updateStatusBar() ;
3224 }
3225 
3227 {
3228 #ifdef MODULE_SPAMOD
3229  callbackSpamodViews(SPAMOD_TOPOLOGICAL);
3230 #endif // MODULE_SPAMOD
3231 }
3232 
3234 {
3235 #ifdef MODULE_SPAMOD
3236  callbackSpamodViews(SPAMOD_EUCLIDIAN);
3237 #endif // MODULE_SPAMOD
3238 }
3239 
3241 {
3242 #ifdef MODULE_SPAMOD
3243  callbackSpamodViews(SPAMOD_ANALYTIC);
3244 #endif // MODULE_SPAMOD
3245 }
3246 
3248 {
3249 #ifdef MODULE_SPAMOD
3250  callbackSpamodViews(SPAMOD_VOXEL);
3251 #endif // MODULE_SPAMOD
3252 }
3253 
3255 {
3256 #ifdef MODULE_SPAMOD
3257  callbackSpamodViews(SPAMOD_K2);
3258 #endif // MODULE_SPAMOD
3259 }
3260 
3261 // Permet de revenir vers l'affichage d'origine de Moka
3263 {
3264 #ifdef MODULE_SPAMOD
3265  callbackSpamodViews(SPAMOD_NONE);
3266 #endif // MODULE_SPAMOD
3267 }
3268 
3269 // Methode permettant de basculer vers l'une des visualisations de Spamod
3271 {
3272 #ifdef MODULE_SPAMOD
3273  if (mode != SPAMOD_NONE)
3274  {
3275  getControler()->viewEnablePrecompile(getCurrentViewId(),
3276  PRECOMPILE_SPAMOD);
3277 
3278  getControler()->viewDisablePrecompile(getCurrentViewId(),
3279  PRECOMPILE_DART);
3280  getControler()->viewDisablePrecompile(getCurrentViewId(),
3281  PRECOMPILE_FACE);
3282  getControler()->viewDisablePrecompile(getCurrentViewId(),
3283  PRECOMPILE_SEW);
3284  getControler()->viewDisablePrecompile(getCurrentViewId(),
3285  PRECOMPILE_VERTEX);
3286  }
3287  else
3288  {
3289  getControler()->viewDisablePrecompile(getCurrentViewId(),
3290  PRECOMPILE_SPAMOD);
3291 
3292  if (getSewsDisplay())
3293  getControler()->viewEnablePrecompile(getCurrentViewId(),
3294  PRECOMPILE_SEW);
3295 
3296  if (getVerticesDisplay())
3297  getControler()->viewEnablePrecompile(getCurrentViewId(),
3298  PRECOMPILE_VERTEX);
3299 
3300  if (getFacesDisplay())
3301  getControler()->viewEnablePrecompile(getCurrentViewId(),
3302  PRECOMPILE_FACE);
3303 
3304  getControler()->viewEnablePrecompile(getCurrentViewId(),
3305  PRECOMPILE_DART);
3306  }
3307 
3308  getParameterSpamod()->setViewMode(mode);
3309  repaint();
3310 #endif // MODULE_SPAMOD
3311 
3312  return true;
3313 }
3314 
3316 {
3317 #ifdef MODULE_SPAMOD
3318  getParameterSpamod()->setNextViewMode();
3319  callbackSpamodViews(getParameterSpamod()->getViewMode());
3320 #endif // MODULE_SPAMOD
3321 }
3322 
3324 {
3325  if (FCreationActive != NULL && FCreationActive -> isVisible())
3326  {
3327  FCreationActive -> cancel();
3328  // FCreationActive = NULL ;
3329  }
3330  if (FOperationActive != NULL && FOperationActive -> isVisible())
3331  FOperationActive -> callbackClose() ;
3332 
3333  if (FOptionsFrame != NULL && FOptionsFrame -> isVisible())
3334  {
3335  FOptionsFrame -> setFVisible(false) ;
3336  FOptionsFrame -> close() ;
3337  }
3338  if (FOperationChanfreinage != NULL &&
3339  FOperationChanfreinage -> isVisible())
3340  FOperationChanfreinage -> close() ;
3341  if (FOptionsCarac != NULL && FOptionsCarac -> isVisible())
3342  FOptionsCarac -> close() ;
3343  if (FDialogDo != NULL && FDialogDo -> isVisible())
3344  FDialogDo -> close() ;
3345  if (FCouleurs != NULL && FCouleurs->isVisible())
3346  FCouleurs -> close() ;
3347  if ( FOptionsSurfacicHomology!=NULL )
3348  {
3349  FOptionsSurfacicHomology -> close() ;
3350  delete FOptionsSurfacicHomology;
3351  FOptionsSurfacicHomology = NULL;
3352  }
3353  if ( FOptionsVolumicHomology!=NULL )
3354  {
3355  FOptionsVolumicHomology -> close() ;
3356  delete FOptionsVolumicHomology;
3357  FOptionsVolumicHomology = NULL;
3358  }
3359 }
3360 
3361 //---------------------------------------------------------------
3362 CParameterAimedPosition* Window::getParameterAimedPosition() const
3363 { return getControler()->getParameterAimedPosition(getCurrentViewId()); }
3364 
3365 CParameterDrawing* Window::getParameterDrawing() const
3366 { return getControler()->getParameterDrawing(getCurrentViewId()); }
3367 
3368 CParameterEyePosition* Window::getParameterEyePosition() const
3369 { return getControler()->getParameterEyePosition(getCurrentViewId()); }
3370 
3371 CParameterAimedPoint* Window::getParameterAimedPoint() const
3372 { return getControler()->getParameterAimedPoint(getCurrentViewId()); }
3373 
3374 CParameterAxis* Window::getParameterAxis() const
3375 { return getControler()->getParameterAxis(getCurrentViewId()); }
3376 
3377 CParameterGrid* Window::getParameterGrid() const
3378 { return getControler()->getParameterGrid(getCurrentViewId()); }
3379 
3380 CParameterSew* Window::getParameterSew() const
3381 { return getControler()->getParameterSew(getCurrentViewId()); }
3382 
3383 CParameterDart* Window::getParameterDart() const
3384 { return getControler()->getParameterDart(getCurrentViewId()); }
3385 
3386 #ifdef MODULE_SPAMOD
3387 CParameterSpamod* Window::getParameterSpamod() const
3388 { return getControler()->getParameterSpamod(getCurrentViewId()); }
3389 #endif // MODULE_SPAMOD