Logo Search packages:      
Sourcecode: qelectrotech version File versions  Download package

void QETDiagramEditor::menus (  )  [private]

Mise en place des menus

Definition at line 417 of file qetdiagrameditor.cpp.

References about_qet, about_qt, add_column, add_row, close_file, conductor_default, conductor_reset, configure, copy, cut, delete_selection, export_diagram, fullscreen, infos_diagram, mode_selection, mode_visualise, new_file, open_file, openRecentFile(), paste, print, prj_add_diagram, prj_clean, prj_del_diagram, prj_edit_prop, QETApp::projectsRecentFiles(), qdw_pa, qdw_undo, quit_editor, redo, remove_column, remove_row, rotate_selection, save_all, save_file, save_file_sous, select_all, select_invert, select_nothing, selection_prop, slot_updateWindowsMenu(), tabbed_view_mode, undo, windowed_view_mode, zoom_fit, zoom_in, zoom_out, and zoom_reset.

Referenced by QETDiagramEditor().

                             {
      QMenu *menu_fichier   = menuBar() -> addMenu(tr("&Fichier"));
      QMenu *menu_edition   = menuBar() -> addMenu(tr("&\311dition"));
      QMenu *menu_project   = menuBar() -> addMenu(tr("&Projet"));
      QMenu *menu_affichage = menuBar() -> addMenu(tr("Afficha&ge"));
      //QMenu *menu_outils    = menuBar() -> addMenu(tr("O&utils"));
      QMenu *menu_config    = menuBar() -> addMenu(tr("&Configuration"));
      windows_menu          = menuBar() -> addMenu(tr("Fe&n\352tres"));
      QMenu *menu_aide      = menuBar() -> addMenu(tr("&Aide"));
      
      // tear off feature rulezz... pas ^^ mais bon...
      menu_fichier   -> setTearOffEnabled(true);
      menu_edition   -> setTearOffEnabled(true);
      menu_project   -> setTearOffEnabled(true);
      menu_affichage -> setTearOffEnabled(true);
      //menu_outils    -> setTearOffEnabled(true);
      menu_config    -> setTearOffEnabled(true);
      windows_menu   -> setTearOffEnabled(true);
      menu_aide      -> setTearOffEnabled(true);
      
      // menu Fichier
      menu_fichier -> addAction(new_file);
      menu_fichier -> addAction(open_file);
      menu_fichier -> addMenu(QETApp::projectsRecentFiles() -> menu());
      connect(QETApp::projectsRecentFiles(), SIGNAL(fileOpeningRequested(const QString &)), this, SLOT(openRecentFile(const QString &)));
      menu_fichier -> addAction(save_file);
      menu_fichier -> addAction(save_file_sous);
      menu_fichier -> addAction(save_all);
      menu_fichier -> addAction(close_file);
      menu_fichier -> addSeparator();
      //menu_fichier -> addAction(import_diagram);
      menu_fichier -> addAction(export_diagram);
      //menu_fichier -> addSeparator();
      menu_fichier -> addAction(print);
      menu_fichier -> addSeparator();
      menu_fichier -> addAction(quit_editor);
      
      // menu Edition
      menu_edition -> addAction(undo);
      menu_edition -> addAction(redo);
      menu_edition -> addSeparator();
      menu_edition -> addAction(cut);
      menu_edition -> addAction(copy);
      menu_edition -> addAction(paste);
      menu_edition -> addSeparator();
      menu_edition -> addAction(select_all);
      menu_edition -> addAction(select_nothing);
      menu_edition -> addAction(select_invert);
      menu_edition -> addSeparator();
      menu_edition -> addAction(delete_selection);
      menu_edition -> addAction(rotate_selection);
      menu_edition -> addAction(selection_prop);
      menu_edition -> addSeparator();
      menu_edition -> addAction(conductor_reset);
      menu_edition -> addAction(conductor_default);
      menu_edition -> addSeparator();
      menu_edition -> addAction(infos_diagram);
      menu_edition -> addAction(add_column);
      menu_edition -> addAction(remove_column);
      menu_edition -> addAction(add_row);
      menu_edition -> addAction(remove_row);
      
      // menu Projet
      menu_project -> addAction(prj_edit_prop);
      menu_project -> addAction(prj_add_diagram);
      menu_project -> addAction(prj_del_diagram);
      menu_project -> addAction(prj_clean);
      
      // menu Configurer > Afficher
      QMenu *display_toolbars = createPopupMenu();
      display_toolbars -> setTearOffEnabled(true);
      display_toolbars -> setTitle(tr("Afficher"));
      display_toolbars -> setIcon(QET::Icons::ConfigureToolbars);
      main_bar    -> toggleViewAction() -> setStatusTip(tr("Affiche ou non la barre d'outils principale"));
      view_bar    -> toggleViewAction() -> setStatusTip(tr("Affiche ou non la barre d'outils Affichage"));
      diagram_bar -> toggleViewAction() -> setStatusTip(tr("Affiche ou non la barre d'outils Sch\351ma"));
      qdw_pa      -> toggleViewAction() -> setStatusTip(tr("Affiche ou non le panel d'appareils"));
      qdw_undo    -> toggleViewAction() -> setStatusTip(tr("Affiche ou non la liste des modifications"));
      
      // menu Affichage
      QMenu *projects_view_mode = menu_affichage -> addMenu(tr("Afficher les projets"));
      projects_view_mode -> setTearOffEnabled(true);
      projects_view_mode -> addAction(windowed_view_mode);
      projects_view_mode -> addAction(tabbed_view_mode);
      
      menu_affichage -> addSeparator();
      menu_affichage -> addAction(mode_selection);
      menu_affichage -> addAction(mode_visualise);
      menu_affichage -> addSeparator();
      menu_affichage -> addAction(zoom_in);
      menu_affichage -> addAction(zoom_out);
      menu_affichage -> addAction(zoom_fit);
      menu_affichage -> addAction(zoom_reset);
      
      // menu Configuration
      menu_config -> addMenu(display_toolbars);
      menu_config -> addAction(fullscreen);
      menu_config -> addAction(configure);
      
      // menu Fenetres
      slot_updateWindowsMenu();
      
      // menu Aide
      menu_aide -> addAction(about_qet);
      menu_aide -> addAction(about_qt);
}


Generated by  Doxygen 1.6.0   Back to index