QtHPConnect/options.cpp
2019-09-15 17:23:44 +02:00

36 lines
666 B
C++

#include "options.h"
#include "ui_options.h"
#include "global.h"
#include <QSettings>
Options::Options(QWidget *parent) :
QDialog(parent),
ui(new Ui::Options)
{
ui->setupUi(this);
QString path;
QSettings appSettings("IRGP","QtHPconnect");
path=appSettings.value("contentPath").toString();
ui->filePath->setText(path);
}
void Options::accept() {
QString path;
path=ui->filePath->text();
QSettings appSettings("IRGP","QtHPconnect");
appSettings.setValue("contentPath",path);
QDialog::accept();
}
void Options::reject() {
QDialog::reject();
}
Options::~Options()
{
qDebug()<<"~Options()";
delete ui;
}