#include "setnumdlg.h" #include "ui_setnumdlg.h" #include "SystemManage.h" #include #include "LogInfo.h" SystemManage* sysMgr = nullptr; SetNumDlg::SetNumDlg(QWidget *parent) : QDialog(parent), ui(new Ui::SetNumDlg) { ui->setupUi(this); ui->btn_confirm->setAutoDefault(false); // 禁止回车自动触发 ui->btn_confirm->setDefault(false); // 彻底取消默认按钮 } SetNumDlg::~SetNumDlg() { delete ui; } bool SetNumDlg::getIsSet() { return isSet; } int SetNumDlg::getNum() { return num; } void SetNumDlg::on_btn_confirm_clicked() { num = ui->sb_num->value(); isSet = ui->cb_setNum->isChecked(); this->hide(); emit sig_setNum(); } void SetNumDlg::on_btn_clearProductCnt_clicked() { emit sig_clearCnt(); }