Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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,
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 QMITKDATAMANAGERVIEW_H_
18 #define QMITKDATAMANAGERVIEW_H_
19 
20 // BlueBerry includes
21 #include <berryIBerryPreferences.h>
22 
24 #include <QmitkAbstractView.h>
26 
28 #include <QItemSelection>
29 
31 
32 // Forward declarations
33 class QMenu;
34 class QAction;
35 class QComboBox;
36 class QWidgetAction;
37 class QSlider;
38 class QModelIndex;
39 class QTreeView;
40 class QPushButton;
41 class QToolBar;
42 class QMenu;
43 class QSignalMapper;
44 
47 class QmitkDataManagerItemDelegate;
50 
59 {
60  Q_OBJECT
61 
62 public:
63 
64  static const QString VIEW_ID; // = "org.mitk.extapp.defaultperspective"
69 
73  virtual ~QmitkDataManagerView();
74 
75 public slots:
79  void OpacityChanged(int value);
84  void OpacityActionChanged();
88  void ComponentActionChanged();
92  void ColorChanged();
96  void ColorActionChanged();
100  void TextureInterpolationChanged();
104  void TextureInterpolationToggled ( bool checked );
108  void ColormapMenuAboutToShow ();
112  void ColormapActionToggled (bool);
116  void SurfaceRepresentationMenuAboutToShow ();
120  void SurfaceRepresentationActionToggled ( bool checked );
124  void NodeTableViewContextMenuRequested( const QPoint & index );
128  void RemoveSelectedNodes( bool checked = false );
132  void ReinitSelectedNodes( bool checked = false );
136  void MakeAllNodesInvisible ( bool checked = false );
140  void ShowOnlySelectedNodes ( bool checked = false );
144  void ToggleVisibilityOfSelectedNodes ( bool checked = false );
148  void ShowInfoDialogForSelectedNodes ( bool checked = false );
152  void GlobalReinit ( bool checked = false );
156  void OnPreferencesChanged(const berry::IBerryPreferences*) override;
162  void ContextMenuActionTriggered( bool );
163 
165  void NodeTreeViewRowsInserted ( const QModelIndex & parent, int start, int end );
166 
168  void NodeTreeViewRowsRemoved ( const QModelIndex & parent, int start, int end );
169 
171  void NodeSelectionChanged( const QItemSelection & selected, const QItemSelection & deselected );
172 
174  void ShowIn(const QString& editorId);
175 
176 protected:
177 
181  virtual void CreateQtPartControl(QWidget* parent) override;
182 
183  void SetFocus() override;
184 
188  void FileOpen( const char * fileName, mitk::DataNode* parentNode );
189 
193  virtual void NodeChanged(const mitk::DataNode* /*node*/) override;
194 protected:
195 
196  QWidget* m_Parent;
198 
213  std::map<QAction*, berry::IConfigurationElement::Pointer> m_ConfElements;
217  QTreeView* m_NodeTreeView;
221  QMenu* m_NodeMenu;
226 
227 
229  std::vector< std::pair< QmitkNodeDescriptor*, QAction* > > m_DescriptorActionList;
230 
232  QSlider* m_OpacitySlider;
236  QPushButton* m_ColorButton;
243 
245  QSignalMapper* m_ShowInMapper;
246 
248  QList<QAction*> m_ShowInActions;
249 
252 
255 
256  QmitkDataManagerItemDelegate* m_ItemDelegate;
257 
258 private:
259 
260  QItemSelectionModel* GetDataNodeSelectionModel() const override;
261 
263  mitk::IRenderWindowPart *OpenRenderWindowPart(bool activatedEditor = true);
264 };
265 
266 #endif /*QMITKDATAMANAGERVIEW_H_*/
QSignalMapper * m_ShowInMapper
Maps "Show in" actions to editor ids.
QAction * m_ColormapAction
Lookuptable selection action.
virtual void SetFocus() override=0
mitk::NodePredicateBase::Pointer m_NodeWithNoDataFilterPredicate
QPushButton * m_ColorButton
button to change the color of a node
berry::IBerryPreferences::Pointer m_DataManagerPreferencesNode
vcl_size_t m_CurrentRowCount
saves the current amount of rows shown in the datamanager
bool m_GlobalReinitOnNodeDelete
if true, GlobalReinit() is called if a node is deleted
QmitkDataStorageTreeModel * m_NodeTreeModel
A plain widget as the base pane.
Interface for a MITK Workbench Part providing a render window.
QmitkDataManagerItemDelegate * m_ItemDelegate
QmitkDataStorageFilterProxyModel * m_FilterModel
std::vector< std::pair< QmitkNodeDescriptor *, QAction * > > m_DescriptorActionList
A list of ALL actions for the Context Menu
QmitkNumberPropertySlider * m_ComponentSlider
A Slider widget to change the rendered vector component of an image.
QSlider * m_OpacitySlider
A Slider widget to change the opacity of a node.
#define MITK_QT_DATAMANAGER
mitk::NodePredicateBase::Pointer m_HelperObjectFilterPredicate
static const QString VIEW_ID
std::map< QAction *, berry::IConfigurationElement::Pointer > m_ConfElements
QAction * m_SurfaceRepresentation
SurfaceRepresentation action.
QList< QAction * > m_ShowInActions
A list of "Show in" actions.
virtual void CreateQtPartControl(QWidget *parent)=0
QmitkDnDFrameWidget * m_DndFrameWidget
QAction * m_TextureInterpolation
TextureInterpolation action.
A View class that can show all data tree nodes of a certain DataStorage.
A convenient base class for MITK related BlueBerry Views.
QMenu * m_NodeMenu
The context menu that shows up when right clicking on a node.
Enables loading data into a MITK application via Drag'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...
Class for nodes of the DataTree.
Definition: mitkDataNode.h:66