KContacts::ContactGroup Class

class KContacts::ContactGroup

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

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

Public Types

Public Functions

ContactGroup()
ContactGroup(const QString &name)
ContactGroup(const KContacts::ContactGroup &other)
~ContactGroup()
void append(const KContacts::ContactGroup::ContactGroupReference &reference)
void append(const KContacts::ContactGroup::ContactReference &reference)
void append(const KContacts::ContactGroup::Data &data)
KContacts::ContactGroup::ContactGroupReference &contactGroupReference(int index)
const KContacts::ContactGroup::ContactGroupReference &contactGroupReference(int index) const
int contactGroupReferenceCount() const
KContacts::ContactGroup::ContactReference &contactReference(int index)
const KContacts::ContactGroup::ContactReference &contactReference(int index) const
int contactReferenceCount() const
int count() const
KContacts::ContactGroup::Data &data(int index)
const KContacts::ContactGroup::Data &data(int index) const
int dataCount() const
QString id() const
QString name() const
void remove(const KContacts::ContactGroup::ContactGroupReference &reference)
void remove(const KContacts::ContactGroup::ContactReference &reference)
void remove(const KContacts::ContactGroup::Data &data)
void removeAllContactData()
void removeAllContactGroupReferences()
void removeAllContactReferences()
void setId(const QString &id)
void setName(const QString &name)

Static Public Members

QString mimeType()

Detailed Description

It can contain two types of contacts, either a reference or data. The reference entry is just an unique identifier which identifies the real contact in the system. The data entry contains a name and an email address.

Member Type Documentation

ContactGroup::List

A list of contact groups.

Member Function Documentation

ContactGroup::ContactGroup()

Creates an empty contact group.

ContactGroup::ContactGroup(const QString &name)

Creates a contact group with the given name.

ContactGroup::ContactGroup(const KContacts::ContactGroup &other)

Creates a contact group from an other group.

[noexcept] ContactGroup::~ContactGroup()

Destroys the contact group.

void ContactGroup::append(const KContacts::ContactGroup::ContactGroupReference &reference)

Appends a new contact group reference to the contact group.

void ContactGroup::append(const KContacts::ContactGroup::ContactReference &reference)

Appends a new contact reference to the contact group.

void ContactGroup::append(const KContacts::ContactGroup::Data &data)

Appends a new contact data object to the contact group.

KContacts::ContactGroup::ContactGroupReference &ContactGroup::contactGroupReference(int index)

Returns the contact group reference at the given index.

const KContacts::ContactGroup::ContactGroupReference &ContactGroup::contactGroupReference(int index) const

Returns the contact group reference at the given index.

int ContactGroup::contactGroupReferenceCount() const

Returns the number of group references in this group.

KContacts::ContactGroup::ContactReference &ContactGroup::contactReference(int index)

Returns the contact reference at the given index.

const KContacts::ContactGroup::ContactReference &ContactGroup::contactReference(int index) const

Returns the contact reference at the given index.

int ContactGroup::contactReferenceCount() const

Returns the number of contact references in this group.

int ContactGroup::count() const

Returns the number of contacts in this group. That includes the contact references and contact data.

KContacts::ContactGroup::Data &ContactGroup::data(int index)

Returns the contact data object at the given index.

const KContacts::ContactGroup::Data &ContactGroup::data(int index) const

Returns the contact data object at the given index.

int ContactGroup::dataCount() const

Returns the number of contact data objects in this group.

QString ContactGroup::id() const

Returns the unique id of the contact group.

See also setId().

[static] QString ContactGroup::mimeType()

Returns the MIME type used for Contact Groups

QString ContactGroup::name() const

Returns the i18n'd name of the contact group.

See also setName().

void ContactGroup::remove(const KContacts::ContactGroup::ContactGroupReference &reference)

Removes the given contact group reference from the contact group.

void ContactGroup::remove(const KContacts::ContactGroup::ContactReference &reference)

Removes the given contact reference from the contact group.

void ContactGroup::remove(const KContacts::ContactGroup::Data &data)

Removes the given contact data object from the contact group.

void ContactGroup::removeAllContactData()

Removes all contact data from the contact group.

void ContactGroup::removeAllContactGroupReferences()

Removes all contact group references from the contact group.

void ContactGroup::removeAllContactReferences()

Removes all contact references from the contact group.

void ContactGroup::setId(const QString &id)

Sets the unique id of the contact group.

See also id().

void ContactGroup::setName(const QString &name)

Sets the i18n'd name of the contact group.

See also name().