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  · 

QML OrganizerModel Element

The OrganizerModel element provides access to organizer items from the organizer store. More...

  • List of all members, including inherited members
  • Properties

    Methods

    Detailed Description

    This element is part of the QtMobility.organizer 1.1 module.

    OrganizerModel provides a model of organizer items from the organizer store. The contents of the model can be specified with filter, sortOrders and fetchHint properties. Whether the model is automatically updated when the store or organizer item changes, can be controlled with OrganizerModel::autoUpdate property.

    There are two ways of accessing the organizer item data: via the model by using views and delegates, or alternatively via items list property. Of the two, the model access is preferred. Direct list access (i.e. non-model) is not guaranteed to be in order set by sortOrder.

    At the moment the model roles provided by OrganizerModel are display and item. Through the item role can access any data provided by the OrganizerItem element.

    Note: Both the startPeriod and endPeriod are set by default to the current time (when the OrganizerModel was created). In most cases, both (or at least one) of the startPeriod and endPeriod should be set; otherwise, the OrganizerModel will contain zero items because the startPeriod and endPeriod are the same value. For example, if only endPeriod is provided, the OrganizerModel will contain all items from now (the time of the OrganizerModel's creation) to the endPeriod time.

    See also OrganizerItem and QOrganizerManager.

    Property Documentation

    autoUpdate : bool

    This property indicates whether or not the organizer model should be updated automatically, default value is true.

    See also OrganizerModel::update().


    read-onlyavailableManagers : list<string>

    This property holds the list of available manager names. This property is read only.


    endPeriod : date

    This property holds the end date and time period used by the organizer model to fetch organizer items. The default value is the datetime of OrganizerModel creation.


    read-onlyerror : string

    This property holds the latest error code returned by the organizer manager.

    This property is read only.


    read-onlyeventOccurrences : list<OrganizerItem>

    This property holds a list of event occurrences in the organizer model.

    See also EventOccurrence.


    read-onlyevents : list<OrganizerItem>

    This property holds a list of events in the organizer model.

    See also Event.


    fetchHint : FetchHint

    This property holds the fetch hint instance used by the organizer model.

    See also FetchHint.


    filter : Filter

    This property holds the filter instance used by the organizer model.

    See also Filter.


    read-onlyitemCount : int

    This property holds the size of organizer items the OrganizerModel currently holds.

    This property is read only.


    read-onlyitems : list<OrganizerItem>

    This property holds a list of organizer items in the organizer model.

    See also OrganizerItem.


    read-onlyjournals : list<OrganizerItem>

    This property holds a list of journal items in the organizer model.

    See also Journal.


    manager : string

    This property holds the manager name or manager uri of the organizer backend engine. The manager uri format: qtorganizer:<managerid>:<key>=<value>&<key>=<value>.

    For example, memory organizer engine has an optional id parameter, if user want to share the same memory engine with multiple OrganizerModel instances, the manager property should declared like this:

     model : OrganizerModel {
        manager:"qtorganizer:memory:id=organizer1
     }

    instead of just the manager name:

     model : OrganizerModel {
        manager:"memory"
     }

    See also QOrganizerManager::fromUri().


    read-onlymanagerName : string

    This property holds the manager name of the organizer backend engine. This property is read only.

    See also QOrganizerManager::fromUri().


    read-onlynotes : list<OrganizerItem>

    This property holds a list of note items in the organizer model.

    See also Note.


    read-onlyoccurrences : list<OrganizerItem>

    This property holds a list of event or todo occurrence items in the organizer model. Note: This property is not currently supported yet.

    See also Event, Todo, EventOccurrence, and TodoOccurrence.


    read-onlysortOrders : list<SortOrder>

    This property holds a list of sort orders used by the organizer model.

    See also SortOrder.


    startPeriod : date

    This property holds the start date and time period used by the organizer model to fetch organizer items. The default value is the datetime of OrganizerModel creation.


    read-onlytodoOccurrences : list<OrganizerItem>

    This property holds a list of todo occurrences in the organizer model.

    See also TodoOccurrence.


    read-onlytodos : list<OrganizerItem>

    This property holds a list of todos in the organizer model.

    See also Todo.


    Method Documentation

    OrganizerModel::cancelUpdate ()

    Cancel the running organizer model content update request.

    See also OrganizerModel::autoUpdate and OrganizerModel::update.


    bool OrganizerModel::containsItems ( date start, date end )

    Returns true if there is at least one OrganizerItem between the given date range. Both the start and end parameters are optional, if no end parameter, returns true if there are item(s) after start, if neither start nor end date time provided, returns true if items in the current model is not empty, otherwise return false.

    This documentation was introduced in QtMobility organizer 1.1.1.

    See also itemIds().


    OrganizerModel::exportItems ( url url, list<string> profiles )

    Export organizer items into a vcalendar file to the given url by optional profiles. At the moment only the local file url is supported in export method.


    OrganizerModel::fetchItems ( list<QString> itemIds )

    Fetch a list of organizer items from the organizer store by given itemIds.


    OrganizerModel::importItems ( url url, list<string> profiles )

    Import organizer items from a vcalendar by the given url and optional profiles.


    OrganizerItem OrganizerModel::item ( string itemId )

    Returns the OrganizerItem object which item id is the given itemId.

    This documentation was introduced in QtMobility organizer 1.1.1.


    list<string> OrganizerModel::itemIds ( date start, date end )

    Returns the list of organizer item ids between the given date range start and end, Both the start and end parameters are optional, if no end parameter, returns all item ids from start, if neither start nor end date time provided, returns all item ids in the current model.

    This documentation was introduced in QtMobility organizer 1.1.1.

    See also containsItems().


    OrganizerModel::removeItem ( string itemId )

    Removes the organizer item with the given itemId from the backend.

    This documentation was introduced in QtMobility organizer 1.1.1.


    OrganizerModel::saveItem ( OrganizerItem item )

    Saves the given item into the organizer backend.

    This documentation was introduced in QtMobility organizer 1.1.1.


    OrganizerModel::update ()

    Manually update the organizer model content.

    See also OrganizerModel::autoUpdate.


    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 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 Developer Network au hasard

    Logo

    Combiner licence, à propos et fermer

    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