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

void QETDiagramEditor::actions (  )  [protected]

Mise en place des actions

Definition at line 172 of file qetdiagrameditor.cpp.

References about_qet, about_qt, add_column, add_row, add_text, addDiagramToProject(), cascade_window, cleanCurrentProject(), close_file, closeCurrentProject(), conductor_default, conductor_reset, configure, copy, cut, delete_selection, editCurrentDiagramProperties(), editCurrentProjectProperties(), editSelectionProperties(), export_diagram, exportDialog(), fullscreen, grp_view_mode, grp_visu_sel, import_diagram, infos_diagram, QETApp::instance(), mode_selection, mode_visualise, new_file, newProject(), next_window, open_file, openProject(), paste, prev_window, print, printDialog(), prj_add_diagram, prj_clean, prj_del_diagram, prj_edit_prop, quit_editor, redo, remove_column, remove_row, removeDiagramFromProject(), rotate_selection, save(), save_all, save_file, save_file_sous, saveAll(), saveAsDialog(), select_all, select_invert, select_nothing, selection_prop, setTabbedMode(), setWindowedMode(), slot_addColumn(), slot_addRow(), slot_addText(), slot_copy(), slot_cut(), slot_delete(), slot_editDefaultConductors(), slot_paste(), slot_removeColumn(), slot_removeRow(), slot_resetConductors(), slot_rotate(), slot_selectAll(), slot_selectInvert(), slot_selectNothing(), slot_setSelectionMode(), slot_setVisualisationMode(), slot_updateFullScreenAction(), slot_zoomFit(), slot_zoomIn(), slot_zoomOut(), slot_zoomReset(), tabbed_view_mode, tile_window, toggleFullScreen(), undo, windowed_view_mode, zoom_fit, zoom_in, zoom_out, and zoom_reset.

Referenced by QETDiagramEditor(), and slot_updateWindowsMenu().

                               {
      // icones et labels
      new_file          = new QAction(QET::Icons::DocumentNew,           tr("&Nouveau"),                             this);
      open_file         = new QAction(QET::Icons::DocumentOpen,          tr("&Ouvrir"),                              this);
      close_file        = new QAction(QET::Icons::DocumentClose,         tr("&Fermer"),                              this);
      save_file         = new QAction(QET::Icons::DocumentSave,          tr("&Enregistrer"),                         this);
      save_file_sous    = new QAction(QET::Icons::DocumentSaveAs,        tr("Enregistrer sous"),                     this);
      save_all          = new QAction(QET::Icons::DocumentSaveAll,       tr("&Enregistrer tous les sch\351mas"),     this);
      import_diagram    = new QAction(QET::Icons::DocumentImport,        tr("&Importer"),                            this);
      export_diagram    = new QAction(QET::Icons::DocumentExport,        tr("E&xporter"),                            this);
      print             = new QAction(QET::Icons::DocumentPrint,         tr("Imprimer"),                             this);
      quit_editor       = new QAction(QET::Icons::ApplicationExit,       tr("&Quitter"),                             this);
      
      undo = undo_group.createUndoAction(this, tr("Annuler"));
      undo -> setIcon(QET::Icons::EditUndo);
      redo = undo_group.createRedoAction(this, tr("Refaire"));
      redo -> setIcon(QET::Icons::EditRedo);
      cut               = new QAction(QET::Icons::EditCut,               tr("Co&uper"),                              this);
      copy              = new QAction(QET::Icons::EditCopy,              tr("Cop&ier"),                              this);
      paste             = new QAction(QET::Icons::EditPaste,             tr("C&oller"),                              this);
      select_all        = new QAction(QET::Icons::EditSelectAll,         tr("Tout s\351lectionner"),                 this);
      select_nothing    = new QAction(                                   tr("D\351s\351lectionner tout"),            this);
      select_invert     = new QAction(                                   tr("Inverser la s\351lection"),             this);
      delete_selection  = new QAction(QET::Icons::EditDelete,            tr("Supprimer"),                            this);
      rotate_selection  = new QAction(QET::Icons::ObjectRotateRight,     tr("Pivoter"),                              this);
      selection_prop    = new QAction(QET::Icons::DialogInformation,     tr("Propri\351t\351s de la s\351lection"),  this);
      conductor_reset   = new QAction(QET::Icons::ConductorSettings,     tr("R\351initialiser les conducteurs"),     this);
      conductor_default = new QAction(QET::Icons::DefaultConductor,      tr("Conducteurs par d\351faut"),            this);
      infos_diagram     = new QAction(QET::Icons::DialogInformation,     tr("Propri\351t\351s du sch\351ma"),        this);
      add_text          = new QAction(QET::Icons::PartTextField,         tr("Ajouter un champ de texte"),            this);
      add_column        = new QAction(QET::Icons::AddColumn,             tr("Ajouter une colonne"),                  this);
      remove_column     = new QAction(QET::Icons::RemoveColumn,          tr("Enlever une colonne"),                  this);
      add_row           = new QAction(QET::Icons::AddRow,                tr("Ajouter une ligne"),                    this);
      remove_row        = new QAction(QET::Icons::RemoveRow,             tr("Enlever une ligne"),                    this);
      
      prj_edit_prop     = new QAction(QET::Icons::DialogInformation,     tr("Propri\351t\351s du projet"),           this);
      prj_add_diagram   = new QAction(QET::Icons::DiagramAdd,            tr("Ajouter un sch\351ma"),                 this);
      prj_del_diagram   = new QAction(QET::Icons::DiagramDelete,         tr("Supprimer le sch\351ma"),               this);
      prj_clean         = new QAction(QET::Icons::EditClear,             tr("Nettoyer le projet"),                   this);
      
      zoom_in           = new QAction(QET::Icons::ZoomIn,                tr("Zoom avant"),                           this);
      zoom_out          = new QAction(QET::Icons::ZoomOut,               tr("Zoom arri\350re"),                      this);
      zoom_fit          = new QAction(QET::Icons::ZoomFitBest,           tr("Zoom adapt\351"),                       this);
      zoom_reset        = new QAction(QET::Icons::ZoomOriginal,          tr("Pas de zoom"),                          this);
      
      tabbed_view_mode  = new QAction(                                   tr("en utilisant des onglets"),             this);
      windowed_view_mode= new QAction(                                   tr("en utilisant des fen\352tres"),         this);
      
      mode_selection    = new QAction(QET::Icons::PartSelect,            tr("Mode Selection"),                       this);
      mode_visualise    = new QAction(QET::Icons::ViewMove,              tr("Mode Visualisation"),                   this);
      
      fullscreen        = new QAction(this);
      slot_updateFullScreenAction();
      configure         = new QAction(QET::Icons::Configure,             tr("&Configurer QElectroTech"),             this);
      
      tile_window        = new QAction(                                  tr("&Mosa\357que"),                         this);
      cascade_window     = new QAction(                                  tr("&Cascade"),                             this);
      next_window        = new QAction(                                  tr("Projet suivant"),                       this);
      prev_window        = new QAction(                                  tr("Projet pr\351c\351dent"),               this);
      
      about_qet         = new QAction(QET::Icons::QETLogo,               tr("\300 &propos de QElectroTech"),         this);
      about_qt          = new QAction(QET::Icons::QtLogo,                tr("\300 propos de &Qt"),                   this);
      
      // raccourcis clavier
      new_file          -> setShortcut(QKeySequence::New);
      open_file         -> setShortcut(QKeySequence::Open);
      close_file        -> setShortcut(QKeySequence::Close);
      save_file         -> setShortcut(QKeySequence::Save);
      import_diagram    -> setShortcut(QKeySequence(tr("Ctrl+Shift+I")));
      export_diagram    -> setShortcut(QKeySequence(tr("Ctrl+Shift+X")));
      print             -> setShortcut(QKeySequence(QKeySequence::Print));
      quit_editor       -> setShortcut(QKeySequence(tr("Ctrl+Q")));
      
      undo              -> setShortcut(QKeySequence::Undo);
      redo              -> setShortcut(QKeySequence::Redo);
      cut               -> setShortcut(QKeySequence::Cut);
      copy              -> setShortcut(QKeySequence::Copy);
      paste             -> setShortcut(QKeySequence::Paste);
      select_all        -> setShortcut(QKeySequence::SelectAll);
      select_nothing    -> setShortcut(QKeySequence(tr("Ctrl+Shift+A")));
      select_invert     -> setShortcut(QKeySequence(tr("Ctrl+I")));
      delete_selection  -> setShortcut(QKeySequence(tr("Suppr")));
      rotate_selection  -> setShortcut(QKeySequence(tr("Ctrl+R")));
      selection_prop    -> setShortcut(QKeySequence(tr("Ctrl+J")));
      conductor_reset   -> setShortcut(QKeySequence(tr("Ctrl+K")));
      infos_diagram     -> setShortcut(QKeySequence(tr("Ctrl+L")));
      conductor_default -> setShortcut(QKeySequence(tr("Ctrl+D")));
      
      prj_add_diagram   -> setShortcut(QKeySequence(tr("Ctrl+T")));
      
      zoom_in           -> setShortcut(QKeySequence::ZoomIn);
      zoom_out          -> setShortcut(QKeySequence::ZoomOut);
      zoom_fit          -> setShortcut(QKeySequence(tr("Ctrl+9")));
      zoom_reset        -> setShortcut(QKeySequence(tr("Ctrl+0")));
      
      fullscreen        -> setShortcut(QKeySequence(tr("Ctrl+Shift+F")));
      
      next_window       -> setShortcut(QKeySequence::NextChild);
      prev_window       -> setShortcut(QKeySequence::PreviousChild);
      
      // affichage dans la barre de statut
      new_file          -> setStatusTip(tr("Cr\351e un nouveau sch\351ma", "status bar tip"));
      open_file         -> setStatusTip(tr("Ouvre un sch\351ma existant", "status bar tip"));
      close_file        -> setStatusTip(tr("Ferme le sch\351ma courant", "status bar tip"));
      save_file         -> setStatusTip(tr("Enregistre le sch\351ma courant", "status bar tip"));
      save_file_sous    -> setStatusTip(tr("Enregistre le sch\351ma courant avec un autre nom de fichier", "status bar tip"));
      save_all          -> setStatusTip(tr("Enregistre tous les sch\351mas du projet courant", "status bar tip"));
      import_diagram    -> setStatusTip(tr("Importe un sch\351ma dans le sch\351ma courant", "status bar tip"));
      export_diagram    -> setStatusTip(tr("Exporte le sch\351ma courant dans un autre format", "status bar tip"));
      print             -> setStatusTip(tr("Imprime le sch\351ma courant", "status bar tip"));
      quit_editor       -> setStatusTip(tr("Ferme l'application QElectroTech", "status bar tip"));
      
      undo              -> setStatusTip(tr("Annule l'action pr\351c\351dente", "status bar tip"));
      redo              -> setStatusTip(tr("Restaure l'action annul\351e", "status bar tip"));
      cut               -> setStatusTip(tr("Transf\350re les \351l\351ments s\351lectionn\351s dans le presse-papier", "status bar tip"));
      copy              -> setStatusTip(tr("Copie les \351l\351ments s\351lectionn\351s dans le presse-papier", "status bar tip"));
      paste             -> setStatusTip(tr("Place les \351l\351ments du presse-papier sur le sch\351ma", "status bar tip"));
      select_all        -> setStatusTip(tr("S\351lectionne tous les \351l\351ments du sch\351ma", "status bar tip"));
      select_nothing    -> setStatusTip(tr("D\351s\351lectionne tous les \351l\351ments du sch\351ma", "status bar tip"));
      select_invert     -> setStatusTip(tr("D\351s\351lectionne les \351l\351ments s\351lectionn\351s et s\351lectionne les \351l\351ments non s\351lectionn\351s", "status bar tip"));
      delete_selection  -> setStatusTip(tr("Enl\350ve les \351l\351ments s\351lectionn\351s du sch\351ma", "status bar tip"));
      rotate_selection  -> setStatusTip(tr("Pivote les \351l\351ments s\351lectionn\351s", "status bar tip"));
      selection_prop    -> setStatusTip(tr("\311dite les propri\351t\351s des objets s\351lectionn\351", "status bar tip"));
      conductor_reset   -> setStatusTip(tr("Recalcule les chemins des conducteurs sans tenir compte des modifications", "status bar tip"));
      conductor_default -> setStatusTip(tr("Sp\351cifie les propri\351t\351s par d\351faut des conducteurs", "status bar tip"));
      infos_diagram     -> setStatusTip(tr("\311dite les informations affich\351es par le cartouche", "status bar tip"));
      add_column        -> setStatusTip(tr("Ajoute une colonne au sch\351ma", "status bar tip"));
      remove_column     -> setStatusTip(tr("Enl\350ve une colonne au sch\351ma", "status bar tip"));
      add_row           -> setStatusTip(tr("Agrandit le sch\351ma en hauteur", "status bar tip"));
      remove_row        -> setStatusTip(tr("R\351tr\351cit le sch\351ma en hauteur", "status bar tip"));
      
      zoom_in           -> setStatusTip(tr("Agrandit le sch\351ma", "status bar tip"));
      zoom_out          -> setStatusTip(tr("R\351tr\351cit le sch\351ma", "status bar tip"));
      zoom_fit          -> setStatusTip(tr("Adapte la taille du sch\351ma afin qu'il soit enti\350rement visible", "status bar tip"));
      zoom_reset        -> setStatusTip(tr("Restaure le zoom par d\351faut", "status bar tip"));
      
      windowed_view_mode -> setStatusTip(tr("Pr\351sente les diff\351rents projets ouverts dans des sous-fen\352tres", "status bar tip"));
      tabbed_view_mode   -> setStatusTip(tr("Pr\351sente les diff\351rents projets ouverts des onglets", "status bar tip"));
      
      mode_selection    -> setStatusTip(tr("Permet de s\351lectionner les \351l\351ments", "status bar tip"));
      mode_visualise    -> setStatusTip(tr("Permet de visualiser le sch\351ma sans pouvoir le modifier", "status bar tip"));
      
      configure         -> setStatusTip(tr("Permet de r\351gler diff\351rents param\350tres de QElectroTech", "status bar tip"));
      
      tile_window       -> setStatusTip(tr("Dispose les fen\352tres en mosa\357que", "status bar tip"));
      cascade_window    -> setStatusTip(tr("Dispose les fen\352tres en cascade", "status bar tip"));
      next_window       -> setStatusTip(tr("Active le projet suivant", "status bar tip"));
      prev_window       -> setStatusTip(tr("Active le projet pr\351c\351dent", "status bar tip"));
      
      about_qet         -> setStatusTip(tr("Affiche des informations sur QElectroTech", "status bar tip"));
      about_qt          -> setStatusTip(tr("Affiche des informations sur la biblioth\350que Qt", "status bar tip"));
      
      // traitements speciaux
      add_text           -> setCheckable(true);
      windowed_view_mode -> setCheckable(true);
      tabbed_view_mode   -> setCheckable(true);
      mode_selection     -> setCheckable(true);
      mode_visualise     -> setCheckable(true);
      mode_selection     -> setChecked(true);
      
      grp_visu_sel = new QActionGroup(this);
      grp_visu_sel -> addAction(mode_selection);
      grp_visu_sel -> addAction(mode_visualise);
      grp_visu_sel -> setExclusive(true);
      
      grp_view_mode = new QActionGroup(this);
      grp_view_mode -> addAction(windowed_view_mode);
      grp_view_mode -> addAction(tabbed_view_mode);
      grp_view_mode -> setExclusive(true);
      
      QETApp *qet_app = QETApp::instance();
      
      // connexion a des slots
      connect(quit_editor,        SIGNAL(triggered()), this,       SLOT(close())                     );
      connect(select_all,         SIGNAL(triggered()), this,       SLOT(slot_selectAll())            );
      connect(select_nothing,     SIGNAL(triggered()), this,       SLOT(slot_selectNothing())        );
      connect(select_invert,      SIGNAL(triggered()), this,       SLOT(slot_selectInvert())         );
      connect(delete_selection,   SIGNAL(triggered()), this,       SLOT(slot_delete())               );
      connect(rotate_selection,   SIGNAL(triggered()), this,       SLOT(slot_rotate())               );
      connect(fullscreen,         SIGNAL(triggered()), this,       SLOT(toggleFullScreen())          );
      connect(configure,          SIGNAL(triggered()), qet_app,    SLOT(configureQET())              );
      connect(windowed_view_mode, SIGNAL(triggered()), this,       SLOT(setWindowedMode())           );
      connect(tabbed_view_mode,   SIGNAL(triggered()), this,       SLOT(setTabbedMode())             );
      connect(mode_selection,     SIGNAL(triggered()), this,       SLOT(slot_setSelectionMode())     );
      connect(mode_visualise,     SIGNAL(triggered()), this,       SLOT(slot_setVisualisationMode()) );
      connect(about_qet,          SIGNAL(triggered()), qet_app,    SLOT(aboutQET())                  );
      connect(about_qt,           SIGNAL(triggered()), qet_app,    SLOT(aboutQt())                   );
      connect(prj_edit_prop,      SIGNAL(triggered()), this,       SLOT(editCurrentProjectProperties()));
      connect(prj_add_diagram,    SIGNAL(triggered()), this,       SLOT(addDiagramToProject())       );
      connect(prj_del_diagram,    SIGNAL(triggered()), this,       SLOT(removeDiagramFromProject())  );
      connect(prj_clean,          SIGNAL(triggered()), this,       SLOT(cleanCurrentProject())       );
      connect(zoom_in,            SIGNAL(triggered()), this,       SLOT(slot_zoomIn())               );
      connect(zoom_out,           SIGNAL(triggered()), this,       SLOT(slot_zoomOut())              );
      connect(zoom_fit,           SIGNAL(triggered()), this,       SLOT(slot_zoomFit())              );
      connect(zoom_reset,         SIGNAL(triggered()), this,       SLOT(slot_zoomReset())            );
      connect(print,              SIGNAL(triggered()), this,       SLOT(printDialog())               );
      connect(export_diagram,     SIGNAL(triggered()), this,       SLOT(exportDialog())              );
      connect(save_file_sous,     SIGNAL(triggered()), this,       SLOT(saveAsDialog())              );
      connect(save_file,          SIGNAL(triggered()), this,       SLOT(save())                      );
      connect(save_all,           SIGNAL(triggered()), this,       SLOT(saveAll())                   );
      connect(new_file,           SIGNAL(triggered()), this,       SLOT(newProject())                );
      connect(open_file,          SIGNAL(triggered()), this,       SLOT(openProject())               );
      connect(close_file,         SIGNAL(triggered()), this,       SLOT(closeCurrentProject())       );
      connect(cut,                SIGNAL(triggered()), this,       SLOT(slot_cut())                  );
      connect(copy,               SIGNAL(triggered()), this,       SLOT(slot_copy())                 );
      connect(paste,              SIGNAL(triggered()), this,       SLOT(slot_paste())                );
      connect(tile_window,        SIGNAL(triggered()), &workspace, SLOT(tileSubWindows())            );
      connect(cascade_window,     SIGNAL(triggered()), &workspace, SLOT(cascadeSubWindows())         );
      connect(next_window,        SIGNAL(triggered()), &workspace, SLOT(activateNextSubWindow())     );
      connect(prev_window,        SIGNAL(triggered()), &workspace, SLOT(activatePreviousSubWindow()) );
      connect(selection_prop,     SIGNAL(triggered()), this,       SLOT(editSelectionProperties())   );
      connect(conductor_reset,    SIGNAL(triggered()), this,       SLOT(slot_resetConductors())      );
      connect(conductor_default,  SIGNAL(triggered()), this,       SLOT(slot_editDefaultConductors()));
      connect(infos_diagram,      SIGNAL(triggered()), this,       SLOT(editCurrentDiagramProperties()));
      connect(add_text,           SIGNAL(triggered()), this,       SLOT(slot_addText())              );
      connect(add_column,         SIGNAL(triggered()), this,       SLOT(slot_addColumn())            );
      connect(remove_column,      SIGNAL(triggered()), this,       SLOT(slot_removeColumn())         );
      connect(add_row,            SIGNAL(triggered()), this,       SLOT(slot_addRow())               );
      connect(remove_row,         SIGNAL(triggered()), this,       SLOT(slot_removeRow())            );
}


Generated by  Doxygen 1.6.0   Back to index