* oracle now can be run in spoiler or normal mode * tests for travis * only run on relaunch * spoilers in client (not oracle now) and tray icon shows when done * spoiler status will be checked before downloading spoiler file * only download if they care about spoilers * reload db on spoiler download * manual update button, code cleanup, and fix enabling sets when new * cleanup, nullchecks, and fixes to spoiler * reload DB even if not in spoiler season; necessary as we have a check elsewhere to prevent the reload if spoiler check happens * Implement changes from 2991#issuecomment-356169374 * Change implicit nullptrs, alert on file deletion, minor changes * make reload thread safe and minor changes from 2991#issuecomment-356450302 * Fix locking * Disable update now button while process running
45 lines
1.1 KiB
C++
45 lines
1.1 KiB
C++
/*
|
|
* 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;
|
|
QString getSpoilerCardDatabasePath() const;
|
|
CardDatabaseSettings& cardDatabase() const;
|
|
signals:
|
|
void cardDatabasePathChanged();
|
|
};
|
|
|
|
|
|
#define PICTURELOADER_H
|
|
class CardInfo;
|
|
|
|
class PictureLoader {
|
|
void clearPixmapCache(CardInfo *card);
|
|
};
|