improved appearance

This commit is contained in:
Max-Wilhelm Bruker 2009-03-25 17:02:44 +01:00
parent 8782438fcc
commit 6e94221112
20 changed files with 158 additions and 77 deletions

View file

@ -3,8 +3,8 @@
#include "player.h"
#include "client.h"
TableZone::TableZone(Player *_p)
: CardZone(_p, "table"), width(700), height(500)
TableZone::TableZone(Player *_p, QGraphicsItem *parent)
: CardZone(_p, "table", parent), width(700), height(500)
{
cards = new CardList(true);
hasCardAttr = true;
@ -19,7 +19,7 @@ void TableZone::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
{
Q_UNUSED(option);
Q_UNUSED(widget);
painter->fillRect(boundingRect(), QColor("blue"));
painter->fillRect(boundingRect(), QColor(0, 0, 100));
}
void TableZone::addCard(CardItem *card, bool reorganize, int x, int y)
@ -31,10 +31,12 @@ void TableZone::addCard(CardItem *card, bool reorganize, int x, int y)
y = height - CARD_HEIGHT - y;
card->setPos(x, y);
}
qDebug(QString("zValue = %1, x = %2, y = %3").arg((y + CARD_HEIGHT) * width + x + 1000).arg(x).arg(y).toLatin1());
card->setZValue((y + CARD_HEIGHT) * width + x + 1000);
card->setParentItem(this);
card->setVisible(true);
card->update(card->boundingRect());
}
void TableZone::handleDropEvent(int cardId, CardZone *startZone, const QPoint &dropPoint)