QContactName Class
The QContactName class contains a name of a contact. More...
Header: | #include <QContactName> |
Inherits: | QContactDetail. |
Public Types
enum | NameField { FieldPrefix, FieldFirstName, FieldMiddleName, FieldLastName, FieldSuffix } |
Public Functions
QString | firstName() const |
QString | lastName() const |
QString | middleName() const |
QString | prefix() const |
void | setFirstName(const QString & firstName) |
void | setLastName(const QString & lastName) |
void | setMiddleName(const QString & middleName) |
void | setPrefix(const QString & prefix) |
void | setSuffix(const QString & suffix) |
QString | suffix() const |
- 22 public functions inherited from QContactDetail
Static Public Members
const DetailType | Type |
QContactFilter | match(const QString & name) |
QContactFilter | match(const QString & firstName, const QString & lastName) |
Detailed Description
The QContactName class contains a name of a contact.
Member Type Documentation
enum QContactName::NameField
This enumeration defines the fields supported by QContactName.
Constant | Value | Description |
---|---|---|
QContactName::FieldPrefix | 0 | The value stored in this field contains the prefix part of the name. |
QContactName::FieldFirstName | 1 | The value stored in this field contains the first part of the name. |
QContactName::FieldMiddleName | 2 | The value stored in this field contains the middle part of the name. |
QContactName::FieldLastName | 3 | The value stored in this field contains the last part of the name. |
QContactName::FieldSuffix | 4 | The value stored in this field contains the suffix part of the name. |
See also prefix(), setPrefix(), firstName(), setFirstName(), middleName(), setMiddleName(), lastName(), setLastName(), suffix(), and setSuffix().
Member Function Documentation
QString QContactName::firstName() const
Returns the first (given) name segment of the name stored in this detail.
See also setFirstName().
QString QContactName::lastName() const
Returns the last (family, or surname) name segment of the name stored in this detail.
See also setLastName().
[static]
QContactFilter QContactName::match(const QString & name)
Returns a filter suitable for finding contacts with any name field (e.g. first, last) that contains the supplied name.
[static]
QContactFilter QContactName::match(const QString & firstName, const QString & lastName)
Returns a filter suitable for finding contacts with a name with a first name containing the specified firstName and a last name containing the specified lastName. If either parameter is empty, any value will match that component.
QString QContactName::middleName() const
Returns the middle (additional, or other) name segment of the name stored in this detail.
See also setMiddleName().
QString QContactName::prefix() const
Returns the prefix segment of the name stored in this detail.
See also setPrefix().
void QContactName::setFirstName(const QString & firstName)
Sets the first name segment of the name stored in this detail to firstName.
See also firstName().
void QContactName::setLastName(const QString & lastName)
Sets the last name segment of the name stored in this detail to lastName.
See also lastName().
void QContactName::setMiddleName(const QString & middleName)
Sets the middle name segment of the name stored in this detail to middleName.
See also middleName().
void QContactName::setPrefix(const QString & prefix)
Sets the prefix segment of the name stored in this detail to prefix.
See also prefix().
void QContactName::setSuffix(const QString & suffix)
Sets the suffix segment of the name stored in this detail to suffix.
See also suffix().
QString QContactName::suffix() const
Returns the suffix segment of the name stored in this detail.
See also setSuffix().
Member Variable Documentation
const DetailType QContactName::Type
The enum constant for the type identifier of QContactName details.