Kgapi

tasklist.cpp
1 /*
2  * This file is part of LibKGAPI library
3  *
4  * SPDX-FileCopyrightText: 2013 Daniel Vr├ítil <[email protected]>
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 
12 using namespace KGAPI2;
13 
14 class Q_DECL_HIDDEN TaskList::Private
15 {
16  public:
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 
38 TaskList::~TaskList() = default;
39 
40 bool 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 
60 {
61  d->uid = uid;
62 }
63 
65 {
66  return d->uid;
67 }
68 
70 {
71  d->title = title;
72 }
73 
75 {
76  return d->title;
77 }
78 
80 {
81  d->selfLink = selfLink;
82 }
83 
85 {
86  return d->selfLink;
87 }
88 
90 {
91  d->updated = updated;
92 }
93 
95 {
96  return d->updated;
97 }
void setTitle(const QString &title)
Sets tasklist name.
Definition: tasklist.cpp:69
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
Base class for all objects.
Definition: object.h:30
Represents a tasklist for Google Tasks service.
Definition: tasklist.h:27
~TaskList() override
Destructor.
A job to fetch a single map tile described by a StaticMapUrl.
Definition: blog.h:15
QString title() const
Returns tasklist title.
Definition: tasklist.cpp:74
QString updated() const
Returns tasklist updated.
Definition: tasklist.cpp:94
TaskList()
Constructor.
Definition: tasklist.cpp:26
QString uid() const
Returns tasklist UID.
Definition: tasklist.cpp:64
void setSelfLink(const QString &selfLink)
Sets tasklist selfLink.
Definition: tasklist.cpp:79
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Oct 24 2021 23:11:30 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.