Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
QmitkXnatUploadFromDataStorageDialog.cpp
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 
14 #include "ui_QmitkXnatUploadFromDataStorageDialog.h"
15 
16 #include <mitkDataStorage.h>
17 #include <mitkNodePredicateAnd.h>
18 #include <mitkNodePredicateNot.h>
20 
22  : QDialog(parent), ui(new Ui::QmitkXnatUploadFromDataStorageDialog), m_SelectedNode(nullptr)
23 {
24  ui->setupUi(this);
25 
26  // Not yet implemented
27  ui->cbUploadMITKProject->hide();
28  ui->leMITKProjectFileName->hide();
29  //
30 
31  connect(ui->btnCancel, SIGNAL(clicked()), this, SLOT(OnCancel()));
32  connect(ui->btnUpload, SIGNAL(clicked()), this, SLOT(OnUpload()));
33  connect(ui->cbUploadMITKProject, SIGNAL(checked()), this, SLOT(OnUploadSceneChecked()));
34  connect(ui->leMITKProjectFileName,
35  SIGNAL(textEdited(const QString &)),
36  this,
37  SLOT(OnMITKProjectFileNameEntered(const QString &)));
38  connect(ui->cBDataSelection,
39  SIGNAL(OnSelectionChanged(const mitk::DataNode *)),
40  this,
41  SLOT(OnDataSelected(const mitk::DataNode *)));
42 
48  ui->cBDataSelection->SetPredicate(pred);
49 }
50 
52 {
53  delete ui;
54 }
55 
57 {
58  ui->cBDataSelection->SetDataStorage(ds);
59 }
60 
62 {
63  this->done(QDialog::Accepted);
64 }
65 
67 {
68 }
69 
71 {
72  this->done(QDialog::Rejected);
73 }
74 
76 {
77 }
78 
80 {
81  m_SelectedNode = const_cast<mitk::DataNode *>(node);
82  if (m_SelectedNode.IsNotNull())
83  ui->btnUpload->setEnabled(true);
84 }
85 
87 {
88  return m_SelectedNode;
89 }
Data management class that handles &#39;was created by&#39; relations.
static Pointer New()
static Pointer New(const mitk::NodePredicateBase *_arg)
static Pointer New(const char *_arg)
Class for nodes of the DataTree.
Definition: mitkDataNode.h:57