畸变参数传递改为float类型
This commit is contained in:
parent
254a54d159
commit
6019462e06
|
@ -46,7 +46,7 @@ Dialog_UserInput::Dialog_UserInput(ui_helper::value_type type, const QString &ti
|
||||||
this->setFont(ft);
|
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()
|
Dialog_UserInput::~Dialog_UserInput()
|
||||||
|
@ -70,7 +70,7 @@ parameter *Dialog_UserInput::getParam()
|
||||||
}
|
}
|
||||||
else if (m_type == ui_helper::VAL_TYPE_FLOAT)
|
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)
|
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)
|
if (m_type == ui_helper::VAL_TYPE_INT || m_type == ui_helper::VAL_TYPE_TIPS_VAL)
|
||||||
return sizeof(int);
|
return sizeof(int);
|
||||||
if (m_type == ui_helper::VAL_TYPE_FLOAT)
|
if (m_type == ui_helper::VAL_TYPE_FLOAT)
|
||||||
return sizeof(double);
|
return sizeof(float);
|
||||||
if (m_type == ui_helper::VAL_TYPE_STRING)
|
if (m_type == ui_helper::VAL_TYPE_STRING)
|
||||||
return m_sData.size() + 1;
|
return m_sData.size() + 1;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -21,7 +21,7 @@ public:
|
||||||
ui_helper::value_type m_type;
|
ui_helper::value_type m_type;
|
||||||
bool m_bData;
|
bool m_bData;
|
||||||
int m_iData;
|
int m_iData;
|
||||||
double m_fData;
|
float m_fData;
|
||||||
std::wstring m_sData;
|
std::wstring m_sData;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -167,7 +167,7 @@
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label_destortionInfo">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
|
|
Loading…
Reference in New Issue