Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
QmitkNodeDescriptor.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 QmitkNodeDescriptor_h
14 #define QmitkNodeDescriptor_h
15 
16 #include <MitkQtWidgetsExports.h>
17 
18 #include "mitkDataNode.h"
19 #include <QAction>
20 #include <QIcon>
21 #include <QList>
22 #include <QString>
23 #include <QWidgetAction>
24 #include <map>
25 #include <mitkNodePredicateBase.h>
26 
34 {
35  Q_OBJECT
36 public:
40  QmitkNodeDescriptor(const QString &_ClassName,
41  const QString &_PathToIcon,
42  mitk::NodePredicateBase *_Predicate,
43  QObject *parent);
44 
45  QmitkNodeDescriptor(const QString &_ClassName,
46  const QIcon &_Icon,
47  mitk::NodePredicateBase *_Predicate,
48  QObject *parent);
49 
53  ~QmitkNodeDescriptor() override;
57  virtual QString GetNameOfClass() const;
61  virtual QIcon GetIcon(const mitk::DataNode *node) const;
65  virtual QAction *GetSeparator() const;
69  virtual bool CheckNode(const mitk::DataNode *node) const;
73  virtual void AddAction(QAction *action, bool isBatchAction = true);
77  virtual void RemoveAction(QAction *_Action);
81  virtual QList<QAction *> GetActions() const;
86  virtual QList<QAction *> GetBatchActions() const;
87 
88 public slots:
90  void ActionDestroyed(QObject *obj = nullptr);
91 
92 protected:
93  QString m_ClassName;
94  QIcon m_Icon;
96  QList<QAction *> m_Actions;
97  QList<QAction *> m_BatchActions;
98  QAction *m_Separator;
99 };
100 
101 #endif
RemoveAction
Definition: QmitkDataNodeRemoveAction.h:23
MITKQTWIDGETS_EXPORT
#define MITKQTWIDGETS_EXPORT
Definition: MitkQtWidgetsExports.h:15
QmitkNodeDescriptor::m_Predicate
mitk::NodePredicateBase::Pointer m_Predicate
Definition: QmitkNodeDescriptor.h:95
itk::SmartPointer< Self >
mitk::NodePredicateBase
Interface for evaluation conditions used in the DataStorage class GetSubset() method.
Definition: mitkNodePredicateBase.h:35
QmitkNodeDescriptor::m_Icon
QIcon m_Icon
Definition: QmitkNodeDescriptor.h:94
mitkNodePredicateBase.h
QmitkNodeDescriptor::m_BatchActions
QList< QAction * > m_BatchActions
Definition: QmitkNodeDescriptor.h:97
QmitkNodeDescriptor::m_Separator
QAction * m_Separator
Definition: QmitkNodeDescriptor.h:98
QmitkNodeDescriptor::m_Actions
QList< QAction * > m_Actions
Definition: QmitkNodeDescriptor.h:96
QmitkNodeDescriptor
Decorator class for mitk::DataNode.
Definition: QmitkNodeDescriptor.h:33
QmitkNodeDescriptor::m_ClassName
QString m_ClassName
Definition: QmitkNodeDescriptor.h:93
MitkQtWidgetsExports.h
mitkDataNode.h
mitk::DataNode
Class for nodes of the DataTree.
Definition: mitkDataNode.h:63