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_USAGETIMESOURCE_H
0008 #define KUSERFEEDBACK_USAGETIMESOURCE_H
0009 
0010 #include "kuserfeedbackcore_export.h"
0011 #include "abstractdatasource.h"
0012 
0013 namespace KUserFeedback {
0014 
0015 class Provider;
0016 class ProviderPrivate;
0017 class UsageTimeSourcePrivate;
0018 
0019 /*! Data source reporting the total usage time of the application.
0020  *
0021  *  The default telemetry mode for this source is Provider::BasicUsageStatistics.
0022  */
0023 class KUSERFEEDBACKCORE_EXPORT UsageTimeSource :  public AbstractDataSource
0024 {
0025 public:
0026     Q_DECLARE_TR_FUNCTIONS(KUserFeedback::UsageTimeSource)
0027 public:
0028     /*! Create a new usage time data source. */
0029     UsageTimeSource();
0030 
0031     QString name() const override;
0032     QString description() const override;
0033 
0034     QVariant data() override;
0035 
0036 private:
0037     Q_DECLARE_PRIVATE(UsageTimeSource)
0038     friend class Provider;
0039     void setProvider(ProviderPrivate *p);
0040 };
0041 
0042 }
0043 
0044 #endif // KUSERFEEDBACK_USAGETIMESOURCE_H