Qt 4.8
|
The QWSWindow class encapsulates a top-level window in Qt for Embedded Linux. More...
#include <qwindowsystem_qws.h>
Public Types | |
enum | State { NoState, Hidden, Showing, Visible, Hiding, Raising, Lowering, Moving, ChangingGeometry, Destroyed } |
This enum describes the state of a window. More... | |
Public Functions | |
QRegion | allocatedRegion () const |
Returns the region that the window is allowed to draw onto, including any window decorations but excluding regions covered by other windows. More... | |
const QString & | caption () const |
Returns the window's caption. More... | |
QWSClient * | client () const |
Returns a reference to the QWSClient object that owns this window. More... | |
QRegion | dirtyOnScreen () const |
Returns the region that has been repainted since the previous QScreen::exposeRegion(), and needs to be copied to the screen. More... | |
void | hide () |
Hides the window. More... | |
bool | isFullyObscured () const |
Returns true if the window is completely obsured by another window or by the bounds of the screen; otherwise returns false. More... | |
bool | isOpaque () const |
Returns true if the window is opaque, i. More... | |
bool | isPartiallyObscured () const |
Returns true if the window is partially obsured by another window or by the bounds of the screen; otherwise returns false. More... | |
bool | isVisible () const |
Returns true if the window is visible; otherwise returns false. More... | |
void | lower () |
Lowers the window below other windows. More... | |
const QString & | name () const |
Returns the window's name, which is taken from the QWidget::objectName() at the time of QWidget::show() . More... | |
uint | opacity () const |
Returns the window's alpha channel value. More... | |
QRegion | paintedRegion () const |
Returns the region that the window is known to have drawn into. More... | |
QWSWindow (int i, QWSClient *client) | |
void | raise () |
Raises the window above all other windows except "Stay on top" windows. More... | |
const QRegion & | requestedRegion () const |
Returns the region that the window has requested to draw onto, including any window decorations. More... | |
void | setActiveWindow () |
Make this the active window (i. More... | |
void | show () |
Shows the window. More... | |
State | state () const |
Returns the current state of the window. More... | |
Qt::WindowFlags | windowFlags () const |
Returns the window flags of the window. More... | |
QWSWindowSurface * | windowSurface () const |
int | winId () const |
Returns the window's ID. More... | |
~QWSWindow () | |
Destructor. More... | |
Private Functions | |
void | createSurface (const QString &key, const QByteArray &data) |
void | focus (bool get) |
int | focusPriority () const |
bool | forClient (const QWSClient *cl) const |
bool | hidden () const |
void | operation (QWSWindowOperationEvent::Operation o) |
void | setAllocatedRegion (const QRegion ®ion) |
void | setCaption (const QString &c) |
Sets the window's caption to c. More... | |
void | setName (const QString &n) |
void | shuttingDown () |
void | startEmbed (QWSWindow *window) |
void | stopEmbed (QWSWindow *window) |
Properties | |
uint | _opacity |
QWSClient * | c |
QWSWindowPrivate * | d |
QRegion | exposed |
int | id |
int | last_focus_time |
bool | modified |
bool | onTop |
bool | opaque |
QRegion | requested_region |
QString | rgnCaption |
QString | rgnName |
QWSWindowSurface * | surface |
Friends | |
class | QWSServer |
class | QWSServerPrivate |
The QWSWindow class encapsulates a top-level window in Qt for Embedded Linux.
When you run a Qt for Embedded Linux application, it either runs as a server or connects to an existing server. As applications add and remove windows, the server process maintains information about each window. In Qt for Embedded Linux, top-level windows are encapsulated as QWSWindow objects. Note that you should never construct the QWSWindow class yourself; the current top-level windows can be retrieved using the QWSServer::clientWindows() function.
With a window at hand, you can retrieve its caption, name, opacity and ID using the caption(), name(), opacity() and winId() functions, respectively. Use the client() function to retrieve a pointer to the client that owns the window.
Use the isVisible() function to find out if the window is visible. You can find out if the window is completely obscured by another window or by the bounds of the screen, using the isFullyObscured() function. The isOpaque() function returns true if the window has an alpha channel equal to 255. Finally, the requestedRegion() function returns the region of the display the window wants to draw on.
Definition at line 94 of file qwindowsystem_qws.h.
enum QWSWindow::State |
This enum describes the state of a window.
Most of the transitional states are set just before a call to QScreen::exposeRegion() and reset immediately afterwards.
Enumerator | |
---|---|
NoState | |
Hidden | |
Showing | |
Visible | |
Hiding | |
Raising | |
Lowering | |
Moving | |
ChangingGeometry | |
Destroyed |
Definition at line 114 of file qwindowsystem_qws.h.
QWSWindow::QWSWindow | ( | int | i, |
QWSClient * | client | ||
) |
Constructs a new top-level window, associated with the client client and giving it the id i.
Definition at line 409 of file qwindowsystem_qws.cpp.
QWSWindow::~QWSWindow | ( | ) |
Destructor.
Definition at line 625 of file qwindowsystem_qws.cpp.
QRegion QWSWindow::allocatedRegion | ( | ) | const |
Returns the region that the window is allowed to draw onto, including any window decorations but excluding regions covered by other windows.
Definition at line 664 of file qwindowsystem_qws.cpp.
Referenced by QWSServerPrivate::_q_clientClosed(), QWSTtyKbPrivate::handleConsoleSwitch(), QWSServerPrivate::invokeEmbed(), QWSServerPrivate::invokeSelectCursor(), QWSServerPrivate::invokeSetOpacity(), QWSServerPrivate::lowerWindow(), QWSServerPrivate::moveWindowRegion(), QWSServerPrivate::raiseWindow(), QWSServerPrivate::request_region(), QWSServerPrivate::setWindowRegion(), QWSServerPrivate::update_regions(), and QWSServer::windowAt().
|
inline |
Returns the window's caption.
Definition at line 105 of file qwindowsystem_qws.h.
Referenced by QWSServerPrivate::invokeRegionName().
|
inline |
Returns a reference to the QWSClient object that owns this window.
Definition at line 106 of file qwindowsystem_qws.h.
Referenced by QWSServer::enablePainting(), QScreen::exposeRegion(), QWSServerPrivate::invokeConvertSelection(), QWSServerPrivate::invokeEmbed(), QWSServerPrivate::invokeGrabKeyboard(), QWSServerPrivate::invokeSetSelectionOwner(), QWSServerPrivate::request_region(), QWSServer::sendIMEvent(), QWSServer::sendIMQuery(), QWSServerPrivate::sendKeyEventUnfiltered(), QWSServerPrivate::sendMouseEventUnfiltered(), QWSServerPrivate::setFocus(), stopEmbed(), QWSServerPrivate::update_regions(), QWSServerPrivate::updateClientCursorPos(), and QWSServer::windowList().
|
private |
Definition at line 473 of file qwindowsystem_qws.cpp.
Referenced by QWSServerPrivate::request_region().
QRegion QWSWindow::dirtyOnScreen | ( | ) | const |
Returns the region that has been repainted since the previous QScreen::exposeRegion(), and needs to be copied to the screen.
Definition at line 468 of file qwindowsystem_qws.cpp.
|
private |
Definition at line 596 of file qwindowsystem_qws.cpp.
Referenced by QWSServerPrivate::setFocus().
|
inlineprivate |
|
inlineprivate |
Definition at line 132 of file qwindowsystem_qws.h.
Referenced by QWSServerPrivate::_q_clientClosed(), QWSServerPrivate::invokeRegion(), QWSServerPrivate::invokeRegionDestroy(), QWSServerPrivate::invokeRegionMove(), and QWSServerPrivate::invokeSetFocus().
|
inlineprivate |
Definition at line 131 of file qwindowsystem_qws.h.
Referenced by QWSServerPrivate::setFocus().
void QWSWindow::hide | ( | ) |
Hides the window.
Definition at line 548 of file qwindowsystem_qws.cpp.
Referenced by hide().
|
inline |
Returns true if the window is completely obsured by another window or by the bounds of the screen; otherwise returns false.
Definition at line 112 of file qwindowsystem_qws.h.
|
inline |
Returns true if the window is opaque, i.
e., if its alpha channel equals 255; otherwise returns false.
Definition at line 125 of file qwindowsystem_qws.h.
Referenced by QScreen::compose(), QDirectFBScreen::exposeRegion(), QWSServerPrivate::invokeSetOpacity(), QWSServerPrivate::lowerWindow(), QWSServerPrivate::raiseWindow(), and QWSServerPrivate::update_regions().
|
inline |
Returns true if the window is partially obsured by another window or by the bounds of the screen; otherwise returns false.
Definition at line 111 of file qwindowsystem_qws.h.
|
inline |
Returns true if the window is visible; otherwise returns false.
Definition at line 110 of file qwindowsystem_qws.h.
Referenced by QWSServerPrivate::request_region().
void QWSWindow::lower | ( | ) |
Lowers the window below other windows.
Definition at line 514 of file qwindowsystem_qws.cpp.
Referenced by QWSServerPrivate::invokeSetAltitude(), and lower().
|
inline |
Returns the window's name, which is taken from the QWidget::objectName() at the time of QWidget::show() .
Definition at line 104 of file qwindowsystem_qws.h.
Referenced by QWSServerPrivate::invokeRegionName().
|
inline |
Returns the window's alpha channel value.
Definition at line 126 of file qwindowsystem_qws.h.
Referenced by QScreen::compose(), and QDirectFBScreen::exposeRegion().
|
private |
Definition at line 608 of file qwindowsystem_qws.cpp.
Referenced by hide(), and show().
QRegion QWSWindow::paintedRegion | ( | ) | const |
Returns the region that the window is known to have drawn into.
Definition at line 691 of file qwindowsystem_qws.cpp.
Referenced by QScreen::blit(), and QScreen::compose().
void QWSWindow::raise | ( | ) |
Raises the window above all other windows except "Stay on top" windows.
Definition at line 497 of file qwindowsystem_qws.cpp.
Referenced by QWSServerPrivate::invokeSetAltitude(), and raise().
|
inline |
Returns the region that the window has requested to draw onto, including any window decorations.
Definition at line 107 of file qwindowsystem_qws.h.
Referenced by QScreen::blit(), and QScreen::compose().
void QWSWindow::setActiveWindow | ( | ) |
Make this the active window (i.
Definition at line 566 of file qwindowsystem_qws.cpp.
Referenced by setActiveWindow().
|
inlineprivate |
Definition at line 696 of file qwindowsystem_qws.cpp.
Referenced by QWSServer::enablePainting(), QWSServerPrivate::moveWindowRegion(), and QWSServerPrivate::update_regions().
|
private |
Sets the window's caption to c.
Definition at line 588 of file qwindowsystem_qws.cpp.
Referenced by QWSServerPrivate::invokeRegionName().
|
private |
Definition at line 576 of file qwindowsystem_qws.cpp.
Referenced by QWSServerPrivate::invokeRegionName().
void QWSWindow::show | ( | ) |
Shows the window.
Definition at line 531 of file qwindowsystem_qws.cpp.
Referenced by show().
|
inlineprivate |
Definition at line 140 of file qwindowsystem_qws.h.
Referenced by QWSServerPrivate::_q_clientClosed(), and QWSServerPrivate::handleWindowClose().
|
inlineprivate |
Definition at line 702 of file qwindowsystem_qws.cpp.
Referenced by QWSServerPrivate::invokeEmbed().
QWSWindow::State QWSWindow::state | ( | ) | const |
Returns the current state of the window.
Definition at line 447 of file qwindowsystem_qws.cpp.
Referenced by QScreen::exposeRegion().
|
inlineprivate |
Definition at line 708 of file qwindowsystem_qws.cpp.
Referenced by QWSServerPrivate::invokeEmbed(), and ~QWSWindow().
Qt::WindowFlags QWSWindow::windowFlags | ( | ) | const |
Returns the window flags of the window.
This value is only available after the first paint event.
Definition at line 458 of file qwindowsystem_qws.cpp.
|
inline |
Definition at line 128 of file qwindowsystem_qws.h.
Referenced by QScreen::blit(), QScreen::compose(), QDirectFBScreen::exposeRegion(), QWSTtyKbPrivate::handleConsoleSwitch(), QWSServerPrivate::moveWindowRegion(), QDirectFBScreenPrivate::onWindowEvent(), QWSServerPrivate::request_region(), and QWSServerPrivate::update_regions().
|
inline |
Returns the window's ID.
Definition at line 103 of file qwindowsystem_qws.h.
Referenced by QWSServerPrivate::_q_clientClosed(), QWSServer::enablePainting(), QWSServerPrivate::findWindow(), QWSServerPrivate::invokeEmbed(), QWSServerPrivate::invokeRegionDestroy(), QWSServer::sendIMEvent(), QWSServer::sendIMQuery(), QWSServerPrivate::sendKeyEventUnfiltered(), QWSServerPrivate::setFocus(), stopEmbed(), QWSServerPrivate::update_regions(), QWSDisplay::windowAt(), and QWSServer::windowList().
Definition at line 96 of file qwindowsystem_qws.h.
|
friend |
Definition at line 97 of file qwindowsystem_qws.h.
|
private |
Definition at line 166 of file qwindowsystem_qws.h.
Referenced by QWSServerPrivate::invokeSetOpacity().
|
private |
Definition at line 161 of file qwindowsystem_qws.h.
Referenced by QWSServerPrivate::_q_clientClosed(), createSurface(), focus(), operation(), setCaption(), and ~QWSWindow().
|
private |
Definition at line 168 of file qwindowsystem_qws.h.
Referenced by QWSServerPrivate::_q_clientClosed(), allocatedRegion(), dirtyOnScreen(), hide(), lower(), QWSServerPrivate::lowerWindow(), QWSServerPrivate::moveWindowRegion(), paintedRegion(), raise(), QWSServerPrivate::raiseWindow(), QWSServerPrivate::repaint_region(), QWSServerPrivate::request_region(), setActiveWindow(), setAllocatedRegion(), show(), startEmbed(), state(), stopEmbed(), QWSServerPrivate::update_regions(), windowFlags(), and ~QWSWindow().
|
private |
Definition at line 163 of file qwindowsystem_qws.h.
|
private |
Definition at line 156 of file qwindowsystem_qws.h.
Referenced by focus(), operation(), and QWSServerPrivate::sendMouseEventUnfiltered().
|
private |
Definition at line 164 of file qwindowsystem_qws.h.
Referenced by focus().
|
private |
Definition at line 159 of file qwindowsystem_qws.h.
|
private |
Definition at line 160 of file qwindowsystem_qws.h.
Referenced by QWSServerPrivate::invokeSetAltitude(), QWSServerPrivate::newWindow(), and QWSServerPrivate::raiseWindow().
|
private |
Definition at line 167 of file qwindowsystem_qws.h.
Referenced by QWSServerPrivate::repaint_region(), and QWSServerPrivate::request_region().
|
private |
Definition at line 162 of file qwindowsystem_qws.h.
Referenced by QWSServerPrivate::moveWindowRegion(), QWSServerPrivate::request_region(), QWSServerPrivate::reserve_region(), QWSServerPrivate::setWindowRegion(), and QWSServerPrivate::update_regions().
|
private |
Definition at line 158 of file qwindowsystem_qws.h.
Referenced by setCaption().
|
private |
Definition at line 157 of file qwindowsystem_qws.h.
Referenced by setName().
|
private |
Definition at line 165 of file qwindowsystem_qws.h.
Referenced by createSurface(), QWSWindow(), and ~QWSWindow().