![]() |
Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
|
#include <arrow_item.h>
Public Types | |
| enum | { Type = typeArrow } |
Signals | |
| void | requestDeletion (int creatorId, int id) |
Public Member Functions | |
| int | type () const override |
| ArrowItem (QSharedPointer< const ArrowData > _data, ArrowTarget *_startItem, ArrowTarget *_targetItem) | |
| ~ArrowItem () override | |
| void | onTargetDestroyed () |
| void | delArrow () |
| void | updatePath () |
| void | updatePath (const QPointF &endPoint) |
| void | startDrawAnimation () |
| bool | animationEvent () override |
| Advances the item's animation by one timer tick. | |
| void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override |
| QRectF | boundingRect () const override |
| QPainterPath | shape () const override |
| int | getId () const |
| int | getCreatorId () const |
| ArrowTarget * | getStartItem () const |
| ArrowTarget * | getTargetItem () const |
| void | setTargetLocked (bool _targetLocked) |
| Public Member Functions inherited from IAnimatedItem | |
| virtual | ~IAnimatedItem ()=default |
Protected Member Functions | |
| void | mousePressEvent (QGraphicsSceneMouseEvent *event) override |
Protected Attributes | |
| QSharedPointer< const ArrowData > | data |
| QPointer< ArrowTarget > | startItem |
| QPointer< ArrowTarget > | targetItem |
| bool | targetLocked = false |
| bool | fullColor = true |
Private Attributes | |
| QPainterPath | path |
| QPainterPath | bodyPath |
| QPainterPath | headPath |
| QPainterPath | shaftOutlinePath |
| QPainterPath | centerLine |
| qreal | headBaseFraction = 1.0 |
| QElapsedTimer | animationClock |
| qreal | strokeDurationMs = 0 |
| qreal | glowFadeDurationMs = 0 |
| qreal | drawProgress = 1.0 |
| qreal | glowAlpha = 0.0 |
| bool | animationStarted = false |
Static Private Attributes | |
| static constexpr qreal | glowExtent = 12.0 |
| ArrowItem::ArrowItem | ( | QSharedPointer< const ArrowData > | _data, |
| ArrowTarget * | _startItem, | ||
| ArrowTarget * | _targetItem ) |
|
override |
|
overridevirtual |
Advances the item's animation by one timer tick.
Implements IAnimatedItem.
|
inlinenodiscardoverride |
| void ArrowItem::delArrow | ( | ) |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
overrideprotected |
| void ArrowItem::onTargetDestroyed | ( | ) |
|
override |
|
signal |
|
inline |
|
inlinenodiscardoverride |
| void ArrowItem::startDrawAnimation | ( | ) |
|
inlinenodiscardoverride |
| void ArrowItem::updatePath | ( | ) |
| void ArrowItem::updatePath | ( | const QPointF & | endPoint | ) |
|
private |
|
private |
|
private |
|
private |
|
protected |
|
private |
|
protected |
|
private |
|
staticconstexprprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
protected |
|
private |
|
protected |
|
protected |