aboutsummaryrefslogtreecommitdiff
path: root/app/draw.hpp
blob: f8e93a4a3b32382ae50d6579d3b61b742845b26c (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
#ifndef DRAW_H
#define DRAW_H

#include <qimage.h>
#include <qtimer.h>
#include <qwidget.h>

class DrawWidget : public QWidget {
    Q_OBJECT

    public:
        DrawWidget(unsigned width, unsigned height);
        void paintEvent(QPaintEvent*);

        QRgb *m_drawbuffer;
        unsigned m_width, m_height;

        ~DrawWidget();
    private slots:
        void redraw();

    private:
        QImage m_img;
        unsigned char i;

        QTimer m_timer;
};

#endif