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

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

The QContactSelector class provides a way of selecting a single contact from a QContactModel. More...

    #include <QContactSelector>

Inherits QDialog.

Public Functions

Signals

Additional Inherited Members


Detailed Description

The QContactSelector class provides a way of selecting a single contact from a QContactModel.

In addition, the user can optionally be allowed to indicate they want to create a new contact, if none of the existing contacts are suitable.

The following image displays a QContactSelector with the option to create a new QContact highlighted.

"QContactSelector with the option to create a new contact highlighted"

See also Pim Library.


Member Function Documentation

QContactSelector::QContactSelector ( bool showCreateNew, QWidget * parent = 0 )

Constructs a QContactSelector with parent parent. If showCreateNew is true an action will be include to allow the user to create new contacts.

See also setCreateNewContactEnabled().

QContactSelector::QContactSelector ( QWidget * parent = 0 )

Contructs a QContactSelector with parent parent.

QContactSelector::~QContactSelector ()

Destroys a QContactSelector.

bool QContactSelector::contactSelected () const

Returns true if the dialog was accepted with an existing contact selected. Otherwise returns false.

See also newContactSelected().

void QContactSelector::contactSelected ( const QContact & contact )   [signal]

This is an overloaded member function, provided for convenience.

When selection of a contact occurs, this signal is emitted with the contact selected.

See also selectedContact().

bool QContactSelector::eventFilter ( QObject * watched, QEvent * event )   [virtual]

Filters events if this object has been installed as an event filter for the watched object. Returns true if the event is filtered. Otherwise returns false.

Reimplemented from QObject.

bool QContactSelector::newContactSelected () const

Returns true if the dialog was accepted via the option to create a new contact. Otherwise returns false.

See also contactSelected().

QContact QContactSelector::selectedContact () const

Returns the contact that was selected. If no contact was selected returns a null contact.

See also contactSelected() and newContactSelected().

QString QContactSelector::selectedText () const

Returns the text entered when the dialog was accepted. Requires that accept on text is enabled.

See also setAcceptTextEnabled().

void QContactSelector::setAcceptTextEnabled ( bool enable )

If enable is true pressing select while filter text will accept the dialog even if no contact from the list is selected.

void QContactSelector::setCreateNewContactEnabled ( bool enable )

If enable is true an action to create new contacts will be visible in the context menu. Otherwise the action to create new contacts will be hidden.

void QContactSelector::setModel ( QContactModel * model )

Sets the model providing the choice of contacts to model.

bool QContactSelector::textSelected () const

Returns true if the dialog was accepted with filter text entered but no contact selected.

void QContactSelector::textSelected ( const QString & text )   [signal]

This is an overloaded member function, provided for convenience.

When the dialog is accepted with text entered, this signal is emitted with the text previously entered.

See also selectedText().


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3