Support viewing the bottom X cards of library (#5410)

* Get cardIds to update properly in bottom view (#5414)

* Get bottom view to update properly when card is inserted into known portion (#5415)

---------

Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com>
This commit is contained in:
Zach H 2025-01-05 21:17:18 -05:00 committed by GitHub
parent 81b85e97df
commit 6078dd092a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 154 additions and 41 deletions

View file

@ -34,6 +34,16 @@ private:
bool revealZone, writeableRevealZone;
CardList::SortOption groupBy, sortBy;
bool pileView;
bool isReversed;
enum CardAction
{
INITIALIZE,
ADD_CARD,
REMOVE_CARD
};
void updateCardIds(CardAction action);
struct GridSize
{
@ -49,7 +59,8 @@ public:
int _numberCards = -1,
bool _revealZone = false,
bool _writeableRevealZone = false,
QGraphicsItem *parent = nullptr);
QGraphicsItem *parent = nullptr,
bool _isReversed = false);
~ZoneViewZone();
QRectF boundingRect() const;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
@ -74,6 +85,10 @@ public:
return writeableRevealZone;
}
void setWriteableRevealZone(bool _writeableRevealZone);
bool getIsReversed() const
{
return isReversed;
}
public slots:
void setGroupBy(CardList::SortOption _groupBy);
void setSortBy(CardList::SortOption _sortBy);