Home · All Classes · All Functions ·

QContactDetailDefinition Class Reference

    #include <QContactDetailDefinition>

Public Types

enum AccessConstraint { NoConstraint, ReadOnly, CreateOnly }

Public Functions

QContactDetailDefinition ()
QContactDetailDefinition ( const QContactDetailDefinition & other )
~QContactDetailDefinition ()
QContactDetailDefinition::AccessConstraint accessConstraint () const
QMap<QString, QContactDetailDefinitionField> fields () const
QMap<QString, QContactDetailDefinitionField> & fields ()
bool isEmpty () const
bool isUnique () const
QString name () const
void setAccessConstraint ( const QContactDetailDefinition::AccessConstraint & constraint )
void setFields ( const QMap<QString, QContactDetailDefinitionField> & fields )
void setName ( const QString & definitionName )
void setUnique ( bool unique )
bool operator!= ( const QContactDetailDefinition & other ) const
QContactDetailDefinition & operator= ( const QContactDetailDefinition & other )
bool operator== ( const QContactDetailDefinition & other ) const

Detailed Description

The QContactDetailDefinition class provides the specification for a detail that can be included in any particular QContact. The definition does not include any data, but defines the semantics of the representation and use of data details that are stored in a QContact.


Member Type Documentation

enum QContactDetailDefinition::AccessConstraint

This enum defines the access constraints which may be set on all details of this definition in the store for which the definition is valid.

ConstantValueDescription
QContactDetailDefinition::NoConstraint0Details of definitions with this access constraint set have no special access semantics associated with them. Users can read, write, and otherwise modify such details in any manner.
QContactDetailDefinition::ReadOnly1Details of definitions with this access constraint set are dynamically modified by the backend. Users cannot write values to details of definitions with this access constraint set.
QContactDetailDefinition::CreateOnly2Details of definitions with this access constraint set are static once created. Their value cannot be changed dynamically, nor can they be written or read by users.


Member Function Documentation

QContactDetailDefinition::QContactDetailDefinition ()

Construct a new, invalid QContactDetailDefinition

QContactDetailDefinition::QContactDetailDefinition ( const QContactDetailDefinition & other )

Constructs a new QContactDetailDefinition from other

QContactDetailDefinition::~QContactDetailDefinition ()

Frees the memory used by this QContactDetailDefinition

QContactDetailDefinition::AccessConstraint QContactDetailDefinition::accessConstraint () const

Returns the access constraint that is applied to details of this definition

See also setAccessConstraint().

QMap<QString, QContactDetailDefinitionField> QContactDetailDefinition::fields () const

Returns the map of keys to fields which are present in details of this definition

See also setFields().

QMap<QString, QContactDetailDefinitionField> & QContactDetailDefinition::fields ()

Returns a reference to the map of keys to fields which are present in details of this definition.

You can make changes to the returned map.

bool QContactDetailDefinition::isEmpty () const

Returns true if the id and fields of this definition are empty

bool QContactDetailDefinition::isUnique () const

Returns the per-contact uniqueness of this definition

QString QContactDetailDefinition::name () const

Returns the identifier of this detail definition

See also setName().

void QContactDetailDefinition::setAccessConstraint ( const QContactDetailDefinition::AccessConstraint & constraint )

Sets the access constraint that is applied to details of this definition to constraint

See also accessConstraint().

void QContactDetailDefinition::setFields ( const QMap<QString, QContactDetailDefinitionField> & fields )

Sets the fields which constitute the data of details of this this definition to fields

See also fields().

void QContactDetailDefinition::setName ( const QString & definitionName )

Sets the unique identifier of this detail type to definitionName.

See also name().

void QContactDetailDefinition::setUnique ( bool unique )

Sets whether a contact can have more than one detail of this type. If unique is true, only one detail of this type can be added. Otherwise, any number can be added.

See also isUnique().

bool QContactDetailDefinition::operator!= ( const QContactDetailDefinition & other ) const

Returns true if this detail definition has different allowable field types, access constraints or uniqueness to the other definition

QContactDetailDefinition & QContactDetailDefinition::operator= ( const QContactDetailDefinition & other )

Assigns this QContactDetailDefinition to other

bool QContactDetailDefinition::operator== ( const QContactDetailDefinition & other ) const

Returns true if the definition has the same type, uniqueness, access constraint and allowable value datatypes as other


Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt Mobility Project 1.0.0 (Technical Preview)