Kgapi

tasklist.cpp
1/*
2 * This file is part of LibKGAPI library
3 *
4 * SPDX-FileCopyrightText: 2013 Daniel Vrátil <dvratil@redhat.com>
5 *
6 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7 */
8
9#include "tasklist.h"
10#include "debug.h"
11
12using namespace KGAPI2;
13
14class Q_DECL_HIDDEN TaskList::Private
15{
16public:
17 Private() = default;
18 Private(const Private &other) = default;
19
20 QString title;
21 QString selfLink;
22 QString updated;
23 QString uid;
24};
25
27 : Object()
28 , d(new Private)
29{
30}
31
33 : Object(other)
34 , d(new Private(*(other.d.get())))
35{
36}
37
38TaskList::~TaskList() = default;
39
40bool TaskList::operator==(const TaskList &other) const
41{
42 if (!Object::operator==(other)) {
43 return false;
44 }
45
46 if (d->uid != other.d->uid) {
47 qCDebug(KGAPIDebug) << "UIDs don't match";
48 return false;
49 }
50
51 if (d->title != other.d->title) {
52 qCDebug(KGAPIDebug) << "Titles don't match";
53 return false;
54 }
55
56 return true;
57}
58
59void TaskList::setUid(const QString &uid)
60{
61 d->uid = uid;
62}
63
65{
66 return d->uid;
67}
68
69void TaskList::setTitle(const QString &title)
70{
71 d->title = title;
72}
73
75{
76 return d->title;
77}
78
79void TaskList::setSelfLink(const QString &selfLink)
80{
81 d->selfLink = selfLink;
82}
83
85{
86 return d->selfLink;
87}
88
89void TaskList::setUpdated(const QString &updated)
90{
91 d->updated = updated;
92}
93
95{
96 return d->updated;
97}
Base class for all objects.
Definition object.h:31
Represents a tasklist for Google Tasks service.
Definition tasklist.h:27
void setTitle(const QString &title)
Sets tasklist name.
Definition tasklist.cpp:69
void setSelfLink(const QString &selfLink)
Sets tasklist selfLink.
Definition tasklist.cpp:79
QString updated() const
Returns tasklist updated.
Definition tasklist.cpp:94
~TaskList() override
Destructor.
QString uid() const
Returns tasklist UID.
Definition tasklist.cpp:64
TaskList()
Constructor.
Definition tasklist.cpp:26
QString title() const
Returns tasklist title.
Definition tasklist.cpp:74
void setUpdated(const QString &updated)
Sets tasklist updated.
Definition tasklist.cpp:89
void setUid(const QString &uid)
Sets tasklist UID.
Definition tasklist.cpp:59
QString selfLink() const
Returns tasklist selfLink.
Definition tasklist.cpp:84
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 Fri Nov 22 2024 12:08:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.