OfficeAssistant_Win10/OfficeAssistant_msvc/userimprove.cpp

36 lines
790 B
C++
Raw Permalink Normal View History

2023-08-18 19:09:55 +08:00
#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();
2023-08-18 19:09:55 +08:00
}
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);
}