2019-03-16 20:34:09 +01:00
|
|
|
#include "options.h"
|
|
|
|
#include "ui_options.h"
|
2019-04-02 21:14:31 +02:00
|
|
|
#include "global.h"
|
|
|
|
#include <QSettings>
|
|
|
|
|
2019-03-16 20:34:09 +01:00
|
|
|
|
|
|
|
Options::Options(QWidget *parent) :
|
|
|
|
QDialog(parent),
|
|
|
|
ui(new Ui::Options)
|
|
|
|
{
|
|
|
|
ui->setupUi(this);
|
2019-04-02 21:14:31 +02:00
|
|
|
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();
|
2019-03-16 20:34:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
Options::~Options()
|
|
|
|
{
|
2019-09-15 17:23:44 +02:00
|
|
|
qDebug()<<"~Options()";
|
2019-03-16 20:34:09 +01:00
|
|
|
delete ui;
|
|
|
|
}
|