|
|
@ -96,6 +96,12 @@ void NumKeyDia::setPLineEdit(QLineEdit *newPLineEdit) |
|
|
|
|
|
|
|
m_isDouble = m_pLineEdit->property("IsDouble").toBool(); |
|
|
|
|
|
|
|
if(m_isDouble) |
|
|
|
{ |
|
|
|
m_format = m_pLineEdit->property("Format").toInt(); |
|
|
|
m_prec = m_pLineEdit->property("Prec").toInt(); |
|
|
|
} |
|
|
|
|
|
|
|
if(m_minValue == m_maxValue) |
|
|
|
{ |
|
|
|
ui->label_min->setText(tr("no limit")); |
|
|
@ -105,8 +111,8 @@ void NumKeyDia::setPLineEdit(QLineEdit *newPLineEdit) |
|
|
|
{ |
|
|
|
if(m_isDouble) |
|
|
|
{ |
|
|
|
ui->label_max->setText(QString::number(m_maxValue, 10, 3)); |
|
|
|
ui->label_min->setText(QString::number(m_minValue, 10, 3)); |
|
|
|
ui->label_max->setText(QString::number(m_maxValue, m_format, m_prec)); |
|
|
|
ui->label_min->setText(QString::number(m_minValue, m_format, m_prec)); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
@ -157,7 +163,7 @@ void NumKeyDia::on_btn_ok_clicked() |
|
|
|
} |
|
|
|
|
|
|
|
if(m_isDouble) |
|
|
|
m_pLineEdit->setText(QString::number(_d, 10, 3)); |
|
|
|
m_pLineEdit->setText(QString::number(_d, m_format, m_prec)); |
|
|
|
else |
|
|
|
m_pLineEdit->setText(QString::number(_d, 10, 0)); |
|
|
|
} |
|
|
|