Cockatrice 2025-11-30-Development-2.11.0-beta.38
A cross-platform virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
PhaseButton Class Reference

#include <phases_toolbar.h>

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

Signals

void clicked ()

Public Member Functions

 PhaseButton (const QString &_name, QGraphicsItem *parent=nullptr, QAction *_doubleClickAction=nullptr, bool _highlightable=true)
QRectF boundingRect () const override
void setWidth (double _width)
void setActive (bool _active)
bool getActive () const
void triggerDoubleClickAction ()

Protected Member Functions

void paint (QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) override
void mousePressEvent (QGraphicsSceneMouseEvent *event) override
void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override

Private Slots

void updateAnimation ()

Private Attributes

QString name
bool active
bool highlightable
int activeAnimationCounter
QTimer * activeAnimationTimer
QAction * doubleClickAction
double width

Constructor & Destructor Documentation

◆ PhaseButton()

PhaseButton::PhaseButton ( const QString & _name,
QGraphicsItem * parent = nullptr,
QAction * _doubleClickAction = nullptr,
bool _highlightable = true )
explicit
Here is the call graph for this function:

Member Function Documentation

◆ boundingRect()

QRectF PhaseButton::boundingRect ( ) const
nodiscardoverride
Here is the caller graph for this function:

◆ clicked

void PhaseButton::clicked ( )
signal
Here is the caller graph for this function:

◆ getActive()

bool PhaseButton::getActive ( ) const
inlinenodiscard

◆ mouseDoubleClickEvent()

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

◆ mousePressEvent()

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

◆ paint()

void PhaseButton::paint ( QPainter * painter,
const QStyleOptionGraphicsItem * ,
QWidget *  )
overrideprotected
Here is the call graph for this function:

◆ setActive()

void PhaseButton::setActive ( bool _active)

◆ setWidth()

void PhaseButton::setWidth ( double _width)

◆ triggerDoubleClickAction()

void PhaseButton::triggerDoubleClickAction ( )
Here is the caller graph for this function:

◆ updateAnimation

void PhaseButton::updateAnimation ( )
privateslot
Here is the caller graph for this function:

Member Data Documentation

◆ active

bool PhaseButton::active
private

◆ activeAnimationCounter

int PhaseButton::activeAnimationCounter
private

◆ activeAnimationTimer

QTimer* PhaseButton::activeAnimationTimer
private

◆ doubleClickAction

QAction* PhaseButton::doubleClickAction
private

◆ highlightable

bool PhaseButton::highlightable
private

◆ name

QString PhaseButton::name
private

◆ width

double PhaseButton::width
private

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