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

KCalCore Library

person.h
Go to the documentation of this file.
00001 /*
00002   This file is part of the kcalcore library.
00003 
00004   Copyright (c) 2001-2003 Cornelius Schumacher <schumacher@kde.org>
00005   Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
00006 
00007   This library is free software; you can redistribute it and/or
00008   modify it under the terms of the GNU Library General Public
00009   License as published by the Free Software Foundation; either
00010   version 2 of the License, or (at your option) any later version.
00011 
00012   This library is distributed in the hope that it will be useful,
00013   but WITHOUT ANY WARRANTY; without even the implied warranty of
00014   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015   Library General Public License for more details.
00016 
00017   You should have received a copy of the GNU Library General Public License
00018   along with this library; see the file COPYING.LIB.  If not, write to
00019   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00020   Boston, MA 02110-1301, USA.
00021 */
00031 #ifndef KCALCORE_PERSON_H
00032 #define KCALCORE_PERSON_H
00033 
00034 #include "kcalcore_export.h"
00035 
00036 #include <QtCore/QString>
00037 #include <QtCore/QHash>
00038 #include <QtCore/QMetaType>
00039 #include <QtCore/QSharedPointer>
00040 
00041 namespace KCalCore {
00042 
00050 class KCALCORE_EXPORT Person
00051 {
00052   public:
00056     typedef QSharedPointer<Person> Ptr;
00057 
00061     typedef QVector<Ptr> List;
00062 
00066     Person();
00067 
00074     static Person::Ptr fromFullName( const QString &fullName );
00075 
00082     Person( const QString &name, const QString &email );
00083 
00089     Person( const Person &person );
00090 
00094     virtual ~Person();
00095 
00099     bool isEmpty() const;
00100 
00104     QString fullName( ) const;
00105 
00113     void setName( const QString &name );
00114 
00120     QString name() const;
00121 
00129     void setEmail( const QString &email );
00130 
00136     QString email() const;
00137 
00149     static bool isValidEmail( const QString &email );
00150 
00161     void setCount( int count );
00162 
00168     int count() const;
00169 
00175     bool operator==( const Person &person ) const;
00176 
00182     bool operator!=( const Person &person ) const;
00183 
00189     Person &operator=( const Person &person );
00190 
00191   private:
00192     //@cond PRIVATE
00193     class Private;
00194     Private *const d;
00195    //@endcond
00196 
00197     friend KCALCORE_EXPORT QDataStream &operator<<( QDataStream &s,
00198                                                     const KCalCore::Person::Ptr &person );
00199     friend KCALCORE_EXPORT QDataStream &operator>>( QDataStream &s,
00200                                                     KCalCore::Person::Ptr &person );
00201 };
00202 
00206 KCALCORE_EXPORT QDataStream &operator<<( QDataStream &stream, const KCalCore::Person::Ptr &person );
00207 
00211 KCALCORE_EXPORT QDataStream &operator>>( QDataStream &stream, KCalCore::Person::Ptr &person );
00212 
00213 }
00214 
00215 Q_DECLARE_TYPEINFO( KCalCore::Person::Ptr, Q_MOVABLE_TYPE );
00216 
00221 KCALCORE_EXPORT uint qHash( const KCalCore::Person &key );
00222 
00223 //@cond PRIVATE
00224 Q_DECLARE_METATYPE( KCalCore::Person::Ptr )
00225 //@endcond
00226 
00227 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu Aug 2 2012 15:24:12 by doxygen 1.7.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.8.5 API Reference

Skip menu "kdepimlibs-4.8.5 API Reference"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • 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