#include "cdlgparam_alter.h"
#include "ui_cdlgparam_alter.h"
#include "cworker.h"
#include "cworkerdriver.h"
#include "logic.h"
#include "mainwindow.h"
CDlgParam_Alter::CDlgParam_Alter(const int& value, QWidget *parent) :
    QDialog(parent),
    ui(new Ui::CDlgParam_Alter)
{
    ui->setupUi(this);

    ui->lineEdit_Value->m_bNumOnly=false;
	ui->lineEdit_Value->setText(QString::number(value));
}

CDlgParam_Alter::~CDlgParam_Alter()
{
    delete ui;
}

void CDlgParam_Alter::on_pushButton_OK_clicked()
{
    m_sValue=ui->lineEdit_Value->text();

    accept();
}

void CDlgParam_Alter::on_pushButton_Cancel_clicked()
{
    reject();
}

void CDlgParam_Alter::showEvent(QShowEvent *)
{
	ui->lineEdit_Value->selectAll();
}
