KNewStuff

qtquick/author.h
1 /*
2  SPDX-FileCopyrightText: 2019 Dan Leinir Turthra Jensen <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6 
7 #ifndef KNSQUICK_AUTHOR_H
8 #define KNSQUICK_AUTHOR_H
9 
10 #include <QObject>
11 #include <QQmlParserStatus>
12 #include <entryinternal.h>
13 
14 namespace KNewStuffQuick
15 {
23 class Author : public QObject, public QQmlParserStatus
24 {
25  Q_OBJECT
30  Q_PROPERTY(QObject *engine READ engine WRITE setEngine NOTIFY engineChanged)
34  Q_PROPERTY(QString providerId READ providerId WRITE setProviderId NOTIFY providerIdChanged)
38  Q_PROPERTY(QString username READ username WRITE setUsername NOTIFY usernameChanged)
39 
40  Q_PROPERTY(QString name READ name NOTIFY dataChanged)
41  Q_PROPERTY(QString description READ description NOTIFY dataChanged)
42  Q_PROPERTY(QString homepage READ homepage NOTIFY dataChanged)
43  Q_PROPERTY(QString profilepage READ profilepage NOTIFY dataChanged)
44  Q_PROPERTY(QUrl avatarUrl READ avatarUrl NOTIFY dataChanged)
45 public:
46  explicit Author(QObject *parent = nullptr);
47  virtual ~Author();
48  void classBegin() override;
49  void componentComplete() override;
50 
51  QObject *engine() const;
52  void setEngine(QObject *newEngine);
53  Q_SIGNAL void engineChanged();
54 
55  QString providerId() const;
56  void setProviderId(const QString &providerId);
57  Q_SIGNAL void providerIdChanged();
58 
59  QString username() const;
60  void setUsername(const QString &username);
61  Q_SIGNAL void usernameChanged();
62 
63  QString name() const;
64  QString description() const;
65  QString homepage() const;
66  QString profilepage() const;
67  QUrl avatarUrl() const;
68  Q_SIGNAL void dataChanged();
69 
70 private:
71  class Private;
72  Private *d;
73 };
74 }
75 
76 #endif//KNSQUICK_AUTHOR_H
Encapsulates a KNSCore::Author for use in Qt Quick.
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SIGNALQ_SIGNAL
Q_INTERFACES(...)
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue Aug 11 2020 22:43:23 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.