diff --git a/Plugins/org.mitk.gui.qt.common/files.cmake b/Plugins/org.mitk.gui.qt.common/files.cmake index 74390c19b2..2c99371959 100755 --- a/Plugins/org.mitk.gui.qt.common/files.cmake +++ b/Plugins/org.mitk.gui.qt.common/files.cmake @@ -1,53 +1,59 @@ set(SRC_CPP_FILES QmitkAbstractRenderEditor.cpp QmitkAbstractView.cpp QmitkDataNodeSelectionProvider.cpp QmitkDnDFrameWidget.cpp QmitkSelectionServiceConnector.cpp QmitkSliceNavigationListener.cpp QmitkSingleNodeSelectionWidget.cpp QmitkNodeSelectionDialog.cpp QmitkAbstractNodeSelectionWidget.cpp QmitkMultiNodeSelectionWidget.cpp + QmitkNodeSelectionPreferenceHelper.cpp ) set(INTERNAL_CPP_FILES QmitkCommonActivator.cpp QmitkDataNodeItemModel.cpp QmitkDataNodeSelection.cpp QmitkViewCoordinator.cpp + QmitkNodeSelectionConstants.cpp + QmitkNodeSelectionPreferencePage.cpp ) set(UI_FILES src/QmitkSingleNodeSelectionWidget.ui src/QmitkMultiNodeSelectionWidget.ui src/QmitkNodeSelectionDialog.ui + src/internal/QmitkNodeSelectionPreferencePage.ui ) set(MOC_H_FILES src/QmitkAbstractRenderEditor.h src/QmitkDnDFrameWidget.h src/QmitkSelectionServiceConnector.h src/QmitkSliceNavigationListener.h src/QmitkSingleNodeSelectionWidget.h src/QmitkNodeSelectionDialog.h src/QmitkAbstractNodeSelectionWidget.h src/QmitkMultiNodeSelectionWidget.h src/internal/QmitkCommonActivator.h + src/internal/QmitkNodeSelectionPreferencePage.h ) set(CACHED_RESOURCE_FILES + plugin.xml ) set(QRC_FILES ) set(CPP_FILES ) 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.common/plugin.xml b/Plugins/org.mitk.gui.qt.common/plugin.xml new file mode 100644 index 0000000000..e81a484d36 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.common/plugin.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/Plugins/org.mitk.gui.qt.common/src/QmitkNodeSelectionPreferenceHelper.cpp b/Plugins/org.mitk.gui.qt.common/src/QmitkNodeSelectionPreferenceHelper.cpp new file mode 100644 index 0000000000..1515d6df71 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.common/src/QmitkNodeSelectionPreferenceHelper.cpp @@ -0,0 +1,122 @@ +/*=================================================================== + +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 "QmitkNodeSelectionPreferenceHelper.h" + +#include + +#include + +#include + +#include + +#include "mitkExceptionMacro.h" + +void mitk::PutVisibleDataStorageInspectors(const VisibleDataStorageInspectorMapType &inspectors) +{ + berry::IPreferencesService *prefService = berry::Platform::GetPreferencesService(); + berry::IPreferences::Pointer prefNode = + prefService->GetSystemPreferences()->Node(mitk::NodeSelectionConstants::ROOT_PREFERENCE_NODE_ID.c_str()); + berry::IPreferences::Pointer visNode = + prefNode->Node(mitk::NodeSelectionConstants::VISIBLE_INSPECTORS_NODE_ID.c_str()); + + visNode->RemoveNode(); + prefNode->Flush(); + + // new empty preset node + visNode = prefNode->Node(mitk::NodeSelectionConstants::VISIBLE_INSPECTORS_NODE_ID.c_str()); + + // store map in new node + for (const auto &inspector : inspectors) + { + std::ostringstream sstr; + sstr << inspector.first; + berry::IPreferences::Pointer aNode = visNode->Node(QString::fromStdString(sstr.str())); + + aNode->Put(mitk::NodeSelectionConstants::VISIBLE_INSPECTOR_ID.c_str(), inspector.second.c_str()); + aNode->Flush(); + } + + visNode->Flush(); +} + +mitk::VisibleDataStorageInspectorMapType mitk::GetVisibleDataStorageInspectors() +{ + berry::IPreferencesService *prefService = berry::Platform::GetPreferencesService(); + + berry::IPreferences::Pointer prefNode = + prefService->GetSystemPreferences()->Node(mitk::NodeSelectionConstants::ROOT_PREFERENCE_NODE_ID.c_str()); + berry::IPreferences::Pointer visNode = + prefNode->Node(mitk::NodeSelectionConstants::VISIBLE_INSPECTORS_NODE_ID.c_str()); + + typedef QStringList NamesType; + NamesType names = visNode->ChildrenNames(); + + VisibleDataStorageInspectorMapType visMap; + + if (!names.empty()) + { + for (NamesType::const_iterator pos = names.begin(); pos != names.end(); ++pos) + { + berry::IPreferences::Pointer aNode = visNode->Node(*pos); + + if (aNode.IsNull()) + { + mitkThrow() << "Error in preference interface. Cannot find preset node under given name. Name: " + << (*pos).toStdString(); + } + + std::istringstream isstr(pos->toStdString()); + unsigned int order = 0; + isstr >> order; + + auto id = aNode->Get(mitk::NodeSelectionConstants::VISIBLE_INSPECTOR_ID.c_str(), ""); + if (id.isEmpty()) + { + mitkThrow() << "Error in preference interface. ID of visible inspector is not set. Inspector position: " + << order; + } + + visMap.insert(std::make_pair(order, id.toStdString())); + } + } + return visMap; +} + +mitk::DataStorageInspectorIDType mitk::GetFavoriteDataStorageInspector() +{ + berry::IPreferencesService *prefService = berry::Platform::GetPreferencesService(); + + berry::IPreferences::Pointer prefNode = + prefService->GetSystemPreferences()->Node(mitk::NodeSelectionConstants::ROOT_PREFERENCE_NODE_ID.c_str()); + + auto id = prefNode->Get(mitk::NodeSelectionConstants::FAVORITE_INSPECTOR_ID.c_str(), ""); + + mitk::DataStorageInspectorIDType result = id.toStdString(); + return result; +} + +void mitk::PutFavoriteDataStorageInspector(const DataStorageInspectorIDType &id) +{ + berry::IPreferencesService *prefService = berry::Platform::GetPreferencesService(); + + berry::IPreferences::Pointer prefNode = + prefService->GetSystemPreferences()->Node(mitk::NodeSelectionConstants::ROOT_PREFERENCE_NODE_ID.c_str()); + + prefNode->Put(mitk::NodeSelectionConstants::FAVORITE_INSPECTOR_ID.c_str(), id.c_str()); + prefNode->Flush(); +} diff --git a/Plugins/org.mitk.gui.qt.common/src/QmitkNodeSelectionPreferenceHelper.h b/Plugins/org.mitk.gui.qt.common/src/QmitkNodeSelectionPreferenceHelper.h new file mode 100644 index 0000000000..79567f2f34 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.common/src/QmitkNodeSelectionPreferenceHelper.h @@ -0,0 +1,45 @@ +/*=================================================================== + +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 __QMITK_NODE_SELECTION_PREFERENCE_HELPER_H +#define __QMITK_NODE_SELECTION_PREFERENCE_HELPER_H + +#include +#include + +namespace mitk +{ + using DataStorageInspectorIDType = std::string; + + using VisibleDataStorageInspectorMapType = std::map; + + /** Stores the given ID as favorite inspector.*/ + void PutFavoriteDataStorageInspector(const DataStorageInspectorIDType& id); + + /** Gets the ID of the current favorite data storage inspector. + * If empty string is returned, no favorite is set.*/ + DataStorageInspectorIDType GetFavoriteDataStorageInspector(); + + /** Stores the given map of visible inspectors.*/ + void PutVisibleDataStorageInspectors(const VisibleDataStorageInspectorMapType& inspectors); + + /** Gets the map of current visible inspectors.*/ + VisibleDataStorageInspectorMapType GetVisibleDataStorageInspectors(); + +} + +#endif diff --git a/Plugins/org.mitk.gui.qt.common/src/internal/QmitkCommonActivator.cpp b/Plugins/org.mitk.gui.qt.common/src/internal/QmitkCommonActivator.cpp index 8116c685e3..188d1d6738 100644 --- a/Plugins/org.mitk.gui.qt.common/src/internal/QmitkCommonActivator.cpp +++ b/Plugins/org.mitk.gui.qt.common/src/internal/QmitkCommonActivator.cpp @@ -1,70 +1,73 @@ /*=================================================================== 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 "QmitkCommonActivator.h" #include #include +#include "QmitkNodeSelectionPreferencePage.h" QmitkCommonActivator* QmitkCommonActivator::m_Instance = nullptr; ctkPluginContext* QmitkCommonActivator::m_Context = nullptr; ctkPluginContext* QmitkCommonActivator::GetContext() { return m_Context; } QmitkCommonActivator* QmitkCommonActivator::GetInstance() { return m_Instance; } berry::IPreferencesService* QmitkCommonActivator::GetPreferencesService() { return m_PrefServiceTracker->getService(); } void QmitkCommonActivator::start(ctkPluginContext* context) { this->m_Instance = this; this->m_Context = context; this->m_PrefServiceTracker.reset(new ctkServiceTracker(context)); if(berry::PlatformUI::IsWorkbenchRunning()) { m_ViewCoordinator.reset(new QmitkViewCoordinator); m_ViewCoordinator->Start(); } else { MITK_ERROR << "BlueBerry Workbench not running!"; } + + BERRY_REGISTER_EXTENSION_CLASS(QmitkNodeSelectionPreferencePage, context) } void QmitkCommonActivator::stop(ctkPluginContext* context) { Q_UNUSED(context) m_ViewCoordinator->Stop(); m_ViewCoordinator.reset(); this->m_PrefServiceTracker.reset(); this->m_Context = nullptr; this->m_Instance = nullptr; } diff --git a/Plugins/org.mitk.gui.qt.common/src/internal/QmitkNodeSelectionConstants.cpp b/Plugins/org.mitk.gui.qt.common/src/internal/QmitkNodeSelectionConstants.cpp new file mode 100644 index 0000000000..2f6a3ceaf1 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.common/src/internal/QmitkNodeSelectionConstants.cpp @@ -0,0 +1,22 @@ +/*=================================================================== + +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 "QmitkNodeSelectionConstants.h" + +const std::string mitk::NodeSelectionConstants::ROOT_PREFERENCE_NODE_ID = "/NODESELECTION/UI"; +const std::string mitk::NodeSelectionConstants::VISIBLE_INSPECTORS_NODE_ID = "visibleInspectors"; +const std::string mitk::NodeSelectionConstants::FAVORITE_INSPECTOR_ID = "inspectorID"; +const std::string mitk::NodeSelectionConstants::VISIBLE_INSPECTOR_ID = "inspectorID"; diff --git a/Plugins/org.mitk.gui.qt.common/src/internal/QmitkNodeSelectionConstants.h b/Plugins/org.mitk.gui.qt.common/src/internal/QmitkNodeSelectionConstants.h new file mode 100644 index 0000000000..170ec1840c --- /dev/null +++ b/Plugins/org.mitk.gui.qt.common/src/internal/QmitkNodeSelectionConstants.h @@ -0,0 +1,51 @@ +/*=================================================================== + +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 _QMITK_NODE_SELECTION_CONSTANTS_H_ +#define _QMITK_NODE_SELECTION_CONSTANTS_H_ + +#include + +#include "org_mitk_gui_qt_common_Export.h" + +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable:4251) +#endif + +namespace mitk +{ +struct MITK_QT_COMMON NodeSelectionConstants +{ + /** ID/Path of main preference node for node selections. */ + static const std::string ROOT_PREFERENCE_NODE_ID; + + /** ID of main preference node where all visible inspectors are stored (e.g. ROOT_PREFERENCE_NODE_ID+"/"+VISIBLE_INSPECTORS_NODE_ID+"/[orderering #]"). + The sub node naming encodes the ordering number of the visible inspector.*/ + static const std::string VISIBLE_INSPECTORS_NODE_ID; + /** ID for the value that stores the favorite inspector ID in the root preference node.*/ + static const std::string FAVORITE_INSPECTOR_ID; + /** ID for the value that stores the inspector ID in the preference node.*/ + static const std::string VISIBLE_INSPECTOR_ID; +}; + +} + +#ifdef _MSC_VER +# pragma warning(pop) +#endif + +#endif diff --git a/Plugins/org.mitk.gui.qt.common/src/internal/QmitkNodeSelectionPreferencePage.cpp b/Plugins/org.mitk.gui.qt.common/src/internal/QmitkNodeSelectionPreferencePage.cpp new file mode 100644 index 0000000000..86fe16b1de --- /dev/null +++ b/Plugins/org.mitk.gui.qt.common/src/internal/QmitkNodeSelectionPreferencePage.cpp @@ -0,0 +1,198 @@ +/*=================================================================== + +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 "QmitkNodeSelectionPreferencePage.h" + +#include "QmitkNodeSelectionPreferenceHelper.h" + +//----------------------------------------------------------------------------- +QmitkNodeSelectionPreferencePage::QmitkNodeSelectionPreferencePage() + : m_MainControl(0), m_Controls(0) +{ + +} + + +//----------------------------------------------------------------------------- +QmitkNodeSelectionPreferencePage::~QmitkNodeSelectionPreferencePage() +{ + delete m_Controls; +} + + +//----------------------------------------------------------------------------- +void QmitkNodeSelectionPreferencePage::Init(berry::IWorkbench::Pointer ) +{ + +} + + +//----------------------------------------------------------------------------- +void QmitkNodeSelectionPreferencePage::CreateQtControl(QWidget* parent) +{ + m_MainControl = new QWidget(parent); + m_Controls = new Ui::QmitkNodeSelectionPreferencePage; + m_Controls->setupUi( m_MainControl ); + + connect(m_Controls->comboFavorite, SIGNAL(currentIndexChanged(int)), this, SLOT(UpdateWidgets())); + connect(m_Controls->btnUp, SIGNAL(clicked(bool)), this, SLOT(MoveUp())); + connect(m_Controls->btnDown, SIGNAL(clicked(bool)), this, SLOT(MoveDown())); + connect(m_Controls->listInspectors, SIGNAL(itemSelectionChanged()), this, SLOT(UpdateWidgets())); + + this->Update(); +} + + +//----------------------------------------------------------------------------- +QWidget* QmitkNodeSelectionPreferencePage::GetQtControl() const +{ + return m_MainControl; +} + +//----------------------------------------------------------------------------- +bool QmitkNodeSelectionPreferencePage::PerformOk() +{ + //store favorite + auto id = m_Controls->comboFavorite->currentData().toString(); + mitk::PutFavoriteDataStorageInspector(id.toStdString()); + + //store visible + mitk::VisibleDataStorageInspectorMapType visibles; + + unsigned int visiblePos = 0; + + for (int i = 0; i < m_Controls->listInspectors->count(); ++i) + { + auto item = m_Controls->listInspectors->item(i); + if (item->checkState() == Qt::Checked) + { + visibles.insert(std::make_pair(visiblePos++, item->data(Qt::UserRole).toString().toStdString())); + } + } + mitk::PutVisibleDataStorageInspectors(visibles); + + return true; +} + + +//----------------------------------------------------------------------------- +void QmitkNodeSelectionPreferencePage::PerformCancel() +{ +} + + +//----------------------------------------------------------------------------- +void QmitkNodeSelectionPreferencePage::Update() +{ + m_Providers = QmitkDataStorageInspectorGenerator::GetProviders(); + + auto visibleProviders = mitk::GetVisibleDataStorageInspectors(); + auto allProviders = QmitkDataStorageInspectorGenerator::GetProviders(); + auto favorite = mitk::GetFavoriteDataStorageInspector(); + + auto finding = m_Providers.find(favorite); + if (finding == m_Providers.cend()) + { + favorite = m_Providers.begin()->first; + } + + //fill favorite combo + int index = 0; + int currentIndex = 0; + m_Controls->comboFavorite->clear(); + for (auto iter : m_Providers) + { + m_Controls->comboFavorite->addItem(QString::fromStdString(iter.second->GetInspectorDisplayName()),QVariant::fromValue(QString::fromStdString(iter.first))); + if (iter.first == favorite) + { + currentIndex = index; + }; + ++index; + } + m_Controls->comboFavorite->setCurrentIndex(currentIndex); + + //fill inspector list + m_Controls->listInspectors->clear(); + for (const auto iter : allProviders) + { + auto currentID = iter.first; + QListWidgetItem* item = new QListWidgetItem; + item->setText(QString::fromStdString(iter.second->GetInspectorDisplayName())); + item->setData(Qt::UserRole, QVariant::fromValue(QString::fromStdString(currentID))); + item->setToolTip(QString::fromStdString(iter.second->GetInspectorDescription())); + + auto finding = std::find_if(visibleProviders.cbegin(), visibleProviders.cend(), [¤tID](auto v) {return v.second == currentID; }); + if (finding == visibleProviders.cend()) + { + item->setCheckState(Qt::Unchecked); + m_Controls->listInspectors->addItem(item); + } + else + { + item->setCheckState(Qt::Checked); + m_Controls->listInspectors->insertItem(finding->first, item); + } + } + + this->UpdateWidgets(); +} + +void QmitkNodeSelectionPreferencePage::UpdateWidgets() +{ + int currentIndex = m_Controls->listInspectors->currentRow(); + m_Controls->btnUp->setEnabled(!m_Controls->listInspectors->selectedItems().empty() && currentIndex > 0); + m_Controls->btnDown->setEnabled(!m_Controls->listInspectors->selectedItems().empty() && currentIndex + 1 < m_Controls->listInspectors->count()); + + for (int i = 0; i < m_Controls->listInspectors->count(); ++i) + { + auto item = m_Controls->listInspectors->item(i); + if (item->data(Qt::UserRole).toString() == m_Controls->comboFavorite->currentData().toString()) + { + //favorites are always visible. + item->setCheckState(Qt::Checked); + item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsDragEnabled); + } + else + { + item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsDragEnabled | Qt::ItemIsUserCheckable); + } + } +}; + +void QmitkNodeSelectionPreferencePage::MoveDown() +{ + int currentIndex = m_Controls->listInspectors->currentRow(); + if (currentIndex+1 < m_Controls->listInspectors->count()) + { + QListWidgetItem *currentItem = m_Controls->listInspectors->takeItem(currentIndex); + m_Controls->listInspectors->insertItem(currentIndex + 1, currentItem); + m_Controls->listInspectors->setCurrentRow(currentIndex + 1); + } + this->UpdateWidgets(); +}; + +void QmitkNodeSelectionPreferencePage::MoveUp() +{ + int currentIndex = m_Controls->listInspectors->currentRow(); + if (currentIndex > 0) + { + QListWidgetItem *currentItem = m_Controls->listInspectors->takeItem(currentIndex); + m_Controls->listInspectors->insertItem(currentIndex - 1, currentItem); + m_Controls->listInspectors->setCurrentRow(currentIndex - 1); + } + this->UpdateWidgets(); +}; diff --git a/Plugins/org.mitk.gui.qt.common/src/internal/QmitkNodeSelectionPreferencePage.h b/Plugins/org.mitk.gui.qt.common/src/internal/QmitkNodeSelectionPreferencePage.h new file mode 100644 index 0000000000..2e959c43c5 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.common/src/internal/QmitkNodeSelectionPreferencePage.h @@ -0,0 +1,91 @@ +/*=================================================================== + +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 __QMITK_NODE_SELECTION_PREFERENCE_PAGE_H +#define __QMITK_NODE_SELECTION_PREFERENCE_PAGE_H + +#include "berryIQtPreferencePage.h" +#include "berryIPreferences.h" + +#include "QmitkDataStorageInspectorGenerator.h" + +#include "ui_QmitkNodeSelectionPreferencePage.h" + +class QWidget; + +/** +* \class QmitkNodeSelectionPreferencePage +* \brief Preference page for general node selection settings. +*/ +class QmitkNodeSelectionPreferencePage : public QObject, public berry::IQtPreferencePage +{ + Q_OBJECT + Q_INTERFACES(berry::IPreferencePage) + +public: + QmitkNodeSelectionPreferencePage(); + ~QmitkNodeSelectionPreferencePage(); + + /** + * \brief Called by framework to initialize this preference page, but currently does nothing. + * \param workbench The workbench. + */ + void Init(berry::IWorkbench::Pointer workbench); + + /** + * \brief Called by framework to create the GUI, and connect signals and slots. + * \param widget The Qt widget that acts as parent to all GUI components, as this class itself is not derived from QWidget. + */ + void CreateQtControl(QWidget* widget); + + /** + * \brief Required by framework to get hold of the GUI. + * \return QWidget* the top most QWidget for the GUI. + */ + QWidget* GetQtControl() const; + + /** + * \see IPreferencePage::PerformOk + */ + virtual bool PerformOk(); + + /** + * \see IPreferencePage::PerformCancel + */ + virtual void PerformCancel(); + + /** + * \see IPreferencePage::Update + */ + virtual void Update(); + +protected slots: + + void UpdateWidgets(); + void MoveDown(); + void MoveUp(); + +protected: + + QWidget *m_MainControl; + Ui::QmitkNodeSelectionPreferencePage* m_Controls; + + QmitkDataStorageInspectorGenerator::ProviderMapType m_Providers; + +}; + +#endif diff --git a/Plugins/org.mitk.gui.qt.common/src/internal/QmitkNodeSelectionPreferencePage.ui b/Plugins/org.mitk.gui.qt.common/src/internal/QmitkNodeSelectionPreferencePage.ui new file mode 100644 index 0000000000..c88f7330f2 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.common/src/internal/QmitkNodeSelectionPreferencePage.ui @@ -0,0 +1,145 @@ + + + QmitkNodeSelectionPreferencePage + + + + 0 + 0 + 715 + 713 + + + + Form + + + + + + + + Up + + + + + + + Down + + + + + + + + + Favorite inspector: + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 20 + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + <html><head/><body><p>The favorite inspector is always visible.</p><p>Additionally the favorite inspector has always the focus when opening a node selection dialoge.</p></body></html> + + + + Neues Element + + + + + 2 + + + + + + + + <html><head/><body><p><span style=" font-weight:600;">Instruction:</span><br/>Only checked inspectors will be shown in node selection dialogs.<br/>You may change the order in the inspector list, to change the order of the tabs in the node selection dialog.</p></body></html> + + + true + + + + + + + + + Inspector visiblitiy and order: + + + + + + + + 16777215 + 16777215 + + + + List of all available inspectors. Checked inspectores will be display + + + + TreeInspector + + + ffffff + + + Checked + + + + + List + + + Checked + + + + + + + + + + +