File indexing completed on 2024-12-15 03:45:05
0001 /* 0002 SPDX-FileCopyrightText: 2017 Volker Krause <vkrause@kde.org> 0003 0004 SPDX-License-Identifier: MIT 0005 */ 0006 0007 #ifndef KUSERFEEDBACK_QMLABSTRACTDATASOURCE_H 0008 #define KUSERFEEDBACK_QMLABSTRACTDATASOURCE_H 0009 0010 #include <provider.h> 0011 0012 namespace KUserFeedback { 0013 0014 class AbstractDataSource; 0015 0016 class QmlAbstractDataSource : public QObject 0017 { 0018 Q_OBJECT 0019 Q_PROPERTY(KUserFeedback::Provider::TelemetryMode mode READ telemetryMode 0020 WRITE setTelemetryMode NOTIFY telemetryModeChanged) 0021 public: 0022 explicit QmlAbstractDataSource(AbstractDataSource *source, QObject *parent); 0023 ~QmlAbstractDataSource() override; 0024 0025 Provider::TelemetryMode telemetryMode() const; 0026 void setTelemetryMode(Provider::TelemetryMode mode); 0027 0028 AbstractDataSource* source() const; 0029 0030 Q_SIGNALS: 0031 void telemetryModeChanged(); 0032 0033 private: 0034 AbstractDataSource *m_source; 0035 }; 0036 0037 } 0038 0039 #endif // KUSERFEEDBACK_QMLABSTRACTDATASOURCE_H