QPhoneTypeSelector Class Reference
The QPhoneTypeSelector class provides a way of selecting a single type of phone number. More...
#include <QPhoneTypeSelector>
Inherits QDialog.
Public Functions
- QPhoneTypeSelector ( const QContact & contact, const QString & number, QWidget * parent = 0 )
- QPhoneTypeSelector ( const QContact & contact, const QString & number, QList<QContact::PhoneType> allowedTypes, QWidget * parent = 0 )
- QContact::PhoneType selected () const
- QString selectedNumber () const
- void updateContact ( QContact & contact, const QString & number ) const
- 9 public functions inherited from QDialog
- 264 public functions inherited from QWidget
- 37 public functions inherited from QObject
- 20 public functions inherited from QPaintDevice
Signals
- void selected ( QContact::PhoneType type )
Additional Inherited Members
- 2 properties inherited from QDialog
- 56 properties inherited from QWidget
- 1 property inherited from QObject
- 5 public slots inherited from QDialog
- 20 public slots inherited from QWidget
- 1 public slot inherited from QObject
- 1 public type inherited from QObject
- 5 static public members inherited from QWidget
- 4 static public members inherited from QObject
- 13 static public members inherited from QPaintDevice
- 39 protected functions inherited from QWidget
- 8 protected functions inherited from QObject
- 1 protected function inherited from QPaintDevice
- 1 protected slot inherited from QWidget
- 2 protected variables inherited from QObject
- 1 protected type inherited from QPaintDevice
- 1 static protected member inherited from QObject
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 number from a QContact |
 | Choosing a phone number type for a new phone number. Note that the existing phone numbers for the QContact are displayed. |
See also QContact.
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:
- To choose an existing phone number from a contact, pass an empty string as the number argument.
- To choose a phone number type for a new phone number, pass the phone number as a string as the number argument.
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:
- To choose an existing phone number from a contact, pass an empty string as the number argument.
- To choose a phone number type for a new phone number, pass the phone number as a string as the number argument.
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().
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().