Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
QmitkNodeSelectionButton.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 #ifndef QmitkNodeSelectionButton_h
14 #define QmitkNodeSelectionButton_h
15 
16 #include <MitkQtWidgetsExports.h>
17 
18 #include <mitkDataNode.h>
19 
20 #include <QPushButton>
21 #include <QPixmap>
22 
30 {
31  Q_OBJECT
32 
33 public:
34  explicit QmitkNodeSelectionButton(QWidget *parent = nullptr);
35  ~QmitkNodeSelectionButton() override;
36 
37  const mitk::DataNode* GetSelectedNode() const;
38  bool GetSelectionIsOptional() const;
39 
40 public Q_SLOTS:
41  virtual void SetSelectedNode(const mitk::DataNode* node);
42  virtual void SetNodeInfo(QString info);
43 
48  void SetSelectionIsOptional(bool isOptional);
49 
50 protected:
51  void paintEvent(QPaintEvent *p) override;
52  void changeEvent(QEvent *event) override;
53 
54  void AddNodeObserver();
55  void RemoveNodeObserver();
56  void OnNodeModified(const itk::Object * /*caller*/, const itk::EventObject &);
57 
59  QString m_Info;
61  QPixmap m_ThumbNail;
62  itk::ModifiedTimeType m_DataMTime;
63  itk::ModifiedTimeType m_SelectionPropMTime;
64 
66 
69 };
70 
71 #endif
QmitkNodeSelectionButton::m_SelectionPropMTime
itk::ModifiedTimeType m_SelectionPropMTime
Definition: QmitkNodeSelectionButton.h:63
QmitkNodeSelectionButton::m_SelectedNode
mitk::DataNode::ConstPointer m_SelectedNode
Definition: QmitkNodeSelectionButton.h:58
QmitkNodeSelectionButton::m_Info
QString m_Info
Definition: QmitkNodeSelectionButton.h:59
MITKQTWIDGETS_EXPORT
#define MITKQTWIDGETS_EXPORT
Definition: MitkQtWidgetsExports.h:15
QmitkNodeSelectionButton::m_NodeObserved
bool m_NodeObserved
Definition: QmitkNodeSelectionButton.h:68
QmitkNodeSelectionButton::m_DataMTime
itk::ModifiedTimeType m_DataMTime
Definition: QmitkNodeSelectionButton.h:62
itk::SmartPointer< const Self >
QmitkNodeSelectionButton::m_NodeModifiedObserverTag
unsigned long m_NodeModifiedObserverTag
Definition: QmitkNodeSelectionButton.h:67
QmitkNodeSelectionButton::m_IsOptional
bool m_IsOptional
Definition: QmitkNodeSelectionButton.h:65
QmitkNodeSelectionButton::m_ThumbNail
QPixmap m_ThumbNail
Definition: QmitkNodeSelectionButton.h:61
MitkQtWidgetsExports.h
mitkDataNode.h
QmitkNodeSelectionButton
Button class that can be used to display information about a given node. If the given node is a nullp...
Definition: QmitkNodeSelectionButton.h:29
mitk::DataNode
Class for nodes of the DataTree.
Definition: mitkDataNode.h:63
QmitkNodeSelectionButton::m_OutDatedThumbNail
bool m_OutDatedThumbNail
Definition: QmitkNodeSelectionButton.h:60