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

DtmfAudio Class Reference

The DtmfAudio class provides a simple interface for playing DTMF tones. More...

    #include <DtmfAudio>

Inherits QObject.


Public Functions

Public Slots


Additional Inherited Members

Detailed Description

The DtmfAudio class provides a simple interface for playing DTMF tones.

DTMF tones can be played concurrently or mutually exclusive. If the exclusive behavior is chosen any currently playing tone is stopped and the new tone played. The exclusivePlay() property should be used to determine the behaviour. The duration() determines for how long a DTMF is played.

playDtmfTone() can be used to play a tone indefinitely by using -1 as duration parameter.

This class is part of the Qt Extended server and cannot be used by other Qt Extended applications.

See also QTelephonyTones.

Property Documentation

duration : int

This property holds how long the DTMF tone should be played.

This property indicates the number of milliseconds to play a tone before automatically stopping. The property value must be greater then 0.

By default this property is set to 200.

Access functions:

exclusivePlay : bool

This property holds whether a request to play a DTMF tone should stop already playing dtmf tones.

Setting this property to true announces to the system that any new request to play a DTMF tone should stop already playing tones.

By default this property is set to true.

Access functions:

Member Function Documentation

DtmfAudio::DtmfAudio ( QObject * parent = 0 )

Creates a new DtmfAudio instance with the given parent.

DtmfAudio::~DtmfAudio ()

Destroys the DtmfAudio object.

void DtmfAudio::playDtmfKeyTone ( int keycode )   [slot]

This function determines the DTMF tone for the given Qt keycode and plays the tone for the given duration().

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

This function plays the given DTMF tone for the given duration. If duration is -1 the tone will be played indefinitely. Note that the duration() property is ignored when calling this function.

The returned value identifies the tone and casn be used to stop it via stopDtmfTone().

/sa stopDtmfTone()

void DtmfAudio::stopAllTones ()   [slot]

Stops all currently playing DTMF tones started by this object.

void DtmfAudio::stopDtmfTone ( const QString & toneId )

This function stops the tone identified by toneId.

See also playDtmfTone().

void DtmfAudio::toneStopped ( const QString & toneId )   [signal]

Emitted when the DTMF tone identified by toneId stopped playing. This can happen due to a a call to stopAllTones(), stopDtmfTone() or when the playing stopped due to a given timeout.

Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3