Add a Scan confirm setting.
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
#include <QDebug>
|
||||
#include <QLineEdit>
|
||||
#include <QToolButton>
|
||||
#include <QGridLayout>
|
||||
|
||||
|
||||
#include "src/dialogs/SelectDialog.h"
|
||||
#include "network/networkcfgdialog.h"
|
||||
@@ -48,7 +50,19 @@ systemSettingForm::systemSettingForm(QWidget* parent) :
|
||||
ui->btnFlt->setText(JsonObject::Instance()->defaultFilter());
|
||||
ui->btnFlt->setObjectName("BigBtn");
|
||||
|
||||
////test begin
|
||||
QGridLayout* gridLayout = (QGridLayout*)ui->block10->layout();
|
||||
auto btn_needConfirm = new ImageSwitch(this);
|
||||
auto lbl_needConfirm = new QLabel(this);
|
||||
lbl_needConfirm->setText("Scan Confirm");
|
||||
gridLayout->addWidget(btn_needConfirm, 4, 2, 1, 1);
|
||||
gridLayout->addWidget(lbl_needConfirm, 4, 0, 1, 1);
|
||||
btn_needConfirm->setChecked(JsonObject::Instance()->getScanConfirm());
|
||||
QFrame* line5 = new QFrame(this);
|
||||
line5->setFrameShape(QFrame::HLine);
|
||||
line5->setFrameShadow(QFrame::Sunken);
|
||||
gridLayout->addWidget(line5,5,0);
|
||||
|
||||
////test begin
|
||||
//flag_disksize = true;
|
||||
//m_disksize = 75.0;
|
||||
////test end
|
||||
@@ -86,6 +100,9 @@ systemSettingForm::systemSettingForm(QWidget* parent) :
|
||||
////
|
||||
}
|
||||
});
|
||||
connect(btn_needConfirm, &ImageSwitch::clicked, [=]() {
|
||||
JsonObject::Instance()->setScanConfirm(btn_needConfirm->getChecked());
|
||||
});
|
||||
connect(ui->btn_network, &QToolButton::clicked, [=]() {
|
||||
GetAdminPsw dialog(this);
|
||||
if (dialog.exec() == QDialog::Accepted)
|
||||
|
||||
Reference in New Issue
Block a user