QWaylandOutput Class
The QWaylandOutput class represents a displayable area managed by the compositor. More...
Header: | #include <QWaylandOutput> |
qmake: | QT += waylandcompositor |
Inherits: | QWaylandObject |
This class is under development and is subject to change.
Public Types
class | Mode |
enum | Subpixel { SubpixelUnknown, SubpixelNone, SubpixelHorizontalRgb, SubpixelHorizontalBgr, SubpixelVerticalRgb, SubpixelVerticalBgr } |
enum | Transform { TransformNormal, Transform90, Transform180, Transform270, ..., TransformFlipped270 } |
Properties
|
|
Public Functions
QWaylandOutput() | |
QWaylandOutput(QWaylandCompositor *compositor, QWindow *window) | |
~QWaylandOutput() | |
QRect | availableGeometry() const |
QWaylandCompositor * | compositor() const |
void | frameStarted() |
QRect | geometry() const |
QString | manufacturer() const |
Mode | mode() const |
QString | model() const |
QSize | physicalSize() const |
bool | physicalSizeFollowsSize() const |
QPoint | position() const |
int | scaleFactor() const |
void | sendFrameCallbacks() |
void | setAvailableGeometry(const QRect &availableGeometry) |
void | setGeometry(const QRect &geometry) |
void | setHeight(int newHeight) |
void | setManufacturer(const QString &manufacturer) |
void | setMode(const Mode &mode) |
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 | setWidth(int newWidth) |
void | setWindow(QWindow *window) |
bool | sizeFollowsWindow() const |
Subpixel | subpixel() const |
Transform | transform() const |
virtual void | update() |
QWindow * | window() const |
- 5 public functions inherited from QWaylandObject
Signals
void | availableGeometryChanged() |
void | compositorChanged() |
void | geometryChanged() |
void | manufacturerChanged() |
void | modeChanged() |
void | modelChanged() |
void | physicalSizeChanged() |
void | physicalSizeFollowsSizeChanged() |
void | positionChanged() |
void | scaleFactorChanged() |
void | sizeFollowsWindowChanged() |
void | subpixelChanged() |
void | transformChanged() |
void | windowChanged() |
void | windowDestroyed() |
Static Public Members
QWaylandOutput * | fromResource(wl_resource *resource) |
Detailed Description
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.
Member Type Documentation
enum QWaylandOutput::Subpixel
This enum type is used to specify the subpixel arrangement of a QWaylandOutput.
Constant | Value | Description |
---|---|---|
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. |
See also QWaylandOutput::subpixel.
enum QWaylandOutput::Transform
* * This enum type is used to specify the orientation of a QWaylandOutput. * *
Constant | Value | Description |
---|---|---|
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. * * |
See also QWaylandOutput::transform.
Property Documentation
availableGeometry : QRect
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.
Access functions:
QRect | availableGeometry() const |
void | setAvailableGeometry(const QRect &availableGeometry) |
Notifier signal:
void | availableGeometryChanged() |
See also QWaylandOutput::mode and QWaylandOutput::geometry.
compositor : QWaylandCompositor * const
Access functions:
QWaylandCompositor * | compositor() const |
Notifier signal:
void | compositorChanged() |
geometry : const QRect
This property holds the geometry of the QWaylandOutput.
Access functions:
QRect | geometry() const |
Notifier signal:
void | geometryChanged() |
See also QWaylandOutput::mode.
manufacturer : QString
This property holds a textual description of the manufacturer of this QWaylandOutput.
Access functions:
QString | manufacturer() const |
void | setManufacturer(const QString &manufacturer) |
Notifier signal:
void | manufacturerChanged() |
mode : QWaylandOutput::Mode
This property holds the output's size in pixels and refresh rate in Hz.
Access functions:
Mode | mode() const |
void | setMode(const Mode &mode) |
Notifier signal:
void | modeChanged() |
model : QString
This property holds a textual description of the model of this QWaylandOutput.
Access functions:
QString | model() const |
void | setModel(const QString &model) |
Notifier signal:
void | modelChanged() |
physicalSize : QSize
This property holds the physical size of the QWaylandOutput in millimeters.
Access functions:
QSize | physicalSize() const |
void | setPhysicalSize(const QSize &size) |
Notifier signal:
void | physicalSizeChanged() |
See also QWaylandOutput::geometry and QWaylandOutput::mode.
position : QPoint
This property holds the position of this QWaylandOutput in the compositor's coordinate system.
Access functions:
QPoint | position() const |
void | setPosition(const QPoint &pt) |
Notifier signal:
void | positionChanged() |
scaleFactor : int
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).
Access functions:
int | scaleFactor() const |
void | setScaleFactor(int scale) |
Notifier signal:
void | scaleFactorChanged() |
sizeFollowsWindow : bool
This property controls whether the size of the QWaylandOutput matches the size of its window.
The default is true
if this QWaylandOutput has a window.
Access functions:
bool | sizeFollowsWindow() const |
void | setSizeFollowsWindow(bool follow) |
Notifier signal:
void | sizeFollowsWindowChanged() |
subpixel : QWaylandOutput::Subpixel
This property holds the subpixel arrangement of this QWaylandOutput. The default is QWaylandOutput::SubpixelUnknown.
Access functions:
Subpixel | subpixel() const |
void | setSubpixel(const Subpixel &subpixel) |
Notifier signal:
void | subpixelChanged() |
transform : QWaylandOutput::Transform
This property holds the transformation that the QWaylandCompositor applies to a surface to compensate for the orientation of the QWaylandOutput.
The default is QWaylandOutput::TransformNormal.
Access functions:
Transform | transform() const |
void | setTransform(const Transform &transform) |
Notifier signal:
void | transformChanged() |
window : QWindow *
This property holds the QWindow for this QWaylandOutput.
Access functions:
QWindow * | window() const |
void | setWindow(QWindow *window) |
Notifier signal:
void | windowChanged() |
Member Function Documentation
QWaylandOutput::QWaylandOutput()
Default constructs an instance of QWaylandOutput.
QWaylandOutput::QWaylandOutput(QWaylandCompositor *compositor, QWindow *window)
Constructs a QWaylandOutput in compositor and with the specified window. The 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::~QWaylandOutput()
Destroys the QWaylandOutput.
QWaylandCompositor *QWaylandOutput::compositor() const
Returns the compositor for this QWaylandOutput.
Note: Getter function for property compositor.
void QWaylandOutput::frameStarted()
Informs QWaylandOutput that a frame has started.
[static]
QWaylandOutput *QWaylandOutput::fromResource(wl_resource *resource)
Returns the QWaylandOutput corresponding to resource.
bool QWaylandOutput::physicalSizeFollowsSize() const
See also setPhysicalSizeFollowsSize().
[signal]
void QWaylandOutput::physicalSizeFollowsSizeChanged()
void QWaylandOutput::sendFrameCallbacks()
Sends pending frame callbacks.
void QWaylandOutput::setGeometry(const QRect &geometry)
See also geometry().
void QWaylandOutput::setHeight(int newHeight)
Sets the height of this QWaylandOutput to newHeight.
See also setWidth and QWaylandOutput::geometry.
void QWaylandOutput::setPhysicalSizeFollowsSize(bool follow)
See also physicalSizeFollowsSize().
void QWaylandOutput::setWidth(int newWidth)
Sets the width of this QWaylandOutput to newWidth.
See also setHeight and QWaylandOutput::geometry.
[virtual]
void QWaylandOutput::update()
Schedules a QEvent::UpdateRequest to be delivered to the QWaylandOutput's window.
See also QWindow::requestUpdate().