mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 23:10:05 +00:00
Add specific dialog and setting for high privilege warning
This commit is contained in:
parent
71f967d536
commit
923dad4e2e
7 changed files with 274 additions and 18 deletions
47
scwx-qt/source/scwx/qt/ui/high_privilege_dialog.cpp
Normal file
47
scwx-qt/source/scwx/qt/ui/high_privilege_dialog.cpp
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
#include "high_privilege_dialog.hpp"
|
||||
#include "ui_high_privilege_dialog.h"
|
||||
|
||||
#include <scwx/util/logger.hpp>
|
||||
#include <QPushButton>
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace qt
|
||||
{
|
||||
namespace ui
|
||||
{
|
||||
|
||||
static const std::string logPrefix_ = "scwx::qt::ui::high_privilege_dialog";
|
||||
static const auto logger_ = scwx::util::Logger::Create(logPrefix_);
|
||||
|
||||
class HighPrivilegeDialogImpl
|
||||
{
|
||||
public:
|
||||
explicit HighPrivilegeDialogImpl(HighPrivilegeDialog* self) :
|
||||
self_ {self} {};
|
||||
~HighPrivilegeDialogImpl() = default;
|
||||
|
||||
HighPrivilegeDialog* self_;
|
||||
};
|
||||
|
||||
HighPrivilegeDialog::HighPrivilegeDialog(QWidget* parent) :
|
||||
QDialog(parent),
|
||||
p {std::make_unique<HighPrivilegeDialogImpl>(this)},
|
||||
ui(new Ui::HighPrivilegeDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
bool HighPrivilegeDialog::disable_high_privilege_message() {
|
||||
return ui->highPrivilegeCheckBox->isChecked();
|
||||
}
|
||||
|
||||
HighPrivilegeDialog::~HighPrivilegeDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
} // namespace ui
|
||||
} // namespace qt
|
||||
} // namespace scwx
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue