KCalendarCore

attendee.h
Go to the documentation of this file.
1 /*
2  This file is part of the kcalcore library.
3 
4  SPDX-FileCopyrightText: 2001-2003 Cornelius Schumacher <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.0-or-later
7 */
16 #ifndef KCALCORE_ATTENDEE_H
17 #define KCALCORE_ATTENDEE_H
18 
19 #include <QMetaType>
20 #include <QSharedDataPointer>
21 
22 #include "kcalendarcore_export.h"
23 #include "customproperties.h"
24 
25 namespace KCalendarCore
26 {
27 
45 class KCALENDARCORE_EXPORT Attendee
46 {
47  Q_GADGET
48  Q_PROPERTY(bool isNull READ isNull)
49  Q_PROPERTY(QString name READ name WRITE setName)
50  Q_PROPERTY(QString fullName READ fullName)
51  Q_PROPERTY(QString email READ email WRITE setEmail)
52  Q_PROPERTY(Role role READ role WRITE setRole)
53  Q_PROPERTY(QString uid READ uid WRITE setUid)
54  Q_PROPERTY(PartStat status READ status WRITE setStatus)
55  Q_PROPERTY(CuType cuType READ cuType WRITE setCuType)
56  Q_PROPERTY(bool rsvp READ RSVP WRITE setRSVP)
57  Q_PROPERTY(QString delegate READ delegate WRITE setDelegate)
58  Q_PROPERTY(QString delegator READ delegator WRITE setDelegator)
59 
60 public:
65  enum PartStat {
73  None
74  };
75  Q_ENUM(PartStat)
76 
77 
80  enum Role {
84  Chair
85  };
86  Q_ENUM(Role)
87 
88 
93  enum CuType {
97  Room,
98  Unknown
104  };
105  Q_ENUM(CuType)
106 
107 
111 
113  Attendee();
114 
127  Attendee(const QString &name, const QString &email,
128  bool rsvp = false, PartStat status = None,
129  Role role = ReqParticipant, const QString &uid = QString());
130 
136  Attendee(const Attendee &attendee);
137 
141  ~Attendee();
142 
146  bool isNull() const;
147 
151  Q_REQUIRED_RESULT QString name() const;
155  void setName(const QString &name);
156 
162  Q_REQUIRED_RESULT QString fullName() const;
163 
167  Q_REQUIRED_RESULT QString email() const;
171  void setEmail(const QString &email);
172 
180  void setRole(Role role);
181 
187  Q_REQUIRED_RESULT Role role() const;
188 
196  void setUid(const QString &uid);
197 
203  Q_REQUIRED_RESULT QString uid() const;
204 
212  void setStatus(PartStat status);
213 
219  Q_REQUIRED_RESULT PartStat status() const;
220 
230  void setCuType(CuType cuType);
231 
241  void setCuType(const QString &cuType);
242 
250  Q_REQUIRED_RESULT CuType cuType() const;
251 
259  Q_REQUIRED_RESULT QString cuTypeStr() const;
260 
269  void setRSVP(bool rsvp);
270 
276  Q_REQUIRED_RESULT bool RSVP() const;
277 
283  bool operator==(const Attendee &attendee) const;
284 
290  bool operator!=(const Attendee &attendee) const;
291 
298  void setDelegate(const QString &delegate);
299 
304  Q_REQUIRED_RESULT QString delegate() const;
305 
312  void setDelegator(const QString &delegator);
313 
318  Q_REQUIRED_RESULT QString delegator() const;
319 
325  void setCustomProperty(const QByteArray &xname, const QString &xvalue);
326 
330  Q_REQUIRED_RESULT CustomProperties &customProperties();
331 
335  const CustomProperties &customProperties() const;
336 
342  Attendee &operator=(const Attendee &attendee);
343 
344 private:
345  //@cond PRIVATE
346  class Private;
347  QSharedDataPointer<Private> d;
348  //@endcond
349 
350  friend KCALENDARCORE_EXPORT QDataStream &operator<<(QDataStream &s,
351  const KCalendarCore::Attendee &attendee);
352  friend KCALENDARCORE_EXPORT QDataStream &operator>>(QDataStream &s,
353  KCalendarCore::Attendee &attendee);
354 };
355 
361 KCALENDARCORE_EXPORT QDataStream &operator<<(QDataStream &stream,
362  const KCalendarCore::Attendee &attendee);
363 
369 KCALENDARCORE_EXPORT QDataStream &operator>>(QDataStream &stream,
370  KCalendarCore::Attendee &attendee);
371 }
372 
373 //@cond PRIVATE
374 Q_DECLARE_TYPEINFO(KCalendarCore::Attendee, Q_MOVABLE_TYPE);
375 Q_DECLARE_METATYPE(KCalendarCore::Attendee)
376 //@endcond
377 
378 #endif
Event or to-do tentatively accepted.
Definition: attendee.h:69
A class to manage custom calendar properties.
Event, to-do or journal accepted.
Definition: attendee.h:67
This file is part of the API for handling calendar data and defines the CustomProperties class...
Event, to-do or journal declined.
Definition: attendee.h:68
Represents information related to an attendee of an Calendar Incidence, typically a meeting or task (...
Definition: attendee.h:45
CuType
The different types of a participant.
Definition: attendee.h:93
A group of individuals.
Definition: attendee.h:95
An individual (default)
Definition: attendee.h:94
Role
The different types of participation roles.
Definition: attendee.h:80
PartStat
The different types of participant status.
Definition: attendee.h:65
Non-Participant; copied for information purposes.
Definition: attendee.h:83
A room resource.
Definition: attendee.h:97
Event or to-do delegated.
Definition: attendee.h:70
Participation is required (default)
Definition: attendee.h:81
A physical resource.
Definition: attendee.h:96
To-do in process of being completed.
Definition: attendee.h:72
Event, to-do or journal needs action (default)
Definition: attendee.h:66
Namespace for all KCalendarCore types.
Definition: alarm.h:36
Participation is optional.
Definition: attendee.h:82
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Aug 12 2020 22:51:02 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.