Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
Widget that allows to show and edit the content of an mitk::IsoDoseLevel instance. More...
#include <QmitkNodeSelectionDialog.h>
Public Types | |
using | NodeList = QList< mitk::DataNode::Pointer > |
using | SelectionCheckFunctionType = std::function< std::string(const NodeList &)> |
Helper function that is used to check the given selection for consistency. Returning an empty string assumes that everything is alright and the selection is valid. If the string is not empty, the content of the string will be used as error message. More... | |
using | SelectionMode = QAbstractItemView::SelectionMode |
Public Slots | |
void | SetSelectOnlyVisibleNodes (bool selectOnlyVisibleNodes) |
void | SetCurrentSelection (NodeList selectedNodes) |
Signals | |
void | CurrentSelectionChanged (NodeList nodes) |
Public Member Functions | |
QmitkNodeSelectionDialog (QWidget *parent=nullptr, QString caption="", QString hint="") | |
void | SetDataStorage (mitk::DataStorage *dataStorage) |
Sets the data storage that will be used /monitored by widget. More... | |
virtual void | SetNodePredicate (const mitk::NodePredicateBase *nodePredicate) |
Sets the node predicate and updates the widget, according to the node predicate. More... | |
const mitk::NodePredicateBase * | GetNodePredicate () const |
NodeList | GetSelectedNodes () const |
void | SetSelectionCheckFunction (const SelectionCheckFunctionType &checkFunction) |
A selection check function can be set. If set the dialog uses this function to check the made/set selection. If the selection is valid, everything is fine. If the selection is indicated as invalid, the dialog will display the selection check function error message. More... | |
bool | GetSelectOnlyVisibleNodes () const |
void | SetSelectionMode (SelectionMode mode) |
SelectionMode | GetSelectionMode () const |
Protected Types | |
using | PanelVectorType = std::vector< QmitkAbstractDataStorageInspector * > |
Protected Slots | |
void | OnSelectionChanged (NodeList selectedNodes) |
void | OnFavoriteNodesButtonClicked () |
void | OnOK () |
void | OnCancel () |
Protected Member Functions | |
void | SetErrorText (const std::string &checkResponse) |
void | AddPanel (const mitk::IDataStorageInspectorProvider *provider, const mitk::IDataStorageInspectorProvider::InspectorIDType &preferredID, bool &preferredFound, int &preferredIndex) |
Protected Attributes | |
mitk::WeakPointer< mitk::DataStorage > | m_DataStorage |
mitk::NodePredicateBase::ConstPointer | m_NodePredicate |
bool | m_SelectOnlyVisibleNodes |
NodeList | m_SelectedNodes |
SelectionCheckFunctionType | m_CheckFunction |
SelectionMode | m_SelectionMode |
PanelVectorType | m_Panels |
QPushButton * | m_FavoriteNodesButton |
Ui_QmitkNodeSelectionDialog | m_Controls |
Widget that allows to show and edit the content of an mitk::IsoDoseLevel instance.
Definition at line 34 of file QmitkNodeSelectionDialog.h.
using QmitkNodeSelectionDialog::NodeList = QList<mitk::DataNode::Pointer> |
Definition at line 57 of file QmitkNodeSelectionDialog.h.
|
protected |
Definition at line 136 of file QmitkNodeSelectionDialog.h.
using QmitkNodeSelectionDialog::SelectionCheckFunctionType = std::function<std::string(const NodeList &)> |
Helper function that is used to check the given selection for consistency. Returning an empty string assumes that everything is alright and the selection is valid. If the string is not empty, the content of the string will be used as error message.
Definition at line 65 of file QmitkNodeSelectionDialog.h.
using QmitkNodeSelectionDialog::SelectionMode = QAbstractItemView::SelectionMode |
Definition at line 75 of file QmitkNodeSelectionDialog.h.
|
explicit |
Definition at line 22 of file QmitkNodeSelectionDialog.cpp.
References AddPanel(), mitk::GetPreferredDataStorageInspector(), mitk::DataStorageInspectorGenerator::GetProvider(), mitk::DataStorageInspectorGenerator::GetProviders(), mitk::GetShowFavoritesInspector(), mitk::GetShowHistoryInspector(), mitk::GetVisibleDataStorageInspectors(), QmitkDataStorageSelectionHistoryInspector::INSPECTOR_ID(), QmitkDataStorageFavoriteNodesInspector::INSPECTOR_ID(), m_CheckFunction, m_Controls, MITK_DEBUG, OnCancel(), OnFavoriteNodesButtonClicked(), OnOK(), SetErrorText(), and berry::QtStyleManager::ThemeIcon().
|
protected |
Definition at line 244 of file QmitkNodeSelectionDialog.cpp.
References mitk::IDataStorageInspectorProvider::CreateInspector(), QmitkAbstractDataStorageInspector::CurrentSelectionChanged(), mitk::IDataStorageInspectorProvider::GetInspectorDescription(), mitk::IDataStorageInspectorProvider::GetInspectorDisplayName(), mitk::IDataStorageInspectorProvider::GetInspectorIcon(), mitk::IDataStorageInspectorProvider::GetInspectorID(), m_Controls, m_Panels, m_SelectionMode, OnSelectionChanged(), and QmitkAbstractDataStorageInspector::SetSelectionMode().
Referenced by QmitkNodeSelectionDialog().
|
signal |
Referenced by OnSelectionChanged().
const mitk::NodePredicateBase * QmitkNodeSelectionDialog::GetNodePredicate | ( | ) | const |
Definition at line 134 of file QmitkNodeSelectionDialog.cpp.
References m_NodePredicate.
QmitkNodeSelectionDialog::NodeList QmitkNodeSelectionDialog::GetSelectedNodes | ( | ) | const |
Definition at line 139 of file QmitkNodeSelectionDialog.cpp.
References m_SelectedNodes.
Referenced by QmitkSingleNodeSelectionWidget::EditSelection(), and QmitkMultiNodeSelectionWidget::OnEditSelection().
QmitkNodeSelectionDialog::SelectionMode QmitkNodeSelectionDialog::GetSelectionMode | ( | ) | const |
Definition at line 182 of file QmitkNodeSelectionDialog.cpp.
References m_SelectionMode.
bool QmitkNodeSelectionDialog::GetSelectOnlyVisibleNodes | ( | ) | const |
Definition at line 168 of file QmitkNodeSelectionDialog.cpp.
References m_SelectOnlyVisibleNodes.
|
protectedslot |
Definition at line 239 of file QmitkNodeSelectionDialog.cpp.
Referenced by QmitkNodeSelectionDialog().
|
protectedslot |
Definition at line 221 of file QmitkNodeSelectionDialog.cpp.
References m_SelectedNodes.
Referenced by QmitkNodeSelectionDialog().
|
protectedslot |
Definition at line 229 of file QmitkNodeSelectionDialog.cpp.
References QmitkDataStorageSelectionHistoryInspector::AddNodeToHistory(), and m_SelectedNodes.
Referenced by QmitkNodeSelectionDialog().
|
protectedslot |
Definition at line 215 of file QmitkNodeSelectionDialog.cpp.
References CurrentSelectionChanged(), and SetCurrentSelection().
Referenced by AddPanel().
|
slot |
Definition at line 200 of file QmitkNodeSelectionDialog.cpp.
References m_CheckFunction, m_Controls, m_Panels, m_SelectedNodes, and SetErrorText().
Referenced by QmitkSingleNodeSelectionWidget::EditSelection(), QmitkMultiNodeSelectionWidget::OnEditSelection(), and OnSelectionChanged().
void QmitkNodeSelectionDialog::SetDataStorage | ( | mitk::DataStorage * | dataStorage | ) |
Sets the data storage that will be used /monitored by widget.
dataStorage | A pointer to the data storage to set. |
Definition at line 105 of file QmitkNodeSelectionDialog.cpp.
References mitk::WeakPointer< T >::IsExpired(), m_DataStorage, and m_Panels.
Referenced by QmitkSingleNodeSelectionWidget::EditSelection(), and QmitkMultiNodeSelectionWidget::OnEditSelection().
|
protected |
Definition at line 154 of file QmitkNodeSelectionDialog.cpp.
References m_Controls.
Referenced by QmitkNodeSelectionDialog(), SetCurrentSelection(), and SetSelectionCheckFunction().
|
virtual |
Sets the node predicate and updates the widget, according to the node predicate.
nodePredicate | A pointer to node predicate. |
Definition at line 121 of file QmitkNodeSelectionDialog.cpp.
References m_NodePredicate, and m_Panels.
Referenced by QmitkSingleNodeSelectionWidget::EditSelection(), and QmitkMultiNodeSelectionWidget::OnEditSelection().
void QmitkNodeSelectionDialog::SetSelectionCheckFunction | ( | const SelectionCheckFunctionType & | checkFunction | ) |
A selection check function can be set. If set the dialog uses this function to check the made/set selection. If the selection is valid, everything is fine. If the selection is indicated as invalid, the dialog will display the selection check function error message.
Definition at line 144 of file QmitkNodeSelectionDialog.cpp.
References m_CheckFunction, m_Controls, m_SelectedNodes, and SetErrorText().
void QmitkNodeSelectionDialog::SetSelectionMode | ( | SelectionMode | mode | ) |
Definition at line 173 of file QmitkNodeSelectionDialog.cpp.
References m_Panels, and m_SelectionMode.
Referenced by QmitkSingleNodeSelectionWidget::EditSelection(), and QmitkMultiNodeSelectionWidget::OnEditSelection().
|
slot |
Definition at line 187 of file QmitkNodeSelectionDialog.cpp.
References m_Panels, and m_SelectOnlyVisibleNodes.
Referenced by QmitkSingleNodeSelectionWidget::EditSelection(), and QmitkMultiNodeSelectionWidget::OnEditSelection().
|
protected |
Definition at line 132 of file QmitkNodeSelectionDialog.h.
Referenced by QmitkNodeSelectionDialog(), SetCurrentSelection(), and SetSelectionCheckFunction().
|
protected |
Definition at line 140 of file QmitkNodeSelectionDialog.h.
Referenced by AddPanel(), QmitkNodeSelectionDialog(), SetCurrentSelection(), SetErrorText(), and SetSelectionCheckFunction().
|
protected |
Definition at line 127 of file QmitkNodeSelectionDialog.h.
Referenced by SetDataStorage().
|
protected |
Definition at line 139 of file QmitkNodeSelectionDialog.h.
|
protected |
Definition at line 128 of file QmitkNodeSelectionDialog.h.
Referenced by GetNodePredicate(), and SetNodePredicate().
|
protected |
Definition at line 137 of file QmitkNodeSelectionDialog.h.
Referenced by AddPanel(), SetCurrentSelection(), SetDataStorage(), SetNodePredicate(), SetSelectionMode(), and SetSelectOnlyVisibleNodes().
|
protected |
Definition at line 130 of file QmitkNodeSelectionDialog.h.
Referenced by GetSelectedNodes(), OnFavoriteNodesButtonClicked(), OnOK(), SetCurrentSelection(), and SetSelectionCheckFunction().
|
protected |
Definition at line 134 of file QmitkNodeSelectionDialog.h.
Referenced by AddPanel(), GetSelectionMode(), and SetSelectionMode().
|
protected |
Definition at line 129 of file QmitkNodeSelectionDialog.h.
Referenced by GetSelectOnlyVisibleNodes(), and SetSelectOnlyVisibleNodes().