• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepimlibs API Reference
  • KDE Home
  • Contact Us
 

KCalCore Library

  • sources
  • kde-4.12
  • kdepimlibs
  • kcalcore
person.h
Go to the documentation of this file.
1 /*
2  This file is part of the kcalcore library.
3 
4  Copyright (c) 2001-2003 Cornelius Schumacher <schumacher@kde.org>
5  Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
6 
7  This library is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Library General Public
9  License as published by the Free Software Foundation; either
10  version 2 of the License, or (at your option) any later version.
11 
12  This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  Library General Public License for more details.
16 
17  You should have received a copy of the GNU Library General Public License
18  along with this library; see the file COPYING.LIB. If not, write to
19  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  Boston, MA 02110-1301, USA.
21 */
31 #ifndef KCALCORE_PERSON_H
32 #define KCALCORE_PERSON_H
33 
34 #include "kcalcore_export.h"
35 
36 #include <QtCore/QString>
37 #include <QtCore/QHash>
38 #include <QtCore/QMetaType>
39 #include <QtCore/QSharedPointer>
40 
41 namespace KCalCore {
42 
50 class KCALCORE_EXPORT Person
51 {
52 public:
56  typedef QSharedPointer<Person> Ptr;
57 
61  typedef QVector<Ptr> List;
62 
66  Person();
67 
75  static Person::Ptr fromFullName(const QString &fullName);
76 
83  Person(const QString &name, const QString &email);
84 
89  Person(const Person &person);
90 
94  virtual ~Person();
95 
99  bool isEmpty() const;
100 
106  QString fullName() const;
107 
115  void setName(const QString &name);
116 
122  QString name() const;
123 
131  void setEmail(const QString &email);
132 
138  QString email() const;
139 
151  static bool isValidEmail(const QString &email);
152 
163  void setCount(int count);
164 
170  int count() const;
171 
177  bool operator==(const Person &person) const;
178 
184  bool operator!=(const Person &person) const;
185 
191  Person &operator=(const Person &person);
192 
193 private:
194  //@cond PRIVATE
195  class Private;
196  Private *const d;
197  //@endcond
198 
199  // TODO_KDE5: FIXME: This operator does slicing,if the object is in fact one of the derived classes (Attendee)
200  friend KCALCORE_EXPORT QDataStream &operator<<(QDataStream &s,
201  const KCalCore::Person::Ptr &person);
202  friend KCALCORE_EXPORT QDataStream &operator>>(QDataStream &s,
203  KCalCore::Person::Ptr &person);
204 };
205 
209 KCALCORE_EXPORT QDataStream &operator<<(QDataStream &stream, const KCalCore::Person::Ptr &person);
210 
214 KCALCORE_EXPORT QDataStream &operator>>(QDataStream &stream, KCalCore::Person::Ptr &person);
215 
216 }
217 
222 KCALCORE_EXPORT uint qHash(const KCalCore::Person &key);
223 
224 //@cond PRIVATE
225 Q_DECLARE_TYPEINFO(KCalCore::Person::Ptr, Q_MOVABLE_TYPE);
226 Q_DECLARE_METATYPE(KCalCore::Person::Ptr)
227 //@endcond
228 
229 #endif
KCalCore::Person
Represents a person, by name and email address.
Definition: person.h:50
qHash
KCALCORE_EXPORT uint qHash(const KCalCore::Person &key)
Return a hash value for a Person argument.
Definition: person.cpp:171
KCalCore::Person::List
QVector< Ptr > List
List of persons.
Definition: person.h:61
KCalCore::operator>>
KCALCORE_EXPORT QDataStream & operator>>(QDataStream &in, const KCalCore::Alarm::Ptr &)
Alarm deserializer.
Definition: alarm.cpp:863
KCalCore::Person::Ptr
QSharedPointer< Person > Ptr
A shared pointer to a Person object.
Definition: person.h:56
KCalCore::operator<<
KCALCORE_EXPORT QDataStream & operator<<(QDataStream &out, const KCalCore::Alarm::Ptr &)
Alarm serializer.
Definition: alarm.cpp:853
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:59:57 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KCalCore Library

Skip menu "KCalCore Library"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal