mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-10 12:23:58 -07:00
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:
parent
81b85e97df
commit
6078dd092a
17 changed files with 154 additions and 41 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue