36 lines
790 B
C++
36 lines
790 B
C++
#include "userimprove.h"
|
|
#include "globalvariables.h"
|
|
UserImprove::UserImprove(QWidget* parent)
|
|
: QDialog(parent)
|
|
{
|
|
ui.setupUi(this);
|
|
connect(ui.submit, &QPushButton::clicked, this, &UserImprove::submit);
|
|
connect(ui.detail, &QPushButton::clicked, this, &UserImprove::showDetail);
|
|
setFixedSize(600, 400);
|
|
}
|
|
|
|
UserImprove::~UserImprove()
|
|
{
|
|
}
|
|
|
|
void UserImprove::submit()
|
|
{
|
|
if (ui.checkBox->checkState() == Qt::Checked)
|
|
{
|
|
agree = true;
|
|
}
|
|
else
|
|
{
|
|
agree = false;
|
|
}
|
|
close();
|
|
}
|
|
void UserImprove::showDetail()
|
|
{
|
|
QString path = QApplication::applicationDirPath();
|
|
QString license = path + "/detail.txt";
|
|
license.replace("/", "\\");
|
|
ShellExecute(GetDesktopWindow(), L"open", L"notepad.exe", license.toStdWString().c_str(), nullptr, SW_SHOW);
|
|
}
|
|
|