diff --git a/Plugins/org.mitk.gui.qt.datamanager/files.cmake b/Plugins/org.mitk.gui.qt.datamanager/files.cmake index 6efe7d4b61..8f3295caaa 100644 --- a/Plugins/org.mitk.gui.qt.datamanager/files.cmake +++ b/Plugins/org.mitk.gui.qt.datamanager/files.cmake @@ -1,42 +1,38 @@ set(SRC_CPP_FILES berrySingleNodeSelection.cpp QmitkDataManagerView.cpp QmitkDataManagerPreferencePage.cpp - QmitkDataManagerHotkeysPrefPage.cpp ) set(INTERNAL_CPP_FILES mitkPluginActivator.cpp - QmitkNodeTableViewKeyFilter.cpp QmitkInfoDialog.cpp QmitkDataManagerItemDelegate.cpp ) set(MOC_H_FILES src/QmitkDataManagerView.h src/QmitkDataManagerPreferencePage.h - src/QmitkDataManagerHotkeysPrefPage.h - src/internal/QmitkNodeTableViewKeyFilter.h src/internal/QmitkInfoDialog.h src/internal/QmitkDataManagerItemDelegate.h src/internal/mitkPluginActivator.h ) set(CPP_FILES ) set(CACHED_RESOURCE_FILES plugin.xml resources/data-manager.svg ) set(QRC_FILES resources/datamanager.qrc ) foreach(file ${SRC_CPP_FILES}) set(CPP_FILES ${CPP_FILES} src/${file}) endforeach(file ${SRC_CPP_FILES}) foreach(file ${INTERNAL_CPP_FILES}) set(CPP_FILES ${CPP_FILES} src/internal/${file}) endforeach(file ${INTERNAL_CPP_FILES}) diff --git a/Plugins/org.mitk.gui.qt.datamanager/src/QmitkDataManagerHotkeysPrefPage.cpp b/Plugins/org.mitk.gui.qt.datamanager/src/QmitkDataManagerHotkeysPrefPage.cpp deleted file mode 100644 index defbae33ea..0000000000 --- a/Plugins/org.mitk.gui.qt.datamanager/src/QmitkDataManagerHotkeysPrefPage.cpp +++ /dev/null @@ -1,154 +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 "QmitkDataManagerHotkeysPrefPage.h" -#include - -#include "berryIPreferencesService.h" -#include "berryPlatform.h" - -#include -#include -#include -#include -#include -#include - -#include - -using namespace berry; - -QmitkDataManagerHotkeysPrefPage::QmitkDataManagerHotkeysPrefPage() -: m_MainControl(nullptr) -{ - -} - -void QmitkDataManagerHotkeysPrefPage::Init(berry::IWorkbench::Pointer ) -{ - -} - -void QmitkDataManagerHotkeysPrefPage::CreateQtControl(QWidget* parent) -{ - IPreferencesService* prefService = Platform::GetPreferencesService(); - berry::IPreferences::Pointer _DataManagerHotkeysPreferencesNode = prefService->GetSystemPreferences()->Node("/DataManager/Hotkeys"); - m_DataManagerHotkeysPreferencesNode = _DataManagerHotkeysPreferencesNode; - - m_HotkeyEditors["Make all nodes invisible"] = new QmitkHotkeyLineEdit("Ctrl+, V"); - - m_HotkeyEditors["Toggle visibility of selected nodes"] = new QmitkHotkeyLineEdit("V"); - - m_HotkeyEditors["Delete selected nodes"] = new QmitkHotkeyLineEdit("Del"); - - m_HotkeyEditors["Reinit selected nodes"] = new QmitkHotkeyLineEdit("R"); - - m_HotkeyEditors["Global Reinit"] = new QmitkHotkeyLineEdit("Ctrl+, R"); - - m_HotkeyEditors["Show Node Information"] = new QmitkHotkeyLineEdit("Ctrl+, I"); - - m_MainControl = new QWidget(parent); - - auto layout = new QGridLayout; - int i = 0; - for (auto it = m_HotkeyEditors.begin() - ; it != m_HotkeyEditors.end(); ++it) - { - layout->addWidget(new QLabel(it->first), i,0); - layout->addWidget(it->second, i,1); - layout->setRowStretch(i,0); - ++i; - } - layout->setRowStretch(i+1,10); - - m_MainControl->setLayout(layout); - this->Update(); -} - -QWidget* QmitkDataManagerHotkeysPrefPage::GetQtControl() const -{ - return m_MainControl; -} - -bool QmitkDataManagerHotkeysPrefPage::PerformOk() -{ - IPreferences::Pointer _DataManagerHotkeysPreferencesNode = m_DataManagerHotkeysPreferencesNode.Lock(); - if(_DataManagerHotkeysPreferencesNode.IsNotNull()) - { - bool duplicate = false; - QString keyString; - QString errString; - for (auto it = m_HotkeyEditors.begin() - ; it != m_HotkeyEditors.end(); ++it) - { - keyString = it->second->GetKeySequenceAsString(); - - if(keyString.isEmpty()) - errString = QString("No valid key sequence for \"%1\"").arg(it->first); - - if(errString.isEmpty()) - { - std::map::iterator it2; - // search for duplicated key - for (it2 = m_HotkeyEditors.begin(); it2 != m_HotkeyEditors.end(); ++it2) - { - if(it->first != it2->first && keyString == it2->second->GetKeySequenceAsString()) - { - duplicate = true; - break; - } - } - if(duplicate == true) - errString = QString("Duplicate hot key for \"%1\" and \"%2\"").arg(it->first).arg(it2->first); - } - - if(!errString.isEmpty()) - { - QMessageBox::critical(QApplication::activeWindow(), "Error", errString); - return false; - } - } - - //# no errors -> save all values and flush to file - for (auto it = m_HotkeyEditors.begin() - ; it != m_HotkeyEditors.end(); ++it) - _DataManagerHotkeysPreferencesNode->Put(it->first - , it->second->GetKeySequenceAsString()); - - _DataManagerHotkeysPreferencesNode->Flush(); - - return true; - } - return false; -} - -void QmitkDataManagerHotkeysPrefPage::PerformCancel() -{ - -} - -void QmitkDataManagerHotkeysPrefPage::Update() -{ - IPreferences::Pointer _DataManagerHotkeysPreferencesNode = m_DataManagerHotkeysPreferencesNode.Lock(); - if(_DataManagerHotkeysPreferencesNode.IsNotNull()) - { - for (auto it = m_HotkeyEditors.begin() - ; it != m_HotkeyEditors.end(); ++it) - { - it->second->setText(_DataManagerHotkeysPreferencesNode->Get(it->first, it->second->text())); - } - } -} diff --git a/Plugins/org.mitk.gui.qt.datamanager/src/QmitkDataManagerHotkeysPrefPage.h b/Plugins/org.mitk.gui.qt.datamanager/src/QmitkDataManagerHotkeysPrefPage.h deleted file mode 100644 index 59cf49fe46..0000000000 --- a/Plugins/org.mitk.gui.qt.datamanager/src/QmitkDataManagerHotkeysPrefPage.h +++ /dev/null @@ -1,72 +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 QMITKDATAMANAGERHOTKEYSPREFPAGE_H_ -#define QMITKDATAMANAGERHOTKEYSPREFPAGE_H_ - -#include "berryIQtPreferencePage.h" -#include - -#include -#include - -class QmitkHotkeyLineEdit; - -struct MITK_QT_DATAMANAGER QmitkDataManagerHotkeysPrefPage : public QObject, public berry::IQtPreferencePage -{ - Q_OBJECT - Q_INTERFACES(berry::IPreferencePage) - -public: - QmitkDataManagerHotkeysPrefPage(); - - void Init(berry::IWorkbench::Pointer workbench) override; - - void CreateQtControl(QWidget* parent) override; - - QWidget* GetQtControl() const override; - - /// - /// \see IPreferencePage::PerformOk() - /// - bool PerformOk() override; - - /// - /// \see IPreferencePage::PerformCancel() - /// - void PerformCancel() override; - - /// - /// \see IPreferencePage::Update() - /// - void Update() override; - -protected: - /// - /// The node from which the properties are taken (will be catched from the preferences service in ctor) - /// - berry::IPreferences::WeakPtr m_DataManagerHotkeysPreferencesNode; - - /// - /// Maps a label to hotkey lineedit, e.g. "Toggle Visibility of selected nodes" => QmitkHotkeyLineEdit - /// - std::map m_HotkeyEditors; - - QWidget* m_MainControl; -}; - -#endif /* QMITKDATAMANAGERHOTKEYSPREFPAGE_H_ */ diff --git a/Plugins/org.mitk.gui.qt.datamanager/src/QmitkDataManagerView.cpp b/Plugins/org.mitk.gui.qt.datamanager/src/QmitkDataManagerView.cpp index 94f448a606..265701ddde 100644 --- a/Plugins/org.mitk.gui.qt.datamanager/src/QmitkDataManagerView.cpp +++ b/Plugins/org.mitk.gui.qt.datamanager/src/QmitkDataManagerView.cpp @@ -1,296 +1,294 @@ /*=================================================================== 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 "QmitkDataManagerView.h" // mitk gui qt datamanager -#include "src/internal/QmitkNodeTableViewKeyFilter.h" #include "src/internal/QmitkInfoDialog.h" #include "src/internal/QmitkDataManagerItemDelegate.h" // mitk core #include #include #include #include #include #include #include #include #include #include #include #include #include #include -// mitk core services plugin -#include -#include - // qt widgets module #include #include #include #include #include // beery plugins #include #include #include #include #include #include #include #include #include +// mitk core services plugin +#include +#include + +// mitk gui common plugin +#include +#include +#include // mitk gui qt application plugin #include + +// mitk gui qt common plugin +#include + // qt #include #include #include #include #include #include #include #include #include #include -// mitk gui common plugin -#include -#include -#include - -// mitk gui qt common plugin -#include - const QString QmitkDataManagerView::VIEW_ID = "org.mitk.views.datamanager"; QmitkDataManagerView::QmitkDataManagerView() : m_GlobalReinitOnNodeDelete(true) , m_GlobalReinitOnNodeVisibilityChanged(false) , m_ItemDelegate(nullptr) { } QmitkDataManagerView::~QmitkDataManagerView() { // nothing here } void QmitkDataManagerView::CreateQtPartControl(QWidget* parent) { m_CurrentRowCount = 0; m_Parent = parent; //# Preferences berry::IPreferencesService* prefService = berry::Platform::GetPreferencesService(); berry::IBerryPreferences::Pointer prefs = (prefService->GetSystemPreferences()->Node(VIEW_ID)).Cast(); assert(prefs); prefs->OnChanged.AddListener(berry::MessageDelegate1(this, &QmitkDataManagerView::OnPreferencesChanged)); //# GUI m_NodeTreeModel = new QmitkDataStorageTreeModel(GetDataStorage(), prefs->GetBool("Place new nodes on top", true)); m_NodeTreeModel->setParent(parent); m_NodeTreeModel->SetAllowHierarchyChange(prefs->GetBool("Allow changing of parent node", false)); m_SurfaceDecimation = prefs->GetBool("Use surface decimation", false); // Prepare filters m_HelperObjectFilterPredicate = mitk::NodePredicateOr::New( mitk::NodePredicateProperty::New("helper object", mitk::BoolProperty::New(true)), mitk::NodePredicateProperty::New("hidden object", mitk::BoolProperty::New(true))); m_NodeWithNoDataFilterPredicate = mitk::NodePredicateData::New(nullptr); m_FilterModel = new QmitkDataStorageFilterProxyModel(); m_FilterModel->setSourceModel(m_NodeTreeModel); m_FilterModel->AddFilterPredicate(m_HelperObjectFilterPredicate); m_FilterModel->AddFilterPredicate(m_NodeWithNoDataFilterPredicate); //# Tree View (experimental) m_NodeTreeView = new QTreeView; m_NodeTreeView->setHeaderHidden(true); m_NodeTreeView->setSelectionMode(QAbstractItemView::ExtendedSelection); m_NodeTreeView->setSelectionBehavior(QAbstractItemView::SelectRows); m_NodeTreeView->setAlternatingRowColors(true); m_NodeTreeView->setDragEnabled(true); m_NodeTreeView->setDropIndicatorShown(true); m_NodeTreeView->setAcceptDrops(true); m_NodeTreeView->setContextMenuPolicy(Qt::CustomContextMenu); m_NodeTreeView->setModel(m_FilterModel); m_NodeTreeView->setTextElideMode(Qt::ElideMiddle); - m_NodeTreeView->installEventFilter(new QmitkNodeTableViewKeyFilter(this)); m_ItemDelegate = new QmitkDataManagerItemDelegate(m_NodeTreeView); m_NodeTreeView->setItemDelegate(m_ItemDelegate); connect(m_NodeTreeModel, SIGNAL(rowsInserted(const QModelIndex&, int, int)), this, SLOT(NodeTreeViewRowsInserted(const QModelIndex&, int, int))); connect(m_NodeTreeModel, SIGNAL(rowsRemoved(const QModelIndex&, int, int)), this, SLOT(NodeTreeViewRowsRemoved(const QModelIndex&, int, int))); connect(m_NodeTreeView->selectionModel(), SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)), this, SLOT(NodeSelectionChanged(const QItemSelection &, const QItemSelection &))); connect(m_NodeTreeModel, &QmitkDataStorageTreeModel::nodeVisibilityChanged, this, &QmitkDataManagerView::OnNodeVisibilityChanged); // data node context menu and menu actions m_DataNodeContextMenu = new QmitkDataNodeContextMenu(GetSite(), m_NodeTreeView); m_DataNodeContextMenu->SetDataStorage(GetDataStorage()); m_DataNodeContextMenu->SetSurfaceDecimation(m_SurfaceDecimation); connect(m_NodeTreeView, SIGNAL(customContextMenuRequested(const QPoint&)), m_DataNodeContextMenu, SLOT(OnContextMenuRequested(const QPoint&))); berry::IEditorRegistry* editorRegistry = berry::PlatformUI::GetWorkbench()->GetEditorRegistry(); QList editors = editorRegistry->GetEditors("*.mitk"); if (editors.size() > 1) { m_ShowInMapper = new QSignalMapper(this); foreach(berry::IEditorDescriptor::Pointer descriptor, editors) { QAction* action = new QAction(descriptor->GetLabel(), this); m_ShowInActions << action; m_ShowInMapper->connect(action, SIGNAL(triggered()), m_ShowInMapper, SLOT(map())); m_ShowInMapper->setMapping(action, descriptor->GetId()); } connect(m_ShowInMapper, SIGNAL(mapped(QString)), this, SLOT(ShowIn(QString))); } QGridLayout* dndFrameWidgetLayout = new QGridLayout; dndFrameWidgetLayout->addWidget(m_NodeTreeView, 0, 0); dndFrameWidgetLayout->setContentsMargins(0, 0, 0, 0); m_DnDFrameWidget = new QmitkDnDFrameWidget(m_Parent); m_DnDFrameWidget->setLayout(dndFrameWidgetLayout); QVBoxLayout* layout = new QVBoxLayout(parent); layout->addWidget(m_DnDFrameWidget); layout->setContentsMargins(0, 0, 0, 0); m_Parent->setLayout(layout); } void QmitkDataManagerView::SetFocus() { } void QmitkDataManagerView::NodeChanged(const mitk::DataNode* /*node*/) { // m_FilterModel->invalidate(); // fix as proposed by R. Khlebnikov in the mitk-users mail from 02.09.2014 QMetaObject::invokeMethod(m_FilterModel, "invalidate", Qt::QueuedConnection); } void QmitkDataManagerView::OnPreferencesChanged(const berry::IBerryPreferences* prefs) { if (m_NodeTreeModel->GetPlaceNewNodesOnTopFlag() != prefs->GetBool("Place new nodes on top", true)) { m_NodeTreeModel->SetPlaceNewNodesOnTop(!m_NodeTreeModel->GetPlaceNewNodesOnTopFlag()); } bool hideHelperObjects = !prefs->GetBool("Show helper objects", false); if (m_FilterModel->HasFilterPredicate(m_HelperObjectFilterPredicate) != hideHelperObjects) { if (hideHelperObjects) { m_FilterModel->AddFilterPredicate(m_HelperObjectFilterPredicate); } else { m_FilterModel->RemoveFilterPredicate(m_HelperObjectFilterPredicate); } } bool hideNodesWithNoData = !prefs->GetBool("Show nodes containing no data", false); if (m_FilterModel->HasFilterPredicate(m_NodeWithNoDataFilterPredicate) != hideNodesWithNoData) { if (hideNodesWithNoData) { m_FilterModel->AddFilterPredicate(m_NodeWithNoDataFilterPredicate); } else { m_FilterModel->RemoveFilterPredicate(m_NodeWithNoDataFilterPredicate); } } m_GlobalReinitOnNodeDelete = prefs->GetBool("Call global reinit if node is deleted", true); m_GlobalReinitOnNodeVisibilityChanged = prefs->GetBool("Call global reinit if node visibility is changed", false); m_NodeTreeView->expandAll(); m_SurfaceDecimation = prefs->GetBool("Use surface decimation", false); m_DataNodeContextMenu->SetSurfaceDecimation(m_SurfaceDecimation); m_NodeTreeModel->SetAllowHierarchyChange(prefs->GetBool("Allow changing of parent node", false)); GlobalReinitAction::Run(GetSite(), GetDataStorage()); } ////////////////////////////////////////////////////////////////////////// // Node tree modification ////////////////////////////////////////////////////////////////////////// void QmitkDataManagerView::NodeTreeViewRowsInserted(const QModelIndex& parent, int /*start*/, int /*end*/) { QModelIndex viewIndex = m_FilterModel->mapFromSource(parent); m_NodeTreeView->setExpanded(viewIndex, true); // a new row was inserted if (m_CurrentRowCount == 0 && m_NodeTreeModel->rowCount() == 1) { mitk::WorkbenchUtil::OpenRenderWindowPart(GetSite()->GetPage()); m_CurrentRowCount = m_NodeTreeModel->rowCount(); } } void QmitkDataManagerView::NodeTreeViewRowsRemoved(const QModelIndex& /*parent*/, int /*start*/, int /*end*/) { m_CurrentRowCount = m_NodeTreeModel->rowCount(); } void QmitkDataManagerView::NodeSelectionChanged(const QItemSelection& /*selected*/, const QItemSelection& /*deselected*/) { auto selectedNodes = GetCurrentSelection(); auto nodeSet = m_NodeTreeModel->GetNodeSet(); for (auto node : nodeSet) { if (node.IsNotNull()) { node->SetSelected(selectedNodes.contains(node)); } } } void QmitkDataManagerView::OnNodeVisibilityChanged() { if (m_GlobalReinitOnNodeVisibilityChanged) { GlobalReinitAction::Run(GetSite(), GetDataStorage()); } else { mitk::RenderingManager::GetInstance()->RequestUpdateAll(); } } void QmitkDataManagerView::ShowIn(const QString& editorId) { berry::IWorkbenchPage::Pointer page = GetSite()->GetPage(); berry::IEditorInput::Pointer input(new mitk::DataStorageEditorInput(GetDataStorageReference())); page->OpenEditor(input, editorId, false, berry::IWorkbenchPage::MATCH_ID); } QItemSelectionModel* QmitkDataManagerView::GetDataNodeSelectionModel() const { return m_NodeTreeView->selectionModel(); } diff --git a/Plugins/org.mitk.gui.qt.datamanager/src/internal/QmitkNodeTableViewKeyFilter.cpp b/Plugins/org.mitk.gui.qt.datamanager/src/internal/QmitkNodeTableViewKeyFilter.cpp deleted file mode 100644 index 98bd6c0162..0000000000 --- a/Plugins/org.mitk.gui.qt.datamanager/src/internal/QmitkNodeTableViewKeyFilter.cpp +++ /dev/null @@ -1,92 +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 "QmitkNodeTableViewKeyFilter.h" - -#include -#include -#include "../QmitkDataManagerView.h" - -#include "berryIPreferencesService.h" -#include "berryPlatform.h" - -QmitkNodeTableViewKeyFilter::QmitkNodeTableViewKeyFilter( QObject* _DataManagerView ) -: QObject(_DataManagerView) -{ - m_PreferencesService = berry::Platform::GetPreferencesService(); -} - -bool QmitkNodeTableViewKeyFilter::eventFilter( QObject *obj, QEvent *event ) -{ - QmitkDataManagerView* _DataManagerView = qobject_cast(this->parent()); - if (event->type() == QEvent::KeyPress && _DataManagerView) - { - berry::IPreferences::Pointer nodeTableKeyPrefs = m_PreferencesService->GetSystemPreferences()->Node("/DataManager/Hotkeys"); - - QKeySequence _MakeAllInvisible = QKeySequence(nodeTableKeyPrefs->Get("Make all nodes invisible", "Ctrl+, V")); - QKeySequence _ToggleVisibility = QKeySequence(nodeTableKeyPrefs->Get("Toggle visibility of selected nodes", "V")); - QKeySequence _DeleteSelectedNodes = QKeySequence(nodeTableKeyPrefs->Get("Delete selected nodes", "Del")); - QKeySequence _Reinit = QKeySequence(nodeTableKeyPrefs->Get("Reinit selected nodes", "R")); - QKeySequence _GlobalReinit = QKeySequence(nodeTableKeyPrefs->Get("Global Reinit", "Ctrl+, R")); - QKeySequence _ShowInfo = QKeySequence(nodeTableKeyPrefs->Get("Show Node Information", "Ctrl+, I")); - - QKeyEvent *keyEvent = static_cast(event); - - QKeySequence _KeySequence = QKeySequence(keyEvent->modifiers(), keyEvent->key()); - // if no modifier was pressed the sequence is now empty - if(_KeySequence.isEmpty()) - _KeySequence = QKeySequence(keyEvent->key()); - - if(_KeySequence == _MakeAllInvisible) - { - // trigger deletion of selected node(s) - _DataManagerView->OnMakeAllNodesInvisible(true); - // return true: this means the delete key event is not send to the table - return true; - } - else if(_KeySequence == _DeleteSelectedNodes) - { - // trigger deletion of selected node(s) - _DataManagerView->OnRemoveSelectedNodes(true); - // return true: this means the delete key event is not send to the table - return true; - } - else if(_KeySequence == _ToggleVisibility) - { - // trigger deletion of selected node(s) - _DataManagerView->OnToggleVisibilityOfSelectedNodes(true); - // return true: this means the delete key event is not send to the table - return true; - } - else if(_KeySequence == _Reinit) - { - _DataManagerView->OnReinitSelectedNodes(true); - return true; - } - else if(_KeySequence == _GlobalReinit) - { - _DataManagerView->OnGlobalReinit(true); - return true; - } - else if(_KeySequence == _ShowInfo) - { - _DataManagerView->OnShowInfoDialogForSelectedNodes(true); - return true; - } - } - // standard event processing - return QObject::eventFilter(obj, event); -} diff --git a/Plugins/org.mitk.gui.qt.datamanager/src/internal/QmitkNodeTableViewKeyFilter.h b/Plugins/org.mitk.gui.qt.datamanager/src/internal/QmitkNodeTableViewKeyFilter.h deleted file mode 100644 index 2964e08356..0000000000 --- a/Plugins/org.mitk.gui.qt.datamanager/src/internal/QmitkNodeTableViewKeyFilter.h +++ /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. - -===================================================================*/ - -#ifndef QMITKNODETABLEVIEWKEYFILTER_H_ -#define QMITKNODETABLEVIEWKEYFILTER_H_ - -#include - -namespace berry { -struct IPreferencesService; -} - -/// -/// 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 QmitkNodeTableViewKeyFilter : public QObject -{ - Q_OBJECT -public: - QmitkNodeTableViewKeyFilter(QObject* _DataManagerView = nullptr); -protected: - bool eventFilter(QObject *obj, QEvent *event) override; - - /// - /// The Preferences Service to retrieve and store preferences. - /// - berry::IPreferencesService* m_PreferencesService; -}; - -#endif // QMITKNODETABLEVIEWKEYFILTER_H_ diff --git a/Plugins/org.mitk.gui.qt.datamanager/src/internal/mitkPluginActivator.cpp b/Plugins/org.mitk.gui.qt.datamanager/src/internal/mitkPluginActivator.cpp index 7624f77580..d5996e14b3 100644 --- a/Plugins/org.mitk.gui.qt.datamanager/src/internal/mitkPluginActivator.cpp +++ b/Plugins/org.mitk.gui.qt.datamanager/src/internal/mitkPluginActivator.cpp @@ -1,35 +1,33 @@ /*=================================================================== 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 "mitkPluginActivator.h" #include "../QmitkDataManagerView.h" #include "../QmitkDataManagerPreferencePage.h" -#include "../QmitkDataManagerHotkeysPrefPage.h" namespace mitk { void PluginActivator::start(ctkPluginContext* context) { BERRY_REGISTER_EXTENSION_CLASS(QmitkDataManagerView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDataManagerPreferencePage, context) - BERRY_REGISTER_EXTENSION_CLASS(QmitkDataManagerHotkeysPrefPage, context) } void PluginActivator::stop(ctkPluginContext* context) { Q_UNUSED(context) } }