MCPcopy Create free account
hub / github.com/CE-Programming/CEmu / LCDWidget

Method LCDWidget

gui/qt/lcdwidget.cpp:25–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23#include <cmath>
24
25LCDWidget::LCDWidget(QWidget *parent) : QWidget{parent} {
26 installEventFilter(keypadBridge);
27 m_mutex.lock();
28 m_renderedFrame = QImage(LCD_WIDTH, LCD_HEIGHT, QImage::Format_RGB32);
29 m_blendedFrame = QImage(LCD_WIDTH, LCD_HEIGHT, QImage::Format_RGB32);
30 m_currFrame = &m_renderedFrame;
31 m_mutex.unlock();
32 m_interlaceAlpha = QImage(LCD_WIDTH, LCD_HEIGHT, QImage::Format_Alpha8);
33 uint8_t* interlacePixels = reinterpret_cast<uint8_t*>(m_interlaceAlpha.bits());
34 for (size_t index = 0; index < LCD_WIDTH * LCD_HEIGHT; index += 2) {
35 interlacePixels[index] = 255 * 4 / 10;
36 interlacePixels[index + 1] = 255 * 6 / 10;
37 }
38}
39
40void LCDWidget::paintEvent(QPaintEvent*) {
41 if (!guiEmuValid) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected