X-Git-Url: https://git.sven.stormbind.net/?a=blobdiff_plain;f=src%2Fanimpoint.h;fp=src%2Fanimpoint.h;h=91bfeaa316fae55d5fd354ff8391ff83920255e5;hb=d483bd8e6523c23c6f1d8908a2e0611c2bc9ff4f;hp=0000000000000000000000000000000000000000;hpb=7dfa3fe589d1722d49681f42cdb0bf1e6efb5223;p=sven%2Fvym.git diff --git a/src/animpoint.h b/src/animpoint.h new file mode 100644 index 0000000..91bfeaa --- /dev/null +++ b/src/animpoint.h @@ -0,0 +1,37 @@ +#ifndef ANIMPOINT_H +#define ANIMPOINT_H + +#include + +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