Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef QmitkNodeDescriptor_h
18 #define QmitkNodeDescriptor_h
19 
20 #include <MitkQtWidgetsExports.h>
21 
22 #include "mitkDataNode.h"
23 #include <QAction>
24 #include <QIcon>
25 #include <QList>
26 #include <QString>
27 #include <QWidgetAction>
28 #include <map>
29 #include <mitkNodePredicateBase.h>
30 
44 {
45  Q_OBJECT
46 public:
50  QmitkNodeDescriptor(const QString &_ClassName,
51  const QString &_PathToIcon,
52  mitk::NodePredicateBase *_Predicate,
53  QObject *parent);
57  virtual ~QmitkNodeDescriptor();
61  virtual QString GetNameOfClass() const;
65  virtual QIcon GetIcon() const;
69  virtual QAction *GetSeparator() const;
73  virtual bool CheckNode(const mitk::DataNode *node) const;
77  virtual void AddAction(QAction *action, bool isBatchAction = true);
81  virtual void RemoveAction(QAction *_Action);
85  virtual QList<QAction *> GetActions() const;
90  virtual QList<QAction *> GetBatchActions() const;
91 
92 public slots:
94  void ActionDestroyed(QObject *obj = nullptr);
95 
96 protected:
97  QString m_ClassName;
98  QString m_PathToIcon;
100  QList<QAction *> m_Actions;
101  QList<QAction *> m_BatchActions;
102  QAction *m_Separator;
103 };
104 
105 #endif // QmitkNodeDescriptor_h
QmitkNodeQmitkNodeDescriptor is Decorator class for the mitk::DataNode which enhances certain mitk::D...
#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:66