aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/lcddisplayview.h
blob: 010a1065ec7015b024f383871b460b70d4fd7279 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef LCDDISPLAYVIEW_H
#define LCDDISPLAYVIEW_H

#include <QWidget>
#include <QImage>

#include "lcddisplay.h"

class LcdDisplayView : public QWidget
{
    Q_OBJECT

    using Super = QWidget;

public:
    explicit LcdDisplayView(QWidget *parent = 0);
    ~LcdDisplayView();

    void setup(machine::LcdDisplay *lcd_display);

public slots:
    void pixel_update(uint x, uint y, uint r, uint g, uint b);

protected:
    virtual void paintEvent(QPaintEvent *event)  override;

private:
     QImage *fb_pixels;
};

#endif // LCDDISPLAYVIEW_H