Cockatrice
2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Toggle main menu visibility
Loading...
Searching...
No Matches
hand_counter.h
Go to the documentation of this file.
1
6
7
#ifndef HANDCOUNTER_H
8
#define HANDCOUNTER_H
9
10
#include "
board/abstract_graphics_item.h
"
11
#include "
board/graphics_item_type.h
"
12
13
#include <qtmetamacros.h>
14
15
class
QGraphicsItem;
16
class
QPoint;
17
18
class
HandCounter
:
public
AbstractGraphicsItem
19
{
20
Q_OBJECT
21
private
:
22
int
number
;
23
24
protected
:
25
void
mousePressEvent
(QGraphicsSceneMouseEvent *event)
override
;
26
public
slots:
27
void
updateNumber
();
28
signals:
29
void
showContextMenu
(
const
QPoint &screenPos);
30
31
public
:
32
enum
33
{
34
Type
=
typeOther
35
};
36
int
type
()
const override
37
{
38
return
Type
;
39
}
40
explicit
HandCounter
(QGraphicsItem *parent =
nullptr
);
41
~HandCounter
()
override
;
42
QRectF
boundingRect
()
const override
;
43
void
paint
(QPainter *painter,
const
QStyleOptionGraphicsItem *option, QWidget *widget)
override
;
44
};
45
46
#endif
abstract_graphics_item.h
AbstractGraphicsItem::AbstractGraphicsItem
AbstractGraphicsItem(QGraphicsItem *parent=nullptr)
Definition
abstract_graphics_item.h:28
HandCounter
Definition
hand_counter.h:19
HandCounter::mousePressEvent
void mousePressEvent(QGraphicsSceneMouseEvent *event) override
Definition
hand_counter.cpp:58
HandCounter::number
int number
Definition
hand_counter.h:22
HandCounter::type
int type() const override
Definition
hand_counter.h:36
HandCounter::Type
@ Type
Definition
hand_counter.h:34
HandCounter::boundingRect
QRectF boundingRect() const override
Definition
hand_counter.cpp:36
HandCounter::paint
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
Definition
hand_counter.cpp:41
HandCounter::HandCounter
HandCounter(QGraphicsItem *parent=nullptr)
Definition
hand_counter.cpp:21
HandCounter::showContextMenu
void showContextMenu(const QPoint &screenPos)
HandCounter::updateNumber
void updateNumber()
Definition
hand_counter.cpp:30
graphics_item_type.h
typeOther
@ typeOther
Definition
graphics_item_type.h:19
cockatrice
src
game_graphics
hand_counter.h
Generated by
1.18.0