first commit
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
#include "setnumdlg.h"
|
||||
#include "ui_setnumdlg.h"
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
bool SetNumDlg::getIsSetCur()
|
||||
{
|
||||
return isSetCur;
|
||||
}
|
||||
|
||||
int SetNumDlg::getCurNum()
|
||||
{
|
||||
return curNum;
|
||||
}
|
||||
|
||||
void SetNumDlg::on_btn_confirm_clicked()
|
||||
{
|
||||
num = ui->sb_num->value();
|
||||
isSet = ui->cb_setNum->isChecked();
|
||||
curNum = ui->sb_curNum->value();
|
||||
isSetCur = ui->cb_setCurNum->isChecked();
|
||||
|
||||
this->hide();
|
||||
emit sig_setNum();
|
||||
}
|
||||
Reference in New Issue
Block a user