mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-06 05:23:56 -07:00
[Game] Move graphics files into game_graphics
Took 1 minute Took 2 minutes Took 23 seconds Took 1 minute Took 2 seconds
This commit is contained in:
parent
7070269a86
commit
558bc2741c
109 changed files with 188 additions and 172 deletions
|
|
@ -1,52 +0,0 @@
|
|||
/**
|
||||
* @file player_area.h
|
||||
* @ingroup GameGraphicsPlayers
|
||||
*/
|
||||
//! \todo Document this file.
|
||||
|
||||
#ifndef COCKATRICE_PLAYER_AREA_H
|
||||
#define COCKATRICE_PLAYER_AREA_H
|
||||
|
||||
#include "../../game_graphics/board/graphics_item_type.h"
|
||||
#include "QGraphicsItem"
|
||||
|
||||
/**
|
||||
* The entire graphical area belonging to a single player.
|
||||
*/
|
||||
class PlayerArea : public QObject, public QGraphicsItem
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QGraphicsItem)
|
||||
private:
|
||||
QRectF bRect;
|
||||
int playerZoneId;
|
||||
private slots:
|
||||
void updateBg();
|
||||
|
||||
public:
|
||||
enum
|
||||
{
|
||||
Type = typeOther
|
||||
};
|
||||
[[nodiscard]] int type() const override
|
||||
{
|
||||
return Type;
|
||||
}
|
||||
|
||||
explicit PlayerArea(QGraphicsItem *parent = nullptr);
|
||||
[[nodiscard]] QRectF boundingRect() const override
|
||||
{
|
||||
return bRect;
|
||||
}
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
|
||||
|
||||
void setSize(qreal width, qreal height);
|
||||
|
||||
void setPlayerZoneId(int _playerZoneId);
|
||||
[[nodiscard]] int getPlayerZoneId() const
|
||||
{
|
||||
return playerZoneId;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // COCKATRICE_PLAYER_AREA_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue