KUserFeedback

qmlpropertyratiosource.h
1/*
2 SPDX-FileCopyrightText: 2017 Volker Krause <vkrause@kde.org>
3
4 SPDX-License-Identifier: MIT
5*/
6
7#ifndef KUSERFEEDBACK_QMLPROPERTYRATIOSOURCE_H
8#define KUSERFEEDBACK_QMLPROPERTYRATIOSOURCE_H
9
10#include "qmlabstractdatasource.h"
11
12namespace KUserFeedback {
13
14class PropertyRatioSource;
15
16class QmlPropertyRatioSource : public QmlAbstractDataSource
17{
19 Q_PROPERTY(QString sourceId READ sourceId WRITE setSourceId NOTIFY changed)
20 Q_PROPERTY(QString name READ name WRITE setName NOTIFY changed)
21 Q_PROPERTY(QString description READ description WRITE setDescription NOTIFY changed)
22 Q_PROPERTY(QObject* object READ object WRITE setObject NOTIFY changed)
23 Q_PROPERTY(QString propertyName READ propertyName WRITE setPropertyName NOTIFY changed)
24public:
25 explicit QmlPropertyRatioSource(QObject *parent = nullptr);
26 ~QmlPropertyRatioSource() override;
27
28 QString sourceId() const;
29 void setSourceId(const QString &id);
30
31 QString name() const;
32 void setName(const QString &name);
33
34 QString description() const;
35 void setDescription(const QString &desc);
36
37 QObject* object() const;
38 void setObject(QObject *object);
39
40 QString propertyName() const;
41 void setPropertyName(const QString &name);
42
43 Q_INVOKABLE void addValueMapping(const QVariant &value, const QString &name);
44
46 void changed();
47
48private:
49 PropertyRatioSource* prSrc() const;
50};
51
52}
53
54#endif // KUSERFEEDBACK_QMLPROPERTYRATIOSOURCE_H
Classes for integrating telemetry collection, survey targeting, and contribution encouragenemt and co...
Q_INVOKABLEQ_INVOKABLE
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:19:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.