QWaylandOutput Class
QWaylandOutput クラスは、コンポジターによって管理される表示可能領域を表します。詳細...
| ヘッダー: | #include <QWaylandOutput> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor) target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor) |
| qmake: | QT += waylandcompositor |
| QML内: | WaylandOutput |
| 継承元: | QWaylandObject |
パブリック型
| enum | Subpixel { SubpixelUnknown, SubpixelNone, SubpixelHorizontalRgb, SubpixelHorizontalBgr, SubpixelVerticalRgb, SubpixelVerticalBgr } |
| enum | Transform { TransformNormal, Transform90, Transform180, Transform270, TransformFlipped, …, TransformFlipped270 } |
プロパティ
|
|
パブリック関数
| QWaylandOutput(QWaylandCompositor *compositor, QWindow *window) | |
| virtual | ~QWaylandOutput() override |
| 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 |
| QPoint | position() const |
| int | scaleFactor() const |
| void | sendFrameCallbacks() |
| void | setAvailableGeometry(const QRect &availableGeometry) |
| void | setCurrentMode(const QWaylandOutputMode &mode) |
| void | setManufacturer(const QString &manufacturer) |
| void | setModel(const QString &model) |
| void | setPhysicalSize(const QSize &size) |
| void | setPosition(const QPoint &pt) |
| void | setScaleFactor(int scale) |
| void | setSizeFollowsWindow(bool follow) |
| void | setSubpixel(const QWaylandOutput::Subpixel &subpixel) |
| void | setTransform(const QWaylandOutput::Transform &transform) |
| void | setWindow(QWindow *window) |
| bool | sizeFollowsWindow() const |
| QWaylandOutput::Subpixel | subpixel() const |
| QWaylandOutput::Transform | transform() const |
| virtual void | update() |
| QWindow * | window() const |
シグナル
| void | availableGeometryChanged() |
| void | compositorChanged() |
| void | geometryChanged() |
| void | manufacturerChanged() |
| void | modelChanged() |
| void | physicalSizeChanged() |
| void | positionChanged() |
| void | scaleFactorChanged() |
| void | sizeFollowsWindowChanged() |
| void | subpixelChanged() |
| void | transformChanged() |
| void | windowChanged() |
静的パブリックメンバー
| QWaylandOutput * | fromResource(wl_resource *resource) |
詳細な説明
QWaylandOutput は、コンポジターのジオメトリの境界内にある矩形領域を管理し、クライアントのコンテンツを表示するために使用します。これは、例えば、WaylandCompositor によって管理される画面などです。
このクラスは、Wayland プロトコルにおける `wl_output ` インターフェースに対応しています。
メンバ型のドキュメント
enum QWaylandOutput::Subpixel
この列挙型は、QWaylandOutput のサブピクセル配置を指定するために使用されます。
| 定数 | 値 | 説明 |
|---|---|---|
QWaylandOutput::SubpixelUnknown | 0 | サブピクセルの配置は設定されていません。 |
QWaylandOutput::SubpixelNone | 1 | サブピクセルは設定されていません。 |
QWaylandOutput::SubpixelHorizontalRgb | 2 | サブピクセルは、赤、緑、青の順で水平方向に配置されています。 |
QWaylandOutput::SubpixelHorizontalBgr | 3 | サブピクセルは、青、緑、赤の順で水平方向に配置されています。 |
QWaylandOutput::SubpixelVerticalRgb | 4 | サブピクセルは、赤、緑、青の順に垂直に配置されています。 |
QWaylandOutput::SubpixelVerticalBgr | 5 | サブピクセルは、青、緑、赤の順で垂直に配置されています。 |
QWaylandOutput::subpixelも参照してください 。
enum QWaylandOutput::Transform
* * この列挙型は、QWaylandOutput の向きを指定するために使用されます。 * *
| 定数 | 値 | 説明 |
|---|---|---|
QWaylandOutput::TransformNormal | 0 | 向きは通常です。 * |
QWaylandOutput::Transform90 | 1 | 向きが90度回転しています。 * |
QWaylandOutput::Transform180 | 2 | 向きが180度回転しています。 * |
QWaylandOutput::Transform270 | 3 | 向きが270度回転しています。 * |
QWaylandOutput::TransformFlipped | 4 | 向きが反転しています。 * |
QWaylandOutput::TransformFlipped90 | 5 | 向きが反転し、90度回転しています。 * |
QWaylandOutput::TransformFlipped180 | 6 | 向きが反転され、180度回転されています。 * |
QWaylandOutput::TransformFlipped270 | 7 | 向きが反転され、270度回転しています。 * * |
QWaylandOutput::transformも参照してください 。
プロパティのドキュメント
availableGeometry : QRect
このプロパティは、コンテンツの表示に使用可能なQWaylandOutput のジオメトリを保持します。利用可能なジオメトリは出力座標空間にあり、0,0から始まり、デフォルトでは出力領域と同じ大きさになります。
アクセス関数:
| QRect | availableGeometry() const |
| void | setAvailableGeometry(const QRect &availableGeometry) |
通知シグナル:
| void | availableGeometryChanged() |
関連項目: QWaylandOutput::currentMode およびQWaylandOutput::geometry 。
compositor : QWaylandCompositor*
このプロパティは、このQWaylandOutput にコンテンツを表示するコンポジターを保持します。
注:この プロパティは、QWaylandOutput が初期化される前に、1回のみ設定できます。
アクセス関数:
| QWaylandCompositor * | compositor() const |
通知シグナル:
| void | compositorChanged() |
[read-only] geometry : QRect
このプロパティは、QWaylandOutput のジオメトリを保持します。
アクセス関数:
| QRect | geometry() const |
通知シグナル:
| void | geometryChanged() |
「QWaylandOutput::currentMode」も参照してください 。
manufacturer : QString
このプロパティには、このQWaylandOutput によって管理されているディスプレイの製造元に関する説明文が格納されています。
アクセス関数:
| QString | manufacturer() const |
| void | setManufacturer(const QString &manufacturer) |
通知信号:
| void | manufacturerChanged() |
model : QString
このプロパティには、このQWaylandOutput によって管理される表示モデルの説明文が格納されています。
アクセス関数:
| QString | model() const |
| void | setModel(const QString &model) |
通知信号:
| void | modelChanged() |
physicalSize : QSize
このプロパティには、QWaylandOutput の物理的なサイズ(ミリメートル単位)が格納されます。
アクセス関数:
| QSize | physicalSize() const |
| void | setPhysicalSize(const QSize &size) |
通知信号:
| void | physicalSizeChanged() |
関連項目: QWaylandOutput::geometry およびQWaylandOutput::currentMode 。
position : QPoint
このプロパティは、コンポジターの座標系におけるこのQWaylandOutput の位置を表します。
アクセス関数:
| QPoint | position() const |
| void | setPosition(const QPoint &pt) |
通知シグナル:
| void | positionChanged() |
scaleFactor : int
このプロパティは、QWaylandCompositor がサーフェスバッファを表示する前にスケーリングを行う際の倍率を保持します。これは、スケーリングを行わないとコンテンツが小さすぎて実用的な表示ができないような高密度出力デバイスで使用されます。クライアントは、出力デバイスに適した高解像度のコンテンツを提供したい場合、出力に合わせてバッファのスケーリング倍率を設定することができます。
デフォルトは 1(スケーリングなし)です。
アクセス関数:
| int | scaleFactor() const |
| void | setScaleFactor(int scale) |
通知シグナル:
| void | scaleFactorChanged() |
sizeFollowsWindow : bool
このプロパティは、QWaylandOutput のサイズをそのウィンドウのサイズに合わせるかどうかを制御します。
このプロパティが true の場合、以前に追加されたすべてのモードが、ウィンドウのサイズと画面のリフレッシュレートに一致するモードに置き換えられます。
デフォルトは false です。
アクセス関数:
| bool | sizeFollowsWindow() const |
| void | setSizeFollowsWindow(bool follow) |
Notifier シグナル:
| void | sizeFollowsWindowChanged() |
subpixel : QWaylandOutput::Subpixel
このプロパティは、このQWaylandOutput のサブピクセル配置を保持します。デフォルトはQWaylandOutput::SubpixelUnknown です。
アクセス関数:
| QWaylandOutput::Subpixel | subpixel() const |
| void | setSubpixel(const QWaylandOutput::Subpixel &subpixel) |
通知シグナル:
| void | subpixelChanged() |
transform : QWaylandOutput::Transform
このプロパティは、QWaylandCompositor がサーフェスに適用する変換を保持しており、QWaylandOutput の向きを補正するために使用されます。
デフォルトはQWaylandOutput::TransformNormal です。
アクセス関数:
| QWaylandOutput::Transform | transform() const |
| void | setTransform(const QWaylandOutput::Transform &transform) |
通知シグナル:
| void | transformChanged() |
window : QWindow*
このプロパティは、このQWaylandOutput に対する「QWindow 」を保持しています。
アクセス関数:
| QWindow * | window() const |
| void | setWindow(QWindow *window) |
通知信号:
| void | windowChanged() |
メンバ関数のドキュメント
QWaylandOutput::QWaylandOutput(QWaylandCompositor *compositor, QWindow *window)
compositor 内で、指定されたwindow を使用してQWaylandOutputを構築します。QWaylandOutputを構築する前に、compositor に対してcreate()関数を呼び出す必要があります。
QWaylandOutput オブジェクトは、後でイベントに応答して初期化されます。この時点で、compositor の出力として追加されます。このcompositor に対して作成された最初の QWaylandOutput オブジェクトである場合、そのオブジェクトがdefault output となります。
[override virtual noexcept] QWaylandOutput::~QWaylandOutput()
QWaylandOutput を削除します。
void QWaylandOutput::addMode(const QWaylandOutputMode &mode, bool preferred = false)
出力にモード「mode 」を追加し、preferred がtrue の場合、それを優先モードとしてマークします。なお、優先モードは1つしか設定できない点にご注意ください。
QWaylandCompositor *QWaylandOutput::compositor() const
このQWaylandOutput のコンポジターを返します。
注: compositor プロパティのゲッター 関数です。
QWaylandOutputMode QWaylandOutput::currentMode() const
出力のサイズ(ピクセル単位)とリフレッシュレート(mHz単位)を返します。現在のモードが設定されていない場合は、無効なモードが返されます。
関連項目: setCurrentMode()、QWaylandOutput::modes 、およびQWaylandOutputMode 。
void QWaylandOutput::frameStarted()
QWaylandOutput に対し、フレームが開始されたことを通知します。
[static] QWaylandOutput *QWaylandOutput::fromResource(wl_resource *resource)
resource に対応するQWaylandOutput を返します。
QList<QWaylandOutputMode> QWaylandOutput::modes() const
モードのリストを返します。
void QWaylandOutput::sendFrameCallbacks()
保留中のフレームのコールバックを送信します。
void QWaylandOutput::setCurrentMode(const QWaylandOutputMode &mode)
現在のモードを設定します。モード「mode 」は、あらかじめ追加されている必要があります。
currentMode()、QWaylandOutput::modes 、およびQWaylandOutputModeも参照してください 。
[virtual] void QWaylandOutput::update()
QEvent::UpdateRequest を、QWaylandOutput のwindow 宛てに配信するようにスケジュールします。
QWindow::requestUpdate()も参照してください 。
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.