mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-24 15:43:54 -07:00
Card Database converter (#3694)
* Database converter * Fix win compilation and NSIS installer * Maybe fix windows again * Re-fix windows
This commit is contained in:
parent
8682367b52
commit
ada13f6578
8 changed files with 301 additions and 1 deletions
50
dbconverter/src/mocks.h
Normal file
50
dbconverter/src/mocks.h
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* Beware of this preprocessor hack used to redefine the settingCache class
|
||||
* instead of including it and all of its dependencies.
|
||||
*/
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
#define SETTINGSCACHE_H
|
||||
#define PICTURELOADER_H
|
||||
|
||||
#include "../../cockatrice/src/carddatabase.h"
|
||||
|
||||
class CardDatabaseSettings
|
||||
{
|
||||
public:
|
||||
void setSortKey(QString shortName, unsigned int sortKey);
|
||||
void setEnabled(QString shortName, bool enabled);
|
||||
void setIsKnown(QString shortName, bool isknown);
|
||||
|
||||
unsigned int getSortKey(QString shortName);
|
||||
bool isEnabled(QString shortName);
|
||||
bool isKnown(QString shortName);
|
||||
};
|
||||
|
||||
class SettingsCache : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
private:
|
||||
CardDatabaseSettings *cardDatabaseSettings;
|
||||
|
||||
public:
|
||||
SettingsCache();
|
||||
~SettingsCache();
|
||||
QString getCustomCardDatabasePath() const;
|
||||
QString getCardDatabasePath() const;
|
||||
QString getTokenDatabasePath() const;
|
||||
QString getSpoilerCardDatabasePath() const;
|
||||
CardDatabaseSettings &cardDatabase() const;
|
||||
signals:
|
||||
void cardDatabasePathChanged();
|
||||
};
|
||||
|
||||
extern SettingsCache *settingsCache;
|
||||
|
||||
class PictureLoader
|
||||
{
|
||||
public:
|
||||
static void clearPixmapCache(CardInfoPtr card);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue