AST update only when editing finished

This commit is contained in:
amarjeetkapoor1 2016-07-26 23:45:13 +05:30
parent 4a600ccb6f
commit a099eab1ea
6 changed files with 12 additions and 12 deletions

View file

@ -5,7 +5,7 @@ ParameterSlider::ParameterSlider(ParameterObject *parameterobject, bool showDesc
object=parameterobject;
setName(QString::fromStdString(object->name));
setValue();
connect(slider,SIGNAL(valueChanged(int)),this,SLOT(on_Changed(int)));
connect(slider,SIGNAL(sliderReleased()),this,SLOT(on_Changed()));
if(showDescription==true){
setDescription(object->description);
}
@ -14,7 +14,7 @@ ParameterSlider::ParameterSlider(ParameterObject *parameterobject, bool showDesc
}
}
void ParameterSlider::on_Changed(int)
void ParameterSlider::on_Changed()
{
double v = slider->value();
object->value = ValuePtr(v);

View file

@ -11,7 +11,7 @@ public:
void setValue();
protected slots:
void on_Changed(int);
void on_Changed();
};
#endif // PARAMETERSLIDER_H

View file

@ -5,7 +5,7 @@ ParameterSpinBox::ParameterSpinBox(ParameterObject *parameterobject, bool showDe
object=parameterobject;
setName(QString::fromStdString(object->name));
setValue();
connect(doubleSpinBox1,SIGNAL(valueChanged(double)),this,SLOT(on_Changed(double)));
connect(doubleSpinBox1,SIGNAL(editingFinished()),this,SLOT(on_Changed()));
if(showDescription==true){
setDescription(object->description);
}
@ -14,7 +14,7 @@ ParameterSpinBox::ParameterSpinBox(ParameterObject *parameterobject, bool showDe
}
}
void ParameterSpinBox::on_Changed(double){
void ParameterSpinBox::on_Changed(){
object->value = ValuePtr(doubleSpinBox1->value());
emit changed();

View file

@ -11,7 +11,7 @@ public:
void setValue();
protected slots:
void on_Changed(double);
void on_Changed();
};
#endif // PARAMETERSPINBOX_H

View file

@ -5,10 +5,10 @@ ParameterVector::ParameterVector(ParameterObject *parameterobject, bool showDesc
object=parameterobject;
setName(QString::fromStdString(object->name));
setValue();
connect(doubleSpinBox1,SIGNAL(valueChanged(double)),this,SLOT(on_Changed(double)));
connect(doubleSpinBox2,SIGNAL(valueChanged(double)),this,SLOT(on_Changed(double)));
connect(doubleSpinBox3,SIGNAL(valueChanged(double)),this,SLOT(on_Changed(double)));
connect(doubleSpinBox4,SIGNAL(valueChanged(double)),this,SLOT(on_Changed(double)));
connect(doubleSpinBox1,SIGNAL(editingFinished()),this,SLOT(on_Changed()));
connect(doubleSpinBox2,SIGNAL(editingFinished()),this,SLOT(on_Changed()));
connect(doubleSpinBox3,SIGNAL(editingFinished()),this,SLOT(on_Changed()));
connect(doubleSpinBox4,SIGNAL(editingFinished()),this,SLOT(on_Changed()));
if(showDescription==true){
setDescription(object->description);
}
@ -17,7 +17,7 @@ ParameterVector::ParameterVector(ParameterObject *parameterobject, bool showDesc
}
}
void ParameterVector::on_Changed(double)
void ParameterVector::on_Changed()
{
if (object->target == 5) {
object->value = ValuePtr(doubleSpinBox1->value());

View file

@ -11,7 +11,7 @@ public:
void setValue();
protected slots:
void on_Changed(double);
void on_Changed();
};
#endif // PARAMETERVECTOR_H