46 #include "private/qwscommand_qws_p.h" 55 #ifndef QT_NO_QWS_INPUTMETHODS 101 int winid = tlw->
winId();
103 int widgetid = w->
winId();
126 int winid = tlw->
winId();
128 int widgetid = w->
winId();
155 int winId = tlw->
winId();
172 qDebug(
"### QWSInputContext::translateIMInitEvent not implemented ###");
195 while (!stream.
atEnd()) {
200 stream >> type >> start >> length >>
data;
207 data = qic->
standardFormat(static_cast<QInputContext::StandardFormat>(data.toInt()));
208 attrs << QInputMethodEvent::Attribute(static_cast<QInputMethodEvent::AttributeType>(
type), start, length, data);
211 qDebug() <<
"preedit" << preedit <<
"len" << preedit.length() <<
"commit" << commit <<
"len" << commit.length()
212 <<
"n attr" << attrs.
count();
215 if (preedit.isEmpty())
246 #endif // QT_NO_QWS_INPUTMETHODS void mouseHandler(int x, QMouseEvent *event)
This function can be reimplemented in a subclass to handle mouse press, release, double-click, and move events within the preedit text.
The QVariant class acts like a union for the most common Qt data types.
Status status() const
Returns the status of the data stream.
static bool translateIMQueryEvent(QWidget *w, const QWSIMQueryEvent *e)
#define QT_END_NAMESPACE
This macro expands to.
static QWSDisplay * qwsDisplay()
static QWidget * activeWidget()
void sendIMResponse(int winId, int property, const QVariant &result)
bool atEnd() const
Returns true if the I/O device has reached the end position (end of the stream or file) or if there i...
void sendIMUpdate(int type, int winId, int widgetid)
int count(const T &t) const
Returns the number of occurrences of value in the list.
QWidget * focusWidget() const
Returns the widget that has an input focus for this input context.
The QString class provides a Unicode character string.
QWSInputContext(QObject *parent=0)
The QObject class is the base class of all Qt objects.
virtual bool event(QEvent *)
This virtual function receives events to an object and should return true if the event e was recogniz...
Q_CORE_EXPORT void qDebug(const char *,...)
void sendIMMouseEvent(int index, bool isPress)
#define QT_BEGIN_NAMESPACE
This macro expands to.
virtual void widgetDestroyed(QWidget *w)
This virtual function is called when the specified widget is destroyed.
static void updateImeStatus(QWidget *w, bool hasFocus)
QTextFormat standardFormat(StandardFormat s) const
Returns a QTextFormat object that specifies the format for component s.
void setFocusWidget(QWidget *w)
Sets the widget that has an input focus for this input context.
#define QT_PREPEND_NAMESPACE(name)
This macro qualifies identifier with the full namespace.
Q_CORE_EXPORT void qWarning(const char *,...)
struct QWSIMQueryEvent::SimpleData simpleData
static const char * data(const QByteArray &arr)
bool isComposing() const
This function indicates whether InputMethodStart event had been sent to the current focus widget...
void moveTopLeft(const QPoint &p)
Moves the rectangle, leaving the top-left corner at the given position.
static bool translateIMEvent(QWidget *w, const QWSIMEvent *e)
Q_GUI_EXPORT void(* qt_qws_inputMethodStatusChanged)(QWidget *)=0
The QMouseEvent class contains parameters that describe a mouse event.
void reset()
This function can be reimplemented in a subclass to reset the state of the input method.
QRect toRect() const
Returns the variant as a QRect if the variant has type() Rect ; otherwise returns an invalid QRect...
bool qt_sendSpontaneousEvent(QObject *, QEvent *)
The QRect class defines a rectangle in the plane using integer precision.
The QDataStream class provides serialization of binary data to a QIODevice.
The QInputContext class abstracts the input method dependent data and composing state.
static QWidget * activeWidget
virtual void setFocusWidget(QWidget *w)
Sets the widget that has an input focus for this input context.
The QEvent class is the base class of all event classes.
static bool translateIMInitEvent(const QWSIMInitEvent *e)
Type type() const
Returns the event type.
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
void widgetDestroyed(QWidget *w)
This virtual function is called when the specified widget is destroyed.
struct QWSIMEvent::SimpleData simpleData
void update()
This virtual function is called when a state in the focus widget has changed.
QPoint topLeft() const
Returns the position of the rectangle's top-left corner.