#ifndef MAPSCROLLER_H
#define MAPSCROLLER_H
-#include <QPoint>
#include <QVariantAnimation>
+#include "coordinates/scenecoordinate.h"
+
/**
* @brief Map scroller
*
* Used for kinetic and smooth scroll effects. Class implementation is following the singleton
* desing pattern.
*
+* Use QPointF datatype for startValue and endValue. Emitted datatype is SceneCoordinate.
+*
* @author Sami Rämö - sami.ramo@ixonos.com
*/
class MapScroller : public QVariantAnimation
/**
* @brief Reimplemented from QVariantAnimation::updateCurrentValue()
*
- * Called every time the animation's current value changes
+ * Called every time the animation's current value changes. Does emit coordinateUpdated() signal
+ * if animation is in the running state.
*
* @param value New value
*/
/**
* @brief Get reference to instance of this class
*
+ * Also registers the custom SceneCoordinate interpolator method.
+ *
* @return reference to instance of this class
*/
static MapScroller &getInstance();
*
* @param coordinate New coordinate value
*/
- void coordinateUpdated(QPoint coordinate);
+ void coordinateUpdated(SceneCoordinate coordinate);
};
#endif // MAPSCROLLER_H