Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QPimModel class provides an abstract interface to the PIM model classes. More...
#include <QPimModel>
Inherits QAbstractItemModel.
Inherited by QAppointmentModel, QContactModel, and QTaskModel.
The QPimModel class provides an abstract interface to the PIM model classes.
The QPimModel class defines a standard interface that is implemented by all of the PIM model classes. As it is an abstract interface, the QPimModel class should not be used directly. Instead use the classes that provide access for the specific PIM data types, QAppointmentModel, QContactModel or QTaskModel.
See also QAppointmentModel, QContactModel, QTaskModel, and Pim Library.
Constructs a PIM model with the given parent.
Destroys the PIM model.
Aborts the current synchronization transaction.
Returns true if transaction successfully aborted.
See also startSyncTransaction() and commitSyncTransaction().
Aborts the current transaction.
Returns true if transaction successfully aborted.
See also startTransaction() and commitTransaction().
Adds the PIM record encoded in bytes to the model under the specified storage source. The format of the record in bytes is given by format. An empty format string will cause the record to be read using the data stream operators for the PIM data type of the model. Valid format strings are documented in QAppointmentModel, QContactModel and QTaskModel. If the specified source is null the function will add the record to the default storage source.
Returns a valid identifier for the record if the record was successfully added. Otherwise returns a null identifier.
Can only add PIM data that is represented by the model.
See also updateRecord() and removeRecord().
Returns the list of identifiers for records added to the current set of visible sources on or after the specified timestamp.
Timestamps are stored in UTC. Please use QTimeZone::toUtc() for times passed into this function.
See also removed() and modified().
Returns the set of storage sources that can be shown.
See also setVisibleSources() and visibleSources().
Returns the category filter that records are tested against in the current filter mode.
See also setCategoryFilter().
Commits the current synchronization transaction.
Returns true if transaction successfully committed.
Does not abort transaction if unsuccessfully committed.
See also startSyncTransaction() and abortSyncTransaction().
Commits the current transaction.
Returns true if transaction successfully committed.
Does not abort transaction if unsuccessfully committed.
See also startTransaction() and abortTransaction().
Returns true if the current filter mode of the model contains the given index.
See also exists().
This is an overloaded member function, provided for convenience.
Returns true if the current filter mode of the model contains the record with given identifier.
See also exists().
Returns the context that could contain the record with specified identifier. This function does not check if the record currently exists in the corresponding context, but instead returns the context that this identifier belongs to. You can call QPimContext::exists() if you wish to be more certain, but be aware that other threads or processes may make the result out of date.
Returns 0 if this identifier does not belong to any context.
See also contexts().
This is an overloaded member function, provided for convenience.
If the given source exists in the model returns the context that provides that source. Otherwise returns 0.
See also contexts() and availableSources().
Returns the contexts of record data that is shown by the record model.
Return the number of records visible in the in the current filter mode.
Returns the default storage sources relating to the device memory.
See also source(), availableSources(), and visibleSources().
Returns true if the record for the given index can be updated or removed.
This is an overloaded member function, provided for convenience.
Returns true if the record for the given identifier can be updated or removed.
Returns true if a record with the given identifier is stored in the model.
The specified record does not need to be in the current filter mode.
See also contains().
Ensures the data for the model is in a state suitable for syncing.
Returns true upon success.
See also startSyncTransaction().
Returns the identifier for the record at the specified index. If index is null or out of the range of the model, will return a null identifier.
This is an overloaded member function, provided for convenience.
Returns the identifier for record at the specified row.
Returns the index of the record for the given identifier. If no record is found returns a null index.
See also contains() and exists().
Returns the list of identifiers for records modified in the current set of visible sources on or after the specified timestamp.
Timestamps are stored in UTC. Please use QTimeZone::toUtc() for times passed into this function.
See also added() and removed().
Returns the record in the model with the specified identifier encoded in the format specified by the format string. An empty format string will cause the record to be written using the data stream operators for the PIM data type of the model.
Forces a refresh of the data for the model. The PIM data models update automatically and it should not be required that this function is called in normal use of the PIM data models.
Returns true upon success.
Removes the record from the model with the specified identifier.
Returns true if the record was successfully removed.
See also addRecord() and updateRecord().
Returns the list of identifiers for records removed from the current set of visible sources on or after the specified timestamp.
Timestamps are stored in UTC. Please use QTimeZone::toUtc() for times passed into this function.
See also added() and modified().
Sets the model to only contain records accepted by the specified category filter.
See also categoryFilter().
Sets the model to show only records contained in the storage sources specified by list.
Also refreshes the model.
See also visibleSources() and availableSources().
Returns the storage source that contains the record with the specified identifier. Returns a null source if the record does not exist.
See also availableSources().
Returns true if the record for the given identifier is stored in the specified storage source.
See also exists() and availableSources().
Prepares the currently visible sources for synchronization. All modifications between startSyncTransaction() and commitSyncTransaction() will be marked with the given timestamp for modification or creation as appropriate.
Returns true if transaction successfully initiated.
Does not abort the transaction if it is unsuccessful. The calling code must call abortSyncTransaction() to do that.
Timestamps are stored in UTC. Please use QTimeZone::toUtc() for times passed into this function.
See also commitSyncTransaction() and abortSyncTransaction().
Starts an SQL transaction on the database. Allows for calling multiple functions that may modify the database as an atomic operation.
Note that the database will be locked for the current model only. Do not modify any other PIM model instance until either committing or aborting the transaction.
Returns true if transaction successfully initiated.
See also commitTransaction() and abortTransaction().
Updates the corresponding record in the model to equal the record encoded in bytes. The format of the record in bytes is given by the format string. An empty format string will cause the record to be read using the data stream operators for the PIM data type of the model. If id is not null will set the record identifier to id ready from the given bytes before attempting to update the record.
Returns true if the record was successfully updated.
See also addRecord() and removeRecord().
Returns the list of sources of record data that is currently shown by the record model.
See also setVisibleSources() and availableSources().
Copyright © 2009 Trolltech | Trademarks | Qt Extended 4.4.3 |