The QWSServer class provides server-specific functionality in Qt/Embedded.
.PP
When you run a Qt/Embedded application, it either runs as a server or connects to an existing server. If it runs as a server, some additional operations are provided by this class.
.PP
This class is instantiated by QApplication for Qt/Embedded server processes. You should never construct this class yourself.
.PP
A pointer to the QWSServer instance can be obtained via the global \fCqwsServer\fR variable.
.PP
The mouse and keyboard devices can be opened with openMouse() and openKeyboard(). (Close them with closeMouse() and closeKeyboard().)
.PP
The display is refreshed with refresh(), and painting can be enabled or disabled with enablePainting().
.PP
Obtain the list of client windows with clientWindows() and find out which window is at a particular point with windowAt().
.PP
Many static functions are provided, for example, setKeyboardFilter(), setKeyboardHandler(), setDefaultKeyboard() and setDefaultMouse().
.PP
The size of the window rectangle can be set with setMaxWindowRect(), and the desktop's background can be set with setDesktopBackground().
.PP
The screen saver is controlled with setScreenSaverInterval() and screenSaverActivate().
.PP
See also Qt/Embedded.
.SS "Member Type Documentation"
.SH "QWSServer::GUIMode"
This determines what sort of QWS server to create:
Returns the list of top-level windows. This list will change as applications add and remove wigdets so it should not be stored for future use. The windows are sorted in stacking order from top-most to bottom-most.
.SH "void QWSServer::closeKeyboard ()"
Closes keyboard device(s).
.SH "void QWSServer::closeMouse ()"
Closes the pointer device(s).
.SH "void QWSServer::enablePainting ( bool e )"
If \fIe\fR is TRUE, painting on the display is enabled; if \fIe\fR is FALSE, painting is disabled.
Returns the keyboard mapping table used to convert keyboard scancodes to TQt keycodes and Unicode values. It's used by the keyboard driver in \fCqkeyboard_qws.cpp\fR.
This signal is emitted immediately after the QCopChannel \fIchannel\fR is destroyed. Note that a channel is not destroyed until all its listeners have unregistered.
Returns TRUE if the screensaver is active (i.e. the screen is blanked); otherwise returns FALSE.
.SH "void QWSServer::sendIMEvent ( IMState state, const QString & txt, int cpos, int selLen )"
This function sends an input method event to the server. The current state is passed in \fIstate\fR and the current text in \fItxt\fR. The cursor's position in the text is given by \fIcpos\fR, and the selection length (which could be 0) is given in \fIselLen\fR.
.SH "void QWSServer::sendKeyEvent ( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat )\fC [static]\fR"
Send a key event. You can use this to send key events generated by" virtual keyboards". \fIunicode\fR is the Unicode value of the key to send, \fIkeycode\fR the TQt keycode (e.g. \fCKey_Left\fR), \fImodifiers\fR indicates whether, Shift/Alt/Ctrl keys are pressed, \fIisPress\fR is TRUE if this is a key down event and FALSE if it's a key up event, and \fIautoRepeat\fR is TRUE if this is an autorepeat event (i.e. the user has held the key down and this is the second or subsequent key event being sent).
Sets the image \fIimg\fR to be used as the background in the absence of obscuring windows.
.SH "void QWSServer::setDesktopBackground ( const QColor & c )\fC [static]\fR"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Sets the color \fIc\fR to be used as the background in the absence of obscuring windows.
.SH "void QWSServer::setKeyboardFilter ( KeyboardFilter * f )\fC [static]\fR"
Adds a filter \fIf\fR to be invoked for all key events from physical keyboard drivers (events sent via processKeyEvent()).
.PP
The filter is not invoked for keys generated by virtual keyboard drivers (events sent via sendKeyEvent()).
.PP
If \fIf\fR is 0, the most-recently added filter is removed and deleted. The caller is responsible for matching each addition with a corresponding removal.
.SH "void QWSServer::setMaxWindowRect ( const QRect & r )\fC [static]\fR"
Sets the area of the screen which Qt/Embedded applications will consider to be the maximum area to use for windows to \fIr\fR.
.PP
See also QWidget::showMaximized().
.SH "void QWSServer::setScreenSaverInterval ( int ms )\fC [static]\fR"
Sets the timeout for the screensaver to \fIms\fR milliseconds. A setting of zero turns off the screensaver.
.SH "void QWSServer::setScreenSaverIntervals ( int * ms )\fC [static]\fR"
Sets an array of timeouts for the screensaver to a list of \fIms\fR milliseconds. A setting of zero turns off the screensaver. The array must be 0-terminated.