rpcsx/rpcs3/rpcs3qt/welcome_dialog.cpp
Megamouse fb52cbb8b2 Trophy: Save dialog state (#3729)
* Trophy: Save dialog state and add show type settings

* SaveDataManager: Save Dialog State

* SaveDataList: Minor Optimization

* Qt: Save icon size on mouseevent resizes

it's a bit slower than using the slider because it saves every single resize. But better than not saving at all for now

* SaveData: Optimize saving to settings a bit

No Saving needed there

* Qt: get rid of all-uppercase enums and namespaces

* Qt/Linux: adjust remaining DX12 tooltip

* Qt: prevent dockwidget contextmenu
2017-11-22 15:11:59 +04:00

43 lines
929 B
C++

#include "welcome_dialog.h"
#include "ui_welcome_dialog.h"
#include "gui_settings.h"
#include "Emu/System.h"
#include <QPushButton>
#include <QCheckBox>
#include <QLabel>
#include <QVBoxLayout>
#include <QHBoxLayout>
welcome_dialog::welcome_dialog(QWidget* parent) : QDialog(parent), ui(new Ui::welcome_dialog)
{
ui->setupUi(this);
setWindowFlags(windowFlags() & Qt::WindowTitleHint & ~Qt::WindowContextHelpButtonHint);
gui_settings* settings = new gui_settings(this);
ui->okay->setEnabled(false);
connect(ui->i_have_read, &QCheckBox::clicked, [=](bool checked)
{
ui->okay->setEnabled(checked);
});
connect(ui->do_not_show, &QCheckBox::clicked, [=](bool checked)
{
settings->SetValue(gui::ib_show_welcome, QVariant(!checked));
});
connect(ui->okay, &QPushButton::pressed, this, &QDialog::accept);
layout()->setSizeConstraint(QLayout::SetFixedSize);
}
welcome_dialog::~welcome_dialog()
{
delete ui;
}