mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-19 17:02:15 -07:00
scaled pixmap cache. major speed improvement
This commit is contained in:
parent
1da5c63726
commit
04072b02d1
10 changed files with 57 additions and 45 deletions
|
|
@ -5,18 +5,19 @@
|
|||
|
||||
class QGraphicsScene;
|
||||
class CardZone;
|
||||
class CardInfo;
|
||||
|
||||
class CardDragItem : public QGraphicsItem {
|
||||
private:
|
||||
QPixmap *image;
|
||||
int id;
|
||||
CardInfo *info;
|
||||
QPointF hotSpot;
|
||||
CardZone *startZone;
|
||||
bool faceDown;
|
||||
public:
|
||||
enum { Type = typeCardDrag };
|
||||
int type() const { return Type; }
|
||||
CardDragItem(QGraphicsScene *scene, CardZone *_startZone, QPixmap *_image, int _id, const QPointF &_hotSpot, bool _faceDown, QGraphicsItem *parent = 0);
|
||||
CardDragItem(QGraphicsScene *scene, CardZone *_startZone, CardInfo *_info, int _id, const QPointF &_hotSpot, bool _faceDown, QGraphicsItem *parent = 0);
|
||||
~CardDragItem();
|
||||
QRectF boundingRect() const;
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue