2020-05-05 20:38:31 +02:00
|
|
|
/*
|
2023-01-01 17:05:57 +01:00
|
|
|
Copyright 2006-2023 The QElectroTech Team
|
2020-05-05 20:38:31 +02:00
|
|
|
This file is part of QElectroTech.
|
|
|
|
|
|
|
|
QElectroTech is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
QElectroTech is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
#include "configsaveloaderwidget.h"
|
|
|
|
#include "ui_configsaveloaderwidget.h"
|
|
|
|
|
|
|
|
ConfigSaveLoaderWidget::ConfigSaveLoaderWidget(QWidget *parent) :
|
2020-08-16 14:23:59 +02:00
|
|
|
QGroupBox(parent),
|
|
|
|
ui(new Ui::ConfigSaveLoaderWidget)
|
2020-05-05 20:38:31 +02:00
|
|
|
{
|
2020-08-16 14:23:59 +02:00
|
|
|
ui->setupUi(this);
|
2020-05-05 20:38:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
ConfigSaveLoaderWidget::~ConfigSaveLoaderWidget()
|
|
|
|
{
|
|
|
|
delete ui;
|
|
|
|
}
|
|
|
|
|
2020-09-07 22:03:40 +02:00
|
|
|
QString ConfigSaveLoaderWidget::selectedText() const
|
|
|
|
{
|
2020-05-05 20:38:31 +02:00
|
|
|
return ui->m_combo_box->currentText();
|
|
|
|
}
|
|
|
|
|
2020-09-07 22:03:40 +02:00
|
|
|
QString ConfigSaveLoaderWidget::text() const
|
|
|
|
{
|
2020-05-05 20:38:31 +02:00
|
|
|
return ui->m_line_edit->text();
|
|
|
|
}
|
|
|
|
|
2020-05-30 20:18:44 +02:00
|
|
|
void ConfigSaveLoaderWidget::addItem(QString text) {
|
|
|
|
ui->m_combo_box->addItem(text);
|
|
|
|
}
|
|
|
|
|
2020-09-07 22:03:40 +02:00
|
|
|
void ConfigSaveLoaderWidget::on_m_load_pb_clicked()
|
|
|
|
{
|
2020-05-05 20:38:31 +02:00
|
|
|
emit loadClicked();
|
|
|
|
}
|
|
|
|
|
2020-09-07 22:03:40 +02:00
|
|
|
void ConfigSaveLoaderWidget::on_m_save_pb_clicked()
|
|
|
|
{
|
2020-05-05 20:38:31 +02:00
|
|
|
emit saveClicked();
|
|
|
|
}
|