summaryrefslogtreecommitdiffstats
path: root/doc/man/man3/tqwsinputmethod.3qt
blob: 9431cde5b30ed4685eef90cb88462959ad033fc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
'\" t
.TH QWSInputMethod 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*-
.\" Copyright 1992-2007 Trolltech ASA.  All rights reserved.  See the
.\" license file included in the distribution for a complete license
.\" statement.
.\"
.ad l
.nh
.SH NAME
QWSInputMethod \- International input methods for Qt/Embedded
.SH SYNOPSIS
\fC#include <qwindowsystem_qws.h>\fR
.PP
.SS "Public Members"
.in +1c
.ti -1c
.BI "\fBQWSInputMethod\fR ()"
.br
.ti -1c
.BI "virtual \fB~QWSInputMethod\fR ()"
.br
.ti -1c
.BI "virtual bool \fBfilter\fR ( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ) = 0"
.br
.ti -1c
.BI "virtual void \fBreset\fR ()"
.br
.ti -1c
.BI "virtual void \fBsetMicroFocus\fR ( int x, int y )"
.br
.ti -1c
.BI "virtual void \fBsetFont\fR ( const QFont & )"
.br
.in -1c
.SS "Protected Members"
.in +1c
.ti -1c
.BI "void \fBsendIMEvent\fR ( QWSServer::IMState state, const QString & txt, int cpos, int selLen = 0 )"
.br
.in -1c
.SH DESCRIPTION
The QWSInputMethod class provides international input methods for Qt/Embedded.
.PP
Subclass this class to implement your own input method.
.PP
An input methods consists of a keyboard filter and optionally a graphical interface. The keyboard filter intercepts key events from physical or virtual keyboards by implementing the filter() function.
.PP
Use sendIMEvent() to send composition events. Composition starts with the input method sending an \fCIMStart\fR event, followed by a number of \fCIMCompose\fR events and ending with an \fCIMEnd\fR event or when the virtual reset() function is called.
.PP
The functions setMicroFocus() and setFont() can be reimplemented to receive more information about the state of the focus widget.
.PP
Use QWSServer::setCurrentInputMethod() to install an input method.
.PP
See also Qt/Embedded.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "QWSInputMethod::QWSInputMethod ()"
Constructs a new input method
.SH "QWSInputMethod::~QWSInputMethod ()\fC [virtual]\fR"
Destructs the input method uninstalling it if it is currently installed.
.SH "bool QWSInputMethod::filter ( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat )\fC [pure virtual]\fR"
This function must be implemented in subclasses to handle key input from physical or virtual keyboards. Returning TRUE will block the event from further processing.
.PP
The Unicode value is given in \fIunicode\fR and the key code in \fIkeycode\fR. Keyboard modifiers are OR-ed together in \fImodifiers\fR. If \fIisPress\fR is TRUE this is a key press; otherwise it is a key release. If \fIautoRepeat\fR is TRUE this is an auto-repeated key press.
.PP
All normal key events should be blocked while in compose mode (i.e., between \fCIMStart\fR and \fCIMEnd\fR).
.SH "void QWSInputMethod::reset ()\fC [virtual]\fR"
Implemented in subclasses to reset the state of the input method.
.SH "void QWSInputMethod::sendIMEvent ( QWSServer::IMState state, const QString & txt, int cpos, int selLen = 0 )\fC [protected]\fR"
Causes a QIMEvent to be sent to the focus widget. \fIstate\fR may be one of QWSServer::IMStart, QWSServer::IMCompose or QWSServer::IMEnd.
.PP
\fItxt\fR is the text being composed (or the finished text if state is \fCIMEnd\fR). \fIcpos\fR is the current cursor position.
.PP
If state is \fCIMCompose\fR, \fIselLen\fR is the number of characters in the composition string (starting at \fIcpos\fR) that should be marked as selected by the input widget receiving the event.
.SH "void QWSInputMethod::setFont ( const QFont & )\fC [virtual]\fR"
Implemented in subclasses to handle font changes in the focus widget.
.PP
This functionality is provided for future expansion; it is not used in this version of Qt/Embedded.
.SH "void QWSInputMethod::setMicroFocus ( int x, int y )\fC [virtual]\fR"
Implemented in subclasses to handle microFocusHint changes in the focus widget. \fIx\fR and \fIy\fR are the global coordinates of the text cursor.
.PP

.SH "SEE ALSO"
.BR http://doc.trolltech.com/qwsinputmethod.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
license file included in the distribution for a complete license
statement.
.SH AUTHOR
Generated automatically from the source code.
.SH BUGS
If you find a bug in Qt, please report it as described in
.BR http://doc.trolltech.com/bughowto.html .
Good bug reports help us to help you. Thank you.
.P
The definitive TQt documentation is provided in HTML format; it is
located at $TQTDIR/doc/html and can be read using TQt Assistant or with
a web browser. This man page is provided as a convenience for those
users who prefer man pages, although this format is not officially
supported by Trolltech. 
.P
If you find errors in this manual page, please report them to
.BR qt-bugs@trolltech.com .
Please include the name of the manual page (tqwsinputmethod.3qt) and the Qt
version (3.3.8).