Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
QmitkDataStorageSelectionHistoryInspector.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 
19 {
20  m_Controls.setupUi(this);
21 
22  m_Controls.view->setSelectionMode(QAbstractItemView::ExtendedSelection);
23  m_Controls.view->setSelectionBehavior(QAbstractItemView::SelectRows);
24  m_Controls.view->setAlternatingRowColors(true);
25 
27  m_Overlay->setVisible(false);
28  m_Overlay->SetOverlayText(QStringLiteral("<font class=\"normal\"><p style=\"text-align:center\">No history available yet.</p></center></font>"));
29 
31 
32  m_Controls.view->setModel(m_StorageModel);
33 }
34 
36 {
37  return m_Controls.view;
38 }
39 
41 {
42  return m_Controls.view;
43 }
44 
46 {
49 
50  m_Connector->SetView(m_Controls.view);
51 
52  m_Overlay->setVisible(m_StorageModel->rowCount() == 0);
53 }
54 
56 {
57  m_Controls.view->setSelectionMode(mode);
58 }
59 
61 {
62  return m_Controls.view->selectionMode();
63 }
64 
66 {
68 }
69 
71 {
73 }
itk::SmartPointer< T > Lock() const
Internal DataStorage model to represent the history of node selections.
void SetDataStorage(mitk::DataStorage *dataStorage)
mitk::NodePredicateBase::ConstPointer m_NodePredicate
mitk::WeakPointer< mitk::DataStorage > m_DataStorage
static void AddNodeToHistory(mitk::DataNode *node)
Ui_QmitkDataStorageSelectionHistoryInspector m_Controls
QAbstractItemView::SelectionMode SelectionMode
std::unique_ptr< QmitkModelViewSelectionConnector > m_Connector
void SetNodePredicate(const mitk::NodePredicateBase *nodePredicate)
This abstract class is a convenient base class for easy implementation of widgets that offer a specif...
Class for nodes of the DataTree.
Definition: mitkDataNode.h:57