Taddeus Kroes 14 лет назад
Родитель
Сommit
9807d34735
1 измененных файлов с 16 добавлено и 16 удалено
  1. 16 16
      src/events.py

+ 16 - 16
src/events.py

@@ -1,4 +1,4 @@
-class BasicEvent(object):
+class Event(object):
     def __init__(self, point):
         self.point = point
 
@@ -17,15 +17,15 @@ class BasicEvent(object):
         raise AttributeError
 
 
-class DownEvent(BasicEvent):
+class DownEvent(Event):
     _name = 'down'
 
 
-class UpEvent(BasicEvent):
+class UpEvent(Event):
     _name = 'up'
 
 
-class MoveEvent(BasicEvent):
+class MoveEvent(Event):
     _name = 'move'
 
     def __str__(self):
@@ -34,7 +34,7 @@ class MoveEvent(BasicEvent):
                 self.point.x, self.point.y, self.point.sid)
 
 
-class GestureEvent(object):
+class Gesture(object):
     def __init__(self, x, y):
         self.x = x
         self.y = y
@@ -47,23 +47,23 @@ class GestureEvent(object):
         return '<%s (%s, %s)>' % (self.__class__.__name__, self.x, self.y)
 
 
-class TapEvent(GestureEvent):
+class Tap(Gesture):
     _name = 'tap'
 
 
-class SingleTapEvent(GestureEvent):
+class SingleTap(Gesture):
     _name = 'single_tap'
 
 
-class DoubleTapEvent(GestureEvent):
+class DoubleTap(Gesture):
     _name = 'double_tap'
 
 
-class FlickEvent(GestureEvent):
+class Flick(Gesture):
     _name = 'flick'
 
     def __init__(self, x, y, velocity):
-        super(FlickEvent, self).__init__(x, y)
+        super(Flick, self).__init__(x, y)
         self.velocity = velocity
 
     def __str__(self):
@@ -71,11 +71,11 @@ class FlickEvent(GestureEvent):
                (self.__class__.__name__, self.x, self.y, self.velocity)
 
 
-class RotateEvent(GestureEvent):
+class Rotate(Gesture):
     _name = 'rotate'
 
     def __init__(self, cx, cy, angle, n):
-        super(RotateEvent, self).__init__(cx, cy)
+        super(Rotate, self).__init__(cx, cy)
         self.angle = angle
         self.n = n
 
@@ -84,11 +84,11 @@ class RotateEvent(GestureEvent):
                (self.__class__.__name__, self.x, self.y, self.angle, self.n)
 
 
-class PinchEvent(GestureEvent):
+class Pinch(Gesture):
     _name = 'pinch'
 
     def __init__(self, cx, cy, amount, n):
-        super(PinchEvent, self).__init__(cx, cy)
+        super(Pinch, self).__init__(cx, cy)
         self.amount = amount
         self.n = n
 
@@ -97,11 +97,11 @@ class PinchEvent(GestureEvent):
                (self.__class__.__name__, self.x, self.y, self.amount, self.n)
 
 
-class PanEvent(GestureEvent):
+class Pan(Gesture):
     _name = 'pan'
 
     def __init__(self, x, y, dx, dy, n):
-        super(RotateEvent, self).__init__(x, y)
+        super(Pan, self).__init__(x, y)
         self.dx = dx
         self.dy = dy
         self.n = n