• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

kabc

phonenumber.h

00001 /*
00002     This file is part of libkabc.
00003     Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public License
00016     along with this library; see the file COPYING.LIB.  If not, write to
00017     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018     Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef KABC_PHONENUMBER_H
00022 #define KABC_PHONENUMBER_H
00023 
00024 #include "kabc_export.h"
00025 
00026 #include <QtCore/QSharedDataPointer>
00027 #include <QtCore/QString>
00028 
00029 namespace KABC {
00030 
00038 class KABC_EXPORT PhoneNumber
00039 {
00040     friend KABC_EXPORT QDataStream &operator<<( QDataStream &, const PhoneNumber & );
00041     friend KABC_EXPORT QDataStream &operator>>( QDataStream &, PhoneNumber & );
00042 
00043   public:
00047     enum TypeFlag {
00048       Home = 1,     
00049       Work = 2,     
00050       Msg = 4,      
00051       Pref = 8,     
00052       Voice = 16,   
00053       Fax = 32,     
00054       Cell = 64,    
00055       Video = 128,  
00056       Bbs = 256,    
00057       Modem = 512,  
00058       Car = 1024,   
00059       Isdn = 2048,  
00060       Pcs = 4096,   
00061       Pager = 8192  
00062     };
00063 
00064     Q_DECLARE_FLAGS( Type, TypeFlag )
00065 
00066     
00069     typedef QList<TypeFlag> TypeList;
00070 
00074     typedef QList<PhoneNumber> List;
00075 
00079     PhoneNumber();
00080 
00088     PhoneNumber( const QString &number, Type type = Home ); //krazy:exclude=explicit
00089 
00097     PhoneNumber( const PhoneNumber &other );
00098 
00102     ~PhoneNumber();
00103 
00110     bool operator==( const PhoneNumber & ) const;
00111 
00115     bool operator!=( const PhoneNumber & ) const;
00116 
00124     PhoneNumber &operator=( const PhoneNumber &other );
00125 
00129     bool isEmpty() const;
00130 
00134     void setId( const QString &identifier );
00135 
00139     QString id() const;
00140 
00144     void setNumber( const QString &number );
00145 
00149     QString number() const;
00150 
00157     void setType( Type type );
00158 
00165     Type type() const;
00166 
00170     QString typeLabel() const;
00171 
00175     static TypeList typeList();
00176 
00184     static QString typeLabel( Type type );
00185 
00189     QString toString() const;
00190 
00191   private:
00192     class Private;
00193     QSharedDataPointer<Private> d;
00194 };
00195 
00196 Q_DECLARE_OPERATORS_FOR_FLAGS( PhoneNumber::Type )
00197 
00204 KABC_EXPORT QDataStream &operator<<( QDataStream &stream, const PhoneNumber &number );
00205 
00212 KABC_EXPORT QDataStream &operator>>( QDataStream &stream, const PhoneNumber &number );
00213 
00214 }
00215 
00216 #endif

kabc

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

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.6.2-20100208
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal