Cockatrice 2025-11-30-Development-2.11.0-beta.38
A cross-platform 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]

Public Member Functions

 ArrowItem (Player *_player, int _id, ArrowTarget *_startItem, ArrowTarget *_targetItem, const QColor &color)
 ~ArrowItem () override
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
PlayergetPlayer () const
void setStartItem (ArrowTarget *_item)
void setTargetItem (ArrowTarget *_item)
ArrowTargetgetStartItem () const
ArrowTargetgetTargetItem () const
void setTargetLocked (bool _targetLocked)
void delArrow ()

Protected Member Functions

void mousePressEvent (QGraphicsSceneMouseEvent *event) override

Protected Attributes

Playerplayer
int id
ArrowTargetstartItem
ArrowTargettargetItem
bool targetLocked
QColor color
bool fullColor

Private Attributes

QPainterPath path
QMenu * menu

Constructor & Destructor Documentation

◆ ArrowItem()

ArrowItem::ArrowItem ( Player * _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:

◆ ~ArrowItem()

ArrowItem::~ArrowItem ( )
override

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
Here is the caller graph for this function:

◆ getPlayer()

Player * ArrowItem::getPlayer ( ) const
inlinenodiscard

◆ getStartItem()

ArrowTarget * ArrowItem::getStartItem ( ) const
inlinenodiscard
Here is the caller graph for this function:

◆ getTargetItem()

ArrowTarget * ArrowItem::getTargetItem ( ) const
inlinenodiscard
Here is the caller graph for this function:

◆ mousePressEvent()

void ArrowItem::mousePressEvent ( QGraphicsSceneMouseEvent * event)
overrideprotected

◆ paint()

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

◆ setStartItem()

void ArrowItem::setStartItem ( ArrowTarget * _item)
inline

◆ setTargetItem()

void ArrowItem::setTargetItem ( ArrowTarget * _item)
inline

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

◆ id

int ArrowItem::id
protected

◆ menu

QMenu* ArrowItem::menu
private

◆ path

QPainterPath ArrowItem::path
private

◆ player

Player* ArrowItem::player
protected

◆ startItem

ArrowTarget* ArrowItem::startItem
protected

◆ targetItem

ArrowTarget * ArrowItem::targetItem
protected

◆ targetLocked

bool ArrowItem::targetLocked
protected

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