mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-30 10:33:54 -07:00
[Fix-Warnings] Mark const getters as [[nodiscard]] (#6365)
Took 45 minutes Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
a1a3b02d3a
commit
9ece4bfd9b
58 changed files with 548 additions and 543 deletions
|
|
@ -325,8 +325,8 @@ private:
|
|||
int keepalive;
|
||||
int timeout;
|
||||
void translateLegacySettings();
|
||||
QString getSafeConfigPath(QString configEntry, QString defaultPath) const;
|
||||
QString getSafeConfigFilePath(QString configEntry, QString defaultPath) const;
|
||||
[[nodiscard]] QString getSafeConfigPath(QString configEntry, QString defaultPath) const;
|
||||
[[nodiscard]] QString getSafeConfigFilePath(QString configEntry, QString defaultPath) const;
|
||||
void loadPaths();
|
||||
bool rememberGameSettings;
|
||||
QList<ReleaseChannel *> releaseChannels;
|
||||
|
|
@ -338,137 +338,137 @@ public:
|
|||
SettingsCache();
|
||||
QString getDataPath();
|
||||
QString getSettingsPath();
|
||||
QString getCachePath() const;
|
||||
QString getNetworkCachePath() const;
|
||||
const QByteArray &getMainWindowGeometry() const
|
||||
[[nodiscard]] QString getCachePath() const;
|
||||
[[nodiscard]] QString getNetworkCachePath() const;
|
||||
[[nodiscard]] const QByteArray &getMainWindowGeometry() const
|
||||
{
|
||||
return mainWindowGeometry;
|
||||
}
|
||||
const QByteArray &getTokenDialogGeometry() const
|
||||
[[nodiscard]] const QByteArray &getTokenDialogGeometry() const
|
||||
{
|
||||
return tokenDialogGeometry;
|
||||
}
|
||||
const QByteArray &getSetsDialogGeometry() const
|
||||
[[nodiscard]] const QByteArray &getSetsDialogGeometry() const
|
||||
{
|
||||
return setsDialogGeometry;
|
||||
}
|
||||
QString getLang() const
|
||||
[[nodiscard]] QString getLang() const
|
||||
{
|
||||
return lang;
|
||||
}
|
||||
QString getDeckPath() const
|
||||
[[nodiscard]] QString getDeckPath() const
|
||||
{
|
||||
return deckPath;
|
||||
}
|
||||
QString getFiltersPath() const
|
||||
[[nodiscard]] QString getFiltersPath() const
|
||||
{
|
||||
return filtersPath;
|
||||
}
|
||||
QString getReplaysPath() const
|
||||
[[nodiscard]] QString getReplaysPath() const
|
||||
{
|
||||
return replaysPath;
|
||||
}
|
||||
QString getThemesPath() const
|
||||
[[nodiscard]] QString getThemesPath() const
|
||||
{
|
||||
return themesPath;
|
||||
}
|
||||
QString getPicsPath() const
|
||||
[[nodiscard]] QString getPicsPath() const
|
||||
{
|
||||
return picsPath;
|
||||
}
|
||||
QString getRedirectCachePath() const
|
||||
[[nodiscard]] QString getRedirectCachePath() const
|
||||
{
|
||||
return redirectCachePath;
|
||||
}
|
||||
QString getCustomPicsPath() const
|
||||
[[nodiscard]] QString getCustomPicsPath() const
|
||||
{
|
||||
return customPicsPath;
|
||||
}
|
||||
QString getCustomCardDatabasePath() const override
|
||||
[[nodiscard]] QString getCustomCardDatabasePath() const override
|
||||
{
|
||||
return customCardDatabasePath;
|
||||
}
|
||||
QString getCardDatabasePath() const override
|
||||
[[nodiscard]] QString getCardDatabasePath() const override
|
||||
{
|
||||
return cardDatabasePath;
|
||||
}
|
||||
QString getSpoilerCardDatabasePath() const override
|
||||
[[nodiscard]] QString getSpoilerCardDatabasePath() const override
|
||||
{
|
||||
return spoilerDatabasePath;
|
||||
}
|
||||
QString getTokenDatabasePath() const override
|
||||
[[nodiscard]] QString getTokenDatabasePath() const override
|
||||
{
|
||||
return tokenDatabasePath;
|
||||
}
|
||||
QString getThemeName() const
|
||||
[[nodiscard]] QString getThemeName() const
|
||||
{
|
||||
return themeName;
|
||||
}
|
||||
QString getHomeTabBackgroundSource() const
|
||||
[[nodiscard]] QString getHomeTabBackgroundSource() const
|
||||
{
|
||||
return homeTabBackgroundSource;
|
||||
}
|
||||
int getHomeTabBackgroundShuffleFrequency() const
|
||||
[[nodiscard]] int getHomeTabBackgroundShuffleFrequency() const
|
||||
{
|
||||
return homeTabBackgroundShuffleFrequency;
|
||||
}
|
||||
bool getTabVisualDeckStorageOpen() const
|
||||
[[nodiscard]] bool getTabVisualDeckStorageOpen() const
|
||||
{
|
||||
return tabVisualDeckStorageOpen;
|
||||
}
|
||||
bool getTabServerOpen() const
|
||||
[[nodiscard]] bool getTabServerOpen() const
|
||||
{
|
||||
return tabServerOpen;
|
||||
}
|
||||
bool getTabAccountOpen() const
|
||||
[[nodiscard]] bool getTabAccountOpen() const
|
||||
{
|
||||
return tabAccountOpen;
|
||||
}
|
||||
bool getTabDeckStorageOpen() const
|
||||
[[nodiscard]] bool getTabDeckStorageOpen() const
|
||||
{
|
||||
return tabDeckStorageOpen;
|
||||
}
|
||||
bool getTabReplaysOpen() const
|
||||
[[nodiscard]] bool getTabReplaysOpen() const
|
||||
{
|
||||
return tabReplaysOpen;
|
||||
}
|
||||
bool getTabAdminOpen() const
|
||||
[[nodiscard]] bool getTabAdminOpen() const
|
||||
{
|
||||
return tabAdminOpen;
|
||||
}
|
||||
bool getTabLogOpen() const
|
||||
[[nodiscard]] bool getTabLogOpen() const
|
||||
{
|
||||
return tabLogOpen;
|
||||
}
|
||||
QString getChatMentionColor() const
|
||||
[[nodiscard]] QString getChatMentionColor() const
|
||||
{
|
||||
return chatMentionColor;
|
||||
}
|
||||
QString getChatHighlightColor() const
|
||||
[[nodiscard]] QString getChatHighlightColor() const
|
||||
{
|
||||
return chatHighlightColor;
|
||||
}
|
||||
bool getPicDownload() const
|
||||
[[nodiscard]] bool getPicDownload() const
|
||||
{
|
||||
return picDownload;
|
||||
}
|
||||
bool getShowStatusBar() const
|
||||
[[nodiscard]] bool getShowStatusBar() const
|
||||
{
|
||||
return showStatusBar;
|
||||
}
|
||||
bool getNotificationsEnabled() const
|
||||
[[nodiscard]] bool getNotificationsEnabled() const
|
||||
{
|
||||
return notificationsEnabled;
|
||||
}
|
||||
bool getSpectatorNotificationsEnabled() const
|
||||
[[nodiscard]] bool getSpectatorNotificationsEnabled() const
|
||||
{
|
||||
return spectatorNotificationsEnabled;
|
||||
}
|
||||
bool getBuddyConnectNotificationsEnabled() const
|
||||
[[nodiscard]] bool getBuddyConnectNotificationsEnabled() const
|
||||
{
|
||||
return buddyConnectNotificationsEnabled;
|
||||
}
|
||||
bool getCheckUpdatesOnStartup() const
|
||||
[[nodiscard]] bool getCheckUpdatesOnStartup() const
|
||||
{
|
||||
return checkUpdatesOnStartup;
|
||||
}
|
||||
|
|
@ -480,263 +480,263 @@ public:
|
|||
{
|
||||
return startupCardUpdateCheckAlwaysUpdate;
|
||||
}
|
||||
int getCardUpdateCheckInterval() const
|
||||
[[nodiscard]] int getCardUpdateCheckInterval() const
|
||||
{
|
||||
return cardUpdateCheckInterval;
|
||||
}
|
||||
QDate getLastCardUpdateCheck() const
|
||||
[[nodiscard]] QDate getLastCardUpdateCheck() const
|
||||
{
|
||||
return lastCardUpdateCheck;
|
||||
}
|
||||
bool getCardUpdateCheckRequired() const
|
||||
[[nodiscard]] bool getCardUpdateCheckRequired() const
|
||||
{
|
||||
return getLastCardUpdateCheck().daysTo(QDateTime::currentDateTime().date()) >= getCardUpdateCheckInterval() &&
|
||||
getLastCardUpdateCheck() != QDateTime::currentDateTime().date();
|
||||
}
|
||||
bool getNotifyAboutUpdates() const override
|
||||
[[nodiscard]] bool getNotifyAboutUpdates() const override
|
||||
{
|
||||
return notifyAboutUpdates;
|
||||
}
|
||||
bool getNotifyAboutNewVersion() const
|
||||
[[nodiscard]] bool getNotifyAboutNewVersion() const
|
||||
{
|
||||
return notifyAboutNewVersion;
|
||||
}
|
||||
bool getShowTipsOnStartup() const
|
||||
[[nodiscard]] bool getShowTipsOnStartup() const
|
||||
{
|
||||
return showTipsOnStartup;
|
||||
}
|
||||
QList<int> getSeenTips() const
|
||||
[[nodiscard]] QList<int> getSeenTips() const
|
||||
{
|
||||
return seenTips;
|
||||
}
|
||||
int getUpdateReleaseChannelIndex() const
|
||||
[[nodiscard]] int getUpdateReleaseChannelIndex() const
|
||||
{
|
||||
return updateReleaseChannel;
|
||||
}
|
||||
ReleaseChannel *getUpdateReleaseChannel() const
|
||||
[[nodiscard]] ReleaseChannel *getUpdateReleaseChannel() const
|
||||
{
|
||||
return releaseChannels.at(qMax(0, updateReleaseChannel));
|
||||
}
|
||||
QList<ReleaseChannel *> getUpdateReleaseChannels() const
|
||||
[[nodiscard]] QList<ReleaseChannel *> getUpdateReleaseChannels() const
|
||||
{
|
||||
return releaseChannels;
|
||||
}
|
||||
|
||||
bool getDoubleClickToPlay() const
|
||||
[[nodiscard]] bool getDoubleClickToPlay() const
|
||||
{
|
||||
return doubleClickToPlay;
|
||||
}
|
||||
bool getClickPlaysAllSelected() const
|
||||
[[nodiscard]] bool getClickPlaysAllSelected() const
|
||||
{
|
||||
return clickPlaysAllSelected;
|
||||
}
|
||||
bool getPlayToStack() const
|
||||
[[nodiscard]] bool getPlayToStack() const
|
||||
{
|
||||
return playToStack;
|
||||
}
|
||||
bool getDoNotDeleteArrowsInSubPhases() const
|
||||
[[nodiscard]] bool getDoNotDeleteArrowsInSubPhases() const
|
||||
{
|
||||
return doNotDeleteArrowsInSubPhases;
|
||||
}
|
||||
int getStartingHandSize() const
|
||||
[[nodiscard]] int getStartingHandSize() const
|
||||
{
|
||||
return startingHandSize;
|
||||
}
|
||||
bool getAnnotateTokens() const
|
||||
[[nodiscard]] bool getAnnotateTokens() const
|
||||
{
|
||||
return annotateTokens;
|
||||
}
|
||||
QByteArray getTabGameSplitterSizes() const
|
||||
[[nodiscard]] QByteArray getTabGameSplitterSizes() const
|
||||
{
|
||||
return tabGameSplitterSizes;
|
||||
}
|
||||
bool getShowShortcuts() const
|
||||
[[nodiscard]] bool getShowShortcuts() const
|
||||
{
|
||||
return showShortcuts;
|
||||
}
|
||||
bool getDisplayCardNames() const
|
||||
[[nodiscard]] bool getDisplayCardNames() const
|
||||
{
|
||||
return displayCardNames;
|
||||
}
|
||||
bool getOverrideAllCardArtWithPersonalPreference() const
|
||||
[[nodiscard]] bool getOverrideAllCardArtWithPersonalPreference() const
|
||||
{
|
||||
return overrideAllCardArtWithPersonalPreference;
|
||||
}
|
||||
bool getBumpSetsWithCardsInDeckToTop() const
|
||||
[[nodiscard]] bool getBumpSetsWithCardsInDeckToTop() const
|
||||
{
|
||||
return bumpSetsWithCardsInDeckToTop;
|
||||
}
|
||||
int getPrintingSelectorSortOrder() const
|
||||
[[nodiscard]] int getPrintingSelectorSortOrder() const
|
||||
{
|
||||
return printingSelectorSortOrder;
|
||||
}
|
||||
int getPrintingSelectorCardSize() const
|
||||
[[nodiscard]] int getPrintingSelectorCardSize() const
|
||||
{
|
||||
return printingSelectorCardSize;
|
||||
}
|
||||
bool getIncludeRebalancedCards() const
|
||||
[[nodiscard]] bool getIncludeRebalancedCards() const
|
||||
{
|
||||
return includeRebalancedCards;
|
||||
}
|
||||
bool getPrintingSelectorNavigationButtonsVisible() const
|
||||
[[nodiscard]] bool getPrintingSelectorNavigationButtonsVisible() const
|
||||
{
|
||||
return printingSelectorNavigationButtonsVisible;
|
||||
}
|
||||
bool getDeckEditorBannerCardComboBoxVisible() const
|
||||
[[nodiscard]] bool getDeckEditorBannerCardComboBoxVisible() const
|
||||
{
|
||||
return deckEditorBannerCardComboBoxVisible;
|
||||
}
|
||||
bool getDeckEditorTagsWidgetVisible() const
|
||||
[[nodiscard]] bool getDeckEditorTagsWidgetVisible() const
|
||||
{
|
||||
return deckEditorTagsWidgetVisible;
|
||||
}
|
||||
int getVisualDeckStorageSortingOrder() const
|
||||
[[nodiscard]] int getVisualDeckStorageSortingOrder() const
|
||||
{
|
||||
return visualDeckStorageSortingOrder;
|
||||
}
|
||||
bool getVisualDeckStorageShowFolders() const
|
||||
[[nodiscard]] bool getVisualDeckStorageShowFolders() const
|
||||
{
|
||||
return visualDeckStorageShowFolders;
|
||||
}
|
||||
bool getVisualDeckStorageShowTagFilter() const
|
||||
[[nodiscard]] bool getVisualDeckStorageShowTagFilter() const
|
||||
{
|
||||
return visualDeckStorageShowTagFilter;
|
||||
}
|
||||
QStringList getVisualDeckStorageDefaultTagsList() const
|
||||
[[nodiscard]] QStringList getVisualDeckStorageDefaultTagsList() const
|
||||
{
|
||||
return visualDeckStorageDefaultTagsList;
|
||||
}
|
||||
bool getVisualDeckStorageSearchFolderNames() const
|
||||
[[nodiscard]] bool getVisualDeckStorageSearchFolderNames() const
|
||||
{
|
||||
return visualDeckStorageSearchFolderNames;
|
||||
}
|
||||
bool getVisualDeckStorageShowBannerCardComboBox() const
|
||||
[[nodiscard]] bool getVisualDeckStorageShowBannerCardComboBox() const
|
||||
{
|
||||
return visualDeckStorageShowBannerCardComboBox;
|
||||
}
|
||||
bool getVisualDeckStorageShowTagsOnDeckPreviews() const
|
||||
[[nodiscard]] bool getVisualDeckStorageShowTagsOnDeckPreviews() const
|
||||
{
|
||||
return visualDeckStorageShowTagsOnDeckPreviews;
|
||||
}
|
||||
int getVisualDeckStorageCardSize() const
|
||||
[[nodiscard]] int getVisualDeckStorageCardSize() const
|
||||
{
|
||||
return visualDeckStorageCardSize;
|
||||
}
|
||||
bool getVisualDeckStorageDrawUnusedColorIdentities() const
|
||||
[[nodiscard]] bool getVisualDeckStorageDrawUnusedColorIdentities() const
|
||||
{
|
||||
return visualDeckStorageDrawUnusedColorIdentities;
|
||||
}
|
||||
int getVisualDeckStorageUnusedColorIdentitiesOpacity() const
|
||||
[[nodiscard]] int getVisualDeckStorageUnusedColorIdentitiesOpacity() const
|
||||
{
|
||||
return visualDeckStorageUnusedColorIdentitiesOpacity;
|
||||
}
|
||||
int getVisualDeckStorageTooltipType() const
|
||||
[[nodiscard]] int getVisualDeckStorageTooltipType() const
|
||||
{
|
||||
return visualDeckStorageTooltipType;
|
||||
}
|
||||
bool getVisualDeckStoragePromptForConversion() const
|
||||
[[nodiscard]] bool getVisualDeckStoragePromptForConversion() const
|
||||
{
|
||||
return visualDeckStoragePromptForConversion;
|
||||
}
|
||||
bool getVisualDeckStorageAlwaysConvert() const
|
||||
[[nodiscard]] bool getVisualDeckStorageAlwaysConvert() const
|
||||
{
|
||||
return visualDeckStorageAlwaysConvert;
|
||||
}
|
||||
bool getVisualDeckStorageInGame() const
|
||||
[[nodiscard]] bool getVisualDeckStorageInGame() const
|
||||
{
|
||||
return visualDeckStorageInGame;
|
||||
}
|
||||
bool getVisualDeckStorageSelectionAnimation() const
|
||||
[[nodiscard]] bool getVisualDeckStorageSelectionAnimation() const
|
||||
{
|
||||
return visualDeckStorageSelectionAnimation;
|
||||
}
|
||||
int getVisualDeckEditorCardSize() const
|
||||
[[nodiscard]] int getVisualDeckEditorCardSize() const
|
||||
{
|
||||
return visualDeckEditorCardSize;
|
||||
}
|
||||
int getVisualDatabaseDisplayCardSize() const
|
||||
[[nodiscard]] int getVisualDatabaseDisplayCardSize() const
|
||||
{
|
||||
return visualDatabaseDisplayCardSize;
|
||||
}
|
||||
int getEDHRecCardSize() const
|
||||
[[nodiscard]] int getEDHRecCardSize() const
|
||||
{
|
||||
return edhrecCardSize;
|
||||
}
|
||||
int getArchidektPreviewSize() const
|
||||
[[nodiscard]] int getArchidektPreviewSize() const
|
||||
{
|
||||
return archidektPreviewSize;
|
||||
}
|
||||
int getDefaultDeckEditorType() const
|
||||
[[nodiscard]] int getDefaultDeckEditorType() const
|
||||
{
|
||||
return defaultDeckEditorType;
|
||||
}
|
||||
bool getVisualDatabaseDisplayFilterToMostRecentSetsEnabled() const
|
||||
[[nodiscard]] bool getVisualDatabaseDisplayFilterToMostRecentSetsEnabled() const
|
||||
{
|
||||
return visualDatabaseDisplayFilterToMostRecentSetsEnabled;
|
||||
}
|
||||
int getVisualDatabaseDisplayFilterToMostRecentSetsAmount() const
|
||||
[[nodiscard]] int getVisualDatabaseDisplayFilterToMostRecentSetsAmount() const
|
||||
{
|
||||
return visualDatabaseDisplayFilterToMostRecentSetsAmount;
|
||||
}
|
||||
int getVisualDeckEditorSampleHandSize() const
|
||||
[[nodiscard]] int getVisualDeckEditorSampleHandSize() const
|
||||
{
|
||||
return visualDeckEditorSampleHandSize;
|
||||
}
|
||||
bool getHorizontalHand() const
|
||||
[[nodiscard]] bool getHorizontalHand() const
|
||||
{
|
||||
return horizontalHand;
|
||||
}
|
||||
bool getInvertVerticalCoordinate() const
|
||||
[[nodiscard]] bool getInvertVerticalCoordinate() const
|
||||
{
|
||||
return invertVerticalCoordinate;
|
||||
}
|
||||
int getMinPlayersForMultiColumnLayout() const
|
||||
[[nodiscard]] int getMinPlayersForMultiColumnLayout() const
|
||||
{
|
||||
return minPlayersForMultiColumnLayout;
|
||||
}
|
||||
bool getTapAnimation() const
|
||||
[[nodiscard]] bool getTapAnimation() const
|
||||
{
|
||||
return tapAnimation;
|
||||
}
|
||||
bool getAutoRotateSidewaysLayoutCards() const
|
||||
[[nodiscard]] bool getAutoRotateSidewaysLayoutCards() const
|
||||
{
|
||||
return autoRotateSidewaysLayoutCards;
|
||||
}
|
||||
bool getOpenDeckInNewTab() const
|
||||
[[nodiscard]] bool getOpenDeckInNewTab() const
|
||||
{
|
||||
return openDeckInNewTab;
|
||||
}
|
||||
int getRewindBufferingMs() const
|
||||
[[nodiscard]] int getRewindBufferingMs() const
|
||||
{
|
||||
return rewindBufferingMs;
|
||||
}
|
||||
bool getChatMention() const
|
||||
[[nodiscard]] bool getChatMention() const
|
||||
{
|
||||
return chatMention;
|
||||
}
|
||||
bool getChatMentionCompleter() const
|
||||
[[nodiscard]] bool getChatMentionCompleter() const
|
||||
{
|
||||
return chatMentionCompleter;
|
||||
}
|
||||
bool getChatMentionForeground() const
|
||||
[[nodiscard]] bool getChatMentionForeground() const
|
||||
{
|
||||
return chatMentionForeground;
|
||||
}
|
||||
bool getChatHighlightForeground() const
|
||||
[[nodiscard]] bool getChatHighlightForeground() const
|
||||
{
|
||||
return chatHighlightForeground;
|
||||
}
|
||||
/**
|
||||
* Currently selected index for the `Group by X` QComboBox
|
||||
*/
|
||||
int getZoneViewGroupByIndex() const
|
||||
[[nodiscard]] int getZoneViewGroupByIndex() const
|
||||
{
|
||||
return zoneViewGroupByIndex;
|
||||
}
|
||||
/**
|
||||
* Currently selected index for the `Sort by X` QComboBox
|
||||
*/
|
||||
int getZoneViewSortByIndex() const
|
||||
[[nodiscard]] int getZoneViewSortByIndex() const
|
||||
{
|
||||
return zoneViewSortByIndex;
|
||||
}
|
||||
|
|
@ -744,136 +744,136 @@ public:
|
|||
Returns if the view should be sorted into pile view.
|
||||
@return zoneViewPileView if the view should be sorted into pile view.
|
||||
*/
|
||||
bool getZoneViewPileView() const
|
||||
[[nodiscard]] bool getZoneViewPileView() const
|
||||
{
|
||||
return zoneViewPileView;
|
||||
}
|
||||
bool getSoundEnabled() const
|
||||
[[nodiscard]] bool getSoundEnabled() const
|
||||
{
|
||||
return soundEnabled;
|
||||
}
|
||||
QString getSoundThemeName() const
|
||||
[[nodiscard]] QString getSoundThemeName() const
|
||||
{
|
||||
return soundThemeName;
|
||||
}
|
||||
bool getIgnoreUnregisteredUsers() const
|
||||
[[nodiscard]] bool getIgnoreUnregisteredUsers() const
|
||||
{
|
||||
return ignoreUnregisteredUsers;
|
||||
}
|
||||
bool getIgnoreUnregisteredUserMessages() const
|
||||
[[nodiscard]] bool getIgnoreUnregisteredUserMessages() const
|
||||
{
|
||||
return ignoreUnregisteredUserMessages;
|
||||
}
|
||||
int getPixmapCacheSize() const
|
||||
[[nodiscard]] int getPixmapCacheSize() const
|
||||
{
|
||||
return pixmapCacheSize;
|
||||
}
|
||||
int getNetworkCacheSizeInMB() const
|
||||
[[nodiscard]] int getNetworkCacheSizeInMB() const
|
||||
{
|
||||
return networkCacheSize;
|
||||
}
|
||||
int getRedirectCacheTtl() const
|
||||
[[nodiscard]] int getRedirectCacheTtl() const
|
||||
{
|
||||
return redirectCacheTtl;
|
||||
}
|
||||
bool getScaleCards() const
|
||||
[[nodiscard]] bool getScaleCards() const
|
||||
{
|
||||
return scaleCards;
|
||||
}
|
||||
int getStackCardOverlapPercent() const
|
||||
[[nodiscard]] int getStackCardOverlapPercent() const
|
||||
{
|
||||
return verticalCardOverlapPercent;
|
||||
}
|
||||
bool getShowMessagePopup() const
|
||||
[[nodiscard]] bool getShowMessagePopup() const
|
||||
{
|
||||
return showMessagePopups;
|
||||
}
|
||||
bool getShowMentionPopup() const
|
||||
[[nodiscard]] bool getShowMentionPopup() const
|
||||
{
|
||||
return showMentionPopups;
|
||||
}
|
||||
bool getRoomHistory() const
|
||||
[[nodiscard]] bool getRoomHistory() const
|
||||
{
|
||||
return roomHistory;
|
||||
}
|
||||
bool getLeftJustified() const
|
||||
[[nodiscard]] bool getLeftJustified() const
|
||||
{
|
||||
return leftJustified;
|
||||
}
|
||||
int getMasterVolume() const
|
||||
[[nodiscard]] int getMasterVolume() const
|
||||
{
|
||||
return masterVolume;
|
||||
}
|
||||
int getCardInfoViewMode() const
|
||||
[[nodiscard]] int getCardInfoViewMode() const
|
||||
{
|
||||
return cardInfoViewMode;
|
||||
}
|
||||
QStringList getCountries() const;
|
||||
QString getHighlightWords() const
|
||||
[[nodiscard]] QStringList getCountries() const;
|
||||
[[nodiscard]] QString getHighlightWords() const
|
||||
{
|
||||
return highlightWords;
|
||||
}
|
||||
QString getGameDescription() const
|
||||
[[nodiscard]] QString getGameDescription() const
|
||||
{
|
||||
return gameDescription;
|
||||
}
|
||||
int getMaxPlayers() const
|
||||
[[nodiscard]] int getMaxPlayers() const
|
||||
{
|
||||
return maxPlayers;
|
||||
}
|
||||
QString getGameTypes() const
|
||||
[[nodiscard]] QString getGameTypes() const
|
||||
{
|
||||
return gameTypes;
|
||||
}
|
||||
bool getOnlyBuddies() const
|
||||
[[nodiscard]] bool getOnlyBuddies() const
|
||||
{
|
||||
return onlyBuddies;
|
||||
}
|
||||
bool getOnlyRegistered() const
|
||||
[[nodiscard]] bool getOnlyRegistered() const
|
||||
{
|
||||
return onlyRegistered;
|
||||
}
|
||||
bool getSpectatorsAllowed() const
|
||||
[[nodiscard]] bool getSpectatorsAllowed() const
|
||||
{
|
||||
return spectatorsAllowed;
|
||||
}
|
||||
bool getSpectatorsNeedPassword() const
|
||||
[[nodiscard]] bool getSpectatorsNeedPassword() const
|
||||
{
|
||||
return spectatorsNeedPassword;
|
||||
}
|
||||
bool getSpectatorsCanTalk() const
|
||||
[[nodiscard]] bool getSpectatorsCanTalk() const
|
||||
{
|
||||
return spectatorsCanTalk;
|
||||
}
|
||||
bool getSpectatorsCanSeeEverything() const
|
||||
[[nodiscard]] bool getSpectatorsCanSeeEverything() const
|
||||
{
|
||||
return spectatorsCanSeeEverything;
|
||||
}
|
||||
int getDefaultStartingLifeTotal() const
|
||||
[[nodiscard]] int getDefaultStartingLifeTotal() const
|
||||
{
|
||||
return defaultStartingLifeTotal;
|
||||
}
|
||||
bool getShareDecklistsOnLoad() const
|
||||
[[nodiscard]] bool getShareDecklistsOnLoad() const
|
||||
{
|
||||
return shareDecklistsOnLoad;
|
||||
}
|
||||
bool getCreateGameAsSpectator() const
|
||||
[[nodiscard]] bool getCreateGameAsSpectator() const
|
||||
{
|
||||
return createGameAsSpectator;
|
||||
}
|
||||
bool getRememberGameSettings() const
|
||||
[[nodiscard]] bool getRememberGameSettings() const
|
||||
{
|
||||
return rememberGameSettings;
|
||||
}
|
||||
int getKeepAlive() const override
|
||||
[[nodiscard]] int getKeepAlive() const override
|
||||
{
|
||||
return keepalive;
|
||||
}
|
||||
int getTimeOut() const override
|
||||
[[nodiscard]] int getTimeOut() const override
|
||||
{
|
||||
return timeout;
|
||||
}
|
||||
int getMaxFontSize() const
|
||||
[[nodiscard]] int getMaxFontSize() const
|
||||
{
|
||||
return maxFontSize;
|
||||
}
|
||||
|
|
@ -901,73 +901,73 @@ public:
|
|||
{
|
||||
return useTearOffMenus;
|
||||
}
|
||||
int getCardViewInitialRowsMax() const
|
||||
[[nodiscard]] int getCardViewInitialRowsMax() const
|
||||
{
|
||||
return cardViewInitialRowsMax;
|
||||
}
|
||||
int getCardViewExpandedRowsMax() const
|
||||
[[nodiscard]] int getCardViewExpandedRowsMax() const
|
||||
{
|
||||
return cardViewExpandedRowsMax;
|
||||
}
|
||||
bool getCloseEmptyCardView() const
|
||||
[[nodiscard]] bool getCloseEmptyCardView() const
|
||||
{
|
||||
return closeEmptyCardView;
|
||||
}
|
||||
bool getFocusCardViewSearchBar() const
|
||||
[[nodiscard]] bool getFocusCardViewSearchBar() const
|
||||
{
|
||||
return focusCardViewSearchBar;
|
||||
}
|
||||
ShortcutsSettings &shortcuts() const
|
||||
[[nodiscard]] ShortcutsSettings &shortcuts() const
|
||||
{
|
||||
return *shortcutsSettings;
|
||||
}
|
||||
CardDatabaseSettings *cardDatabase() const
|
||||
[[nodiscard]] CardDatabaseSettings *cardDatabase() const
|
||||
{
|
||||
return cardDatabaseSettings;
|
||||
}
|
||||
ServersSettings &servers() const
|
||||
[[nodiscard]] ServersSettings &servers() const
|
||||
{
|
||||
return *serversSettings;
|
||||
}
|
||||
MessageSettings &messages() const
|
||||
[[nodiscard]] MessageSettings &messages() const
|
||||
{
|
||||
return *messageSettings;
|
||||
}
|
||||
GameFiltersSettings &gameFilters() const
|
||||
[[nodiscard]] GameFiltersSettings &gameFilters() const
|
||||
{
|
||||
return *gameFiltersSettings;
|
||||
}
|
||||
LayoutsSettings &layouts() const
|
||||
[[nodiscard]] LayoutsSettings &layouts() const
|
||||
{
|
||||
return *layoutsSettings;
|
||||
}
|
||||
DownloadSettings &downloads() const
|
||||
[[nodiscard]] DownloadSettings &downloads() const
|
||||
{
|
||||
return *downloadSettings;
|
||||
}
|
||||
RecentsSettings &recents() const
|
||||
[[nodiscard]] RecentsSettings &recents() const
|
||||
{
|
||||
return *recentsSettings;
|
||||
}
|
||||
CardOverrideSettings &cardOverrides() const
|
||||
[[nodiscard]] CardOverrideSettings &cardOverrides() const
|
||||
{
|
||||
return *cardOverrideSettings;
|
||||
}
|
||||
DebugSettings &debug() const
|
||||
[[nodiscard]] DebugSettings &debug() const
|
||||
{
|
||||
return *debugSettings;
|
||||
}
|
||||
CardCounterSettings &cardCounters() const;
|
||||
[[nodiscard]] CardCounterSettings &cardCounters() const;
|
||||
|
||||
bool getIsPortableBuild() const
|
||||
[[nodiscard]] bool getIsPortableBuild() const
|
||||
{
|
||||
return isPortableBuild;
|
||||
}
|
||||
bool getDownloadSpoilersStatus() const
|
||||
[[nodiscard]] bool getDownloadSpoilersStatus() const
|
||||
{
|
||||
return mbDownloadSpoilers;
|
||||
}
|
||||
bool getRoundCardCorners() const
|
||||
[[nodiscard]] bool getRoundCardCorners() const
|
||||
{
|
||||
return roundCardCorners;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@ class CardCounterSettings : public SettingsManager
|
|||
public:
|
||||
CardCounterSettings(const QString &settingsPath, QObject *parent = nullptr);
|
||||
|
||||
QColor color(int counterId) const;
|
||||
[[nodiscard]] QColor color(int counterId) const;
|
||||
|
||||
QString displayName(int counterId) const;
|
||||
[[nodiscard]] QString displayName(int counterId) const;
|
||||
|
||||
public slots:
|
||||
void setColor(int counterId, const QColor &color);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public:
|
|||
explicit ShortcutFilterProxyModel(QObject *parent = nullptr);
|
||||
|
||||
protected:
|
||||
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
|
||||
[[nodiscard]] bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
|
||||
};
|
||||
|
||||
class ShortcutTreeView : public QTreeView
|
||||
|
|
|
|||
|
|
@ -100,11 +100,11 @@ public:
|
|||
{
|
||||
QList::operator=(_sequence);
|
||||
};
|
||||
QString getName() const
|
||||
[[nodiscard]] QString getName() const
|
||||
{
|
||||
return QApplication::translate("shortcutsTab", name.toUtf8().data());
|
||||
};
|
||||
QString getGroupName() const
|
||||
[[nodiscard]] QString getGroupName() const
|
||||
{
|
||||
return ShortcutGroup::getGroupName(group);
|
||||
};
|
||||
|
|
@ -120,13 +120,13 @@ class ShortcutsSettings : public QObject
|
|||
public:
|
||||
explicit ShortcutsSettings(const QString &settingsFilePath, QObject *parent = nullptr);
|
||||
|
||||
ShortcutKey getDefaultShortcut(const QString &name) const;
|
||||
ShortcutKey getShortcut(const QString &name) const;
|
||||
QKeySequence getSingleShortcut(const QString &name) const;
|
||||
QString getDefaultShortcutString(const QString &name) const;
|
||||
QString getShortcutString(const QString &name) const;
|
||||
QString getShortcutFriendlyName(const QString &shortcutName) const;
|
||||
QList<QString> getAllShortcutKeys() const
|
||||
[[nodiscard]] ShortcutKey getDefaultShortcut(const QString &name) const;
|
||||
[[nodiscard]] ShortcutKey getShortcut(const QString &name) const;
|
||||
[[nodiscard]] QKeySequence getSingleShortcut(const QString &name) const;
|
||||
[[nodiscard]] QString getDefaultShortcutString(const QString &name) const;
|
||||
[[nodiscard]] QString getShortcutString(const QString &name) const;
|
||||
[[nodiscard]] QString getShortcutFriendlyName(const QString &shortcutName) const;
|
||||
[[nodiscard]] QList<QString> getAllShortcutKeys() const
|
||||
{
|
||||
return shortCuts.keys();
|
||||
};
|
||||
|
|
@ -135,9 +135,9 @@ public:
|
|||
void setShortcuts(const QString &name, const QKeySequence &Sequence);
|
||||
void setShortcuts(const QString &name, const QString &sequences);
|
||||
|
||||
bool isKeyAllowed(const QString &name, const QString &sequences) const;
|
||||
bool isValid(const QString &name, const QString &sequences) const;
|
||||
QStringList findOverlaps(const QString &name, const QString &sequences) const;
|
||||
[[nodiscard]] bool isKeyAllowed(const QString &name, const QString &sequences) const;
|
||||
[[nodiscard]] bool isValid(const QString &name, const QString &sequences) const;
|
||||
[[nodiscard]] QStringList findOverlaps(const QString &name, const QString &sequences) const;
|
||||
|
||||
void resetAllShortcuts();
|
||||
void clearAllShortcuts();
|
||||
|
|
@ -152,8 +152,8 @@ private:
|
|||
QString settingsFilePath;
|
||||
QHash<QString, ShortcutKey> shortCuts;
|
||||
|
||||
QString stringifySequence(const QList<QKeySequence> &Sequence) const;
|
||||
QList<QKeySequence> parseSequenceString(const QString &stringSequence) const;
|
||||
[[nodiscard]] QString stringifySequence(const QList<QKeySequence> &Sequence) const;
|
||||
[[nodiscard]] QList<QKeySequence> parseSequenceString(const QString &stringSequence) const;
|
||||
|
||||
const QHash<QString, ShortcutKey> defaultShortCuts = {
|
||||
{"MainWindow/aCheckCardUpdates", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Check for Card Updates..."),
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@
|
|||
class SettingsCardPreferenceProvider : public ICardPreferenceProvider
|
||||
{
|
||||
public:
|
||||
QString getCardPreferenceOverride(const QString &cardName) const override
|
||||
[[nodiscard]] QString getCardPreferenceOverride(const QString &cardName) const override
|
||||
{
|
||||
return SettingsCache::instance().cardOverrides().getCardPreferenceOverride(cardName);
|
||||
}
|
||||
|
||||
bool getIncludeRebalancedCards() const override
|
||||
[[nodiscard]] bool getIncludeRebalancedCards() const override
|
||||
{
|
||||
return SettingsCache::instance().getIncludeRebalancedCards();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public:
|
|||
return filter(deck, info);
|
||||
}
|
||||
|
||||
bool valid() const
|
||||
[[nodiscard]] bool valid() const
|
||||
{
|
||||
return _error.isEmpty();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ public slots:
|
|||
void addFilter(const CardFilter *f);
|
||||
void removeFilter(const CardFilter *f);
|
||||
void clearFiltersOfType(CardFilter::Attr filterType);
|
||||
QList<const CardFilter *> getFiltersOfType(CardFilter::Attr filterType) const;
|
||||
QList<const CardFilter *> allFilters() const;
|
||||
[[nodiscard]] QList<const CardFilter *> getFiltersOfType(CardFilter::Attr filterType) const;
|
||||
[[nodiscard]] QList<const CardFilter *> allFilters() const;
|
||||
|
||||
private slots:
|
||||
void proxyBeginInsertRow(const FilterTreeNode *, int);
|
||||
|
|
@ -34,23 +34,23 @@ private slots:
|
|||
void proxyEndRemoveRow(const FilterTreeNode *, int);
|
||||
|
||||
private:
|
||||
FilterTreeNode *indexToNode(const QModelIndex &idx) const;
|
||||
[[nodiscard]] FilterTreeNode *indexToNode(const QModelIndex &idx) const;
|
||||
QModelIndex nodeIndex(const FilterTreeNode *node, int row, int column) const;
|
||||
|
||||
public:
|
||||
FilterTreeModel(QObject *parent = nullptr);
|
||||
~FilterTreeModel() override;
|
||||
FilterTree *filterTree() const
|
||||
[[nodiscard]] FilterTree *filterTree() const
|
||||
{
|
||||
return fTree;
|
||||
}
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex & /*parent*/ = QModelIndex()) const override;
|
||||
QVariant data(const QModelIndex &index, int role) const override;
|
||||
[[nodiscard]] int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
[[nodiscard]] int columnCount(const QModelIndex & /*parent*/ = QModelIndex()) const override;
|
||||
[[nodiscard]] QVariant data(const QModelIndex &index, int role) const override;
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||
QModelIndex parent(const QModelIndex &ind) const override;
|
||||
QModelIndex index(int row, int column, const QModelIndex &parent) const override;
|
||||
[[nodiscard]] Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||
[[nodiscard]] QModelIndex parent(const QModelIndex &ind) const override;
|
||||
[[nodiscard]] QModelIndex index(int row, int column, const QModelIndex &parent) const override;
|
||||
bool removeRows(int row, int count, const QModelIndex &parent) override;
|
||||
void clear();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ public:
|
|||
*
|
||||
* Uses a set of name variants and folder paths to attempt to locate the correct image.
|
||||
*/
|
||||
QImage tryLoad(const ExactCard &toLoad) const;
|
||||
[[nodiscard]] QImage tryLoad(const ExactCard &toLoad) const;
|
||||
|
||||
private:
|
||||
QString picsPath; ///< Path to standard card image folder
|
||||
|
|
@ -72,10 +72,10 @@ private:
|
|||
* Uses several filename patterns to match card images, in order from
|
||||
* most-specific to least-specific.
|
||||
*/
|
||||
QImage tryLoadCardImageFromDisk(const QString &setName,
|
||||
const QString &correctedCardName,
|
||||
const QString &collectorNumber,
|
||||
const QString &providerId) const;
|
||||
[[nodiscard]] QImage tryLoadCardImageFromDisk(const QString &setName,
|
||||
const QString &correctedCardName,
|
||||
const QString &collectorNumber,
|
||||
const QString &providerId) const;
|
||||
|
||||
private slots:
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public:
|
|||
DeckLoader(const DeckLoader &) = delete;
|
||||
DeckLoader &operator=(const DeckLoader &) = delete;
|
||||
|
||||
const QString &getLastFileName() const
|
||||
[[nodiscard]] const QString &getLastFileName() const
|
||||
{
|
||||
return lastFileName;
|
||||
}
|
||||
|
|
@ -64,16 +64,16 @@ public:
|
|||
{
|
||||
lastFileName = _lastFileName;
|
||||
}
|
||||
FileFormat getLastFileFormat() const
|
||||
[[nodiscard]] FileFormat getLastFileFormat() const
|
||||
{
|
||||
return lastFileFormat;
|
||||
}
|
||||
int getLastRemoteDeckId() const
|
||||
[[nodiscard]] int getLastRemoteDeckId() const
|
||||
{
|
||||
return lastRemoteDeckId;
|
||||
}
|
||||
|
||||
bool hasNotBeenLoaded() const
|
||||
[[nodiscard]] bool hasNotBeenLoaded() const
|
||||
{
|
||||
return getLastFileName().isEmpty() && getLastRemoteDeckId() == -1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@ public:
|
|||
~FlowLayout() override;
|
||||
void insertWidgetAtIndex(QWidget *toInsert, int index);
|
||||
|
||||
QSize calculateMinimumSizeHorizontal() const;
|
||||
QSize calculateSizeHintVertical() const;
|
||||
QSize calculateMinimumSizeVertical() const;
|
||||
[[nodiscard]] QSize calculateMinimumSizeHorizontal() const;
|
||||
[[nodiscard]] QSize calculateSizeHintVertical() const;
|
||||
[[nodiscard]] QSize calculateMinimumSizeVertical() const;
|
||||
void addItem(QLayoutItem *item) override;
|
||||
[[nodiscard]] int count() const override;
|
||||
[[nodiscard]] QLayoutItem *itemAt(int index) const override;
|
||||
|
|
@ -48,7 +48,7 @@ public:
|
|||
void layoutSingleColumn(const QVector<QLayoutItem *> &colItems, int x, int y);
|
||||
[[nodiscard]] QSize sizeHint() const override;
|
||||
[[nodiscard]] QSize minimumSize() const override;
|
||||
QSize calculateSizeHintHorizontal() const;
|
||||
[[nodiscard]] QSize calculateSizeHintHorizontal() const;
|
||||
|
||||
protected:
|
||||
QList<QLayoutItem *> items; // List to store layout items
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ private:
|
|||
QAction *aRemoveCard, *aIncrement, *aDecrement, *aSwapCard;
|
||||
|
||||
void recursiveExpand(const QModelIndex &index);
|
||||
QModelIndexList getSelectedCardNodes() const;
|
||||
[[nodiscard]] QModelIndexList getSelectedCardNodes() const;
|
||||
|
||||
private slots:
|
||||
void decklistCustomMenu(QPoint point);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public:
|
|||
explicit DialogConvertDeckToCodFormat(QWidget *parent);
|
||||
void retranslateUi();
|
||||
|
||||
bool dontAskAgain() const;
|
||||
[[nodiscard]] bool dontAskAgain() const;
|
||||
|
||||
private:
|
||||
QVBoxLayout *layout;
|
||||
|
|
|
|||
|
|
@ -20,11 +20,11 @@ class DlgEditPassword : public QDialog
|
|||
Q_OBJECT
|
||||
public:
|
||||
explicit DlgEditPassword(QWidget *parent = nullptr);
|
||||
QString getOldPassword() const
|
||||
[[nodiscard]] QString getOldPassword() const
|
||||
{
|
||||
return oldPasswordEdit->text();
|
||||
}
|
||||
QString getNewPassword() const
|
||||
[[nodiscard]] QString getNewPassword() const
|
||||
{
|
||||
return newPasswordEdit->text();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,32 +58,32 @@ public:
|
|||
const GamesProxyModel *_gamesProxyModel,
|
||||
QWidget *parent = nullptr);
|
||||
|
||||
bool getHideFullGames() const;
|
||||
bool getHideGamesThatStarted() const;
|
||||
bool getHidePasswordProtectedGames() const;
|
||||
[[nodiscard]] bool getHideFullGames() const;
|
||||
[[nodiscard]] bool getHideGamesThatStarted() const;
|
||||
[[nodiscard]] bool getHidePasswordProtectedGames() const;
|
||||
void setShowPasswordProtectedGames(bool _passwordProtectedGamesHidden);
|
||||
bool getHideBuddiesOnlyGames() const;
|
||||
[[nodiscard]] bool getHideBuddiesOnlyGames() const;
|
||||
void setHideBuddiesOnlyGames(bool _hideBuddiesOnlyGames);
|
||||
bool getHideOpenDecklistGames() const;
|
||||
[[nodiscard]] bool getHideOpenDecklistGames() const;
|
||||
void setHideOpenDecklistGames(bool _hideOpenDecklistGames);
|
||||
bool getHideIgnoredUserGames() const;
|
||||
[[nodiscard]] bool getHideIgnoredUserGames() const;
|
||||
void setHideIgnoredUserGames(bool _hideIgnoredUserGames);
|
||||
bool getHideNotBuddyCreatedGames() const;
|
||||
QString getGameNameFilter() const;
|
||||
[[nodiscard]] bool getHideNotBuddyCreatedGames() const;
|
||||
[[nodiscard]] QString getGameNameFilter() const;
|
||||
void setGameNameFilter(const QString &_gameNameFilter);
|
||||
QStringList getCreatorNameFilters() const;
|
||||
[[nodiscard]] QStringList getCreatorNameFilters() const;
|
||||
void setCreatorNameFilter(const QString &_creatorNameFilter);
|
||||
QSet<int> getGameTypeFilter() const;
|
||||
[[nodiscard]] QSet<int> getGameTypeFilter() const;
|
||||
void setGameTypeFilter(const QSet<int> &_gameTypeFilter);
|
||||
int getMaxPlayersFilterMin() const;
|
||||
int getMaxPlayersFilterMax() const;
|
||||
[[nodiscard]] int getMaxPlayersFilterMin() const;
|
||||
[[nodiscard]] int getMaxPlayersFilterMax() const;
|
||||
void setMaxPlayersFilter(int _maxPlayersFilterMin, int _maxPlayersFilterMax);
|
||||
QTime getMaxGameAge() const;
|
||||
[[nodiscard]] QTime getMaxGameAge() const;
|
||||
const QMap<QTime, QString> gameAgeMap;
|
||||
bool getShowOnlyIfSpectatorsCanWatch() const;
|
||||
bool getShowSpectatorPasswordProtected() const;
|
||||
bool getShowOnlyIfSpectatorsCanChat() const;
|
||||
bool getShowOnlyIfSpectatorsCanSeeHands() const;
|
||||
[[nodiscard]] bool getShowOnlyIfSpectatorsCanWatch() const;
|
||||
[[nodiscard]] bool getShowSpectatorPasswordProtected() const;
|
||||
[[nodiscard]] bool getShowOnlyIfSpectatorsCanChat() const;
|
||||
[[nodiscard]] bool getShowOnlyIfSpectatorsCanSeeHands() const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -20,15 +20,15 @@ class DlgForgotPasswordRequest : public QDialog
|
|||
Q_OBJECT
|
||||
public:
|
||||
explicit DlgForgotPasswordRequest(QWidget *parent = nullptr);
|
||||
QString getHost() const
|
||||
[[nodiscard]] QString getHost() const
|
||||
{
|
||||
return hostEdit->text();
|
||||
}
|
||||
int getPort() const
|
||||
[[nodiscard]] int getPort() const
|
||||
{
|
||||
return portEdit->text().toInt();
|
||||
}
|
||||
QString getPlayerName() const
|
||||
[[nodiscard]] QString getPlayerName() const
|
||||
{
|
||||
return playernameEdit->text();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,23 +20,23 @@ class DlgForgotPasswordReset : public QDialog
|
|||
Q_OBJECT
|
||||
public:
|
||||
explicit DlgForgotPasswordReset(QWidget *parent = nullptr);
|
||||
QString getHost() const
|
||||
[[nodiscard]] QString getHost() const
|
||||
{
|
||||
return hostEdit->text();
|
||||
}
|
||||
int getPort() const
|
||||
[[nodiscard]] int getPort() const
|
||||
{
|
||||
return portEdit->text().toInt();
|
||||
}
|
||||
QString getPlayerName() const
|
||||
[[nodiscard]] QString getPlayerName() const
|
||||
{
|
||||
return playernameEdit->text();
|
||||
}
|
||||
QString getToken() const
|
||||
[[nodiscard]] QString getToken() const
|
||||
{
|
||||
return tokenEdit->text();
|
||||
}
|
||||
QString getPassword() const
|
||||
[[nodiscard]] QString getPassword() const
|
||||
{
|
||||
return newpasswordEdit->text();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,31 +20,31 @@ class DlgRegister : public QDialog
|
|||
Q_OBJECT
|
||||
public:
|
||||
explicit DlgRegister(QWidget *parent = nullptr);
|
||||
QString getHost() const
|
||||
[[nodiscard]] QString getHost() const
|
||||
{
|
||||
return hostEdit->text();
|
||||
}
|
||||
int getPort() const
|
||||
[[nodiscard]] int getPort() const
|
||||
{
|
||||
return portEdit->text().toInt();
|
||||
}
|
||||
QString getPlayerName() const
|
||||
[[nodiscard]] QString getPlayerName() const
|
||||
{
|
||||
return playernameEdit->text();
|
||||
}
|
||||
QString getPassword() const
|
||||
[[nodiscard]] QString getPassword() const
|
||||
{
|
||||
return passwordEdit->text();
|
||||
}
|
||||
QString getEmail() const
|
||||
[[nodiscard]] QString getEmail() const
|
||||
{
|
||||
return emailEdit->text();
|
||||
}
|
||||
QString getCountry() const
|
||||
[[nodiscard]] QString getCountry() const
|
||||
{
|
||||
return countryEdit->currentIndex() == 0 ? "" : countryEdit->currentText();
|
||||
}
|
||||
QString getRealName() const
|
||||
[[nodiscard]] QString getRealName() const
|
||||
{
|
||||
return realnameEdit->text();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,19 +14,19 @@ class TipOfTheDay
|
|||
{
|
||||
public:
|
||||
explicit TipOfTheDay(QString _title, QString _content, QString _imagePath, QDate _date);
|
||||
QString getTitle() const
|
||||
[[nodiscard]] QString getTitle() const
|
||||
{
|
||||
return title;
|
||||
}
|
||||
QString getContent() const
|
||||
[[nodiscard]] QString getContent() const
|
||||
{
|
||||
return content;
|
||||
}
|
||||
QString getImagePath() const
|
||||
[[nodiscard]] QString getImagePath() const
|
||||
{
|
||||
return imagePath;
|
||||
}
|
||||
QDate getDate() const
|
||||
[[nodiscard]] QDate getDate() const
|
||||
{
|
||||
return date;
|
||||
}
|
||||
|
|
@ -51,8 +51,8 @@ public:
|
|||
explicit TipsOfTheDay(QString xmlPath, QObject *parent = nullptr);
|
||||
~TipsOfTheDay() override;
|
||||
TipOfTheDay getTip(int tipId);
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
QVariant data(const QModelIndex &index, int role) const override;
|
||||
[[nodiscard]] int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
[[nodiscard]] QVariant data(const QModelIndex &index, int role) const override;
|
||||
|
||||
private:
|
||||
QList<TipOfTheDay> *tipList;
|
||||
|
|
|
|||
|
|
@ -60,10 +60,10 @@ public:
|
|||
|
||||
explicit ReplayTimelineWidget(QWidget *parent = nullptr);
|
||||
void setTimeline(const QList<int> &_replayTimeline);
|
||||
QSize sizeHint() const override;
|
||||
QSize minimumSizeHint() const override;
|
||||
[[nodiscard]] QSize sizeHint() const override;
|
||||
[[nodiscard]] QSize minimumSizeHint() const override;
|
||||
void setTimeScaleFactor(qreal _timeScaleFactor);
|
||||
int getCurrentEvent() const
|
||||
[[nodiscard]] int getCurrentEvent() const
|
||||
{
|
||||
return currentEvent;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,19 +42,20 @@ public:
|
|||
*/
|
||||
GamesModel(const QMap<int, QString> &_rooms, const QMap<int, GameTypeMap> &_gameTypes, QObject *parent = nullptr);
|
||||
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override
|
||||
[[nodiscard]] int rowCount(const QModelIndex &parent = QModelIndex()) const override
|
||||
{
|
||||
return parent.isValid() ? 0 : gameList.size();
|
||||
}
|
||||
|
||||
int columnCount(const QModelIndex & /*parent*/ = QModelIndex()) const override
|
||||
[[nodiscard]] int columnCount(const QModelIndex & /*parent*/ = QModelIndex()) const override
|
||||
{
|
||||
return NUM_COLS;
|
||||
}
|
||||
|
||||
QVariant data(const QModelIndex &index, int role) const override;
|
||||
[[nodiscard]] QVariant data(const QModelIndex &index, int role) const override;
|
||||
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
[[nodiscard]] QVariant
|
||||
headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
|
||||
/**
|
||||
* @brief Formats the game creation time into a human-readable string.
|
||||
|
|
@ -148,71 +149,71 @@ public:
|
|||
explicit GamesProxyModel(QObject *parent = nullptr, const UserListProxy *_userListProxy = nullptr);
|
||||
|
||||
// Getters for filter parameters
|
||||
bool getHideBuddiesOnlyGames() const
|
||||
[[nodiscard]] bool getHideBuddiesOnlyGames() const
|
||||
{
|
||||
return hideBuddiesOnlyGames;
|
||||
}
|
||||
bool getHideIgnoredUserGames() const
|
||||
[[nodiscard]] bool getHideIgnoredUserGames() const
|
||||
{
|
||||
return hideIgnoredUserGames;
|
||||
}
|
||||
bool getHideFullGames() const
|
||||
[[nodiscard]] bool getHideFullGames() const
|
||||
{
|
||||
return hideFullGames;
|
||||
}
|
||||
bool getHideGamesThatStarted() const
|
||||
[[nodiscard]] bool getHideGamesThatStarted() const
|
||||
{
|
||||
return hideGamesThatStarted;
|
||||
}
|
||||
bool getHidePasswordProtectedGames() const
|
||||
[[nodiscard]] bool getHidePasswordProtectedGames() const
|
||||
{
|
||||
return hidePasswordProtectedGames;
|
||||
}
|
||||
bool getHideNotBuddyCreatedGames() const
|
||||
[[nodiscard]] bool getHideNotBuddyCreatedGames() const
|
||||
{
|
||||
return hideNotBuddyCreatedGames;
|
||||
}
|
||||
bool getHideOpenDecklistGames() const
|
||||
[[nodiscard]] bool getHideOpenDecklistGames() const
|
||||
{
|
||||
return hideOpenDecklistGames;
|
||||
}
|
||||
QString getGameNameFilter() const
|
||||
[[nodiscard]] QString getGameNameFilter() const
|
||||
{
|
||||
return gameNameFilter;
|
||||
}
|
||||
QStringList getCreatorNameFilters() const
|
||||
[[nodiscard]] QStringList getCreatorNameFilters() const
|
||||
{
|
||||
return creatorNameFilters;
|
||||
}
|
||||
QSet<int> getGameTypeFilter() const
|
||||
[[nodiscard]] QSet<int> getGameTypeFilter() const
|
||||
{
|
||||
return gameTypeFilter;
|
||||
}
|
||||
int getMaxPlayersFilterMin() const
|
||||
[[nodiscard]] int getMaxPlayersFilterMin() const
|
||||
{
|
||||
return maxPlayersFilterMin;
|
||||
}
|
||||
int getMaxPlayersFilterMax() const
|
||||
[[nodiscard]] int getMaxPlayersFilterMax() const
|
||||
{
|
||||
return maxPlayersFilterMax;
|
||||
}
|
||||
const QTime &getMaxGameAge() const
|
||||
[[nodiscard]] const QTime &getMaxGameAge() const
|
||||
{
|
||||
return maxGameAge;
|
||||
}
|
||||
bool getShowOnlyIfSpectatorsCanWatch() const
|
||||
[[nodiscard]] bool getShowOnlyIfSpectatorsCanWatch() const
|
||||
{
|
||||
return showOnlyIfSpectatorsCanWatch;
|
||||
}
|
||||
bool getShowSpectatorPasswordProtected() const
|
||||
[[nodiscard]] bool getShowSpectatorPasswordProtected() const
|
||||
{
|
||||
return showSpectatorPasswordProtected;
|
||||
}
|
||||
bool getShowOnlyIfSpectatorsCanChat() const
|
||||
[[nodiscard]] bool getShowOnlyIfSpectatorsCanChat() const
|
||||
{
|
||||
return showOnlyIfSpectatorsCanChat;
|
||||
}
|
||||
bool getShowOnlyIfSpectatorsCanSeeHands() const
|
||||
[[nodiscard]] bool getShowOnlyIfSpectatorsCanSeeHands() const
|
||||
{
|
||||
return showOnlyIfSpectatorsCanSeeHands;
|
||||
}
|
||||
|
|
@ -328,7 +329,7 @@ public:
|
|||
/**
|
||||
* @brief Returns the number of games filtered out by the current filter.
|
||||
*/
|
||||
int getNumFilteredGames() const;
|
||||
[[nodiscard]] int getNumFilteredGames() const;
|
||||
|
||||
/**
|
||||
* @brief Resets all filter parameters to default values.
|
||||
|
|
@ -338,7 +339,7 @@ public:
|
|||
/**
|
||||
* @brief Returns true if all filter parameters are set to their defaults.
|
||||
*/
|
||||
bool areFilterParametersSetToDefaults() const;
|
||||
[[nodiscard]] bool areFilterParametersSetToDefaults() const;
|
||||
|
||||
/**
|
||||
* @brief Loads filter parameters from persistent settings.
|
||||
|
|
@ -358,8 +359,8 @@ public:
|
|||
void refresh();
|
||||
|
||||
protected:
|
||||
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
|
||||
bool filterAcceptsRow(int sourceRow) const;
|
||||
[[nodiscard]] bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
|
||||
[[nodiscard]] bool filterAcceptsRow(int sourceRow) const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -34,11 +34,11 @@ public:
|
|||
{
|
||||
}
|
||||
virtual ~Node() = default;
|
||||
DirectoryNode *getParent() const
|
||||
[[nodiscard]] DirectoryNode *getParent() const
|
||||
{
|
||||
return parent;
|
||||
}
|
||||
QString getName() const
|
||||
[[nodiscard]] QString getName() const
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
|
@ -49,9 +49,9 @@ public:
|
|||
explicit DirectoryNode(const QString &_name = QString(), DirectoryNode *_parent = nullptr);
|
||||
~DirectoryNode() override;
|
||||
void clearTree();
|
||||
QString getPath() const;
|
||||
[[nodiscard]] QString getPath() const;
|
||||
DirectoryNode *getNodeByPath(QStringList path);
|
||||
FileNode *getNodeById(int id) const;
|
||||
[[nodiscard]] FileNode *getNodeById(int id) const;
|
||||
};
|
||||
class FileNode : public Node
|
||||
{
|
||||
|
|
@ -64,17 +64,17 @@ public:
|
|||
: Node(_name, _parent), id(_id), uploadTime(_uploadTime)
|
||||
{
|
||||
}
|
||||
int getId() const
|
||||
[[nodiscard]] int getId() const
|
||||
{
|
||||
return id;
|
||||
}
|
||||
QDateTime getUploadTime() const
|
||||
[[nodiscard]] QDateTime getUploadTime() const
|
||||
{
|
||||
return uploadTime;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T> T getNode(const QModelIndex &index) const
|
||||
template <typename T> [[nodiscard]] T getNode(const QModelIndex &index) const
|
||||
{
|
||||
if (!index.isValid())
|
||||
return dynamic_cast<T>(root);
|
||||
|
|
@ -96,15 +96,16 @@ private slots:
|
|||
public:
|
||||
explicit RemoteDeckList_TreeModel(AbstractClient *_client, QObject *parent = nullptr);
|
||||
~RemoteDeckList_TreeModel() override;
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex & /*parent*/ = QModelIndex()) const override;
|
||||
QVariant data(const QModelIndex &index, int role) const override;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
|
||||
QModelIndex parent(const QModelIndex &index) const override;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||
[[nodiscard]] int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
[[nodiscard]] int columnCount(const QModelIndex & /*parent*/ = QModelIndex()) const override;
|
||||
[[nodiscard]] QVariant data(const QModelIndex &index, int role) const override;
|
||||
[[nodiscard]] QVariant
|
||||
headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
[[nodiscard]] QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
|
||||
[[nodiscard]] QModelIndex parent(const QModelIndex &index) const override;
|
||||
[[nodiscard]] Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||
|
||||
DirectoryNode *getRoot() const
|
||||
[[nodiscard]] DirectoryNode *getRoot() const
|
||||
{
|
||||
return root;
|
||||
}
|
||||
|
|
@ -124,11 +125,11 @@ private:
|
|||
|
||||
public:
|
||||
explicit RemoteDeckList_TreeWidget(AbstractClient *_client, QWidget *parent = nullptr);
|
||||
RemoteDeckList_TreeModel::Node *getNode(const QModelIndex &ind) const;
|
||||
RemoteDeckList_TreeModel::Node *getCurrentItem() const;
|
||||
QList<RemoteDeckList_TreeModel::Node *> getCurrentSelection() const;
|
||||
RemoteDeckList_TreeModel::DirectoryNode *getNodeByPath(const QString &path) const;
|
||||
RemoteDeckList_TreeModel::FileNode *getNodeById(int id) const;
|
||||
[[nodiscard]] RemoteDeckList_TreeModel::Node *getNode(const QModelIndex &ind) const;
|
||||
[[nodiscard]] RemoteDeckList_TreeModel::Node *getCurrentItem() const;
|
||||
[[nodiscard]] QList<RemoteDeckList_TreeModel::Node *> getCurrentSelection() const;
|
||||
[[nodiscard]] RemoteDeckList_TreeModel::DirectoryNode *getNodeByPath(const QString &path) const;
|
||||
[[nodiscard]] RemoteDeckList_TreeModel::FileNode *getNodeById(int id) const;
|
||||
void addFileToTree(const ServerInfo_DeckStorage_TreeItem &file, RemoteDeckList_TreeModel::DirectoryNode *parent);
|
||||
void addFolderToTree(const ServerInfo_DeckStorage_TreeItem &folder,
|
||||
RemoteDeckList_TreeModel::DirectoryNode *parent);
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ private:
|
|||
{
|
||||
}
|
||||
virtual ~Node() = default;
|
||||
QString getName() const
|
||||
[[nodiscard]] QString getName() const
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
|
@ -91,21 +91,22 @@ private slots:
|
|||
public:
|
||||
explicit RemoteReplayList_TreeModel(AbstractClient *_client, QObject *parent = nullptr);
|
||||
~RemoteReplayList_TreeModel() override;
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex & /*parent*/ = QModelIndex()) const override
|
||||
[[nodiscard]] int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
[[nodiscard]] int columnCount(const QModelIndex & /*parent*/ = QModelIndex()) const override
|
||||
{
|
||||
return numberOfColumns;
|
||||
}
|
||||
QVariant data(const QModelIndex &index, int role) const override;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
|
||||
QModelIndex parent(const QModelIndex &index) const override;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||
[[nodiscard]] QVariant data(const QModelIndex &index, int role) const override;
|
||||
[[nodiscard]] QVariant
|
||||
headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
[[nodiscard]] QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
|
||||
[[nodiscard]] QModelIndex parent(const QModelIndex &index) const override;
|
||||
[[nodiscard]] Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||
void clearTree();
|
||||
void refreshTree();
|
||||
ServerInfo_Replay const *getReplay(const QModelIndex &index) const;
|
||||
ServerInfo_ReplayMatch const *getReplayMatch(const QModelIndex &index) const;
|
||||
ServerInfo_ReplayMatch const *getEnclosingReplayMatch(const QModelIndex &index) const;
|
||||
[[nodiscard]] ServerInfo_Replay const *getReplay(const QModelIndex &index) const;
|
||||
[[nodiscard]] ServerInfo_ReplayMatch const *getReplayMatch(const QModelIndex &index) const;
|
||||
[[nodiscard]] ServerInfo_ReplayMatch const *getEnclosingReplayMatch(const QModelIndex &index) const;
|
||||
void addMatchInfo(const ServerInfo_ReplayMatch &matchInfo);
|
||||
void updateMatchInfo(int gameId, const ServerInfo_ReplayMatch &matchInfo);
|
||||
void removeMatchInfo(int gameId);
|
||||
|
|
@ -119,10 +120,10 @@ private:
|
|||
|
||||
public:
|
||||
explicit RemoteReplayList_TreeWidget(AbstractClient *_client, QWidget *parent = nullptr);
|
||||
ServerInfo_Replay const *getReplay(const QModelIndex &ind) const;
|
||||
ServerInfo_ReplayMatch const *getReplayMatch(const QModelIndex &ind) const;
|
||||
QList<ServerInfo_Replay const *> getSelectedReplays() const;
|
||||
QSet<ServerInfo_ReplayMatch const *> getSelectedReplayMatches() const;
|
||||
[[nodiscard]] ServerInfo_Replay const *getReplay(const QModelIndex &ind) const;
|
||||
[[nodiscard]] ServerInfo_ReplayMatch const *getReplayMatch(const QModelIndex &ind) const;
|
||||
[[nodiscard]] QList<ServerInfo_Replay const *> getSelectedReplays() const;
|
||||
[[nodiscard]] QSet<ServerInfo_ReplayMatch const *> getSelectedReplayMatches() const;
|
||||
void clearTree()
|
||||
{
|
||||
treeModel->clearTree();
|
||||
|
|
|
|||
|
|
@ -30,31 +30,31 @@ private:
|
|||
public:
|
||||
UserConnection_Information();
|
||||
UserConnection_Information(QString, QString, QString, QString, QString, bool, QString);
|
||||
QString getSaveName() const
|
||||
[[nodiscard]] QString getSaveName() const
|
||||
{
|
||||
return saveName;
|
||||
}
|
||||
QString getServer() const
|
||||
[[nodiscard]] QString getServer() const
|
||||
{
|
||||
return server;
|
||||
}
|
||||
QString getPort() const
|
||||
[[nodiscard]] QString getPort() const
|
||||
{
|
||||
return port;
|
||||
}
|
||||
QString getUsername() const
|
||||
[[nodiscard]] QString getUsername() const
|
||||
{
|
||||
return username;
|
||||
}
|
||||
QString getPassword() const
|
||||
[[nodiscard]] QString getPassword() const
|
||||
{
|
||||
return password;
|
||||
}
|
||||
bool getSavePassword() const
|
||||
[[nodiscard]] bool getSavePassword() const
|
||||
{
|
||||
return savePassword;
|
||||
}
|
||||
QString getSite() const
|
||||
[[nodiscard]] QString getSite() const
|
||||
{
|
||||
return site;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,11 +60,11 @@ public:
|
|||
return ignoredUsers;
|
||||
}
|
||||
|
||||
bool isOwnUserRegistered() const override;
|
||||
QString getOwnUsername() const override;
|
||||
bool isUserBuddy(const QString &userName) const override;
|
||||
bool isUserIgnored(const QString &userName) const override;
|
||||
const ServerInfo_User *getOnlineUser(const QString &userName) const override;
|
||||
[[nodiscard]] bool isOwnUserRegistered() const override;
|
||||
[[nodiscard]] QString getOwnUsername() const override;
|
||||
[[nodiscard]] bool isUserBuddy(const QString &userName) const override;
|
||||
[[nodiscard]] bool isUserIgnored(const QString &userName) const override;
|
||||
[[nodiscard]] const ServerInfo_User *getOnlineUser(const QString &userName) const override;
|
||||
|
||||
public slots:
|
||||
void handleConnect();
|
||||
|
|
|
|||
|
|
@ -45,13 +45,13 @@ private slots:
|
|||
|
||||
public:
|
||||
explicit BanDialog(const ServerInfo_User &info, QWidget *parent = nullptr);
|
||||
QString getBanName() const;
|
||||
QString getBanIP() const;
|
||||
QString getBanId() const;
|
||||
int getMinutes() const;
|
||||
QString getReason() const;
|
||||
QString getVisibleReason() const;
|
||||
int getDeleteMessages() const;
|
||||
[[nodiscard]] QString getBanName() const;
|
||||
[[nodiscard]] QString getBanIP() const;
|
||||
[[nodiscard]] QString getBanId() const;
|
||||
[[nodiscard]] int getMinutes() const;
|
||||
[[nodiscard]] QString getReason() const;
|
||||
[[nodiscard]] QString getVisibleReason() const;
|
||||
[[nodiscard]] int getDeleteMessages() const;
|
||||
};
|
||||
|
||||
class WarningDialog : public QDialog
|
||||
|
|
@ -68,10 +68,10 @@ private slots:
|
|||
|
||||
public:
|
||||
WarningDialog(const QString userName, const QString clientID, QWidget *parent = nullptr);
|
||||
QString getName() const;
|
||||
QString getWarnID() const;
|
||||
QString getReason() const;
|
||||
int getDeleteMessages() const;
|
||||
[[nodiscard]] QString getName() const;
|
||||
[[nodiscard]] QString getWarnID() const;
|
||||
[[nodiscard]] QString getReason() const;
|
||||
[[nodiscard]] int getDeleteMessages() const;
|
||||
void addWarningOption(const QString warning);
|
||||
};
|
||||
|
||||
|
|
@ -85,11 +85,11 @@ private:
|
|||
|
||||
public:
|
||||
explicit AdminNotesDialog(const QString &_userName, const QString &_notes, QWidget *_parent = nullptr);
|
||||
QString getName() const
|
||||
[[nodiscard]] QString getName() const
|
||||
{
|
||||
return userName;
|
||||
}
|
||||
QString getNotes() const;
|
||||
[[nodiscard]] QString getNotes() const;
|
||||
};
|
||||
|
||||
class UserListItemDelegate : public QStyledItemDelegate
|
||||
|
|
@ -159,7 +159,7 @@ public:
|
|||
void processUserInfo(const ServerInfo_User &user, bool online);
|
||||
bool deleteUser(const QString &userName);
|
||||
void setUserOnline(const QString &userName, bool online);
|
||||
const QMap<QString, UserListTWI *> &getUsers() const
|
||||
[[nodiscard]] const QMap<QString, UserListTWI *> &getUsers() const
|
||||
{
|
||||
return users;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,27 +29,27 @@ public:
|
|||
void debugPrint() const;
|
||||
|
||||
// Getter methods for deck container
|
||||
const QString &getDescription() const
|
||||
[[nodiscard]] const QString &getDescription() const
|
||||
{
|
||||
return description;
|
||||
}
|
||||
const QVector<QJsonObject> &getBreadcrumb() const
|
||||
[[nodiscard]] const QVector<QJsonObject> &getBreadcrumb() const
|
||||
{
|
||||
return breadcrumb;
|
||||
}
|
||||
const EdhrecCommanderApiResponseCommanderDetails &getCommanderDetails() const
|
||||
[[nodiscard]] const EdhrecCommanderApiResponseCommanderDetails &getCommanderDetails() const
|
||||
{
|
||||
return card;
|
||||
}
|
||||
const QVector<EdhrecApiResponseCardList> &getCardlists() const
|
||||
[[nodiscard]] const QVector<EdhrecApiResponseCardList> &getCardlists() const
|
||||
{
|
||||
return cardlists;
|
||||
}
|
||||
const QString &getKeywords() const
|
||||
[[nodiscard]] const QString &getKeywords() const
|
||||
{
|
||||
return keywords;
|
||||
}
|
||||
const QString &getTitle() const
|
||||
[[nodiscard]] const QString &getTitle() const
|
||||
{
|
||||
return title;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,119 +27,119 @@ public:
|
|||
void debugPrint() const;
|
||||
|
||||
// Getters for the card data
|
||||
const QString &getAetherhubUri() const
|
||||
[[nodiscard]] const QString &getAetherhubUri() const
|
||||
{
|
||||
return aetherhubUri;
|
||||
}
|
||||
const QString &getArchidektUri() const
|
||||
[[nodiscard]] const QString &getArchidektUri() const
|
||||
{
|
||||
return archidektUri;
|
||||
}
|
||||
int getCmc() const
|
||||
[[nodiscard]] int getCmc() const
|
||||
{
|
||||
return cmc;
|
||||
}
|
||||
const QJsonArray &getColorIdentity() const
|
||||
[[nodiscard]] const QJsonArray &getColorIdentity() const
|
||||
{
|
||||
return colorIdentity;
|
||||
}
|
||||
bool isCombos() const
|
||||
[[nodiscard]] bool isCombos() const
|
||||
{
|
||||
return combos;
|
||||
}
|
||||
const QString &getDeckstatsUri() const
|
||||
[[nodiscard]] const QString &getDeckstatsUri() const
|
||||
{
|
||||
return deckstatsUri;
|
||||
}
|
||||
const QVector<QString> &getImageUris() const
|
||||
[[nodiscard]] const QVector<QString> &getImageUris() const
|
||||
{
|
||||
return imageUris;
|
||||
}
|
||||
int getInclusion() const
|
||||
[[nodiscard]] int getInclusion() const
|
||||
{
|
||||
return inclusion;
|
||||
}
|
||||
bool getIsCommander() const
|
||||
[[nodiscard]] bool getIsCommander() const
|
||||
{
|
||||
return isCommander;
|
||||
}
|
||||
const QString &getLabel() const
|
||||
[[nodiscard]] const QString &getLabel() const
|
||||
{
|
||||
return label;
|
||||
}
|
||||
const QString &getLayout() const
|
||||
[[nodiscard]] const QString &getLayout() const
|
||||
{
|
||||
return layout;
|
||||
}
|
||||
bool getLegalCommander() const
|
||||
[[nodiscard]] bool getLegalCommander() const
|
||||
{
|
||||
return legalCommander;
|
||||
}
|
||||
const QString &getMoxfieldUri() const
|
||||
[[nodiscard]] const QString &getMoxfieldUri() const
|
||||
{
|
||||
return moxfieldUri;
|
||||
}
|
||||
const QString &getMtggoldfishUri() const
|
||||
[[nodiscard]] const QString &getMtggoldfishUri() const
|
||||
{
|
||||
return mtggoldfishUri;
|
||||
}
|
||||
const QString &getName() const
|
||||
[[nodiscard]] const QString &getName() const
|
||||
{
|
||||
return name;
|
||||
}
|
||||
const QJsonArray &getNames() const
|
||||
[[nodiscard]] const QJsonArray &getNames() const
|
||||
{
|
||||
return names;
|
||||
}
|
||||
int getNumDecks() const
|
||||
[[nodiscard]] int getNumDecks() const
|
||||
{
|
||||
return numDecks;
|
||||
}
|
||||
int getPotentialDecks() const
|
||||
[[nodiscard]] int getPotentialDecks() const
|
||||
{
|
||||
return potentialDecks;
|
||||
}
|
||||
const QString &getPrecon() const
|
||||
[[nodiscard]] const QString &getPrecon() const
|
||||
{
|
||||
return precon;
|
||||
}
|
||||
const CardPrices &getPrices() const
|
||||
[[nodiscard]] const CardPrices &getPrices() const
|
||||
{
|
||||
return prices;
|
||||
}
|
||||
const QString &getPrimaryType() const
|
||||
[[nodiscard]] const QString &getPrimaryType() const
|
||||
{
|
||||
return primaryType;
|
||||
}
|
||||
const QString &getRarity() const
|
||||
[[nodiscard]] const QString &getRarity() const
|
||||
{
|
||||
return rarity;
|
||||
}
|
||||
double getSalt() const
|
||||
[[nodiscard]] double getSalt() const
|
||||
{
|
||||
return salt;
|
||||
}
|
||||
const QString &getSanitized() const
|
||||
[[nodiscard]] const QString &getSanitized() const
|
||||
{
|
||||
return sanitized;
|
||||
}
|
||||
const QString &getSanitizedWo() const
|
||||
[[nodiscard]] const QString &getSanitizedWo() const
|
||||
{
|
||||
return sanitizedWo;
|
||||
}
|
||||
const QString &getScryfallUri() const
|
||||
[[nodiscard]] const QString &getScryfallUri() const
|
||||
{
|
||||
return scryfallUri;
|
||||
}
|
||||
const QString &getSpellbookUri() const
|
||||
[[nodiscard]] const QString &getSpellbookUri() const
|
||||
{
|
||||
return spellbookUri;
|
||||
}
|
||||
const QString &getType() const
|
||||
[[nodiscard]] const QString &getType() const
|
||||
{
|
||||
return type;
|
||||
}
|
||||
const QString &getUrl() const
|
||||
[[nodiscard]] const QString &getUrl() const
|
||||
{
|
||||
return url;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,13 +27,13 @@ public:
|
|||
|
||||
void retranslateUi() override;
|
||||
void doSearch();
|
||||
QString getTabText() const override
|
||||
[[nodiscard]] QString getTabText() const override
|
||||
{
|
||||
auto cardName = cardToQuery.isNull() ? QString() : cardToQuery->getName();
|
||||
return tr("EDHRec: ") + cardName;
|
||||
}
|
||||
|
||||
CardSizeWidget *getCardSizeSlider()
|
||||
CardSizeWidget *getCardSizeSlider() const
|
||||
{
|
||||
return cardSizeSlider;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,15 +39,15 @@ private:
|
|||
|
||||
public:
|
||||
explicit Tab(TabSupervisor *_tabSupervisor);
|
||||
const QList<QMenu *> &getTabMenus() const
|
||||
[[nodiscard]] const QList<QMenu *> &getTabMenus() const
|
||||
{
|
||||
return tabMenus;
|
||||
}
|
||||
TabSupervisor *getTabSupervisor() const
|
||||
[[nodiscard]] TabSupervisor *getTabSupervisor() const
|
||||
{
|
||||
return tabSupervisor;
|
||||
}
|
||||
bool getContentsChanged() const
|
||||
[[nodiscard]] bool getContentsChanged() const
|
||||
{
|
||||
return contentsChanged;
|
||||
}
|
||||
|
|
@ -55,7 +55,7 @@ public:
|
|||
{
|
||||
contentsChanged = _contentsChanged;
|
||||
}
|
||||
virtual QString getTabText() const = 0;
|
||||
[[nodiscard]] virtual QString getTabText() const = 0;
|
||||
virtual void retranslateUi() = 0;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ private:
|
|||
public:
|
||||
TabHome(TabSupervisor *_tabSupervisor, AbstractClient *_client);
|
||||
void retranslateUi() override;
|
||||
QString getTabText() const override
|
||||
[[nodiscard]] QString getTabText() const override
|
||||
{
|
||||
return tr("Home");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ public:
|
|||
~TabMessage() override;
|
||||
void retranslateUi() override;
|
||||
void tabActivated() override;
|
||||
QString getUserName() const;
|
||||
QString getTabText() const override;
|
||||
[[nodiscard]] QString getUserName() const;
|
||||
[[nodiscard]] QString getTabText() const override;
|
||||
|
||||
void processUserMessageEvent(const Event_UserMessage &event);
|
||||
|
||||
|
|
|
|||
|
|
@ -30,12 +30,12 @@ public:
|
|||
* @param tagName The name of the tag to display.
|
||||
*/
|
||||
explicit DeckPreviewTagDisplayWidget(QWidget *parent = nullptr, const QString &tagName = "");
|
||||
QSize sizeHint() const override;
|
||||
QString getTagName() const
|
||||
[[nodiscard]] QSize sizeHint() const override;
|
||||
[[nodiscard]] QString getTagName() const
|
||||
{
|
||||
return tagName;
|
||||
}
|
||||
TagState getState() const
|
||||
[[nodiscard]] TagState getState() const
|
||||
{
|
||||
return state;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue