Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
QmitkMultiNodeSelectionWidget.h
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 
13 
14 #ifndef QMITK_MULTI_NODE_SELECTION_WIDGET_H
15 #define QMITK_MULTI_NODE_SELECTION_WIDGET_H
16 
17 #include <mitkDataStorage.h>
18 #include <mitkWeakPointer.h>
19 #include <mitkNodePredicateBase.h>
20 
22 
24 
25 #include "ui_QmitkMultiNodeSelectionWidget.h"
26 
28 
30 class QAbstractItemVew;
31 
37 {
38  Q_OBJECT
39 
40 public:
41  explicit QmitkMultiNodeSelectionWidget(QWidget* parent = nullptr);
42 
44 
49  using SelectionCheckFunctionType = std::function<std::string(const NodeList &)>;
54  void SetSelectionCheckFunction(const SelectionCheckFunctionType &checkFunction);
55 
56 public Q_SLOTS:
57  void OnEditSelection();
58 
59 protected Q_SLOTS:
60  void OnClearSelection(const mitk::DataNode* node);
61 
62 protected:
63  void changeEvent(QEvent *event) override;
64 
65  void UpdateInfo() override;
66  void OnInternalSelectionChanged() override;
67 
68  bool AllowEmissionOfSelection(const NodeList& emissionCandidates) const override;
69 
71 
73  mutable std::string m_CheckResponse;
74 
75  Ui_QmitkMultiNodeSelectionWidget m_Controls;
76 };
77 #endif // QmitkMultiNodeSelectionWidget_H
Ui_QmitkMultiNodeSelectionWidget m_Controls
QList< mitk::DataNode::Pointer > NodeList
SelectionCheckFunctionType m_CheckFunction
std::function< std::string(const NodeList &)> SelectionCheckFunctionType
Widget that allows to perform and represents a multiple node selection.
QmitkSimpleTextOverlayWidget * m_Overlay
#define MITK_QT_COMMON
Abstract base class for the selection of data from a data storage.
virtual bool AllowEmissionOfSelection(const NodeList &emissionCandidates) const
Class for nodes of the DataTree.
Definition: mitkDataNode.h:57