Cockatrice 2026-06-01-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 id)

Public Member Functions

 ArrowItem (PlayerLogic *_player, int _id, ArrowTarget *_startItem, ArrowTarget *_targetItem, const QColor &_color)
void onTargetDestroyed ()
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
QRectF boundingRect () const override
QPainterPath shape () const override
void updatePath ()
void updatePath (const QPointF &endPoint)
int getId () const
PlayerLogicgetPlayer () const
ArrowTargetgetStartItem () const
ArrowTargetgetTargetItem () const
void setTargetLocked (bool _targetLocked)
void delArrow ()

Protected Member Functions

void mousePressEvent (QGraphicsSceneMouseEvent *event) override

Protected Attributes

PlayerLogicplayer
int id
QPointer< ArrowTargetstartItem
QPointer< ArrowTargettargetItem
bool targetLocked = false
QColor color
bool fullColor = true

Private Attributes

QPainterPath path

Constructor & Destructor Documentation

◆ ArrowItem()

ArrowItem::ArrowItem ( PlayerLogic * _player,
int _id,
ArrowTarget * _startItem,
ArrowTarget * _targetItem,
const QColor & _color )
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:

◆ getId()

int ArrowItem::getId ( ) const
inlinenodiscard

◆ getPlayer()

PlayerLogic * ArrowItem::getPlayer ( ) const
inlinenodiscard

◆ 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 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

◆ color

QColor ArrowItem::color
protected

◆ fullColor

bool ArrowItem::fullColor = true
protected

◆ id

int ArrowItem::id
protected

◆ path

QPainterPath ArrowItem::path
private

◆ player

PlayerLogic* ArrowItem::player
protected

◆ 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: