mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-29 17:32:17 -07:00
[Settings] Split cache_settings into multiple files
Took 9 minutes Took 4 minutes
This commit is contained in:
parent
3f9dbdb33b
commit
4d550507f0
136 changed files with 5124 additions and 2993 deletions
|
|
@ -0,0 +1,40 @@
|
|||
#ifndef SETTINGS_CARD_DATABASE_PATH_PROVIDER_H
|
||||
#define SETTINGS_CARD_DATABASE_PATH_PROVIDER_H
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
|
||||
#include <libcockatrice/interfaces/interface_card_database_path_provider.h>
|
||||
|
||||
class SettingsCardDatabasePathProvider : public ICardDatabasePathProvider
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SettingsCardDatabasePathProvider(QObject *parent = nullptr) : ICardDatabasePathProvider(parent)
|
||||
{
|
||||
connect(&SettingsCache::instance().paths(), &PathsSettings::cardDatabasePathChanged, this,
|
||||
&ICardDatabasePathProvider::cardDatabasePathChanged);
|
||||
}
|
||||
|
||||
[[nodiscard]] QString getCardDatabasePath() const override
|
||||
{
|
||||
return SettingsCache::instance().paths().getCardDatabasePath();
|
||||
}
|
||||
|
||||
[[nodiscard]] QString getCustomCardDatabasePath() const override
|
||||
{
|
||||
return SettingsCache::instance().paths().getCustomCardDatabasePath();
|
||||
}
|
||||
|
||||
[[nodiscard]] QString getTokenDatabasePath() const override
|
||||
{
|
||||
return SettingsCache::instance().paths().getTokenDatabasePath();
|
||||
}
|
||||
|
||||
[[nodiscard]] virtual QString getSpoilerCardDatabasePath() const override
|
||||
{
|
||||
return SettingsCache::instance().paths().getSpoilerCardDatabasePath();
|
||||
}
|
||||
};
|
||||
|
||||
#endif // SETTINGS_CARD_DATABASE_PATH_PROVIDER_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue