QLandmarkAbstractRequest Class Reference
The QLandmarkAbstractRequest class provides the interface from which all asynchronous request classes inherit. More...
#include <QLandmarkAbstractRequest>
Inherited by QLandmarkCategoryFetchRequest, QLandmarkCategoryIdFetchRequest, QLandmarkCategoryRemoveRequest, QLandmarkCategorySaveRequest, QLandmarkExportRequest, QLandmarkFetchRequest, QLandmarkIdFetchRequest, QLandmarkImportRequest, QLandmarkRemoveRequest, and QLandmarkSaveRequest.
Public Types
enum | RequestType { InvalidRequest, LandmarkIdFetchRequest, CategoryIdFetchRequest, LandmarkFetchRequest, ..., ExportRequest } |
enum | State { InactiveState, ActiveState, FinishedState } |
Public Functions
Public Slots
Signals
Detailed Description
The QLandmarkAbstractRequest class provides the interface from which all asynchronous request classes inherit.
It allows a client to asynchronously request some functionality from a QLandmarkManager.
Member Type Documentation
enum QLandmarkAbstractRequest::RequestType
Defines the possible types of asynchronous requests.
|
Constant | Value | Description |
QLandmarkAbstractRequest::InvalidRequest | 0 | An invalid request |
QLandmarkAbstractRequest::LandmarkIdFetchRequest | 1 | A request to fetch a list of landmark identifiers. |
QLandmarkAbstractRequest::CategoryIdFetchRequest | 2 | A request to fetch a list of catgory identifiers. |
QLandmarkAbstractRequest::LandmarkFetchRequest | 3 | A request to fetch a list of landmarks |
QLandmarkAbstractRequest::CategoryFetchRequest | 4 | A request to fetch a list of categories |
QLandmarkAbstractRequest::LandmarkSaveRequest | 5 | A request to save a list of landmarks. |
QLandmarkAbstractRequest::LandmarkRemoveRequest | 6 | A request to remove a list of landmarks. |
QLandmarkAbstractRequest::CategorySaveRequest | 7 | A request to save a list of categories. |
QLandmarkAbstractRequest::CategoryRemoveRequest | 8 | A request to remove a list of categories. |
QLandmarkAbstractRequest::ImportRequest | 9 | A request import landmarks. |
QLandmarkAbstractRequest::ExportRequest | 10 | A request export landmarks. |
enum QLandmarkAbstractRequest::State
Defines the possible states of asynchronous requests.
|
Constant | Value | Description |
QLandmarkAbstractRequest::InactiveState | 0 | Operation not yet started. |
QLandmarkAbstractRequest::ActiveState | 1 | Operation started, not yet finished. |
QLandmarkAbstractRequest::FinishedState | 2 | Operation completed. (Can be mean either successful or unsuccessful completion). |
Member Function Documentation
QLandmarkAbstractRequest::QLandmarkAbstractRequest ( QLandmarkManager * manager, QObject * parent = 0 )
Constructs a new, invalid asynchronous request with the given manager and parent.
QLandmarkAbstractRequest::~QLandmarkAbstractRequest () [virtual]
Destroys the asynchronous request
bool QLandmarkAbstractRequest::cancel () [slot]
Attempts to cancel the request.
Returns true if the request was canceled, otherwise false.
See also start().
Returns the error of the most recent asynchronous operation.
See also errorString().
QString QLandmarkAbstractRequest::errorString () const
Returns a human readable string of the last error that occurred.
See also error().
bool QLandmarkAbstractRequest::isActive () const
Returns true if the request is in the QLandmarkAbstractRequest::Active state; otherwise, returns false.
See also state().
bool QLandmarkAbstractRequest::isFinished () const
Returns true if the request is in the QLandmarkAbstractRequest::Finished state; otherwise, returns false.
See also state().
bool QLandmarkAbstractRequest::isInactive () const
Returns true if the request is in the QLandmarkAbstractRequest::Inactive state; otherwise, returns false.
See also state().
QLandmarkManager * QLandmarkAbstractRequest::manager () const
Returns a pointer to the landmark manager which this request operates on.
See also setManager().
void QLandmarkAbstractRequest::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 QLandmarkAbstractRequest::setManager ( QLandmarkManager * manager )
Sets the manager which this request operates on.
Note that if a NULL manager is set, the functions start(), cancel() and waitForFinished() will return false and error will be set to QLandmarkManager::InvalidManagerError.
See also manager().
bool QLandmarkAbstractRequest::start () [slot]
Attempts to start the request.
Returns true if the request was started, otherwise false.
See also cancel().
State QLandmarkAbstractRequest::state ()
Returns the state of the request
void QLandmarkAbstractRequest::stateChanged ( QLandmarkAbstractRequest::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 QLandmarkAbstractRequest::type () const
Returns the type of this asynchronous request.
bool QLandmarkAbstractRequest::waitForFinished ( int msecs = 0 ) [slot]
Blocks until the request has been completed or until msecs milliseconds has elapsed. If msecs is zero, this function will block indefinitely.
Returns true if the request was canceled or completed within the given period, otherwise returns false.