几乎完成
This commit is contained in:
34
OfficeAssistant_msvc/userimprove.cpp
Normal file
34
OfficeAssistant_msvc/userimprove.cpp
Normal file
@ -0,0 +1,34 @@
|
||||
#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;
|
||||
}
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user