KContacts Namespace

Everything that needs to go in to the KContacts Q_NAMESPACE meta object. More...

Header: #include <KContacts/Namespace>
CMake: find_package(KF6 REQUIRED COMPONENTS Contacts)
target_link_libraries(mytarget PRIVATE KF6::Contacts)

Namespaces

(since 4.3) namespace ContactGroupTool
namespace LDIFConverter
(since 4.5) namespace VCardDrag

Classes

class Address
(since 5.92) class AddressFormat
(since 5.92) class AddressFormatElement
(since 5.92) class AddressFormatRepository
class Addressee
(since 4.14.6) class CalendarUrl
(since 5.4) class ClientPidMap
(since 4.3) class ContactGroup
(since 4.14.5) class Email
(since 5.3) class FieldGroup
(since 4.14.5) class Gender
class Geo
(since 4.14.5) class Impp
class Key
(since 4.14.5) class Lang
(since 5.3) class NickName
(since 5.3) class Note
(since 5.3) class Org
class PhoneNumber
class Picture
class Related
(since 5.0) class ResourceLocatorUrl
(since 5.3) class Role
class Secrecy
class Sound
class TimeZone
(since 5.3) class Title
class VCardConverter

Types

(since 5.92) enum class AddressFormatField { NoField, Country, Region, Locality, DependentLocality, …, PostOfficeBox }
flags AddressFormatFields
(since 5.92) enum class AddressFormatPreference { Generic, Business }
(since 5.92) enum class AddressFormatScriptPreference { Local, Latin }
(since 5.92) enum class AddressFormatStyle { Postal, MultiLineDomestic, MultiLineInternational, SingleLineDomestic, SingleLineInternational, GeoUriQuery }
AddresseeList

Functions

QDateTime VCardStringToDate(const QString &dateString)
void adaptIMAttributes(QByteArray &data)
QString dateToVCardString(QDate date)
QString dateToVCardString(const QDateTime &dateTime)
QDataStream &operator<<(QDataStream &stream, const KContacts::Address &address)
QDataStream &operator<<(QDataStream &stream, const KContacts::Geo &object)
QDataStream &operator<<(QDataStream &stream, const KContacts::CalendarUrl &object)
QDataStream &operator<<(QDataStream &stream, const KContacts::ClientPidMap &object)
QDataStream &operator<<(QDataStream &stream, const KContacts::Email &object)
QDataStream &operator<<(QDataStream &stream, const KContacts::FieldGroup &object)
QDataStream &operator<<(QDataStream &stream, const KContacts::Gender &object)
QDataStream &operator<<(QDataStream &stream, const KContacts::Impp &object)
QDataStream &operator<<(QDataStream &stream, const KContacts::Key &key)
QDataStream &operator<<(QDataStream &stream, const KContacts::Lang &object)
QDataStream &operator<<(QDataStream &stream, const KContacts::NickName &object)
QDataStream &operator<<(QDataStream &stream, const KContacts::Org &object)
QDataStream &operator<<(QDataStream &stream, const KContacts::PhoneNumber &number)
QDataStream &operator<<(QDataStream &stream, const KContacts::Picture &picture)
QDataStream &operator<<(QDataStream &stream, const KContacts::Related &object)
QDataStream &operator<<(QDataStream &stream, const KContacts::ResourceLocatorUrl &object)
QDataStream &operator<<(QDataStream &stream, const KContacts::Role &object)
QDataStream &operator<<(QDataStream &stream, const KContacts::Secrecy &secrecy)
QDataStream &operator<<(QDataStream &stream, const KContacts::Sound &sound)
QDataStream &operator<<(QDataStream &stream, const KContacts::TimeZone &timeZone)
QDataStream &operator<<(QDataStream &stream, const KContacts::Title &object)
QDataStream &operator<<(QDataStream &, const KContacts::Addressee &)
QDataStream &operator<<(QDataStream &stream, const KContacts::Note &object)
QDataStream &operator>>(QDataStream &stream, KContacts::Address &address)
QDataStream &operator>>(QDataStream &stream, KContacts::Geo &object)
QDataStream &operator>>(QDataStream &stream, KContacts::CalendarUrl &object)
QDataStream &operator>>(QDataStream &stream, KContacts::ClientPidMap &object)
QDataStream &operator>>(QDataStream &stream, KContacts::Email &object)
QDataStream &operator>>(QDataStream &stream, KContacts::FieldGroup &object)
QDataStream &operator>>(QDataStream &stream, KContacts::Gender &object)
QDataStream &operator>>(QDataStream &stream, KContacts::Impp &object)
QDataStream &operator>>(QDataStream &stream, KContacts::Key &key)
QDataStream &operator>>(QDataStream &stream, KContacts::Lang &object)
QDataStream &operator>>(QDataStream &stream, KContacts::NickName &object)
QDataStream &operator>>(QDataStream &stream, KContacts::Org &object)
QDataStream &operator>>(QDataStream &stream, KContacts::PhoneNumber &number)
QDataStream &operator>>(QDataStream &stream, KContacts::Picture &picture)
QDataStream &operator>>(QDataStream &stream, KContacts::Related &object)
QDataStream &operator>>(QDataStream &stream, KContacts::ResourceLocatorUrl &object)
QDataStream &operator>>(QDataStream &stream, KContacts::Role &object)
QDataStream &operator>>(QDataStream &stream, KContacts::Secrecy &secrecy)
QDataStream &operator>>(QDataStream &stream, KContacts::Sound &sound)
QDataStream &operator>>(QDataStream &stream, KContacts::TimeZone &timeZone)
QDataStream &operator>>(QDataStream &stream, KContacts::Title &object)
QDataStream &operator>>(QDataStream &, KContacts::Addressee &)
QDataStream &operator>>(QDataStream &stream, KContacts::Note &object)

Detailed Description

Namespaces

[since 4.3] namespace KContacts::ContactGroupTool

This namespace was introduced in 4.3.

namespace KContacts::LDIFConverter

It is useful for addressbook import- and exportfilters and might be used to read and write Mozilla and Netscape addresssbooks.

[since 4.5] namespace KContacts::VCardDrag

See the Qt drag'n'drop documentation.

This namespace was introduced in 4.5.

Classes

class Address

Postal address information. More...

class AddressFormat

Information on how addresses are formatted in a specific country/language. More...

class AddressFormatElement

A single element in an address format. More...

class AddressFormatRepository

Provides address format information for a given country. More...

class Addressee

Address book entry. More...

class CalendarUrl

Class that holds a Calendar Url (FBURL/CALADRURI/CALURI). More...

class ClientPidMap

Class that holds a ClientPidMap for a contact. More...

class ContactGroup

This class represents a group of contacts. More...

class Email

Class that holds a Email for a contact. More...

class FieldGroup

Class that holds a FieldGroup for a contact. More...

class Gender

Class that holds a Gender for a contact. More...

class Geo

Geographic position. More...

class Impp

Class that holds a IMPP for a contact. More...

class Key

A class to store an encryption key. More...

class Lang

Class that holds a Language for a contact. More...

class NickName

Class that holds a NickName for a contact. More...

class Note

Class that holds a Note for a contact. More...

class Org

Class that holds a Organization for a contact. More...

class PhoneNumber

Phonenumber information. More...

class Picture

A class to store a picture of an addressee. More...

class Related

Describes a relationship of an Addressee. More...

class ResourceLocatorUrl

Class that holds a Resource Locator. More...

class Role

Class that holds a Role for a contact. More...

class Secrecy

Describes the confidentiality of an addressee. More...

class Sound

Class that holds a Sound clip for a contact. More...

class TimeZone

Time zone information. More...

class Title

Class that holds a Title for a contact. More...

class VCardConverter

Class to converting contact objects into vCard format and vice versa. More...

Type Documentation

[since 5.92] enum class KContacts::AddressFormatField
flags KContacts::AddressFormatFields

Address field types.

These are the field types that can be referenced in address format rules.

Note: Not all of those are represented by vCard and thus KContacts, but exist only for compatibility with libaddressinput, so format rules from that can be consumed directly.

ConstantValue
KContacts::AddressFormatField::NoField0
KContacts::AddressFormatField::Country1
KContacts::AddressFormatField::Region2
KContacts::AddressFormatField::Locality4
KContacts::AddressFormatField::DependentLocality8
KContacts::AddressFormatField::SortingCode16
KContacts::AddressFormatField::PostalCode32
KContacts::AddressFormatField::StreetAddress64
KContacts::AddressFormatField::Organization128
KContacts::AddressFormatField::Name256
KContacts::AddressFormatField::PostOfficeBox512

This enum was introduced in 5.92.

The AddressFormatFields type is a typedef for QFlags<AddressFormatField>. It stores an OR combination of AddressFormatField values.

See also KContacts::AddressFormat.

[since 5.92] enum class KContacts::AddressFormatPreference

Indicate whether to prefer an address format for (postal) business address or a generic one.

ConstantValue
KContacts::AddressFormatPreference::Generic0
KContacts::AddressFormatPreference::Business1

This enum was introduced in 5.92.

See also KContacts::AddressFormatRepository.

[since 5.92] enum class KContacts::AddressFormatScriptPreference

Indicate whether to use a address format in the local script or a Latin transliteration.

ConstantValue
KContacts::AddressFormatScriptPreference::Local0
KContacts::AddressFormatScriptPreference::Latin1

This enum was introduced in 5.92.

See also KContacts::AddressFormatRepository.

[since 5.92] enum class KContacts::AddressFormatStyle

Address formatting styles.

ConstantValueDescription
KContacts::AddressFormatStyle::Postal0Format used for addressing postal mail
KContacts::AddressFormatStyle::MultiLineDomestic1Multi-line format without country, for displaying
KContacts::AddressFormatStyle::MultiLineInternational2Multi-line format including the country, for displaying
KContacts::AddressFormatStyle::SingleLineDomestic3Single-line format without country, for displaying
KContacts::AddressFormatStyle::SingleLineInternational4Single-line format including the country, for displaying
KContacts::AddressFormatStyle::GeoUriQuery5Format used in geo: URI query expressions

This enum was introduced in 5.92.

See also KContacts::Address::formatted.

KContacts::AddresseeList

A QList of Addressee.

Function Documentation

QDateTime KContacts::VCardStringToDate(const QString &dateString)

Converts a date string as it is used in VCard and LDIF files to a QDateTime value. If the date string does not contain a time value, it will be returned as 00:00:00. (e.g. "20031201T120000" will return a QDateTime for 2003-12-01 at 12:00)

dateString string representing the date and time.

void KContacts::adaptIMAttributes(QByteArray &data)

Convert KAddressBook attribute to VCard IM Attribute

QString KContacts::dateToVCardString(QDate date)

Converts a QDate to a short date string as it is used in VCard and LDIF files. The return value is in the form "yyyyMMdd" (e.g. "20031201")

date date to be converted

QString KContacts::dateToVCardString(const QDateTime &dateTime)

Converts a QDateTime to a date string as it is used in VCard and LDIF files. The return value is in the form "yyyyMMddThhmmssZ" (e.g. "20031201T120000Z")

dateTime date and time to be converted

QDataStream &operator<<(QDataStream &stream, const KContacts::Address &address)

Serializes the address object into the stream.

QDataStream &operator<<(QDataStream &stream, const KContacts::Geo &object)

Serializes the geographical position object into the stream.

QDataStream &operator<<(QDataStream &stream, const KContacts::CalendarUrl &object)

QDataStream &operator<<(QDataStream &stream, const KContacts::ClientPidMap &object)

QDataStream &operator<<(QDataStream &stream, const KContacts::Email &object)

QDataStream &operator<<(QDataStream &stream, const KContacts::FieldGroup &object)

QDataStream &operator<<(QDataStream &stream, const KContacts::Gender &object)

QDataStream &operator<<(QDataStream &stream, const KContacts::Impp &object)

QDataStream &operator<<(QDataStream &stream, const KContacts::Key &key)

Serializes the key object into the stream.

QDataStream &operator<<(QDataStream &stream, const KContacts::Lang &object)

QDataStream &operator<<(QDataStream &stream, const KContacts::NickName &object)

QDataStream &operator<<(QDataStream &stream, const KContacts::Org &object)

QDataStream &operator<<(QDataStream &stream, const KContacts::PhoneNumber &number)

Serializes the phone number object into the stream.

stream The stream to write into

number The phone number object to serialize

QDataStream &operator<<(QDataStream &stream, const KContacts::Picture &picture)

Serializes the picture object into the stream.

QDataStream &operator<<(QDataStream &stream, const KContacts::Related &object)

QDataStream &operator<<(QDataStream &stream, const KContacts::ResourceLocatorUrl &object)

QDataStream &operator<<(QDataStream &stream, const KContacts::Role &object)

QDataStream &operator<<(QDataStream &stream, const KContacts::Secrecy &secrecy)

Serializes the secrecy object into the stream.

QDataStream &operator<<(QDataStream &stream, const KContacts::Sound &sound)

Serializes the sound object into the stream.

QDataStream &operator<<(QDataStream &stream, const KContacts::TimeZone &timeZone)

Serializes the timeZone object into the stream.

QDataStream &operator<<(QDataStream &stream, const KContacts::Title &object)

QDataStream &operator<<(QDataStream &, const KContacts::Addressee &)

QDataStream &operator<<(QDataStream &stream, const KContacts::Note &object)

QDataStream &operator>>(QDataStream &stream, KContacts::Address &address)

Initializes the address object from the stream.

QDataStream &operator>>(QDataStream &stream, KContacts::Geo &object)

Initializes the geographical position object from the stream.

QDataStream &operator>>(QDataStream &stream, KContacts::CalendarUrl &object)

QDataStream &operator>>(QDataStream &stream, KContacts::ClientPidMap &object)

QDataStream &operator>>(QDataStream &stream, KContacts::Email &object)

QDataStream &operator>>(QDataStream &stream, KContacts::FieldGroup &object)

QDataStream &operator>>(QDataStream &stream, KContacts::Gender &object)

QDataStream &operator>>(QDataStream &stream, KContacts::Impp &object)

QDataStream &operator>>(QDataStream &stream, KContacts::Key &key)

Initializes the key object from the stream.

QDataStream &operator>>(QDataStream &stream, KContacts::Lang &object)

QDataStream &operator>>(QDataStream &stream, KContacts::NickName &object)

QDataStream &operator>>(QDataStream &stream, KContacts::Org &object)

QDataStream &operator>>(QDataStream &stream, KContacts::PhoneNumber &number)

Initializes the phone number object from the stream.

stream The stream to read from

number The phone number object to deserialize into

QDataStream &operator>>(QDataStream &stream, KContacts::Picture &picture)

Initializes the picture object from the stream.

QDataStream &operator>>(QDataStream &stream, KContacts::Related &object)

QDataStream &operator>>(QDataStream &stream, KContacts::ResourceLocatorUrl &object)

QDataStream &operator>>(QDataStream &stream, KContacts::Role &object)

QDataStream &operator>>(QDataStream &stream, KContacts::Secrecy &secrecy)

Initializes the secrecy object from the stream.

QDataStream &operator>>(QDataStream &stream, KContacts::Sound &sound)

Initializes the sound object from the stream.

QDataStream &operator>>(QDataStream &stream, KContacts::TimeZone &timeZone)

Initializes the timeZone object from the stream.

QDataStream &operator>>(QDataStream &stream, KContacts::Title &object)

QDataStream &operator>>(QDataStream &, KContacts::Addressee &)

QDataStream &operator>>(QDataStream &stream, KContacts::Note &object)