lcd_gfx_qt.h
Go to the documentation of this file.00001
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059 #ifndef DRV_LCD_GFX_QT_H
00060 #define DRV_LCD_GFX_QT_H
00061
00062 #include <QtGui/QColor>
00063 #include <QtGui/QFrame>
00064
00065
00066 class QSizePolicy;
00067 class QPaintEvent;
00068 class QResizeEvent;
00069
00070
00071 class EmulLCD : public QFrame
00072 {
00073 Q_OBJECT
00074
00075 public:
00076
00077 enum { WIDTH = 128, HEIGHT = 64 };
00078
00079
00080 EmulLCD(QWidget *parent = 0, const char *name = 0);
00081 virtual ~EmulLCD();
00082
00083
00084 protected:
00085 virtual QSizePolicy sizePolicy() const;
00086 virtual QSize sizeHint() const;
00087 virtual void paintEvent(QPaintEvent *event);
00088
00089
00090 public:
00091 void writeRaster(uint8_t *raster);
00092
00093
00094 protected:
00096 int frame_width;
00097
00099 QColor fg_color, bg_color;
00100
00102 unsigned char raster[(WIDTH * HEIGHT) / 8];
00103 };
00104
00105 #endif // DRV_LCD_GFX_QT_H