Kgapi

page.h
1/*
2 * SPDX-FileCopyrightText: 2014 Daniel Vrátil <dvratil@redhat.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6
7#pragma once
8
9#include "kgapiblogger_export.h"
10#include "object.h"
11
12#include <QDateTime>
13
14namespace KGAPI2
15{
16namespace Blogger
17{
18
19class KGAPIBLOGGER_EXPORT Page : public KGAPI2::Object
20{
21public:
22 enum Status { UnknownStatus, Draft, Live, Imported };
23 explicit Page();
24 ~Page() override;
25
26 QString id() const;
27 void setId(const QString &id);
28
29 QString blogId() const;
30 void setBlogId(const QString &blogId);
31
32 QDateTime published() const;
33 void setPublished(const QDateTime &published);
34
35 QDateTime updated() const;
36 void setUpdated(const QDateTime &updated);
37
38 QUrl url() const;
39 void setUrl(const QUrl &url);
40
41 QString title() const;
42 void setTitle(const QString &title);
43
44 QString content() const;
45 void setContent(const QString &content);
46
47 QString authorId() const;
48 QString authorName() const;
49 QUrl authorUrl() const;
50 QUrl authorImageUrl() const;
51
52 Status status() const;
53 void setStatus(Status status);
54
55 static PagePtr fromJSON(const QByteArray &rawData);
56 static ObjectsList fromJSONFeed(const QByteArray &rawData);
57 static QByteArray toJSON(const PagePtr &page);
58
59private:
60 Q_DISABLE_COPY(Page)
61
62 class Private;
63 Private *const d;
64 friend class Private;
65};
66}
67}
Base class for all objects.
Definition object.h:31
Q_SCRIPTABLE CaptureState status()
A job to fetch a single map tile described by a StaticMapUrl.
Definition blog.h:16
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:00:11 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.