16#include <qtmetamacros.h>
18class QGraphicsRectItem;
118 int calcDropIndexFromY(qreal dropY,
bool allowCountExpand, qreal minOffset = 0.0)
const;
Base graphics item for zones that contain cards.
Definition card_item.h:33
Definition card_zone_logic.h:27
CardZone(CardZoneLogic *logic, QGraphicsItem *parent=nullptr)
Definition card_zone.cpp:17
CardZoneLogic * logic
Definition card_zone.h:86
Definition dlg_manage_sets.h:29
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:204
void restoreClipAfterHover(QGraphicsItem *card)
Restores a hover-escaped card back to the clip container. Guards against zone transitions that alread...
Definition select_zone.cpp:215
void mousePressEvent(QGraphicsSceneMouseEvent *event) override
Definition select_zone.cpp:273
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:186
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override
Definition select_zone.cpp:231
int calcDropIndexFromY(qreal dropY, bool allowCountExpand, qreal minOffset=0.0) const
Computes the card index at a given y-coordinate within the zone's vertical layout....
Definition select_zone.cpp:98
void layoutCardsVertically(const StackLayoutParams ¶ms)
Positions cards vertically with alternating left/right x-offsets.
Definition select_zone.cpp:128
void onCardAdded(CardItem *addedCard) override
Called when a card is added to this zone. Default: reparents card to this item.
Definition select_zone.cpp:175
QGraphicsRectItem * cardClipContainer
Invisible clipping parent for cards; owned by Qt parent-child tree (parented to this zone)....
Definition select_zone.h:59
QSet< CardItem * > cardsInSelectionRect
Definition select_zone.h:54
static ZoneLayout computeZoneLayout(const StackLayoutParams ¶ms)
Computes layout for a vertical card stack (effective offset and start position).
Definition select_zone.cpp:30
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:70
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override
Definition select_zone.cpp:288
void restoreStaleEscapedCards()
Restores any cards that were hover-escaped but whose hover state was not properly cleaned up....
Definition select_zone.cpp:113
void updateClipRect()
Updates the clip container rect to match this zone's current boundingRect().
Definition select_zone.cpp:224
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:89
StackLayoutParams buildStackParams(qreal minOffset=0.0) const
Builds StackLayoutParams from the current card list and zone geometry.
Definition select_zone.cpp:86
QPointF selectionOrigin
Definition select_zone.h:53
SelectZone(CardZoneLogic *logic, QGraphicsItem *parent=nullptr)
Definition select_zone.cpp:156
Parameters describing a vertical card stack's geometry.
Definition select_zone.h:66
qreal minOffset
Minimum offset to preserve (0 allows full compression).
Definition select_zone.h:71
qreal desiredOffset
Preferred vertical offset between card tops.
Definition select_zone.h:70
bool allowBottomOverflow
When false (default), reserves full cardHeight for the bottom card, ensuring all cards remain within ...
Definition select_zone.h:78
qreal cardHeight
Height of a single card.
Definition select_zone.h:69
qreal totalHeight
Available height for the stack (zone height).
Definition select_zone.h:68
int cardCount
Number of cards in the stack.
Definition select_zone.h:67
Result of computing a vertical stack layout.
Definition select_zone.h:83
qreal start
Y coordinate of the first card's top edge.
Definition select_zone.h:85
qreal effectiveOffset
Actual offset between card tops (may be compressed).
Definition select_zone.h:84