Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkXnatProjectWidget.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 QmitkXnatProjectWidget_h
14 #define QmitkXnatProjectWidget_h
15 
16 // XNATUI
17 #include <MitkXNATExports.h>
18 
19 // Qt
20 #include <QWidget>
21 #include <memory>
22 
23 // CTK XNAT Core
24 class ctkXnatProject;
25 
26 namespace Ui { class QmitkXnatProjectWidgetControls; }
27 
39 {
40  Q_OBJECT
41 
42 public:
46  enum Mode
47  {
48  INFO,
49  CREATE
50  };
51 
57  QmitkXnatProjectWidget(QWidget *parent = nullptr);
58 
65  QmitkXnatProjectWidget(Mode mode, QWidget *parent = nullptr);
66 
71 
81  void SetProject(ctkXnatProject *project);
82 
91  ctkXnatProject *GetProject() const;
92 
93 protected:
94  std::unique_ptr<Ui::QmitkXnatProjectWidgetControls> m_Controls;
95 
96 private:
97  void Init();
98  Mode m_Mode;
99  ctkXnatProject *m_Project;
100 };
101 
102 #endif
#define MITKXNAT_EXPORT
Widget for displaying or editing XNAT project properties.
QmitkXnatProjectWidget(Mode mode, QWidget *parent=nullptr)
Construct the widget in the specified mode.
Mode
Operation mode for the project widget.
@ INFO
Display project properties in read-only mode.
ctkXnatProject * GetProject() const
Retrieve the project object, optionally updated with user-entered values.
QmitkXnatProjectWidget(QWidget *parent=nullptr)
Construct the widget in INFO mode.
void SetProject(ctkXnatProject *project)
Populate the widget fields from the given project object.
std::unique_ptr< Ui::QmitkXnatProjectWidgetControls > m_Controls
UI controls generated from the .ui form.
~QmitkXnatProjectWidget() override
Destructor.