Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 (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 QmitkNavigationToolManagementWidget_h
14 #define QmitkNavigationToolManagementWidget_h
15 
16 //QT headers
17 #include <QWidget>
18 
19 //mitk headers
20 #include "MitkIGTUIExports.h"
21 #include "mitkNavigationTool.h"
23 
24 //ui header
25 #include "ui_QmitkNavigationToolManagementWidgetControls.h"
26 
37 class MITKIGTUI_EXPORT QmitkNavigationToolManagementWidget : public QWidget
38 {
39  Q_OBJECT
40 
41 public:
42  static const std::string VIEW_ID;
43 
45  void Initialize(mitk::DataStorage* dataStorage);
46 
52  void LoadStorage(mitk::NavigationToolStorage::Pointer storageToLoad);
53 
54  QmitkNavigationToolManagementWidget(QWidget* parent = nullptr, Qt::WindowFlags f = nullptr);
56 
57 signals:
58 
64  void NewStorageAdded(mitk::NavigationToolStorage::Pointer newStorage, std::string storageName);
65 
66  protected slots:
67 
68  //main widget page:
69  void OnAddTool();
70  void OnDeleteTool();
71  void OnEditTool();
72  void OnLoadTool();
73  void OnSaveTool();
74  void OnMoveToolUp();
75  void OnMoveToolDown();
76  void OnLoadStorage();
77  void OnSaveStorage();
78  void OnCreateStorage();
79  void OnToolSelected();
80 
81  //widget page "add tool":
82  void OnAddToolCancel();
83  void OnAddToolSave();
84 
85 protected:
86 
88  virtual void CreateConnections();
89 
90  virtual void CreateQtPartControl(QWidget *parent);
91 
92  Ui::QmitkNavigationToolManagementWidgetControls* m_Controls;
93 
96 
98  mitk::NavigationToolStorage::Pointer m_NavigationToolStorage;
99 
101  bool m_edit;
102 
103  //############## private help methods #######################
104  void MessageBox(const std::string &s);
105  void UpdateToolTable();
106  void DisableStorageControls();
107  void EnableStorageControls();
108 };
109 #endif
QmitkNavigationToolManagementWidget::m_NavigationToolStorage
mitk::NavigationToolStorage::Pointer m_NavigationToolStorage
holds the NavigationToolStorage we are working with.
Definition: QmitkNavigationToolManagementWidget.h:98
QmitkNavigationToolManagementWidget::VIEW_ID
static const std::string VIEW_ID
Definition: QmitkNavigationToolManagementWidget.h:42
QmitkNavigationToolManagementWidget::m_DataStorage
mitk::DataStorage * m_DataStorage
holds the DataStorage
Definition: QmitkNavigationToolManagementWidget.h:95
QmitkNavigationToolManagementWidget::m_edit
bool m_edit
shows if we are in edit mode, if not we create new navigation tool objects.
Definition: QmitkNavigationToolManagementWidget.h:101
QmitkNavigationToolManagementWidget::m_Controls
Ui::QmitkNavigationToolManagementWidgetControls * m_Controls
Definition: QmitkNavigationToolManagementWidget.h:92
mitk::DataStorage
Data management class that handles 'was created by' relations.
Definition: mitkDataStorage.h:43
mitkNavigationToolStorage.h
QmitkNavigationToolManagementWidget
An object of this class offers an UI to manage NavigationTools and NavigationToolStorages....
Definition: QmitkNavigationToolManagementWidget.h:37
mitkNavigationTool.h