diff --git a/Plugins/org.mitk.gui.qt.datamanager/src/internal/QmitkDelKeyFilter.cpp b/Plugins/org.mitk.gui.qt.datamanager/src/internal/QmitkDelKeyFilter.cpp deleted file mode 100644 index 014a465f42..0000000000 --- a/Plugins/org.mitk.gui.qt.datamanager/src/internal/QmitkDelKeyFilter.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#include "QmitkDelKeyFilter.h" - -#include -#include - -QmitkDelKeyFilter::QmitkDelKeyFilter( QObject* _DataManagerView ) -: QObject(_DataManagerView) -{ - -} - -bool QmitkDelKeyFilter::eventFilter( QObject *obj, QEvent *event ) -{ - if (event->type() == QEvent::KeyPress) - { - QmitkDataManagerView* _DataManagerView = qobject_cast(this->parent()); - QKeyEvent *keyEvent = static_cast(event); - if(keyEvent->key() == Qt::Key_Delete && _DataManagerView) - { - // trigger deletion of selected node(s) - _DataManagerView->ActionRemoveTriggered(false); - // return true: this means the delete key event is not send to the table - return true; - } - } - // standard event processing - return QObject::eventFilter(obj, event); -} diff --git a/Plugins/org.mitk.gui.qt.datamanager/src/internal/QmitkDelKeyFilter.h b/Plugins/org.mitk.gui.qt.datamanager/src/internal/QmitkDelKeyFilter.h deleted file mode 100644 index 5412ab76fc..0000000000 --- a/Plugins/org.mitk.gui.qt.datamanager/src/internal/QmitkDelKeyFilter.h +++ /dev/null @@ -1,35 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#ifndef QMITKDELKEYFILTER_H_ -#define QMITKDELKEYFILTER_H_ - -#include - -/// -/// A small class which "eats" all Del-Key-pressed events on the node table. -/// When the Del Key is pressed selected nodes should be removed. -/// -class QmitkDelKeyFilter : public QObject -{ - Q_OBJECT -public: - QmitkDelKeyFilter(QObject* _DataManagerView = 0); -protected: - bool eventFilter(QObject *obj, QEvent *event); -}; - -#endif // QMITKDELKEYFILTER_H_