Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QPhoneTypeSelector Class Reference
[QtMessagingModule, QtPimModule, QtTelephonyModule, QtUiModule]

The QPhoneTypeSelector class provides a way of selecting a single type of phone number. More...

    #include <QPhoneTypeSelector>

Inherits QDialog.

Public Functions

Signals

Additional Inherited Members


Detailed Description

The QPhoneTypeSelector class provides a way of selecting a single type of phone number.

The phone number types correspond to those defined in QContact::PhoneType.

It can be used in one of two ways - either to allow the selection of one of a QContact's existing phone numbers, or to allow the user to pick the type of a new phone number (for example, to save a phone number as a 'work mobile' number).

"Picking an existing phone number"Picking an existing number from a QContact
"Picking a new phone number type"Choosing a phone number type for a new phone number. Note that the existing phone numbers for the QContact are displayed.

See also QContact and Pim Library.


Member Function Documentation

QPhoneTypeSelector::QPhoneTypeSelector ( const QContact & contact, const QString & number, QWidget * parent = 0 )

Constructs a QPhoneTypeSelector dialog with parent parent.

The dialog will show phone numbers and phone number types from the given contact.

The dialog can be used in two ways:

In the second case, the dialog will show any existing phone numbers for the contact in addition to the available phone number types.

See also updateContact().

QPhoneTypeSelector::QPhoneTypeSelector ( const QContact & contact, const QString & number, QList<QContact::PhoneType> allowedTypes, QWidget * parent = 0 )

Constructs a QPhoneTypeSelector dialog with parent parent.

The dialog will show phone numbers and phone number types from the given contact.

The dialog can be used in two ways:

In the second case, the dialog will show any existing phone numbers for the contact in addition to the available phone number types, restricted by the set allowedTypes. If allowedTypes has zero length, the entire set of possible types is allowed.

See also updateContact().

QPhoneTypeSelector::~QPhoneTypeSelector ()

Destroys a QPhoneTypeSelector

QContact::PhoneType QPhoneTypeSelector::selected () const

Returns the QContact::PhoneType that is selected in the dialog. If no phone number type is selected, this will return OtherPhone.

void QPhoneTypeSelector::selected ( QContact::PhoneType type )   [signal]

This is an overloaded member function, provided for convenience.

This signal is emitted when the user selects a phone number type.

QString QPhoneTypeSelector::selectedNumber () const

Returns the contact's phone number that corresponds to the phone number type selected in the dialog.

void QPhoneTypeSelector::updateContact ( QContact & contact, const QString & number ) const

Updates contact to have the given number for the dialog's selected phone number type.

See also selected().


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3