*
*/
+#include <QtGui/QGraphicsPixmapItem>
#include <QtCore/QDebug>
#include <QtCore/QTimeLine>
-#include <QtGui/QGraphicsItemAnimation>
-#include <QtGui/QGraphicsPixmapItem>
#include <math.h>
#include "pointer.h"
#include "reader.h"
{
{"xpos", true},
{"ypos", true},
+ {"zpos", true},
+ {"visiblewhen", false},
{"src", false},
{"zeroangle", true},
{"fullangle", true},
int const ANIMATION_UPDATEINTERVAL = 20;
}
-Pointer::Pointer(Reader* reader, bool animate): QObject(0), GraphicsElement(reader),
+Pointer::Pointer(Reader* reader, bool animate): GraphicsElement(reader),
xRotationPoint_(0), yRotationPoint_(0), x_(0), y_(0), zeroAngle_(0),
fullAngle_(180), zeroSpeed_(0), fullSpeed_(220), targetAngle_(0),
startAngle_(0), angle_(-1), imageSet_(false), animate_(animate), timer_(0)
case YPOS:
y_ = intVal;
break;
+ case ZPOS:
+ element_->setZValue(intVal);
+ break;
+ case VISIBLEWHEN:
+ setVisibleWhen(strToVisibleWhen(value));
+ break;
case SRC:
return loadImage(value);
break;
return true;
}
+
+QGraphicsItem* Pointer::getElement() const
+{
+ return element_;
+}
+