Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
SyntheticVideoScene Struct Reference

#include <qsyntheticvideoscene_p.h>

Collaboration diagram for SyntheticVideoScene:

Public Member Functions

QRect insetRect () const
QVariantMap toVariantMap () const

Static Public Member Functions

static SyntheticVideoScene fromVariantMap (const QVariantMap &map)

Public Attributes

QSize frameSize { 1920, 1080 }
QRect patternRect { 200, 100, 430, 351 }
QColor backgroundColor { Qt::black }
QColor firstColor { 0xFF, 0, 0 }
QColor secondColor { 0, 0, 0xFF }
bool animated = false
qreal scale = 1.0

Detailed Description

Describes the content of a synthetic video frame – a virtual "screen" for screen-capture tests, or a virtual camera image.

The same description drives both the real widget shown on screen and the synthetic PipeWire source used by QFakeXdgPortalFixture, so that a test can make identical pixel assertions whichever of the two produced the frame. Keeping one paint routine (paintSyntheticVideoScene()) is the point: it makes "the fake source shows the same thing as the widget" structural rather than a duplicated implementation that can drift.

Definition at line 41 of file qsyntheticvideoscene_p.h.

Member Function Documentation

◆ fromVariantMap()

SyntheticVideoScene SyntheticVideoScene::fromVariantMap ( const QVariantMap & map)
staticnodiscard

Definition at line 32 of file qsyntheticvideoscene.cpp.

References animated.

◆ insetRect()

QRect SyntheticVideoScene::insetRect ( ) const
inlinenodiscard

Definition at line 63 of file qsyntheticvideoscene_p.h.

◆ toVariantMap()

QVariantMap SyntheticVideoScene::toVariantMap ( ) const
nodiscard

Definition at line 15 of file qsyntheticvideoscene.cpp.

Member Data Documentation

◆ animated

bool SyntheticVideoScene::animated = false

Definition at line 52 of file qsyntheticvideoscene_p.h.

Referenced by fromVariantMap().

◆ backgroundColor

QColor SyntheticVideoScene::backgroundColor { Qt::black }

Definition at line 47 of file qsyntheticvideoscene_p.h.

◆ firstColor

QColor SyntheticVideoScene::firstColor { 0xFF, 0, 0 }

Definition at line 48 of file qsyntheticvideoscene_p.h.

◆ frameSize

QSize SyntheticVideoScene::frameSize { 1920, 1080 }

Definition at line 44 of file qsyntheticvideoscene_p.h.

◆ patternRect

QRect SyntheticVideoScene::patternRect { 200, 100, 430, 351 }

Definition at line 46 of file qsyntheticvideoscene_p.h.

◆ scale

qreal SyntheticVideoScene::scale = 1.0

Definition at line 60 of file qsyntheticvideoscene_p.h.

◆ secondColor

QColor SyntheticVideoScene::secondColor { 0, 0, 0xFF }

Definition at line 49 of file qsyntheticvideoscene_p.h.


The documentation for this struct was generated from the following files: