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.
Public Member Functions | |
---|---|
~IAlfAttributeOwner () | |
int | attributeCount () |
const AlfAttribute * | getAttribute (const UString &) |
const AlfAttribute * | getAttribute (const UString &, const UString &) |
bool | setAttribute (const AlfAttribute &) |
bool | setAttribute (const UString &, AlfAttributeValueType *) |
bool | setAttribute (const UString &, AlfAttribute &) |
bool | setAttribute (const UString &, const UString &, AlfAttributeValueType *) |
bool | setAttributeContainer ( AlfAttributeContainer &) |
bool | setAttributeContainer (const UString &, AlfAttributeContainer &) |
const IfId & | type () |
Inherited Functions | |
---|---|
Alf::IAlfInterfaceBase::makeInterface(IAlfInterfaceBase *) | |
Alf::IAlfInterfaceBase::makeInterface(const IfId &) | |
Alf::IAlfInterfaceBase::~IAlfInterfaceBase() |
int | attributeCount | ( | ) | const [pure virtual] |
Get the number of available attributes.
const AlfAttribute * | getAttribute | ( | const UString & | aAttribName | ) | const [pure virtual] |
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.
const UString & aAttribName | The name of the attribute. |
const AlfAttribute * | getAttribute | ( | const UString & | aTargetId, |
const UString & | aAttribName | |||
) | const [pure virtual] |
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.
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.
const AlfAttribute & aAttribute | Reference attribute, the data is copied from it. The ownership is not transferred. |
bool | setAttribute | ( | const UString & | aAttribName, |
AlfAttributeValueType * | aValue | |||
) | [pure virtual] |
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.
const UString & aAttribName | Name of the attribute. |
AlfAttributeValueType * aValue | Value of the attribute. Ownership is transferred |
bool | setAttribute | ( | const UString & | aTargetId, |
AlfAttribute & | aAttribute | |||
) | [pure virtual] |
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.
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. |
bool | setAttribute | ( | const UString & | aTargetId, |
const UString & | aAttribName, | |||
AlfAttributeValueType * | aValue | |||
) | [pure virtual] |
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.
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 |
bool | setAttributeContainer | ( | AlfAttributeContainer & | aAttributeContainer | ) | [pure virtual] |
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.
AlfAttributeContainer & aAttributeContainer | Reference attributeContainer, All attributes in the container are handled. The ownership is not transferred. |
bool | setAttributeContainer | ( | const UString & | aTargetId, |
AlfAttributeContainer & | aAttributeContainer | |||
) | [pure virtual] |
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.
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. |
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.