mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 16:24:45 -07:00
First test for card database: loading and clear
This commit is contained in:
parent
df393638ed
commit
18993b397b
8 changed files with 236 additions and 2 deletions
44
tests/carddatabase/carddatabase_test.h
Normal file
44
tests/carddatabase/carddatabase_test.h
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* 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
|
||||
|
||||
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;
|
||||
CardDatabaseSettings& cardDatabase() const;
|
||||
signals:
|
||||
void cardDatabasePathChanged();
|
||||
};
|
||||
|
||||
|
||||
#define PICTURELOADER_H
|
||||
class CardInfo;
|
||||
|
||||
class PictureLoader {
|
||||
void clearPixmapCache(CardInfo *card);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue