mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-30 15:52:12 +01:00
ConfigTaskWidget: add QDoubleSpinBox to addUAVObjectToWidgetRelation()
This commit is contained in:
parent
13cee28ead
commit
91ba89eece
@ -193,6 +193,10 @@ void ConfigTaskWidget::populateWidgets()
|
|||||||
{
|
{
|
||||||
cb->setValue(ow->field->getValue(ow->index).toInt()/ow->scale);
|
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))
|
else if(QSlider * cb=qobject_cast<QSlider *>(ow->widget))
|
||||||
{
|
{
|
||||||
cb->setValue(ow->field->getValue(ow->index).toInt()/ow->scale);
|
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);
|
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))
|
else if(QSlider * cb=qobject_cast<QSlider *>(ow->widget))
|
||||||
{
|
{
|
||||||
cb->setValue(ow->field->getValue(ow->index).toInt()/ow->scale);
|
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);
|
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))
|
else if(QSlider * cb=qobject_cast<QSlider *>(ow->widget))
|
||||||
{
|
{
|
||||||
ow->field->setValue(cb->value()* ow->scale,ow->index);
|
ow->field->setValue(cb->value()* ow->scale,ow->index);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user