| Home · All Classes · Main Classes · Deprecated |
A mediator between MInputContext and applications/libmeegotouch that use it. More...


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 toolbar 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.
Definition at line 43 of file corelib/core/minputmethodstate.h.
| M::OrientationAngle MInputMethodState::activeWindowOrientationAngle | ( | ) | const |
Get the orientation of application's active window.
Definition at line 92 of file minputmethodstate.cpp.
{
Q_D(const MInputMethodState);
return d->orientation;
}
| void MInputMethodState::activeWindowOrientationAngleChanged | ( | M::OrientationAngle | orientation | ) | [signal] |
Emitted when the orientation of application's active window is changed.
| orientation | new orientation angle |
| void MInputMethodState::closeSoftwareInputPanel | ( | ) | [static] |
Sends a request to the application's input context to close a software input panel.
Definition at line 111 of file minputmethodstate.cpp.
{
QInputContext *inputContext = qApp->inputContext();
if (!inputContext) {
return;
}
QEvent close(QEvent::CloseSoftwareInputPanel);
inputContext->filterEvent(&close);
inputContext->reset();
}

| QRect MInputMethodState::inputMethodArea | ( | ) | const |
Get current input method area.
Definition at line 75 of file minputmethodstate.cpp.
{
Q_D(const MInputMethodState);
return d->region;
}
| void MInputMethodState::inputMethodAreaChanged | ( | const QRect & | region | ) | [signal] |
Emitted when input method area is changed.
| region | new input method area |
| MInputMethodState * MInputMethodState::instance | ( | ) | [static] |
Get singleton instance.
Definition at line 58 of file minputmethodstate.cpp.
{
static MInputMethodState singleton;
return &singleton;
}
| 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::registerToolbar | ( | const QString & | fileName | ) | [slot] |
Register an input method toolbar which is defined in fileName.
| \a | fileName is the absolute file name of a custom toolbar, or the relative file under /usr/share/meegotouch/imtoolbars/. |
Definition at line 148 of file minputmethodstate.cpp.
{
Q_D(MInputMethodState);
static int idCounter = 0;
// generate an application local unique identifier for the toolbar.
int newId = idCounter;
idCounter++;
d->toolbars.insert(newId, new ToolbarInfo(fileName));
emit toolbarRegistered(newId, fileName);
return newId;
}

| 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.
Definition at line 99 of file minputmethodstate.cpp.
{
QInputContext *inputContext = qApp->inputContext();
if (!inputContext) {
return;
}
QEvent request(QEvent::RequestSoftwareInputPanel);
inputContext->filterEvent(&request);
}

| void MInputMethodState::setActiveWindowOrientationAngle | ( | M::OrientationAngle | newOrientation | ) | [slot] |
Set the orientation of application's active window to newOrientation.
Definition at line 82 of file minputmethodstate.cpp.
{
Q_D(MInputMethodState);
if (d->orientation != newOrientation) {
d->orientation = newOrientation;
emit activeWindowOrientationAngleChanged(newOrientation);
}
}

| void MInputMethodState::setInputMethodArea | ( | const QRect & | newRegion | ) | [slot] |
Set input method area to newRegion.
Definition at line 65 of file minputmethodstate.cpp.
{
Q_D(MInputMethodState);
if (d->region != newRegion) {
d->region = newRegion;
emit inputMethodAreaChanged(d->region);
}
}

| 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.
Definition at line 168 of file minputmethodstate.cpp.
{
Q_D(MInputMethodState);
if (!d->toolbars.contains(id)) {
return;
}
ToolbarInfo *toolbar = d->toolbars[id];
toolbar->items[item][attribute] = value;
emit toolbarItemAttributeChanged(id, item, attribute, value);
}

| QString MInputMethodState::toolbar | ( | int | id | ) | const [slot] |
Returns the input method toolbar file name which is registered with the unique identifier .
| id | the unique identifier of a registered toolbar. |
Definition at line 182 of file minputmethodstate.cpp.
{
Q_D(const MInputMethodState);
ToolbarInfo *toolbar = d->toolbars.value(id);
if (toolbar) {
return toolbar->fileName;
} else {
return QString();
}
}
| 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] |
Emitted when an input method toolbar which is defined in fileName with an unique identifier id is registered.
| void MInputMethodState::toolbarUnregistered | ( | int | id | ) | [signal] |
Emitted when an input method toolbar with an unique id is unregistered.
| void MInputMethodState::unregisterToolbar | ( | int | id | ) | [slot] |
Unregister an input method toolbar which unique id id.
| \a | id is the unique identifier of the registered toolbar. |
Definition at line 160 of file minputmethodstate.cpp.
{
Q_D(MInputMethodState);
delete d->toolbars[id];
d->toolbars.remove(id);
emit toolbarUnregistered(id);
}

| Copyright © 2010 Nokia Corporation | Generated on Thu Nov 4 2010 18:14:25 (PDT) Doxygen 1.7.1 |
MeeGo Touch |