CAknGridM Class Reference

#include <mw/AknGridM.h>

class CAknGridM : public CTextListBoxModel

Inherits from

Detailed Description

Model class to CAknGrid. Usually this class object is instantiated automatically during the construction phase of CAknGrid object.If programmer wants to provide their own model they must instantiate grid model class object of their own and give it to the CAknGrid object using the SetModel function before calling the ConstructL/ConstructFromResourceL function of CAknGrid.

Since
Series60 0.9

Constructor & Destructor Documentation

CAknGridM ( )

IMPORT_CCAknGridM()

Default C++ constructor.

~CAknGridM ( )

IMPORT_C~CAknGridM()[virtual]

Destructor.

Member Function Documentation

IndexContainsData ( TInt )

IMPORT_C TBoolIndexContainsData(TIntaDataIndex)const [virtual]

Tests if the given cell index has data.

ParameterDescription
aDataIndexIndex to the item to be checked.

Returns: ETrue if the data index given is a data cell within the grid otherwise returns EFalse.

IndexOfFirstDataItem ( )

IMPORT_C TIntIndexOfFirstDataItem()const

Gets the index of the first data item in the model.

Returns: Index of the first data item if data exists in model. Returns -1 if no data exists.

IndexOfLastDataItem ( )

IMPORT_C TIntIndexOfLastDataItem()const

Gets the index of the last data item in the model.

Returns: Index of the last data item if data exists in model. Returns -1 if no data exists.

ItemText ( TInt )

IMPORT_C TPtrCItemText(TIntaItemIndex)const [virtual]

Reimplemented from CTextListBoxModel::ItemText(TInt)const

Gets the text of given index. No check is made that the item index given is a valid grid index. A check should be made using IndexContainsData before the function is called. Empty cells at the start should be taken in account of the index given.

ParameterDescription
aItemIndexIndex of the grid.

Returns: a Pointer descriptor to the associated item text for a cell.

NumberOfData ( )

IMPORT_C TIntNumberOfData()const [virtual]

Gives the number of data cells in the grid.

Returns: Number of the non empty cells in the grid.

NumberOfItems ( )

IMPORT_C TIntNumberOfItems()const [virtual]

Reimplemented from CTextListBoxModel::NumberOfItems()const

Access to the number of items in the arrays.

Returns: Number of cells within the grid (including empty cells).

SetStartCells ( TInt )

IMPORT_C voidSetStartCells(TIntaNumEmpty)

This function sets the number of empty data cells at the start of the grid.

ParameterDescription
aNumEmptyNumber of empty cells.