MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
QmitkUSNavigationAbstractSettingsWidget.h
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found in the LICENSE file.
10
11============================================================================*/
12#ifndef QmitkUSNavigationAbstractSettingsWidget_h
13#define QmitkUSNavigationAbstractSettingsWidget_h
14
15#include <QWidget>
16
17#include "mitkDataNode.h"
18
29{
30 Q_OBJECT
31
32signals:
33 void Saved();
34 void Canceled();
36
37protected slots:
42 void OnSave();
43
49 void OnCancel();
50
51public:
52 explicit QmitkUSNavigationAbstractSettingsWidget(QWidget *parent = nullptr);
54
60 void LoadSettings();
61
66 void SetSettingsNode(itk::SmartPointer<mitk::DataNode> settingsNode, bool overwriteValues = false);
68
69protected:
74 virtual void OnSetSettingsNode(itk::SmartPointer<mitk::DataNode> settingsNode, bool overwriteValues) = 0;
75
80 virtual void OnSaveProcessing() = 0;
81
87 virtual void OnCancelProcessing() {}
88
93 virtual void OnLoadSettingsProcessing() = 0;
94
95private:
96 mitk::DataNode::Pointer m_SettingsNode;
97};
98
99#endif
Abstract class of settings widgets used by the QmitkUSNavigationProcessWidget. This class handles the...
void SetSettingsNode(itk::SmartPointer< mitk::DataNode > settingsNode, bool overwriteValues=false)
Setter for the data node in which the settings are loaded. The settings are made available as propert...
void OnCancel()
Ends the settings changing process without saving the changes. OnCancelProcessing() is called and the...
void SettingsChanged(itk::SmartPointer< mitk::DataNode >)
virtual void OnSetSettingsNode(itk::SmartPointer< mitk::DataNode > settingsNode, bool overwriteValues)=0
Method for handling the setting of a new settings node. This method has to be implemented by a concre...
virtual void OnLoadSettingsProcessing()=0
Method for actually loading the settings. This method has to be implemented by a concrete subclass.
virtual void OnSaveProcessing()=0
Method for actually saving the settings. This method has to be implemented by a concrete subclass.
virtual void OnCancelProcessing()
Method for handling the cancel process. This method can be implemented by a concrete subclass....
void OnSave()
Triggers the saving of the current settings. OnSaveProcessing() is called and the Saved() signal is e...
void LoadSettings()
Loads the settings. The actual loading is done by calling the OnLoadSettingsProcessing() method.