Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkNodeSelectionListItemWidget.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 QmitkNodeSelectionListItemWidget_h
15 #define QmitkNodeSelectionListItemWidget_h
16 
17 #include <MitkQtWidgetsExports.h>
18 
19 #include <QWidget>
20 
21 #include <mitkDataNode.h>
22 #include <memory>
23 
24 namespace Ui { class QmitkNodeSelectionListItemWidget; }
25 
34 {
35  Q_OBJECT
36 
37 public:
41  explicit QmitkNodeSelectionListItemWidget(QWidget* parent = nullptr);
43 
48 
49 public Q_SLOTS :
53  virtual void SetSelectedNode(const mitk::DataNode* node);
54 
58  virtual void SetClearAllowed(bool allowed);
59 
60 signals:
64  void ClearSelection(const mitk::DataNode* node);
65 
66 protected Q_SLOTS:
68 
69 protected:
70  bool eventFilter(QObject *obj, QEvent *ev) override;
71 
72  std::unique_ptr<Ui::QmitkNodeSelectionListItemWidget> m_Controls;
73 };
74 
75 
76 #endif
#define MITKQTWIDGETS_EXPORT
Widget representing a single data node selection item with a clear button.
const mitk::DataNode * GetSelectedNode() const
Get the currently displayed data node.
QmitkNodeSelectionListItemWidget(QWidget *parent=nullptr)
Construct the list item widget.
virtual void SetSelectedNode(const mitk::DataNode *node)
Set the data node to display.
virtual void SetClearAllowed(bool allowed)
Enable or disable the clear button.
void ClearSelection(const mitk::DataNode *node)
Emitted when the user clicks the clear button.
bool eventFilter(QObject *obj, QEvent *ev) override
std::unique_ptr< Ui::QmitkNodeSelectionListItemWidget > m_Controls
Central node class of the MITK data tree, associating a data object with properties and mappers.
Definition: mitkDataNode.h:72