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  · 

QContactPresence Class Reference

The QContactPresence class provides presence information for an online account of a contact. More...

 #include <QContactPresence>

Inherits QContactDetail.

Public Types

enum PresenceState { PresenceUnknown, PresenceAvailable, PresenceHidden, PresenceBusy, ..., PresenceOffline }

Public Functions

QString customMessage () const
QString nickname () const
PresenceState presenceState () const
QUrl presenceStateImageUrl () const
QString presenceStateText () const
void setCustomMessage ( const QString & customMessage )
void setNickname ( const QString & nickname )
void setPresenceState ( PresenceState presenceState )
void setPresenceStateImageUrl ( const QUrl & presenceStateImageUrl )
void setPresenceStateText ( const QString & presenceStateText )
void setTimestamp ( const QDateTime & updateTimestamp )
QDateTime timestamp () const

Static Public Members

const QLatin1Constant DefinitionName
const QLatin1Constant FieldCustomMessage
const QLatin1Constant FieldNickname
const QLatin1Constant FieldPresenceState
const QLatin1Constant FieldPresenceStateImageUrl
const QLatin1Constant FieldPresenceStateText
const QLatin1Constant FieldTimestamp

Detailed Description

The QContactPresence class provides presence information for an online account of a contact.

Presence information for a particular QContactOnlineAccount detail is provided in a QContactPresence detail which is linked (via linkedDetailUris()) to the account detail. This information is generally provided by the backend, and is not modifiable by clients.

Presence information can include update timestamp, screen name, and the status icon, status value, and status text provided by the service provider, as well as user defined status message.

This leaf-class has been part of the default schema since version 1.0 of the Qt Mobility project.

See also QContactOnlineAccount.

Member Type Documentation

enum QContactPresence::PresenceState

This enum defines the possible presence states supported by the default schema. Not all presence providers support all of these states.

ConstantValueDescription
QContactPresence::PresenceUnknown0Signifies that the presence state of the contact is not currently known
QContactPresence::PresenceAvailable1Signifies that the contact is available
QContactPresence::PresenceHidden2Signifies that the contact is hidden
QContactPresence::PresenceBusy3Signifies that the contact is busy
QContactPresence::PresenceAway4Signifies that the contact is away
QContactPresence::PresenceExtendedAway5Signifies that the contact is away for an extended period of time
QContactPresence::PresenceOffline6Signifies that the contact is offline

Member Function Documentation

QString QContactPresence::customMessage () const

Returns the custom status message from the contact for the online account about which this detail stores presence information.

See also setCustomMessage().

QString QContactPresence::nickname () const

Returns the last-known nickname used by the contact during communications via the online account.

See also setNickname().

PresenceState QContactPresence::presenceState () const

Returns the presence state of the online account according to the presence provider.

See also setPresenceState().

QUrl QContactPresence::presenceStateImageUrl () const

Returns the last-known status image url of the contact for the online account about which this detail stores presence information.

See also setPresenceStateImageUrl().

QString QContactPresence::presenceStateText () const

Returns the text corresponding to the current presence state.

See also setPresenceStateText().

void QContactPresence::setCustomMessage ( const QString & customMessage )

Sets the custom status message from the contact for the online account about which this detail stores presence information, to customMessage. This custom message would have been set by the contact, and does not necessarily correspond to a particular presence state.

See also customMessage().

void QContactPresence::setNickname ( const QString & nickname )

Sets the last-known nickname used by the contact during communications via the online account about which this detail stores presence information to nickname.

See also nickname().

void QContactPresence::setPresenceState ( PresenceState presenceState )

Sets the presence state of the online account according to the presence information provider to the given presenceState.

See also presenceState().

void QContactPresence::setPresenceStateImageUrl ( const QUrl & presenceStateImageUrl )

Sets the last-known status image url of the contact for the online account about which this detail stores presence information, to presenceStateImageUrl.

See also presenceStateImageUrl().

void QContactPresence::setPresenceStateText ( const QString & presenceStateText )

Sets the text corresponding to the presence state to presenceStateText. This function is generally called by presence providers to allow custom naming of states, or to allow finer grained state reporting than is provided by the presence state API.

See also presenceStateText().

void QContactPresence::setTimestamp ( const QDateTime & updateTimestamp )

Sets the timestamp for the last update of the presence detail to be updateTimestamp.

See also timestamp().

QDateTime QContactPresence::timestamp () const

Returns the timestamp at which the data in the presence detail was valid.

See also setTimestamp().

Member Variable Documentation

const QLatin1Constant QContactPresence::DefinitionName

The string constant for the definition name of QContactPresence details.

const QLatin1Constant QContactPresence::FieldCustomMessage

The field key constant for the user-entered custom presence message.

See also setCustomMessage() and customMessage().

const QLatin1Constant QContactPresence::FieldNickname

The field key constant for the nickname value.

See also setNickname() and nickname().

const QLatin1Constant QContactPresence::FieldPresenceState

The field key constant for the presence state enumeration value.

See also setPresenceState() and presenceState().

const QLatin1Constant QContactPresence::FieldPresenceStateImageUrl

The field key constant for the presence state image URL.

See also setPresenceStateImageUrl() and presenceStateImageUrl().

const QLatin1Constant QContactPresence::FieldPresenceStateText

The field key constant for the presence state description value.

See also setPresenceStateText() and presenceStateText().

const QLatin1Constant QContactPresence::FieldTimestamp

The field key constant for the timestamp value.

See also setTimestamp() and timestamp().

X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.

[0]; s.parentNode.insertBefore(ga, s); })();
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 94
  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. Pourquoi les programmeurs sont-ils moins payés que les gestionnaires de programmes ? Manquent-ils de pouvoir de négociation ? 48
  4. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  5. Les développeurs détestent-ils les antivirus ? Un programmeur manifeste sa haine envers ces solutions de sécurité 13
  6. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  7. Qt Commercial : Digia organise un webinar gratuit le 27 mars sur la conception d'interfaces utilisateur et d'applications avec le framework 0
Page suivante

Le Qt Developer Network au hasard

Logo

Génération de bindings PySide avec Shiboken

Le Qt Developer Network est un réseau de développeurs Qt anglophone, où ils peuvent partager leur expérience sur le framework. 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 qtmobility-1.1
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