Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
QmitkConfirmSegmentationDialog.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_QmitkConfirmSegmentationDialog.h"
15 
17  : QDialog(parent), m_Controls(new Ui::QmitkConfirmSegmentationDialog)
18 {
19  m_Controls->setupUi(this);
20 
21  connect(m_Controls->m_btnOverwriteSegmentation, SIGNAL(clicked()), this, SLOT(OnOverwriteExistingSegmentation()));
22  connect(m_Controls->m_btnNewSegmentation, SIGNAL(clicked()), this, SLOT(OnCreateNewSegmentation()));
23  connect(m_Controls->m_btnCancel, SIGNAL(clicked()), this, SLOT(OnCancelSegmentation()));
24 }
25 
27 {
28  delete m_Controls;
29 }
30 
32 {
33  this->done(OVERWRITE_SEGMENTATION);
34 }
35 
37 {
38  this->done(CREATE_NEW_SEGMENTATION);
39 }
40 
42 {
43  this->done(CANCEL_SEGMENTATION);
44 }
45 
47 {
48  QString text("Do you really want to overwrite " + name + "?");
49  m_Controls->m_lblDialogText->setText(text);
50 }
QmitkConfirmSegmentationDialog(QWidget *parent=nullptr)