Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkNavigationToolManagementWidget.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 QMITKNAVIGATIONTOOLMANAGEMENTWIDGET_H
18 #define QMITKNAVIGATIONTOOLMANAGEMENTWIDGET_H
19 
20 //QT headers
21 #include <QWidget>
22 
23 //mitk headers
24 #include "MitkIGTUIExports.h"
25 #include "mitkNavigationTool.h"
27 
28 //ui header
29 #include "ui_QmitkNavigationToolManagementWidgetControls.h"
30 
41 class MITKIGTUI_EXPORT QmitkNavigationToolManagementWidget : public QWidget
42 {
43  Q_OBJECT
44 
45 public:
46  static const std::string VIEW_ID;
47 
49  void Initialize(mitk::DataStorage* dataStorage);
50 
56  void LoadStorage(mitk::NavigationToolStorage::Pointer storageToLoad);
57 
58  QmitkNavigationToolManagementWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
60 
61 signals:
62 
68  void NewStorageAdded(mitk::NavigationToolStorage::Pointer newStorage, std::string storageName);
69 
70  protected slots:
71 
72  //main widget page:
73  void OnAddTool();
74  void OnDeleteTool();
75  void OnEditTool();
76  void OnLoadTool();
77  void OnSaveTool();
78  void OnMoveToolUp();
79  void OnMoveToolDown();
80  void OnLoadStorage();
81  void OnSaveStorage();
82  void OnCreateStorage();
83 
84  //widget page "add tool":
85  void OnAddToolCancel();
86  void OnAddToolSave();
87 
88 protected:
89 
91  virtual void CreateConnections();
92 
93  virtual void CreateQtPartControl(QWidget *parent);
94 
95  Ui::QmitkNavigationToolManagementWidgetControls* m_Controls;
96 
99 
102 
104  bool m_edit;
105 
106  //############## private help methods #######################
107  void MessageBox(std::string s);
108  void UpdateToolTable();
109  void DisableStorageControls();
110  void EnableStorageControls();
111 };
112 #endif
Data management class that handles 'was created by' relations.
itk::SmartPointer< Self > Pointer
mitk::NavigationToolStorage::Pointer m_NavigationToolStorage
holds the NavigationToolStorage we are working with.
bool m_edit
shows if we are in edit mode, if not we create new navigation tool objects.
An object of this class offers an UI to manage NavigationTools and NavigationToolStorages. This means a user may create, save and load single NavigationTools and/or NavigationToolStorages with this widget.
mitk::DataStorage * m_DataStorage
holds the DataStorage
Ui::QmitkNavigationToolManagementWidgetControls * m_Controls