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  · 

QOrganizerAbstractRequest Class Reference

The QOrganizerAbstractRequest class provides a mechanism for asynchronous requests to be made of a manager if it supports them. More...

 #include <QOrganizerAbstractRequest>

Inherits QObject.

Inherited by QOrganizerCollectionFetchRequest, QOrganizerCollectionRemoveRequest, QOrganizerCollectionSaveRequest, QOrganizerItemDetailDefinitionFetchRequest, QOrganizerItemDetailDefinitionRemoveRequest, QOrganizerItemDetailDefinitionSaveRequest, QOrganizerItemFetchForExportRequest, QOrganizerItemFetchRequest, QOrganizerItemIdFetchRequest, QOrganizerItemOccurrenceFetchRequest, QOrganizerItemRemoveRequest, and QOrganizerItemSaveRequest.

Public Types

enum RequestType { InvalidRequest, ItemOccurrenceFetchRequest, ItemFetchRequest, ItemFetchForExportRequest, ..., CollectionSaveRequest }
enum State { InactiveState, ActiveState, CanceledState, FinishedState }

Public Functions

~QOrganizerAbstractRequest ()
QOrganizerManager::Error error () const
bool isActive () const
bool isCanceled () const
bool isFinished () const
bool isInactive () const
QOrganizerManager * manager () const
void setManager ( QOrganizerManager * manager )
State state () const
RequestType type () const
  • 29 public functions inherited from QObject

Public Slots

bool cancel ()
bool start ()
bool waitForFinished ( int msecs = 0 )
  • 1 public slot inherited from QObject

Signals

void resultsAvailable ()
void stateChanged ( QOrganizerAbstractRequest::State newState )

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public variable inherited from QObject
  • 4 static public members inherited from QObject
  • 7 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

The QOrganizerAbstractRequest class provides a mechanism for asynchronous requests to be made of a manager if it supports them.

It allows a client to asynchronously request some functionality of a particular QOrganizerManager. Instances of the class will emit signals when the state of the request changes, or when more results become available.

Clients should not attempt to create instances of this class directly, but should instead use the use-case-specific classes derived from this class.

After creating any sort of request, the client retains ownership and must delete the request to avoid leaking memory. The client may either do this directly (if not within a slot connected to a signal emitted by the request) or by using the deleteLater() slot to schedule the request for deletion when control returns to the event loop.

Member Type Documentation

enum QOrganizerAbstractRequest::RequestType

Enumerates the various possible types of asynchronous requests

ConstantValueDescription
QOrganizerAbstractRequest::InvalidRequest0An invalid request
QOrganizerAbstractRequest::ItemOccurrenceFetchRequest1A request to fetch a list of occurrences of an organizer item
QOrganizerAbstractRequest::ItemFetchRequest2A request to fetch a list of organizer items
QOrganizerAbstractRequest::ItemFetchForExportRequest3A request to fetch a list of persisted organizer items and exceptions
QOrganizerAbstractRequest::ItemIdFetchRequest4A request to fetch a list of organizer item ids
QOrganizerAbstractRequest::ItemRemoveRequest5A request to remove a list of organizer items
QOrganizerAbstractRequest::ItemSaveRequest6A request to save a list of organizer items
QOrganizerAbstractRequest::DetailDefinitionFetchRequest7A request to fetch a collection of detail definitions
QOrganizerAbstractRequest::DetailDefinitionRemoveRequest8A request to remove a list of detail definitions
QOrganizerAbstractRequest::DetailDefinitionSaveRequest9A request to save a list of detail definitions
QOrganizerAbstractRequest::CollectionFetchRequest10A request to fetch a collection.
QOrganizerAbstractRequest::CollectionRemoveRequest11A request to remove a collection.
QOrganizerAbstractRequest::CollectionSaveRequest12A request to save a collection.

enum QOrganizerAbstractRequest::State

Enumerates the various states that a request may be in at any given time

ConstantValueDescription
QOrganizerAbstractRequest::InactiveState0Operation not yet started
QOrganizerAbstractRequest::ActiveState1Operation started, not yet finished
QOrganizerAbstractRequest::CanceledState2Operation is finished due to cancellation
QOrganizerAbstractRequest::FinishedState3Operation successfully completed

Member Function Documentation

QOrganizerAbstractRequest::~QOrganizerAbstractRequest ()

Cleans up the memory used by this request

bool QOrganizerAbstractRequest::cancel () [slot]

Attempts to cancel the request. Returns false if the request is not in the QOrganizerAbstractRequest::Active state, or if the request is unable to be cancelled by the manager engine; otherwise returns true.

QOrganizerManager::Error QOrganizerAbstractRequest::error () const

Returns the overall error of the most recent asynchronous operation

bool QOrganizerAbstractRequest::isActive () const

Returns true if the request is in the QOrganizerAbstractRequest::ActiveState state; otherwise, returns false

See also state().

bool QOrganizerAbstractRequest::isCanceled () const

Returns true if the request is in the QOrganizerAbstractRequest::CanceledState; otherwise, returns false

See also state().

bool QOrganizerAbstractRequest::isFinished () const

Returns true if the request is in the QOrganizerAbstractRequest::FinishedState; otherwise, returns false

See also state().

bool QOrganizerAbstractRequest::isInactive () const

Returns true if the request is in the QOrganizerAbstractRequest::InactiveState state; otherwise, returns false

See also state().

QOrganizerManager * QOrganizerAbstractRequest::manager () const

Returns a pointer to the manager of which this request instance requests operations

See also setManager().

void QOrganizerAbstractRequest::resultsAvailable () [signal]

This signal is emitted when new results are available. Results can include the operation error which may be accessed via error(), or derived-class-specific results which are accessible through the derived class API.

See also error().

void QOrganizerAbstractRequest::setManager ( QOrganizerManager * manager )

Sets the manager of which this request instance requests operations to manager

See also manager().

bool QOrganizerAbstractRequest::start () [slot]

Attempts to start the request. Returns false if the request is not in the QOrganizerAbstractRequest::Inactive, QOrganizerAbstractRequest::Finished or QOrganizerAbstractRequest::Cancelled states, or if the request was unable to be performed by the manager engine; otherwise returns true.

State QOrganizerAbstractRequest::state () const

Returns the current state of the request.

void QOrganizerAbstractRequest::stateChanged ( QOrganizerAbstractRequest::State newState ) [signal]

This signal is emitted when the state of the request is changed. The new state of the request will be contained in newState.

RequestType QOrganizerAbstractRequest::type () const

Returns the type of this asynchronous request

bool QOrganizerAbstractRequest::waitForFinished ( int msecs = 0 ) [slot]

Blocks until the request has been completed by the manager engine, or until msecs milliseconds has elapsed. If msecs is zero or negative, this function will block until the request is complete, regardless of how long it takes. Returns true if the request was cancelled or completed successfully within the given period, otherwise false. Some backends are unable to support this operation safely, and will return false immediately.

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

Compiler l'add-in Qt de Visual Studio

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