QElectroTech  0.70
importelementdialog.cpp
Go to the documentation of this file.
1 /*
2  Copyright 2006-2019 The QElectroTech Team
3  This file is part of QElectroTech.
4 
5  QElectroTech is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 2 of the License, or
8  (at your option) any later version.
9 
10  QElectroTech is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
17 */
18 #include "importelementdialog.h"
19 #include "ui_importelementdialog.h"
20 #include <QButtonGroup>
21 
23  QDialog(parent),
24  ui(new Ui::ImportElementDialog)
25 {
26  ui->setupUi(this);
27  setUpWidget();
28 }
29 
31 {
32  delete ui;
33 }
34 
36 {
37  if (ui->m_use_actual_rd->isChecked()) { return QET::Ignore; }
38  else if (ui->m_erase_actual_rb->isChecked()) { return QET::Erase; }
39  else if (ui->m_use_both_rb->isChecked()) { return QET::Rename; }
40  else return QET::Abort;
41 }
42 
44 {
45  QButtonGroup *button_group = new QButtonGroup(this);
46  button_group->addButton(ui->m_use_actual_rd);
47  button_group->addButton(ui->m_use_drop_rb);
48  QButtonGroup *button_group_drop = new QButtonGroup(this);
49  button_group_drop->addButton(ui->m_erase_actual_rb);
50  button_group_drop->addButton(ui->m_use_both_rb);
51 
52  ui->m_use_drop_rb->setChecked(true);
53  ui->m_use_both_rb->setChecked(true);
54 }
abort the whole operation, ignoring the curent item
Definition: qet.h:129
Action
Definition: qet.h:125
QET::Action action() const
the target has to be renamed
Definition: qet.h:131
Erase the target content.
Definition: qet.h:128
Ui::ImportElementDialog * ui
ImportElementDialog(QWidget *parent=nullptr)
Skip the current item.
Definition: qet.h:127