store sort option in settings as QComboBox index instead of enum value (#5207)

* rename config property

* change default

* functional changes
This commit is contained in:
RickyRister 2024-11-29 19:46:16 -08:00 committed by GitHub
parent 1d8651bc00
commit 5ef1ca06f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 29 additions and 23 deletions

View file

@ -109,7 +109,7 @@ private:
QString chatHighlightColor;
bool chatMentionForeground;
bool chatHighlightForeground;
int zoneViewSortBy, zoneViewGroupBy;
int zoneViewSortByIndex, zoneViewGroupByIndex;
bool zoneViewPileView;
bool soundEnabled;
QString soundThemeName;
@ -328,13 +328,19 @@ public:
{
return chatHighlightForeground;
}
int getZoneViewGroupBy() const
/**
* Currently selected index for the `Group by X` QComboBox
*/
int getZoneViewGroupByIndex() const
{
return zoneViewGroupBy;
return zoneViewGroupByIndex;
}
int getZoneViewSortBy() const
/**
* Currently selected index for the `Sort by X` QComboBox
*/
int getZoneViewSortByIndex() const
{
return zoneViewSortBy;
return zoneViewSortByIndex;
}
/**
Returns if the view should be sorted into pile view.
@ -564,8 +570,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 setZoneViewGroupBy(const int _zoneViewGroupBy);
void setZoneViewSortBy(const int _zoneViewSortBy);
void setZoneViewGroupByIndex(const int _zoneViewGroupByIndex);
void setZoneViewSortByIndex(const int _zoneViewSortByIndex);
void setZoneViewPileView(QT_STATE_CHANGED_T _zoneViewPileView);
void setSoundEnabled(QT_STATE_CHANGED_T _soundEnabled);
void setSoundThemeName(const QString &_soundThemeName);