Line data Source code
1 : #ifndef DBSETTINGSINTERFACE_H
2 : #define DBSETTINGSINTERFACE_H
3 :
4 : #include <QObject>
5 : #include <QString>
6 : #include <QObject>
7 : #include "DBSettingsKey.h"
8 :
9 : /*!
10 : \brief Interface for DBSettings allowing mock implementations for testing.
11 : */
12 : class DBSettingsInterface : public QObject
13 : {
14 : Q_OBJECT
15 : public:
16 35 : explicit DBSettingsInterface(QObject *parent = nullptr) : QObject(parent) {}
17 35 : virtual ~DBSettingsInterface() = default;
18 :
19 : signals:
20 : void settingChanged(DBSettingsKey key, QString value);
21 :
22 : public slots:
23 : virtual void set(DBSettingsKey key, const QString& value) = 0;
24 : virtual QString get(DBSettingsKey key) = 0;
25 : };
26 :
27 : #endif // DBSETTINGSINTERFACE_H
|