Cockatrice/cockatrice/src/game/board/arrow_target.h
DawnFire42 330ea7b8c6
Standardize TODO/FIXME comments to Doxygen \todo format
Convert informal TODO and FIXME comments to Doxygen-recognized
      \todo format.

      - // TODO comments → //! \todo ...
      - // FIXME comments → //! \todo ...
      - /** @todo ... */ blocks → //! \todo ...
      - @brief TODO: placeholders → //! \todo (moved outside doc blocks)
2026-05-21 13:49:28 -04:00

70 lines
1.4 KiB
C++

/**
* @file arrow_target.h
* @ingroup GameGraphics
*/
//! \todo Document this file.
#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;
QList<ArrowItem *> arrowsFrom, arrowsTo;
public:
explicit ArrowTarget(PlayerLogic *_owner, QGraphicsItem *parent = nullptr);
~ArrowTarget() override;
[[nodiscard]] PlayerLogic *getOwner() const
{
return owner;
}
void setBeingPointedAt(bool _beingPointedAt);
[[nodiscard]] bool getBeingPointedAt() const
{
return beingPointedAt;
}
[[nodiscard]] const QList<ArrowItem *> &getArrowsFrom() const
{
return arrowsFrom;
}
void addArrowFrom(ArrowItem *arrow)
{
arrowsFrom.append(arrow);
}
void removeArrowFrom(ArrowItem *arrow)
{
arrowsFrom.removeOne(arrow);
}
[[nodiscard]] const QList<ArrowItem *> &getArrowsTo() const
{
return arrowsTo;
}
void addArrowTo(ArrowItem *arrow)
{
arrowsTo.append(arrow);
}
void removeArrowTo(ArrowItem *arrow)
{
arrowsTo.removeOne(arrow);
}
protected:
QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value) override;
};
#endif