Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkSelectXnatUploadDestinationDialog.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 QmitkSelectXnatUploadDestinationDialog_h
14 #define QmitkSelectXnatUploadDestinationDialog_h
15 
16 #include <MitkXNATExports.h>
17 
18 #include <QDialog>
19 #include <memory>
20 
21 namespace Ui
22 {
24 }
25 
26 class ctkXnatObject;
27 class ctkXnatSession;
28 class QModelIndex;
29 class QmitkXnatTreeModel;
30 
45 {
46  Q_OBJECT
47 
48 public:
60  explicit QmitkSelectXnatUploadDestinationDialog(ctkXnatSession *session, const QStringList &availableResources, QWidget *parent = nullptr);
61 
66 
78  ctkXnatObject *GetUploadDestination();
79 
88  void SetXnatResourceFolderUrl(const QString &url);
89 
90 protected slots:
91 
95  void OnUpload();
96 
102  void OnSelectResource(bool selectResource);
103 
109  void OnSelectFromTreeView(bool selectFromTreeView);
110 
116  void OnResourceEntered(const QString &resourceEntered);
117 
124  void OnResourceSelected(const QString &resource);
125 
133  void OnXnatNodeSelected(const QModelIndex &index);
134 
138  void OnCancel();
139 
140 private:
141  QmitkXnatTreeModel *m_TreeModel;
142  QString m_Url;
143  QString m_ResourceName;
144  bool m_CreateNewFolder;
145  std::unique_ptr<Ui::QmitkSelectXnatUploadDestinationDialog> ui;
146 };
147 
148 #endif
#define MITKXNAT_EXPORT
Dialog for selecting an upload destination on an XNAT server.
~QmitkSelectXnatUploadDestinationDialog() override
Destructor.
QmitkSelectXnatUploadDestinationDialog(ctkXnatSession *session, const QStringList &availableResources, QWidget *parent=nullptr)
Construct the upload destination dialog.
void OnSelectFromTreeView(bool selectFromTreeView)
Slot called when the "Select From Tree View" radio button is toggled.
void SetXnatResourceFolderUrl(const QString &url)
Set the XNAT resource folder URL used when creating a new resource.
void OnResourceEntered(const QString &resourceEntered)
Slot called when the user types a new resource folder name.
void OnXnatNodeSelected(const QModelIndex &index)
Slot called when an XNAT node is selected in the tree view.
void OnResourceSelected(const QString &resource)
Slot called when an existing resource is selected from the combo box.
void OnSelectResource(bool selectResource)
Slot called when the "Select Resource" radio button is toggled.
ctkXnatObject * GetUploadDestination()
Retrieve the selected upload destination as an XNAT object.
void OnUpload()
Slot called when the user clicks the Upload button. Accepts the dialog.
void OnCancel()
Slot called when the user clicks the Cancel button. Rejects the dialog.
Tree model for browsing the XNAT server hierarchy with MITK-specific enhancements.