Home · All Classes · Main Classes · Grouped Classes · Modules · Functions |
The QWSServer class provides server-specific functionality in Qtopia Core. More...
#include <QWSServer>
Inherits QObject.
The QWSServer class provides server-specific functionality in Qtopia Core.
When you run a Qtopia Core 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.
This class is instantiated by QApplication for Qtopia Core server processes. You should never construct this class yourself.
A pointer to the QWSServer instance can be obtained via the global qwsServer variable.
The mouse and keyboard devices can be opened with openMouse() and openKeyboard(). (Close them with closeMouse() and closeKeyboard().)
The display is refreshed with refresh(), and painting can be enabled or disabled with enablePainting().
Obtain the list of client windows with clientWindows() and find out which window is at a particular point with windowAt().
Many static functions are provided, for example, setKeyboardFilter(), setKeyboardHandler(), setDefaultKeyboard() and setDefaultMouse().
The size of the window rectangle can be set with setMaxWindowRect(), and the desktop's background can be set with setDesktopBackground().
The screen saver is controlled with setScreenSaverInterval() and screenSaverActivate().
This enum is used to pass various options to the window system server.
Constant | Value | Description |
---|---|---|
QWSServer::DisableKeyboard | 0x01 | Ignore all keyboard input. |
QWSServer::DisableMouse | 0x02 | Ignore all mouse input. |
This specifies what sort of event has occurred to a top-level window:
Constant | Value | Description |
---|---|---|
QWSServer::Create | 0x0001 | A new window has been created (QWidget constructor). |
QWSServer::Destroy | 0x0002 | The window has been closed and deleted (QWidget destructor). |
QWSServer::Hide | 0x0004 | The window has been hidden with QWidget::hide(). |
QWSServer::Show | 0x0008 | The window has been shown with QWidget::show() or similar. |
QWSServer::Raise | 0x0010 | The window has been raised to the top of the desktop. |
QWSServer::Lower | 0x0020 | The window has been lowered. |
QWSServer::Geometry | 0x0040 | The window has changed size or position. |
QWSServer::Active | 0x0080 | The window has become the active window (has keyboard focus). |
QWSServer::Name | 0x0100 | The window has been named. |
Construct a QWSServer object.
Warning: This class is instantiated by QApplication for Qtopia Core server processes. You should never construct this class yourself.
The flags are used for keyboard and mouse setting. The server's parent is parent.
Destruct QWSServer
Adds 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 sent via sendKeyEvent()).
Keyboard filters are removed by removeKeyboardFilter().
Returns the list of top-level windows. This list will change as applications add and remove widgets so it should not be stored for future use. The windows are sorted in stacking order from top-most to bottom-most.
Closes keyboard device(s).
Closes the pointer device(s).
If e is true, painting on the display is enabled; if e is false, painting is disabled.
Returns true if the cursor is visible; otherwise returns false.
See also setCursorVisible().
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.
Returns the primary keyboard handler.
See also setKeyboardHandler().
This signal is emitted whenever some text is selected. The selection is passed in text.
Returns the primary mouse handler.
This signal is emitted when the QCopChannel channel is created.
Opens the keyboard device(s).
Opens the mouse device(s).
Refreshes the entire display.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Refreshes the region r.
Removes and deletes the most-recently added filter. The caller is responsible for matching each addition with a corresponding removal.
This signal is emitted immediately after the QCopChannel channel is destroyed. Note that a channel is not destroyed until all its listeners have unregistered.
Resumes mouse handling by reactivating each registered mouse handler.
See also suspendMouse().
If activate is true the screensaver is activated immediately; if activate is false the screensaver is deactivated.
Returns true if the screensaver is active (i.e. the screen is blanked); otherwise returns false.
This function sends the input method event ime to the server.
If there is a window currently in compose mode, the event is sent to that window. Otherwise, the event is sent to the current focus window.
Sends an input method query for the specified property.
You must reimplement the virtual function QWSInputMethod::queryResponse() in a subclass of QWSInputMethod if you want to receive responses to input method queries.
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. Qt::Key_Left), modifiers indicates whether, Shift/Alt/Ctrl keys are pressed, isPress is true if this is a key down event and 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).
Sets the brush brush to be used as the background in the absence of obscuring windows.
If vis is true, makes the cursor visible; if vis is false, makes the cursor invisible.
See also isCursorVisible().
Set the keyboard driver to k, e.g. if $QWS_KEYBOARD is not defined. The default is platform-dependent.
Set the mouse driver m to use if $QWS_MOUSE_PROTO is not defined. The default is platform-dependent.
Sets the primary keyboard handler to kh.
See also keyboardHandler().
Sets the area of the screen which Qtopia Core applications will consider to be the maximum area to use for windows to r.
See also QWidget::showMaximized().
Sets the timeout for the screensaver to ms milliseconds. A setting of zero turns off the screensaver.
Sets an array of timeouts for the screensaver to a list of ms milliseconds. A setting of zero turns off the screensaver. The array must be 0-terminated.
Suspends mouse handling by suspending each registered mouse handler.
See also resumeMouse().
Returns the window containing the point pos or 0 if there is no window under the point.
This signal is emitted whenever something happens to a top-level window (e.g. it's created or destroyed). w is the window to which the event of type e has occurred.
Copyright © 2005 Trolltech | Trademarks | Qt 4.1.0 |