mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-04 20:43:54 -07:00
minor cleanups
This commit is contained in:
parent
0ef00dd437
commit
7e13352a95
29 changed files with 102 additions and 134 deletions
|
|
@ -14,11 +14,12 @@ protected:
|
|||
Player *player;
|
||||
QString name;
|
||||
CardList *cards;
|
||||
QList<ZoneViewZone *> views;
|
||||
ZoneViewZone *view;
|
||||
QMenu *menu;
|
||||
bool hasCardAttr;
|
||||
bool isShufflable;
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void addCardImpl(CardItem *card, int x, int y) = 0;
|
||||
public:
|
||||
enum { Type = typeZone };
|
||||
int type() const { return Type; }
|
||||
|
|
@ -33,16 +34,15 @@ public:
|
|||
QString getName() const { return name; }
|
||||
Player *getPlayer() const { return player; }
|
||||
bool contentsKnown() const { return cards->getContentsKnown(); }
|
||||
CardList *const getCards() const { return cards; }
|
||||
virtual void addCard(CardItem *card, bool reorganize = true, int x = -1, int y = -1) = 0;
|
||||
CardList *getCards() const { return cards; }
|
||||
void addCard(CardItem *card, bool reorganize, int x, int y = -1);
|
||||
// getCard() finds a card by id.
|
||||
CardItem *getCard(int cardId, const QString &cardName);
|
||||
// takeCard() finds a card by position and removes it from the zone and from all of its views.
|
||||
CardItem *takeCard(int position, int cardId, const QString &cardName);
|
||||
void setCardAttr(int cardId, const QString &aname, const QString &avalue);
|
||||
void hoverCardEvent(CardItem *card);
|
||||
void addView(ZoneViewZone *view);
|
||||
void removeView(ZoneViewZone *view);
|
||||
void setView(ZoneViewZone *_view);
|
||||
virtual void reorganizeCards() = 0;
|
||||
void moveAllToZone(const QString &targetZone, int targetX);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue