2 This file is part of libkcal.
4 Copyright (c) 2001-2003 Cornelius Schumacher <schumacher@kde.org>
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA.
22 #ifndef KCAL_ATTENDEE_H
23 #define KCAL_ATTENDEE_H
33 This class represents information related to an attendee of an event.
35 class Attendee
: public Person
38 enum PartStat
{ NeedsAction
, Accepted
, Declined
, Tentative
,
39 Delegated
, Completed
, InProcess
};
40 enum Role
{ ReqParticipant
, OptParticipant
, NonParticipant
, Chair
};
42 typedef ListBase
<Attendee
> List
;
48 @param email Email address
49 @param rsvp Request for reply
50 @param status Status (see enum for list)
52 @param u the uid for the attendee
54 Attendee( const QString
&name
, const QString
&email
,
55 bool rsvp
= false, PartStat status
= NeedsAction
,
56 Role role
= ReqParticipant
, const QString
&u
= QString::null
);
65 // FIXME: List of roles still has to be documented.
69 Return role of Attendee.
74 Return role as clear text string.
76 QString
roleStr() const;
78 Return string represenation of role.
80 static QString
roleName( Role
);
82 Return string representations of all available roles.
84 static QStringList
roleList();
87 Return unique id of the attendee.
91 Set unique id of attendee.
93 void setUid ( const QString
& );
96 Set status. See enum for definitions of possible values.
98 void setStatus( PartStat s
);
103 PartStat
status() const;
106 Return status as human-readable string.
108 QString
statusStr() const;
110 Return string representation of attendee status.
112 static QString
statusName( PartStat
);
114 Return string representations of all available attendee status values.
116 static QStringList
statusList();
119 Set if Attendee is asked to reply.
121 void setRSVP( bool r
) { mRSVP
= r
; }
123 Return, if Attendee is asked to reply.
125 bool RSVP() const { return mRSVP
; }
137 bool operator==( const Attendee
& a1
, const Attendee
& a2
);