mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-03 20:13:56 -07:00
Don't hardcode brackets, fetch from cocaktrice.github.io, store as settings.
Took 3 minutes Took 38 seconds Took 7 minutes
This commit is contained in:
parent
f9f5489871
commit
d2a63ca758
24 changed files with 664 additions and 206 deletions
|
|
@ -0,0 +1,35 @@
|
|||
#ifndef COMMANDER_BRACKET_SETTINGS_H
|
||||
#define COMMANDER_BRACKET_SETTINGS_H
|
||||
|
||||
#include "settings_manager.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QVariantList>
|
||||
|
||||
class CommanderBracketSettings : public SettingsManager
|
||||
{
|
||||
Q_OBJECT
|
||||
friend class SettingsCache;
|
||||
|
||||
public:
|
||||
static constexpr int CurrentSchemaVersion = 1;
|
||||
|
||||
static QVariantList defaultDefinitions();
|
||||
|
||||
void clearDefinitions();
|
||||
|
||||
void saveDefinitions(const QVariantList &definitions);
|
||||
|
||||
QVariantList loadDefinitions() const;
|
||||
|
||||
void setSchemaVersion(int version);
|
||||
int getSchemaVersion() const;
|
||||
|
||||
private:
|
||||
explicit CommanderBracketSettings(const QString &settingPath, QObject *parent = nullptr);
|
||||
|
||||
CommanderBracketSettings(const CommanderBracketSettings &) = delete;
|
||||
CommanderBracketSettings &operator=(const CommanderBracketSettings &) = delete;
|
||||
};
|
||||
|
||||
#endif // COMMANDER_BRACKET_SETTINGS_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue