Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
QmitkForm.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 QmitkForm_h
14 #define QmitkForm_h
15 
16 #include <mitkForm.h>
17 
18 #include <MitkFormsUIExports.h>
19 
20 #include <QWidget>
21 
22 namespace Ui
23 {
24  class QmitkForm;
25 }
26 
27 class MITKFORMSUI_EXPORT QmitkForm : public QWidget
28 {
29  Q_OBJECT
30 
31 public:
32  explicit QmitkForm(QWidget* parent = nullptr);
33  explicit QmitkForm(mitk::Forms::Form* form, QWidget* parent = nullptr);
34  ~QmitkForm() override;
35 
36  mitk::Forms::Form* GetForm() const;
37  void SetForm(mitk::Forms::Form* form);
38 
39  fs::path GetResponsesPath() const;
40  void SetResponsesPath(const fs::path& csvPath);
41 
42 signals:
43  void Submit();
44 
45 private:
46  void CreateQuestionWidgets();
47  bool ValidateCurrentSection();
48  void Reset();
49 
50  void Update();
51  void UpdateFormHeader();
52  void UpdateSubmittedHeader();
53  void UpdateSectionHeader();
54  void UpdateQuestionWidgets();
55  void UpdateFormButtons();
56 
57  void OnBackButtonClicked();
58  void OnNextButtonClicked();
59  void OnSubmitButtonClicked();
60  void OnClearButtonClicked();
61  void OnSubmitAnotherButtonClicked();
62 
63  Ui::QmitkForm* m_Ui;
64  mitk::Forms::Form* m_Form;
65  fs::path m_ResponsesPath;
66  bool m_HasBeenSubmitted;
67 };
68 
69 #endif
mitkForm.h
mitk::Forms::Form
Definition: mitkForm.h:36
Ui
Definition: BlueBerryExampleLauncherDialog.h:21
QmitkForm
Definition: QmitkForm.h:27
MitkFormsUIExports.h
MITKFORMSUI_EXPORT
#define MITKFORMSUI_EXPORT
Definition: MitkFormsUIExports.h:15