mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 08:34:52 -07:00
Clean up inter-library dependencies with interfaces (#6280)
* Have CardDatabase::getPreferredPrintingInfo respect card provider ID overrides (pinned printings)
Took 13 minutes
Took 37 seconds
Took 10 seconds
Took 10 seconds
# Commit time for manual adjustment:
# Took 30 seconds
Took 15 seconds
Took 8 minutes
Took 21 seconds
* Move settings cache and settings card preference provider out of libcockatrice_settings and into cockatrice
Took 52 minutes
Took 9 minutes
Took 1 minute
* Temp cache.
Took 16 minutes
* Dependency Injection for SettingsCache
* Turn SettingsCache into a QSharedPointer.
* Implement interfaces for settings that need it
Took 2 hours 38 minutes
* Adjust oracle.
Took 5 minutes
* Move abstract/noop interfaces to libcockatrice_interfaces so they can be linked against independently.
Took 52 minutes
* Clean up some links.
Took 3 minutes
* Cleanup two includes.
Took 3 minutes
* More fixes.
Took 7 minutes
* More includes that slipped past.
Took 3 minutes
* Stop mocking and start injecting for tests.
Took 15 minutes
* I don't know why remote_client was including main.
Took 4 minutes
* Include.
Took 3 minutes
* Lint.
Took 2 minutes
* Don't use Qt pointers.
Took 1 hour 7 minutes
* Make parser use CardSettingsInterface
Took 13 minutes
* Also adjust constructor lol.
Took 8 minutes
* Lint.
Took 32 minutes
* Revert "Lint."
This reverts commit ecb596c39e.
Took 3 minutes
* Test.
Took 3 minutes
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
fb30515f72
commit
a8a3fca8c9
152 changed files with 609 additions and 750 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include "../../../../interface/window_main.h"
|
||||
#include "../../../../main.h"
|
||||
#include "../../../settings/cache_settings.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QCryptographicHash>
|
||||
|
|
@ -15,7 +16,6 @@
|
|||
#include <QtConcurrent>
|
||||
#include <libcockatrice/card/database/card_database.h>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
#define SPOILERS_STATUS_URL "https://raw.githubusercontent.com/Cockatrice/Magic-Spoiler/files/SpoilerSeasonEnabled"
|
||||
#define SPOILERS_URL "https://raw.githubusercontent.com/Cockatrice/Magic-Spoiler/files/spoiler.xml"
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
#include "client_update_checker.h"
|
||||
|
||||
#include "../../../settings/cache_settings.h"
|
||||
#include "release_channel.h"
|
||||
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
ClientUpdateChecker::ClientUpdateChecker(QObject *parent) : QObject(parent)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
1511
cockatrice/src/client/settings/cache_settings.cpp
Normal file
1511
cockatrice/src/client/settings/cache_settings.cpp
Normal file
File diff suppressed because it is too large
Load diff
1074
cockatrice/src/client/settings/cache_settings.h
Normal file
1074
cockatrice/src/client/settings/cache_settings.h
Normal file
File diff suppressed because it is too large
Load diff
56
cockatrice/src/client/settings/card_counter_settings.cpp
Normal file
56
cockatrice/src/client/settings/card_counter_settings.cpp
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
#include "card_counter_settings.h"
|
||||
|
||||
#include <QColor>
|
||||
#include <QSettings>
|
||||
#include <QtMath>
|
||||
|
||||
CardCounterSettings::CardCounterSettings(const QString &settingsPath, QObject *parent)
|
||||
: SettingsManager(settingsPath + "global.ini", parent)
|
||||
{
|
||||
}
|
||||
|
||||
void CardCounterSettings::setColor(int counterId, const QColor &color)
|
||||
{
|
||||
QString key = QString("cards/counters/%1/color").arg(counterId);
|
||||
|
||||
if (settings.value(key).value<QColor>() == color)
|
||||
return;
|
||||
|
||||
settings.setValue(key, color);
|
||||
emit colorChanged(counterId, color);
|
||||
}
|
||||
|
||||
QColor CardCounterSettings::color(int counterId) const
|
||||
{
|
||||
QColor defaultColor;
|
||||
|
||||
if (counterId < 6) {
|
||||
// Preserve legacy colors
|
||||
defaultColor = QColor::fromHsv(counterId * 60, 150, 255);
|
||||
} else {
|
||||
// Future-proof support for more counters with pseudo-random colors
|
||||
int h = (counterId * 37) % 360;
|
||||
int s = 128 + 64 * qSin((counterId * 97) * 0.1); // 64-192
|
||||
int v = 196 + 32 * qSin((counterId * 101) * 0.07); // 164-228
|
||||
|
||||
defaultColor = QColor::fromHsv(h, s, v);
|
||||
}
|
||||
|
||||
return settings.value(QString("cards/counters/%1/color").arg(counterId), defaultColor).value<QColor>();
|
||||
}
|
||||
|
||||
QString CardCounterSettings::displayName(int counterId) const
|
||||
{
|
||||
// Currently, card counters name are fixed to A, B, ..., Z, AA, AB, ...
|
||||
|
||||
auto nChars = 1 + counterId / 26;
|
||||
QString str;
|
||||
str.resize(nChars);
|
||||
|
||||
for (auto it = str.rbegin(); it != str.rend(); ++it) {
|
||||
*it = QChar('A' + (counterId) % 26);
|
||||
counterId /= 26;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
34
cockatrice/src/client/settings/card_counter_settings.h
Normal file
34
cockatrice/src/client/settings/card_counter_settings.h
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/**
|
||||
* @file card_counter_settings.h
|
||||
* @ingroup GameSettings
|
||||
* @brief TODO: Document this.
|
||||
*/
|
||||
|
||||
#ifndef CARD_COUNTER_SETTINGS_H
|
||||
#define CARD_COUNTER_SETTINGS_H
|
||||
|
||||
#include <QObject>
|
||||
#include <libcockatrice/settings/settings_manager.h>
|
||||
|
||||
class QSettings;
|
||||
class QColor;
|
||||
|
||||
class CardCounterSettings : public SettingsManager
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CardCounterSettings(const QString &settingsPath, QObject *parent = nullptr);
|
||||
|
||||
QColor color(int counterId) const;
|
||||
|
||||
QString displayName(int counterId) const;
|
||||
|
||||
public slots:
|
||||
void setColor(int counterId, const QColor &color);
|
||||
|
||||
signals:
|
||||
void colorChanged(int counterId, const QColor &color);
|
||||
};
|
||||
|
||||
#endif // CARD_COUNTER_SETTINGS_H
|
||||
167
cockatrice/src/client/settings/shortcut_treeview.cpp
Normal file
167
cockatrice/src/client/settings/shortcut_treeview.cpp
Normal file
|
|
@ -0,0 +1,167 @@
|
|||
#include "shortcut_treeview.h"
|
||||
|
||||
#include "cache_settings.h"
|
||||
#include "shortcuts_settings.h"
|
||||
|
||||
#include <QHeaderView>
|
||||
|
||||
ShortcutFilterProxyModel::ShortcutFilterProxyModel(QObject *parent) : QSortFilterProxyModel(parent)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends the parent and source row together before doing the regex match.
|
||||
*/
|
||||
bool ShortcutFilterProxyModel::filterAcceptsRow(const int sourceRow, const QModelIndex &sourceParent) const
|
||||
{
|
||||
QModelIndex nameIndex = sourceModel()->index(sourceRow, filterKeyColumn(), sourceParent);
|
||||
QModelIndex parentIndex = sourceModel()->index(sourceParent.row(), filterKeyColumn(), sourceParent.parent());
|
||||
|
||||
QString name = sourceModel()->data(nameIndex).toString();
|
||||
QString parentName = sourceModel()->data(parentIndex).toString();
|
||||
|
||||
QString searchedString = parentName + " " + name;
|
||||
|
||||
return searchedString.contains(filterRegularExpression());
|
||||
}
|
||||
|
||||
ShortcutTreeView::ShortcutTreeView(QWidget *parent) : QTreeView(parent)
|
||||
{
|
||||
// model
|
||||
shortcutsModel = new QStandardItemModel(this);
|
||||
shortcutsModel->setColumnCount(3);
|
||||
populateShortcutsModel();
|
||||
|
||||
// filter proxy
|
||||
proxyModel = new ShortcutFilterProxyModel(this);
|
||||
proxyModel->setRecursiveFilteringEnabled(true);
|
||||
proxyModel->setSourceModel(shortcutsModel);
|
||||
proxyModel->setDynamicSortFilter(true);
|
||||
proxyModel->setSortCaseSensitivity(Qt::CaseInsensitive);
|
||||
proxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
|
||||
proxyModel->setFilterKeyColumn(0);
|
||||
|
||||
QTreeView::setModel(proxyModel);
|
||||
|
||||
// treeview
|
||||
hideColumn(2);
|
||||
|
||||
setUniformRowHeights(true);
|
||||
setAlternatingRowColors(true);
|
||||
|
||||
setSortingEnabled(true);
|
||||
proxyModel->sort(0, Qt::AscendingOrder);
|
||||
|
||||
header()->setSectionResizeMode(QHeaderView::Interactive);
|
||||
header()->setSortIndicator(0, Qt::AscendingOrder);
|
||||
setSelectionMode(SingleSelection);
|
||||
setSelectionBehavior(SelectRows);
|
||||
|
||||
expandAll();
|
||||
|
||||
connect(&SettingsCache::instance().shortcuts(), &ShortcutsSettings::shortCutChanged, this,
|
||||
&ShortcutTreeView::refreshShortcuts);
|
||||
}
|
||||
|
||||
void ShortcutTreeView::populateShortcutsModel()
|
||||
{
|
||||
QHash<QString, QStandardItem *> parentItems;
|
||||
QStandardItem *curParent = nullptr;
|
||||
for (const auto &key : SettingsCache::instance().shortcuts().getAllShortcutKeys()) {
|
||||
QString name = SettingsCache::instance().shortcuts().getShortcut(key).getName();
|
||||
QString group = SettingsCache::instance().shortcuts().getShortcut(key).getGroupName();
|
||||
QString shortcut = SettingsCache::instance().shortcuts().getShortcutString(key);
|
||||
|
||||
if (parentItems.contains(group)) {
|
||||
curParent = parentItems.value(group);
|
||||
} else {
|
||||
curParent = new QStandardItem(group);
|
||||
static QFont font = curParent->font();
|
||||
font.setBold(true);
|
||||
curParent->setFont(font);
|
||||
parentItems.insert(group, curParent);
|
||||
}
|
||||
|
||||
QList<QStandardItem *> list = {};
|
||||
list << new QStandardItem(name) << new QStandardItem(shortcut) << new QStandardItem(key);
|
||||
curParent->appendRow(list);
|
||||
}
|
||||
|
||||
for (const auto &parent : parentItems) {
|
||||
shortcutsModel->appendRow(parent);
|
||||
}
|
||||
}
|
||||
|
||||
void ShortcutTreeView::retranslateUi()
|
||||
{
|
||||
shortcutsModel->setHeaderData(0, Qt::Horizontal, tr("Action"));
|
||||
shortcutsModel->setHeaderData(1, Qt::Horizontal, tr("Shortcut"));
|
||||
refreshShortcuts();
|
||||
}
|
||||
|
||||
/**
|
||||
* Loops over the model and reloads all rows
|
||||
*/
|
||||
static void loopOverModel(QAbstractItemModel *model, const QModelIndex &parent = QModelIndex())
|
||||
{
|
||||
for (int r = 0; r < model->rowCount(parent); ++r) {
|
||||
const auto friendlyNameIndex = model->index(r, 0, parent);
|
||||
|
||||
if (model->hasChildren(friendlyNameIndex)) {
|
||||
const auto childIndex = model->index(0, 2, friendlyNameIndex);
|
||||
const auto key = model->data(childIndex).toString();
|
||||
const auto shortcutGroupName = SettingsCache::instance().shortcuts().getShortcut(key).getGroupName();
|
||||
model->setData(friendlyNameIndex, shortcutGroupName);
|
||||
|
||||
loopOverModel(model, friendlyNameIndex);
|
||||
} else {
|
||||
const auto shortcutSequenceIndex = model->index(r, 1, parent);
|
||||
const auto keyIndex = model->index(r, 2, parent);
|
||||
const auto key = model->data(keyIndex).toString();
|
||||
|
||||
const auto shortcutKey = SettingsCache::instance().shortcuts().getShortcut(key).getName();
|
||||
const auto shortcutSequence = SettingsCache::instance().shortcuts().getShortcutString(key);
|
||||
model->setData(friendlyNameIndex, shortcutKey);
|
||||
model->setData(shortcutSequenceIndex, shortcutSequence);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ShortcutTreeView::refreshShortcuts()
|
||||
{
|
||||
loopOverModel(shortcutsModel);
|
||||
}
|
||||
|
||||
void ShortcutTreeView::currentChanged(const QModelIndex ¤t, const QModelIndex & /* previous */)
|
||||
{
|
||||
QTreeView::scrollTo(current, QAbstractItemView::EnsureVisible);
|
||||
if (current.parent().isValid()) {
|
||||
auto shortcutName = model()->data(model()->index(current.row(), 2, current.parent())).toString();
|
||||
emit currentItemChanged(shortcutName);
|
||||
} else {
|
||||
// emit empty string if the selection is a category header
|
||||
emit currentItemChanged("");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The search string is split by word.
|
||||
* A String is a match as long as it contains all the words in the search string in order
|
||||
*/
|
||||
void ShortcutTreeView::updateSearchString(const QString &searchString)
|
||||
{
|
||||
#if QT_VERSION > QT_VERSION_CHECK(5, 14, 0)
|
||||
const auto skipEmptyParts = Qt::SkipEmptyParts;
|
||||
#else
|
||||
const auto skipEmptyParts = QString::SkipEmptyParts;
|
||||
#endif
|
||||
QStringList searchWords = searchString.split(" ", skipEmptyParts);
|
||||
|
||||
auto escapeRegex = [](const QString &s) { return QRegularExpression::escape(s); };
|
||||
std::transform(searchWords.begin(), searchWords.end(), searchWords.begin(), escapeRegex);
|
||||
|
||||
auto regex = QRegularExpression(searchWords.join(".*"), QRegularExpression::CaseInsensitiveOption);
|
||||
|
||||
proxyModel->setFilterRegularExpression(regex);
|
||||
expandAll();
|
||||
}
|
||||
53
cockatrice/src/client/settings/shortcut_treeview.h
Normal file
53
cockatrice/src/client/settings/shortcut_treeview.h
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
/**
|
||||
* @file shortcut_treeview.h
|
||||
* @ingroup CoreSettings
|
||||
* @brief TODO: Document this.
|
||||
*/
|
||||
|
||||
#ifndef SHORTCUT_TREEVIEW_H
|
||||
#define SHORTCUT_TREEVIEW_H
|
||||
|
||||
#include <QModelIndex>
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <QStandardItemModel>
|
||||
#include <QTreeView>
|
||||
|
||||
/**
|
||||
* Custom implementation of QSortFilterProxyModel that appends the source and parent strings together when filtering
|
||||
*/
|
||||
class ShortcutFilterProxyModel : public QSortFilterProxyModel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ShortcutFilterProxyModel(QObject *parent = nullptr);
|
||||
|
||||
protected:
|
||||
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
|
||||
};
|
||||
|
||||
class ShortcutTreeView : public QTreeView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ShortcutTreeView(QWidget *parent);
|
||||
void retranslateUi();
|
||||
|
||||
signals:
|
||||
void currentItemChanged(const QString &shortcut);
|
||||
|
||||
public slots:
|
||||
void updateSearchString(const QString &searchString);
|
||||
|
||||
private:
|
||||
QStandardItemModel *shortcutsModel;
|
||||
ShortcutFilterProxyModel *proxyModel;
|
||||
void populateShortcutsModel();
|
||||
|
||||
private slots:
|
||||
void refreshShortcuts();
|
||||
|
||||
protected:
|
||||
void currentChanged(const QModelIndex ¤t, const QModelIndex &previous) override;
|
||||
};
|
||||
|
||||
#endif // SHORTCUT_TREEVIEW_H
|
||||
263
cockatrice/src/client/settings/shortcuts_settings.cpp
Normal file
263
cockatrice/src/client/settings/shortcuts_settings.cpp
Normal file
|
|
@ -0,0 +1,263 @@
|
|||
#include "shortcuts_settings.h"
|
||||
|
||||
#include <QDebug>
|
||||
#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 name exists
|
||||
if (!shortCuts.contains(*it)) {
|
||||
qCWarning(ShortcutsSettingsLog) << "Unknown shortcut name:" << *it;
|
||||
continue;
|
||||
}
|
||||
|
||||
// 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// PR 5079 changes Textbox/unfocusTextBox to Player/unfocusTextBox and tab_game/aFocusChat to Player/aFocusChat.
|
||||
/// A migration is necessary to let players keep their already configured shortcuts.
|
||||
void ShortcutsSettings::migrateShortcuts()
|
||||
{
|
||||
if (QFile(settingsFilePath).exists()) {
|
||||
QSettings shortCutsFile(settingsFilePath, QSettings::IniFormat);
|
||||
|
||||
shortCutsFile.beginGroup(custom);
|
||||
|
||||
if (shortCutsFile.contains("Textbox/unfocusTextBox")) {
|
||||
qCInfo(ShortcutsSettingsLog)
|
||||
<< "[ShortcutsSettings] Textbox/unfocusTextBox shortcut found. Migrating to Player/unfocusTextBox.";
|
||||
QString unfocusTextBox = shortCutsFile.value("Textbox/unfocusTextBox", "").toString();
|
||||
this->setShortcuts("Player/unfocusTextBox", unfocusTextBox);
|
||||
shortCutsFile.remove("Textbox/unfocusTextBox");
|
||||
}
|
||||
|
||||
if (shortCutsFile.contains("tab_game/aFocusChat")) {
|
||||
qCInfo(ShortcutsSettingsLog)
|
||||
<< "[ShortcutsSettings] tab_game/aFocusChat shortcut found. Migrating to Player/aFocusChat.";
|
||||
QString aFocusChat = shortCutsFile.value("tab_game/aFocusChat", "").toString();
|
||||
this->setShortcuts("Player/aFocusChat", aFocusChat);
|
||||
shortCutsFile.remove("tab_game/aFocusChat");
|
||||
}
|
||||
|
||||
// PR #5564 changes "MainWindow/aDeckEditor" to "Tabs/aTabDeckEditor"
|
||||
if (shortCutsFile.contains("MainWindow/aDeckEditor")) {
|
||||
qCInfo(ShortcutsSettingsLog) << "MainWindow/aDeckEditor shortcut found. Migrating to Tabs/aTabDeckEditor.";
|
||||
QString keySequence = shortCutsFile.value("MainWindow/aDeckEditor", "").toString();
|
||||
this->setShortcuts("Tabs/aTabDeckEditor", keySequence);
|
||||
shortCutsFile.remove("MainWindow/aDeckEditor");
|
||||
}
|
||||
|
||||
shortCutsFile.endGroup();
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the first shortcut for the given action.
|
||||
*
|
||||
* NOTE: In most cases you should be using ShortcutsSettings::getShortcut instead,
|
||||
* as that will return all shortcuts if there are multiple shortcuts.
|
||||
* The only reason to use this method is if an object does not accept multiple shortcuts, such as with QButtons.
|
||||
*/
|
||||
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::getShortcutFriendlyName(const QString &shortcutName) const
|
||||
{
|
||||
for (auto it = defaultShortCuts.cbegin(); it != defaultShortCuts.cend(); ++it) {
|
||||
if (shortcutName == it.key()) {
|
||||
return it.value().getName();
|
||||
}
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
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") || name.startsWith("Replays")) {
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that the shortcut doesn't overlap with an existing shortcut
|
||||
*
|
||||
* @param name The name of the shortcut
|
||||
* @param sequences The shortcut key sequence
|
||||
* @return Whether the shortcut is valid.
|
||||
*/
|
||||
bool ShortcutsSettings::isValid(const QString &name, const QString &sequences) const
|
||||
{
|
||||
return findOverlaps(name, sequences).isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the shortcut is a shortcut that is active in all windows
|
||||
*/
|
||||
static bool isAlwaysActiveShortcut(const QString &shortcutName)
|
||||
{
|
||||
return shortcutName.startsWith("MainWindow") || shortcutName.startsWith("Tabs");
|
||||
}
|
||||
|
||||
QStringList ShortcutsSettings::findOverlaps(const QString &name, const QString &sequences) const
|
||||
{
|
||||
QString checkSequence = sequences.split(sep).last();
|
||||
QString checkKey = name.left(name.indexOf("/"));
|
||||
|
||||
QStringList overlaps;
|
||||
for (const auto &key : shortCuts.keys()) {
|
||||
if (key.startsWith(checkKey) || isAlwaysActiveShortcut(key) || isAlwaysActiveShortcut(checkKey)) {
|
||||
QString storedSequence = stringifySequence(shortCuts.value(key));
|
||||
if (storedSequence.split(sep).contains(checkSequence)) {
|
||||
overlaps.append(getShortcutFriendlyName(key));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return overlaps;
|
||||
}
|
||||
737
cockatrice/src/client/settings/shortcuts_settings.h
Normal file
737
cockatrice/src/client/settings/shortcuts_settings.h
Normal file
|
|
@ -0,0 +1,737 @@
|
|||
/**
|
||||
* @file shortcuts_settings.h
|
||||
* @ingroup CoreSettings
|
||||
* @brief TODO: Document this.
|
||||
*/
|
||||
|
||||
#ifndef SHORTCUTSSETTINGS_H
|
||||
#define SHORTCUTSSETTINGS_H
|
||||
|
||||
#include <QApplication>
|
||||
#include <QKeySequence>
|
||||
#include <QLoggingCategory>
|
||||
#include <QSettings>
|
||||
|
||||
inline Q_LOGGING_CATEGORY(ShortcutsSettingsLog, "shortcuts_settings");
|
||||
|
||||
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,
|
||||
Replays,
|
||||
Tabs
|
||||
};
|
||||
|
||||
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");
|
||||
case Replays:
|
||||
return QApplication::translate("shortcutsTab", "Replays");
|
||||
case Tabs:
|
||||
return QApplication::translate("shortcutsTab", "Tabs");
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
};
|
||||
|
||||
class ShortcutKey : public QList<QKeySequence>
|
||||
{
|
||||
public:
|
||||
explicit ShortcutKey(const QString &_name = QString(),
|
||||
QList _sequence = QList(),
|
||||
ShortcutGroup::Groups _group = ShortcutGroup::Main_Window);
|
||||
void setSequence(const QList &_sequence)
|
||||
{
|
||||
QList::operator=(_sequence);
|
||||
};
|
||||
QString getName() const
|
||||
{
|
||||
return QApplication::translate("shortcutsTab", name.toUtf8().data());
|
||||
};
|
||||
QString getGroupName() const
|
||||
{
|
||||
return ShortcutGroup::getGroupName(group);
|
||||
};
|
||||
|
||||
private:
|
||||
QString name;
|
||||
ShortcutGroup::Groups group;
|
||||
};
|
||||
|
||||
class ShortcutsSettings : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
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
|
||||
{
|
||||
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;
|
||||
QStringList findOverlaps(const QString &name, const QString &sequences) const;
|
||||
|
||||
void resetAllShortcuts();
|
||||
void clearAllShortcuts();
|
||||
void migrateShortcuts();
|
||||
|
||||
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/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)},
|
||||
{"MainWindow/aStatusBar", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Show Status Bar"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Main_Window)},
|
||||
{"TabDeckEditor/aAnalyzeDeck", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Analyze Deck (deckstats.net)"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Deck_Editor)},
|
||||
{"TabDeckEditor/aAnalyzeDeckTappedout",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Analyze Deck (tappedout.net)"),
|
||||
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 (decklist.org)"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Deck_Editor)},
|
||||
{"TabDeckEditor/aExportDeckDecklistXyz",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Export Deck (decklist.xyz)"),
|
||||
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/aEditDeckInClipboard",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Edit Deck in Clipboard, Annotated"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Deck_Editor)},
|
||||
{"TabDeckEditor/aEditDeckInClipboardRaw",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Edit Deck in Clipboard"),
|
||||
parseSequenceString(""),
|
||||
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/aSaveDeckToClipboardNoSetInfo",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Save Deck to Clipboard, Annotated (No Set Info)"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Deck_Editor)},
|
||||
{"TabDeckEditor/aSaveDeckToClipboardRaw",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Save Deck to Clipboard"),
|
||||
parseSequenceString("Ctrl+Shift+R"),
|
||||
ShortcutGroup::Deck_Editor)},
|
||||
{"TabDeckEditor/aSaveDeckToClipboardRawNoSetInfo",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Save Deck to Clipboard (No Set Info)"),
|
||||
parseSequenceString(""),
|
||||
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/loadFromClipboardButton",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Load Deck from Clipboard..."),
|
||||
parseSequenceString("Ctrl+Shift+V"),
|
||||
ShortcutGroup::Game_Lobby)},
|
||||
{"DeckViewContainer/unloadDeckButton", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Unload Deck"),
|
||||
parseSequenceString("Ctrl+Alt+U"),
|
||||
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)},
|
||||
{"DeckViewContainer/forceStartGameButton", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Force Start"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Game_Lobby)},
|
||||
{"Player/aCCMagenta", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Add Card Counter (F)"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Card_Counters)},
|
||||
{"Player/aRCMagenta", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Remove Card Counter (F)"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Card_Counters)},
|
||||
{"Player/aSCMagenta", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Set Card Counters (F)..."),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Card_Counters)},
|
||||
{"Player/aCCPurple", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Add Card Counter (E)"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Card_Counters)},
|
||||
{"Player/aRCPurple", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Remove Card Counter (E)"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Card_Counters)},
|
||||
{"Player/aSCPurple", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Set Card Counters (E)..."),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Card_Counters)},
|
||||
{"Player/aCCCyan", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Add Card Counter(D)"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Card_Counters)},
|
||||
{"Player/aRCCyan", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Remove Card Counter (D)"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Card_Counters)},
|
||||
{"Player/aSCCyan", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Set Card Counters (D)..."),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Card_Counters)},
|
||||
{"Player/aCCGreen", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Add Card Counter (C)"),
|
||||
parseSequenceString("Ctrl+>"),
|
||||
ShortcutGroup::Card_Counters)},
|
||||
{"Player/aRCGreen", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Remove Card Counter (C)"),
|
||||
parseSequenceString("Ctrl+<"),
|
||||
ShortcutGroup::Card_Counters)},
|
||||
{"Player/aSCGreen", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Set Card Counters (C)..."),
|
||||
parseSequenceString("Ctrl+?"),
|
||||
ShortcutGroup::Card_Counters)},
|
||||
{"Player/aCCYellow", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Add Card Counter (B)"),
|
||||
parseSequenceString("Ctrl+."),
|
||||
ShortcutGroup::Card_Counters)},
|
||||
{"Player/aRCYellow", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Remove Card Counter (B)"),
|
||||
parseSequenceString("Ctrl+,"),
|
||||
ShortcutGroup::Card_Counters)},
|
||||
{"Player/aSCYellow", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Set Card Counters (B)..."),
|
||||
parseSequenceString("Ctrl+/"),
|
||||
ShortcutGroup::Card_Counters)},
|
||||
{"Player/aCCRed", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Add Card Counter (A)"),
|
||||
parseSequenceString("Alt+."),
|
||||
ShortcutGroup::Card_Counters)},
|
||||
{"Player/aRCRed", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Remove Card Counter (A)"),
|
||||
parseSequenceString("Alt+,"),
|
||||
ShortcutGroup::Card_Counters)},
|
||||
{"Player/aSCRed", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Set Card Counters (A)..."),
|
||||
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/aIncrementAllCardCounters",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Increment all card counters"),
|
||||
parseSequenceString("Ctrl+Shift+A"),
|
||||
ShortcutGroup::Playing_Area)},
|
||||
{"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/aHide", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Hide Card in Reveal Window"),
|
||||
parseSequenceString("Alt+H"),
|
||||
ShortcutGroup::Playing_Area)},
|
||||
{"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/aSelectAll", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Select All Cards in Zone"),
|
||||
parseSequenceString("Ctrl+A"),
|
||||
ShortcutGroup::Playing_Area)},
|
||||
{"Player/aSelectRow", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Select All Cards in Row"),
|
||||
parseSequenceString("Ctrl+Shift+X"),
|
||||
ShortcutGroup::Playing_Area)},
|
||||
{"Player/aSelectColumn", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Select All Cards in Column"),
|
||||
parseSequenceString("Ctrl+Shift+C"),
|
||||
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/aSortHand", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Sort Hand"),
|
||||
parseSequenceString("Ctrl+Shift+H"),
|
||||
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/aViewBottomCards", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Bottom Cards of Library"),
|
||||
parseSequenceString("Ctrl+Shift+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("Alt+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/aShuffleTopCards", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Shuffle Top Cards of Library"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Gameplay)},
|
||||
{"Player/aShuffleBottomCards", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Shuffle Bottom Cards of Library"),
|
||||
parseSequenceString(""),
|
||||
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)},
|
||||
{"Player/unfocusTextBox", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Unfocus Text Box"),
|
||||
parseSequenceString("Esc"),
|
||||
ShortcutGroup::Chat_room)},
|
||||
{"Player/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)},
|
||||
{"Replays/aSkipForward", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Skip Forward"),
|
||||
parseSequenceString("Right"),
|
||||
ShortcutGroup::Replays)},
|
||||
{"Replays/aSkipBackward", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Skip Backward"),
|
||||
parseSequenceString("Left"),
|
||||
ShortcutGroup::Replays)},
|
||||
{"Replays/aSkipForwardBig", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Skip Forward by a lot"),
|
||||
parseSequenceString("Ctrl+Right"),
|
||||
ShortcutGroup::Replays)},
|
||||
{"Replays/aSkipBackwardBig", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Skip Backward by a lot"),
|
||||
parseSequenceString("Ctrl+Left"),
|
||||
ShortcutGroup::Replays)},
|
||||
{"Replays/playButton", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Play/Pause"),
|
||||
parseSequenceString("Space"),
|
||||
ShortcutGroup::Replays)},
|
||||
{"Replays/fastForwardButton", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Toggle Fast Forward"),
|
||||
parseSequenceString("Ctrl+P"),
|
||||
ShortcutGroup::Replays)},
|
||||
{"Tabs/aTabDeckEditor",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Deck Editor"), parseSequenceString(""), ShortcutGroup::Tabs)},
|
||||
{"Tabs/aTabHome",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Home"), parseSequenceString(""), ShortcutGroup::Tabs)},
|
||||
{"Tabs/aTabVisualDeckStorage", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Visual Deck Storage"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Tabs)},
|
||||
{"Tabs/aTabDeckStorage",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Deck Storage"), parseSequenceString(""), ShortcutGroup::Tabs)},
|
||||
{"Tabs/aTabReplays",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Replays"), parseSequenceString(""), ShortcutGroup::Tabs)},
|
||||
{"Tabs/aTabServer",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Server"), parseSequenceString(""), ShortcutGroup::Tabs)},
|
||||
{"Tabs/aTabAccount",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Account"), parseSequenceString(""), ShortcutGroup::Tabs)},
|
||||
{"Tabs/aTabAdmin", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Administration"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Tabs)},
|
||||
{"Tabs/aTabLogs",
|
||||
ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Logs"), parseSequenceString(""), ShortcutGroup::Tabs)},
|
||||
};
|
||||
};
|
||||
|
||||
#endif // SHORTCUTSSETTINGS_H
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
#include "sound_engine.h"
|
||||
|
||||
#include "settings/cache_settings.h"
|
||||
|
||||
#include <QDir>
|
||||
#include <QMediaPlayer>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||
#include <QAudioOutput>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
#ifndef COCKATRICE_SETTINGS_CARD_PREFERENCE_PROVIDER_H
|
||||
#define COCKATRICE_SETTINGS_CARD_PREFERENCE_PROVIDER_H
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
|
||||
#include <libcockatrice/interfaces/interface_card_preference_provider.h>
|
||||
|
||||
class SettingsCardPreferenceProvider : public ICardPreferenceProvider
|
||||
{
|
||||
public:
|
||||
QString getCardPreferenceOverride(const QString &cardName) const override
|
||||
{
|
||||
return SettingsCache::instance().cardOverrides().getCardPreferenceOverride(cardName);
|
||||
}
|
||||
|
||||
bool getIncludeRebalancedCards() const override
|
||||
{
|
||||
return SettingsCache::instance().getIncludeRebalancedCards();
|
||||
};
|
||||
};
|
||||
|
||||
#endif // COCKATRICE_SETTINGS_CARD_PREFERENCE_PROVIDER_H
|
||||
|
|
@ -1,10 +1,11 @@
|
|||
#include "abstract_card_drag_item.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
|
||||
#include <QCursor>
|
||||
#include <QDebug>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QPainter>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
static const float CARD_WIDTH_HALF = CARD_WIDTH / 2;
|
||||
static const float CARD_HEIGHT_HALF = CARD_HEIGHT / 2;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "abstract_card_item.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../interface/card_picture_loader/card_picture_loader.h"
|
||||
#include "../game_scene.h"
|
||||
|
||||
|
|
@ -10,7 +11,6 @@
|
|||
#include <algorithm>
|
||||
#include <libcockatrice/card/database/card_database.h>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
AbstractCardItem::AbstractCardItem(QGraphicsItem *parent, const CardRef &cardRef, Player *_owner, int _id)
|
||||
: ArrowTarget(_owner, parent), id(_id), cardRef(cardRef), tapped(false), facedown(false), tapAngle(0),
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "abstract_counter.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../interface/widgets/tabs/tab_game.h"
|
||||
#include "../player/player.h"
|
||||
#include "translate_counter_name.h"
|
||||
|
|
@ -14,7 +15,6 @@
|
|||
#include <QString>
|
||||
#include <libcockatrice/protocol/pb/command_inc_counter.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_set_counter.pb.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <libcockatrice/utility/expression.h>
|
||||
|
||||
AbstractCounter::AbstractCounter(Player *_player,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#define _USE_MATH_DEFINES
|
||||
#include "arrow_item.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../player/player.h"
|
||||
#include "../player/player_target.h"
|
||||
#include "../zones/card_zone.h"
|
||||
|
|
@ -15,7 +16,6 @@
|
|||
#include <libcockatrice/protocol/pb/command_attach_card.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_create_arrow.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_delete_arrow.pb.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <libcockatrice/utility/color.h>
|
||||
|
||||
ArrowItem::ArrowItem(Player *_player, int _id, ArrowTarget *_startItem, ArrowTarget *_targetItem, const QColor &_color)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "card_item.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../interface/widgets/tabs/tab_game.h"
|
||||
#include "../game_scene.h"
|
||||
#include "../player/player.h"
|
||||
|
|
@ -10,14 +11,13 @@
|
|||
#include "arrow_item.h"
|
||||
#include "card_drag_item.h"
|
||||
|
||||
#include <../../client/settings/card_counter_settings.h>
|
||||
#include <QApplication>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QMenu>
|
||||
#include <QPainter>
|
||||
#include <libcockatrice/card/card_info.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_card.pb.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <libcockatrice/settings/card_counter_settings.h>
|
||||
|
||||
CardItem::CardItem(Player *_owner, QGraphicsItem *parent, const CardRef &cardRef, int _cardid, CardZoneLogic *_zone)
|
||||
: AbstractCardItem(parent, cardRef, _owner, _cardid), zone(_zone), attacking(false), destroyOnZoneChange(false),
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "deck_view.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../interface/theme_manager.h"
|
||||
|
||||
#include <QApplication>
|
||||
|
|
@ -10,7 +11,6 @@
|
|||
#include <libcockatrice/card/card_info.h>
|
||||
#include <libcockatrice/deck_list/deck_list.h>
|
||||
#include <libcockatrice/deck_list/deck_list_card_node.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
DeckViewCardDragItem::DeckViewCardDragItem(DeckViewCard *_item,
|
||||
const QPointF &_hotSpot,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "deck_view_container.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../interface/card_picture_loader/card_picture_loader.h"
|
||||
#include "../../interface/widgets/dialogs/dlg_load_deck.h"
|
||||
#include "../../interface/widgets/dialogs/dlg_load_deck_from_clipboard.h"
|
||||
|
|
@ -22,7 +23,6 @@
|
|||
#include <libcockatrice/protocol/pb/command_set_sideboard_plan.pb.h>
|
||||
#include <libcockatrice/protocol/pb/response_deck_download.pb.h>
|
||||
#include <libcockatrice/protocol/pending_command.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <libcockatrice/utility/trice_limits.h>
|
||||
|
||||
ToggleButton::ToggleButton(QWidget *parent) : QPushButton(parent), state(false)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "dlg_create_token.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../interface/widgets/cards/card_info_picture_widget.h"
|
||||
#include "../../main.h"
|
||||
|
||||
|
|
@ -20,7 +21,6 @@
|
|||
#include <libcockatrice/deck_list/deck_list.h>
|
||||
#include <libcockatrice/models/database/card_database_model.h>
|
||||
#include <libcockatrice/models/database/token/token_display_model.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <libcockatrice/utility/trice_limits.h>
|
||||
|
||||
DlgCreateToken::DlgCreateToken(const QStringList &_predefinedTokens, QWidget *parent)
|
||||
|
|
@ -199,16 +199,7 @@ void DlgCreateToken::tokenSelectionChanged(const QModelIndex ¤t, const QMo
|
|||
annotationEdit->setText("");
|
||||
}
|
||||
|
||||
const auto &cardProviderId =
|
||||
SettingsCache::instance().cardOverrides().getCardPreferenceOverride(cardInfo->getName());
|
||||
if (!cardProviderId.isEmpty()) {
|
||||
CardRef ref;
|
||||
ref.name = cardInfo->getName();
|
||||
ref.providerId = cardProviderId;
|
||||
pic->setCard(CardDatabaseManager::query()->getCard(ref));
|
||||
} else {
|
||||
pic->setCard(CardDatabaseManager::query()->getPreferredCard(cardInfo));
|
||||
}
|
||||
pic->setCard(CardDatabaseManager::query()->getPreferredCard(cardInfo));
|
||||
}
|
||||
|
||||
void DlgCreateToken::updateSearchFieldWithoutUpdatingFilter(const QString &newValue) const
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "game_scene.h"
|
||||
|
||||
#include "../client/settings/cache_settings.h"
|
||||
#include "board/card_item.h"
|
||||
#include "phases_toolbar.h"
|
||||
#include "player/player.h"
|
||||
|
|
@ -14,7 +15,6 @@
|
|||
#include <QGraphicsView>
|
||||
#include <QSet>
|
||||
#include <QtMath>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <numeric>
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
#include "game_view.h"
|
||||
|
||||
#include "../client/settings/cache_settings.h"
|
||||
#include "game_scene.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QResizeEvent>
|
||||
#include <QRubberBand>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
GameView::GameView(GameScene *scene, QWidget *parent) : QGraphicsView(scene, parent), rubberBand(0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@
|
|||
#include "../player/player.h"
|
||||
#include "../zones/card_zone.h"
|
||||
|
||||
#include <../../client/settings/card_counter_settings.h>
|
||||
#include <libcockatrice/protocol/pb/context_move_card.pb.h>
|
||||
#include <libcockatrice/protocol/pb/context_mulligan.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_user.pb.h>
|
||||
#include <libcockatrice/settings/card_counter_settings.h>
|
||||
#include <utility>
|
||||
|
||||
static const QString TABLE_ZONE_NAME = "table";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "card_menu.h"
|
||||
|
||||
#include "../../../client/settings/card_counter_settings.h"
|
||||
#include "../../../interface/widgets/tabs/tab_game.h"
|
||||
#include "../../board/card_item.h"
|
||||
#include "../../zones/logic/view_zone_logic.h"
|
||||
|
|
@ -11,7 +12,6 @@
|
|||
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/card/relation/card_relation.h>
|
||||
#include <libcockatrice/settings/card_counter_settings.h>
|
||||
|
||||
CardMenu::CardMenu(Player *_player, const CardItem *_card, bool _shortcutsActive)
|
||||
: player(_player), card(_card), shortcutsActive(_shortcutsActive)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "hand_menu.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../client/settings/shortcuts_settings.h"
|
||||
#include "../../abstract_game.h"
|
||||
#include "../../zones/hand_zone.h"
|
||||
#include "../player.h"
|
||||
|
|
@ -7,8 +9,6 @@
|
|||
|
||||
#include <QAction>
|
||||
#include <QMenu>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <libcockatrice/settings/shortcuts_settings.h>
|
||||
|
||||
HandMenu::HandMenu(Player *_player, PlayerActions *actions, QWidget *parent) : TearOffMenu(parent), player(_player)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "library_menu.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../client/settings/shortcuts_settings.h"
|
||||
#include "../../../interface/widgets/tabs/tab_game.h"
|
||||
#include "../../abstract_game.h"
|
||||
#include "../player.h"
|
||||
|
|
@ -7,8 +9,6 @@
|
|||
|
||||
#include <QAction>
|
||||
#include <QMenu>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <libcockatrice/settings/shortcuts_settings.h>
|
||||
|
||||
LibraryMenu::LibraryMenu(Player *_player, QWidget *parent) : TearOffMenu(parent), player(_player)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
#include "say_menu.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../player.h"
|
||||
#include "../player_actions.h"
|
||||
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
SayMenu::SayMenu(Player *_player) : player(_player)
|
||||
{
|
||||
connect(&SettingsCache::instance().messages(), &MessageSettings::messageMacrosChanged, this, &SayMenu::initSayMenu);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "hand_zone.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../interface/theme_manager.h"
|
||||
#include "../board/card_drag_item.h"
|
||||
#include "../board/card_item.h"
|
||||
|
|
@ -7,7 +8,6 @@
|
|||
|
||||
#include <QPainter>
|
||||
#include <libcockatrice/protocol/pb/command_move_card.pb.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
HandZone::HandZone(HandZoneLogic *_logic, int _zoneHeight, QGraphicsItem *parent)
|
||||
: SelectZone(_logic, parent), zoneHeight(_zoneHeight)
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
#include "view_zone_logic.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../board/card_item.h"
|
||||
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
/**
|
||||
* @param _player the player that the cards are revealed to.
|
||||
* @param _origZone the zone the cards were revealed from.
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
#include "select_zone.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../board/card_item.h"
|
||||
#include "../game_scene.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
qreal divideCardSpaceInZone(qreal index, int cardCount, qreal totalHeight, qreal cardHeight, bool reverse)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "stack_zone.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../interface/theme_manager.h"
|
||||
#include "../board/arrow_item.h"
|
||||
#include "../board/card_drag_item.h"
|
||||
|
|
@ -10,7 +11,6 @@
|
|||
#include <QPainter>
|
||||
#include <QSet>
|
||||
#include <libcockatrice/protocol/pb/command_move_card.pb.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
StackZone::StackZone(StackZoneLogic *_logic, int _zoneHeight, QGraphicsItem *parent)
|
||||
: SelectZone(_logic, parent), zoneHeight(_zoneHeight)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "table_zone.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../interface/theme_manager.h"
|
||||
#include "../board/arrow_item.h"
|
||||
#include "../board/card_drag_item.h"
|
||||
|
|
@ -13,7 +14,6 @@
|
|||
#include <libcockatrice/card/card_info.h>
|
||||
#include <libcockatrice/protocol/pb/command_move_card.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_set_card_attr.pb.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
const QColor TableZone::BACKGROUND_COLOR = QColor(100, 100, 100);
|
||||
const QColor TableZone::FADE_MASK = QColor(0, 0, 0, 80);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "view_zone_widget.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../filters/syntax_help.h"
|
||||
#include "../../interface/pixel_map_generator.h"
|
||||
#include "../board/card_item.h"
|
||||
|
|
@ -17,7 +18,6 @@
|
|||
#include <QStyleOption>
|
||||
#include <QStyleOptionTitleBar>
|
||||
#include <libcockatrice/protocol/pb/command_shuffle.pb.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
/**
|
||||
* @param _player the player the cards were revealed to.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "card_picture_loader.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QBuffer>
|
||||
#include <QDebug>
|
||||
|
|
@ -15,7 +17,6 @@
|
|||
#include <QStatusBar>
|
||||
#include <QThread>
|
||||
#include <algorithm>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <utility>
|
||||
|
||||
// never cache more than 300 cards at once for a single deck
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
#include "card_picture_loader_local.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "card_picture_to_load.h"
|
||||
|
||||
#include <QDirIterator>
|
||||
#include <QMovie>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
static constexpr int REFRESH_INTERVAL_MS = 10 * 1000;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "card_picture_loader_worker.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "card_picture_loader_local.h"
|
||||
#include "card_picture_loader_worker_work.h"
|
||||
|
||||
|
|
@ -9,7 +10,6 @@
|
|||
#include <QNetworkReply>
|
||||
#include <QThread>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <utility>
|
||||
|
||||
static constexpr int MAX_REQUESTS_PER_SEC = 10;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "card_picture_loader_worker_work.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "card_picture_loader_worker.h"
|
||||
|
||||
#include <QBuffer>
|
||||
|
|
@ -11,7 +12,6 @@
|
|||
#include <QThread>
|
||||
#include <QThreadPool>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
// Card back returned by gatherer when card is not found
|
||||
static const QStringList MD5_BLACKLIST = {"db0c48db407a907c16ade38de048a441"};
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
#include "card_picture_to_load.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDate>
|
||||
#include <QRegularExpression>
|
||||
#include <QUrl>
|
||||
#include <algorithm>
|
||||
#include <libcockatrice/card/set/card_set_comparator.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
CardPictureToLoad::CardPictureToLoad(const ExactCard &_card)
|
||||
: card(_card), urlTemplates(SettingsCache::instance().downloads().getAllURLs())
|
||||
|
|
@ -33,7 +34,7 @@ QList<CardSetPtr> CardPictureToLoad::extractSetsSorted(const ExactCard &card)
|
|||
}
|
||||
}
|
||||
if (sortedSets.empty()) {
|
||||
sortedSets << CardSet::newInstance("", "", "", QDate());
|
||||
sortedSets << CardSet::newInstance(SettingsCache::instance().cardDatabase(), "", "", "", QDate());
|
||||
}
|
||||
std::sort(sortedSets.begin(), sortedSets.end(), SetPriorityComparator());
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
#include "theme_manager.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QColor>
|
||||
#include <QDebug>
|
||||
#include <QLibraryInfo>
|
||||
#include <QPixmapCache>
|
||||
#include <QStandardPaths>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
#define NONE_THEME_NAME "Default"
|
||||
#define STYLE_CSS_NAME "style.css"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "color_identity_widget.h"
|
||||
|
||||
#include "../../../../client/settings/cache_settings.h"
|
||||
#include "mana_symbol_widget.h"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
|
|
@ -8,7 +9,6 @@
|
|||
#include <QRegularExpression>
|
||||
#include <QResizeEvent>
|
||||
#include <QSize>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
ColorIdentityWidget::ColorIdentityWidget(QWidget *parent, CardInfoPtr _card) : QWidget(parent), card(_card)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
#include "mana_symbol_widget.h"
|
||||
|
||||
#include "../../../../client/settings/cache_settings.h"
|
||||
|
||||
#include <QResizeEvent>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
ManaSymbolWidget::ManaSymbolWidget(QWidget *parent, QString _symbol, bool _isActive, bool _mayBeToggled)
|
||||
: QLabel(parent), symbol(_symbol), isActive(_isActive), mayBeToggled(_mayBeToggled)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "card_info_frame_widget.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../game/board/card_item.h"
|
||||
#include "card_info_display_widget.h"
|
||||
#include "card_info_picture_widget.h"
|
||||
|
|
@ -9,7 +10,6 @@
|
|||
#include <QVBoxLayout>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/card/relation/card_relation.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <utility>
|
||||
|
||||
CardInfoFrameWidget::CardInfoFrameWidget(QWidget *parent)
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
#include "card_info_picture_enlarged_widget.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../interface/card_picture_loader/card_picture_loader.h"
|
||||
|
||||
#include <QPainterPath>
|
||||
#include <QStylePainter>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <utility>
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "card_info_picture_widget.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../game/board/card_item.h"
|
||||
#include "../../../interface/card_picture_loader/card_picture_loader.h"
|
||||
#include "../../../interface/widgets/tabs/tab_supervisor.h"
|
||||
|
|
@ -12,7 +13,6 @@
|
|||
#include <QWidget>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/card/relation/card_relation.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <utility>
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
#include "card_size_widget.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../printing_selector/printing_selector.h"
|
||||
#include "../visual_deck_storage/visual_deck_storage_widget.h"
|
||||
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
/**
|
||||
* @class CardSizeWidget
|
||||
* @brief A widget for adjusting card sizes using a slider.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "deck_preview_card_picture_widget.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QFileInfo>
|
||||
#include <QFontMetrics>
|
||||
|
|
@ -7,7 +9,6 @@
|
|||
#include <QPainterPath>
|
||||
#include <QStylePainter>
|
||||
#include <QTextOption>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
/**
|
||||
* @brief Constructs a CardPictureWithTextOverlay widget.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "deck_editor_database_display_widget.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../filters/syntax_help.h"
|
||||
#include "../../../interface/widgets/tabs/abstract_tab_deck_editor.h"
|
||||
#include "../../../interface/widgets/tabs/tab_supervisor.h"
|
||||
|
|
@ -14,7 +15,6 @@
|
|||
#include <QTreeView>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/card/relation/card_relation.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
static bool canBeCommander(const CardInfo &cardInfo)
|
||||
{
|
||||
|
|
@ -143,7 +143,7 @@ void DeckEditorDatabaseDisplayWidget::updateCard(const QModelIndex ¤t, con
|
|||
}
|
||||
|
||||
if (!current.model()->hasChildren(current.sibling(current.row(), 0))) {
|
||||
emit cardChanged(getCardOrPinnedPrinting(cardName));
|
||||
emit cardChanged(CardDatabaseManager::query()->getPreferredCard(cardName));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -176,21 +176,7 @@ ExactCard DeckEditorDatabaseDisplayWidget::currentCard() const
|
|||
|
||||
const QString cardName = currentIndex.sibling(currentIndex.row(), 0).data().toString();
|
||||
|
||||
return getCardOrPinnedPrinting(cardName);
|
||||
}
|
||||
|
||||
ExactCard DeckEditorDatabaseDisplayWidget::getCardOrPinnedPrinting(QString cardName) const
|
||||
{
|
||||
const auto &cardProviderId = SettingsCache::instance().cardOverrides().getCardPreferenceOverride(cardName);
|
||||
|
||||
ExactCard card = CardDatabaseManager::query()->getCard({cardName});
|
||||
|
||||
if (cardProviderId != "") {
|
||||
return ExactCard(card.getCardPtr(),
|
||||
CardDatabaseManager::query()->getSpecificPrinting({cardName, cardProviderId}));
|
||||
}
|
||||
|
||||
return card;
|
||||
return CardDatabaseManager::query()->getPreferredCard(cardName);
|
||||
}
|
||||
|
||||
void DeckEditorDatabaseDisplayWidget::databaseCustomMenu(QPoint point)
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ public:
|
|||
|
||||
public slots:
|
||||
ExactCard currentCard() const;
|
||||
ExactCard getCardOrPinnedPrinting(QString cardName) const;
|
||||
void setFilterTree(FilterTree *filterTree);
|
||||
void clearAllDatabaseFilters();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "deck_editor_deck_dock_widget.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QDockWidget>
|
||||
#include <QHeaderView>
|
||||
|
|
@ -7,7 +9,6 @@
|
|||
#include <QSplitter>
|
||||
#include <QTextEdit>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <libcockatrice/utility/trice_limits.h>
|
||||
|
||||
DeckEditorDeckDockWidget::DeckEditorDeckDockWidget(AbstractTabDeckEditor *parent)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "deck_editor_filter_dock_widget.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../filters/filter_builder.h"
|
||||
#include "../../../filters/filter_tree_model.h"
|
||||
|
||||
|
|
@ -7,7 +8,6 @@
|
|||
#include <QMenu>
|
||||
#include <QToolButton>
|
||||
#include <libcockatrice/models/database/card_database_model.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
DeckEditorFilterDockWidget::DeckEditorFilterDockWidget(AbstractTabDeckEditor *parent)
|
||||
: QDockWidget(parent), deckEditor(parent)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "dlg_connect.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QComboBox>
|
||||
#include <QDebug>
|
||||
|
|
@ -12,7 +14,6 @@
|
|||
#include <QMessageBox>
|
||||
#include <QPushButton>
|
||||
#include <QRadioButton>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <libcockatrice/utility/trice_limits.h>
|
||||
|
||||
DlgConnect::DlgConnect(QWidget *parent) : QDialog(parent)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "dlg_create_game.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../interface/widgets/tabs/tab_room.h"
|
||||
|
||||
#include <QApplication>
|
||||
|
|
@ -17,7 +18,6 @@
|
|||
#include <QWizard>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_game.pb.h>
|
||||
#include <libcockatrice/protocol/pending_command.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <libcockatrice/utility/trice_limits.h>
|
||||
|
||||
void DlgCreateGame::sharedCtor()
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
#include "dlg_default_tags_editor.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <QVBoxLayout>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
DlgDefaultTagsEditor::DlgDefaultTagsEditor(QWidget *parent) : QDialog(parent)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
#include "dlg_edit_password.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
|
||||
#include <QDialogButtonBox>
|
||||
#include <QGridLayout>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QMessageBox>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <libcockatrice/utility/trice_limits.h>
|
||||
|
||||
DlgEditPassword::DlgEditPassword(QWidget *parent) : QDialog(parent)
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
#include "dlg_edit_user.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QGridLayout>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <libcockatrice/utility/trice_limits.h>
|
||||
|
||||
DlgEditUser::DlgEditUser(QWidget *parent, QString email, QString country, QString realName) : QDialog(parent)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "dlg_forgot_password_challenge.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QDebug>
|
||||
#include <QDialogButtonBox>
|
||||
|
|
@ -7,7 +9,6 @@
|
|||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QMessageBox>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <libcockatrice/utility/trice_limits.h>
|
||||
|
||||
DlgForgotPasswordChallenge::DlgForgotPasswordChallenge(QWidget *parent) : QDialog(parent)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "dlg_forgot_password_request.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QDebug>
|
||||
#include <QDialogButtonBox>
|
||||
|
|
@ -7,7 +9,6 @@
|
|||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QMessageBox>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <libcockatrice/utility/trice_limits.h>
|
||||
|
||||
DlgForgotPasswordRequest::DlgForgotPasswordRequest(QWidget *parent) : QDialog(parent)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "dlg_forgot_password_reset.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QDebug>
|
||||
#include <QDialogButtonBox>
|
||||
|
|
@ -7,7 +9,6 @@
|
|||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QMessageBox>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <libcockatrice/utility/trice_limits.h>
|
||||
|
||||
DlgForgotPasswordReset::DlgForgotPasswordReset(QWidget *parent) : QDialog(parent)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
#include "dlg_load_deck.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
|
||||
#include <libcockatrice/models/deck_list/deck_loader.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
DlgLoadDeck::DlgLoadDeck(QWidget *parent) : QFileDialog(parent, tr("Load Deck"))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "dlg_load_deck_from_clipboard.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "dlg_settings.h"
|
||||
|
||||
#include <QApplication>
|
||||
|
|
@ -12,7 +13,6 @@
|
|||
#include <QTextStream>
|
||||
#include <QVBoxLayout>
|
||||
#include <libcockatrice/models/deck_list/deck_loader.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
/**
|
||||
* Creates the main layout and connects the signals that are common to all versions of this window
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "dlg_manage_sets.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../interface/card_picture_loader/card_picture_loader.h"
|
||||
#include "../interface/widgets/utility/custom_line_edit.h"
|
||||
#include "../main.h"
|
||||
|
|
@ -21,7 +22,6 @@
|
|||
#include <algorithm>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/models/database/card_set/card_sets_model.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
#define SORT_RESET -1
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "dlg_register.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QDebug>
|
||||
#include <QDialogButtonBox>
|
||||
|
|
@ -8,7 +10,6 @@
|
|||
#include <QLabel>
|
||||
#include <QMessageBox>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_user.pb.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <libcockatrice/utility/trice_limits.h>
|
||||
|
||||
DlgRegister::DlgRegister(QWidget *parent) : QDialog(parent)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "dlg_settings.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../client/settings/shortcut_treeview.h"
|
||||
#include "../client/network/update/card_spoiler/spoiler_background_updater.h"
|
||||
#include "../client/network/update/client/release_channel.h"
|
||||
#include "../client/sound_engine.h"
|
||||
|
|
@ -12,6 +14,7 @@
|
|||
#include "../interface/widgets/utility/sequence_edit.h"
|
||||
#include "../main.h"
|
||||
|
||||
#include <../../client/settings/card_counter_settings.h>
|
||||
#include <QAbstractButton>
|
||||
#include <QAbstractListModel>
|
||||
#include <QAction>
|
||||
|
|
@ -45,9 +48,6 @@
|
|||
#include <QVariant>
|
||||
#include <libcockatrice/card/database/card_database.h>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <libcockatrice/settings/card_counter_settings.h>
|
||||
#include <libcockatrice/settings/shortcut_treeview.h>
|
||||
|
||||
#define WIKI_CUSTOM_PIC_URL "https://github.com/Cockatrice/Cockatrice/wiki/Custom-Picture-Download-URLs"
|
||||
#define WIKI_CUSTOM_SHORTCUTS "https://github.com/Cockatrice/Cockatrice/wiki/Custom-Keyboard-Shortcuts"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
#include "dlg_startup_card_check.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
|
||||
#include <QDate>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
DlgStartupCardCheck::DlgStartupCardCheck(QWidget *parent) : QDialog(parent)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "dlg_tip_of_the_day.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "tip_of_the_day.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
|
|
@ -9,7 +10,6 @@
|
|||
#include <QGridLayout>
|
||||
#include <QLabel>
|
||||
#include <QPushButton>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
#define MIN_TIP_IMAGE_HEIGHT 200
|
||||
#define MIN_TIP_IMAGE_WIDTH 200
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "dlg_update.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../client/network/update/client/client_update_checker.h"
|
||||
#include "../client/network/update/client/release_channel.h"
|
||||
#include "../interface/window_main.h"
|
||||
|
|
@ -13,7 +14,6 @@
|
|||
#include <QPushButton>
|
||||
#include <QVBoxLayout>
|
||||
#include <QtNetwork>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <version_string.h>
|
||||
|
||||
DlgUpdate::DlgUpdate(QWidget *parent) : QDialog(parent)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "dlg_view_log.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../logger.h"
|
||||
|
||||
#include <QClipboard>
|
||||
|
|
@ -7,7 +8,6 @@
|
|||
#include <QPushButton>
|
||||
#include <QRegularExpression>
|
||||
#include <QVBoxLayout>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
DlgViewLog::DlgViewLog(QWidget *parent) : QDialog(parent)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "home_widget.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../interface/widgets/tabs/tab_supervisor.h"
|
||||
#include "../../window_main.h"
|
||||
#include "background_sources.h"
|
||||
|
|
@ -11,7 +12,6 @@
|
|||
#include <QVBoxLayout>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/network/client/remote/remote_client.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
HomeWidget::HomeWidget(QWidget *parent, TabSupervisor *_tabSupervisor)
|
||||
: QWidget(parent), tabSupervisor(_tabSupervisor), background("theme:backgrounds/home"), overlay("theme:cockatrice")
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "../../../interface/widgets/menus/deck_editor_menu.h"
|
||||
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <libcockatrice/settings/shortcuts_settings.h>
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../client/settings/shortcuts_settings.h"
|
||||
|
||||
DeckEditorMenu::DeckEditorMenu(AbstractTabDeckEditor *parent) : QMenu(parent), deckEditor(parent)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,8 +6,9 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
|
||||
#include <QMenu>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
class TearOffMenu : public QMenu
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "printing_selector.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../interface/card_picture_loader/card_picture_loader.h"
|
||||
#include "../../../interface/widgets/dialogs/dlg_select_set_for_cards.h"
|
||||
#include "printing_selector_card_display_widget.h"
|
||||
|
|
@ -9,7 +10,6 @@
|
|||
|
||||
#include <QFrame>
|
||||
#include <QScrollBar>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <qboxlayout.h>
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "printing_selector_card_overlay_widget.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "printing_selector_card_display_widget.h"
|
||||
|
||||
#include <QMenu>
|
||||
|
|
@ -7,7 +8,6 @@
|
|||
#include <QVBoxLayout>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/card/relation/card_relation.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <utility>
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
#include "printing_selector_card_sorting_widget.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
|
||||
#include <libcockatrice/card/set/card_set_comparator.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
const QString PrintingSelectorCardSortingWidget::SORT_OPTIONS_ALPHABETICAL = tr("Alphabetical");
|
||||
const QString PrintingSelectorCardSortingWidget::SORT_OPTIONS_PREFERENCE = tr("Preference");
|
||||
|
|
@ -88,7 +89,7 @@ QList<PrintingInfo> PrintingSelectorCardSortingWidget::sortSets(const SetToPrint
|
|||
}
|
||||
|
||||
if (sortedSets.empty()) {
|
||||
sortedSets << CardSet::newInstance("", "", "", QDate());
|
||||
sortedSets << CardSet::newInstance(SettingsCache::instance().cardDatabase(), "", "", "", QDate());
|
||||
}
|
||||
|
||||
if (sortOptionsSelector->currentText() == SORT_OPTIONS_PREFERENCE) {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
#include "replay_timeline_widget.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
|
||||
#include <QPainter>
|
||||
#include <QPainterPath>
|
||||
#include <QPalette>
|
||||
#include <QTimer>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
ReplayTimelineWidget::ReplayTimelineWidget(QWidget *parent)
|
||||
: QWidget(parent), maxBinValue(1), maxTime(1), timeScaleFactor(1.0), currentVisualTime(0), currentProcessedTime(0),
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "chat_view.h"
|
||||
|
||||
#include "../../../../client/settings/cache_settings.h"
|
||||
#include "../../client/sound_engine.h"
|
||||
#include "../../interface/pixel_map_generator.h"
|
||||
#include "../../interface/widgets/tabs/tab_account.h"
|
||||
|
|
@ -13,7 +14,6 @@
|
|||
#include <QMouseEvent>
|
||||
#include <QScrollBar>
|
||||
#include <libcockatrice/network/server/remote/user_level.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
const QColor DEFAULT_MENTION_COLOR = QColor(194, 31, 47);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "games_model.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../interface/pixel_map_generator.h"
|
||||
#include "../interface/widgets/tabs/tab_account.h"
|
||||
#include "user/user_list_manager.h"
|
||||
|
|
@ -12,7 +13,6 @@
|
|||
#include <QTime>
|
||||
#include <QTimeZone>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_game.pb.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
enum GameListColumn
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
#include "handle_public_servers.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QMessageBox>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkReply>
|
||||
#include <QUrl>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
#define PUBLIC_SERVERS_JSON "https://cockatrice.github.io/public-servers.json"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
#include "user_info_connection.h"
|
||||
|
||||
#include "../../../../client/settings/cache_settings.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <utility>
|
||||
|
||||
UserConnection_Information::UserConnection_Information() = default;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "abstract_tab_deck_editor.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../client/network/interfaces/deck_stats_interface.h"
|
||||
#include "../client/network/interfaces/tapped_out_interface.h"
|
||||
#include "../interface/card_picture_loader/card_picture_loader.h"
|
||||
|
|
@ -37,7 +38,6 @@
|
|||
#include <libcockatrice/protocol/pb/command_deck_upload.pb.h>
|
||||
#include <libcockatrice/protocol/pb/response.pb.h>
|
||||
#include <libcockatrice/protocol/pending_command.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <libcockatrice/utility/trice_limits.h>
|
||||
|
||||
AbstractTabDeckEditor::AbstractTabDeckEditor(TabSupervisor *_tabSupervisor) : Tab(_tabSupervisor)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "tab_deck_editor.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../client/network/interfaces/tapped_out_interface.h"
|
||||
#include "../filters/filter_builder.h"
|
||||
#include "../filters/filter_tree_model.h"
|
||||
|
|
@ -36,7 +37,6 @@
|
|||
#include <libcockatrice/models/database/card_database_model.h>
|
||||
#include <libcockatrice/network/client/abstract/abstract_client.h>
|
||||
#include <libcockatrice/protocol/pending_command.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <libcockatrice/utility/trice_limits.h>
|
||||
|
||||
TabDeckEditor::TabDeckEditor(TabSupervisor *_tabSupervisor) : AbstractTabDeckEditor(_tabSupervisor)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "tab_deck_storage.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../interface/widgets/server/remote/remote_decklist_tree_widget.h"
|
||||
#include "../interface/widgets/utility/get_text_with_max.h"
|
||||
|
||||
|
|
@ -28,7 +29,6 @@
|
|||
#include <libcockatrice/protocol/pb/response_deck_download.pb.h>
|
||||
#include <libcockatrice/protocol/pb/response_deck_upload.pb.h>
|
||||
#include <libcockatrice/protocol/pending_command.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
TabDeckStorage::TabDeckStorage(TabSupervisor *_tabSupervisor,
|
||||
AbstractClient *_client,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "tab_game.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../game/board/arrow_item.h"
|
||||
#include "../game/board/card_item.h"
|
||||
#include "../game/deckview/deck_view_container.h"
|
||||
|
|
@ -44,7 +45,6 @@
|
|||
#include <libcockatrice/protocol/pb/game_replay.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_player.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_user.pb.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <libcockatrice/utility/trice_limits.h>
|
||||
|
||||
TabGame::TabGame(TabSupervisor *_tabSupervisor, GameReplay *_replay)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "tab_message.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../client/sound_engine.h"
|
||||
#include "../interface/widgets/server/chat_view/chat_view.h"
|
||||
#include "../interface/widgets/server/user/user_list_manager.h"
|
||||
|
|
@ -16,7 +17,6 @@
|
|||
#include <libcockatrice/protocol/pb/serverinfo_user.pb.h>
|
||||
#include <libcockatrice/protocol/pb/session_commands.pb.h>
|
||||
#include <libcockatrice/protocol/pending_command.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <libcockatrice/utility/trice_limits.h>
|
||||
|
||||
TabMessage::TabMessage(TabSupervisor *_tabSupervisor,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "tab_replays.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../interface/widgets/server/remote/remote_replay_list_tree_widget.h"
|
||||
#include "tab_game.h"
|
||||
|
||||
|
|
@ -29,7 +30,6 @@
|
|||
#include <libcockatrice/protocol/pb/response_replay_download.pb.h>
|
||||
#include <libcockatrice/protocol/pb/response_replay_get_code.pb.h>
|
||||
#include <libcockatrice/protocol/pending_command.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
TabReplays::TabReplays(TabSupervisor *_tabSupervisor, AbstractClient *_client, const ServerInfo_User *currentUserInfo)
|
||||
: Tab(_tabSupervisor), client(_client)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "tab_room.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../interface/widgets/dialogs/dlg_settings.h"
|
||||
#include "../interface/widgets/server/chat_view/chat_view.h"
|
||||
#include "../interface/widgets/server/game_selector.h"
|
||||
|
|
@ -30,7 +31,6 @@
|
|||
#include <libcockatrice/protocol/pb/room_commands.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_room.pb.h>
|
||||
#include <libcockatrice/protocol/pending_command.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <libcockatrice/utility/trice_limits.h>
|
||||
|
||||
TabRoom::TabRoom(TabSupervisor *_tabSupervisor,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "tab_supervisor.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../interface/pixel_map_generator.h"
|
||||
#include "../interface/widgets/server/user/user_list_manager.h"
|
||||
#include "../interface/widgets/server/user/user_list_widget.h"
|
||||
|
|
@ -35,7 +36,6 @@
|
|||
#include <libcockatrice/protocol/pb/room_event.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_room.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_user.pb.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
QRect MacOSTabFixStyle::subElementRect(SubElement element, const QStyleOption *option, const QWidget *widget) const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "tab_deck_editor_visual.h"
|
||||
|
||||
#include "../../../../client/settings/cache_settings.h"
|
||||
#include "../../client/network/interfaces/deck_stats_interface.h"
|
||||
#include "../../filters/filter_builder.h"
|
||||
#include "../../interface/pixel_map_generator.h"
|
||||
|
|
@ -31,7 +32,6 @@
|
|||
#include <libcockatrice/models/deck_list/deck_list_model.h>
|
||||
#include <libcockatrice/protocol/pb/command_deck_upload.pb.h>
|
||||
#include <libcockatrice/protocol/pending_command.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <libcockatrice/utility/trice_limits.h>
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
#include "custom_line_edit.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../client/settings/shortcuts_settings.h"
|
||||
|
||||
#include <QKeyEvent>
|
||||
#include <QLineEdit>
|
||||
#include <QObject>
|
||||
#include <QTreeView>
|
||||
#include <QWidget>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <libcockatrice/settings/shortcuts_settings.h>
|
||||
|
||||
LineEditUnfocusable::LineEditUnfocusable(QWidget *parent) : QLineEdit(parent)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
#include "sequence_edit.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QKeyEvent>
|
||||
#include <QToolTip>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <utility>
|
||||
|
||||
SequenceEdit::SequenceEdit(const QString &_shortcutName, QWidget *parent) : QWidget(parent)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "visual_database_display_filter_save_load_widget.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../filters/filter_tree.h"
|
||||
#include "visual_database_filter_display_widget.h"
|
||||
|
||||
|
|
@ -7,7 +8,6 @@
|
|||
#include <QJsonArray>
|
||||
#include <QJsonObject>
|
||||
#include <QMessageBox>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
VisualDatabaseDisplayFilterSaveLoadWidget::VisualDatabaseDisplayFilterSaveLoadWidget(QWidget *parent,
|
||||
FilterTreeModel *_filterModel)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "visual_database_display_set_filter_widget.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../filters/filter_tree.h"
|
||||
#include "../../../filters/filter_tree_model.h"
|
||||
|
||||
|
|
@ -8,7 +9,6 @@
|
|||
#include <QTimer>
|
||||
#include <algorithm>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
VisualDatabaseDisplayRecentSetFilterSettingsWidget::VisualDatabaseDisplayRecentSetFilterSettingsWidget(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "visual_database_display_widget.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../filters/filter_tree_model.h"
|
||||
#include "../../../filters/syntax_help.h"
|
||||
#include "../../pixel_map_generator.h"
|
||||
|
|
@ -18,7 +19,6 @@
|
|||
#include <libcockatrice/card/card_info_comparator.h>
|
||||
#include <libcockatrice/card/database/card_database.h>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <qpropertyanimation.h>
|
||||
#include <utility>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
#include "visual_database_filter_display_widget.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QFontMetrics>
|
||||
#include <QHBoxLayout>
|
||||
#include <QMessageBox>
|
||||
#include <QPushButton>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
FilterDisplayWidget::FilterDisplayWidget(QWidget *parent, const QString &filename, FilterTreeModel *_filterModel)
|
||||
: QWidget(parent), filterFilename(filename), filterModel(_filterModel)
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
#include "visual_deck_editor_sample_hand_widget.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../cards/card_info_picture_widget.h"
|
||||
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/models/deck_list/deck_loader.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <random>
|
||||
|
||||
VisualDeckEditorSampleHandWidget::VisualDeckEditorSampleHandWidget(QWidget *parent, DeckListModel *_deckListModel)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "deck_preview_deck_tags_display_widget.h"
|
||||
|
||||
#include "../../../../client/settings/cache_settings.h"
|
||||
#include "../../../../interface/widgets/dialogs/dlg_convert_deck_to_cod_format.h"
|
||||
#include "../../../../interface/widgets/tabs/tab_deck_editor.h"
|
||||
#include "../../general/layout_containers/flow_widget.h"
|
||||
|
|
@ -12,7 +13,6 @@
|
|||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QMessageBox>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
DeckPreviewDeckTagsDisplayWidget::DeckPreviewDeckTagsDisplayWidget(QWidget *_parent, DeckList *_deckList)
|
||||
: QWidget(_parent), deckList(nullptr)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "deck_preview_tag_addition_widget.h"
|
||||
|
||||
#include "../../../../client/settings/cache_settings.h"
|
||||
#include "../../../../interface/widgets/tabs/abstract_tab_deck_editor.h"
|
||||
#include "deck_preview_tag_dialog.h"
|
||||
|
||||
|
|
@ -7,7 +8,6 @@
|
|||
#include <QHBoxLayout>
|
||||
#include <QMouseEvent>
|
||||
#include <QPainter>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <utility>
|
||||
|
||||
DeckPreviewTagAdditionWidget::DeckPreviewTagAdditionWidget(QWidget *_parent, QString _tagName)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "deck_preview_tag_dialog.h"
|
||||
|
||||
#include "../../../../client/settings/cache_settings.h"
|
||||
#include "../../../../interface/widgets/dialogs/dlg_default_tags_editor.h"
|
||||
#include "deck_preview_tag_item_widget.h"
|
||||
|
||||
|
|
@ -11,7 +12,6 @@
|
|||
#include <QPushButton>
|
||||
#include <QTimer>
|
||||
#include <QVBoxLayout>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
DeckPreviewTagDialog::DeckPreviewTagDialog(const QStringList &knownTags,
|
||||
const QStringList &_activeTags,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "deck_preview_widget.h"
|
||||
|
||||
#include "../../../../client/settings/cache_settings.h"
|
||||
#include "../../cards/additional_info/color_identity_widget.h"
|
||||
#include "../../cards/deck_preview_card_picture_widget.h"
|
||||
#include "deck_preview_deck_tags_display_widget.h"
|
||||
|
|
@ -14,7 +15,6 @@
|
|||
#include <QStandardItemModel>
|
||||
#include <QVBoxLayout>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
DeckPreviewWidget::DeckPreviewWidget(QWidget *_parent,
|
||||
VisualDeckStorageWidget *_visualDeckStorageWidget,
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
#include "visual_deck_storage_folder_display_widget.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "deck_preview/deck_preview_widget.h"
|
||||
|
||||
#include <QDirIterator>
|
||||
#include <QMouseEvent>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
VisualDeckStorageFolderDisplayWidget::VisualDeckStorageFolderDisplayWidget(
|
||||
QWidget *parent,
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
#include "visual_deck_storage_quick_settings_widget.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "visual_deck_storage_widget.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QComboBox>
|
||||
#include <QSpinBox>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
VisualDeckStorageQuickSettingsWidget::VisualDeckStorageQuickSettingsWidget(QWidget *parent)
|
||||
: SettingsButtonWidget(parent)
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue