ToolX 1.11.1 [e3f477f]
A GUI debug tool chain for diagnosing GVA systems
Loading...
Searching...
No Matches
TestCardPreview Class Reference

The TestCardPreview class renders test card patterns locally at 25 Hz. More...

#include <testcard_preview.h>

Inheritance diagram for TestCardPreview:
Inheritance graph
Collaboration diagram for TestCardPreview:
Collaboration graph

Public Slots

void startPreview ()
 Start playing the preview at 25 Hz.
void stopPreview ()
 Stop the preview.
void setPattern (int index)
 Change the test card pattern.
void setWidth (int width)
 Change the preview resolution width.
void setHeight (int height)
 Change the preview resolution height.

Public Member Functions

 TestCardPreview (Ui::Dialog &ui, QWidget *parent=nullptr)
 Construct a new TestCardPreview object.
 ~TestCardPreview () final
 Destroy the TestCardPreview object.

Protected Member Functions

bool eventFilter (QObject *obj, QEvent *event) override
 Event filter to handle resize events on the preview view.

Private Slots

void renderFrame ()
 Timer callback to render the next frame.

Private Member Functions

void generateTestCard ()
 Generate the test card into the buffer.

Private Attributes

Ui::Dialog & m_ui
 The main UI reference.
QTimer m_timer
 Timer for 25 Hz frame updates.
QGraphicsScene * m_scene = nullptr
 The graphics scene.
QGraphicsPixmapItem * m_pixmapItem = nullptr
 The pixmap item in the scene.
std::vector< uint8_t > m_buffer
 Raw pixel buffer (RGB24).
int m_pattern = 0
 Current test card pattern index.
uint32_t m_width = 640
 Preview width.
uint32_t m_height = 480
 Preview height.
bool m_running = false
 Whether preview is running.
uint64_t m_frameCount = 0
 Frame counter for animated patterns.
mediax::rtp::TestCardState m_state
 Animation state carried between frames.

Detailed Description

The TestCardPreview class renders test card patterns locally at 25 Hz.

Constructor & Destructor Documentation

◆ TestCardPreview()

TestCardPreview::TestCardPreview ( Ui::Dialog & ui,
QWidget * parent = nullptr )
explicit

Construct a new TestCardPreview object.

Parameters
uiReference to the main UI
parentOptional parent widget

Member Function Documentation

◆ eventFilter()

bool TestCardPreview::eventFilter ( QObject * obj,
QEvent * event )
overrideprotected

Event filter to handle resize events on the preview view.

Parameters
objThe object that received the event
eventThe event
Returns
true if the event was handled

◆ setHeight

void TestCardPreview::setHeight ( int height)
slot

Change the preview resolution height.

Parameters
heightThe height in pixels

◆ setPattern

void TestCardPreview::setPattern ( int index)
slot

Change the test card pattern.

Parameters
indexThe pattern index

◆ setWidth

void TestCardPreview::setWidth ( int width)
slot

Change the preview resolution width.

Parameters
widthThe width in pixels

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