53 #include "../vmisc/vmath.h"
55 #include <QGraphicsScene>
59 : QGraphicsObject(pParent),
64 m_moveType(AllModifications),
68 setAcceptHoverEvents(
true);
92 if (QGraphicsScene *toolScene = scene())
94 toolScene->clearSelection();
123 if (fabs(dX) < 1 && fabs(dY) < 1)
129 return qAtan2(dY, dX);
VPieceItem::MoveTypes m_moveType
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.
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)