Back to index

im-sdk  12.3.91
Functions
IIIMQKeyEvent.hh File Reference
#include <iiimcf.h>
#include <qevent.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

IIIMF_status convert_QKeyEvent_to_IIIMCF_keyevent (QKeyEvent *e, IIIMCF_keyevent *pkev)
IIIMF_status convert_IIIMCF_keyevent_to_QKeyEvent (IIIMCF_keyevent *pkev, int pressp, QKeyEvent **pe)

Function Documentation

IIIMF_status convert_IIIMCF_keyevent_to_QKeyEvent ( IIIMCF_keyevent pkev,
int  pressp,
QKeyEvent **  pe 
)

Definition at line 650 of file IIIMQKeyEvent.cpp.

{
    int c, s;

    c = i2qcode(pkev->keycode);

    if (!c) return IIIMF_STATUS_FAIL;

    s = 0;
    if (pkev->modifier & IIIMF_SHIFT_MODIFIER) {
       s |= Qt::ShiftButton;
    }
    if (pkev->modifier & IIIMF_CONTROL_MODIFIER) {
       s |= Qt::ControlButton;
    }
    if (pkev->modifier & IIIMF_META_MODIFIER) {
       s |= Qt::MetaButton;
    }
    if (pkev->modifier & IIIMF_ALT_MODIFIER) {
       s |= Qt::AltButton;
    }

    if (pressp)
       *pe = new QKeyEvent(QEvent::KeyPress, c, pkev->keychar, s);
    else
       *pe = new QKeyEvent(QEvent::KeyRelease, c, pkev->keychar, s);

    return IIIMF_STATUS_SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 346 of file IIIMQKeyEvent.cpp.

{
    int c;

    c = q2icode(e);
    if (c == 0) return IIIMF_STATUS_FAIL;

    if (c < 0) {
       pkev->keychar = 0;
       pkev->keycode = -c;
    } else {
       pkev->keychar = e->ascii();
       pkev->keycode = c;
    }
    pkev->modifier = modifier(e);

    QTime t = QTime::currentTime();
    pkev->time_stamp = t.msec();

    return IIIMF_STATUS_SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function: