UIQ Technology
 Developer Library

UIQ 3 SDK

UIQ developer portal

FEEDBACK 

[Index] [Spacer] [Previous] [Next]



Location: MQikListBoxData.h

Class MQikListBoxData

class MQikListBoxData;

Description

Base class for listbox data classes. The list box model contains these data objects in which data (text, images or icons) is stored. Text, images or icons are added to the data object along with a slot id, specifying where in a layout the data should be shown.

Members

Defined in MQikListBoxData:
AddIconL(), AddTextL(), AddTextL(), AddThumbnailImageL(), ClearHosts(), Close(), CurrentIndexForSlot(), DeleteIcon(), DeleteIcon(), DeleteText(), DeleteText(), DeleteThumbnailImage(), DeleteThumbnailImage(), ECurrentIndex, EDefaultSlot, Icon(), Icon(), IndexCountForSlot(), IsDimmed(), IsDisabled(), IsEmphasized(), IsSeparator(), IsUnselectable(), ItemId(), LayoutId(), NextOrFirstSlotIndexL(), NextOrFirstSlotIndexL(), Open(), PreviousOrLastSlotIndexL(), PreviousOrLastSlotIndexL(), SetCurrentIndexForSlotL(), SetDimmed(), SetDisabled(), SetEmphasis(), SetIconL(), SetIconL(), SetItemId(), SetLayoutId(), SetTextL(), SetTextL(), SetTextL(), SetTextL(), SetThumbnailImageL(), SetThumbnailImageL(), TListBoxDataSlotIndex, Text(), Text(), ThumbnailImage(), ThumbnailImage()

See also:


Member functions


Open()

virtual void Open()=0;

Description

Opens a data object and increases the reference count. If reference counting is not needed in the particular data implementation it can be ignored, or just used in debug builds to ensure that the correct number of Open/Close has been made. The model should always call Open on any data object that has been extracted from the model, and if any copy of an MQikListBoxData pointer is made, it needs to call Open() as well.


Close()

virtual void Close()=0;

Description

Closes the data object. After Close has been called, the data object should be treated as if delete had been called. The reference count might have deleted the object, depending on which scheme has been used.


ClearHosts()

virtual void ClearHosts()=0;

Description

Is called when an item is destroyed, etc, to reset any host pointers in any CQikContents.


AddIconL()

virtual void AddIconL(CQikContent *aIcon, TInt aSlotId)=0;

Description

Adds an icon to a specific slot. Further calls do not replace the icon, but keeps the icons in an array with indexes.

Parameters

CQikContent *aIcon

The icon to be added. Ownership of the CQikContent object is taken, but note that the bitmap and mask of CQikContent can still be owned externally.

TInt aSlotId

Slot id to which the icon will be added.


AddThumbnailImageL()

virtual void AddThumbnailImageL(const TDesC &aFileName, TInt aSlotId)=0;

Description

Adds a filename to a file that will be scaled to a thumbnail. Further calls do not replace the filename, but keeps them in an array with indexes.

Parameters

const TDesC &aFileName

The filename to add.

TInt aSlotId

Slot id for the text.


AddTextL()

virtual void AddTextL(HBufC *aText, TInt aSlotId)=0;

Description

Adds a text. Further calls do not replace the text, but keeps the texts in an array with indexes. Takes ownership of the text sent in.

Parameters

HBufC *aText

The text to add.

TInt aSlotId

Slot id for the text.


AddTextL()

virtual void AddTextL(const TDesC &aText, TInt aSlotId)=0;

Description

Adds a text. Further calls do not replace the text, but keeps the texts in an array with indexes.

Parameters

const TDesC &aText

The text to add.

TInt aSlotId

Slot id for the text.


Icon()

virtual CQikContent *Icon(TInt aSlotId, TInt aIndex) const=0;

Description

Gets the icon of a slot at a certain index.

Parameters

TInt aSlotId

The slot id to get the icon for.

TInt aIndex

The index of the icon in the slot.

Return value

CQikContent *

A pointer to a CQikContent containing the icon bitmap and mask or NULL if not applicable to the supplied slot id. Ownership is not transferred.


ThumbnailImage()

virtual TPtrC ThumbnailImage(TInt aSlotId, TInt aIndex) const=0;

Description

Gets the thumbnail filename at a certain index.

Parameters

TInt aSlotId

The slot id to get the filename for.

TInt aIndex

The index of the fielname in the slot.

Return value

TPtrC

A pointer to the data's filename.


Text()

virtual TPtrC Text(TInt aSlotId, TInt aIndex) const=0;

Description

Gets the text at a certain index.

Parameters

TInt aSlotId

The slot id to get the text for.

TInt aIndex

The index of the text in the slot.

Return value

TPtrC

A pointer to the data's text.


SetIconL()

virtual void SetIconL(CQikContent *aIcon, TInt aSlotId, TInt aIndex)=0;

Description

Sets the icon at the index of an existing slot, removing the old data.

Parameters

CQikContent *aIcon

The new icon that will replace existing one. Ownership of the CQikContent object is taken, but note that the bitmap and mask of CQikContent can still be owned externally.

TInt aSlotId

The slot to set the icon in.

TInt aIndex

The index in the slot of the icon to be set.


SetThumbnailImageL()

virtual void SetThumbnailImageL(const TDesC &aFileName, TInt aSlotId, TInt aIndex)=0;

Description

Sets the filename at the index of an existing slot, removing the old data.

Parameters

const TDesC &aFileName

The new filename.

TInt aSlotId

The slot to set the filename in.

TInt aIndex

The index in the slot of the filename to be set.


SetTextL()

virtual void SetTextL(HBufC *aText, TInt aSlotId, TInt aIndex)=0;

Description

Sets the text at the index of an existing slot, removing the old data. Takes ownership of the text sent in.

Parameters

HBufC *aText

The new text.

TInt aSlotId

The slot to set the text in.

TInt aIndex

The index in the slot of the text to be set.


SetTextL()

virtual void SetTextL(const TDesC &aText, TInt aSlotId, TInt aIndex)=0;

Description

Sets the text at the index of an existing slot, removing the old data.

Parameters

const TDesC &aText

The new text.

TInt aSlotId

The slot to set the text in.

TInt aIndex

The index in the slot of the text to be set.


LayoutId()

virtual TInt LayoutId() const=0;

Description

Get layout id for this data entry.

Return value

TInt

The layout id.


SetLayoutId()

virtual void SetLayoutId(TInt aId)=0;

Description

Set layout id for this data entry, -1 indicates default layout.

Parameters

TInt aId

The layout id.


IndexCountForSlot()

virtual TInt IndexCountForSlot(TInt aSlotId) const=0;

Description

Returns the number of data entries for a slot.

Parameters

TInt aSlotId

The slot to check in.

Return value

TInt

The count.


CurrentIndexForSlot()

virtual TInt CurrentIndexForSlot(TInt aSlotId) const=0;

Description

Gets the current index for a slot.

Parameters

TInt aSlotId

The slot to get it from.

Return value

TInt

The index.


SetCurrentIndexForSlotL()

virtual void SetCurrentIndexForSlotL(TInt aSlotId, TInt aIndex)=0;

Description

Sets the current index for a slot.

Parameters

TInt aSlotId

The slot to get it from.

TInt aIndex

The new index.


NextOrFirstSlotIndexL()

virtual TBool NextOrFirstSlotIndexL()=0;

Description

Increase all indexes by one or set to zero (0) if beyond data end.

Return value

TBool

ETrue if the index changed, otherwise EFalse


PreviousOrLastSlotIndexL()

virtual TBool PreviousOrLastSlotIndexL()=0;

Description

Decrease all indexes by one or set to last index if below zero (0).

Return value

TBool

ETrue if the index changed, otherwise EFalse


NextOrFirstSlotIndexL()

virtual TBool NextOrFirstSlotIndexL(const RArray< TInt > &aSlotsToSwap)=0;

Description

Increase indexes by one or set to zero (0) if beyond data end.

Parameters

const RArray< TInt > &aSlotsToSwap

A set of slots that will have their indexes increased.

Return value

TBool

ETrue if the index changed, otherwise EFalse


PreviousOrLastSlotIndexL()

virtual TBool PreviousOrLastSlotIndexL(const RArray< TInt > &aSlotsToSwap)=0;

Description

Decrease indexes by one or set to last index if below zero (0).

Parameters

const RArray< TInt > &aSlotsToSwap

A set of slots that will have their indexes decreased.

Return value

TBool

ETrue if the index changed, otherwise EFalse


ItemId()

virtual TInt ItemId() const=0;

Description

Returns the id of an item.

Return value

TInt

The item id.


SetItemId()

virtual void SetItemId(TInt aItemId)=0;

Description

Sets the id of an item, the application is responsible for making the item id:s unique.

Parameters

TInt aItemId

The item id.


SetEmphasis()

virtual void SetEmphasis(TBool aEmphasis)=0;

Description

Turns emphasis on and off.

Parameters

TBool aEmphasis


SetDisabled()

virtual void SetDisabled(TBool aDisabled)=0;

Description

Enables/disables the data item.

Parameters

TBool aDisabled


SetDimmed()

virtual void SetDimmed(TBool aDimmed)=0;

Description

Dims or undims the data item.

Parameters

TBool aDimmed


IsSeparator()

virtual TBool IsSeparator() const=0;

Description

Return value

TBool

ETrue if this data is a separator.


IsEmphasized()

virtual TBool IsEmphasized() const=0;

Description

Return value

TBool

ETrue if this data is emphasized.


IsDisabled()

virtual TBool IsDisabled() const=0;

Description

Return value

TBool

ETrue if this data is disabled.


IsDimmed()

virtual TBool IsDimmed() const=0;

Description

Return value

TBool

ETrue if this data is dimmed.


IsUnselectable()

virtual TBool IsUnselectable() const=0;

Description

Return value

TBool

ETrue if this data is unselectable.


Icon()

virtual CQikContent *Icon(TInt aSlotId) const=0;

Description

Access to the default index (currently set).

Parameters

TInt aSlotId

The slot requested.

Return value

CQikContent *

An icon.


ThumbnailImage()

virtual TPtrC ThumbnailImage(TInt aSlotId) const=0;

Description

Access to the default index (currently set).

Parameters

TInt aSlotId

The slot requested.

Return value

TPtrC

A filename.


Text()

virtual TPtrC Text(TInt aSlotId) const=0;

Description

Access to the default index (currently set).

Parameters

TInt aSlotId

The slot requested.

Return value

TPtrC

A text.


SetIconL()

virtual void SetIconL(CQikContent *aIcon, TInt aSlotId)=0;

Description

Sets (replaces) the icon at the default index.

Parameters

CQikContent *aIcon

The icon that will replace the existing icon.Ownership of the CQikContent object is taken, but note that the bitmap and mask of CQikContent can still be owned externally.

TInt aSlotId

The slot id of the icon.


SetTextL()

virtual void SetTextL(HBufC *aText, TInt aSlotId)=0;

Description

Sets (replaces) the text at the default index. Takes ownership of the text sent in.

Parameters

HBufC *aText

The text that will replace the existing text.

TInt aSlotId

The slot id of the text.


SetTextL()

virtual void SetTextL(const TDesC &aText, TInt aSlotId)=0;

Description

Sets (replaces) the text at the default index.

Parameters

const TDesC &aText

The text that will replace the existing text.

TInt aSlotId

The slot id of the text.


SetThumbnailImageL()

virtual void SetThumbnailImageL(const TDesC &aFileName, TInt aSlotId)=0;

Description

Sets (replaces) the thumbnail at the default index.

Parameters

const TDesC &aFileName

The new filename.

TInt aSlotId

The slot to set filename in.


DeleteText()

virtual TInt DeleteText(TInt aSlotId)=0;

Description

Deletes/removes the text at the default index in the specified slot.

Parameters

TInt aSlotId

The slot id to delete the text from.

Return value

TInt

KErrNone if the text was deleted. KErrNotFound if there was no text to delete in the specified slot.


DeleteText()

virtual TInt DeleteText(TInt aSlotId, TInt aIndex)=0;

Description

Deletes/removes the text at the given index in the specified slot.

Parameters

TInt aSlotId

The slot id to remove the text from.

TInt aIndex

The index of the text to delete within the specified slot.

Return value

TInt

KErrNone if the text was deleted. KErrNotFound if there was no text to delete in the specified slot.


DeleteIcon()

virtual TInt DeleteIcon(TInt aSlotId)=0;

Description

Deletes/removes the icon at the default index in the specified slot.

Parameters

TInt aSlotId

The slot id to delete the icon from.

Return value

TInt

KErrNone if the icon was deleted. KErrNotFound if there was no icon to delete in the specified slot.


DeleteIcon()

virtual TInt DeleteIcon(TInt aSlotId, TInt aIndex)=0;

Description

Deletes/removes the icon at the given index in the specified slot.

Parameters

TInt aSlotId

The slot id to delete the icon from.

TInt aIndex

The index of the icon to delete within the specified slot.

Return value

TInt

KErrNone if the icon was deleted. KErrNotFound if there was no icon to delete in the specified slot.


DeleteThumbnailImage()

virtual TInt DeleteThumbnailImage(TInt aSlotId)=0;

Description

Deletes/removes the ThumbnailImage at the default index in the specified slot.

Parameters

TInt aSlotId

The slot id to delete the ThumbnailImage from.

Return value

TInt

KErrNone if the ThumbnailImage was deleted. KErrNotFound if there was no ThumbnailImage to delete in the specified slot.


DeleteThumbnailImage()

virtual TInt DeleteThumbnailImage(TInt aSlotId, TInt aIndex)=0;

Description

Deletes/removes the ThumbnailImage at the given index in the specified slot.

Parameters

TInt aSlotId

The slot id to delete the ThumbnailImage from.

TInt aIndex

The index of the ThumbnailImage to delete within the specified slot.

Return value

TInt

KErrNone if the ThumbnailImage was deleted. KErrNotFound if there was no ThumbnailImage to delete in the specified slot.

[Top]


Member enumerations


Enum TListBoxDataSlotIndex

TListBoxDataSlotIndex

Description

Default values for index and slots.

ECurrentIndex

EDefaultSlot

Use as slot id when adding text to a data created with flag MQikListBoxModel::EDataSeparator .

Terms and conditions of use of the material