]> git.sven.stormbind.net Git - sven/vym.git/blobdiff - src/animpoint.h
New upstream version 2.9.22
[sven/vym.git] / src / animpoint.h
diff --git a/src/animpoint.h b/src/animpoint.h
new file mode 100644 (file)
index 0000000..91bfeaa
--- /dev/null
@@ -0,0 +1,37 @@
+#ifndef ANIMPOINT_H
+#define ANIMPOINT_H
+
+#include <QPointF>
+
+class AnimPoint : public QPointF {
+  public:
+    AnimPoint();
+    void operator=(const AnimPoint &);
+    void operator=(const QPointF &);
+    bool operator==(const QPointF &);
+    bool operator==(AnimPoint);
+    void init();
+    void copy(AnimPoint other);
+    void setStart(const QPointF &);
+    QPointF getStart();
+    void setDest(const QPointF &);
+    QPointF getDest();
+    void setTicks(const uint &t);
+    uint getTicks();
+    void setAnimated(bool);
+    bool isAnimated();
+    bool animate();
+    void stop();
+
+  private:
+    void initVector();
+
+    QPointF startPos;
+    QPointF destPos;
+    QPointF vector;
+    qreal n;
+    uint animTicks;
+    bool animated;
+};
+
+#endif