mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
ConfigTaskWidget: add QDoubleSpinBox to addUAVObjectToWidgetRelation()
This commit is contained in:
parent
6444d6b3f6
commit
4fcd0f97c5
@ -193,6 +193,10 @@ void ConfigTaskWidget::populateWidgets()
|
||||
{
|
||||
cb->setValue(ow->field->getValue(ow->index).toInt()/ow->scale);
|
||||
}
|
||||
else if (QDoubleSpinBox * cb = qobject_cast<QDoubleSpinBox *>(ow->widget))
|
||||
{
|
||||
cb->setValue(ow->field->getValue(ow->index).toDouble()/ow->scale);
|
||||
}
|
||||
else if(QSlider * cb=qobject_cast<QSlider *>(ow->widget))
|
||||
{
|
||||
cb->setValue(ow->field->getValue(ow->index).toInt()/ow->scale);
|
||||
@ -226,6 +230,10 @@ void ConfigTaskWidget::refreshWidgetsValues()
|
||||
{
|
||||
cb->setValue(ow->field->getValue(ow->index).toInt()/ow->scale);
|
||||
}
|
||||
else if (QDoubleSpinBox * cb = qobject_cast<QDoubleSpinBox *>(ow->widget))
|
||||
{
|
||||
cb->setValue(ow->field->getValue(ow->index).toDouble()/ow->scale);
|
||||
}
|
||||
else if(QSlider * cb=qobject_cast<QSlider *>(ow->widget))
|
||||
{
|
||||
cb->setValue(ow->field->getValue(ow->index).toInt()/ow->scale);
|
||||
@ -258,6 +266,10 @@ void ConfigTaskWidget::updateObjectsFromWidgets()
|
||||
{
|
||||
ow->field->setValue(cb->value()* ow->scale,ow->index);
|
||||
}
|
||||
else if (QDoubleSpinBox * cb = qobject_cast<QDoubleSpinBox *>(ow->widget))
|
||||
{
|
||||
ow->field->setValue(cb->value()* ow->scale,ow->index);
|
||||
}
|
||||
else if(QSlider * cb=qobject_cast<QSlider *>(ow->widget))
|
||||
{
|
||||
ow->field->setValue(cb->value()* ow->scale,ow->index);
|
||||
|
Loading…
Reference in New Issue
Block a user