[qet] qet/qet: [5898] Elementspanelwidget: adds keyboard shortcuts to quickly move up, down, |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 5898
Author: scorpio810
Date: 2019-05-31 00:17:03 +0200 (Fri, 31 May 2019)
Log Message:
-----------
Elementspanelwidget: adds keyboard shortcuts to quickly move up, down,
or move the targeted folio to the beginning of the project
F3 MoveUp
F4 MoveDown
F5 MoveUpTop
Modified Paths:
--------------
trunk/sources/elementspanelwidget.cpp
Modified: trunk/sources/elementspanelwidget.cpp
===================================================================
--- trunk/sources/elementspanelwidget.cpp 2019-05-30 18:49:43 UTC (rev 5897)
+++ trunk/sources/elementspanelwidget.cpp 2019-05-30 22:17:03 UTC (rev 5898)
@@ -60,7 +60,13 @@
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);
-
+
+ prj_del_diagram -> setShortcut(QKeySequence(Qt::Key_Delete));
+ prj_move_diagram_up -> setShortcut(QKeySequence(Qt::Key_F3));
+ prj_move_diagram_down -> setShortcut(QKeySequence(Qt::Key_F4));
+ prj_move_diagram_top -> setShortcut(QKeySequence(Qt::Key_F5));
+
+
// initialise le champ de texte pour filtrer avec une disposition horizontale
filter_textfield = new QLineEdit(this);
filter_textfield -> setClearButtonEnabled(true);
@@ -406,6 +412,22 @@
if (Diagram *selected_diagram = elements_panel -> selectedDiagram()) {
emit(requestForDiagramDeletion(selected_diagram));
}
+ break;
+ case Qt::Key_F3:
+ if (Diagram *selected_diagram = elements_panel -> selectedDiagram()) {
+ emit(requestForDiagramMoveUp(selected_diagram));
+ }
+ break;
+ case Qt::Key_F4:
+ if (Diagram *selected_diagram = elements_panel -> selectedDiagram()) {
+ emit(requestForDiagramMoveDown(selected_diagram));
+ }
+ break;
+ case Qt::Key_F5:
+ if (Diagram *selected_diagram = elements_panel -> selectedDiagram()) {
+ emit(requestForDiagramMoveUpTop(selected_diagram));
+ }
+ break;
}
return;
}