mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-13 01:24:46 -07:00
Major Directory Refactoring (#5118)
* refactored cardzone.cpp, added doc and changed if to switch case * started moving every files into different folders * remove undercase to match with other files naming convention * refactored dialog files * ran format.sh * refactored client/tabs folder * refactored client/tabs folder * refactored client/tabs folder * refactored client folder * refactored carddbparser * refactored dialogs * Create sonar-project.properties temporary file for lint * Create build.yml temporary file for lint * removed all files from root directory * removed all files from root directory * added current branch to workflow * fixed most broken import * fixed issues while renaming files * fixed oracle importer * fixed dbconverter * updated translations * made sub-folders for client * removed linter * removed linter folder * fixed oracle import * revert card_zone documentation * renamed db parser files name and deck_view imports * fixed dlg file issue * ran format file and fixed test file * fixed carddb test files * moved player folder in game * updated translations and format files * fixed peglib import * format cmake files * removing vcpkg to try to add it back later * tried fixing vcpkg file * renamed filter to filters and moved database parser to cards folder * reverted translation files * reverted oracle translated * Update cockatrice/src/dialogs/dlg_register.cpp Co-authored-by: tooomm <tooomm@users.noreply.github.com> * Update cockatrice/src/client/ui/window_main.cpp Co-authored-by: tooomm <tooomm@users.noreply.github.com> * removed empty line at file start * removed useless include from tab_supervisor.cpp * refactored cardzone.cpp, added doc and changed if to switch case * started moving every files into different folders * remove undercase to match with other files naming convention * refactored dialog files * ran format.sh * refactored client/tabs folder * refactored client folder * refactored carddbparser * refactored dialogs * removed all files from root directory * Create sonar-project.properties temporary file for lint * Create build.yml temporary file for lint * added current branch to workflow * fixed most broken import * fixed issues while renaming files * fixed oracle importer * fixed dbconverter * updated translations * made sub-folders for client * removed linter * removed linter folder * fixed oracle import * revert card_zone documentation * renamed db parser files name and deck_view imports * fixed dlg file issue * ran format file and fixed test file * fixed carddb test files * moved player folder in game * updated translations and format files * fixed peglib import * reverted translation files * format cmake files * removing vcpkg to try to add it back later * tried fixing vcpkg file * pre-updating of cockatrice changes * removed empty line at file start * reverted oracle translated * Update cockatrice/src/dialogs/dlg_register.cpp Co-authored-by: tooomm <tooomm@users.noreply.github.com> * Update cockatrice/src/client/ui/window_main.cpp Co-authored-by: tooomm <tooomm@users.noreply.github.com> * removed useless include from tab_supervisor.cpp --------- Co-authored-by: tooomm <tooomm@users.noreply.github.com>
This commit is contained in:
parent
d1e0f9dfc5
commit
fa999880ee
261 changed files with 735 additions and 729 deletions
1057
cockatrice/src/settings/cache_settings.cpp
Normal file
1057
cockatrice/src/settings/cache_settings.cpp
Normal file
File diff suppressed because it is too large
Load diff
579
cockatrice/src/settings/cache_settings.h
Normal file
579
cockatrice/src/settings/cache_settings.h
Normal file
|
|
@ -0,0 +1,579 @@
|
|||
#ifndef SETTINGSCACHE_H
|
||||
#define SETTINGSCACHE_H
|
||||
|
||||
#include "card_database_settings.h"
|
||||
#include "download_settings.h"
|
||||
#include "game_filters_settings.h"
|
||||
#include "layouts_settings.h"
|
||||
#include "message_settings.h"
|
||||
#include "servers_settings.h"
|
||||
#include "shortcuts_settings.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QSize>
|
||||
#include <QStringList>
|
||||
|
||||
class ReleaseChannel;
|
||||
|
||||
// size should be a multiple of 64
|
||||
#define PIXMAPCACHE_SIZE_DEFAULT 2047
|
||||
#define PIXMAPCACHE_SIZE_MIN 64
|
||||
#define PIXMAPCACHE_SIZE_MAX 2047
|
||||
|
||||
// In MB
|
||||
constexpr int NETWORK_CACHE_SIZE_DEFAULT = 1024 * 4; // 4 GB
|
||||
constexpr int NETWORK_CACHE_SIZE_MIN = 1; // 1 MB
|
||||
constexpr int NETWORK_CACHE_SIZE_MAX = 1024 * 1024; // 1 TB
|
||||
|
||||
#define DEFAULT_LANG_NAME "English"
|
||||
#define CLIENT_INFO_NOT_SET "notset"
|
||||
|
||||
#define DEFAULT_FONT_SIZE 12
|
||||
|
||||
class QSettings;
|
||||
|
||||
class SettingsCache : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
signals:
|
||||
void langChanged();
|
||||
void picsPathChanged();
|
||||
void cardDatabasePathChanged();
|
||||
void themeChanged();
|
||||
void picDownloadChanged();
|
||||
void displayCardNamesChanged();
|
||||
void horizontalHandChanged();
|
||||
void handJustificationChanged();
|
||||
void invertVerticalCoordinateChanged();
|
||||
void minPlayersForMultiColumnLayoutChanged();
|
||||
void soundEnabledChanged();
|
||||
void soundThemeChanged();
|
||||
void ignoreUnregisteredUsersChanged();
|
||||
void ignoreUnregisteredUserMessagesChanged();
|
||||
void pixmapCacheSizeChanged(int newSizeInMBs);
|
||||
void networkCacheSizeChanged(int newSizeInMBs);
|
||||
void masterVolumeChanged(int value);
|
||||
void chatMentionCompleterChanged();
|
||||
void downloadSpoilerTimeIndexChanged();
|
||||
void downloadSpoilerStatusChanged();
|
||||
void useTearOffMenusChanged(bool state);
|
||||
|
||||
private:
|
||||
QSettings *settings;
|
||||
ShortcutsSettings *shortcutsSettings;
|
||||
CardDatabaseSettings *cardDatabaseSettings;
|
||||
ServersSettings *serversSettings;
|
||||
MessageSettings *messageSettings;
|
||||
GameFiltersSettings *gameFiltersSettings;
|
||||
LayoutsSettings *layoutsSettings;
|
||||
DownloadSettings *downloadSettings;
|
||||
|
||||
QByteArray mainWindowGeometry;
|
||||
QByteArray tokenDialogGeometry;
|
||||
QByteArray setsDialogGeometry;
|
||||
QString lang;
|
||||
QString deckPath, replaysPath, picsPath, customPicsPath, cardDatabasePath, customCardDatabasePath, themesPath,
|
||||
spoilerDatabasePath, tokenDatabasePath, themeName;
|
||||
bool notifyAboutUpdates;
|
||||
bool notifyAboutNewVersion;
|
||||
bool showTipsOnStartup;
|
||||
QList<int> seenTips;
|
||||
bool mbDownloadSpoilers;
|
||||
int updateReleaseChannel;
|
||||
int maxFontSize;
|
||||
bool picDownload;
|
||||
bool notificationsEnabled;
|
||||
bool spectatorNotificationsEnabled;
|
||||
bool buddyConnectNotificationsEnabled;
|
||||
bool doubleClickToPlay;
|
||||
bool playToStack;
|
||||
int startingHandSize;
|
||||
bool annotateTokens;
|
||||
QByteArray tabGameSplitterSizes;
|
||||
bool displayCardNames;
|
||||
bool horizontalHand;
|
||||
bool invertVerticalCoordinate;
|
||||
int minPlayersForMultiColumnLayout;
|
||||
bool tapAnimation;
|
||||
bool chatMention;
|
||||
bool chatMentionCompleter;
|
||||
QString chatMentionColor;
|
||||
QString chatHighlightColor;
|
||||
bool chatMentionForeground;
|
||||
bool chatHighlightForeground;
|
||||
bool zoneViewSortByName, zoneViewSortByType, zoneViewPileView;
|
||||
bool soundEnabled;
|
||||
QString soundThemeName;
|
||||
bool ignoreUnregisteredUsers;
|
||||
bool ignoreUnregisteredUserMessages;
|
||||
QString picUrl;
|
||||
QString picUrlFallback;
|
||||
QString clientID;
|
||||
QString clientVersion;
|
||||
QString knownMissingFeatures;
|
||||
bool useTearOffMenus;
|
||||
int pixmapCacheSize;
|
||||
int networkCacheSize;
|
||||
bool scaleCards;
|
||||
int verticalCardOverlapPercent;
|
||||
bool showMessagePopups;
|
||||
bool showMentionPopups;
|
||||
bool roomHistory;
|
||||
bool leftJustified;
|
||||
int masterVolume;
|
||||
int cardInfoViewMode;
|
||||
QString highlightWords;
|
||||
QString gameDescription;
|
||||
int maxPlayers;
|
||||
QString gameTypes;
|
||||
bool onlyBuddies;
|
||||
bool onlyRegistered;
|
||||
bool spectatorsAllowed;
|
||||
bool spectatorsNeedPassword;
|
||||
bool spectatorsCanTalk;
|
||||
bool spectatorsCanSeeEverything;
|
||||
bool createGameAsSpectator;
|
||||
int keepalive;
|
||||
int timeout;
|
||||
void translateLegacySettings();
|
||||
QString getSafeConfigPath(QString configEntry, QString defaultPath) const;
|
||||
QString getSafeConfigFilePath(QString configEntry, QString defaultPath) const;
|
||||
void loadPaths();
|
||||
bool rememberGameSettings;
|
||||
QList<ReleaseChannel *> releaseChannels;
|
||||
bool isPortableBuild;
|
||||
|
||||
public:
|
||||
SettingsCache();
|
||||
QString getDataPath();
|
||||
QString getSettingsPath();
|
||||
QString getCachePath() const;
|
||||
QString getNetworkCachePath() const;
|
||||
const QByteArray &getMainWindowGeometry() const
|
||||
{
|
||||
return mainWindowGeometry;
|
||||
}
|
||||
const QByteArray &getTokenDialogGeometry() const
|
||||
{
|
||||
return tokenDialogGeometry;
|
||||
}
|
||||
const QByteArray &getSetsDialogGeometry() const
|
||||
{
|
||||
return setsDialogGeometry;
|
||||
}
|
||||
QString getLang() const
|
||||
{
|
||||
return lang;
|
||||
}
|
||||
QString getDeckPath() const
|
||||
{
|
||||
return deckPath;
|
||||
}
|
||||
QString getReplaysPath() const
|
||||
{
|
||||
return replaysPath;
|
||||
}
|
||||
QString getThemesPath() const
|
||||
{
|
||||
return themesPath;
|
||||
}
|
||||
QString getPicsPath() const
|
||||
{
|
||||
return picsPath;
|
||||
}
|
||||
QString getCustomPicsPath() const
|
||||
{
|
||||
return customPicsPath;
|
||||
}
|
||||
QString getCustomCardDatabasePath() const
|
||||
{
|
||||
return customCardDatabasePath;
|
||||
}
|
||||
QString getCardDatabasePath() const
|
||||
{
|
||||
return cardDatabasePath;
|
||||
}
|
||||
QString getSpoilerCardDatabasePath() const
|
||||
{
|
||||
return spoilerDatabasePath;
|
||||
}
|
||||
QString getTokenDatabasePath() const
|
||||
{
|
||||
return tokenDatabasePath;
|
||||
}
|
||||
QString getThemeName() const
|
||||
{
|
||||
return themeName;
|
||||
}
|
||||
QString getChatMentionColor() const
|
||||
{
|
||||
return chatMentionColor;
|
||||
}
|
||||
QString getChatHighlightColor() const
|
||||
{
|
||||
return chatHighlightColor;
|
||||
}
|
||||
bool getPicDownload() const
|
||||
{
|
||||
return picDownload;
|
||||
}
|
||||
bool getNotificationsEnabled() const
|
||||
{
|
||||
return notificationsEnabled;
|
||||
}
|
||||
bool getSpectatorNotificationsEnabled() const
|
||||
{
|
||||
return spectatorNotificationsEnabled;
|
||||
}
|
||||
bool getBuddyConnectNotificationsEnabled() const
|
||||
{
|
||||
return buddyConnectNotificationsEnabled;
|
||||
}
|
||||
bool getNotifyAboutUpdates() const
|
||||
{
|
||||
return notifyAboutUpdates;
|
||||
}
|
||||
bool getNotifyAboutNewVersion() const
|
||||
{
|
||||
return notifyAboutNewVersion;
|
||||
}
|
||||
bool getShowTipsOnStartup() const
|
||||
{
|
||||
return showTipsOnStartup;
|
||||
}
|
||||
QList<int> getSeenTips() const
|
||||
{
|
||||
return seenTips;
|
||||
}
|
||||
ReleaseChannel *getUpdateReleaseChannel() const
|
||||
{
|
||||
return releaseChannels.at(updateReleaseChannel);
|
||||
}
|
||||
QList<ReleaseChannel *> getUpdateReleaseChannels() const
|
||||
{
|
||||
return releaseChannels;
|
||||
}
|
||||
|
||||
bool getDoubleClickToPlay() const
|
||||
{
|
||||
return doubleClickToPlay;
|
||||
}
|
||||
bool getPlayToStack() const
|
||||
{
|
||||
return playToStack;
|
||||
}
|
||||
int getStartingHandSize() const
|
||||
{
|
||||
return startingHandSize;
|
||||
}
|
||||
bool getAnnotateTokens() const
|
||||
{
|
||||
return annotateTokens;
|
||||
}
|
||||
QByteArray getTabGameSplitterSizes() const
|
||||
{
|
||||
return tabGameSplitterSizes;
|
||||
}
|
||||
bool getDisplayCardNames() const
|
||||
{
|
||||
return displayCardNames;
|
||||
}
|
||||
bool getHorizontalHand() const
|
||||
{
|
||||
return horizontalHand;
|
||||
}
|
||||
bool getInvertVerticalCoordinate() const
|
||||
{
|
||||
return invertVerticalCoordinate;
|
||||
}
|
||||
int getMinPlayersForMultiColumnLayout() const
|
||||
{
|
||||
return minPlayersForMultiColumnLayout;
|
||||
}
|
||||
bool getTapAnimation() const
|
||||
{
|
||||
return tapAnimation;
|
||||
}
|
||||
bool getChatMention() const
|
||||
{
|
||||
return chatMention;
|
||||
}
|
||||
bool getChatMentionCompleter() const
|
||||
{
|
||||
return chatMentionCompleter;
|
||||
}
|
||||
bool getChatMentionForeground() const
|
||||
{
|
||||
return chatMentionForeground;
|
||||
}
|
||||
bool getChatHighlightForeground() const
|
||||
{
|
||||
return chatHighlightForeground;
|
||||
}
|
||||
bool getZoneViewSortByName() const
|
||||
{
|
||||
return zoneViewSortByName;
|
||||
}
|
||||
bool getZoneViewSortByType() const
|
||||
{
|
||||
return zoneViewSortByType;
|
||||
}
|
||||
/**
|
||||
Returns if the view should be sorted into pile view.
|
||||
@return zoneViewPileView if the view should be sorted into pile view.
|
||||
*/
|
||||
bool getZoneViewPileView() const
|
||||
{
|
||||
return zoneViewPileView;
|
||||
}
|
||||
bool getSoundEnabled() const
|
||||
{
|
||||
return soundEnabled;
|
||||
}
|
||||
QString getSoundThemeName() const
|
||||
{
|
||||
return soundThemeName;
|
||||
}
|
||||
bool getIgnoreUnregisteredUsers() const
|
||||
{
|
||||
return ignoreUnregisteredUsers;
|
||||
}
|
||||
bool getIgnoreUnregisteredUserMessages() const
|
||||
{
|
||||
return ignoreUnregisteredUserMessages;
|
||||
}
|
||||
int getPixmapCacheSize() const
|
||||
{
|
||||
return pixmapCacheSize;
|
||||
}
|
||||
int getNetworkCacheSizeInMB() const
|
||||
{
|
||||
return networkCacheSize;
|
||||
}
|
||||
bool getScaleCards() const
|
||||
{
|
||||
return scaleCards;
|
||||
}
|
||||
int getStackCardOverlapPercent() const
|
||||
{
|
||||
return verticalCardOverlapPercent;
|
||||
}
|
||||
bool getShowMessagePopup() const
|
||||
{
|
||||
return showMessagePopups;
|
||||
}
|
||||
bool getShowMentionPopup() const
|
||||
{
|
||||
return showMentionPopups;
|
||||
}
|
||||
bool getRoomHistory() const
|
||||
{
|
||||
return roomHistory;
|
||||
}
|
||||
bool getLeftJustified() const
|
||||
{
|
||||
return leftJustified;
|
||||
}
|
||||
int getMasterVolume() const
|
||||
{
|
||||
return masterVolume;
|
||||
}
|
||||
int getCardInfoViewMode() const
|
||||
{
|
||||
return cardInfoViewMode;
|
||||
}
|
||||
QStringList getCountries() const;
|
||||
QString getHighlightWords() const
|
||||
{
|
||||
return highlightWords;
|
||||
}
|
||||
QString getGameDescription() const
|
||||
{
|
||||
return gameDescription;
|
||||
}
|
||||
int getMaxPlayers() const
|
||||
{
|
||||
return maxPlayers;
|
||||
}
|
||||
QString getGameTypes() const
|
||||
{
|
||||
return gameTypes;
|
||||
}
|
||||
bool getOnlyBuddies() const
|
||||
{
|
||||
return onlyBuddies;
|
||||
}
|
||||
bool getOnlyRegistered() const
|
||||
{
|
||||
return onlyRegistered;
|
||||
}
|
||||
bool getSpectatorsAllowed() const
|
||||
{
|
||||
return spectatorsAllowed;
|
||||
}
|
||||
bool getSpectatorsNeedPassword() const
|
||||
{
|
||||
return spectatorsNeedPassword;
|
||||
}
|
||||
bool getSpectatorsCanTalk() const
|
||||
{
|
||||
return spectatorsCanTalk;
|
||||
}
|
||||
bool getSpectatorsCanSeeEverything() const
|
||||
{
|
||||
return spectatorsCanSeeEverything;
|
||||
}
|
||||
bool getCreateGameAsSpectator() const
|
||||
{
|
||||
return createGameAsSpectator;
|
||||
}
|
||||
bool getRememberGameSettings() const
|
||||
{
|
||||
return rememberGameSettings;
|
||||
}
|
||||
int getKeepAlive() const
|
||||
{
|
||||
return keepalive;
|
||||
}
|
||||
int getTimeOut() const
|
||||
{
|
||||
return timeout;
|
||||
}
|
||||
int getMaxFontSize() const
|
||||
{
|
||||
return maxFontSize;
|
||||
}
|
||||
void setClientID(const QString &clientID);
|
||||
void setClientVersion(const QString &clientVersion);
|
||||
void setKnownMissingFeatures(const QString &_knownMissingFeatures);
|
||||
void setUseTearOffMenus(bool _useTearOffMenus);
|
||||
QString getClientID()
|
||||
{
|
||||
return clientID;
|
||||
}
|
||||
QString getClientVersion()
|
||||
{
|
||||
return clientVersion;
|
||||
}
|
||||
QString getKnownMissingFeatures()
|
||||
{
|
||||
return knownMissingFeatures;
|
||||
}
|
||||
bool getUseTearOffMenus()
|
||||
{
|
||||
return useTearOffMenus;
|
||||
}
|
||||
ShortcutsSettings &shortcuts() const
|
||||
{
|
||||
return *shortcutsSettings;
|
||||
}
|
||||
CardDatabaseSettings &cardDatabase() const
|
||||
{
|
||||
return *cardDatabaseSettings;
|
||||
}
|
||||
ServersSettings &servers() const
|
||||
{
|
||||
return *serversSettings;
|
||||
}
|
||||
MessageSettings &messages() const
|
||||
{
|
||||
return *messageSettings;
|
||||
}
|
||||
GameFiltersSettings &gameFilters() const
|
||||
{
|
||||
return *gameFiltersSettings;
|
||||
}
|
||||
LayoutsSettings &layouts() const
|
||||
{
|
||||
return *layoutsSettings;
|
||||
}
|
||||
DownloadSettings &downloads() const
|
||||
{
|
||||
return *downloadSettings;
|
||||
}
|
||||
bool getIsPortableBuild() const
|
||||
{
|
||||
return isPortableBuild;
|
||||
}
|
||||
bool getDownloadSpoilersStatus() const
|
||||
{
|
||||
return mbDownloadSpoilers;
|
||||
}
|
||||
|
||||
static SettingsCache &instance();
|
||||
void resetPaths();
|
||||
|
||||
public slots:
|
||||
void setDownloadSpoilerStatus(bool _spoilerStatus);
|
||||
|
||||
void setMainWindowGeometry(const QByteArray &_mainWindowGeometry);
|
||||
void setTokenDialogGeometry(const QByteArray &_tokenDialog);
|
||||
void setSetsDialogGeometry(const QByteArray &_setsDialog);
|
||||
void setLang(const QString &_lang);
|
||||
void setShowTipsOnStartup(bool _showTipsOnStartup);
|
||||
void setSeenTips(const QList<int> &_seenTips);
|
||||
void setDeckPath(const QString &_deckPath);
|
||||
void setReplaysPath(const QString &_replaysPath);
|
||||
void setThemesPath(const QString &_themesPath);
|
||||
void setCustomCardDatabasePath(const QString &_customCardDatabasePath);
|
||||
void setPicsPath(const QString &_picsPath);
|
||||
void setCardDatabasePath(const QString &_cardDatabasePath);
|
||||
void setSpoilerDatabasePath(const QString &_spoilerDatabasePath);
|
||||
void setTokenDatabasePath(const QString &_tokenDatabasePath);
|
||||
void setThemeName(const QString &_themeName);
|
||||
void setChatMentionColor(const QString &_chatMentionColor);
|
||||
void setChatHighlightColor(const QString &_chatHighlightColor);
|
||||
void setPicDownload(int _picDownload);
|
||||
void setNotificationsEnabled(int _notificationsEnabled);
|
||||
void setSpectatorNotificationsEnabled(int _spectatorNotificationsEnabled);
|
||||
void setBuddyConnectNotificationsEnabled(int _buddyConnectNotificationsEnabled);
|
||||
void setDoubleClickToPlay(int _doubleClickToPlay);
|
||||
void setPlayToStack(int _playToStack);
|
||||
void setStartingHandSize(int _startingHandSize);
|
||||
void setAnnotateTokens(int _annotateTokens);
|
||||
void setTabGameSplitterSizes(const QByteArray &_tabGameSplitterSizes);
|
||||
void setDisplayCardNames(int _displayCardNames);
|
||||
void setHorizontalHand(int _horizontalHand);
|
||||
void setInvertVerticalCoordinate(int _invertVerticalCoordinate);
|
||||
void setMinPlayersForMultiColumnLayout(int _minPlayersForMultiColumnLayout);
|
||||
void setTapAnimation(int _tapAnimation);
|
||||
void setChatMention(int _chatMention);
|
||||
void setChatMentionCompleter(int _chatMentionCompleter);
|
||||
void setChatMentionForeground(int _chatMentionForeground);
|
||||
void setChatHighlightForeground(int _chatHighlightForeground);
|
||||
void setZoneViewSortByName(int _zoneViewSortByName);
|
||||
void setZoneViewSortByType(int _zoneViewSortByType);
|
||||
void setZoneViewPileView(int _zoneViewPileView);
|
||||
void setSoundEnabled(int _soundEnabled);
|
||||
void setSoundThemeName(const QString &_soundThemeName);
|
||||
void setIgnoreUnregisteredUsers(int _ignoreUnregisteredUsers);
|
||||
void setIgnoreUnregisteredUserMessages(int _ignoreUnregisteredUserMessages);
|
||||
void setPixmapCacheSize(const int _pixmapCacheSize);
|
||||
void setNetworkCacheSizeInMB(const int _networkCacheSize);
|
||||
void setCardScaling(const int _scaleCards);
|
||||
void setStackCardOverlapPercent(const int _verticalCardOverlapPercent);
|
||||
void setShowMessagePopups(const int _showMessagePopups);
|
||||
void setShowMentionPopups(const int _showMentionPopups);
|
||||
void setRoomHistory(const int _roomHistory);
|
||||
void setLeftJustified(const int _leftJustified);
|
||||
void setMasterVolume(const int _masterVolume);
|
||||
void setCardInfoViewMode(const int _viewMode);
|
||||
void setHighlightWords(const QString &_highlightWords);
|
||||
void setGameDescription(const QString _gameDescription);
|
||||
void setMaxPlayers(const int _maxPlayers);
|
||||
void setGameTypes(const QString _gameTypes);
|
||||
void setOnlyBuddies(const bool _onlyBuddies);
|
||||
void setOnlyRegistered(const bool _onlyRegistered);
|
||||
void setSpectatorsAllowed(const bool _spectatorsAllowed);
|
||||
void setSpectatorsNeedPassword(const bool _spectatorsNeedPassword);
|
||||
void setSpectatorsCanTalk(const bool _spectatorsCanTalk);
|
||||
void setSpectatorsCanSeeEverything(const bool _spectatorsCanSeeEverything);
|
||||
void setCreateGameAsSpectator(const bool _createGameAsSpectator);
|
||||
void setRememberGameSettings(const bool _rememberGameSettings);
|
||||
void setNotifyAboutUpdate(int _notifyaboutupdate);
|
||||
void setNotifyAboutNewVersion(int _notifyaboutnewversion);
|
||||
void setUpdateReleaseChannel(int _updateReleaseChannel);
|
||||
void setMaxFontSize(int _max);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
#include "carddatabasesettings.h"
|
||||
#include "card_database_settings.h"
|
||||
|
||||
CardDatabaseSettings::CardDatabaseSettings(QString settingPath, QObject *parent)
|
||||
: SettingsManager(settingPath + "cardDatabase.ini", parent)
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef CARDDATABASESETTINGS_H
|
||||
#define CARDDATABASESETTINGS_H
|
||||
|
||||
#include "settingsmanager.h"
|
||||
#include "settings_manager.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QSettings>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#include "downloadsettings.h"
|
||||
#include "download_settings.h"
|
||||
|
||||
#include "settingsmanager.h"
|
||||
#include "settings_manager.h"
|
||||
|
||||
DownloadSettings::DownloadSettings(const QString &settingPath, QObject *parent = nullptr)
|
||||
: SettingsManager(settingPath + "downloads.ini", parent)
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef COCKATRICE_DOWNLOADSETTINGS_H
|
||||
#define COCKATRICE_DOWNLOADSETTINGS_H
|
||||
|
||||
#include "settingsmanager.h"
|
||||
#include "settings_manager.h"
|
||||
|
||||
#include <QObject>
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
#include "gamefilterssettings.h"
|
||||
#include "game_filters_settings.h"
|
||||
|
||||
#include <QCryptographicHash>
|
||||
#include <QTime>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef GAMEFILTERSSETTINGS_H
|
||||
#define GAMEFILTERSSETTINGS_H
|
||||
|
||||
#include "settingsmanager.h"
|
||||
#include "settings_manager.h"
|
||||
|
||||
class GameFiltersSettings : public SettingsManager
|
||||
{
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
#include "layoutssettings.h"
|
||||
#include "layouts_settings.h"
|
||||
|
||||
LayoutsSettings::LayoutsSettings(QString settingPath, QObject *parent)
|
||||
: SettingsManager(settingPath + "layouts.ini", parent)
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef LAYOUTSSETTINGS_H
|
||||
#define LAYOUTSSETTINGS_H
|
||||
|
||||
#include "settingsmanager.h"
|
||||
#include "settings_manager.h"
|
||||
|
||||
#include <QSize>
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
#include "messagesettings.h"
|
||||
#include "message_settings.h"
|
||||
|
||||
MessageSettings::MessageSettings(QString settingPath, QObject *parent)
|
||||
: SettingsManager(settingPath + "messages.ini", parent)
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef MESSAGESETTINGS_H
|
||||
#define MESSAGESETTINGS_H
|
||||
|
||||
#include "settingsmanager.h"
|
||||
#include "settings_manager.h"
|
||||
|
||||
class MessageSettings : public SettingsManager
|
||||
{
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
#include "serverssettings.h"
|
||||
#include "servers_settings.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <utility>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef SERVERSSETTINGS_H
|
||||
#define SERVERSSETTINGS_H
|
||||
|
||||
#include "settingsmanager.h"
|
||||
#include "settings_manager.h"
|
||||
|
||||
#include <QObject>
|
||||
#define SERVERSETTINGS_DEFAULT_HOST "server.cockatrice.us"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
#include "settingsmanager.h"
|
||||
#include "settings_manager.h"
|
||||
|
||||
SettingsManager::SettingsManager(QString settingPath, QObject *parent)
|
||||
: QObject(parent), settings(settingPath, QSettings::IniFormat)
|
||||
180
cockatrice/src/settings/shortcuts_settings.cpp
Normal file
180
cockatrice/src/settings/shortcuts_settings.cpp
Normal file
|
|
@ -0,0 +1,180 @@
|
|||
#include "shortcuts_settings.h"
|
||||
|
||||
#include <QFile>
|
||||
#include <QMessageBox>
|
||||
#include <QStringList>
|
||||
#include <utility>
|
||||
|
||||
ShortcutKey::ShortcutKey(const QString &_name, QList<QKeySequence> _sequence, ShortcutGroup::Groups _group)
|
||||
: QList<QKeySequence>(_sequence), name(_name), group(_group)
|
||||
{
|
||||
}
|
||||
|
||||
ShortcutsSettings::ShortcutsSettings(const QString &settingsPath, QObject *parent) : QObject(parent)
|
||||
{
|
||||
shortCuts = defaultShortCuts;
|
||||
settingsFilePath = settingsPath;
|
||||
settingsFilePath.append("shortcuts.ini");
|
||||
|
||||
bool exists = QFile(settingsFilePath).exists();
|
||||
|
||||
QSettings shortCutsFile(settingsFilePath, QSettings::IniFormat);
|
||||
|
||||
if (exists) {
|
||||
shortCutsFile.beginGroup(custom);
|
||||
const QStringList customKeys = shortCutsFile.allKeys();
|
||||
|
||||
QMap<QString, QString> invalidItems;
|
||||
for (QStringList::const_iterator it = customKeys.constBegin(); it != customKeys.constEnd(); ++it) {
|
||||
QString stringSequence = shortCutsFile.value(*it).toString();
|
||||
// check whether shortcut is forbidden
|
||||
if (isKeyAllowed(*it, stringSequence)) {
|
||||
auto shortcut = getShortcut(*it);
|
||||
shortcut.setSequence(parseSequenceString(stringSequence));
|
||||
shortCuts.insert(*it, shortcut);
|
||||
} else {
|
||||
invalidItems.insert(*it, stringSequence);
|
||||
}
|
||||
}
|
||||
|
||||
shortCutsFile.endGroup();
|
||||
|
||||
if (!invalidItems.isEmpty()) {
|
||||
// warning message in case of invalid items
|
||||
QMessageBox msgBox;
|
||||
msgBox.setIcon(QMessageBox::Warning);
|
||||
msgBox.setText(tr("Your configuration file contained invalid shortcuts.\n"
|
||||
"Please check your shortcut settings!"));
|
||||
QString detailedMessage = tr("The following shortcuts have been set to default:\n");
|
||||
for (QMap<QString, QString>::const_iterator item = invalidItems.constBegin();
|
||||
item != invalidItems.constEnd(); ++item) {
|
||||
detailedMessage += item.key() + " - \"" + item.value() + "\"\n";
|
||||
}
|
||||
msgBox.setDetailedText(detailedMessage);
|
||||
msgBox.exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ShortcutKey ShortcutsSettings::getDefaultShortcut(const QString &name) const
|
||||
{
|
||||
return defaultShortCuts.value(name, ShortcutKey());
|
||||
}
|
||||
|
||||
ShortcutKey ShortcutsSettings::getShortcut(const QString &name) const
|
||||
{
|
||||
if (shortCuts.contains(name)) {
|
||||
return shortCuts.value(name);
|
||||
}
|
||||
|
||||
return getDefaultShortcut(name);
|
||||
}
|
||||
|
||||
QKeySequence ShortcutsSettings::getSingleShortcut(const QString &name) const
|
||||
{
|
||||
return getShortcut(name).at(0);
|
||||
}
|
||||
|
||||
QString ShortcutsSettings::getDefaultShortcutString(const QString &name) const
|
||||
{
|
||||
return stringifySequence(getDefaultShortcut(name));
|
||||
}
|
||||
|
||||
QString ShortcutsSettings::getShortcutString(const QString &name) const
|
||||
{
|
||||
return stringifySequence(getShortcut(name));
|
||||
}
|
||||
|
||||
QString ShortcutsSettings::stringifySequence(const QList<QKeySequence> &Sequence) const
|
||||
{
|
||||
QStringList stringSequence;
|
||||
for (const auto &i : Sequence) {
|
||||
stringSequence.append(i.toString(QKeySequence::PortableText));
|
||||
}
|
||||
|
||||
return stringSequence.join(sep);
|
||||
}
|
||||
|
||||
QList<QKeySequence> ShortcutsSettings::parseSequenceString(const QString &stringSequence) const
|
||||
{
|
||||
QList<QKeySequence> SequenceList;
|
||||
for (const QString &shortcut : stringSequence.split(sep)) {
|
||||
SequenceList.append(QKeySequence(shortcut, QKeySequence::PortableText));
|
||||
}
|
||||
|
||||
return SequenceList;
|
||||
}
|
||||
|
||||
void ShortcutsSettings::setShortcuts(const QString &name, const QList<QKeySequence> &Sequence)
|
||||
{
|
||||
shortCuts[name].setSequence(Sequence);
|
||||
|
||||
QSettings shortCutsFile(settingsFilePath, QSettings::IniFormat);
|
||||
shortCutsFile.beginGroup(custom);
|
||||
shortCutsFile.setValue(name, stringifySequence(Sequence));
|
||||
shortCutsFile.endGroup();
|
||||
emit shortCutChanged();
|
||||
}
|
||||
|
||||
void ShortcutsSettings::setShortcuts(const QString &name, const QKeySequence &Sequence)
|
||||
{
|
||||
setShortcuts(name, QList<QKeySequence>{Sequence});
|
||||
}
|
||||
|
||||
void ShortcutsSettings::setShortcuts(const QString &name, const QString &Sequences)
|
||||
{
|
||||
setShortcuts(name, parseSequenceString(Sequences));
|
||||
}
|
||||
|
||||
void ShortcutsSettings::resetAllShortcuts()
|
||||
{
|
||||
shortCuts = defaultShortCuts;
|
||||
QSettings shortCutsFile(settingsFilePath, QSettings::IniFormat);
|
||||
shortCutsFile.beginGroup(custom);
|
||||
shortCutsFile.remove("");
|
||||
shortCutsFile.endGroup();
|
||||
emit shortCutChanged();
|
||||
}
|
||||
|
||||
void ShortcutsSettings::clearAllShortcuts()
|
||||
{
|
||||
QSettings shortCutsFile(settingsFilePath, QSettings::IniFormat);
|
||||
shortCutsFile.beginGroup(custom);
|
||||
for (auto it = shortCuts.begin(); it != shortCuts.end(); ++it) {
|
||||
it.value().setSequence(parseSequenceString(""));
|
||||
shortCutsFile.setValue(it.key(), "");
|
||||
}
|
||||
shortCutsFile.endGroup();
|
||||
emit shortCutChanged();
|
||||
}
|
||||
|
||||
bool ShortcutsSettings::isKeyAllowed(const QString &name, const QString &Sequences) const
|
||||
{
|
||||
// if the shortcut is not to be used in deck-editor then it doesn't matter
|
||||
if (name.startsWith("Player")) {
|
||||
return true;
|
||||
}
|
||||
QString checkSequence = Sequences.split(sep).last();
|
||||
QStringList forbiddenKeys{"Del", "Backspace", "Down", "Up", "Left", "Right",
|
||||
"Return", "Enter", "Menu", "Ctrl+Alt+-", "Ctrl+Alt+=", "Ctrl+Alt+[",
|
||||
"Ctrl+Alt+]", "Tab", "Space", "Shift+S", "Shift+Left", "Shift+Right"};
|
||||
return !forbiddenKeys.contains(checkSequence);
|
||||
}
|
||||
|
||||
bool ShortcutsSettings::isValid(const QString &name, const QString &Sequences) const
|
||||
{
|
||||
QString checkSequence = Sequences.split(sep).last();
|
||||
QString checkKey = name.left(name.indexOf("/"));
|
||||
|
||||
QList<QString> allKeys = shortCuts.keys();
|
||||
for (const auto &key : allKeys) {
|
||||
if (key.startsWith(checkKey) || key.startsWith("MainWindow") || checkKey.startsWith("MainWindow")) {
|
||||
QString storedSequence = stringifySequence(shortCuts.value(key));
|
||||
QStringList stringSequences = storedSequence.split(sep);
|
||||
if (stringSequences.contains(checkSequence)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
592
cockatrice/src/settings/shortcuts_settings.h
Normal file
592
cockatrice/src/settings/shortcuts_settings.h
Normal file
|
|
@ -0,0 +1,592 @@
|
|||
#ifndef SHORTCUTSSETTINGS_H
|
||||
#define SHORTCUTSSETTINGS_H
|
||||
|
||||
#include <QApplication>
|
||||
#include <QHash>
|
||||
#include <QKeySequence>
|
||||
#include <QObject>
|
||||
#include <QSettings>
|
||||
|
||||
class ShortcutGroup
|
||||
{
|
||||
public:
|
||||
enum Groups
|
||||
{
|
||||
Main_Window,
|
||||
Deck_Editor,
|
||||
Game_Lobby,
|
||||
Card_Counters,
|
||||
Player_Counters,
|
||||
Power_Toughness,
|
||||
Game_Phases,
|
||||
Playing_Area,
|
||||
Move_selected,
|
||||
View,
|
||||
Move_top,
|
||||
Move_bottom,
|
||||
Gameplay,
|
||||
Drawing,
|
||||
Chat_room,
|
||||
Game_window,
|
||||
Load_deck
|
||||
};
|
||||
|
||||
static QString getGroupName(ShortcutGroup::Groups group)
|
||||
{
|
||||
switch (group) {
|
||||
case Main_Window:
|
||||
return QApplication::translate("shortcutsTab", "Main Window");
|
||||
case Deck_Editor:
|
||||
return QApplication::translate("shortcutsTab", "Deck Editor");
|
||||
case Game_Lobby:
|
||||
return QApplication::translate("shortcutsTab", "Game Lobby");
|
||||
case Card_Counters:
|
||||
return QApplication::translate("shortcutsTab", "Card Counters");
|
||||
case Player_Counters:
|
||||
return QApplication::translate("shortcutsTab", "Player Counters");
|
||||
case Power_Toughness:
|
||||
return QApplication::translate("shortcutsTab", "Power and Toughness");
|
||||
case Game_Phases:
|
||||
return QApplication::translate("shortcutsTab", "Game Phases");
|
||||
case Playing_Area:
|
||||
return QApplication::translate("shortcutsTab", "Playing Area");
|
||||
case Move_selected:
|
||||
return QApplication::translate("shortcutsTab", "Move Selected Card");
|
||||
case View:
|
||||
return QApplication::translate("shortcutsTab", "View");
|
||||
case Move_top:
|
||||
return QApplication::translate("shortcutsTab", "Move Top Card");
|
||||
case Move_bottom:
|
||||
return QApplication::translate("shortcutsTab", "Move Bottom Card");
|
||||
case Gameplay:
|
||||
return QApplication::translate("shortcutsTab", "Gameplay");
|
||||
case Drawing:
|
||||
return QApplication::translate("shortcutsTab", "Drawing");
|
||||
case Chat_room:
|
||||
return QApplication::translate("shortcutsTab", "Chat Room");
|
||||
case Game_window:
|
||||
return QApplication::translate("shortcutsTab", "Game Window");
|
||||
case Load_deck:
|
||||
return QApplication::translate("shortcutsTab", "Load Deck from Clipboard");
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
};
|
||||
|
||||
class ShortcutKey : public QList<QKeySequence>
|
||||
{
|
||||
public:
|
||||
ShortcutKey(const QString &_name = QString(),
|
||||
QList<QKeySequence> _sequence = QList<QKeySequence>(),
|
||||
ShortcutGroup::Groups _group = ShortcutGroup::Main_Window);
|
||||
void setSequence(QList<QKeySequence> _sequence)
|
||||
{
|
||||
QList<QKeySequence>::operator=(_sequence);
|
||||
};
|
||||
const QString getName() const
|
||||
{
|
||||
return QApplication::translate("shortcutsTab", name.toUtf8().data());
|
||||
};
|
||||
const QString getGroupName() const
|
||||
{
|
||||
return ShortcutGroup::getGroupName(group);
|
||||
};
|
||||
|
||||
private:
|
||||
QString name;
|
||||
ShortcutGroup::Groups group;
|
||||
};
|
||||
|
||||
class ShortcutsSettings : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
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;
|
||||
QList<QString> getAllShortcutKeys() const
|
||||
{
|
||||
return shortCuts.keys();
|
||||
};
|
||||
|
||||
void setShortcuts(const QString &name, const QList<QKeySequence> &Sequence);
|
||||
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;
|
||||
|
||||
void resetAllShortcuts();
|
||||
void clearAllShortcuts();
|
||||
|
||||
signals:
|
||||
void shortCutChanged();
|
||||
|
||||
private:
|
||||
const QChar sep = ';';
|
||||
const QString custom = "Custom"; // name of custom group in shortCutsFile
|
||||
QString settingsFilePath;
|
||||
QHash<QString, ShortcutKey> shortCuts;
|
||||
|
||||
QString stringifySequence(const QList<QKeySequence> &Sequence) const;
|
||||
QList<QKeySequence> parseSequenceString(const QString &stringSequence) const;
|
||||
|
||||
const QHash<QString, ShortcutKey> defaultShortCuts = {
|
||||
{"MainWindow/aCheckCardUpdates", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Check for Card Updates..."),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Main_Window)},
|
||||
{"MainWindow/aConnect", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Connect..."),
|
||||
parseSequenceString("Ctrl+L"),
|
||||
ShortcutGroup::Main_Window)},
|
||||
{"MainWindow/aDeckEditor", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Deck Editor"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Main_Window)},
|
||||
{"MainWindow/aDisconnect", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Disconnect"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Main_Window)},
|
||||
{"MainWindow/aExit",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Exit"), parseSequenceString(""), ShortcutGroup::Main_Window)},
|
||||
{"MainWindow/aFullScreen", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Full screen"),
|
||||
parseSequenceString("Ctrl+F"),
|
||||
ShortcutGroup::Main_Window)},
|
||||
{"MainWindow/aRegister", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Register..."),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Main_Window)},
|
||||
{"MainWindow/aSettings", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Settings..."),
|
||||
parseSequenceString("Ctrl+Shift+P"),
|
||||
ShortcutGroup::Main_Window)},
|
||||
{"MainWindow/aSinglePlayer", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Start a Local Game..."),
|
||||
parseSequenceString("Ctrl+Shift+L"),
|
||||
ShortcutGroup::Main_Window)},
|
||||
{"MainWindow/aWatchReplay", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Watch Replay..."),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Main_Window)},
|
||||
{"TabDeckEditor/aAnalyzeDeck", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Analyze Deck"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Deck_Editor)},
|
||||
{"TabDeckEditor/aClearFilterAll", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Clear All Filters"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Deck_Editor)},
|
||||
{"TabDeckEditor/aClearFilterOne", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Clear Selected Filter"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Deck_Editor)},
|
||||
{"TabDeckEditor/aClose",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Close"), parseSequenceString(""), ShortcutGroup::Deck_Editor)},
|
||||
{"TabDeckEditor/aDecrement", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Remove Card"),
|
||||
parseSequenceString("-"),
|
||||
ShortcutGroup::Deck_Editor)},
|
||||
{"TabDeckEditor/aManageSets", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Manage Sets..."),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Deck_Editor)},
|
||||
{"TabDeckEditor/aEditTokens", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Edit Custom Tokens..."),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Deck_Editor)},
|
||||
{"TabDeckEditor/aExportDeckDecklist", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Export Deck"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Deck_Editor)},
|
||||
{"TabDeckEditor/aIncrement", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Add Card"),
|
||||
parseSequenceString("+"),
|
||||
ShortcutGroup::Deck_Editor)},
|
||||
{"TabDeckEditor/aLoadDeck", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Load Deck..."),
|
||||
parseSequenceString("Ctrl+O"),
|
||||
ShortcutGroup::Deck_Editor)},
|
||||
{"TabDeckEditor/aLoadDeckFromClipboard",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Load Deck from Clipboard..."),
|
||||
parseSequenceString("Ctrl+Shift+V"),
|
||||
ShortcutGroup::Deck_Editor)},
|
||||
{"TabDeckEditor/aNewDeck", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "New Deck"),
|
||||
parseSequenceString("Ctrl+N"),
|
||||
ShortcutGroup::Deck_Editor)},
|
||||
{"TabDeckEditor/aOpenCustomFolder",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Open Custom Pictures Folder"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Deck_Editor)},
|
||||
{"TabDeckEditor/aPrintDeck", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Print Deck..."),
|
||||
parseSequenceString("Ctrl+P"),
|
||||
ShortcutGroup::Deck_Editor)},
|
||||
{"TabDeckEditor/aRemoveCard", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Delete Card"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Deck_Editor)},
|
||||
{"TabDeckEditor/aResetLayout", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Reset Layout"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Deck_Editor)},
|
||||
{"TabDeckEditor/aSaveDeck", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Save Deck"),
|
||||
parseSequenceString("Ctrl+S"),
|
||||
ShortcutGroup::Deck_Editor)},
|
||||
{"TabDeckEditor/aSaveDeckAs", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Save Deck as..."),
|
||||
parseSequenceString("Ctrl+Shift+S"),
|
||||
ShortcutGroup::Deck_Editor)},
|
||||
{"TabDeckEditor/aSaveDeckToClipboard",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Save Deck to Clipboard, Annotated"),
|
||||
parseSequenceString("Ctrl+Shift+C"),
|
||||
ShortcutGroup::Deck_Editor)},
|
||||
{"TabDeckEditor/aSaveDeckToClipboardRaw",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Save Deck to Clipboard"),
|
||||
parseSequenceString("Ctrl+Shift+R"),
|
||||
ShortcutGroup::Deck_Editor)},
|
||||
{"DeckViewContainer/loadLocalButton", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Load Local Deck..."),
|
||||
parseSequenceString("Ctrl+O"),
|
||||
ShortcutGroup::Game_Lobby)},
|
||||
{"DeckViewContainer/loadRemoteButton", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Load Remote Deck..."),
|
||||
parseSequenceString("Ctrl+Alt+O"),
|
||||
ShortcutGroup::Game_Lobby)},
|
||||
{"DeckViewContainer/readyStartButton", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Set Ready to Start"),
|
||||
parseSequenceString("Ctrl+Shift+S"),
|
||||
ShortcutGroup::Game_Lobby)},
|
||||
{"DeckViewContainer/sideboardLockButton",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Toggle Sideboard Lock"),
|
||||
parseSequenceString("Ctrl+Shift+B"),
|
||||
ShortcutGroup::Game_Lobby)},
|
||||
{"Player/aCCGreen", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Add Green Counter"),
|
||||
parseSequenceString("Ctrl+>"),
|
||||
ShortcutGroup::Card_Counters)},
|
||||
{"Player/aRCGreen", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Remove Green Counter"),
|
||||
parseSequenceString("Ctrl+<"),
|
||||
ShortcutGroup::Card_Counters)},
|
||||
{"Player/aSCGreen", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Set Green Counters..."),
|
||||
parseSequenceString("Ctrl+?"),
|
||||
ShortcutGroup::Card_Counters)},
|
||||
{"Player/aCCYellow", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Add Yellow Counter"),
|
||||
parseSequenceString("Ctrl+."),
|
||||
ShortcutGroup::Card_Counters)},
|
||||
{"Player/aRCYellow", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Remove Yellow Counter"),
|
||||
parseSequenceString("Ctrl+,"),
|
||||
ShortcutGroup::Card_Counters)},
|
||||
{"Player/aSCYellow", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Set Yellow Counters..."),
|
||||
parseSequenceString("Ctrl+/"),
|
||||
ShortcutGroup::Card_Counters)},
|
||||
{"Player/aCCRed", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Add Red Counter"),
|
||||
parseSequenceString("Alt+."),
|
||||
ShortcutGroup::Card_Counters)},
|
||||
{"Player/aRCRed", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Remove Red Counter"),
|
||||
parseSequenceString("Alt+,"),
|
||||
ShortcutGroup::Card_Counters)},
|
||||
{"Player/aSCRed", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Set Red Counters..."),
|
||||
parseSequenceString("Alt+/"),
|
||||
ShortcutGroup::Card_Counters)},
|
||||
{"Player/aInc", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Add Life Counter"),
|
||||
parseSequenceString("F12"),
|
||||
ShortcutGroup::Player_Counters)},
|
||||
{"Player/aDec", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Remove Life Counter"),
|
||||
parseSequenceString("F11"),
|
||||
ShortcutGroup::Player_Counters)},
|
||||
{"Player/aSet", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Set Life Counters..."),
|
||||
parseSequenceString("Ctrl+L"),
|
||||
ShortcutGroup::Player_Counters)},
|
||||
{"Player/aIncCounter_w", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Add White Counter"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Player_Counters)},
|
||||
{"Player/aDecCounter_w", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Remove White Counter"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Player_Counters)},
|
||||
{"Player/aSetCounter_w", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Set White Counters..."),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Player_Counters)},
|
||||
{"Player/aIncCounter_u", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Add Blue Counter"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Player_Counters)},
|
||||
{"Player/aDecCounter_u", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Remove Blue Counter"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Player_Counters)},
|
||||
{"Player/aSetCounter_u", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Set Blue Counters..."),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Player_Counters)},
|
||||
{"Player/aIncCounter_b", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Add Black Counter"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Player_Counters)},
|
||||
{"Player/aDecCounter_b", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Remove Black Counter"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Player_Counters)},
|
||||
{"Player/aSetCounter_b", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Set Black Counters..."),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Player_Counters)},
|
||||
{"Player/aIncCounter_r", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Add Red Counter"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Player_Counters)},
|
||||
{"Player/aDecCounter_r", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Remove Red Counter"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Player_Counters)},
|
||||
{"Player/aSetCounter_r", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Set Red Counters..."),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Player_Counters)},
|
||||
{"Player/aIncCounter_g", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Add Green Counter"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Player_Counters)},
|
||||
{"Player/aDecCounter_g", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Remove Green Counter"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Player_Counters)},
|
||||
{"Player/aSetCounter_g", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Set Green Counters..."),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Player_Counters)},
|
||||
{"Player/aIncCounter_x", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Add Colorless Counter"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Player_Counters)},
|
||||
{"Player/aDecCounter_x", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Remove Colorless Counter"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Player_Counters)},
|
||||
{"Player/aSetCounter_x", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Set Colorless Counters..."),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Player_Counters)},
|
||||
{"Player/aIncCounter_storm", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Add Other Counter"),
|
||||
parseSequenceString("Ctrl+]"),
|
||||
ShortcutGroup::Player_Counters)},
|
||||
{"Player/aDecCounter_storm", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Remove Other Counter"),
|
||||
parseSequenceString("Ctrl+["),
|
||||
ShortcutGroup::Player_Counters)},
|
||||
{"Player/aSetCounter_storm", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Set Other Counters..."),
|
||||
parseSequenceString("Ctrl+\\"),
|
||||
ShortcutGroup::Player_Counters)},
|
||||
{"Player/aIncP", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Add Power (+1/+0)"),
|
||||
parseSequenceString("Ctrl++;Ctrl+="),
|
||||
ShortcutGroup::Power_Toughness)},
|
||||
{"Player/aDecP", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Remove Power (-1/-0)"),
|
||||
parseSequenceString("Ctrl+-"),
|
||||
ShortcutGroup::Power_Toughness)},
|
||||
{"Player/aFlowP", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Move Toughness to Power (+1/-1)"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Power_Toughness)},
|
||||
{"Player/aIncT", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Add Toughness (+0/+1)"),
|
||||
parseSequenceString("Alt++;Alt+="),
|
||||
ShortcutGroup::Power_Toughness)},
|
||||
{"Player/aDecT", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Remove Toughness (-0/-1)"),
|
||||
parseSequenceString("Alt+-"),
|
||||
ShortcutGroup::Power_Toughness)},
|
||||
{"Player/aFlowT", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Move Power to Toughness (-1/+1)"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Power_Toughness)},
|
||||
{"Player/aIncPT", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Add Power and Toughness (+1/+1)"),
|
||||
parseSequenceString("Ctrl+Alt++;Ctrl+Alt+="),
|
||||
ShortcutGroup::Power_Toughness)},
|
||||
{"Player/aDecPT", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Remove Power and Toughness (-1/-1)"),
|
||||
parseSequenceString("Ctrl+Alt+-"),
|
||||
ShortcutGroup::Power_Toughness)},
|
||||
{"Player/aSetPT", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Set Power and Toughness..."),
|
||||
parseSequenceString("Ctrl+P"),
|
||||
ShortcutGroup::Power_Toughness)},
|
||||
{"Player/aResetPT", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Reset Power and Toughness"),
|
||||
parseSequenceString("Ctrl+Alt+0"),
|
||||
ShortcutGroup::Power_Toughness)},
|
||||
{"Player/phase0", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Untap"),
|
||||
parseSequenceString("F5"),
|
||||
ShortcutGroup::Game_Phases)},
|
||||
{"Player/phase1",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Upkeep"), parseSequenceString(""), ShortcutGroup::Game_Phases)},
|
||||
{"Player/phase2",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Draw"), parseSequenceString("F6"), ShortcutGroup::Game_Phases)},
|
||||
{"Player/phase3", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "First Main Phase"),
|
||||
parseSequenceString("F7"),
|
||||
ShortcutGroup::Game_Phases)},
|
||||
{"Player/phase4", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Start Combat"),
|
||||
parseSequenceString("F8"),
|
||||
ShortcutGroup::Game_Phases)},
|
||||
{"Player/phase5",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Attack"), parseSequenceString(""), ShortcutGroup::Game_Phases)},
|
||||
{"Player/phase6",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Block"), parseSequenceString(""), ShortcutGroup::Game_Phases)},
|
||||
{"Player/phase7",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Damage"), parseSequenceString(""), ShortcutGroup::Game_Phases)},
|
||||
{"Player/phase8", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "End Combat"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Game_Phases)},
|
||||
{"Player/phase9", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Second Main Phase"),
|
||||
parseSequenceString("F9"),
|
||||
ShortcutGroup::Game_Phases)},
|
||||
{"Player/phase10",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "End"), parseSequenceString("F10"), ShortcutGroup::Game_Phases)},
|
||||
{"Player/aNextPhase", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Next Phase"),
|
||||
parseSequenceString("Ctrl+Space;Tab"),
|
||||
ShortcutGroup::Game_Phases)},
|
||||
{"Player/aNextPhaseAction", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Next Phase Action"),
|
||||
parseSequenceString("Shift+Tab"),
|
||||
ShortcutGroup::Game_Phases)},
|
||||
{"Player/aNextTurn", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Next Turn"),
|
||||
parseSequenceString("Ctrl+Return;Ctrl+Enter"),
|
||||
ShortcutGroup::Game_Phases)},
|
||||
{"Player/aTap", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Tap / Untap Card"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Playing_Area)},
|
||||
{"Player/aUntapAll", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Untap All"),
|
||||
parseSequenceString("Ctrl+U"),
|
||||
ShortcutGroup::Playing_Area)},
|
||||
{"Player/aDoesntUntap", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Toggle Untap"),
|
||||
parseSequenceString("Alt+U"),
|
||||
ShortcutGroup::Playing_Area)},
|
||||
{"Player/aFlip", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Turn Card Over"),
|
||||
parseSequenceString("Alt+F"),
|
||||
ShortcutGroup::Playing_Area)},
|
||||
{"Player/aPeek", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Peek Card"),
|
||||
parseSequenceString("Alt+L"),
|
||||
ShortcutGroup::Playing_Area)},
|
||||
{"Player/aPlay", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Play Card"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Playing_Area)},
|
||||
{"Player/aAttach", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Attach Card..."),
|
||||
parseSequenceString("Ctrl+Alt+A"),
|
||||
ShortcutGroup::Playing_Area)},
|
||||
{"Player/aUnattach", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Unattach Card"),
|
||||
parseSequenceString("Ctrl+Alt+U"),
|
||||
ShortcutGroup::Playing_Area)},
|
||||
{"Player/aClone", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Clone Card"),
|
||||
parseSequenceString("Ctrl+J"),
|
||||
ShortcutGroup::Playing_Area)},
|
||||
{"Player/aCreateToken", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Create Token..."),
|
||||
parseSequenceString("Ctrl+T"),
|
||||
ShortcutGroup::Playing_Area)},
|
||||
{"Player/aCreateRelatedTokens", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Create All Related Tokens"),
|
||||
parseSequenceString("Ctrl+Shift+T"),
|
||||
ShortcutGroup::Playing_Area)},
|
||||
{"Player/aCreateAnotherToken", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Create Another Token"),
|
||||
parseSequenceString("Ctrl+G"),
|
||||
ShortcutGroup::Playing_Area)},
|
||||
{"Player/aSetAnnotation", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Set Annotation..."),
|
||||
parseSequenceString("Alt+N"),
|
||||
ShortcutGroup::Playing_Area)},
|
||||
{"Player/aMoveToBottomLibrary", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Bottom of Library"),
|
||||
parseSequenceString("Ctrl+B"),
|
||||
ShortcutGroup::Move_selected)},
|
||||
{"Player/aMoveToExile", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Exile"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Move_selected)},
|
||||
{"Player/aMoveToGraveyard", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Graveyard"),
|
||||
parseSequenceString("Ctrl+Del"),
|
||||
ShortcutGroup::Move_selected)},
|
||||
{"Player/aMoveToHand",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Hand"), parseSequenceString(""), ShortcutGroup::Move_selected)},
|
||||
{"Player/aMoveToTopLibrary", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Top of Library"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Move_selected)},
|
||||
{"Player/aPlayFacedown", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Battlefield, Face Down"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Move_selected)},
|
||||
{"Player/aPlay", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Battlefield"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Move_selected)},
|
||||
{"Player/aViewHand",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Hand"), parseSequenceString(""), ShortcutGroup::View)},
|
||||
{"Player/aViewGraveyard",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Graveyard"), parseSequenceString("F4"), ShortcutGroup::View)},
|
||||
{"Player/aViewLibrary",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Library"), parseSequenceString("F3"), ShortcutGroup::View)},
|
||||
{"Player/aViewRfg",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Exile"), parseSequenceString(""), ShortcutGroup::View)},
|
||||
{"Player/aViewSideboard", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Sideboard"),
|
||||
parseSequenceString("Ctrl+F3"),
|
||||
ShortcutGroup::View)},
|
||||
{"Player/aViewTopCards", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Top Cards of Library"),
|
||||
parseSequenceString("Ctrl+W"),
|
||||
ShortcutGroup::View)},
|
||||
{"Player/aCloseMostRecentZoneView", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Close Recent View"),
|
||||
parseSequenceString("Esc"),
|
||||
ShortcutGroup::View)},
|
||||
{"Player/aMoveTopToPlay", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Stack"),
|
||||
parseSequenceString("Ctrl+Y"),
|
||||
ShortcutGroup::Move_top)},
|
||||
{"Player/aMoveTopToPlayFaceDown", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Battlefield, Face Down"),
|
||||
parseSequenceString("Ctrl+Shift+E"),
|
||||
ShortcutGroup::Move_top)},
|
||||
{"Player/aMoveTopCardToGraveyard", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Graveyard"),
|
||||
parseSequenceString("Alt+Y"),
|
||||
ShortcutGroup::Move_top)},
|
||||
{"Player/aMoveTopCardsToGraveyard", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Graveyard (Multiple)"),
|
||||
parseSequenceString("Alt+M"),
|
||||
ShortcutGroup::Move_top)},
|
||||
{"Player/aMoveTopCardToExile",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Exile"), parseSequenceString(""), ShortcutGroup::Move_top)},
|
||||
{"Player/aMoveTopCardsToExile", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Exile (Multiple)"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Move_top)},
|
||||
{"Player/aMoveTopCardsUntil", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Stack Until Found"),
|
||||
parseSequenceString("Ctrl+Shift+Y"),
|
||||
ShortcutGroup::Move_top)},
|
||||
{"Player/aMoveTopCardToBottom", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Bottom of Library"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Move_top)},
|
||||
{"Player/aMoveBottomToPlay",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Stack"), parseSequenceString(""), ShortcutGroup::Move_bottom)},
|
||||
{"Player/aMoveBottomToPlayFaceDown", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Battlefield, Face Down"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Move_bottom)},
|
||||
{"Player/aMoveBottomCardToGrave", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Graveyard"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Move_bottom)},
|
||||
{"Player/aMoveBottomCardsToGrave", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Graveyard (Multiple)"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Move_bottom)},
|
||||
{"Player/aMoveBottomCardToExile",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Exile"), parseSequenceString(""), ShortcutGroup::Move_bottom)},
|
||||
{"Player/aMoveBottomCardsToExile", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Exile (Multiple)"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Move_bottom)},
|
||||
{"Player/aMoveBottomCardToTop", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Top of Library"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Move_bottom)},
|
||||
{"Player/aDrawBottomCard", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Draw Bottom Card"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Move_bottom)},
|
||||
{"Player/aDrawBottomCards", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Draw Multiple Cards from Bottom..."),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Move_bottom)},
|
||||
{"Player/aDrawArrow", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Draw Arrow..."),
|
||||
parseSequenceString("Ctrl+A"),
|
||||
ShortcutGroup::Gameplay)},
|
||||
{"Player/aRemoveLocalArrows", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Remove Local Arrows"),
|
||||
parseSequenceString("Ctrl+R"),
|
||||
ShortcutGroup::Gameplay)},
|
||||
{"Player/aLeaveGame", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Leave Game"),
|
||||
parseSequenceString("Ctrl+Q"),
|
||||
ShortcutGroup::Gameplay)},
|
||||
{"Player/aConcede",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Concede"), parseSequenceString("F2"), ShortcutGroup::Gameplay)},
|
||||
{"Player/aRollDie", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Roll Dice..."),
|
||||
parseSequenceString("Ctrl+I"),
|
||||
ShortcutGroup::Gameplay)},
|
||||
{"Player/aShuffle", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Shuffle Library"),
|
||||
parseSequenceString("Ctrl+S"),
|
||||
ShortcutGroup::Gameplay)},
|
||||
{"Player/aMulligan", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Mulligan"),
|
||||
parseSequenceString("Ctrl+M"),
|
||||
ShortcutGroup::Drawing)},
|
||||
{"Player/aDrawCard", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Draw a Card"),
|
||||
parseSequenceString("Ctrl+D"),
|
||||
ShortcutGroup::Drawing)},
|
||||
{"Player/aDrawCards", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Draw Multiple Cards..."),
|
||||
parseSequenceString("Ctrl+E"),
|
||||
ShortcutGroup::Drawing)},
|
||||
{"Player/aUndoDraw", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Undo Draw"),
|
||||
parseSequenceString("Ctrl+Shift+D"),
|
||||
ShortcutGroup::Drawing)},
|
||||
{"Player/aAlwaysRevealTopCard", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Always Reveal Top Card"),
|
||||
parseSequenceString("Ctrl+N"),
|
||||
ShortcutGroup::Drawing)},
|
||||
{"Player/aAlwaysLookAtTopCard", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Always Look At Top Card"),
|
||||
parseSequenceString("Ctrl+Shift+N"),
|
||||
ShortcutGroup::Drawing)},
|
||||
{"Player/aRotateViewCW", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Rotate View Clockwise"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Gameplay)},
|
||||
{"Player/aRotateViewCCW", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Rotate View Counterclockwise"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Gameplay)},
|
||||
{"Textbox/unfocusTextBox", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Unfocus Text Box"),
|
||||
parseSequenceString("Esc"),
|
||||
ShortcutGroup::Chat_room)},
|
||||
{"tab_game/aFocusChat", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Focus Chat"),
|
||||
parseSequenceString("Shift+Return"),
|
||||
ShortcutGroup::Chat_room)},
|
||||
{"tab_room/aClearChat", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Clear Chat"),
|
||||
parseSequenceString("F12"),
|
||||
ShortcutGroup::Chat_room)},
|
||||
{"Player/aResetLayout", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Reset Layout"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Game_window)},
|
||||
{"DlgLoadDeckFromClipboard/refreshButton", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Refresh"),
|
||||
parseSequenceString("F5"),
|
||||
ShortcutGroup::Load_deck)}};
|
||||
};
|
||||
|
||||
#endif // SHORTCUTSSETTINGS_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue