Cockatrice 2026-06-01-Development-3.1.0-beta.3
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
arrow_target.h
Go to the documentation of this file.
1
6
7#ifndef ARROWTARGET_H
8#define ARROWTARGET_H
9
11
12#include <QList>
13
14class PlayerLogic;
15class ArrowItem;
16
18{
19 Q_OBJECT
20protected:
22
23private:
24 bool beingPointedAt = false;
25
26signals:
28
29public:
30 explicit ArrowTarget(PlayerLogic *_owner, QGraphicsItem *parent = nullptr);
31 ~ArrowTarget() override = default;
32
33 [[nodiscard]] PlayerLogic *getOwner() const
34 {
35 return owner;
36 }
37
38 void setBeingPointedAt(bool _beingPointedAt);
39 [[nodiscard]] bool getBeingPointedAt() const
40 {
41 return beingPointedAt;
42 }
43
44protected:
45 QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
46};
47#endif
AbstractGraphicsItem(QGraphicsItem *parent=nullptr)
Definition abstract_graphics_item.h:23
Definition arrow_item.h:21
void scenePositionChanged()
PlayerLogic * getOwner() const
Definition arrow_target.h:33
bool getBeingPointedAt() const
Definition arrow_target.h:39
ArrowTarget(PlayerLogic *_owner, QGraphicsItem *parent=nullptr)
Definition arrow_target.cpp:6
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override
Definition arrow_target.cpp:17
bool beingPointedAt
Definition arrow_target.h:24
void setBeingPointedAt(bool _beingPointedAt)
Definition arrow_target.cpp:11
PlayerLogic * owner
Definition arrow_target.h:21
~ArrowTarget() override=default
Definition player_logic.h:65