34 lines
789 B
C++
34 lines
789 B
C++
#include "mainwindow.h"
|
|
#include "ui_mainwindow.h"
|
|
|
|
#include <QFile>
|
|
|
|
class QNetworkReply;
|
|
namespace shutdown2 {
|
|
|
|
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow)
|
|
{
|
|
ui->setupUi(this);
|
|
setFixedSize(size());
|
|
#if defined(Q_OS_WIN)
|
|
setWindowFlags(windowFlags() | Qt::MSWindowsFixedSizeDialogHint);
|
|
#endif
|
|
|
|
mSettings = new QSettings(QSettings::IniFormat, QSettings::UserScope, "RogoSoftware", "EasyShutdown2");
|
|
|
|
restoreGeometry(mSettings->value("geometry", saveGeometry()).toByteArray());
|
|
move(mSettings->value("pos", pos()).toPoint());
|
|
|
|
QFile css(":style.css");
|
|
if (css.open(QFile::ReadOnly | QFile::Text))
|
|
this->setStyleSheet(css.readAll());
|
|
}
|
|
|
|
MainWindow::~MainWindow()
|
|
{
|
|
delete ui;
|
|
delete mSettings;
|
|
}
|
|
|
|
}
|