KGAPI2::Contact

#include <contact.h>

Inheritance diagram for KGAPI2::Contact:

Public Types

enum  IMProtocol {
  Jabber, ICQ, GoogleTalk, QQ,
  Skype, Yahoo, MSN, AIM,
  Other
}
 
- Public Types inherited from KContacts::Addressee
typedef AddresseeList List
 
typedef QHash< QString, AddresseeMap
 

Public Member Functions

 Contact ()
 
 Contact (const KContacts::Addressee &other)
 
 Contact (const Contact &other)
 
 ~Contact ()
 
void addGroup (const QString &group)
 
void clearGroups ()
 
QDateTime created () const
 
bool deleted () const
 
bool groupIsDeleted (const QString &group) const
 
QStringList groups () const
 
bool operator== (const Contact &other) const
 
QUrl photoUrl () const
 
void removeGroup (const QString &group)
 
void setCreated (const QDateTime &created)
 
void setDeleted (bool deleted)
 
void setGroups (const QStringList &groups)
 
void setPhotoUrl (const QString &photoUrl)
 
void setPhotoUrl (const QUrl &photoUrl)
 
void setUpdated (const QDateTime &updated)
 
QDateTime updated () const
 
- Public Member Functions inherited from KGAPI2::Object
 Object ()
 
 Object (const Object &other)
 
virtual ~Object ()
 
QString etag () const
 
bool operator== (const Object &other) const
 
void setEtag (const QString &etag)
 
- Public Member Functions inherited from KContacts::Addressee
 Addressee (const Addressee &other)
 
QString additionalName () const
 
Address address (Address::Type type) const
 
Address::List addresses () const
 
Address::List addresses (Address::Type type) const
 
QDate anniversary () const
 
QString assembledName () const
 
QString assistantsName () const
 
QDateTime birthday () const
 
bool birthdayHasTime () const
 
QUrl blogFeed () const
 
QStringList categories () const
 
bool changed () const
 
QString custom (const QString &app, const QString &name) const
 
QStringList customs () const
 
QString department () const
 
QStringList emails () const
 
QString familyName () const
 
Address findAddress (const QString &id) const
 
Key findKey (const QString &id) const
 
PhoneNumber findPhoneNumber (const QString &id) const
 
QString formattedName () const
 
QString fullEmail (const QString &email=QString()) const
 
Geo geo () const
 
QString givenName () const
 
bool hasCategory (const QString &category) const
 
void insertAddress (const Address &address)
 
void insertCategory (const QString &category)
 
void insertCustom (const QString &app, const QString &name, const QString &value)
 
void insertEmail (const QString &email, bool preferred=false, const QMap< QString, QStringList > &param=QMap< QString, QStringList >())
 
void insertKey (const Key &key)
 
void insertLang (const Lang &language)
 
void insertPhoneNumber (const PhoneNumber &phoneNumber)
 
bool isEmpty () const
 
Key key (Key::Type type, const QString &customTypeString=QString()) const
 
Key::List keys () const
 
Key::List keys (Key::Type type, const QString &customTypeString=QString()) const
 
Lang::List langs () const
 
Picture logo () const
 
QString mailer () const
 
QString managersName () const
 
QString name () const
 
QString nickName () const
 
QString note () const
 
QString office () const
 
bool operator!= (const Addressee &other) const
 
Addresseeoperator= (const Addressee &other)
 
bool operator== (const Addressee &other) const
 
QString organization () const
 
PhoneNumber phoneNumber (PhoneNumber::Type type) const
 
PhoneNumber::List phoneNumbers () const
 
PhoneNumber::List phoneNumbers (PhoneNumber::Type type) const
 
Picture photo () const
 
QString preferredEmail () const
 
QString prefix () const
 
QString productId () const
 
QString profession () const
 
QString realName () const
 
void removeAddress (const Address &address)
 
void removeCategory (const QString &category)
 
void removeCustom (const QString &app, const QString &name)
 
void removeEmail (const QString &email)
 
void removeKey (const Key &key)
 
void removeLang (const QString &language)
 
void removePhoneNumber (const PhoneNumber &phoneNumber)
 
QDateTime revision () const
 
QString role () const
 
Secrecy secrecy () const
 
void setAdditionalName (const QString &additionalName)
 
void setAnniversary (const QDate &anniversary)
 
void setAssistantsName (const QString &assistantsName)
 
void setBirthday (const QDateTime &birthday, bool withTime=true)
 
void setBirthday (const QDate &birthday)
 
void setBlogFeed (const QUrl &blogFeed)
 
void setCategories (const QStringList &category)
 
void setChanged (bool value)
 
void setCustoms (const QStringList &customs)
 
void setDepartment (const QString &department)
 
void setEmails (const QStringList &list)
 
void setFamilyName (const QString &familyName)
 
void setFormattedName (const QString &formattedName)
 
void setGeo (const Geo &geo)
 
void setGivenName (const QString &givenName)
 
void setKeys (const Key::List &keys)
 
void setLogo (const Picture &logo)
 
void setMailer (const QString &mailer)
 
void setManagersName (const QString &managersName)
 
void setName (const QString &name)
 
void setNameFromString (const QString &s)
 
void setNickName (const QString &nickName)
 
void setNote (const QString &note)
 
void setOffice (const QString &office)
 
void setOrganization (const QString &organization)
 
void setPhoto (const Picture &photo)
 
void setPrefix (const QString &prefix)
 
void setProductId (const QString &productId)
 
void setProfession (const QString &profession)
 
void setRevision (const QDateTime &revision)
 
void setRole (const QString &role)
 
void setSecrecy (const Secrecy &secrecy)
 
void setSortString (const QString &sortString)
 
void setSound (const Sound &sound)
 
void setSpousesName (const QString &spousesName)
 
void setSuffix (const QString &suffix)
 
void setTimeZone (const TimeZone &timeZone)
 
void setTitle (const QString &title)
 
void setUid (const QString &uid)
 
void setUrl (const ResourceLocatorUrl &url)
 
QString sortString () const
 
Sound sound () const
 
QString spousesName () const
 
QString suffix () const
 
TimeZone timeZone () const
 
QString title () const
 
QString toString () const
 
QString uid () const
 
ResourceLocatorUrl url () const
 

Static Public Member Functions

static KContacts::Address::Type addressSchemeToType (const QString &scheme, bool primary=false)
 
static QString addressTypeToScheme (const KContacts::Address::Type type, bool *primary=nullptr)
 
static QString emailSchemeToProtocolName (const QString &scheme)
 
static QString IMProtocolNameToScheme (const QString &protocolName)
 
static QString IMProtocolToScheme (const IMProtocol protocol)
 
static IMProtocol IMSchemeToProtocol (const QString &scheme)
 
static QString IMSchemeToProtocolName (const QString &scheme)
 
static KContacts::PhoneNumber::Type phoneSchemeToType (const QString &scheme)
 
static QString phoneTypeToScheme (const KContacts::PhoneNumber::Type type)
 
- Static Public Member Functions inherited from KContacts::Addressee
static QString additionalNameLabel ()
 
static QString birthdayLabel ()
 
static QString businessAddressCountryLabel ()
 
static QString businessAddressLabelLabel ()
 
static QString businessAddressLocalityLabel ()
 
static QString businessAddressPostalCodeLabel ()
 
static QString businessAddressPostOfficeBoxLabel ()
 
static QString businessAddressRegionLabel ()
 
static QString businessAddressStreetLabel ()
 
static QString businessFaxLabel ()
 
static QString businessPhoneLabel ()
 
static QString carPhoneLabel ()
 
static QString departmentLabel ()
 
static QString emailLabel ()
 
static QString familyNameLabel ()
 
static QString formattedNameLabel ()
 
static QString geoLabel ()
 
static QString givenNameLabel ()
 
static QString homeAddressCountryLabel ()
 
static QString homeAddressLabelLabel ()
 
static QString homeAddressLocalityLabel ()
 
static QString homeAddressPostalCodeLabel ()
 
static QString homeAddressPostOfficeBoxLabel ()
 
static QString homeAddressRegionLabel ()
 
static QString homeAddressStreetLabel ()
 
static QString homeFaxLabel ()
 
static QString homePhoneLabel ()
 
static QString isdnLabel ()
 
static QString logoLabel ()
 
static QString mailerLabel ()
 
static QString mimeType ()
 
static QString mobilePhoneLabel ()
 
static QString nameLabel ()
 
static QString nickNameLabel ()
 
static QString noteLabel ()
 
static QString organizationLabel ()
 
static QString pagerLabel ()
 
static void parseEmailAddress (const QString &rawEmail, QString &fullName, QString &email)
 
static QString photoLabel ()
 
static QString prefixLabel ()
 
static QString productIdLabel ()
 
static QString revisionLabel ()
 
static QString roleLabel ()
 
static QString secrecyLabel ()
 
static QString sortStringLabel ()
 
static QString soundLabel ()
 
static QString suffixLabel ()
 
static QString timeZoneLabel ()
 
static QString titleLabel ()
 
static QString uidLabel ()
 
static QString urlLabel ()
 

Detailed Description

Represents a single contact.

Author
Daniel Vrátil dvrat[email protected][email protected][email protected]edhat[email protected].com
Since
0.1

Definition at line 28 of file contact.h.

Member Enumeration Documentation

Instant Messaging Protocols.

Definition at line 36 of file contact.h.

Constructor & Destructor Documentation

Contact::Contact ( )

Constructor.

Definition at line 49 of file contact.cpp.

Contact::Contact ( const KContacts::Addressee other)
explicit

Copy constructor.

Definition at line 71 of file contact.cpp.

Contact::Contact ( const Contact other)

Copy constructor.

Definition at line 56 of file contact.cpp.

Contact::~Contact ( )

Destructor.

Definition at line 86 of file contact.cpp.

Member Function Documentation

void Contact::addGroup ( const QString group)

Adds a group the contact is member of.

Parameters
group

Definition at line 170 of file contact.cpp.

KContacts::Address::Type Contact::addressSchemeToType ( const QString scheme,
bool  primary = false 
)
static

Converts Google Scheme UrL to address type.

Parameters
scheme
primary

Definition at line 333 of file contact.cpp.

QString Contact::addressTypeToScheme ( const KContacts::Address::Type  type,
bool *  primary = nullptr 
)
static

Converts address type to Google Scheme URL.

Parameters
type
primary

Definition at line 315 of file contact.cpp.

void Contact::clearGroups ( )

Removes contact from all groups it's member of.

Definition at line 208 of file contact.cpp.

QDateTime Contact::created ( ) const

Returns date and time when the contact was created.

Definition at line 155 of file contact.cpp.

bool Contact::deleted ( ) const

Returns whether contact is deleted.

Definition at line 130 of file contact.cpp.

QString Contact::emailSchemeToProtocolName ( const QString scheme)
static

Contacts Google scheme URL to email type.

Definition at line 424 of file contact.cpp.

bool Contact::groupIsDeleted ( const QString group) const

Returns whether contact has been removed from the group or not.

Parameters
group

Definition at line 223 of file contact.cpp.

QStringList Contact::groups ( ) const

Returns list of groups the contact is member of.

Definition at line 199 of file contact.cpp.

QString Contact::IMProtocolNameToScheme ( const QString protocolName)
static

Converts string with protocol name to Google Scheme URL.

Parameters
protocolName

Definition at line 268 of file contact.cpp.

QString Contact::IMProtocolToScheme ( const IMProtocol  protocol)
static

Converts IMProtocol to Google Scheme URL.

Parameters
protocol

Definition at line 233 of file contact.cpp.

Contact::IMProtocol Contact::IMSchemeToProtocol ( const QString scheme)
static

Converts Google Scheme URL to IMProtocol.

Parameters
scheme

Definition at line 291 of file contact.cpp.

QString Contact::IMSchemeToProtocolName ( const QString scheme)
static

Converts Google Scheme URL to string with protocol name.

Parameters
scheme

Definition at line 259 of file contact.cpp.

KContacts::PhoneNumber::Type Contact::phoneSchemeToType ( const QString scheme)
static

Converts Google Scheme URL to phone number type.

Parameters
scheme

Definition at line 387 of file contact.cpp.

QString Contact::phoneTypeToScheme ( const KContacts::PhoneNumber::Type  type)
static

Converts phone number type to Google Scheme URL.

Parameters
type

Definition at line 351 of file contact.cpp.

QUrl Contact::photoUrl ( ) const

Returns URL of contact photo.

Definition at line 145 of file contact.cpp.

void Contact::removeGroup ( const QString group)

Remove contact from a group.

Use this method to remove contact from groups, instead of setGroups(QStringList()). To clear group membership use clearGroups()

Parameters
group

Definition at line 216 of file contact.cpp.

void Contact::setCreated ( const QDateTime created)

Sets date and time when the contact was created.

Parameters
created

Definition at line 150 of file contact.cpp.

void Contact::setDeleted ( bool  deleted)

Marks contact as deleted.

Parameters
deleted

Definition at line 125 of file contact.cpp.

void Contact::setGroups ( const QStringList groups)

Set list of groups the contact is member of.

Parameters
groups

Definition at line 189 of file contact.cpp.

void Contact::setPhotoUrl ( const QString photoUrl)

Sets URL of contact photo.

Parameters
photoUrl

Definition at line 135 of file contact.cpp.

void Contact::setUpdated ( const QDateTime updated)

Sets date and time or last modification.

Parameters
updated

Definition at line 160 of file contact.cpp.

QDateTime Contact::updated ( ) const

Returns date and time of last modification.

Definition at line 165 of file contact.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Dec 3 2020 23:11:57 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.