mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-06 05:23:56 -07:00
add sort options to card view window (#5206)
* refactor to allow for sorting by property of choice * implement thing * prevent overlapping sort properties * enable/disable pile view checkbox if groupBy is off * fix compiler warnings * check to disable pile view checkbox on init * Fix builds on Qt5 * Fix builds on Qt5 --------- Co-authored-by: ZeldaZach <zahalpern+github@gmail.com>
This commit is contained in:
parent
37bb1367db
commit
17eabf2004
10 changed files with 183 additions and 80 deletions
|
|
@ -32,7 +32,7 @@ private:
|
|||
void handleDropEvent(const QList<CardDragItem *> &dragItems, CardZone *startZone, const QPoint &dropPoint);
|
||||
CardZone *origZone;
|
||||
bool revealZone, writeableRevealZone;
|
||||
bool sortByName, sortByType;
|
||||
CardList::SortOption groupBy, sortBy;
|
||||
bool pileView;
|
||||
|
||||
struct GridSize
|
||||
|
|
@ -41,7 +41,7 @@ private:
|
|||
int cols;
|
||||
};
|
||||
|
||||
GridSize positionCardsForDisplay(CardList &cards, bool groupByType = false);
|
||||
GridSize positionCardsForDisplay(CardList &cards, CardList::SortOption pileOption = CardList::NoSort);
|
||||
|
||||
public:
|
||||
ZoneViewZone(Player *_p,
|
||||
|
|
@ -75,8 +75,8 @@ public:
|
|||
}
|
||||
void setWriteableRevealZone(bool _writeableRevealZone);
|
||||
public slots:
|
||||
void setSortByName(int _sortByName);
|
||||
void setSortByType(int _sortByType);
|
||||
void setGroupBy(CardList::SortOption _groupBy);
|
||||
void setSortBy(CardList::SortOption _sortBy);
|
||||
void setPileView(int _pileView);
|
||||
private slots:
|
||||
void zoneDumpReceived(const Response &r);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue