Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

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

  • enum Tone { Dtmf0, Dtmf1, Dtmf2, Dtmf3, ..., User }

Public Functions

  • QTelephonyTones ( const QString & service = QString(), QObject * parent = 0, QCommInterface::Mode mode = Client )
  • QString startTone ( QTelephonyTones::Tone tone, int duration = -1 )

Public Slots

  • virtual void startTone ( const QString & id, QTelephonyTones::Tone tone, int duration = -1 )
  • virtual void stopTone ( const QString & id )
  • 1 public slot inherited from QObject

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().

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 64
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  7. La rubrique Qt a besoin de vous ! 1
Page suivante

Le Qt Labs au hasard

Logo

Construire l'avenir : (ré-)introduction aux composants de Qt Quick

Les Qt Labs sont les laboratoires des développeurs de Qt, où ils peuvent partager des impressions sur le framework, son utilisation, ce que pourrait être son futur. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt qtextended4.4
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web