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

@ -109,7 +109,8 @@ private:
QString chatHighlightColor;
bool chatMentionForeground;
bool chatHighlightForeground;
bool zoneViewSortByName, zoneViewSortByType, zoneViewPileView;
int zoneViewSortBy, zoneViewGroupBy;
bool zoneViewPileView;
bool soundEnabled;
QString soundThemeName;
bool ignoreUnregisteredUsers;
@ -327,13 +328,13 @@ public:
{
return chatHighlightForeground;
}
bool getZoneViewSortByName() const
int getZoneViewGroupBy() const
{
return zoneViewSortByName;
return zoneViewGroupBy;
}
bool getZoneViewSortByType() const
int getZoneViewSortBy() const
{
return zoneViewSortByType;
return zoneViewSortBy;
}
/**
Returns if the view should be sorted into pile view.
@ -563,8 +564,8 @@ public slots:
void setChatMentionCompleter(QT_STATE_CHANGED_T _chatMentionCompleter);
void setChatMentionForeground(QT_STATE_CHANGED_T _chatMentionForeground);
void setChatHighlightForeground(QT_STATE_CHANGED_T _chatHighlightForeground);
void setZoneViewSortByName(QT_STATE_CHANGED_T _zoneViewSortByName);
void setZoneViewSortByType(QT_STATE_CHANGED_T _zoneViewSortByType);
void setZoneViewGroupBy(const int _zoneViewGroupBy);
void setZoneViewSortBy(const int _zoneViewSortBy);
void setZoneViewPileView(QT_STATE_CHANGED_T _zoneViewPileView);
void setSoundEnabled(QT_STATE_CHANGED_T _soundEnabled);
void setSoundThemeName(const QString &_soundThemeName);