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:
RickyRister 2024-11-29 09:53:06 -08:00 committed by GitHub
parent 37bb1367db
commit 17eabf2004
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 183 additions and 80 deletions

View file

@ -4,6 +4,7 @@
#include "../../utility/macros.h"
#include <QCheckBox>
#include <QComboBox>
#include <QGraphicsProxyWidget>
#include <QGraphicsWidget>
@ -14,7 +15,6 @@ class ZoneViewZone;
class Player;
class CardDatabase;
class QScrollBar;
class QCheckBox;
class GameScene;
class ServerInfo_Card;
class QGraphicsSceneMouseEvent;
@ -47,8 +47,8 @@ private:
QPushButton *closeButton;
QScrollBar *scrollBar;
ScrollableGraphicsProxyWidget *scrollBarProxy;
QCheckBox sortByNameCheckBox;
QCheckBox sortByTypeCheckBox;
QComboBox groupBySelector;
QComboBox sortBySelector;
QCheckBox shuffleCheckBox;
QCheckBox pileViewCheckBox;
@ -58,8 +58,8 @@ private:
signals:
void closePressed(ZoneViewWidget *zv);
private slots:
void processSortByType(QT_STATE_CHANGED_T value);
void processSortByName(QT_STATE_CHANGED_T value);
void processGroupBy(int value);
void processSortBy(int value);
void processSetPileView(QT_STATE_CHANGED_T value);
void resizeToZoneContents();
void handleScrollBarChange(int value);