Medical Imaging Interaction Toolkit  2021.10.99-1c4db16f
Medical Imaging Interaction Toolkit
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 // QmitkNodeDescriptor_h
Decorator class for mitk::DataNode.
#define MITKQTWIDGETS_EXPORT
QList< QAction * > m_Actions
mitk::NodePredicateBase::Pointer m_Predicate
Interface for evaluation conditions used in the DataStorage class GetSubset() method.
QList< QAction * > m_BatchActions
Class for nodes of the DataTree.
Definition: mitkDataNode.h:57