Alf::AlfAttribute Class Reference
Class for holding attributes.
AlfAttribute
is a receptacle for holding data that can be applied to visuals/visual templates via the attribute setters. They can also be used hold data for properties of widgets or widget parts implement the
IAlfAttributeOwner
interface. An attribute can have one or more attribute value types. Attributes can be bunched together in attribute containers.
IAlfAttributeSetter
IAlfAttributeOwner
AlfAttributeValueType
AlfAtributeContainer alfwidgetmodel.lib
-
Since
-
S60 ?S60_version Draft
Public Member Functions
|
|
AlfAttribute
()
|
|
AlfAttribute
(const char *,
attributecategory
)
|
|
AlfAttribute
(const char *, int,
TAlfUnit
,
attributecategory
)
|
|
AlfAttribute
(const char *, float,
TAlfUnit
,
attributecategory
)
|
|
AlfAttribute
(const char *, const
UString
&,
attributecategory
)
|
|
~AlfAttribute
()
|
OSN_IMPORT void
|
addSourceValue
(
AlfAttributeValueType
*)
|
OSN_IMPORT void
|
addTargetValue
(
AlfAttributeValueType
*)
|
OSN_IMPORT
attributecategory
|
category
()
|
OSN_IMPORT
AlfAttribute
*
|
clone
()
|
OSN_IMPORT const char *
|
getDataField
()
|
OSN_IMPORT int
|
getDelay
()
|
OSN_IMPORT
TAlfInterpolationStyle
|
getInterpolationStyle
()
|
OSN_IMPORT int
|
getMappingFunctionId
()
|
OSN_IMPORT
AlfAttributeValueType
*
|
getSourceValue
(unsigned int)
|
OSN_IMPORT unsigned int
|
getSourceValueCount
()
|
OSN_IMPORT
AlfAttributeValueType
*
|
getTargetValue
(unsigned int)
|
OSN_IMPORT unsigned int
|
getTargetValueCount
()
|
OSN_IMPORT int
|
getTime
()
|
OSN_IMPORT int
|
intValue
(unsigned int)
|
OSN_IMPORT bool
|
isDirty
()
|
OSN_IMPORT bool
|
isValueSet
()
|
OSN_IMPORT const char *
|
name
()
|
OSN_IMPORT
AlfAttribute
&
|
operator=
(const
AlfAttribute
&)
|
OSN_IMPORT float
|
realValue
(unsigned int)
|
OSN_IMPORT void
|
removeSourceValue
(unsigned int)
|
OSN_IMPORT void
|
removeTargetValue
(unsigned int)
|
OSN_IMPORT void
|
setDataField
(const char *)
|
OSN_IMPORT void
|
setDelay
(int)
|
OSN_IMPORT void
|
setDirty
(bool)
|
OSN_IMPORT void
|
setInterpolationStyle
(
TAlfInterpolationStyle
)
|
OSN_IMPORT void
|
setMappingFunctionId
(int)
|
OSN_IMPORT void
|
setSourceValue
(
AlfAttributeValueType
*, unsigned int)
|
OSN_IMPORT void
|
setTargetValue
(
AlfAttributeValueType
*, unsigned int)
|
OSN_IMPORT void
|
setTime
(int)
|
OSN_IMPORT const
UString
&
|
stringValue
(unsigned int)
|
OSN_IMPORT
AlfAttributeValueType::Type
|
type
(unsigned int)
|
OSN_IMPORT
TAlfUnit
|
unit
(unsigned int)
|
Private Attributes
|
auto_ptr< AlfAttributeImpl >
|
mData
|
Constructor & Destructor Documentation
AlfAttribute()
OSN_IMPORT
|
AlfAttribute
|
(
|
)
|
|
Constructor.
-
Exceptions
-
-
Since
-
S60 ?S60_version
AlfAttribute(const char *, attributecategory)
Constructor.
-
Exceptions
-
-
Since
-
S60 ?S60_version
Parameters
const char * aName
|
Attribute name. Makes a copy of the name.
|
attributecategory
aCategory
|
Attribute category.
|
AlfAttribute(const char *, int, TAlfUnit, attributecategory)
OSN_IMPORT
|
AlfAttribute
|
(
|
const char *
|
aName,
|
|
int
|
aTargetValue,
|
|
TAlfUnit
|
aUnit = EAlfUnitPixel,
|
|
attributecategory
|
aCategory = EStatic
|
|
)
|
|
Constructor.
-
Exceptions
-
-
Since
-
S60 ?S60_version
Parameters
const char * aName
|
Attribute name. Makes a copy of the name.
|
int aTargetValue
|
The target value of the child attribute.
|
TAlfUnit
aUnit = EAlfUnitPixel
|
Unit of the value.
|
attributecategory
aCategory = EStatic
|
Attribute category.
|
AlfAttribute(const char *, float, TAlfUnit, attributecategory)
OSN_IMPORT
|
AlfAttribute
|
(
|
const char *
|
aName,
|
|
float
|
aTargetValue,
|
|
TAlfUnit
|
aUnit = EAlfUnitNormalized,
|
|
attributecategory
|
aCategory = EStatic
|
|
)
|
|
Constructor.
-
Exceptions
-
-
Since
-
S60 ?S60_version
Parameters
const char * aName
|
Attribute name. Makes a copy of the name.
|
float aTargetValue
|
The target value of the child attribute.
|
TAlfUnit
aUnit = EAlfUnitNormalized
|
Unit of the value.
|
attributecategory
aCategory = EStatic
|
Attribute category.
|
AlfAttribute(const char *, const UString &, attributecategory)
Constructor.
-
Exceptions
-
-
Since
-
S60 ?S60_version
Parameters
const char * aName
|
Attribute name. Makes a copy of the name.
|
const
UString
& aTargetValue
|
The target value of the child attribute. Makes a copy of the value.
|
attributecategory
aCategory = EStatic
|
Attribute category.
|
AlfAttribute(const AlfAttribute &)
Declaring private copy construction to prevent usage.
~AlfAttribute()
OSN_IMPORT
|
~AlfAttribute
|
(
|
)
|
[virtual]
|
Member Functions Documentation
addSourceValue(AlfAttributeValueType *)
Adds a new source value to the attribute.
addTargetValue(AlfAttributeValueType *)
Adds a new target value to the attribute.
category()
Gets the category of the attribute.
clone()
Clones the attribute.
-
Exceptions
-
-
Since
-
S60 ?S60_version
cloneValueType(AlfAttributeValueType *)
Helper function for cloning value type.
-
Exceptions
-
-
Since
-
S60 ?S60_version
getDataField()
OSN_IMPORT const char *
|
getDataField
|
(
|
)
|
const
|
Gets the datafield for the attribute.
getDelay()
OSN_IMPORT int
|
getDelay
|
(
|
)
|
const
|
Gets the delay before the transition.
getInterpolationStyle()
OSN_IMPORT
TAlfInterpolationStyle
|
getInterpolationStyle
|
(
|
)
|
const
|
Gets the interpolation style of the attribute.
getMappingFunctionId()
OSN_IMPORT int
|
getMappingFunctionId
|
(
|
)
|
const
|
Gets the mapping function id for the attribute.
getSourceValue(unsigned int)
Gets the source value of the attribute.
Parameters
unsigned int aIndex = 0
|
The index of the attribute value.
|
getSourceValueCount()
OSN_IMPORT unsigned int
|
getSourceValueCount
|
(
|
)
|
const
|
Gets source value count.
-
Exceptions
-
osncore::AlfAttributeException
|
Thrown with error code osncore::EInvalidAttribute if aIndex is invalid.
|
-
Since
-
S60 ?S60_version
getTargetValue(unsigned int)
Gets the target value of the attribute.
Parameters
unsigned int aIndex = 0
|
The index of the attribute value.
|
getTargetValueCount()
OSN_IMPORT unsigned int
|
getTargetValueCount
|
(
|
)
|
const
|
Gets target value count.
-
Exceptions
-
osncore::AlfAttributeException
|
Thrown with error code osncore::EInvalidAttribute if aIndex is invalid.
|
-
Since
-
S60 ?S60_version
getTime()
OSN_IMPORT int
|
getTime
|
(
|
)
|
const
|
Gets the transition time for the attribute.
intValue(unsigned int)
OSN_IMPORT int
|
intValue
|
(
|
unsigned int
|
aIndex = 0
|
)
|
const
|
Gets the int target value. Use this method only if the attribute type is EInt.
-
Exceptions
-
osncore::AlfAttributeException
|
Thrown with error code osncore::EInvalidAttribute if aIndex is invalid.
|
-
Since
-
S60 ?S60_version
Parameters
unsigned int aIndex = 0
|
The index of the attribute value.
|
isDirty()
OSN_IMPORT bool
|
isDirty
|
(
|
)
|
const
|
Gets the dirty information
isValueSet()
OSN_IMPORT bool
|
isValueSet
|
(
|
)
|
const
|
Returns true if the attribute value is set.
name()
OSN_IMPORT const char *
|
name
|
(
|
)
|
const
|
Gets the name of the attribute.
operator=(const AlfAttribute &)
Assignment operation. Assigns all the member variables to the values in the reference attribute.
-
Exceptions
-
-
Since
-
S60 ?S60_version
realValue(unsigned int)
OSN_IMPORT float
|
realValue
|
(
|
unsigned int
|
aIndex = 0
|
)
|
const
|
Gets the real target value. Use this method only if the attribute type is EFloat.
-
Exceptions
-
osncore::AlfAttributeException
|
Thrown with error code osncore::EInvalidAttribute if aIndex is invalid.
|
-
Since
-
S60 ?S60_version
Parameters
unsigned int aIndex = 0
|
The index of the attribute value.
|
removeSourceValue(unsigned int)
OSN_IMPORT void
|
removeSourceValue
|
(
|
unsigned int
|
aIndex = 0
|
)
|
|
Removes the source value of the attribute.
-
Exceptions
-
osncore::AlfAttributeException
|
Thrown with error code osncore::EInvalidAttribute if aIndex is invalid.
|
-
Since
-
S60 ?S60_version
Parameters
unsigned int aIndex = 0
|
The index of the attribute value.
|
removeTargetValue(unsigned int)
OSN_IMPORT void
|
removeTargetValue
|
(
|
unsigned int
|
aIndex = 0
|
)
|
|
Removes the target value of the attribute.
-
Exceptions
-
osncore::AlfAttributeException
|
Thrown with error code osncore::EInvalidAttribute if aIndex is invalid.
|
-
Since
-
S60 ?S60_version
Parameters
unsigned int aIndex = 0
|
The index of the attribute value.
|
reset(const char *, AlfAttributeValueType *, attributecategory)
setDataField(const char *)
OSN_IMPORT void
|
setDataField
|
(
|
const char *
|
aDataField
|
)
|
|
Sets the datafield for the attribute.
Parameters
const char * aDataField
|
The datafield for the attribute.
|
setDelay(int)
OSN_IMPORT void
|
setDelay
|
(
|
int
|
aDelay
|
)
|
|
Sets the delay before the transition.
Parameters
int aDelay
|
The delay before the transition.
|
setDirty(bool)
OSN_IMPORT void
|
setDirty
|
(
|
bool
|
aFlag
|
)
|
|
Sets the dirty information
setInterpolationStyle(TAlfInterpolationStyle)
OSN_IMPORT void
|
setInterpolationStyle
|
(
|
TAlfInterpolationStyle
|
aInterpolationStyle
|
)
|
|
Sets the interpolation style of the attribute.
Parameters
TAlfInterpolationStyle
aInterpolationStyle
|
The interpolation style.
|
setMappingFunctionId(int)
OSN_IMPORT void
|
setMappingFunctionId
|
(
|
int
|
aId
|
)
|
|
Sets the mapping function id for the attribute.
Parameters
int aId
|
The mapping function id for the attribute.
|
setSourceValue(AlfAttributeValueType *, unsigned int)
Sets the source value of the attribute.
Parameters
AlfAttributeValueType
* aValue
|
The source value of the attribute.
|
unsigned int aIndex = 0
|
The index of the attribute value.
|
setTargetValue(AlfAttributeValueType *, unsigned int)
Sets the target value of the attribute.
Parameters
AlfAttributeValueType
* aValue
|
The target value of the attribute.
|
unsigned int aIndex = 0
|
The index of the attribute value.
|
setTime(int)
OSN_IMPORT void
|
setTime
|
(
|
int
|
aTime
|
)
|
|
Sets the transition time for the attribute.
Parameters
int aTime
|
The transition time for the attribute.
|
stringValue(unsigned int)
OSN_IMPORT const
UString
&
|
stringValue
|
(
|
unsigned int
|
aIndex = 0
|
)
|
const
|
Gets the string target value. Use this method only if the attribute type is EString.
-
Exceptions
-
osncore::AlfAttributeException
|
Thrown with error code osncore::EInvalidAttribute if aIndex is invalid.
|
-
Since
-
S60 ?S60_version
Parameters
unsigned int aIndex = 0
|
The index of the attribute value.
|
type(unsigned int)
Gets the type of the attribute.
-
Exceptions
-
osncore::AlfAttributeException
|
Thrown with error code osncore::EInvalidAttribute if aIndex is invalid.
|
-
Since
-
S60 ?S60_version
unit(unsigned int)
OSN_IMPORT
TAlfUnit
|
unit
|
(
|
unsigned int
|
aIndex = 0
|
)
|
const [virtual]
|
Gets the unit of the value.
-
Exceptions
-
osncore::AlfAttributeException
|
Thrown with error code osncore::EInvalidAttribute if aIndex is invalid.
|
-
Since
-
S60 ?S60_version
Parameters
unsigned int aIndex = 0
|
The index of the attribute value.
|
Member Enumerations Documentation
Enum attributecategory
Enumerators
EStatic
|
|
EDynamic
|
|
EStaticData
|
|
EDynamicData
|
|
Member Data Documentation
auto_ptr< AlfAttributeImpl > mData
auto_ptr< AlfAttributeImpl >
|
mData
|
[private]
|
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.