mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-08 17:13:57 -07:00
initial commit
This commit is contained in:
commit
a11f93df4d
99 changed files with 7493 additions and 0 deletions
28
cockatrice/src/carddragitem.h
Normal file
28
cockatrice/src/carddragitem.h
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#ifndef CARDDRAGITEM_H
|
||||
#define CARDDRAGITEM_H
|
||||
|
||||
#include "carditem.h"
|
||||
|
||||
class QGraphicsScene;
|
||||
class PlayerZone;
|
||||
|
||||
class CardDragItem : public QGraphicsItem {
|
||||
private:
|
||||
QPixmap *image;
|
||||
int id;
|
||||
QPointF hotSpot;
|
||||
PlayerZone *startZone;
|
||||
public:
|
||||
enum { Type = typeCardDrag };
|
||||
int type() const { return Type; }
|
||||
CardDragItem(QGraphicsScene *scene, PlayerZone *_startZone, QPixmap *_image, int _id, const QPointF &_hotSpot, QGraphicsItem *parent = 0);
|
||||
~CardDragItem();
|
||||
QRectF boundingRect() const;
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
QPointF getHotSpot() const { return hotSpot; }
|
||||
protected:
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue