Alf::IMulModel Class Reference
class Alf::IMulModel : public Alf::IMulModelBase
|
Client that creates the model own the model. Client can use this interface to update data model.
Public Member Functions
|
|
~IMulModel
()
|
int
|
Count
(const
MulDataPath
&)
|
const
MulVisualItem
*
|
Data
(int, const
MulDataPath
&)
|
int
|
DataWindow
()
|
int
|
Highlight
()
|
int
|
Highlight
(
MulDataPath
&)
|
void
|
Insert
(int, int, const
MulDataPath
&)
|
const std::vector< int > &
|
MarkedIndices
(const
MulDataPath
&)
|
void
|
Refresh
(int, const
MulDataPath
&)
|
void
|
Remove
(int, int, const
MulDataPath
&)
|
void
|
SetData
(int, std::auto_ptr<
MulVisualItem
>, const
MulDataPath
&)
|
void
|
SetDataProvider
(const
IMulModelProvider
&)
|
void
|
SetDataWindow
(int)
|
void
|
SetHighlight
(int, const
MulDataPath
&)
|
void
|
SetMarkedIndices
(
MulWidgetDef::TMulWidgetMarkingType
, const std::vector< int > &, const
MulDataPath
&)
|
void
|
SetMarkedIndices
(
MulWidgetDef::TMulWidgetMarkingType
)
|
void
|
SetTemplate
(
mulwidget::TLogicalTemplate
)
|
void
|
SetTemplate
(int,
mulwidget::TLogicalTemplate
, const
MulDataPath
&)
|
void
|
Update
(int, int, const
MulDataPath
&)
|
const
IfId
&
|
type
()
|
Constructor & Destructor Documentation
~IMulModel()
~IMulModel
|
(
|
)
|
[inline, virtual]
|
Member Functions Documentation
Count(const MulDataPath &)
Get the count of items in the model.
Parameters
const
MulDataPath
& aPath =
MulDataPath
()
|
Path of parent item in the data hierarchy. Default is Null path i.e. no parent.
|
Data(int, const MulDataPath &)
Get the data for item at the specified index.
-
Exceptions
-
Invalid
|
Argument, in case index is out of bound.
|
Parameters
int aIndex
|
Position of item in the data model.
|
const
MulDataPath
& aPath =
MulDataPath
()
|
Path of parent item in the data hierarchy. Default is Null path i.e. no parent.
|
DataWindow()
int
|
DataWindow
|
(
|
)
|
const [pure virtual]
|
Get the buffer size defined for the data model.
Highlight()
int
|
Highlight
|
(
|
)
|
[pure virtual]
|
Get the index of the current highlighted item from the model.
Examples:
Get index of the highlighted item.
int highlight = mListWidget->Highlight();
Highlight(MulDataPath &)
Get the index of the current highlighted item along with the path of the root item in the data hierarchy.
Examples:
Get index of the highlighted item.
int highlight = mListWidget->Highlight();
Parameters
MulDataPath
& aPath
|
Path of parent item in the data hierarchy. Out parameter.
|
Insert(int, int, const MulDataPath &)
Informs the data model that new items have been added to client's internal model. Data model is expected to sync its indices as a result.
Note:
This API will never give an exception.
Parameters
int aIndex
|
Position where items were inserted.
|
int aCount
|
Number of items inserted.
|
const
MulDataPath
& aPath =
MulDataPath
()
|
Path of parent item in the data hierarchy. Default is Null path i.e. no parent.
|
MarkedIndices(const MulDataPath &)
Gets the indices of the currently marked items.
Examples:
Get the array of all marked items
std::vector<int> markedItems = mListWidget->MarkIndices();
Refresh(int, const MulDataPath &)
A refresh data request. Informs that the data model has to be repopulated with mentioned number of items. So the data model will remove all the existing data and issue request to the provider for new data.
Note:
This API will never give an exception.
Parameters
int aCount
|
Number of items to be repopulated.
|
const
MulDataPath
& aPath =
MulDataPath
()
|
Path of parent item in the data hierarchy. Default is Null path i.e. no parent.
|
Remove(int, int, const MulDataPath &)
Informs the data model that items have been removed from the client's. internal data model. Data model is expected to sync its indices as a result.
Note:
This API will never give an exception.
Parameters
int aIndex
|
Position from where items have to be removed.
|
int aCount
|
Number of items to be removed.\
|
const
MulDataPath
& aPath =
MulDataPath
()
|
Path of parent item in the data hierarchy. Default is Null path i.e. no parent.
|
SetData(int, std::auto_ptr< MulVisualItem >, const MulDataPath &)
Provide data for the specified item. This is a unified API for adding & updating data.
-
Exceptions
-
Invalid
|
Argument, in case index is out of bound or visual item is NULL.
|
Logic
|
Error, in case item could not be updated.
|
Parameters
int aIndex
|
Position of item to be updated.
|
std::auto_ptr<
MulVisualItem
> aVisualItem
|
Collection of attributes. Ownership is transfered.
|
const
MulDataPath
& aPath =
MulDataPath
()
|
Path of parent item in the data hierarchy. Default is Null path i.e. no parent.
|
SetDataProvider(const IMulModelProvider &)
Set the data provider for the model.
Note:
This API will be removed in future. Clients would be able to specify the provider to the model at the time of the construction.
-
Exceptions
-
Logic
|
Error, in case same accessor object is passed again.
|
SetDataWindow(int)
void
|
SetDataWindow
|
(
|
int
|
aSize
|
)
|
[pure virtual]
|
Set the data window/cache size of the Data model. This API can be used to over-ride the data window size of the data model already set by the widget. This can be used by clients to set the buffer size different from what the widget has specified.
-
Exceptions
-
Invalid
|
Argument, incase the buffer size is negative.
|
Parameters
int aSize
|
Size of buffer.
|
SetHighlight(int, const MulDataPath &)
Set highlighted item in the model.
Examples:
Set index of the item to be highlighted.
mListWidget->SetHighlight(highlight);
Parameters
int aItemIndex
|
Index of item.
|
const
MulDataPath
& aPath =
MulDataPath
()
|
Path of parent item in the data hierarchy. Default is Null path i.e. no parent.
|
SetMarkedIndices(MulWidgetDef::TMulWidgetMarkingType, const std::vector< int > &, const MulDataPath &)
Function for setting the item(s) Marked or Unmarked. For mark and unmark operations, indices of items should be provided.
-
Exceptions
-
Invalid
|
Argument, if type is specified as mark-all and unmark-all.
|
Examples:
Mark the selected item
mListWidget->SetMarkedIndices( MulWidgetDef::EMulMark, itemIndex );
SetMarkedIndices(MulWidgetDef::TMulWidgetMarkingType)
Function for setting the item(s) Marked or Unmarked. For mark all and unmark all operations use this overloaded version.
-
Exceptions
-
Invalid
|
Argument, if type is specified as mark and unmark.
|
Examples:
Mark all items
mListWidget->SetSelection( MulWidgetDef::EMulMarkAll );
SetTemplate(mulwidget::TLogicalTemplate)
void
|
SetTemplate
|
(
|
mulwidget::TLogicalTemplate
|
aDefaultTemplate
|
)
|
[pure virtual]
|
Set the default logical template id for widget elements. Logical templates map to visualization of the element(s).
Parameters
mulwidget::TLogicalTemplate
aDefaultTemplate
|
|
SetTemplate(int, mulwidget::TLogicalTemplate, const MulDataPath &)
void
|
SetTemplate
|
(
|
int
|
aItemIndex,
|
|
mulwidget::TLogicalTemplate
|
aDefaultTemplate,
|
|
const
MulDataPath
&
|
aPath =
MulDataPath
()
|
|
)
|
[pure virtual]
|
Set the logical template id for a specific widget element. Logical templates map to visualization of the element.
-
Exceptions
-
Invalid
|
Argument, in case index is out of bound.
|
Parameters
int aItemIndex
|
Unique id of item of which template needs to be applied.
|
mulwidget::TLogicalTemplate
aDefaultTemplate
|
|
const
MulDataPath
& aPath =
MulDataPath
()
|
Path of parent item in the data hierarchy. Default is Null path i.e. no parent.
|
Update(int, int, const MulDataPath &)
Informs the data model that an item has been updated in the client's internal model. Data model will use to input to determine whether a visualization change is required. If yes, the model will request the provider for updated data.
Note:
This API will never give an exception.
Parameters
int aIndex
|
Position from where items have to be updated.
|
int aCount
|
Number of items to be updated.
|
const
MulDataPath
& aPath =
MulDataPath
()
|
Path of parent item in the data hierarchy. Default is Null path i.e. no parent.
|
type()
const
IfId
&
|
type
|
(
|
)
|
[static, inline]
|
Getter for the type identifier of this interface.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.