Classes - Annotated - Tree - Functions - Home - Structure

QWSServer Class Reference

The QWSServer class provides server-specific functionality in Qt/Embedded. More...

#include <qwindowsystem_qws.h>

List of all member functions.

Public Members

Signals

Static Public Members


Detailed Description

The QWSServer class provides server-specific functionality in Qt/Embedded.

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 via the QWSServer class.

This class is instantiated by QApplication for Qt/Embedded server processes. You should never construct this class yourself.

A pointer to the QWSServer instance can be obtained via the global qwsServer variable.

See also Qt/Embedded.


Member Type Documentation

QWSServer::GUIMode

This determines what sort of QWS server to create:

QWSServer::ServerFlags

This enum is used to pass various options to the window system server. Currently defined are:

QWSServer::WindowEvent

This specifies what sort of event has occurred to a top level window:

Member Function Documentation

QWSServer::QWSServer ( int flags = 0, QObject * parent = 0, const char * name = 0 )

Construct a QWSServer class with parent parent, called name and flags flags.

This class is instantiated by QApplication for Qt/Embedded server processes. You should never construct this class yourself.

QWSServer::~QWSServer ()

Destruct QWSServer

const QPtrList<QWSWindow> & QWSServer::clientWindows ()

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 lowest.

void QWSServer::closeKeyboard ()

Closes keyboard device(s).

void QWSServer::closeMouse ()

Closes pointer device(s).

void QWSServer::enablePainting ( bool e )

Enables (if e is true) or disables all painting on the display.

const KeyMap * QWSServer::keyMap () [static]

This returns the keyboard mapping table used to convert keyboard scancodes to Qt keycodes and unicode values. It's used by the keyboard driver in qkeyboard_qws.cpp.

QWSKeyboardHandler * QWSServer::keyboardHandler () [static]

Returns the primary keyboard handler.

QWSPropertyManager * QWSServer::manager ()

Returns the QWSPropertyManager, which is used for implementing X11-style window properties.

QWSMouseHandler * QWSServer::mouseHandler () [static]

Returns the primary mouse handler.

void QWSServer::openKeyboard ()

Open keyboard device(s).

void QWSServer::openMouse ()

Opens the mouse device(s).

void QWSServer::refresh ()

Refreshes the entire display.

void QWSServer::screenSaverActivate ( bool activate ) [static]

Activates the screensaver immediately if activate is TRUE otherwise deactivates the screensaver.

bool QWSServer::screenSaverActive () [static]

Returns TRUE if the screensaver is active (i.e. blanked).

void QWSServer::sendKeyEvent ( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ) [static]

Send a key event. You can use this to send key events generated by "virtual keyboards". unicode is the unicode value of the key to send, keycode the Qt keycode (e.g. Key_Left), modifiers indicates whether, shift/alt/control keys are pressed, isPress is true if this is a key down event, false if it's a key up event, and autoRepeat 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).

void QWSServer::sendMouseEvent ( const QPoint & pos, int state ) [static]

Send a mouse event. pos is the position on screen of the mouse event, state is a mask indicating which buttons are pressed.

void QWSServer::setDefaultKeyboard ( const char * k ) [static]

Set the keyboard driver k to use if $QWS_KEYBOARD is not defined. The default is platform-dependant.

void QWSServer::setDefaultMouse ( const char * m ) [static]

Set the mouse driver m to use if $QWS_MOUSE_PROTO is not defined. The default is platform-dependant.

void QWSServer::setDesktopBackground ( const QImage & img ) [static]

Sets the image img to use as the background in the absence of obscuring windows.

void QWSServer::setDesktopBackground ( const QColor & c ) [static]

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Sets the color c to use as the background in the absence of obscuring windows.

void QWSServer::setKeyboardFilter ( KeyboardFilter * f ) [static]

Sets a filter f to be invoked for all key events from physical keyboard drivers (events sent via processKeyEvent()). The filter is not invoked for keys generated by virtual keyboard drivers (events send via sendKeyEvent()).

void QWSServer::setKeyboardHandler ( QWSKeyboardHandler * kh ) [static]

Sets the primary keyboard handler to kh.

void QWSServer::setMaxWindowRect ( const QRect & r ) [static]

Sets the area of the screen r which Qt/Embedded applications will consider to be the maximum area to use for windows.

See also QWidget::showMaximized().

void QWSServer::setScreenSaverInterval ( int ms ) [static]

Sets the timeout for the screensaver to ms milliseconds. A setting of zero turns of the screensaver.

QWSWindow * QWSServer::windowAt ( const QPoint & pos )

Returns the window containing the point pos or 0 if there is no window under the point.

void QWSServer::windowEvent ( QWSWindow * w, QWSServer::WindowEvent e ) [signal]

This signal is triggered whenever something happens to a top level window (e.g. it's created or destroyed). w is the window to which an event has happened, e specifies what type of event has occurred.

Search the documentation, FAQ, qt-interest archive and more (uses www.trolltech.com):


This file is part of the Qt toolkit, copyright © 1995-2001 Trolltech, all rights reserved.


Copyright © 2001 TrolltechTrademarks
Qt version 3.0.0-beta3