55 #include <QtCore/qglobal.h>
56 #include <QGraphicsObject>
58 #include "../vmisc/def.h"
75 explicit VPieceItem(QGraphicsItem* pParent =
nullptr);
88 virtual
int type() const Q_DECL_OVERRIDE {
return Type;}
110 virtual double GetAngle(
const QPointF &pt)
const;
116 Q_DECLARE_OPERATORS_FOR_FLAGS(VPieceItem::MoveTypes)
VPieceItem::MoveTypes m_moveType
virtual int type() const Q_DECL_OVERRIDE
bool IsIdle() const
IsIdle returns the idle flag.
virtual QRectF boundingRect() const Q_DECL_OVERRIDE
boundingRect returns the item bounding box
VPieceItem(QGraphicsItem *pParent=nullptr)
virtual double GetAngle(const QPointF &pt) const
GetAngle calculates the angle between the line, which goes from rotation center to pt and x axis.
void itemMoved(const QPointF &ptPos)
VPieceItem::MoveTypes GetMoveType() const
void Reset()
Reset resets the item, putting the mode and z coordinate to normal and redraws it.
void SetMoveType(const VPieceItem::MoveTypes &moveType)