Migration of QtMvvm from github
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
691 B

#ifndef TESTBACKEND_H
#define TESTBACKEND_H
#include <QtCore/QVariantHash>
#include <QtMvvmCore/ISettingsAccessor>
class TestBackend : public QtMvvm::ISettingsAccessor
{
Q_OBJECT
public:
explicit TestBackend(QString name, int code, QObject *parent = nullptr);
// ISettingsAccessor interface
public:
bool contains(const QString &key) const override;
QVariant load(const QString &key, const QVariant &defaultValue) const override;
void save(const QString &key, const QVariant &value) override;
void remove(const QString &key) override;
public slots:
void sync() override;
public:
QString _name;
int _code;
QVariantHash _data;
};
#define SOME_EXPORT
#endif // TESTBACKEND_H