Home · All Classes · Main Classes · Deprecated
Public Slots | Signals | Public Member Functions | Static Public Member Functions

MInputMethodState Class Reference

A mediator between MInputContext and applications/libmeegotouch that use it. More...

Inherits QObject.

List of all members.

Public Slots

void startActiveWindowOrientationAngleChange (M::OrientationAngle newOrientationAngle)
void setActiveWindowOrientationAngle (M::OrientationAngle newOrientationAngle)
void setInputMethodArea (const QRect &newRegion)
int registerToolbar (const QString &fileName)
void unregisterToolbar (int id)
void setToolbarItemAttribute (int id, const QString &item, const QString &attribute, const QVariant &value)
QString toolbar (int id) const
int registerAttributeExtension (const QString &fileName=QString())
void unregisterAttributeExtension (int id)
void setExtendedAttribute (int id, const QString &target, const QString &targetItem, const QString &attribute, const QVariant &value)
QString attributeExtensionFile (int id) const

Signals

void inputMethodAreaChanged (const QRect &region)
void activeWindowOrientationAngleAboutToChange (M::OrientationAngle orientationAngle)
void activeWindowOrientationAngleChanged (M::OrientationAngle orientationAngle)
void toolbarRegistered (int id, const QString &fileName)
void toolbarUnregistered (int id)
void toolbarItemAttributeChanged (int id, const QString &item, const QString &attribute, const QVariant &value)
void keyPress (const QKeyEvent &)
void keyRelease (const QKeyEvent &)
void attributeExtensionRegistered (int id, const QString &fileName)
void attributeExtensionUnregistered (int id)
void extendedAttributeChanged (int id, const QString &target, const QString &targetItem, const QString &attribute, const QVariant &value)

Public Member Functions

QRect inputMethodArea () const
M::OrientationAngle activeWindowOrientationAngle () const

Static Public Member Functions

static MInputMethodStateinstance ()
static void requestSoftwareInputPanel ()
static void closeSoftwareInputPanel ()

Detailed Description

A mediator between MInputContext and applications/libmeegotouch that use it.

This class allows MInputContext (technically other input contexts too) to communicate input method area on display to the application and application to communicate its active window's orientation and custom attribute extension to the input context. The application can be a M application or a plain Qt application (which needs to link against libmeegotouch to get access to this class). The input method area can be used by the application to avoid obstructing the input method.


Member Function Documentation

M::OrientationAngle MInputMethodState::activeWindowOrientationAngle (  )  const

Get the orientation of application's active window.

Returns:
orientation of application's active window
void MInputMethodState::activeWindowOrientationAngleAboutToChange ( M::OrientationAngle  orientationAngle  )  [signal]

This signal is emitted before the orientation angle of the application's active window is changed.

Parameters:
orientationAngle New orientation angle which is about to change.
Note:
It is emitted at the start of the rotation animation.
void MInputMethodState::activeWindowOrientationAngleChanged ( M::OrientationAngle  orientationAngle  )  [signal]

This signal is emitted when the orientation angle of application's active window is changed.

Parameters:
orientationAngle new orientation angle
Note:
It's emitted with every orientation angle change finished.
QString MInputMethodState::attributeExtensionFile ( int  id  )  const [slot]

Returns the attribute extension definition file name which is registered with the unique identifier .

Parameters:
id the unique identifier of a registered attribute extension.
Returns:
the file name of the attribute extension, or empty QString if id is invalid.
void MInputMethodState::attributeExtensionRegistered ( int  id,
const QString fileName 
) [signal]

Emitted when an input method attribute extension which is defined in fileName with an unique identifier id is registered.

void MInputMethodState::attributeExtensionUnregistered ( int  id  )  [signal]

Emitted when an input method attribute extension with an unique id is unregistered.

void MInputMethodState::closeSoftwareInputPanel (  )  [static]

Sends a request to the application's input context to close a software input panel.

See also:
requestSoftwareInputPanel
void MInputMethodState::extendedAttributeChanged ( int  id,
const QString target,
const QString targetItem,
const QString attribute,
const QVariant value 
) [signal]

Emitted when input method extended attribute is changed.

QRect MInputMethodState::inputMethodArea (  )  const

Get current input method area.

Returns:
current input method area
void MInputMethodState::inputMethodAreaChanged ( const QRect region  )  [signal]

Emitted when input method area is changed.

If applications want to react to this signal by changing their layout (e.g. to one that works better when a input method panel is around) they have to do their layout changes immediately upon invocation of this signal. Therefore queued connections (like Qt::QueuedConnection) should not be used for that purpose.

Parameters:
region new input method area
MInputMethodState * MInputMethodState::instance (  )  [static]

Get singleton instance.

Returns:
singleton instance
void MInputMethodState::keyPress ( const QKeyEvent  )  [signal]

Can be emitted by input method to notify about raw key press event it receives.

void MInputMethodState::keyRelease ( const QKeyEvent  )  [signal]

Can be emitted by input method to notify about raw key release event it receives.

int MInputMethodState::registerAttributeExtension ( const QString fileName = QString()  )  [slot]

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:
\a fileName is the absolute file name of an attribute extension, or the relative file under /usr/share/meegoimframework/imattributeextensions/.
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.
int MInputMethodState::registerToolbar ( const QString fileName  )  [slot]

Register an input method toolbar which is defined in fileName.

Deprecated:
do not use. Use registerAttributeExtension () instead.
Parameters:
\a fileName is the absolute file name of a custom toolbar, or the relative file under /usr/share/meegoimframework/imtoolbars/.
Returns:
the registered unique identifier of this toolbar.
void MInputMethodState::requestSoftwareInputPanel (  )  [static]

Sends a request to the application's input context to open a software input panel (e.g. the virtual keyboard). Warning: In order to gain more screen space, window decorations may be temporarily hidden while the input panel is up.

See also:
closeSoftwareInputPanel
void MInputMethodState::setActiveWindowOrientationAngle ( M::OrientationAngle  newOrientationAngle  )  [slot]

Set the orientation angle of application's active window to newOrientationAngle.

Note:
This method should be called when active window already finished the rotation animation.
void MInputMethodState::setExtendedAttribute ( int  id,
const QString target,
const QString targetItem,
const QString attribute,
const QVariant value 
) [slot]

Set the attribute of the targetItem in the input method registered attribute extension target which has the unique id to value.

Parameters:
id the unique identifier of a registered extended attribute.
target a string specifying the target for the attribute.
targetItem the item name.
attribute attribute to be changed.
value new value.
Note:
Every target name beings with a slash character ('/'). The target "/" is the root target, and shall contain attributes that affect the whole input methods framework. Target "/keys" is used for virtual keyboard keys, "/toolbar" for toolbar contents. Additional targets can be added in the future.
void MInputMethodState::setInputMethodArea ( const QRect newRegion  )  [slot]

Set input method area to newRegion.

void MInputMethodState::setToolbarItemAttribute ( int  id,
const QString item,
const QString attribute,
const QVariant value 
) [slot]

Set the attribute of the item in the input method toolbar which has the unique id to value.

Deprecated:
do not use. Use setExtendedAttribute() instead.
void MInputMethodState::startActiveWindowOrientationAngleChange ( M::OrientationAngle  newOrientationAngle  )  [slot]

Application's active window start to rotate to newOrientationAngle.

Note:
This method should be called when active window start rotation animation.
QString MInputMethodState::toolbar ( int  id  )  const [slot]

Returns the input method toolbar file name which is registered with the unique identifier .

Deprecated:
do not use. Use attributeExtensionFile() instead.
Parameters:
id the unique identifier of a registered toolbar.
Returns:
the file name of toolbar, or empty QString if id is invalid.
void MInputMethodState::toolbarItemAttributeChanged ( int  id,
const QString item,
const QString attribute,
const QVariant value 
) [signal]

Emitted when input method toolbar item attribute is changed.

void MInputMethodState::toolbarRegistered ( int  id,
const QString fileName 
) [signal]
Deprecated:
do not use.

Use attributeExtensionRegistered() instead. Emitted when an input method toolbar which is defined in fileName with an unique identifier id is registered.

void MInputMethodState::toolbarUnregistered ( int  id  )  [signal]
Deprecated:
do not use.

Use attributeExtensionUnregistered() instead. Emitted when an input method toolbar with an unique id is unregistered.

void MInputMethodState::unregisterAttributeExtension ( int  id  )  [slot]

Unregister the attribute extension which unique id is id.

Parameters:
\a id is the unique identifier of the registered attribute extension.
void MInputMethodState::unregisterToolbar ( int  id  )  [slot]

Unregister an input method toolbar which unique id id.

Deprecated:
do not use. Use unregisterAttributeExtension () instead.
Parameters:
\a id is the unique identifier of the registered toolbar.

Copyright © 2010 Nokia Corporation
MeeGo Touch