KUserFeedback

startcountsource.cpp
1/*
2 SPDX-FileCopyrightText: 2017 Volker Krause <vkrause@kde.org>
3
4 SPDX-License-Identifier: MIT
5*/
6
7#include "startcountsource.h"
8#include "abstractdatasource_p.h"
9#include "provider_p.h"
10
11#include <QVariant>
12
13using namespace KUserFeedback;
14
15namespace KUserFeedback {
16class StartCountSourcePrivate : public AbstractDataSourcePrivate
17{
18public:
19 StartCountSourcePrivate() : provider(nullptr) {}
20 ProviderPrivate *provider;
21};
22}
23
25 AbstractDataSource(QStringLiteral("startCount"), Provider::BasicUsageStatistics, new StartCountSourcePrivate)
26{
27}
28
30{
31 return tr("How often the application has been started.");
32}
33
35{
37 Q_ASSERT(d->provider);
38
39 QVariantMap m;
40 m.insert(QStringLiteral("value"), d->provider->startCount);
41 return m;
42}
43
45{
46 return tr("Launches count");
47}
48
49void StartCountSource::setProvider(ProviderPrivate *p)
50{
52 d->provider = p;
53}
Base class for data sources for telemetry data.
The central object managing data sources and transmitting feedback to the server.
Definition provider.h:32
Data source reporting the total amount of applications starts.
StartCountSource()
Create a new start count data source.
QVariant data() override
Returns the data gathered by this source.
QString name() const override
Returns a short name of this data source.
QString description() const override
Returns a human-readable, translated description of what this source provides.
Classes for integrating telemetry collection, survey targeting, and contribution encouragenemt and co...
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:57:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.