MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9

QML LandmarkAbstractModel Element

The LandmarkAbstractModel element is an uncreatable / uninstantiable base element for LandmarkModel and LandmarkCategoryModel. It defines many common properties for the two models. More...

Inherited by LandmarkCategoryModel and LandmarkModel.

This element was introduced in Mobility 1.2.

Properties

Signals

Methods

Detailed Description

The LandmarkAbstractModel element is an uncreatable / uninstantiable base element for LandmarkModel and LandmarkCategoryModel. It defines many common properties for the two models.

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

See also LandmarkModel and LandmarkCategoryModel.

Property Documentation

autoUpdate : bool

Controls whether the model data should be automatically updated when appropriate events occur: limit changes, offset changes, filter changes, filter contents change, or sorting rules change. Property also controls whether the data is updated automatically once model instantiation is completed.

Note: while autoUpdate adds to development comfort, each change in appropriate parameters cause full fetch from underlying database and therefore its use should be thought through. E.g. if your application inherently behaves such that filters, their contents, and underlying database change very frequently, it may be wiser to bind a manual update call to a less hectic trigger source.

This property group was introduced in Mobility 1.2.


read-onlycount : int

Indicates the number of items currently in the model (landmarks/categories).

This property group was introduced in Mobility 1.2.


read-onlyerror : string

Human readable string of the last error that occurred (read-only).

This property group was introduced in Mobility 1.2.


limit : int

Sets the maximum amount of items held by the model.

This property group was introduced in Mobility 1.2.


offset : int

Sets the offset for the landmarks. For example if one creates a tabbed / paged application, the offset could be changed dynamically by a multiple of items per page.

This property group was introduced in Mobility 1.2.


sortBy : enumeration

Specifies the role to sort the items by.

Note: both sortBy and sortOrder incur performance costs. If the order is not important (e.g. when displaying landmarks as Map objects) it is advisable not to set them.

This property group was introduced in Mobility 1.2.


sortOrder : enumeration

Specifies the sort order.

Note: both sortBy and sortOrder incur performance costs. If the order is not important (e.g. when displaying landmarks as Map objects) it is advisable not to set them.

This property group was introduced in Mobility 1.2.


Signal Documentation

LandmarkAbstractModel::databaseChanged ()

This handler is called when the data in the underlying data storage has changed. If autoUpdate is true, model data will be updated shortly afterwards.

This documentation was introduced in Mobility 1.2.


LandmarkAbstractModel::modelChanged ()

This handler is called when the model data has changed.

This documentation was introduced in Mobility 1.2.


Method Documentation

LandmarkAbstractModel::update ()

Updates the items represented by the model from the underlying store.

This documentation was introduced in Mobility 1.2.

See also autoUpdate.