Revealing a library to a player now grants that player permission to drag cards out of that library onto his own table. This permission is revoked by shuffling the library. The zone view window tracks content changes of the zone for as long as the permission lasts so that card ID changes are kept track of. This hopefully fixes issues #5 and #12.

This commit is contained in:
Max-Wilhelm Bruker 2012-03-24 17:48:25 +01:00
parent 2ce18a82f5
commit adbb607700
30 changed files with 231 additions and 101 deletions

View file

@ -15,10 +15,10 @@ private:
int minRows, numberCards;
void handleDropEvent(const QList<CardDragItem *> &dragItems, CardZone *startZone, const QPoint &dropPoint);
CardZone *origZone;
bool revealZone;
bool revealZone, writeableRevealZone;
bool sortByName, sortByType;
public:
ZoneViewZone(Player *_p, CardZone *_origZone, int _numberCards = -1, bool _revealZone = false, QGraphicsItem *parent = 0);
ZoneViewZone(Player *_p, CardZone *_origZone, int _numberCards = -1, bool _revealZone = false, bool _writeableRevealZone = false, QGraphicsItem *parent = 0);
~ZoneViewZone();
QRectF boundingRect() const;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
@ -28,6 +28,9 @@ public:
int getNumberCards() const { return numberCards; }
void setGeometry(const QRectF &rect);
QRectF getOptimumRect() const { return optimumRect; }
bool getRevealZone() const { return revealZone; }
bool getWriteableRevealZone() const { return writeableRevealZone; }
void setWriteableRevealZone(bool _writeableRevealZone);
public slots:
void setSortByName(int _sortByName);
void setSortByType(int _sortByType);