summaryrefslogtreecommitdiff
path: root/src/gui/widgets/slider.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-03-21 19:45:48 +0300
committerAndrei Karas <akaras@inbox.ru>2014-03-21 19:45:48 +0300
commit60b40c0c68e9cffbc5f48d4f672d99009488f8b1 (patch)
tree7d2efefb965c0ae928eb80313f2f37fa34cf42b4 /src/gui/widgets/slider.cpp
parent3ed0b5f6edce152fa2eca9c84d64cbeec8ac0173 (diff)
downloadplus-60b40c0c68e9cffbc5f48d4f672d99009488f8b1.tar.gz
plus-60b40c0c68e9cffbc5f48d4f672d99009488f8b1.tar.bz2
plus-60b40c0c68e9cffbc5f48d4f672d99009488f8b1.tar.xz
plus-60b40c0c68e9cffbc5f48d4f672d99009488f8b1.zip
Rename mouseEvent variables into event.
Diffstat (limited to 'src/gui/widgets/slider.cpp')
-rw-r--r--src/gui/widgets/slider.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/gui/widgets/slider.cpp b/src/gui/widgets/slider.cpp
index e7f046422..c4ff2d2bc 100644
--- a/src/gui/widgets/slider.cpp
+++ b/src/gui/widgets/slider.cpp
@@ -352,17 +352,17 @@ void Slider::mouseExited(MouseEvent& event A_UNUSED)
mRedraw = true;
}
-void Slider::mousePressed(MouseEvent &mouseEvent)
+void Slider::mousePressed(MouseEvent &event)
{
- const int x = mouseEvent.getX();
- const int y = mouseEvent.getY();
+ const int x = event.getX();
+ const int y = event.getY();
const int width = mDimension.width;
const int height = mDimension.height;
- if (mouseEvent.getButton() == MouseEvent::LEFT
+ if (event.getButton() == MouseEvent::LEFT
&& x >= 0 && x <= width && y >= 0 && y <= height)
{
- mouseEvent.consume();
+ event.consume();
if (mOrientation == HORIZONTAL)
setValue(markerPositionToValue(x - mMarkerLength / 2));
else
@@ -372,35 +372,35 @@ void Slider::mousePressed(MouseEvent &mouseEvent)
}
}
-void Slider::mouseDragged(MouseEvent &mouseEvent)
+void Slider::mouseDragged(MouseEvent &event)
{
if (mOrientation == HORIZONTAL)
{
- setValue(markerPositionToValue(mouseEvent.getX() - mMarkerLength / 2));
+ setValue(markerPositionToValue(event.getX() - mMarkerLength / 2));
}
else
{
setValue(markerPositionToValue(
- mDimension.height - mouseEvent.getY() - mMarkerLength / 2));
+ mDimension.height - event.getY() - mMarkerLength / 2));
}
distributeActionEvent();
- mouseEvent.consume();
+ event.consume();
}
-void Slider::mouseWheelMovedUp(MouseEvent &mouseEvent)
+void Slider::mouseWheelMovedUp(MouseEvent &event)
{
setValue(mValue + mStepLength);
distributeActionEvent();
- mouseEvent.consume();
+ event.consume();
}
-void Slider::mouseWheelMovedDown(MouseEvent &mouseEvent)
+void Slider::mouseWheelMovedDown(MouseEvent &event)
{
setValue(mValue - mStepLength);
distributeActionEvent();
- mouseEvent.consume();
+ event.consume();
}
void Slider::keyPressed(KeyEvent& keyEvent)