From 99be8eab42d06e662357b2d99e6da6d9d0ff5926 Mon Sep 17 00:00:00 2001 From: Arno Date: Sun, 7 Jun 2015 05:04:42 +0200 Subject: Usability fixes * start maximized * focus MappingTree when showing NewPicsDialog * Keyboard Shortcuts for FilesystemWidget: CTRL+UP: go to parent dir CTRL+LEFT: go back CTRL+U: unpack * close UnpackDialog when done --- filesystemwidget.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'filesystemwidget.cpp') diff --git a/filesystemwidget.cpp b/filesystemwidget.cpp index 461780f..619944a 100644 --- a/filesystemwidget.cpp +++ b/filesystemwidget.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include "filesystemwidget.h" #include "filesystemdirproxy.h" @@ -689,6 +690,22 @@ const QString FilesystemWidget::selectedDir(){ return QString(); } +void FilesystemWidget::keyPressEvent(QKeyEvent *e){ + if(e->key() == Qt::Key_Left && (e->modifiers() & Qt::ControlModifier)){ + goBack(); + return; + } + if(e->key() == Qt::Key_Up && (e->modifiers() & Qt::ControlModifier)){ + parentDir(); + return; + } + if(e->key() == Qt::Key_U && (e->modifiers() & Qt::ControlModifier)){ + unpack(); + return; + } + QWidget::keyPressEvent(e); +} + void FilesystemWidget::dirExpanded(const QModelIndex &idx){ QModelIndex real = mDirProxy->mapToSource(idx); if(real.isValid()){ -- cgit v1.2.3-70-g09d2