mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-18 08:22:15 -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
44
cockatrice/src/game_graphics/board/card_drag_item.h
Normal file
44
cockatrice/src/game_graphics/board/card_drag_item.h
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
/**
|
||||
* @file card_drag_item.h
|
||||
* @ingroup GameGraphicsCards
|
||||
*/
|
||||
//! \todo Document this file.
|
||||
|
||||
#ifndef CARDDRAGITEM_H
|
||||
#define CARDDRAGITEM_H
|
||||
|
||||
#include "abstract_card_drag_item.h"
|
||||
|
||||
class CardItem;
|
||||
|
||||
class CardDragItem : public AbstractCardDragItem
|
||||
{
|
||||
Q_OBJECT
|
||||
private:
|
||||
int id;
|
||||
bool forceFaceDown;
|
||||
bool occupied;
|
||||
CardZone *currentZone;
|
||||
|
||||
public:
|
||||
CardDragItem(CardItem *_item,
|
||||
int _id,
|
||||
const QPointF &_hotSpot,
|
||||
bool _forceFaceDown,
|
||||
AbstractCardDragItem *parentDrag = 0);
|
||||
int getId() const
|
||||
{
|
||||
return id;
|
||||
}
|
||||
bool isForceFaceDown() const
|
||||
{
|
||||
return forceFaceDown;
|
||||
}
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
|
||||
void updatePosition(const QPointF &cursorScenePos) override;
|
||||
|
||||
protected:
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue