mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-06 05:23:56 -07:00
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)
70 lines
1.4 KiB
C++
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
|