mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-08 00:53:57 -07:00
some zone view changes going on
This commit is contained in:
parent
aed30708de
commit
224a4969bd
25 changed files with 754 additions and 365 deletions
|
|
@ -3,29 +3,37 @@
|
|||
|
||||
#include "cardzone.h"
|
||||
#include "serverzonecard.h"
|
||||
#include <QGraphicsWidget>
|
||||
#include <QGraphicsLayoutItem>
|
||||
|
||||
class ZoneViewWidget;
|
||||
|
||||
class ZoneViewZone : public CardZone {
|
||||
class ZoneViewZone : public CardZone, public QGraphicsLayoutItem {
|
||||
Q_OBJECT
|
||||
private:
|
||||
int height;
|
||||
int numberCards;
|
||||
void handleDropEvent(int cardId, CardZone *startZone, const QPoint &dropPoint, bool faceDown);
|
||||
CardZone *origZone;
|
||||
signals:
|
||||
void removeZoneViewWidget(ZoneViewWidget *zv);
|
||||
bool sortingEnabled;
|
||||
int cmdId;
|
||||
public:
|
||||
ZoneViewZone(Player *_p, CardZone *_origZone, int _numberCards = -1, QGraphicsItem *parent = 0);
|
||||
~ZoneViewZone();
|
||||
QRectF boundingRect() const;
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
void reorganizeCards();
|
||||
bool initializeCards();
|
||||
void initializeCards();
|
||||
void removeCard(int position);
|
||||
void setHeight(int _height) { height = _height; }
|
||||
void setGeometry(const QRectF &rect);
|
||||
int getNumberCards() const { return numberCards; }
|
||||
public slots:
|
||||
void setSortingEnabled(int _sortingEnabled);
|
||||
private slots:
|
||||
void zoneDumpReceived(int commandId, QList<ServerZoneCard *> cards);
|
||||
protected:
|
||||
void addCardImpl(CardItem *card, int x, int y);
|
||||
QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue