15class QGraphicsRectItem;
Base graphics item for zones that contain cards.
Definition card_item.h:28
Definition card_zone_logic.h:26
CardZone(CardZoneLogic *logic, QGraphicsItem *parent=nullptr)
Definition card_zone.cpp:9
CardZoneLogic * logic
Definition card_zone.h:77
void escapeClipForHover(QGraphicsItem *card)
Temporarily reparents a card from the clip container to this zone so hover scaling is visible beyond ...
Definition select_zone.cpp:198
void restoreClipAfterHover(QGraphicsItem *card)
Restores a hover-escaped card back to the clip container. Guards against zone transitions that alread...
Definition select_zone.cpp:209
void mousePressEvent(QGraphicsSceneMouseEvent *event) override
Definition select_zone.cpp:267
~SelectZone() override
Definition select_zone.cpp:154
void setupClipContainer(std::optional< qreal > zValue=std::nullopt)
Creates a clip container child item that clips card overflow to zone bounds. Cards entering this zone...
Definition select_zone.cpp:180
int calcDropIndexFromY(qreal dropY, qreal minOffset=0.0) const
Computes the card index at a given y-coordinate within the zone's vertical layout....
Definition select_zone.cpp:93
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override
Definition select_zone.cpp:225
void layoutCardsVertically(const StackLayoutParams ¶ms)
Positions cards vertically with alternating left/right x-offsets.
Definition select_zone.cpp:122
void onCardAdded(CardItem *addedCard) override
Called when a card is added to this zone. Default: reparents card to this item.
Definition select_zone.cpp:169
QGraphicsRectItem * cardClipContainer
Invisible clipping parent for cards; owned by Qt parent-child tree (parented to this zone)....
Definition select_zone.h:53
QSet< CardItem * > cardsInSelectionRect
Definition select_zone.h:48
static ZoneLayout computeZoneLayout(const StackLayoutParams ¶ms)
Computes layout for a vertical card stack (effective offset and start position).
Definition select_zone.cpp:17
static SelectZone * findOwningSelectZone(const QGraphicsItem *card)
Finds the SelectZone that owns a card, regardless of whether the card is parented to the zone directl...
Definition select_zone.cpp:65
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override
Definition select_zone.cpp:282
void restoreStaleEscapedCards()
Restores any cards that were hover-escaped but whose hover state was not properly cleaned up....
Definition select_zone.cpp:107
void updateClipRect()
Updates the clip container rect to match this zone's current boundingRect().
Definition select_zone.cpp:218
static constexpr qreal MIN_CARD_VISIBLE
Minimum visible pixels of each card's top edge when stacking compresses offsets in tight zones.
Definition select_zone.h:83
StackLayoutParams buildStackParams(qreal minOffset=0.0) const
Builds StackLayoutParams from the current card list and zone geometry.
Definition select_zone.cpp:81
QPointF selectionOrigin
Definition select_zone.h:47
SelectZone(CardZoneLogic *logic, QGraphicsItem *parent=nullptr)
Definition select_zone.cpp:150
Parameters describing a vertical card stack's geometry.
Definition select_zone.h:60
qreal minOffset
Minimum offset to preserve (0 allows full compression).
Definition select_zone.h:65
qreal desiredOffset
Preferred vertical offset between card tops.
Definition select_zone.h:64
bool allowBottomOverflow
When false (default), reserves full cardHeight for the bottom card, ensuring all cards remain within ...
Definition select_zone.h:72
qreal cardHeight
Height of a single card.
Definition select_zone.h:63
qreal totalHeight
Available height for the stack (zone height).
Definition select_zone.h:62
int cardCount
Number of cards in the stack.
Definition select_zone.h:61
Result of computing a vertical stack layout.
Definition select_zone.h:77
qreal start
Y coordinate of the first card's top edge.
Definition select_zone.h:79
qreal effectiveOffset
Actual offset between card tops (may be compressed).
Definition select_zone.h:78