Attica 5.109.0
activity.h
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#ifndef ATTICA_ACTIVITY_H
9#define ATTICA_ACTIVITY_H
10
11#include <QList>
12#include <QSharedDataPointer>
13#include <QUrl>
14
15#include "attica_export.h"
16#include "person.h"
17
18class QDateTime;
19
20namespace Attica
21{
27class ATTICA_EXPORT Activity
28{
29public:
30 typedef QList<Activity> List;
31 class Parser;
32
37
42 Activity(const Activity &other);
43
49 Activity &operator=(const Activity &other);
50
55
61 void setId(const QString &id);
62
68 QString id() const;
69
74 void setAssociatedPerson(const Person &associatedPerson);
75
81
86 void setTimestamp(const QDateTime &timestamp);
87
92 QDateTime timestamp() const;
93
98 void setMessage(const QString &message);
99
104 QString message() const;
105
110 void setLink(const QUrl &link);
111
116 QUrl link() const;
117
122 bool isValid() const;
123
124private:
125 class Private;
126 QSharedDataPointer<Private> d;
127};
128
129}
130
131#endif
Represents a single news item (also known as activity)
Definition activity.h:28
void setMessage(const QString &message)
Sets the message of the Activity.
void setLink(const QUrl &link)
Sets the link to further information about this Activity.
Activity()
Creates an empty Activity.
QString message() const
Gets the message of the Activity.
QDateTime timestamp() const
Gets the timestamp the Activity has been published.
void setAssociatedPerson(const Person &associatedPerson)
Sets the user bound to the Activity.
QUrl link() const
Gets the link to further information about this Activity.
QString id() const
Gets the id of the Activity.
Activity(const Activity &other)
Copy constructor.
void setId(const QString &id)
Sets the id of the Activity.
Activity & operator=(const Activity &other)
Assignment operator.
void setTimestamp(const QDateTime &timestamp)
Sets the timestamp the Activity has been published.
~Activity()
Destructor.
Person associatedPerson() const
Gets the user bound to the Activity.
bool isValid() const
Checks whether this Activity has an id.
Represents a person.
Definition person.h:29
The Attica namespace,.
Definition activity.h:21