2018-12-13 15:42:28 +00:00
|
|
|
#ifndef DESKTOPCONFIG_H
|
|
|
|
#define DESKTOPCONFIG_H
|
|
|
|
|
|
|
|
#include "moduleinterface.h"
|
2018-12-18 17:30:26 +00:00
|
|
|
#include <QVariant>
|
2018-12-13 15:42:28 +00:00
|
|
|
#include <QLoggingCategory>
|
|
|
|
|
|
|
|
Q_DECLARE_LOGGING_CATEGORY(CONFIG)
|
|
|
|
|
|
|
|
class Bridge;
|
|
|
|
class DesktopConfig : public QObject, public ModuleInterface {
|
|
|
|
Q_OBJECT
|
|
|
|
Q_INTERFACES(ModuleInterface)
|
|
|
|
|
|
|
|
public:
|
|
|
|
Q_INVOKABLE DesktopConfig(QObject* parent = 0);
|
|
|
|
virtual ~DesktopConfig();
|
|
|
|
|
|
|
|
void setBridge(Bridge* bridge) override;
|
|
|
|
|
|
|
|
QString moduleName() override;
|
|
|
|
QList<ModuleMethod*> methodsToExport() override;
|
|
|
|
QVariantMap constantsToExport() override;
|
|
|
|
|
2018-12-18 17:30:26 +00:00
|
|
|
Q_INVOKABLE void getValue(const QString& name, double callback);
|
|
|
|
Q_INVOKABLE void setValue(const QString& name, const QVariant& value);
|
2018-12-13 15:42:28 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
Bridge* bridge = nullptr;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // DESKTOPCONFIG_H
|