forked from zetta-shao/LCD12864emu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lcdemu.h
38 lines (31 loc) · 813 Bytes
/
lcdemu.h
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
32
33
34
35
36
37
38
#ifndef LCDEMU_H
#define LCDEMU_H
#include <QWidget>
#include <QPainter>
#include <QKeyEvent>
#include "ssd1306.h"
using namespace std;
class LCDemu : public QWidget {
Q_OBJECT
public:
explicit LCDemu(QWidget *parent);
~LCDemu(void);
void update();
void setlcd(SSD1306_t *p);
void start(void);
void task_key1(void);
void task_key2(void);
void task_key3(void);
void task_key4(void);
protected:
void paintEvent(QPaintEvent *event) override;
void keyPressEvent(QKeyEvent *event) override;
//bool event(QEvent *event) override;
private:
SSD1306_t *lcddev;
QPixmap m_pixmap;
QImage *m_pQimage;
uint32_t m_scale_w;
uint32_t m_scale_h;
};
#endif // LCDEMU_H