The QWSWindow class encapsulates a top-level window in Qt for Embedded Linux. 更多...
| 头: | #include <QWSWindow> |
| enum | State { NoState, Hidden, Showing, Visible, ..., Destroyed } |
| const QString & | caption () const |
| QWSClient * | client () const |
| QRegion | dirtyOnScreen () const |
| bool | isFullyObscured () const |
| bool | isOpaque () const |
| bool | isVisible () const |
| const QString & | name () const |
| uint | opacity () const |
| const QRegion & | requestedRegion () const |
| 状态 | state () const |
| int | winId () const |
| Qt::WindowFlags | windowFlags () const |
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 () 函数。
With a window at hand, you can retrieve its caption, name, opacity and ID using the caption (), name (), opacity () 和 winId () functions, respectively. Use the client () function to retrieve a pointer to the client that owns the window.
使用 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 () 函数。 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.
另请参阅 QWSServer , QWSClient ,和 Qt for Embedded Linux 体系结构 .
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.
| 常量 | 值 | 描述 |
|---|---|---|
QWSWindow::NoState
|
0
|
Initial state before the window is properly initialized. |
QWSWindow::Hidden
|
1
|
The window is not visible. |
QWSWindow::Showing
|
2
|
The window is being shown. |
QWSWindow::Visible
|
3
|
The window is visible, and not in a transition. |
QWSWindow::Hiding
|
4
|
The window is being hidden. |
QWSWindow::Raising
|
5
|
The windoe is being raised. |
QWSWindow::Lowering
|
6
|
The window is being raised. |
QWSWindow::Moving
|
7
|
The window is being moved. |
QWSWindow::ChangingGeometry
|
8
|
The window's geometry is being changed. |
QWSWindow::Destroyed
|
9
|
The window is destroyed. |
另请参阅 state () 和 QScreen::exposeRegion ().
Returns the window's caption.
Returns a reference to the QWSClient object that owns this window.
另请参阅 requestedRegion ().
Returns the region that has been repainted since the previous QScreen::exposeRegion (), and needs to be copied to the screen.
该函数在 Qt 4.3 引入。
Returns true if the window is completely obsured by another window or by the bounds of the screen; otherwise returns false.
另请参阅 isVisible ().
Returns true if the window is opaque, i.e., if its alpha channel equals 255; otherwise returns false.
另请参阅 opacity ().
Returns true if the window is visible; otherwise returns false.
另请参阅 isFullyObscured ().
Returns the window's name, which is taken from the objectName() at the time of show() .
Returns the window's alpha channel value.
另请参阅 isOpaque ().
Returns the region that the window has requested to draw onto, including any window decorations.
另请参阅 client ().
Returns the current state of the window.
该函数在 Qt 4.3 引入。
Returns the window's ID.
Returns the window flags of the window. This value is only available after the first paint event.
该函数在 Qt 4.3 引入。