From d54f8bc5effe3c008ff39f0e55bf1b71e08c19af Mon Sep 17 00:00:00 2001 From: Arno Date: Thu, 19 Jul 2018 18:21:11 +0200 Subject: Just code shuffle, no functional change Split up all the classes in mappingtreewidget into separate files to make editing easier. --- mappingtreeresultview.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 mappingtreeresultview.cpp (limited to 'mappingtreeresultview.cpp') diff --git a/mappingtreeresultview.cpp b/mappingtreeresultview.cpp new file mode 100644 index 0000000..f7d4d0b --- /dev/null +++ b/mappingtreeresultview.cpp @@ -0,0 +1,24 @@ +/* + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version + 2 of the License, or (at your option) any later version. +*/ + +#include + +#include "mappingtreeresultview.h" + +MappingTreeResultView::MappingTreeResultView(QWidget *parent) : SmTreeView(parent) {} + +void MappingTreeResultView::keyPressEvent(QKeyEvent *e){ + if(e->key() == Qt::Key_Left && (e->modifiers() & Qt::ControlModifier)){ + clearFocus(); + emit shiftFocus(); + return; + } + if(e->key() == Qt::Key_Left){ + emit removeMapping(); + } + SmTreeView::keyPressEvent(e); +} -- cgit v1.2.3-70-g09d2