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  · 

QAppointmentContext Class Reference
[QtMessagingModule, QtPimModule, QtTelephonyModule, QtUiModule]

The QAppointmentContext class represents a storage context of appointment data. More...

    #include <QAppointmentContext>

Inherits QPimContext.

Inherited by QDependentEventsContext.

Public Functions

  • virtual QUniqueId addAppointment ( const QAppointment & appointment, const QPimSource & source )
  • virtual QAppointment exportAppointment ( const QUniqueId & id, bool & ok ) const
  • virtual QList<QAppointment> exportAppointments ( const QPimSource & source, bool & ok ) const
  • virtual bool importAppointment ( const QPimSource & source, const QAppointment & appointment )
  • virtual bool importAppointments ( const QPimSource & source, const QList<QAppointment> & appointments )
  • virtual bool removeAppointment ( const QUniqueId & id )
  • virtual bool removeOccurrence ( const QUniqueId & id, const QDate & date )
  • virtual QUniqueId replaceOccurrence ( const QUniqueId & id, const QOccurrence & occurrence, const QDate & date = QDate() )
  • virtual QUniqueId replaceRemaining ( const QUniqueId & id, const QAppointment & appointment, const QDate & date = QDate() )
  • virtual bool restoreOccurrence ( const QUniqueId & identifier, const QDate & date )
  • virtual bool updateAppointment ( const QAppointment & appointment )
  • 14 public functions inherited from QPimContext
  • 29 public functions inherited from QObject

Protected Functions

  • 7 protected functions inherited from QObject

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 1 signal inherited from QObject
  • 1 public type inherited from QObject
  • 4 static public members inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

The QAppointmentContext class represents a storage context of appointment data.

The class can be used to perform operations that relate to a specific context of PIM data, such as appointments stored on a device in the native Qt Extended format, or appointments stored in an on-line calendaring service.

Currently there is no way for applications to implement their own contexts. This feature is being considered for future versions of Qtopia.

See also QAppointmentModel and Pim Library.


Member Function Documentation

QAppointmentContext::QAppointmentContext ( QObject * parent = 0 )   [protected]

Constructs a QAppointmentContext with parent parent.

QUniqueId QAppointmentContext::addAppointment ( const QAppointment & appointment, const QPimSource & source )   [virtual]

Adds the appointment to the PIM data source if it is controlled by this context. If the appointment is successfully added, returns the new unique id for this appointment, otherwise returns a null id.

QAppointment QAppointmentContext::exportAppointment ( const QUniqueId & id, bool & ok ) const   [virtual]

Exports a single appointment identified by id. If successful sets ok to true, otherwise sets ok to false.

See also exportAppointments().

QList<QAppointment> QAppointmentContext::exportAppointments ( const QPimSource & source, bool & ok ) const   [virtual]

Exports the appointments stored in the PIM data source and returns them as a list. The source must be controlled by this context. If successful sets ok to true, otherwise sets ok to false.

There isn't necessarily going to be a one to one match to appointments in the PIM data source. Appointments may be merged or split over multiple appointments to form the list.

bool QAppointmentContext::importAppointment ( const QPimSource & source, const QAppointment & appointment )   [virtual]

Imports a single appointment to the PIM data source. If successful returns true, otherwise returns false.

See also importAppointments().

bool QAppointmentContext::importAppointments ( const QPimSource & source, const QList<QAppointment> & appointments )   [virtual]

Imports the appointments and merges them with the appointments listed in the PIM data source. The source must be controlled by this context. If successful returns true, otherwise returns false.

There isn't necessarily going to be a one to one match to appointments in the PIM data source. Appointments may be merged or split over multiple appointments. Also appointments that match in name will be updated from the list rather than additional appointments created.

bool QAppointmentContext::removeAppointment ( const QUniqueId & id )   [virtual]

Removes the appointment with the identifier id if it exists in this context. Returns true upon success; otherwise returns false.

bool QAppointmentContext::removeOccurrence ( const QUniqueId & id, const QDate & date )   [virtual]

Mark the repeating appointment identified by id in this context so as not to occur on date. Returns true if the appointment was successfully updated, otherwise returns false.

QUniqueId QAppointmentContext::replaceOccurrence ( const QUniqueId & id, const QOccurrence & occurrence, const QDate & date = QDate() )   [virtual]

Replaces an occurrence that occurs on date of the appointment identified by id with occurrence. If date is null, the date of the supplied occurrence will be used. Returns true if the appointment was successfully updated, otherwise returns false.

QUniqueId QAppointmentContext::replaceRemaining ( const QUniqueId & id, const QAppointment & appointment, const QDate & date = QDate() )   [virtual]

Modifies the appointment identified by id to not repeat after date and adds appointment to the PIM data source that stores the appointment identified by id. If date is null, the date of the first occurrence of appointment will be used. Returns the unique id for the new appointment if successful, otherwise returns a null id.

bool QAppointmentContext::restoreOccurrence ( const QUniqueId & identifier, const QDate & date )   [virtual]

If an recurring appointment with the specified identifier has an exception listed for the given date, restores the original occurrence for that date. If the exception included a replacement appointment will also remove the replacement.

Returns true if the appointment was successfully updated.

bool QAppointmentContext::updateAppointment ( const QAppointment & appointment )   [virtual]

Updates the appointment with the same identifier as appointment if it exists in this context. Returns true upon success; otherwise returns false.

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. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. Pourquoi les programmeurs sont-ils moins payés que les gestionnaires de programmes ? Manquent-ils de pouvoir de négociation ? 42
  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. 2017 : un quinquennat pour une nouvelle version du C++ ? Possible, selon Herb Sutter 7
Page suivante

Le Qt Quarterly au hasard

Logo

Un plugin pour QImage

Qt Quarterly est la revue trimestrielle proposée par Nokia et à destination des développeurs Qt. Ces articles d'une grande qualité technique sont rédigés par des experts Qt. 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