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

QPhoneProfile Class Reference
[QtBaseModule]

The QPhoneProfile class encapsulates a single phone profile configuration. More...

    #include <QPhoneProfile>

Public Types

Public Functions


Detailed Description

The QPhoneProfile class encapsulates a single phone profile configuration.

The QPhoneProfile class holds data on how the phone behaves for incoming calls or messages when it is activated. When a new profile is created it plays system default tones, systemCallTone() and systemMessageTone(), which can be personalized by setCallTone() and setMessageTone().

Activation

A profile can be manually activated through the QPhoneProfileManager::activateProfile() method. Alternatively a profile may be set to auto-activate at certain times, controlled through by QPhoneProfile::schedule(), or when a phone audio profile is attached by QPhoneProfile::setAudioProfile(). For example, a profile can be automatically activated when Bluetooth hands-free is enabled.

Associated Settings

A profile can have a number of associated settings that can be retrieved by applicationSetting() and applicationSettings(). These settings are passed to applications by SettingsService::activateSettings() to be applied when the profile is activated.

Applications that wish to add their settings to a profile can use SettingsManagerService.

See also QPhoneProfile::Schedule, QHardwareInterface, QPhoneProfileManager, QPhoneProfileProvider, SettingsManagerService, and SettingsService.


Member Type Documentation

enum QPhoneProfile::AlertType

Controls how a ring or message tone is played.

ConstantValueDescription
QPhoneProfile::Off0No tone is played.
QPhoneProfile::Once1The tone is played once, from beginning to end.
QPhoneProfile::Continuous2The tone is played repeatedly until the user acknowledges the alert.
QPhoneProfile::Ascending3The tone is played repeatedly with increasing volume each time.

typedef QPhoneProfile::Settings

This is a convenience typedef to encapsulate a mapping between application names and their corresponding Setting object. The exact type is:

    QMap<QString, QPhoneProfile::Setting>

enum QPhoneProfile::VideoOption

Determines whether the video is turned or not for incoming or outgoing calls.

ConstantValueDescription
QPhoneProfile::AlwaysOff0The video is always off.
QPhoneProfile::OnForIncoming1The video will be turned on for incoming calls.
QPhoneProfile::OnForOutgoing2The video will be turned on for outgoing calls.
QPhoneProfile::AlwaysOn3The video will be turned on for both incoming and outgoing calls.


Member Function Documentation

QPhoneProfile::QPhoneProfile ()

Constructs a null QPhoneProfile.

It is recommended to use QPhoneProfileManager::newProfile() to create a new profile.

QPhoneProfile::QPhoneProfile ( int id )

Constructs an empty QPhoneProfile with the given id.

It is recommended to use QPhoneProfileManager::newProfile() to create a new profile.

QPhoneProfile::QPhoneProfile ( const QPhoneProfile & other )

Constructs a copy of other.

QPhoneProfile::~QPhoneProfile ()   [virtual]

Destroys the QPhoneProfile object.

Setting QPhoneProfile::applicationSetting ( const QString & application ) const

Returns the setting for application for this profile if applicable; otherwise returns a null setting.

See also setApplicationSetting().

Settings QPhoneProfile::applicationSettings () const

Returns all application settings for this profile.

See also setApplicationSettings().

QString QPhoneProfile::audioProfile () const

Returns the audio profile on which this profile should auto activate if applicable; otherwise returns an empty string.

See also setAudioProfile() and QAudioStateInfo.

bool QPhoneProfile::autoAnswer () const

Returns true if incoming calls should be automatically answered in this profile; otherwise returns false.

See also setAutoAnswer().

AlertType QPhoneProfile::callAlert () const

Returns the AlertType to use for incoming calls.

See also setCallAlert().

QContent QPhoneProfile::callTone () const

Returns the default ring tone to use for incoming calls.

See also setCallTone().

QString QPhoneProfile::icon () const

Returns the file name for the icon to use to identify this profile.

See also setIcon().

int QPhoneProfile::id () const

Returns the identifier for this profile.

See also setId().

bool QPhoneProfile::isNull () const

Returns true if this profile is null; otherwise returns false. A null profile is one with an id of -1.

bool QPhoneProfile::isSystemProfile () const

Returns true if this is a system profile; otherwise returns false. System profiles can typically not be deleted.

See also setIsSystemProfile().

QContent QPhoneProfile::messageTone () const

Returns the default ring tone to use for incoming messages.

See also setMessageTone().

AlertType QPhoneProfile::msgAlert () const

Returns the AlertType to use for incoming messages.

See also setMsgAlert().

int QPhoneProfile::msgAlertDuration () const

Returns the duration in milliseconds to play the message tone.

See also setMsgAlertDuration().

QString QPhoneProfile::name () const

Returns the user visible name of this profile.

See also setName().

bool QPhoneProfile::planeMode () const

Returns true if plane mode is on for this profile; otherwise returns false. Phone calls cannot be made in plane mode.

See also setPlaneMode().

Schedule QPhoneProfile::schedule () const

Returns the auto activation schedule for this profile.

See also setSchedule().

void QPhoneProfile::setApplicationSetting ( const Setting & setting )

Adds a single application setting if it does not exist; otherwise updates the existing setting.

See also applicationSetting().

void QPhoneProfile::setApplicationSettings ( const Settings & settings )

Sets the application settings.

See also applicationSettings().

void QPhoneProfile::setAudioProfile ( const QString & audioProfile )

Sets the auto activation audioProfile. A phone profile is activated if

    QPhoneProfile profile;
    QAudioStateConfiguration config;
    QAudioStateInfo info = config.currentState();
    info.profile() == profile.audioProfile() //must be true

See also audioProfile(), QAudioStateConfiguration, and QAudioStateInfo.

void QPhoneProfile::setAutoAnswer ( bool autoAnswer )

Sets whether auto answering is enabled for this profile to autoAnswer.

See also autoAnswer().

void QPhoneProfile::setCallAlert ( AlertType type )

Sets the incoming call alert type.

See also callAlert().

void QPhoneProfile::setCallTone ( const QContent & tone )

Sets the incoming call tone.

See also callTone() and setVideoTone().

void QPhoneProfile::setIcon ( const QString & fileName )

Sets the profile's icon to fileName.

See also icon().

void QPhoneProfile::setId ( int id )

Sets the profile id.

See also id().

void QPhoneProfile::setIsSystemProfile ( bool isSystemProfile )

Sets whether this profile is a system profile to isSystemProfile.

See also isSystemProfile().

void QPhoneProfile::setMessageTone ( const QContent & tone )

Sets the incoming message tone.

See also messageTone().

void QPhoneProfile::setMsgAlert ( AlertType type )

Sets the incoming message alert type.

See also msgAlert().

void QPhoneProfile::setMsgAlertDuration ( int ms )

Sets the duration in milliseconds to play the message tone to ms.

See also msgAlertDuration().

void QPhoneProfile::setName ( const QString & name )

Sets the profile name.

See also name().

void QPhoneProfile::setPlaneMode ( bool planeMode )

Sets whether plane mode is enabled for this profile to planeMode. Phone calls cannot be made in plane mode.

See also planeMode().

void QPhoneProfile::setSchedule ( const Schedule & schedule )

Sets the profile's auto activation schedule.

See also schedule().

void QPhoneProfile::setSpeedDialInput ( const QString & input )

Sets the speed dial input.

See also speedDialInput().

void QPhoneProfile::setVibrate ( bool vibrate )

Sets the profile vibration to vibrate.

See also vibrate().

void QPhoneProfile::setVideoOption ( VideoOption option )

Sets the video option to option.

See also videoOption().

void QPhoneProfile::setVideoTone ( const QContent & tone )

Sets the incoming video ring tone.

See also videoTone() and setCallTone().

void QPhoneProfile::setVolume ( int volume )

Sets the profile volume. Valid values are from 0 to 5.

See also volume().

QString QPhoneProfile::speedDialInput () const

Returns the speed dial input on which this profile should activate if applicable; otherwise returns an empty string.

See also setSpeedDialInput().

QContent QPhoneProfile::systemCallTone () const

Returns the system ring tone to use for incoming calls. The system ring tone will be used when the user defined tone cannot be found.

QContent QPhoneProfile::systemMessageTone () const

Returns the system message tone to use for incoming messages. The system message tone will be used when the user defined tone cannot be found.

bool QPhoneProfile::vibrate () const

Returns true if vibration is enabled; otherwise returns false.

See also setVibrate().

VideoOption QPhoneProfile::videoOption () const

Returns the VideoOption to use for calls.

See also setVideoOption().

QContent QPhoneProfile::videoTone () const

Returns the video ring tone to use for incoming calls.

See also setVideoTone().

int QPhoneProfile::volume () const

Returns the volume for this profile.

See also setVolume().

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

Returns true if this profile is not equal to other; otherwise returns false.

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

Assigns other to this profile and returns a reference to this profile.

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

Returns true if this profile is equal to other; otherwise returns false. Equality means all the profile properties are equivalent.


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3