feat(command-zone): add graphics implementation with integration tests

Implement CommandZone - the main Qt graphics class for rendering and
interacting with command zones.

This commit brings together all previous components:
- Uses CommandZoneState for visibility management
- Uses CommandZoneLogic for card data handling
- Uses ZoneToggleButton for visibility controls
- Uses CommanderTaxCounter for tax display
- Uses z_values.h for proper visual layering

Zone modifications for command zone support:
- SelectZone: add command zone to zone selection
- StackZone: support command zone in stack operations
- TableZone: command zone positioning integration
- ViewZoneWidget: command zone viewing support

Integration tests verify:
- Counter parenting behavior
- Zone state coordination
- Full graphics stack interaction
This commit is contained in:
DawnFire42 2026-02-25 13:35:09 -05:00
parent 78db49a9b3
commit 6e83d64622
12 changed files with 1570 additions and 8 deletions

View file

@ -33,6 +33,11 @@ QRectF StackZone::boundingRect() const
void StackZone::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/)
{
QBrush brush = themeManager->getExtraBgBrush(ThemeManager::Stack, getLogic()->getPlayer()->getZoneId());
// Set brush origin to compensate for zone position, keeping texture fixed in scene coordinates
QPointF scenePos = pos();
painter->setBrushOrigin(-scenePos);
painter->fillRect(boundingRect(), brush);
}
@ -106,3 +111,11 @@ void StackZone::reorganizeCards()
}
update();
}
void StackZone::setHeight(qreal newHeight)
{
prepareGeometryChange();
zoneHeight = newHeight;
reorganizeCards();
update();
}