»
UIQ 3 SDK »
UIQ Developer Library »
UIQ API Reference »
UIQ C++ Component reference »
Qikon »
MQikListBoxData
Location:
MQikListBoxData.h
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
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.
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.
virtual void ClearHosts()=0;
Description
Is called when an item is destroyed, etc, to reset any host pointers in any CQikContents.
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
virtual TInt LayoutId() const=0;
Description
Get layout id for this data entry.
Return value
virtual void SetLayoutId(TInt aId)=0;
Description
Set layout id for this data entry, -1 indicates default layout.
Parameters
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
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
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. |
|
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 |
|
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 |
|
virtual TInt ItemId() const=0;
Description
Returns the id of an item.
Return value
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. |
|
virtual void SetEmphasis(TBool aEmphasis)=0;
Description
Turns emphasis on and off.
Parameters
virtual void SetDisabled(TBool aDisabled)=0;
Description
Enables/disables the data item.
Parameters
virtual void SetDimmed(TBool aDimmed)=0;
Description
Dims or undims the data item.
Parameters
virtual TBool IsSeparator() const=0;
Description
Return value
TBool
|
ETrue if this data is a separator. |
|
virtual TBool IsEmphasized() const=0;
Description
Return value
TBool
|
ETrue if this data is emphasized. |
|
virtual TBool IsDisabled() const=0;
Description
Return value
TBool
|
ETrue if this data is disabled. |
|
virtual TBool IsDimmed() const=0;
Description
Return value
TBool
|
ETrue if this data is dimmed. |
|
virtual TBool IsUnselectable() const=0;
Description
Return value
TBool
|
ETrue if this data is unselectable. |
|
virtual CQikContent *Icon(TInt aSlotId) const=0;
Description
Access to the default index (currently set).
Parameters
TInt aSlotId |
The slot requested. |
|
Return value
virtual TPtrC ThumbnailImage(TInt aSlotId) const=0;
Description
Access to the default index (currently set).
Parameters
TInt aSlotId |
The slot requested. |
|
Return value
virtual TPtrC Text(TInt aSlotId) const=0;
Description
Access to the default index (currently set).
Parameters
TInt aSlotId |
The slot requested. |
|
Return value
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
Enum TListBoxDataSlotIndex
TListBoxDataSlotIndex
Description
Default values for index and slots.
Terms and conditions of use of the material