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

KCalCore Library

  • 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  friend KCALCORE_EXPORT QDataStream &operator<<( QDataStream &s,
200  const KCalCore::Person::Ptr &person );
201  friend KCALCORE_EXPORT QDataStream &operator>>( QDataStream &s,
202  KCalCore::Person::Ptr &person );
203 };
204 
208 KCALCORE_EXPORT QDataStream &operator<<( QDataStream &stream, const KCalCore::Person::Ptr &person );
209 
213 KCALCORE_EXPORT QDataStream &operator>>( QDataStream &stream, KCalCore::Person::Ptr &person );
214 
215 }
216 
221 KCALCORE_EXPORT uint qHash( const KCalCore::Person &key );
222 
223 //@cond PRIVATE
224 Q_DECLARE_TYPEINFO( KCalCore::Person::Ptr, Q_MOVABLE_TYPE );
225 Q_DECLARE_METATYPE( KCalCore::Person::Ptr )
226 //@endcond
227 
228 #endif
qHash
static uint qHash(const KDateTime &dt)
Private class that helps to provide binary compatibility between releases.
Definition: occurrenceiterator.cpp:157
KCalCore::Person
Represents a person, by name and email address.
Definition: person.h:50
KCalCore::Person::List
QVector< Ptr > List
List of persons.
Definition: person.h:61
KCalCore::Person::Ptr
QSharedPointer< Person > Ptr
A shared pointer to a Person object.
Definition: person.h:56
KCalCore::operator<<
KCALCORE_EXPORT QDataStream & operator<<(QDataStream &stream, const KCalCore::Attendee::Ptr &attendee)
Serializes an Attendee object into a data stream.
Definition: attendee.cpp:186
KCalCore::operator>>
KCALCORE_EXPORT QDataStream & operator>>(QDataStream &stream, KCalCore::Attendee::Ptr &attendee)
Initializes an Attendee object from a data stream.
Definition: attendee.cpp:199
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Nov 26 2013 09:02:04 by doxygen 1.8.5 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-4.11.3 API Reference

Skip menu "kdepimlibs-4.11.3 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
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