Tone: Add 'valueChanged' signal
This commit is contained in:
parent
3550cc0ff5
commit
d95e90db34
|
@ -180,30 +180,39 @@ void Tone::set(double red, double green, double blue, double gray)
|
||||||
this->gray = gray;
|
this->gray = gray;
|
||||||
|
|
||||||
updateInternal();
|
updateInternal();
|
||||||
|
valueChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Tone::setRed(double value)
|
void Tone::setRed(double value)
|
||||||
{
|
{
|
||||||
red = value;
|
red = value;
|
||||||
norm.x = (float) clamp<double>(value, -255, 255) / 255;
|
norm.x = (float) clamp<double>(value, -255, 255) / 255;
|
||||||
|
|
||||||
|
valueChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Tone::setGreen(double value)
|
void Tone::setGreen(double value)
|
||||||
{
|
{
|
||||||
green = value;
|
green = value;
|
||||||
norm.y = (float) clamp<double>(value, -255, 255) / 255;
|
norm.y = (float) clamp<double>(value, -255, 255) / 255;
|
||||||
|
|
||||||
|
valueChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Tone::setBlue(double value)
|
void Tone::setBlue(double value)
|
||||||
{
|
{
|
||||||
blue = value;
|
blue = value;
|
||||||
norm.z = (float) clamp<double>(value, -255, 255) / 255;
|
norm.z = (float) clamp<double>(value, -255, 255) / 255;
|
||||||
|
|
||||||
|
valueChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Tone::setGray(double value)
|
void Tone::setGray(double value)
|
||||||
{
|
{
|
||||||
gray = value;
|
gray = value;
|
||||||
norm.w = (float) clamp<double>(value, 0, 255) / 255;
|
norm.w = (float) clamp<double>(value, 0, 255) / 255;
|
||||||
|
|
||||||
|
valueChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Serializable */
|
/* Serializable */
|
||||||
|
|
Loading…
Reference in New Issue