animpoint.h
author insilmaril
Mon May 05 13:46:42 2008 +0000 (2008-05-05)
changeset 693 07fead1e540b
parent 461 b0d72eb511c9
child 826 e715694b0f47
permissions -rw-r--r--
Some code cleanup and experimental stuff to support animations later
     1 #ifndef ANIMPOINT_H
     2 #define ANIMPOINT_H
     3 
     4 #include <QPointF>
     5 
     6 class AnimPoint: public QPointF
     7 {
     8 public:
     9     AnimPoint();
    10 	void operator= ( const AnimPoint & );
    11 	void operator= ( const QPointF & );
    12 	bool operator== ( const QPointF & );
    13 	bool operator== ( AnimPoint  );
    14 	void init();
    15 	void copy(AnimPoint other);
    16 	void setStart (const QPointF &);
    17 	QPointF getStart();
    18 	void setDest (const QPointF &);
    19 	QPointF getDest();
    20 	void setTicks (const uint &t);
    21 	uint getTicks();
    22 	void setAnimated(bool);
    23 	bool isAnimated ();
    24 	bool animate();
    25 
    26 private:
    27 	void initVector();
    28 
    29 	QPointF startPos;
    30 	QPointF destPos;
    31 	QPointF vector;
    32 	qreal n;
    33 	qreal animTicks;
    34     bool animated;
    35 
    36 };
    37 
    38 #endif