HandZone::HandZone(Player *_p, bool _contentsKnown, int _zoneHeight, QGraphicsItem *parent) : SelectZone(_p, "hand", false, false, _contentsKnown, parent), zoneHeight(_zoneHeight) { connect(settingsCache, SIGNAL(handBgPathChanged()), this, SLOT(updateBgPixmap())); updateBgPixmap(); setCacheMode(DeviceCoordinateCache); }
StackZone::StackZone(Player *_p, int _zoneHeight, QGraphicsItem *parent) : SelectZone(_p, "stack", false, false, true, parent), zoneHeight(_zoneHeight) { connect(settingsCache, SIGNAL(stackBgPathChanged()), this, SLOT(updateBgPixmap())); updateBgPixmap(); setCacheMode(DeviceCoordinateCache); }
TableZone::TableZone(Player *_p, QGraphicsItem *parent) : SelectZone(_p, "table", true, false, true, parent), active(false) { connect(settingsCache, SIGNAL(tableBgPathChanged()), this, SLOT(updateBgPixmap())); connect(settingsCache, SIGNAL(invertVerticalCoordinateChanged()), this, SLOT(reorganizeCards())); updateBgPixmap(); height = 2 * boxLineWidth + 3 * (CARD_HEIGHT + 20) + 2 * paddingY; width = minWidth + 2 * marginX + 2 * boxLineWidth; currentMinimumWidth = minWidth; setCacheMode(DeviceCoordinateCache); #if QT_VERSION < 0x050000 setAcceptsHoverEvents(true); #else setAcceptHoverEvents(true); #endif }
TableZone::TableZone(Player *_p, QGraphicsItem *parent) : SelectZone(_p, "table", true, false, true, parent), active(false) { connect(settingsCache, SIGNAL(tableBgPathChanged()), this, SLOT(updateBgPixmap())); connect(settingsCache, SIGNAL(invertVerticalCoordinateChanged()), this, SLOT(reorganizeCards())); updateBgPixmap(); height = MARGIN_TOP + MARGIN_BOTTOM + TABLEROWS * CARD_HEIGHT + (TABLEROWS-1) * PADDING_Y; width = MIN_WIDTH; currentMinimumWidth = width; setCacheMode(DeviceCoordinateCache); #if QT_VERSION < 0x050000 setAcceptsHoverEvents(true); #else setAcceptHoverEvents(true); #endif }