Moka Ihm Qt
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
menu-bar.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 "menu-bar.qt.hh"
25 #include "window.qt.hh"
26 #include "HtmlEntities.hh"
27 
28 #include <QtGui/QPixmap>
29 
30 //*****************************************
31 // Constructeur
32 //*****************************************
34  :
35  QMenuBar(parent),
36  FParent(parent)
37 {
38  QIcon pf0(":/nouveau.png");
39  QIcon pf1(":/charger.png") ;
40  QIcon pf2(":/ajouter.png") ;
41  QIcon pf3(":/sauver.png") ;
42  QIcon pf7(":/file-import-48x48.png") ;
43  QIcon pf4(":/file-export-48x48.png") ;
44  QIcon pf5(":/quitter.png") ;
45  QIcon pf6(":/etage.png") ;
46 
47  QIcon pe1(":/undo.png") ;
48  QIcon pe2(":/redo.png") ;
49  QIcon pe3(":/vider.png") ;
50  QIcon pe4(":/boutonOptions.png") ;
51 
52  QIcon po1(":/aide.png") ;
53  QIcon po2(":/grille.png") ;
54 
55  QIcon pc1(":/polyligne.png") ;
56  QIcon pc2(":/polygone.png") ;
57  QIcon pc3(":/maillage.png") ;
58  QIcon pc4(":/sphere.png") ;
59  QIcon pc5(":/cylindre.png") ;
60  QIcon pc6(":/cone.png") ;
61  QIcon pc7(":/tore.png") ;
62 
63  QIcon pop1(":/homothetie.png") ;
64  QIcon pop2(":/translation.png") ;
65  QIcon pop3(":/rotation.png") ;
66 
67  QIcon pv1(":/addvue.png") ;
68  QIcon pv2(":/deletevue.png") ;
69  QIcon pv3(":/groupervues.png") ;
70  QIcon pv4(":/degroupervues.png") ;
71 
72  // Creation du menu Fichier
73  //-------------------------
74  fichier = new QMenu("&File");
75  fichier_act = addMenu(fichier);
76 
77  fichier -> addAction(pf0 , "&New" , FParent ,
78  SLOT(callbackNettoyage()) , Qt::CTRL + Qt::Key_N) ;
79 
80  charger_act = fichier -> addAction(pf1 , "&Load" , FParent ,
81  SLOT(callbackLoad()) ,
82  Qt::CTRL + Qt::Key_O) ;
83 
84  ajouter_act = fichier -> addAction(pf2 , "&Add" , FParent ,
85  SLOT(callbackAdd()) ,
86  Qt::CTRL + Qt::Key_A) ;
87 
88  sauver_act = fichier -> addAction(pf3 , "&Save" , FParent ,
89  SLOT(callbackSave()) ,
90  Qt::CTRL + Qt::Key_S) ;
91 
92  fichier -> addSeparator() ;
93 
94  importer_act = fichier -> addAction(pf7 , "&Import" , FParent ,
95  SLOT(callbackImport())) ;
96 
97  exporter_act = fichier -> addAction(pf4 , "&Export" , FParent ,
98  SLOT(callbackExport())) ;
99 
100  fichier -> addSeparator() ;
101 
102  fichier -> addAction("Search sub-map" , FParent ,
103  SLOT(callbackFindMotif())) ;
104 
105  fichier -> addAction("Count all the sub-maps" , FParent ,
106  SLOT(callbackCountMotifs())) ;
107 
108  fichier -> addSeparator() ;
109 
110  fichier -> addAction(pf5 , "&Quit" , FParent ,
111  SLOT(callbackQuit()) , Qt::CTRL + Qt::Key_Q) ;
112 
113  // Creation du menu Edition
114  //-------------------------
115  edition = new QMenu("&Edition");
116  edition_act = addMenu(edition);
117 
118  edition -> addAction(pe1 , "&Undo" , FParent ,
119  SLOT(callbackUndo()) , Qt::Key_U) ;
120  edition -> addAction(pe2 , "&Redo" , FParent ,
121  SLOT(callbackRedo()) , Qt::SHIFT + Qt::Key_U) ;
122 
123  edition -> addSeparator() ;
124 
125  edition -> addAction(pe3 , "&Empty the stack" , FParent ,
126  SLOT(callbackEmptyUndoRedo()) , Qt::ALT + Qt::Key_U);
127 
128  edition -> addSeparator() ;
129 
130  edition -> addAction(pe4 , "&Configuration" , FParent ,
131  SLOT(callbackConfigUndoRedo()) , Qt::CTRL + Qt::Key_U);
132 
133  // Creation du menu Options
134  //-------------------------
135  options = new QMenu("&Options");
136  options_act = addMenu(options);
137 
138  options -> addAction(po1 , "Hel&p" , FParent ,
139  SLOT(help()) , Qt::Key_F1) ;
140 
141  options -> addSeparator() ;
142 
143  options -> addAction("&Drawing/Plating" , FParent ,
144  SLOT(affich()) , Qt::Key_F2) ;
145 
146  options->addAction("&Burst view", FParent,
147  SLOT(view()) , Qt::Key_F3) ;
148 
149  options -> addSeparator() ;
150 
151  //options -> addAction ( "&Placages" , FParent ,
152 // SLOT ( plating ( ) ) , Qt::Key_F4 ) ;
153 
154  options -> addAction("Deformation &weighting",
155  FParent, SLOT(pondDef()) , Qt::Key_F4) ;
156  options -> addAction("&Extrusion/Thickening" , FParent ,
157  SLOT(extrusion()) , Qt::Key_F5) ;
158 #ifdef MODULE_MESH
159  options -> addAction("&Interpolation/Smoothing" , FParent ,
160  SLOT(interpol()) , Qt::Key_F6) ;
161 #endif
162 
163  options -> addAction("M&ove camera", FParent ,
164  SLOT(affichDivers()) , Qt::Key_F7) ;
165 
166  options -> addSeparator() ;
167 
168  options -> addAction("&Colors", FParent ,
169  SLOT(couleurs()) , Qt::Key_F8) ;
170 
171  options -> addSeparator() ;
172 
173  options->addAction("&Topological characteristics", FParent,
174  SLOT(caracTopo()), *new QKeySequence("ALT+c"));
175 
176  options->addAction("Compute &surfacic homology generators", FParent,
177  SLOT(callbackComputeSurfacicHomology()),
178  *new QKeySequence("ALT+SHIFT+h"));
179 
180  options->addAction("Compute volumic &homology generators", FParent,
181  SLOT(callbackComputeVolumicHomology()),
182  *new QKeySequence("ALT+h"));
183 
184  options->addAction("Is 2D quasi-&manifold",
185  FParent,
186  SLOT(callback2Manifold())) ;
187 
188  // Creation du menu creations
189  //---------------------------
190  creations = new QMenu("C&reate");
191  creations_act = addMenu(creations);
192 
193  creations -> addAction(pc1 , "&Dart/Polyline/Face" , FParent ,
194  SLOT(callbackPolyline()) ,
195  *new QKeySequence("CTRL+x,CTRL+1")) ;
196  creations -> addAction(pc2 , "Regular &polygon",
197  FParent ,
198  SLOT(callbackPolygon()) ,
199  *new QKeySequence("CTRL+x,CTRL+2")) ;
200  creations -> addAction(pc3 , "&Mesh" , FParent ,
201  SLOT(callbackMeshCreation()) ,
202  *new QKeySequence("CTRL+x,CTRL+3")) ;
203  creations -> addAction(pc4 , "&Sphere", FParent ,
204  SLOT(callbackSphere()) ,
205  *new QKeySequence("CTRL+x,CTRL+4")) ;
206  creations -> addAction(pc5 , "&Cylinder" , FParent ,
207  SLOT(callbackCylinder()) ,
208  *new QKeySequence("CTRL+x,CTRL+5")) ;
209  creations -> addAction(pc6 , "P&yramid/Cone" ,
210  FParent ,
211  SLOT(callbackPyramide()),
212  *new QKeySequence("CTRL+x,CTRL+6")) ;
213  creations -> addAction(pc7 , "&Torus" , FParent ,
214  SLOT(callbackTorus()) ,
215  *new QKeySequence("CTRL+x,CTRL+7")) ;
216 
217  creations -> addSeparator() ;
218 
219  creations -> addAction("&Randomize darts" , FParent ,
220  SLOT(callbackRandomizeDarts()));
221 
222  // Creation du menu Operations
223  //----------------------------
224  operations = new QMenu(*HTML::decode("O&perations"));
225  operations_act = addMenu(operations);
226 
227  // -- translation/rotation/homothetie
228  operations -> addAction(pop2 , "&Translation" , FParent ,
229  SLOT(callbackTranslateWindow()) , Qt::Key_T) ;
230  operations -> addAction(pop3 , "&Rotation" , FParent ,
231  SLOT(callbackRotateWindow()) , Qt::Key_R) ;
232  operations -> addAction(pop1 , "&Homothethy" ,
233  FParent ,
234  SLOT(callbackScaleWindow()) , Qt::Key_H) ;
235  operations -> addAction("M&ove to" , FParent ,
236  SLOT(callbackMovetoWindow()),
237  Qt::SHIFT + Qt::Key_T) ;
238 
239  operations -> addSeparator() ;
240 
241  //-- coudre
242  QMenu * coudre = operations -> addMenu("&Sew") ;
243 
244  QMenu * intuitif = coudre -> addMenu("&Intuitively") ;
245  intuitif -> addAction("&Topologically" , FParent ,
246  SLOT(callbackIntuitiveTopoSew()) ,
247  Qt::SHIFT + Qt::Key_C) ;
248  intuitif -> addAction("&Geometrically" , FParent ,
249  SLOT(callbackIntuitiveGeoSew()) , Qt::Key_C) ;
250 
251  coudre -> addSeparator() ;
252 
253  coudre -> addAction("&Vertices" , FParent , SLOT(callbackTopoSew0()));
254 
255  QMenu * coudreAretes = coudre -> addMenu("&Edges");
256  coudreAretes -> addAction("&Topologically" , FParent ,
257  SLOT(callbackTopoSew1())) ;
258  coudreAretes->addAction("&Geometrically", FParent ,
259  SLOT(callbackGeoSew1())) ;
260 
261  QMenu * coudreFaces = coudre -> addMenu("&Faces") ;
262  coudreFaces -> addAction("&Topologically" , FParent ,
263  SLOT(callbackTopoSew2())) ;
264  coudreFaces -> addAction("&Geometrically", FParent ,
265  SLOT(callbackGeoSew2())) ;
266 
267  QMenu * coudreVolumes = coudre -> addMenu("V&olumes") ;
268  coudreVolumes -> addAction("&Topologically" , FParent ,
269  SLOT(callbackTopoSew3())) ;
270  coudreVolumes->addAction("&Geometrically", FParent ,
271  SLOT(callbackGeoSew3())) ;
272 
273  coudre -> addSeparator() ;
274 
275  QMenu * coudre1bord = coudre -> addMenu("&1-border") ;
276  coudre1bord -> addAction("&Topologically" , FParent ,
277  SLOT(callbackTopoSew1borders())) ;
278  coudre1bord->addAction("&Geometrically" , FParent ,
279  SLOT(callbackGeoSew1borders())) ;
280 
281  QMenu * coudre2bords = coudre -> addMenu("&2-border") ;
282  coudre2bords -> addAction("&Topologically" , FParent ,
283  SLOT(callbackTopoSew2borders()),
284  Qt::SHIFT + Qt::Key_B) ;
285  coudre2bords -> addAction("&Geometrically", FParent ,
286  SLOT(callbackGeoSew2borders()) , Qt::Key_B) ;
287 
288  coudre -> addSeparator() ;
289 
290  QMenu * inverserCouture =
291  coudre->addMenu("&Reverse the last sewing");
292  inverserCouture -> addAction("&Orientation" , FParent ,
293  SLOT(callbackInvertLastOperation()) ,
294  Qt::Key_X) ;
295  inverserCouture -> addAction("&Direction" , FParent ,
296  SLOT(callbackInvertLastOperationGeometry()),
297  Qt::SHIFT + Qt::Key_X) ;
298 
299  // -- Decoudre
300  QMenu * decoudre = operations->addMenu(*HTML::decode("&Unsew"));
301 
302  decoudre -> addAction("&Intuitively" , FParent ,
303  SLOT(callbackIntuitiveUnsew()) , Qt::Key_D) ;
304 
305  decoudre -> addSeparator() ;
306 
307  decoudre -> addAction("&Vertices" , FParent ,
308  SLOT(callbackUnsew0())) ;
309  decoudre -> addAction("&Edges" , FParent ,
310  SLOT(callbackUnsew1())) ;
311  decoudre -> addAction("&Faces" , FParent ,
312  SLOT(callbackUnsew2())) ;
313  decoudre -> addAction("V&olumes" , FParent ,
314  SLOT(callbackUnsew3())) ;
315 
316  // -- Placage
317  QMenu * placage = operations -> addMenu("&Plate") ;
318 
319  placage -> addAction("&Intuitively" , FParent ,
320  SLOT(callbackIntuitivePlate()) , Qt::Key_P) ;
321 
322  placage -> addSeparator() ;
323 
324  placage -> addAction("&Vertices" , FParent , SLOT(callbackPlate0()));
325  placage -> addAction("&Edges" , FParent , SLOT(callbackPlate1()));
326  placage -> addAction("&Faces" , FParent , SLOT(callbackPlate2()));
327 
328  placage -> addSeparator() ;
329 
330  placage -> addAction("&1-border" , FParent ,
331  SLOT(callbackPlate1borders())) ;
332  placage -> addAction("&2-border" , FParent ,
333  SLOT(callbackPlate2borders())) ;
334 
335  operations -> addSeparator() ;
336 
337  // -- Fusionner
338  QMenu * fusionner = operations -> addMenu("&Merge") ;
339 
340  fusionner -> addAction("&Intuitively" , FParent ,
341  SLOT(callbackIntuitiveMerge()) , Qt::Key_F) ;
342 
343  fusionner -> addSeparator() ;
344 
345  fusionner -> addAction("&Edges", FParent, SLOT(callbackMergeEdges()));
346  fusionner -> addAction("&Faces", FParent, SLOT(callbackMergeFaces()));
347  fusionner -> addAction("&Volumes", FParent, SLOT(callbackMergeVolumes()));
348 
349  fusionner -> addSeparator() ;
350 
351  fusionner -> addAction("&Aligned edges", FParent ,
352  SLOT(callbackMergeColinearEdges())) ;
353  fusionner -> addAction("&Coplanar faces" , FParent ,
354  SLOT(callbackMergeCoplanarFaces())) ;
355 
356  fusionner -> addSeparator() ;
357 
358  fusionner -> addAction("Faces without &disconnection" , FParent ,
359  SLOT(callbackMergeFacesWithoutDisconnection()));
360 
361  fusionner -> addAction("Volumes by keeping balls", FParent ,
362  SLOT(callbackRemoveMarkedFacesButKeepBalls()));
363 
364 
365  fusionner->addAction("Shift all edges incident to vertex", FParent ,
366  SLOT(callbackShiftAllEdgesIncidentToVertex()));
367  fusionner->addAction("Remove dangling edges", FParent,
368  SLOT(callbackRemoveDanglingEdges()));
369 
370  fusionner -> addAction("Simplify 2D object", FParent ,
371  SLOT(callbackSimplify2DObject()));
372  fusionner -> addAction("Simplify 3D object", FParent ,
373  SLOT(callbackSimplify3DObject()));
374 
375  // -- Contracter
376  QMenu * contracter = operations -> addMenu("&Contract") ;
377 
378  contracter -> addAction("&Intuitively" , FParent ,
379  SLOT(callbackIntuitiveContract()) ,
380  Qt::SHIFT + Qt::Key_F);
381 
382  contracter -> addSeparator() ;
383 
384  contracter -> addAction("&Edges" , FParent ,
385  SLOT(callbackContractEdges())) ;
386  contracter -> addAction("&Faces" , FParent ,
387  SLOT(callbackContractFaces())) ;
388  contracter -> addAction("&Volumes" , FParent ,
389  SLOT(callbackContractVolumes())) ;
390 
391  contracter -> addSeparator() ;
392 
393 
394  contracter->addAction("&Null length edges", FParent ,
395  SLOT(callbackDelNullEdges())) ;
396  contracter -> addAction("Flattened f&aces" , FParent ,
397  SLOT(callbackDelFlatFaces())) ;
398  contracter -> addAction("Flattened V&olumes" , FParent ,
399  SLOT(callbackDelFlatVolumes())) ;
400 
401  // -- Inserer
402  QMenu * inserer = operations -> addMenu("&Insert");
403 
404  inserer -> addAction("&Vertices" , FParent ,
405  SLOT(callbackInsertVertex())) ;
406  inserer -> addAction("&Edges" , FParent ,
407  SLOT(callbackInsertEdge())) ;
408  inserer -> addAction("&Faces" , FParent ,
409  SLOT(callbackInsertFace())) ;
410 
411  // -- Fermer
412  QMenu * fermer = operations -> addMenu("C&lose") ;
413 
414  fermer -> addAction("&Intuitively" , FParent ,
415  SLOT(callbackIntuitiveStopUp())) ;
416 
417  fermer -> addSeparator() ;
418 
419  fermer -> addAction("&Edges" , FParent , SLOT(callbackStopUp0())) ;
420  fermer -> addAction("&Faces" , FParent , SLOT(callbackStopUp1())) ;
421  fermer -> addAction("&Volumes" , FParent , SLOT(callbackStopUp2())) ;
422  fermer -> addAction("&Connected components" , FParent ,
423  SLOT(callbackStopUp3())) ;
424 
425  // -- Trianguler
426  QMenu * trianguler = operations -> addMenu("Trian&gulate") ;
427 
428  trianguler -> addAction("&Depending on selected mode", FParent ,
429  SLOT(callbackContextTriangulate()),
430  Qt::ALT + Qt::Key_T);
431 
432  trianguler -> addSeparator() ;
433 
434  trianguler -> addAction("&Edges" , FParent ,
435  SLOT(callbackTriangulateEdges())) ;
436  trianguler -> addAction("&Faces" , FParent ,
437  SLOT(callbackTriangulateFaces())) ;
438  trianguler -> addAction("&Volumes" , FParent ,
439  SLOT(callbackTriangulateVolumes())) ;
440  trianguler -> addSeparator() ;
441 
442  trianguler -> addAction("Triangulate faces &geometrically" ,
443  FParent , SLOT(callbackTriangulateGeoFaces())) ;
444 
445 trianguler -> addAction("&Turn selected edge",
446  FParent , SLOT(callbackSwapEdge())) ;
447 
448  // -- Quadranguler
449  QMenu * quadranguler = operations -> addMenu("&Quadrangulate") ;
450 
451  QMenu * faces = quadranguler -> addMenu("&Faces") ;
452  faces -> addAction("&With new vertices" , FParent ,
453  SLOT(callbackQuadrangulateFaces()), Qt::ALT+Qt::Key_Q);
454  faces -> addAction("Wi&thout new vertices" , FParent ,
455  SLOT(callbackBasicQuadrangulateFaces())) ;
456 
457  // -- Calculer Dual
458  QMenu * calculerDual = operations -> addMenu("Compute &dual") ;
459  calculerDual -> addAction("&2D" , FParent , SLOT(callbackDual2d())) ;
460  calculerDual -> addAction("&3D" , FParent , SLOT(callbackDual3d())) ;
461 
462  operations -> addSeparator() ;
463 
464  // -- Extruder
465  QMenu * extruder = operations -> addMenu("&Extrude") ;
466 
468  QMenu * normale = extruder -> addMenu("Along &normal") ;
469  normale -> addAction("&Intuitively" , FParent ,
470  SLOT(callbackIntuitiveExtrudeByNormal()), Qt::Key_N);
471 
472  normale -> addSeparator() ;
473 
474  normale -> addAction("&Vertices" , FParent ,
475  SLOT(callbackExtrude0ByNormal())) ;
476  normale -> addAction("&Edges" , FParent ,
477  SLOT(callbackExtrude1ByNormal())) ;
478  normale -> addAction("&Faces" , FParent ,
479  SLOT(callbackExtrude2ByNormal())) ;
480 
482  QMenu * chemin = extruder -> addMenu("Along &path") ;
483  chemin -> addAction("&Edges" , FParent ,
484  SLOT(callbackExtrude1ByPath()) , Qt::SHIFT+Qt::Key_E);
485  chemin -> addAction("&Faces" , FParent ,
486  SLOT(callbackExtrude2ByPath()) , Qt::Key_E) ;
487 
489  QMenu * axe = extruder -> addMenu("Along &axis") ;
490 
491  axe -> addAction("&Edges" , FParent ,
492  SLOT(callbackExtrude1ByRevolution()) ,
493  Qt::CTRL + Qt::SHIFT + Qt::Key_E) ;
494  axe -> addAction("&Faces" , FParent ,
495  SLOT(callbackExtrude2ByRevolution()) ,
496  Qt::ALT + Qt::SHIFT + Qt::Key_E) ;
497 
499  extruder -> addAction("&Thick", FParent, SLOT(callbackThicken())) ;
500 
501  // -- Interpoler
502 #ifdef MODULE_MESH
503  QMenu * interpoler = operations -> addMenu("&Interpolate") ;
504 
505  interpoler -> addAction("&Edges" , FParent ,
506  SLOT(callbackMeshEdge())) ;
507 
508 
509  QMenu * carres = interpoler -> addMenu("&Squares");
510  carres -> addAction("0 -> 1" , FParent ,
511  SLOT(callbackMeshSquare01())) ;
512  carres -> addAction("0 -> 2" , FParent ,
513  SLOT(callbackMeshSquare02())) ;
514  carres -> addAction("1 -> 2" , FParent ,
515  SLOT(callbackMeshSquare12())) ;
516 
517  QMenu * cubes = interpoler -> addMenu("C&ubes") ;
518  cubes -> addAction("0 -> 1" , FParent ,
519  SLOT(callbackMeshCube01())) ;
520  cubes -> addAction("0 -> 2" , FParent ,
521  SLOT(callbackMeshCube02())) ;
522  cubes -> addAction("0 -> 3" , FParent ,
523  SLOT(callbackMeshCube03())) ;
524  cubes -> addAction("1 -> 2" , FParent ,
525  SLOT(callbackMeshCube12())) ;
526  cubes -> addAction("1 -> 3" , FParent ,
527  SLOT(callbackMeshCube13())) ;
528  cubes -> addAction("2 -> 3" , FParent ,
529  SLOT(callbackMeshCube23())) ;
530 
531  // -- Lisser
532  QMenu * lisser = operations -> addMenu("&Smooth") ;
533 
534  lisser -> addAction("&Edges" , FParent ,
535  SLOT(callbackSmooth1())) ;
536  lisser -> addAction("&Squares" , FParent ,
537  SLOT(callbackSmooth2())) ;
538  lisser -> addAction("C&ubes" , FParent ,
539  SLOT(callbackSmooth3())) ;
540 #endif // MODULE_MESH
541 
542  // -- Arrondir
543 #ifdef MODULE_ROUNDING
544  QMenu * arrondir = operations -> addMenu("&Round") ;
545 
546  arrondir -> addAction("&Vertices" , FParent ,
547  SLOT(callbackRoundVertices())) ;
548  arrondir -> addAction("Edges &2D" , FParent ,
549  SLOT(callbackRoundEdges2d())) ;
550  arrondir -> addAction("Edges &3D" , FParent ,
551  SLOT(callbackRoundEdges3d())) ;
552 
553  arrondir -> addSeparator() ;
554 
555  arrondir -> addAction("Dug vertices" , FParent ,
556  SLOT(callbackRoundVerticesDig()) , Qt::Key_A) ;
557 
558  arrondir -> addAction("3D dug edges" , FParent ,
559  SLOT(callbackRoundEdges3dDig()), Qt::SHIFT+Qt::Key_A);
560 
561  arrondir -> addSeparator() ;
562 
563  arrondir -> addAction("2D edges with setback" , FParent ,
564  SLOT(callbackRoundEdges2dWithSetback())) ;
565  arrondir -> addAction("3D edges with setback" , FParent ,
566  SLOT(callbackRoundEdges3dWithSetback())) ;
567  arrondir->addAction("3D dug edges with setback" , FParent ,
568  SLOT(callbackRoundEdges3dDigWithSetback()) ,
569  Qt::CTRL + Qt::SHIFT + Qt::Key_A) ;
570 
571  arrondir -> addSeparator() ;
572 
573  arrondir -> addAction("Variable coefficients" , FParent ,
574  SLOT(chanf())) ;
575 #endif // MODULE_ROUNDING
576 
577  // -- Triangulation
578 #ifdef MODULE_TRIANGULATION
579  QMenu * triangulation = operations -> addMenu("Trian&gulation") ;
580 
581  triangulation -> addAction("&Delanyay triangulation" , FParent ,
582  SLOT(callbackDelaunayTriangulation())) ;
583 
584  triangulation -> addSeparator() ;
585 
586  /*triangulation -> addAction ( "Trianguler faces &topologiquement" ,
587  FParent ,SLOT ( callbackTriangulateTopoFaces ( ) ) ) ; */
588  triangulation -> addAction("&Mark non-uniform faces" , FParent ,
589  SLOT(callbackMarkNonUniformFaces())) ;
590  triangulation -> addAction("&Optimize edges positions" , FParent ,
591  SLOT(callbackOptimizeSelectedEdges())) ;
592  triangulation -> addAction("D&elaunay triangulation optimized", FParent ,
593  SLOT(callbackOptimizedDelaunayTriangulation()));
594 #endif // MODULE_TRIANGULATION
595 
596  // -- Co-raffiner
597 #ifdef MODULE_COREFINEMENT
598  QMenu * coraffiner = operations -> addMenu("Corefine") ;
599 
600  coraffiner -> addAction("2D mesh - &sweeping" , FParent ,
601  SLOT(callbackCorefine2dSegmentsSweeping()) ,
602  Qt::Key_AsciiCircum) ;
603  coraffiner -> addAction("2D Mesh - &propogation" , FParent ,
604  SLOT(callbackCorefine2dSegmentsPropagation()) ,
605  Qt::Key_Backslash) ;
606  coraffiner->
607  addAction(*HTML::decode("2D boolean operations"),
608  FParent , SLOT(callbackBooleanOperations2d())) ;
609 
610  coraffiner -> addSeparator() ;
611 
612  coraffiner -> addAction("3D Mesh" , FParent ,
613  SLOT(callbackCorefine3dFaces())) ;
614  coraffiner -> addAction("3D Faces" , FParent ,
615  SLOT(callbackCorefineMarked3dFaces())) ;
616 coraffiner -> addAction("&All selected 3D meshes",FParent ,
617  SLOT(callbackCorefineMarked3dMeshesWith())) ;
618  coraffiner->addAction("3D boolean operations 3D" , FParent,
619  SLOT(callbackBooleanOperations3d()), Qt::Key_At);
620 #endif // MODULE_COREFINEMENT
621 
622  //- Geologie
623 #ifdef MODULE_GEOLOGY
624  geologie = new QMenu(*HTML::decode("&G&eacute;ologie"));
625  geologie_act = addMenu(geologie);
626 
627  geologie -> addAction(*HTML::decode("&Cr&eacute;er une zone d'incertitude"),
628  FParent ,
629  SLOT(callbackUncertainZone())) ;
630  geologie -> addAction(*HTML::decode("Cr&eacute;er les &intersections les"
631  " plus proches") , FParent ,
632  SLOT(callbackCreateNearestIntersections())) ;
633  geologie -> addAction("&Etendre bords" , FParent ,
634  SLOT(callbackExtendSelectedBorders())) ;
635  geologie -> addAction(*HTML::decode("Etendre &bords jusqu'&agrave; une"
636  " surface") , FParent ,
637  SLOT(callbackExtendSelectedBordersToSurface())) ;
638 
639  geologie -> addSeparator() ;
640 
641  geologie -> addAction(*HTML::decode("&Lisser la s&eacute;lection") ,
642  FParent ,
643  SLOT(callbackSmoothSelection())) ;
644  geologie -> addAction(*HTML::decode("&Relacher la s&eacute;lection") ,
645  FParent ,
646  SLOT(callbackRelaxSelection())) ;
647  geologie -> addAction("&Simplifier maillage" , FParent ,
648  SLOT(callbackSimplifyMesh())) ;
649  geologie -> addAction("Rece&ntrer" , FParent ,
650  SLOT(callbackCenterSelection())) ;
651 
652  geologie->addAction(*HTML::decode("&Plaquer les sommets de la"
653  " cr&eacute;ation courante sur les "
654  "faces de la s&eacute;lection suivante"),
655  FParent , SLOT(callbackPlateVerticesOnFaces())) ;
656  geologie -> addAction(*HTML::decode("Plaquer les sommets de la"
657  " cr&eacute;ation courante sur les"
658  " &ar&ecirc;tes de la"
659  " s&eacute;lection suivante"), FParent,
660  SLOT(callbackPlateVerticesOnEdges())) ;
661  geologie->addAction(*HTML::decode("Pla&quer les sommets de la"
662  " cr&eacute;ation courante sur les somm"
663  "ets de la s&eacute;lection suivante"),
664  FParent , SLOT(callbackPlateVerticesOnVertices())) ;
665 
666  geologie -> addSeparator() ;
667 
668  geologie -> addAction(*HTML::decode("S&eacute;lectionner to&us les"
669  " macros-sommets") , FParent ,
670  SLOT(callbackSelectMacroVertices())) ;
671  geologie -> addAction(*HTML::decode("S&eacute;lectionner toutes les"
672  " macros-ar&ecirc;&tes") , FParent ,
673  SLOT(callbackSelectAllMacroEdges())) ;
674  geologie -> addAction(*HTML::decode("S&eacute;lectionner les macros-ar"
675  "&ecirc;tes d&eacute;si&gn&eacute;es"),
676  FParent , SLOT(callbackSelectMacroEdges())) ;
677  geologie->addAction(*HTML::decode("S&eacute;lectionner les "
678  "macr&os-faces d&eacute;sign&eacute;es"),
679  FParent , SLOT(callbackSelectMacroFaces())) ;
680  geologie -> addAction(*HTML::decode("S&eacute;lectionner les bor&ds entre "
681  "les brins s&eacute;lectionn&eacute;s"),
682  FParent,
683  SLOT(callbackSelectBordersBetweenSelectedDarts())) ;
684 
685  geologie -> addSeparator() ;
686  geologie -> addAction("Simplifier le maillage" , FParent ,
687  SLOT(callbackMeshSimplification())) ;
688  geologie -> addAction("Raffiner les trous" , FParent ,
689  SLOT(callbackHolesRefinement())) ;
690  geologie -> addAction("Trianguler les trous" , FParent ,
691  SLOT(callbackTriangulateHoles())) ;
692  geologie -> addAction("Boucher les trous" , FParent ,
693  SLOT(callbackFillHolesOnMeshes())) ;
694 
695  geologie -> addSeparator() ;
696  geologie -> addAction(*HTML::decode("D&eacute;terminer les failles") ,
697  FParent , SLOT(callbackFailleDetection())) ;
698  geologie -> addAction("Extraire les failles" , FParent ,
699  SLOT(callbackExtractDetectedFailles())) ;
700  geologie -> addAction("Extension des failles" , FParent ,
701  SLOT(callbackExtensionFailleSurface())) ;
702 
703  geologie -> addSeparator() ;
704  geologie -> addAction("I&mporter surface GR2D" , FParent ,
705  SLOT(callbackImportGr2d())) ;
706  geologie -> addAction("Importer surface &XYZ" , FParent ,
707  SLOT(callbackImportXyz())) ;
708  geologie -> addAction("Importer sur&face TS" , FParent ,
709  SLOT(callbackImportTs())) ;
710  geologie -> addAction("Importer nuage de poin&ts" , FParent ,
711  SLOT(callbackImportCloud())) ;
712  geologie -> addAction("Importer surface VRML" , FParent ,
713  SLOT(callbackImportVrml())) ;
714  geologie -> addAction("Exporter surface TS" , FParent ,
715  SLOT(callbackExportTs())) ;
716 #endif // MODULE_GEOLOGY
717 
718  // Creation du menu Materialiser
719  //------------------------------
720  materialiser = new QMenu("&Materialize");
721  materialiser_act = addMenu(materialiser);
722 
723  materialiser -> addAction("&Barycenter" , FParent ,
724  SLOT(callbackMaterializeBarycenter())) ;
725  materialiser -> addAction("&Axis" , FParent ,
726  SLOT(callbackMaterializeAxe())) ;
727  materialiser -> addAction("&Plane" , FParent ,
728  SLOT(callbackMaterializePlane())) ;
729  materialiser -> addAction("&Normal vector" , FParent ,
730  SLOT(callbackMaterializeNormalVector())) ;
731  materialiser -> addAction("Normal &plane" , FParent ,
732  SLOT(callbackMaterializeOrthoPlane())) ;
733 
734  materialiser -> addSeparator() ;
735 
736  materialiser -> addAction("&Reference point" , FParent ,
737  SLOT(callbackMaterializeReferential())) ;
738 
739  // Creation du menu Selection
740  //---------------------------
741  selection = new QMenu("&Selection");
742  selection_act = addMenu(selection);
743 
744  selection -> addAction("Reinit" , FParent ,
745  SLOT(callbackReinitSelection()) ,
746  Qt::Key_Escape) ;
747  selection -> addAction("Inverse" , FParent ,
748  SLOT(callbackNegateSelection()) ,
749  Qt::Key_Minus) ;
750  selection -> addAction("Swap" , FParent ,
751  SLOT(callbackSwapSelections()) ,
752  Qt::Key_Asterisk) ;
753 
754  selection -> addSeparator() ;
755 
756  selection -> addAction("Duplicate" , FParent ,
757  SLOT(callbackDuplicateSelection()) ,
758  Qt::Key_Enter) ;
759 
760  selection -> addAction("Remove" , FParent ,
761  SLOT(callbackDeleteSelection()) ,
762  Qt::Key_Delete) ;
763 
764  selection -> addSeparator() ;
765 
766  QMenu * etendre = selection -> addMenu("Grow") ;
767  QMenu * etendre1pas = etendre -> addMenu("1 step") ;
768 
769  etendre1pas -> addAction("Forward" , FParent ,
770  SLOT(callbackGoForward1()) ,
771  Qt::Key_I) ;
772  etendre1pas -> addAction(*HTML::decode("Backward") , FParent ,
773  SLOT(callbackGoBackward1()) ,
774  Qt::Key_K) ;
775  etendre1pas -> addAction("To the left" , FParent ,
776  SLOT(callbackGoLeft1()) ,
777  Qt::Key_J) ;
778  etendre1pas -> addAction("To the right" , FParent ,
779  SLOT(callbackGoRight1()) ,
780  Qt::Key_L) ;
781 
782  QMenu * etendreRepet = etendre->addMenu("Repetitively");
783 
784  etendreRepet -> addAction("Forward" , FParent ,
785  SLOT(callbackGoForward1Rep()) ,
786  Qt::CTRL + Qt::Key_I) ;
787  etendreRepet -> addAction("Backward" , FParent ,
788  SLOT(callbackGoBackward1Rep()) ,
789  Qt::CTRL + Qt::Key_K) ;
790  etendreRepet -> addAction("To the left" , FParent ,
791  SLOT(callbackGoLeft1Rep()) ,
792  Qt::CTRL + Qt::Key_J) ;
793  etendreRepet -> addAction("To the right" , FParent ,
794  SLOT(callbackGoRight1Rep()) ,
795  Qt::CTRL + Qt::Key_L) ;
796 
797  QMenu * reduire = selection->addMenu("Reduce");
798  QMenu * reduire1pas = reduire -> addMenu("1 step") ;
799 
800  reduire1pas -> addAction("Forward" , FParent ,
801  SLOT(callbackGoForward0()) ,
802  Qt::SHIFT + Qt::Key_I) ;
803  reduire1pas -> addAction("Backward" , FParent ,
804  SLOT(callbackGoBackward0()) ,
805  Qt::SHIFT + Qt::Key_K) ;
806  reduire1pas -> addAction("To the left" , FParent ,
807  SLOT(callbackGoLeft0()) ,
808  Qt::SHIFT + Qt::Key_J) ;
809  reduire1pas -> addAction("To the right" , FParent ,
810  SLOT(callbackGoRight0()) ,
811  Qt::SHIFT + Qt::Key_L) ;
812 
813  QMenu * reduireRepet =
814  reduire->addMenu("Repetitively") ;
815 
816  reduireRepet -> addAction("Forward" , FParent ,
817  SLOT(callbackGoForward0Rep()) ,
818  Qt::CTRL + Qt::SHIFT + Qt::Key_I) ;
819  reduireRepet -> addAction("Backward" , FParent ,
820  SLOT(callbackGoBackward0Rep()) ,
821  Qt::CTRL + Qt::SHIFT + Qt::Key_K) ;
822  reduireRepet -> addAction("To the left" , FParent ,
823  SLOT(callbackGoLeft0Rep()) ,
824  Qt::CTRL + Qt::SHIFT + Qt::Key_J) ;
825  reduireRepet -> addAction("To the right" , FParent ,
826  SLOT(callbackGoRight0Rep()) ,
827  Qt::CTRL + Qt::SHIFT + Qt::Key_L) ;
828 
829  selection -> addSeparator() ;
830 
831  QMenu * marquerInterieur =
832  selection->addMenu(*HTML::decode("Mark interior"));
833 
834  marquerInterieur -> addAction("2D" , FParent ,
835  SLOT(callbackMarkInterior2())) ;
836  marquerInterieur -> addAction("3D" , FParent ,
837  SLOT(callbackMarkInterior3())) ;
838 
839  selection -> addSeparator() ;
840 
841  QMenu * selectBords = selection->addMenu("Select borders") ;
842 
843  selectBords -> addAction("Intuitively" , FParent ,
844  SLOT(callbackIntuitiveSelectBorders()) ,
845  Qt::ALT + Qt::Key_B) ;
846 
847  selectBords -> addSeparator() ;
848 
849  selectBords -> addAction("0-border" , FParent ,
850  SLOT(callbackSelect0borders())) ;
851  selectBords -> addAction("1-border" , FParent ,
852  SLOT(callbackSelect1borders())) ;
853  selectBords -> addAction("2-border" , FParent ,
854  SLOT(callbackSelect2borders())) ;
855  selectBords -> addAction("3-border" , FParent ,
856  SLOT(callbackSelect3borders())) ;
857 
858  selection->addAction("Select non planar faces", FParent ,
859  SLOT(callbackSelectNonPlanarFaces()));
860 
861  selection -> addSeparator();
862 
863  selection -> addAction("Incident cells" , FParent ,
864  SLOT(callbackSelectIncidents()) ,
865  Qt::Key_S) ;
866 
867  QMenu * avancer = selection -> addMenu("Move by") ;
868 
869  avancer -> addAction("Alpha0" , FParent ,
870  SLOT(callbackGoAlpha0()), Qt::ALT + Qt::Key_0) ;
871  avancer -> addAction("Alpha1" , FParent ,
872  SLOT(callbackGoAlpha1()), Qt::ALT + Qt::Key_1) ;
873  avancer -> addAction("Alpha2" , FParent ,
874  SLOT(callbackGoAlpha2()), Qt::ALT + Qt::Key_2) ;
875  avancer -> addAction("Alpha3" , FParent ,
876  SLOT(callbackGoAlpha3()), Qt::ALT + Qt::Key_3) ;
877 
878  // Creation du menu Vues
879  //----------------------
880  vues = new QMenu("&Views");
881  vues_act = addMenu(vues);
882 
883  QMenu * arranger = vues -> addMenu("&Organize") ;
884  arranger -> addAction("&Cascade" , FParent ,
885  SLOT(cascade())) ;
886  arranger -> addAction("&Mosaic" , FParent ,
887  SLOT(tile()) , Qt::Key_M) ;
888 
889  vues -> addAction(pv2 , "&Remove" , FParent ,
890  SLOT(deleteView()) , Qt::Key_Backspace) ;
891 
892  QMenu * basculer = vues -> addMenu("&Swith to") ;
893  basculer -> addAction("&3D view" , FParent ,
894  SLOT(basculeView3D()) , Qt::Key_0);
895  basculer -> addAction("&XY view" , FParent ,
896  SLOT(basculeViewXY()) , Qt::Key_1);
897  basculer -> addAction("&YZ view" , FParent ,
898  SLOT(basculeViewYZ()) , Qt::Key_2);
899  basculer -> addAction("&ZX view" , FParent ,
900  SLOT(basculeViewZX()) , Qt::Key_3);
901  basculer -> addSeparator() ;
902  basculer -> addAction("&Multi-view" , FParent ,
903  SLOT(basculeViewMulti()) , Qt::Key_4);
904 
905  vues -> addSeparator() ;
906 
907  QMenu * ajouter = vues -> addMenu("&Add") ;
908  ajouter -> addAction(pv1 , "&3D view" , FParent ,
909  SLOT(addView3D()) , Qt::CTRL + Qt::Key_0);
910  ajouter -> addAction("&XY view" , FParent ,
911  SLOT(addViewXY()) , Qt::CTRL + Qt::Key_1) ;
912  ajouter -> addAction("&YZ view" , FParent ,
913  SLOT(addViewYZ()) , Qt::CTRL + Qt::Key_2) ;
914  ajouter -> addAction("&ZX view" , FParent ,
915  SLOT(addViewZX()) , Qt::CTRL + Qt::Key_3) ;
916  ajouter -> addSeparator() ;
917  ajouter -> addAction("&Multi-view" , FParent ,
918  SLOT(addViewMulti()) , Qt::CTRL + Qt::Key_4) ;
919 
920  vues -> addSeparator() ;
921 
922  QMenu * grouper = vues -> addMenu("&Group") ;
923  grouper -> addAction(pv3 , "&All the views with the current view" ,
924  FParent , SLOT(OperationGroupAllGeneral()) ,
925  Qt::Key_G) ;
926 
927  grouper -> addSeparator() ;
928 
929  grouper -> addAction("&Precompiles of all the views", FParent ,
930  SLOT(OperationGroupAllPrecomp())) ;
931 
932  grouper -> addAction("Camera position of all the views" ,
933  FParent , SLOT(OperationGroupAllEyePos())) ;
934 
935  grouper -> addAction("Aimed point of all the views" ,
936  FParent , SLOT(OperationGroupAllAimedPos())) ;
937 
938  grouper -> addAction("Drawing parameters of all the views" ,
939  FParent , SLOT(OperationGroupAllDrawing())) ;
940 
941  grouper -> addSeparator() ;
942 
943  grouper->addAction("Current view and double-clicked view",
944  FParent , SLOT(OperationGroupGeneral()) ,
945  Qt::ALT + Qt::Key_G) ;
946 
947  grouper -> addSeparator() ;
948 
949  grouper->addAction("&Precompiles of these 2 views",
950  FParent, SLOT(OperationGroupPrecomp()));
951 
952  grouper -> addAction("Camera position of these 2 views" ,
953  FParent , SLOT(OperationGroupEyePos()));
954 
955  grouper->addAction("Aimed point of these 2 views",
956  FParent, SLOT(OperationGroupAimedPos()));
957 
958  grouper->addAction("Drawing parameters of these 2 views" ,
959  FParent , SLOT(OperationGroupDrawing()));
960 
961  QMenu * degrouper = vues->addMenu("&Ungroup");
962 
963  degrouper -> addAction(pv4 , "&All the views" , FParent ,
964  SLOT(OperationUngroupAllGeneral()) ,
965  Qt::SHIFT + Qt::Key_G) ;
966 
967  degrouper -> addSeparator() ;
968 
969  degrouper->addAction("&Precompiles of all the views", FParent ,
970  SLOT(OperationUngroupAllPrecompiles()));
971 
972  degrouper -> addAction("Camera position of all the views" ,
973  FParent , SLOT(OperationUngroupAllEyePos()));
974 
975 degrouper -> addAction("Aimed point of all the views", FParent ,
976  SLOT(OperationUngroupAllAimedPos()));
977 
978  degrouper->addAction("Drawing parameters of all the views", FParent ,
979  SLOT(OperationUngroupAllDrawing()));
980 
981  degrouper -> addSeparator() ;
982 
983  degrouper -> addAction("Curent view from others" ,
984  FParent , SLOT(OperationUngroupGeneral()) ,
985  *new QKeySequence("SHIFT+ALT+Key_G")) ;
986 
987  degrouper -> addSeparator() ;
988 
989  degrouper->addAction("Precompiles of this view" ,
990  FParent, SLOT(OperationUngroupPrecompiles()));
991 
992  degrouper -> addAction("Camera position of this view" ,
993  FParent , SLOT(OperationUngroupEyePos()));
994 
995  degrouper->addAction("Aimed point of this view" ,
996  FParent, SLOT(OperationUngroupAimedPos()));
997 
998  degrouper->addAction("Drawing parameters of this view", FParent ,
999  SLOT(OperationUngroupDrawing()));
1000 
1001  QMenu * pointDeMire = vues->addMenu("&Aimed point") ;
1002 
1003  pointDeMire -> addAction("&Origin" , FParent ,
1004  SLOT(mireOrigine()) , Qt::Key_O) ;
1005  pointDeMire->addAction("&Vertex incident to 'last'",
1006  FParent, SLOT(mireSommet()), Qt::Key_Exclam);
1007 
1008  pointDeMire -> addSeparator();
1009 
1010  QMenu* centre = pointDeMire ->addMenu("&Center of the bounding box of");
1011 
1012  centre -> addAction("&Face incident to 'last'",
1013  FParent , SLOT(mireFace())) ;
1014  centre -> addAction("&Volume incident to 'last'" , FParent ,
1015  SLOT(mireVolume())) ;
1016  centre->addAction("&Connected component incident to 'last'", FParent ,
1017  SLOT(mireCompConnexe())) ;
1018  centre -> addSeparator() ;
1019  centre -> addAction("All the &marked darts" , FParent ,
1020  SLOT(mireBrinsMarques()) , Qt::SHIFT + Qt::Key_O) ;
1021  centre -> addAction("&All the darts" , FParent ,
1022  SLOT(mireBrins()) , Qt::CTRL + Qt::SHIFT + Qt::Key_O) ;
1023 
1024  //- Spamod
1025 #ifdef MODULE_SPAMOD
1026  QMenu * visualisation = vues -> addMenu("&Spamod mode") ;
1027 
1028  visualisation -> addAction("&Burst view" , FParent,
1029  SLOT(callbackBackToBurstView())) ;
1030  visualisation -> addSeparator() ;
1031  visualisation -> addAction("&Topological view" , FParent ,
1032  SLOT(callbackTopologicalView())) ;
1033  visualisation -> addAction("&Euclidean view" , FParent ,
1034  SLOT(callbackEuclidianView())) ;
1035  visualisation -> addAction("&Analytic view" , FParent ,
1036  SLOT(callbackAnalyticView())) ;
1037  visualisation -> addAction("&Voxels view" , FParent ,
1038  SLOT(callbackVoxelView())) ;
1039  visualisation -> addAction("&K2 view" , FParent ,
1040  SLOT(callbackK2View())) ;
1041  visualisation -> addSeparator() ;
1042  visualisation -> addAction("&Switch to the next view" , FParent ,
1043  SLOT(callbackSpamodSwitchToNextView())) ;
1044 #endif // MODULE_SPAMOD
1045 }
1046 
1047 //******************************************
1048 // Destructeur
1049 //******************************************
1051 
1052