Restore commit 4476

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4478 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
scorpio810
2016-05-13 15:00:22 +00:00
parent f077361856
commit 662e3b20d2
31 changed files with 1999 additions and 849 deletions

View File

@@ -67,14 +67,14 @@ ElementsPanelWidget::ElementsPanelWidget(QWidget *parent) : QWidget(parent) {
prj_activate = new QAction(QET::Icons::ProjectFile, tr("Basculer vers ce projet"), this);
prj_close = new QAction(QET::Icons::DocumentClose, tr("Fermer ce projet"), this);
prj_edit_prop = new QAction(QET::Icons::DialogInformation, tr("Propriétés du projet"), this);
prj_prop_diagram = new QAction(QET::Icons::DialogInformation, tr("Propriétés du folio"), this);
prj_add_diagram = new QAction(QET::Icons::DiagramAdd, tr("Ajouter un folio"), this);
prj_del_diagram = new QAction(QET::Icons::DiagramDelete, tr("Supprimer ce folio"), this);
prj_move_diagram_up = new QAction(QET::Icons::GoUp, tr("Remonter ce folio"), this);
prj_move_diagram_down = new QAction(QET::Icons::GoDown, tr("Abaisser ce folio"), this);
prj_move_diagram_upx10 = new QAction(QET::Icons::GoUp, tr("Remonter ce folio x10"), this);
prj_move_diagram_top = new QAction(QET::Icons::GoUp, tr("Remonter ce folio au debut"), this);
prj_move_diagram_downx10 = new QAction(QET::Icons::GoDown, tr("Abaisser ce folio x10"), this);
prj_prop_diagram = new QAction(QET::Icons::DialogInformation, tr("Propriétés du folio"), this);
prj_add_diagram = new QAction(QET::Icons::DiagramAdd, tr("Ajouter un folio"), this);
prj_del_diagram = new QAction(QET::Icons::DiagramDelete, tr("Supprimer ce folio"), this);
prj_move_diagram_up = new QAction(QET::Icons::GoUp, tr("Remonter ce folio"), this);
prj_move_diagram_down = new QAction(QET::Icons::GoDown, tr("Abaisser ce folio"), this);
prj_move_diagram_upx10 = new QAction(QET::Icons::GoUp, tr("Remonter ce folio x10"), this);
prj_move_diagram_top = new QAction(QET::Icons::GoUp, tr("Remonter ce folio au debut"), this);
prj_move_diagram_downx10 = new QAction(QET::Icons::GoDown, tr("Abaisser ce folio x10"), this);
tbt_add = new QAction(QET::Icons::TitleBlock, tr("Nouveau modèle"), this);
tbt_edit = new QAction(QET::Icons::TitleBlock, tr("Éditer ce modèle"), this);
tbt_remove = new QAction(QET::Icons::TitleBlock, tr("Supprimer ce modèle"), this);
@@ -777,6 +777,19 @@ void ElementsPanelWidget::deleteElement() {
}
}
/**
Treat key press event inside elements panel widget
*/
void ElementsPanelWidget::keyPressEvent (QKeyEvent *e) {
switch(e -> key()) {
case Qt::Key_Delete: //delete diagram through elements panel widget
if (Diagram *selected_diagram = elements_panel -> selectedDiagram()) {
emit(requestForDiagramDeletion(selected_diagram));
}
}
return;
}
/**
Lance l'editeur d'element pour l'element filename
@param location Emplacement de l'element a editer