Medical Imaging Interaction Toolkit  2021.10.99-1c4db16f
Medical Imaging Interaction Toolkit
QmitkDataManagerView.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 QMITKDATAMANAGERVIEW_H
14 #define QMITKDATAMANAGERVIEW_H
15 
17 
18 // mitk core
19 #include <mitkNodePredicateBase.h>
20 
21 // berry plugin
22 #include <berryIBerryPreferences.h>
23 
24 // mitk gui qt common plugin
25 #include <QmitkAbstractView.h>
26 
27 // mitk gui qt application
29 
30 // qt
31 #include <QItemSelection>
32 
33 // forward declarations
34 class QAction;
35 class QModelIndex;
36 class QTreeView;
37 class QSignalMapper;
38 
41 class QmitkDataManagerItemDelegate;
43 
49 {
50  Q_OBJECT
51 
52 public:
53 
54  static const QString VIEW_ID; // = "org.mitk.views.datamanager"
55 
57 
58  ~QmitkDataManagerView() override;
59 
60 public Q_SLOTS:
61 
62  // invoked when the berry preferences were changed
63  void OnPreferencesChanged(const berry::IBerryPreferences* prefs) override;
64 
66  // Slots for Qt node tree signals
69  void NodeTreeViewRowsInserted(const QModelIndex& parent, int start, int end);
70 
72  void NodeTreeViewRowsRemoved(const QModelIndex& parent, int start, int end);
73 
75  void NodeSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected);
76 
77  void OnNodeVisibilityChanged();
78 
80  void ShowIn(const QString& editorId);
81 
82 protected:
83 
84  void CreateQtPartControl(QWidget* parent) override;
85 
86  void SetFocus() override;
90  void NodeChanged(const mitk::DataNode* node) override;
91 
92 protected:
93 
94  QWidget* m_Parent;
96 
111  QTreeView* m_NodeTreeView;
120 
122  QSignalMapper* m_ShowInMapper;
123 
125  QList<QAction*> m_ShowInActions;
126 
129 
130  QmitkDataManagerItemDelegate* m_ItemDelegate;
131 
132 private:
133 
134  QItemSelectionModel* GetDataNodeSelectionModel() const override;
135 
136 };
137 
138 #endif // QMITKDATAMANAGERVIEW_H
QSignalMapper * m_ShowInMapper
Maps "Show in" actions to editor ids.
mitk::NodePredicateBase::Pointer m_NodeWithNoDataFilterPredicate
berry::IBerryPreferences::Pointer m_DataManagerPreferencesNode
vcl_size_t m_CurrentRowCount
saves the current amount of rows shown in the data manager
QmitkDataStorageTreeModel * m_NodeTreeModel
A plain widget as the base pane.
QmitkDataManagerItemDelegate * m_ItemDelegate
QmitkDataStorageFilterProxyModel * m_FilterModel
QmitkDataNodeContextMenu * m_DataNodeContextMenu
The context menu that shows up when right clicking on a node.
#define MITK_QT_DATAMANAGER
mitk::NodePredicateBase::Pointer m_HelperObjectFilterPredicate
static const QString VIEW_ID
QList< QAction * > m_ShowInActions
A list of "Show in" actions.
virtual void CreateQtPartControl(QWidget *parent)=0
A view that shows all data nodes of the data storage in a qt tree view.
A convenient base class for MITK related BlueBerry Views.
void SetFocus() override=0
Enables loading data into a MITK application via Drag&#39;n Drop.
QTreeView * m_NodeTreeView
The Table view to show the selected nodes.
bool m_SurfaceDecimation
flag indicating whether a surface created from a selected decimation is decimated with vtkQuadricDeci...
QmitkDnDFrameWidget * m_DnDFrameWidget
Class for nodes of the DataTree.
Definition: mitkDataNode.h:57