Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
QmitkAbstractDataStorageInspector.cpp
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
14 
16  : QWidget(parent)
17  , m_NodePredicate(nullptr)
18 {
19  m_Connector = std::make_unique<QmitkModelViewSelectionConnector>();
20 
22 }
23 
25 {
26 }
27 
29 {
30  if (m_DataStorage != dataStorage)
31  {
32  m_DataStorage = dataStorage;
33 
34  if (!m_DataStorage.IsExpired())
35  {
36  this->Initialize();
37  }
38  }
39 }
40 
42 {
43  if (m_NodePredicate != nodePredicate)
44  {
45  m_NodePredicate = nodePredicate;
46 
47  this->Initialize();
48  }
49 }
50 
52 {
53  return m_NodePredicate;
54 }
55 
57 {
58  return m_Connector->GetSelectedNodes();
59 }
60 
62 {
63  return m_Connector->GetSelectOnlyVisibleNodes();
64 }
65 
67 {
68  m_Connector->SetSelectOnlyVisibleNodes(selectOnlyVisibleNodes);
69 }
70 
72 {
73  m_Connector->SetCurrentSelection(selectedNodes);
74 }
75 
77 {
78  emit CurrentSelectionChanged(selectedNodes);
79 }
Data management class that handles &#39;was created by&#39; relations.
const mitk::NodePredicateBase * GetNodePredicate() const
mitk::NodePredicateBase::ConstPointer m_NodePredicate
mitk::WeakPointer< mitk::DataStorage > m_DataStorage
virtual void SetNodePredicate(const mitk::NodePredicateBase *nodePredicate)
Sets the node predicate and updates the widget, according to the node predicate.
void CurrentSelectionChanged(NodeList nodes)
A signal that will be emitted if the selected node has changed.
void SetCurrentSelection(NodeList selectedNodes)
Transform a list of data nodes into a model selection and set this as a new selection of the selectio...
bool IsExpired() const noexcept
void SetSelectOnlyVisibleNodes(bool selectOnlyVisibleNodes)
Change the selection modus of the item view&#39;s selection model.
void CurrentSelectionChanged(QList< mitk::DataNode::Pointer > nodes)
A signal that will be emitted by the &#39;ChangeModelSelection&#39;-function. This happens if the selection m...
void SetDataStorage(mitk::DataStorage *dataStorage)
Sets the data storage that will be used /monitored by the widget.
Interface for evaluation conditions used in the DataStorage class GetSubset() method.
std::unique_ptr< QmitkModelViewSelectionConnector > m_Connector