Alf::IAlfAttributeOwner Class Reference
class Alf::IAlfAttributeOwner : public Alf::IAlfInterfaceBase |
An interface for querying and setting attributes. The interface defines a generic functionality for setting any attributes of the implementing class. It can be used also to query the available set of attributes.
The interface should by implemented by all widget classes. It can be also used by element classes. Widget attributes have often corresponding data fields in the model. In this case, setting new values should also update the model. If an attribute is related to the presentation of the widget, the presentation is updated when a new value is set for the attribute.
alfwidgetmodel.lib
- Since
- S60 ?S60_version Draft
Constructor & Destructor Documentation
~IAlfAttributeOwner()
~IAlfAttributeOwner | ( | ) | [inline, virtual] |
Member Functions Documentation
attributeCount()
int | attributeCount | ( | ) | const [pure virtual] |
Get the number of available attributes.
getAttribute(const UString &)
Gets the attribute with the given name. The returned attribute instance is owned by the widget and should not be deleted. Also the returned attribute instance should not be modified. Use SetAttribute for that.
Parameters
const UString & aAttribName | The name of the attribute. |
getAttribute(const UString &, const UString &)
Gets the attribute with the given name from specific target. The returned attribute instance is owned by the widget and should not be deleted. Also the returned attribute instance should not be modified. Use SetAttribute for that.
Parameters
const UString & aTargetId | The name of the target widget part, e.g. element class |
const UString & aAttribName | The name of the attribute. |
setAttribute(const AlfAttribute &)
bool | setAttribute | ( | const AlfAttribute & | aAttribute | ) | [pure virtual] |
Set a value of an attribute.
If no value is present in passed attribute parameter, an AlfAttributeException-exception is thrown with EInvalidAttribute error code.
Parameters
const AlfAttribute & aAttribute | Reference attribute, the data is copied from it. The ownership is not transferred. |
setAttribute(const UString &, AlfAttributeValueType *)
Set a value of an attribute. This SetAttribute variant is for simple non animated attributes that only have name and value.
If no value is present in passed attributevalue parameter, an AlfAttributeException-exception is thrown with EInvalidAttribute error code.
setAttribute(const UString &, AlfAttribute &)
Sets a value of an attribute to a specific target. The target is identified by using aTargetId parameter.
If no value is present in passed attribute parameter, an AlfAttributeException-exception is thrown with EInvalidAttribute error code.
Parameters
const UString & aTargetId | Name of the target widget part, e.g element class tag. |
AlfAttribute & aAttribute | Reference attribute, the data is copied from it. The ownership is not transferred. |
setAttribute(const UString &, const UString &, AlfAttributeValueType *)
Sets a value of an static attribute. This SetAttribute variant is for simple non animated attributes that only have name and value.
If no value is present in passed attributevalue parameter, an AlfAttributeException-exception is thrown with EInvalidAttribute error code.
Parameters
const UString & aTargetId | The name of the target widget part, e.g. element class |
const UString & aAttribName | Name of the attribute. |
AlfAttributeValueType * aValue | Value of the attribute. Ownership is transferred |
setAttributeContainer(AlfAttributeContainer &)
Sets values of each attribute in given container
If no value is present in an attribute in the container, an AlfAttributeException-exception is thrown with EInvalidAttribute error code.
Parameters
AlfAttributeContainer & aAttributeContainer | Reference attributeContainer, All attributes in the container are handled. The ownership is not transferred. |
setAttributeContainer(const UString &, AlfAttributeContainer &)
Sets values of each attribute in given container to a specific target. The target is identified by using aTargetId parameter.
If no value is present in an attribute in the container, an AlfAttributeException-exception is thrown with EInvalidAttribute error code.
Parameters
const UString & aTargetId | Name of the target widget part, e.g element class tag. |
AlfAttributeContainer & aAttributeContainer | Reference attributeContainer, All attributes in the container are handled. The ownership is not transferred. |
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.