Home · API Reference · Modules
Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions
Maliit::AttributeExtension Class Reference

List of all members.

Public Types

typedef QMap< QString, QVariant > ExtendedAttributeMap

Public Slots

void setAttribute (const QString &key, const QVariant &value)

Signals

void extendedAttributeChanged (const QString &key, const QVariant &value)

Public Member Functions

 AttributeExtension (const QString &fileName=QString())
 AttributeExtension (int id, bool registerExtension=true)
virtual ~AttributeExtension ()
ExtendedAttributeMap attributes () const
QString fileName () const
int id () const
void updateAttribute (const QString &key, const QVariant &value)

Static Public Member Functions

static QSharedPointer
< AttributeExtension
create (int id)
static QString key (const QString &target, const QString &targetItem, const QString &attribute)

Detailed Description

Register extensions such as key overrides.


Member Typedef Documentation

typedef QMap<QString, QVariant> Maliit::AttributeExtension::ExtendedAttributeMap

Constructor & Destructor Documentation

Maliit::AttributeExtension::AttributeExtension ( const QString &  fileName = QString()) [explicit]

Registers an attribute extension (toolbar contents, keyboard overrides) which is defined in fileName, and will be assigned to a text input widget (software input panel).

Parameters:
\afileName is the file name of the attribute extension. The filename should be absolute. If the filename is relative, it will be looked up in the default directory provided by the framework.
Note:
if fileName is an empty string, then it means don't load any content, just get a new id.
Returns:
the registered unique identifier of this attribute extension.
Maliit::AttributeExtension::AttributeExtension ( int  id,
bool  registerExtension = true 
) [explicit]

Member Function Documentation

QSharedPointer< AttributeExtension > Maliit::AttributeExtension::create ( int  id) [static]
void Maliit::AttributeExtension::extendedAttributeChanged ( const QString &  key,
const QVariant &  value 
) [signal]

Informs application that input method server has changed the extended attribute.

Parameters:
keya string specifying the target for the attribute.
valuenew value.

Returns the attribute extension definition file name.

Returns:
the file name of the attribute extension, or empty QString.

Returns an unique identifier id for the attribute extension.

Returns:
the unique identifier id.
QString Maliit::AttributeExtension::key ( const QString &  target,
const QString &  targetItem,
const QString &  attribute 
) [static]

Return key corresponding to given parameters.

Parameters:
targetAttribute extension.
targetItemItem name.
attributeAttribute name.
See also:
setAttribute()
void Maliit::AttributeExtension::setAttribute ( const QString &  key,
const QVariant &  value 
) [slot]

Set the attribute of the targetItem in the input method registered attribute extension target to value.

Parameters:
keya string specifying the target for the attribute.
valuenew value.
Note:
Every key begins with a slash character ('/') and is of the form /target/item/attribute Target "keys" is used for virtual keyboard keys, "toolbar" for toolbar contents. Additional targets can be added in the future.
void Maliit::AttributeExtension::updateAttribute ( const QString &  key,
const QVariant &  value 
)

Update cached value of extended attribute corresponding to given key.


Copyright © 2011 Nokia Corporation
Maliit