initial commit
This commit is contained in:
33
mainwindow.cpp
Normal file
33
mainwindow.cpp
Normal file
@@ -0,0 +1,33 @@
|
||||
#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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user