KUserFeedback

qmlabstractdatasource.cpp
1/*
2 SPDX-FileCopyrightText: 2017 Volker Krause <vkrause@kde.org>
3
4 SPDX-License-Identifier: MIT
5*/
6
7#include "qmlabstractdatasource.h"
8
9#include <KUserFeedback/AbstractDataSource>
10
11using namespace KUserFeedback;
12
13QmlAbstractDataSource::QmlAbstractDataSource(AbstractDataSource *source, QObject* parent)
14 : QObject(parent)
15 , m_source(source)
16{
17}
18
19QmlAbstractDataSource::~QmlAbstractDataSource()
20{
21}
22
23Provider::TelemetryMode QmlAbstractDataSource::telemetryMode() const
24{
25 return m_source->telemetryMode();
26}
27
28void QmlAbstractDataSource::setTelemetryMode(Provider::TelemetryMode mode)
29{
30 if (m_source->telemetryMode() == mode)
31 return;
32 m_source->setTelemetryMode(mode);
33 Q_EMIT telemetryModeChanged();
34}
35
36AbstractDataSource* QmlAbstractDataSource::source() const
37{
38 return m_source;
39}
40
41#include "moc_qmlabstractdatasource.cpp"
Base class for data sources for telemetry data.
void setTelemetryMode(Provider::TelemetryMode mode)
Sets which telemetry colleciton mode this data source belongs to.
Provider::TelemetryMode telemetryMode() const
Returns which telemetry colleciton mode this data source belongs to.
TelemetryMode
Telemetry collection modes.
Definition provider.h:102
Classes for integrating telemetry collection, survey targeting, and contribution encouragenemt and co...
Q_EMITQ_EMIT
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:48:42 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.