The QWaylandOutput class represents a displayable area managed by the compositor. 更多...
| 頭: | #include <QWaylandOutput> |
| qmake: | QT += waylandcompositor |
| Since: | Qt 5.8 |
| 繼承: | QWaylandObject |
| enum | Subpixel { SubpixelUnknown, SubpixelNone, SubpixelHorizontalRgb, SubpixelHorizontalBgr, SubpixelVerticalRgb, SubpixelVerticalBgr } |
| enum | Transform { TransformNormal, Transform90, Transform180, Transform270, ..., TransformFlipped270 } |
|
|
| QWaylandOutput () | |
| QWaylandOutput (QWaylandCompositor * compositor , QWindow * window ) | |
| ~QWaylandOutput () | |
| void | addMode (const QWaylandOutputMode & mode , bool preferred = false) |
| QRect | availableGeometry () const |
| QWaylandCompositor * | compositor () const |
| QWaylandOutputMode | currentMode () const |
| void | frameStarted () |
| QRect | geometry () const |
| QString | manufacturer () const |
| QString | model () const |
| QList<QWaylandOutputMode> | modes () const |
| QSize | physicalSize () const |
| bool | physicalSizeFollowsSize () const |
| QPoint | position () const |
| int | scaleFactor () const |
| void | sendFrameCallbacks () |
| void | setAvailableGeometry (const QRect & availableGeometry ) |
| void | setCurrentMode (const QWaylandOutputMode & mode ) |
| void | setManufacturer (const QString & 製造商 ) |
| void | setModel (const QString & model ) |
| void | setPhysicalSize (const QSize & size ) |
| void | setPhysicalSizeFollowsSize (bool follow ) |
| void | setPosition (const QPoint & pt ) |
| void | setScaleFactor (int scale ) |
| void | setSizeFollowsWindow (bool follow ) |
| void | setSubpixel (const Subpixel & subpixel ) |
| void | setTransform (const Transform & transform ) |
| void | setWindow (QWindow * window ) |
| bool | sizeFollowsWindow () const |
| Subpixel | subpixel () const |
| Transform | transform () const |
| virtual void | update () |
| QWindow * | window () const |
| void | availableGeometryChanged () |
| void | compositorChanged () |
| void | currentModeChanged () |
| void | geometryChanged () |
| void | manufacturerChanged () |
| void | modeAdded () |
| void | modelChanged () |
| void | physicalSizeChanged () |
| void | physicalSizeFollowsSizeChanged () |
| void | positionChanged () |
| void | scaleFactorChanged () |
| void | sizeFollowsWindowChanged () |
| void | subpixelChanged () |
| void | transformChanged () |
| void | windowChanged () |
| void | windowDestroyed () |
| QWaylandOutput * | fromResource (wl_resource * resource ) |
The QWaylandOutput class represents a displayable area managed by the compositor.
The QWaylandOutput manages a rectangular area within bounds of the compositor's geometry, to use it for displaying client content. This could, for instance, be a screen managed by the WaylandCompositor .
The class corresponds to the
wl_output
interface in the Wayland protocol.
This enum type is used to specify the subpixel arrangement of a QWaylandOutput .
| 常量 | 值 | 描述 |
|---|---|---|
QWaylandOutput::SubpixelUnknown
|
0
|
The subpixel arrangement is not set. |
QWaylandOutput::SubpixelNone
|
1
|
There are no subpixels. |
QWaylandOutput::SubpixelHorizontalRgb
|
2
|
The subpixels are arranged horizontally in red, green, blue order. |
QWaylandOutput::SubpixelHorizontalBgr
|
3
|
The subpixels are arranged horizontally in blue, green, red order. |
QWaylandOutput::SubpixelVerticalRgb
|
4
|
The subpixels are arranged vertically in red, green, blue order. |
QWaylandOutput::SubpixelVerticalBgr
|
5
|
The subpixels are arranged vertically in blue, green, red order. |
另請參閱 QWaylandOutput::subpixel .
* * This enum type is used to specify the orientation of a QWaylandOutput . * *
| 常量 | 值 | 描述 |
|---|---|---|
QWaylandOutput::TransformNormal
|
0
|
The orientation is normal. * |
QWaylandOutput::Transform90
|
1
|
The orientation is rotated 90 degrees. * |
QWaylandOutput::Transform180
|
2
|
The orientation is rotated 180 degrees. * |
QWaylandOutput::Transform270
|
3
|
The orientation is rotated 270 degrees. * |
QWaylandOutput::TransformFlipped
|
4
|
The orientation is mirrored. * |
QWaylandOutput::TransformFlipped90
|
5
|
The orientation is mirrored, and rotated 90 degrees. * |
QWaylandOutput::TransformFlipped180
|
6
|
The orientation is mirrored, and rotated 180 degrees. * |
QWaylandOutput::TransformFlipped270
|
7
|
The orientation is mirrored, and rotated 270 degrees. * * |
另請參閱 QWaylandOutput::transform .
This property holds the geometry of the QWaylandOutput available for displaying content. The available geometry is in output coordinates space, starts from 0,0 and it's as big as the output by default.
訪問函數:
| QRect | availableGeometry () const |
| void | setAvailableGeometry (const QRect & availableGeometry ) |
通知程序信號:
| void | availableGeometryChanged () |
另請參閱 QWaylandOutput::currentMode and QWaylandOutput::geometry .
訪問函數:
| QWaylandCompositor * | compositor () const |
通知程序信號:
| void | compositorChanged () |
This property holds the geometry of the QWaylandOutput .
訪問函數:
| QRect | geometry () const |
通知程序信號:
| void | geometryChanged () |
另請參閱 QWaylandOutput::currentMode .
This property holds a textual description of the manufacturer of this QWaylandOutput .
訪問函數:
| QString | 製造商 () const |
| void | setManufacturer (const QString & 製造商 ) |
通知程序信號:
| void | manufacturerChanged () |
This property holds a textual description of the model of this QWaylandOutput .
訪問函數:
| QString | model () const |
| void | setModel (const QString & model ) |
通知程序信號:
| void | modelChanged () |
This property holds the physical size of the QWaylandOutput in millimeters.
訪問函數:
| QSize | physicalSize () const |
| void | setPhysicalSize (const QSize & size ) |
通知程序信號:
| void | physicalSizeChanged () |
另請參閱 QWaylandOutput::geometry and QWaylandOutput::currentMode .
This property holds the position of this QWaylandOutput in the compositor's coordinate system.
訪問函數:
| QPoint | position () const |
| void | setPosition (const QPoint & pt ) |
通知程序信號:
| void | positionChanged () |
This property holds the factor by which the QWaylandCompositor scales surface buffers before they are displayed. This is used on high density output devices where unscaled content would be too small to be practical. The client can in turn set the scale factor of its buffer to match the output if it prefers to provide high resolution content that is suitable for the output device.
The default is 1 (no scaling).
訪問函數:
| int | scaleFactor () const |
| void | setScaleFactor (int scale ) |
通知程序信號:
| void | scaleFactorChanged () |
This property controls whether the size of the QWaylandOutput matches the size of its window.
If this property is true, all modes previously added are replaced by a mode that matches window size and screen refresh rate.
默認為 false。
訪問函數:
| bool | sizeFollowsWindow () const |
| void | setSizeFollowsWindow (bool follow ) |
通知程序信號:
| void | sizeFollowsWindowChanged () |
This property holds the subpixel arrangement of this QWaylandOutput 。默認為 QWaylandOutput::SubpixelUnknown .
訪問函數:
| Subpixel | subpixel () const |
| void | setSubpixel (const Subpixel & subpixel ) |
通知程序信號:
| void | subpixelChanged () |
This property holds the transformation that the QWaylandCompositor applies to a surface to compensate for the orientation of the QWaylandOutput .
默認為 QWaylandOutput::TransformNormal .
訪問函數:
| Transform | transform () const |
| void | setTransform (const Transform & transform ) |
通知程序信號:
| void | transformChanged () |
此特性保持 QWindow 為此 QWaylandOutput .
訪問函數:
| QWindow * | window () const |
| void | setWindow (QWindow * window ) |
通知程序信號:
| void | windowChanged () |
Default constructs an instance of QWaylandOutput.
構造 QWaylandOutput in compositor and with the specified window 。 create() function must be called on the compositor before constructing a QWaylandOutput for it.
The QWaylandOutput object is initialized later, in reaction to an event. At this point it is added as an output for the compositor . If it is the first QWaylandOutput object created for this compositor , it becomes the default output .
銷毀 QWaylandOutput .
Adds the mode
mode
to the output and mark it as preferred if
preferred
is
true
. Please note there can only be one preferred mode.
Returns the compositor for this QWaylandOutput .
注意: getter 函數對於特性 compositor .
Returns the output's size in pixels and refresh rate in mHz. If the current mode is not set it will return an invalid mode.
另請參閱 setCurrentMode (), QWaylandOutput::modes ,和 QWaylandOutputMode .
[signal]
void
QWaylandOutput::
currentModeChanged
()
Informs QWaylandOutput that a frame has started.
[static]
QWaylandOutput
*QWaylandOutput::
fromResource
(
wl_resource
*
resource
)
返迴 QWaylandOutput 對應 resource .
[signal]
void
QWaylandOutput::
modeAdded
()
Returns the list of modes.
另請參閱 setPhysicalSizeFollowsSize ().
[signal]
void
QWaylandOutput::
physicalSizeFollowsSizeChanged
()
Sends pending frame callbacks.
Sets the current mode. The mode mode must have been previously added.
另請參閱 currentMode (), QWaylandOutput::modes ,和 QWaylandOutputMode .
另請參閱 physicalSizeFollowsSize ().
[虛擬]
void
QWaylandOutput::
update
()
調度 QEvent::UpdateRequest to be delivered to the QWaylandOutput 's window .
另請參閱 QWindow::requestUpdate ().
[signal]
void
QWaylandOutput::
windowDestroyed
()