ListItemTypeMapper

Since: BlackBerry 10.0.0

#include <bb/cascades/ListItemTypeMapper>

An interface for determining the type of each item in a ListView.

An object implementing ListItemTypeMapper can optionally be provided to a ListView. In this case, the ListView will call ListItemTypeMapper::itemType() instead of calling DataModel::itemType() when the ListView needs to know the type of an item.

You can apply a ListItemTypeMapper to a ListView using ListView::setListItemTypeMapper().


Overview

Public Functions Index

virtual ~ListItemTypeMapper ()
QStringitemType (const QVariant &data, const QVariantList &indexPath)=0

Public Functions

virtual~ListItemTypeMapper ()

Destructor.

Since:

BlackBerry 10.0.0

QString itemType (

Returns the item type based on the data that's contained in the specified list item.

This function is called by ListView for each item it loads.

Parameters
data

The value returned by DataModel::data() for the specified item.

indexPath

An index path specifying the item whose type is requested.

Return:

The item type based on values in the given item.

Since:

BlackBerry 10.0.0

Last modified: 2014-09-30



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus