Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QtopiaServiceHistoryModel Class Reference
[QtBaseModule]

The QtopiaServiceHistoryModel class provides a data model and insertion methods for the Qt Extended service history. More...

    #include <QtopiaServiceHistoryModel>

Inherits QAbstractListModel.

Public Types

Public Functions

Static Public Members

Additional Inherited Members


Detailed Description

The QtopiaServiceHistoryModel class provides a data model and insertion methods for the Qt Extended service history.

This class provides methods to add service calls to the service history, and to retrieve service calls in the service history. If you wish to have a service call stored in the service history you must call this class to insert it, it will not be stored automatically.

This class is also a data model suitable as the model for a QListView, so that it can display the entire service history.


Member Type Documentation

enum QtopiaServiceHistoryModel::SortFlags

Determines sorting order.

ConstantValueDescription
QtopiaServiceHistoryModel::History0List actions in reverse chronological order. The same action may appear more than once.
QtopiaServiceHistoryModel::Recent2Sort actions by time performed, with the most recent at position 0. Each action will only appear once.
QtopiaServiceHistoryModel::Frequency1Sort actions by frequency, with the most frequent at position 0. Each action will only appear once.


Member Function Documentation

QtopiaServiceHistoryModel::QtopiaServiceHistoryModel ( QObject * parent = 0 )

Construct a QtopiaServiceHistoryModel with parent.

QtopiaServiceHistoryModel::~QtopiaServiceHistoryModel ()

Destroys the QtopiaServiceHistoryModel

QVariant QtopiaServiceHistoryModel::data ( const QModelIndex & index, int role = Qt::DisplayRole ) const   [virtual]

Returns the data stored under the given role for the item referred to by the index.

Reimplemented from QAbstractItemModel.

void QtopiaServiceHistoryModel::insert ( const QtopiaServiceDescription & desc )   [static]

Inserts a new QtopiaServiceDescription desc in the history.

void QtopiaServiceHistoryModel::insert ( const QtopiaServiceRequest & request, const QString & label, const QString & icon )   [static]

This is an overloaded member function, provided for convenience.

Inserts a new QtopiaServiceRequest request in the history with label and icon named icon.

int QtopiaServiceHistoryModel::rowCount ( const QModelIndex & parent = QModelIndex() ) const   [virtual]

Returns the number of rows under the given parent.

Reimplemented from QAbstractItemModel.

QtopiaServiceDescription QtopiaServiceHistoryModel::serviceDescription ( const QModelIndex & index ) const

Returns the QtopiaServiceDescription for the item referred to by the index

QtopiaServiceRequest QtopiaServiceHistoryModel::serviceRequest ( const QModelIndex & index ) const

Returns the QtopiaServiceRequest for the item referred to by the index.

void QtopiaServiceHistoryModel::setSorting ( SortFlags sort )

Set the sorting order to sort.

See also sorting().

SortFlags QtopiaServiceHistoryModel::sorting () const

Return the current sort order.

See also setSorting().


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3