畸变参数传递改为float类型

This commit is contained in:
yangjiaxuan 2023-01-05 19:33:10 +08:00
parent 254a54d159
commit 6019462e06
3 changed files with 5 additions and 5 deletions

View File

@ -46,7 +46,7 @@ Dialog_UserInput::Dialog_UserInput(ui_helper::value_type type, const QString &ti
this->setFont(ft);
ui->lineEdit->setValidator(new QRegExpValidator(QRegExp("[0-9]+$")));
ui->lineEdit->setValidator(new QRegExpValidator(QRegExp("^-?(([0-9]{0,16}(\\.[0-9]{1,16})$)|([0-9]+$))")));
}
Dialog_UserInput::~Dialog_UserInput()
@ -70,7 +70,7 @@ parameter *Dialog_UserInput::getParam()
}
else if (m_type == ui_helper::VAL_TYPE_FLOAT)
{
param->m_fData = ui->lineEdit->text().toDouble();
param->m_fData = ui->lineEdit->text().toFloat();
}
else if (m_type == ui_helper::VAL_TYPE_STRING)
{
@ -119,7 +119,7 @@ size_t UserInputParams::get_size()
if (m_type == ui_helper::VAL_TYPE_INT || m_type == ui_helper::VAL_TYPE_TIPS_VAL)
return sizeof(int);
if (m_type == ui_helper::VAL_TYPE_FLOAT)
return sizeof(double);
return sizeof(float);
if (m_type == ui_helper::VAL_TYPE_STRING)
return m_sData.size() + 1;
return 0;

View File

@ -21,7 +21,7 @@ public:
ui_helper::value_type m_type;
bool m_bData;
int m_iData;
double m_fData;
float m_fData;
std::wstring m_sData;
};

View File

@ -167,7 +167,7 @@
</layout>
</item>
<item>
<widget class="QLabel" name="label">
<widget class="QLabel" name="label_destortionInfo">
<property name="text">
<string/>
</property>