Cockatrice/cockatrice/src/game/board/arrow_target.h
Lukas Brübach dd1936b94e [Game][Arrows] Split Arrows into ArrowData and ArrowItem
Took 13 minutes

Took 5 seconds

Took 1 minute

Took 26 seconds
2026-05-21 20:23:31 +02:00

47 lines
896 B
C++

/**
* @file arrow_target.h
* @ingroup GameGraphics
* @brief TODO: Document this.
*/
#ifndef ARROWTARGET_H
#define ARROWTARGET_H
#include "../../game_graphics/board/abstract_graphics_item.h"
#include <QList>
class PlayerLogic;
class ArrowItem;
class ArrowTarget : public AbstractGraphicsItem
{
Q_OBJECT
protected:
PlayerLogic *owner;
private:
bool beingPointedAt = false;
signals:
void scenePositionChanged();
public:
explicit ArrowTarget(PlayerLogic *_owner, QGraphicsItem *parent = nullptr);
~ArrowTarget() override = default;
[[nodiscard]] PlayerLogic *getOwner() const
{
return owner;
}
void setBeingPointedAt(bool _beingPointedAt);
[[nodiscard]] bool getBeingPointedAt() const
{
return beingPointedAt;
}
protected:
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
};
#endif