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

kabc

  • sources
  • kde-4.14
  • kdepimlibs
  • kabc
phonenumber.h
1 /*
2  This file is part of libkabc.
3  Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 #ifndef KABC_PHONENUMBER_H
22 #define KABC_PHONENUMBER_H
23 
24 #include "kabc_export.h"
25 
26 #include <QtCore/QSharedDataPointer>
27 #include <QtCore/QString>
28 
29 namespace KABC {
30 
38 class KABC_EXPORT PhoneNumber
39 {
40  friend KABC_EXPORT QDataStream &operator<<( QDataStream &, const PhoneNumber & );
41  friend KABC_EXPORT QDataStream &operator>>( QDataStream &, PhoneNumber & );
42 
43  public:
47  enum TypeFlag {
48  Home = 1,
49  Work = 2,
50  Msg = 4,
51  Pref = 8,
52  Voice = 16,
53  Fax = 32,
54  Cell = 64,
55  Video = 128,
56  Bbs = 256,
57  Modem = 512,
58  Car = 1024,
59  Isdn = 2048,
60  Pcs = 4096,
61  Pager = 8192
62  };
63 
64  Q_DECLARE_FLAGS( Type, TypeFlag )
65 
66 
69  typedef QList<TypeFlag> TypeList;
70 
74  typedef QList<PhoneNumber> List;
75 
79  PhoneNumber();
80 
88  PhoneNumber( const QString &number, Type type = Home ); //krazy:exclude=explicit
89 
97  PhoneNumber( const PhoneNumber &other );
98 
102  ~PhoneNumber();
103 
110  bool operator==( const PhoneNumber & ) const;
111 
115  bool operator!=( const PhoneNumber & ) const;
116 
124  PhoneNumber &operator=( const PhoneNumber &other );
125 
129  bool isEmpty() const;
130 
134  void setId( const QString &identifier );
135 
139  QString id() const;
140 
144  void setNumber( const QString &number );
145 
149  QString number() const;
150 
157  void setType( Type type );
158 
165  Type type() const;
166 
170  QString typeLabel() const;
171 
175  static TypeList typeList();
176 
187  static QString typeLabel( Type type );
188 
197  static QString typeFlagLabel( TypeFlag type );
198 
202  QString toString() const;
203 
204  private:
205  class Private;
206  QSharedDataPointer<Private> d;
207 };
208 
209 Q_DECLARE_OPERATORS_FOR_FLAGS( PhoneNumber::Type )
210 
217 KABC_EXPORT QDataStream &operator<<( QDataStream &stream, const PhoneNumber &number );
218 
225 KABC_EXPORT QDataStream &operator>>( QDataStream &stream, const PhoneNumber &number );
226 
227 }
228 
229 #endif
KABC::PhoneNumber
Phonenumber information.
Definition: phonenumber.h:38
QDataStream
KABC::operator<<
QDataStream & operator<<(QDataStream &stream, const Address &address)
Serializes the address object into the stream.
Definition: address.cpp:680
QString
QList
Definition: contactgrouptool.h:30
KABC::operator>>
QDataStream & operator>>(QDataStream &stream, Address &address)
Initializes the address object from the stream.
Definition: address.cpp:688
KABC::PhoneNumber::TypeFlag
TypeFlag
Phone number types.
Definition: phonenumber.h:47
QSharedDataPointer
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:38 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kabc

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

kdepimlibs API Reference

Skip menu "kdepimlibs 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

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