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

QTelephonyTones Class Reference
[QtTelephonyModule]

The QTelephonyTones class provides access to a tone generator for DTMF tones and other special telephony sounds. More...

    #include <QTelephonyTones>

Inherits QCommInterface.

Public Types

Public Functions

Public Slots

Signals

Additional Inherited Members


Detailed Description

The QTelephonyTones class provides access to a tone generator for DTMF tones and other special telephony sounds.

This class is intended for use by dialer user interfaces to generate DTMF tones for the user when digits are typed in prior to call setup. It can also be used to generate supervisory tones such as dial tones, busy signals, etc.

When on a call, DTMF tones should be generated with QPhoneCall::tone() so that the DTMF information can be properly transmitted to the remote party. The QTelephonyTones class should only be used for DTMF tones that occur during call setup.

Some tones, such as dial tone and busy signals, may be country-specific. The server implementation of QTelephonyTones is responsible for generating the correct country-specific tone if it can determine the country. This allows dialer user interfaces to request a specific type of supervisory tone without being aware of the country-specific details.

See also QCommInterface and QPhoneCall::tone().


Member Type Documentation

enum QTelephonyTones::Tone

This enum defines a telephony-related tone to be played using QTelephonyTones::startTone().

ConstantValueDescription
QTelephonyTones::Dtmf00Tone for DTMF digit 0
QTelephonyTones::Dtmf11Tone for DTMF digit 1
QTelephonyTones::Dtmf22Tone for DTMF digit 2
QTelephonyTones::Dtmf33Tone for DTMF digit 3
QTelephonyTones::Dtmf44Tone for DTMF digit 4
QTelephonyTones::Dtmf55Tone for DTMF digit 5
QTelephonyTones::Dtmf66Tone for DTMF digit 6
QTelephonyTones::Dtmf77Tone for DTMF digit 7
QTelephonyTones::Dtmf88Tone for DTMF digit 8
QTelephonyTones::Dtmf99Tone for DTMF digit 9
QTelephonyTones::DtmfStar10Tone for DTMF digit *
QTelephonyTones::DtmfHash11Tone for DTMF digit #
QTelephonyTones::DtmfA12Tone for DTMF digit A
QTelephonyTones::DtmfB13Tone for DTMF digit B
QTelephonyTones::DtmfC14Tone for DTMF digit C
QTelephonyTones::DtmfD15Tone for DTMF digit D
QTelephonyTones::Busy16Busy signal when the other party cannot be reached
QTelephonyTones::Dial17Dial tone
QTelephonyTones::Dial218Secondary dial tone, for outside lines
QTelephonyTones::Alerting19Tone indicating that the called party is alerting (ringing).
QTelephonyTones::CallWaiting20Tone indicating that there is another call waiting.
QTelephonyTones::MessageWaiting21Tone indicating that this is a message waiting.
QTelephonyTones::NoService22Tone indicating that there is no network service. This may be played instead of Dial to audibly indicate to the user that the current call attempt will probably not succeed. The tone provider could choose to play no tone at all for this case.
QTelephonyTones::User100First user-defined tone.


Member Function Documentation

QTelephonyTones::QTelephonyTones ( const QString & service = QString(), QObject * parent = 0, QCommInterface::Mode mode = Client )

Construct a new tone generation object for service and attach it to parent. The object will be created in client mode if mode is Client, or server mode otherwise.

If service is empty, this class will use the first available service that supports tone generation. If there is more than one service that supports tone generation, the caller should enumerate them with QCommServiceManager::supports() and create separate QTelephonyTones objects for each.

See also QCommServiceManager::supports().

QTelephonyTones::~QTelephonyTones ()

Destroys this tone generation object.

QString QTelephonyTones::startTone ( QTelephonyTones::Tone tone, int duration = -1 )

Starts playing tone and returns an identifier for it. If duration is -1, the tone should play indefinitely until stopTone() is called. If duration is not -1, it indicates the number of milliseconds to play the tone before automatically stopping.

DTMF tones during a call should be played with QPhoneCall::tone() rather than this function so that the DTMF information can be properly transmitted to the remote party. DTMF tones should only be played with this function when they occur outside a call during the dialing step.

See also stopTone(), toneStopped(), and QPhoneCall::tone().

void QTelephonyTones::startTone ( const QString & id, QTelephonyTones::Tone tone, int duration = -1 )   [virtual slot]

This is an overloaded member function, provided for convenience.

Starts playing tone and associates it with id. If duration is -1, the tone should play indefinitely until stopTone() is called. If duration is not -1, it indicates the number of milliseconds to play the tone before automatically stopping.

DTMF tones during a call should be played with QPhoneCall::tone() rather than this function so that the DTMF information can be properly transmitted to the remote party. DTMF tones should only be played with this function when they occur outside a call during the dialing step.

See also stopTone(), toneStopped(), and QPhoneCall::tone().

void QTelephonyTones::stopTone ( const QString & id )   [virtual slot]

Stops playing the tone associated with id.

See also startTone() and toneStopped().

void QTelephonyTones::toneStopped ( const QString & id )   [signal]

Signal that is emitted when the tone associated with id stops playing.

See also startTone() and stopTone().


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3