1/*
2 This file is part of KDE.
3
4 SPDX-FileCopyrightText: 2008 Cornelius Schumacher <schumacher@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7*/
8
9#include "activity.h"
10
11#include <QDateTime>
12
13using namespace Attica;
14
15class Q_DECL_HIDDEN Activity::Private : public QSharedData
16{
17public:
18 QString m_id;
19 Person m_associatedPerson;
20 QDateTime m_timestamp;
21 QString m_message;
22 QUrl m_link;
23};
24
25Activity::Activity()
26 : d(new Private)
27{
28}
29
30Activity::Activity(const Attica::Activity &other)
31 : d(other.d)
32{
33}
34
35Activity &Activity::operator=(const Attica::Activity &other)
36{
37 d = other.d;
38 return *this;
39}
40
41Activity::~Activity()
42{
43}
44
45void Activity::setId(const QString &id)
46{
47 d->m_id = id;
48}
49
50QString Activity::id() const
51{
52 return d->m_id;
53}
54
55void Activity::setAssociatedPerson(const Person &associatedPerson)
56{
57 d->m_associatedPerson = associatedPerson;
58}
59
60Person Activity::associatedPerson() const
61{
62 return d->m_associatedPerson;
63}
64
65void Activity::setTimestamp(const QDateTime &date)
66{
67 d->m_timestamp = date;
68}
69
70QDateTime Activity::timestamp() const
71{
72 return d->m_timestamp;
73}
74
75void Activity::setMessage(const QString &c)
76{
77 d->m_message = c;
78}
79
80QString Activity::message() const
81{
82 return d->m_message;
83}
84
85void Activity::setLink(const QUrl &v)
86{
87 d->m_link = v;
88}
89
90QUrl Activity::link() const
91{
92 return d->m_link;
93}
94
95bool Activity::isValid() const
96{
97 return !(d->m_id.isEmpty());
98}
99

source code of attica/src/activity.cpp