SliderSlider: Rename `value
to
new_value
`
This commit is contained in:
parent
4ec028e736
commit
286b908062
@ -39,21 +39,21 @@ SliderSlider::SliderSlider(const Qt::Orientation orientation, QWidget *parent, c
|
||||
|
||||
}
|
||||
|
||||
void SliderSlider::SetValue(const uint value) {
|
||||
void SliderSlider::SetValue(const uint new_value) {
|
||||
|
||||
setValue(static_cast<int>(value));
|
||||
setValue(static_cast<int>(new_value));
|
||||
|
||||
}
|
||||
|
||||
void SliderSlider::setValue(int value) {
|
||||
void SliderSlider::setValue(int new_value) {
|
||||
|
||||
// Don't adjust the slider while the user is dragging it!
|
||||
|
||||
if ((!sliding_ || outside_) && !wheeling_) {
|
||||
QSlider::setValue(adjustValue(value));
|
||||
QSlider::setValue(adjustValue(new_value));
|
||||
}
|
||||
else {
|
||||
prev_value_ = value;
|
||||
prev_value_ = new_value;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -37,8 +37,8 @@ class SliderSlider : public QSlider {
|
||||
// WARNING non-virtual - and thus only really intended for internal use this is a major flaw in the class presently, however it suits our current needs fine
|
||||
int value() const { return adjustValue(QSlider::value()); }
|
||||
|
||||
virtual void SetValue(const uint value);
|
||||
virtual void setValue(int value);
|
||||
virtual void SetValue(const uint new_value);
|
||||
virtual void setValue(int new_value);
|
||||
|
||||
signals:
|
||||
// We emit this when the user has specifically changed the slider so connect to it if valueChanged() is too generic Qt also emits valueChanged(int)
|
||||
|
Loading…
x
Reference in New Issue
Block a user