QContactFavorite Class

The QContactFavorite class indicates if a contact is a favorite contact as well as the position it should appear in an ordered list of favorites. More...

Header: #include <QContactFavorite>
Inherits: QContactDetail

Public Types

enum FavoriteField { FieldFavorite, FieldIndex }

Public Functions

int index() const
bool isFavorite() const
void setFavorite(bool isFavorite)
void setIndex(int index)

Static Public Members

const DetailType Type
QContactFilter match()

Detailed Description

The QContactFavorite class indicates if a contact is a favorite contact as well as the position it should appear in an ordered list of favorites.

Member Type Documentation

enum QContactFavorite::FavoriteField

This enumeration defines the fields supported by QContactFavorite.

ConstantValueDescription
QContactFavorite::FieldFavorite0The value of this field indicates whether a contact is a favorite.
QContactFavorite::FieldIndex1The value of this field contains the index of the favorite contact (which determines the order they appear).

See also isFavorite(), setFavorite(), index(), and setIndex().

Member Function Documentation

int QContactFavorite::index() const

Returns the index of the favorite contact.

See also setIndex().

bool QContactFavorite::isFavorite() const

Returns true if the contact is a favorite, false otherwise.

[static] QContactFilter QContactFavorite::match()

Returns a filter suitable for finding contacts which are marked as favorite contacts.

void QContactFavorite::setFavorite(bool isFavorite)

If isFavorite is true, marks the contact as a favorite. Otherwise, marks the contact as not a favorite.

See also isFavorite().

void QContactFavorite::setIndex(int index)

Sets the index of the favorite contact to index.

See also index().

Member Variable Documentation

const DetailType QContactFavorite::Type

The enum constant for the type identifier of QContactFavorite details.