aboutsummaryrefslogtreecommitdiffhomepage
path: root/debugger/QT/SkRasterWidget.h
blob: a0355c1f174ce5746dfeda9e9b63ecac241cdd36 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
 * SkRasterWidget.h
 *
 *  Created on: Jul 28, 2012
 *      Author: chudy
 */


#ifndef SKRASTERWIDGET_H_
#define SKRASTERWIDGET_H_

#include "SkGpuDevice.h"
#include "SkDevice.h"
#include "SkDebugger.h"

#include <QApplication>
#include <QtGui>
#include <QWidget>

class  SkRasterWidget : public QWidget {
    Q_OBJECT

public:
    SkRasterWidget(SkDebugger* debugger);

    ~SkRasterWidget();

    void draw() {
        this->update();
    }

signals:
    void drawComplete();

protected:
    void paintEvent(QPaintEvent* event);

    void resizeEvent(QResizeEvent* event);

private:
    SkBitmap fBitmap;
    SkDebugger* fDebugger;
    SkCanvas* fCanvas;
    SkDevice* fDevice;
};

#endif /* SKRASTERWIDGET_H_ */