Attica

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{
22/**
23 * @class Activity activity.h <Attica/Activity>
24 *
25 * Represents a single news item (also known as activity)
26 */
27class ATTICA_EXPORT Activity
28{
29public:
30 typedef QList<Activity> List;
31 class Parser;
32
33 /**
34 * Creates an empty Activity
35 */
36 Activity();
37
38 /**
39 * Copy constructor.
40 * @param other the Activity to copy from
41 */
42 Activity(const Activity &other);
43
44 /**
45 * Assignment operator.
46 * @param other the Activity to assign from
47 * @return pointer to this Activity
48 */
49 Activity &operator=(const Activity &other);
50
51 /**
52 * Destructor.
53 */
54 ~Activity();
55
56 /**
57 * Sets the id of the Activity.
58 * The id uniquely identifies an Activity with the OCS API.
59 * @param id the new id
60 */
61 void setId(const QString &id);
62
63 /**
64 * Gets the id of the Activity.
65 * The id uniquely identifies an Activity with the OCS API.
66 * @return the id
67 */
68 QString id() const;
69
70 /**
71 * Sets the user bound to the Activity.
72 * @param id the new user
73 */
74 void setAssociatedPerson(const Person &associatedPerson);
75
76 /**
77 * Gets the user bound to the Activity.
78 * @return the user
79 */
80 Person associatedPerson() const;
81
82 /**
83 * Sets the timestamp the Activity has been published.
84 * @param timestamp the new timestamp
85 */
86 void setTimestamp(const QDateTime &timestamp);
87
88 /**
89 * Gets the timestamp the Activity has been published.
90 * @return the timestamp
91 */
92 QDateTime timestamp() const;
93
94 /**
95 * Sets the message of the Activity.
96 * @param message the new message
97 */
98 void setMessage(const QString &message);
99
100 /**
101 * Gets the message of the Activity.
102 * @return the message
103 */
104 QString message() const;
105
106 /**
107 * Sets the link to further information about this Activity.
108 * @param link the new link
109 */
110 void setLink(const QUrl &link);
111
112 /**
113 * Gets the link to further information about this Activity.
114 * @return the link
115 */
116 QUrl link() const;
117
118 /**
119 * Checks whether this Activity has an id
120 * @return @c true if an id has been set, @c false otherwise
121 */
122 bool isValid() const;
123
124private:
125 class Private;
127};
128
129}
130
131#endif
Represents a single news item (also known as activity)
Definition activity.h:28
Represents a person.
Definition person.h:29
The Attica namespace,.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:48 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.