| # kabc Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# 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., 59 Temple Place - Suite 330,
    00018     Boston, MA 02111-1307, USA.
    00019 */
    00020
    00021 #ifndef KABC_PHONENUMBER_H
    00022 #define KABC_PHONENUMBER_H
    00023
    00024 #include <qvaluelist.h>
    00025 #include <qstring.h>
    00026
    00027 namespace KABC {
    00028
    00036 class PhoneNumber
    00037 {
    00038     friend QDataStream &operator<<( QDataStream &, const PhoneNumber & );
    00039     friend QDataStream &operator>>( QDataStream &, PhoneNumber & );
    00040
    00041   public:
    00042     typedef QValueList<PhoneNumber> List;
    00043     typedef QValueList<int> TypeList;
    00044
    00061     enum Types { Home = 1, Work = 2, Msg = 4, Pref = 8, Voice = 16, Fax = 32,
    00062            Cell = 64, Video = 128, Bbs = 256, Modem = 512, Car = 1024,
    00063            Isdn = 2048, Pcs = 4096, Pager = 8192 };
    00064
    00068     PhoneNumber();
    00069
    00077     PhoneNumber( const QString &number, int type = Home );
    00078
    00082     ~PhoneNumber();
    00083
    00084     bool operator==( const PhoneNumber & ) const;
    00085     bool operator!=( const PhoneNumber & ) const;
    00086
    00090     void setId( const QString &id );
    00091
    00095     QString id() const;
    00096
    00100     void setNumber( const QString & );
    00101
    00105     QString number() const;
    00106
    00111     void setType( int );
    00112
    00116     int type() const;
    00117
    00121     QString typeLabel() const;
    00122
    00126     QString label() const;
    00127
    00131     static TypeList typeList();
    00132
    00136     static QString typeLabel( int type );
    00137
    00142     static QString label( int type );
    00143
    00144   private:
    00145     void init();
    00146
    00147     QString mId;
    00148
    00149     int mType;
    00150     QString mNumber;
    00151 };
    00152
    00153 QDataStream &operator<<( QDataStream &, const PhoneNumber & );
    00154 QDataStream &operator>>( QDataStream &, PhoneNumber & );
    00155
    00156 }
    00157
    00158 #endif

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:29:20 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001