Cockatrice 2026-06-27-Development-3.1.0-beta.3
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
ArrowItem Class Reference

#include <arrow_item.h>

Inheritance diagram for ArrowItem:
[legend]
Collaboration diagram for ArrowItem:
[legend]

Signals

void requestDeletion (int creatorId, int id)

Public Member Functions

 ArrowItem (QSharedPointer< const ArrowData > _data, ArrowTarget *_startItem, ArrowTarget *_targetItem)
void onTargetDestroyed ()
void delArrow ()
void updatePath ()
void updatePath (const QPointF &endPoint)
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
QRectF boundingRect () const override
QPainterPath shape () const override
int getId () const
int getCreatorId () const
ArrowTargetgetStartItem () const
ArrowTargetgetTargetItem () const
void setTargetLocked (bool _targetLocked)

Protected Member Functions

void mousePressEvent (QGraphicsSceneMouseEvent *event) override

Protected Attributes

QSharedPointer< const ArrowDatadata
QPointer< ArrowTargetstartItem
QPointer< ArrowTargettargetItem
bool targetLocked = false
bool fullColor = true

Private Attributes

QPainterPath path

Constructor & Destructor Documentation

◆ ArrowItem()

ArrowItem::ArrowItem ( QSharedPointer< const ArrowData > _data,
ArrowTarget * _startItem,
ArrowTarget * _targetItem )
Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ boundingRect()

QRectF ArrowItem::boundingRect ( ) const
inlinenodiscardoverride

◆ delArrow()

void ArrowItem::delArrow ( )
Here is the caller graph for this function:

◆ getCreatorId()

int ArrowItem::getCreatorId ( ) const
inlinenodiscard

◆ getId()

int ArrowItem::getId ( ) const
inlinenodiscard
Here is the caller graph for this function:

◆ getStartItem()

ArrowTarget * ArrowItem::getStartItem ( ) const
inlinenodiscard

◆ getTargetItem()

ArrowTarget * ArrowItem::getTargetItem ( ) const
inlinenodiscard

◆ mousePressEvent()

void ArrowItem::mousePressEvent ( QGraphicsSceneMouseEvent * event)
overrideprotected
Here is the call graph for this function:

◆ onTargetDestroyed()

void ArrowItem::onTargetDestroyed ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ paint()

void ArrowItem::paint ( QPainter * painter,
const QStyleOptionGraphicsItem * option,
QWidget * widget )
override

◆ requestDeletion

void ArrowItem::requestDeletion ( int creatorId,
int id )
signal
Here is the caller graph for this function:

◆ setTargetLocked()

void ArrowItem::setTargetLocked ( bool _targetLocked)
inline

◆ shape()

QPainterPath ArrowItem::shape ( ) const
inlinenodiscardoverride

◆ updatePath() [1/2]

void ArrowItem::updatePath ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updatePath() [2/2]

void ArrowItem::updatePath ( const QPointF & endPoint)

Member Data Documentation

◆ data

QSharedPointer<const ArrowData> ArrowItem::data
protected

◆ fullColor

bool ArrowItem::fullColor = true
protected

◆ path

QPainterPath ArrowItem::path
private

◆ startItem

QPointer<ArrowTarget> ArrowItem::startItem
protected

◆ targetItem

QPointer<ArrowTarget> ArrowItem::targetItem
protected

◆ targetLocked

bool ArrowItem::targetLocked = false
protected

The documentation for this class was generated from the following files: