Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QFavoriteServicesModel class provides a data model of the Favorite Services list. More...
#include <QFavoriteServicesModel>
Inherits QAbstractListModel.
This class was introduced in Qtopia 4.4.
The QFavoriteServicesModel class provides a data model of the Favorite Services list.
This model provides functions for accessing and manipulating the favorite services list. If you merely need to add or remove a service, use the FavoritesService service.
The Qt Extended favorite services list is a list of service requests which have been selected by the user. The list can be reordered by the user, and items can have an optional Speed dial number associated with them. List items are unique, each distinct service description will only appear once.
The favorites list designed to contain services which the user would wish to quickly access. The favorites list will be easily accessible and easily manipulated by the user. This is similar to the concept of bookmarks in a web browser.
Note that any optional properties in the service description are not considered when determining whether two descriptions are distinct.
See also FavoritesService and QSpeedDial.
Extends Qt::ItemDataRole
Constant | Value | Description |
---|---|---|
QFavoriteServicesModel::SpeedDialInputRole | Qt::UserRole | A string containing the speed dial input associated with this favorite, if any. |
Constructs a QFavoriteServicesModel with the given parent.
Destroys the model.
Returns the data stored under the given role for the item referred to by the index. The display role contains the service description's label, and the decoration role contains the service desription's icon (as a QIcon). The other roles used are defined in QFavoriteServicesModelRole.
Reimplemented from QAbstractItemModel.
Returns the QtopiaServiceDescription of the item at index.
Returns the index of the entry with the QtopiaServiceDescription desc. Otherwise returns an invalid QModelIndex.
Adds the given QtopiaServiceDescription, desc, to the Favorite Services list. It will be placed above the item at index. If index is invalid it will place it at the end of the list, behaving the same as FavoritesService::add. If the service description desc already exists in the list, it will be moved from its current position to the position above the item at index. Returns true if it successfully inserts or moves the specified service description, false otherwise.
See also FavoritesService::add().
Changes the order of the Favorite Service entries by moving the entry at index from to index to. This will also change the row of entries between these rows, but not their relative position. Returns true if the move is successful, false otherwise.
Removes the action currently at the given index. Returns true if successful, false otherwise.
See also FavoritesService::remove().
Returns the number of rows in the model, which is independent of the parent.
Reimplemented from QAbstractItemModel.
Returns the speed dial input for the item at index if it has one. Otherwise returns a null string.
Copyright © 2009 Trolltech | Trademarks | Qt Extended 4.4.3 |