lcd_gfx_qt.h
Go to the documentation of this file.00001
00039 #ifndef DRV_LCD_GFX_QT_H
00040 #define DRV_LCD_GFX_QT_H
00041
00042
00043 #include <cfg/compiler.h>
00044
00045 #include <QtGui/QColor>
00046 #include <QtGui/QFrame>
00047
00048
00049 class QSizePolicy;
00050 class QPaintEvent;
00051 class QResizeEvent;
00052
00053 #define CONFIG_EMULLCD_SCALE 1
00054
00055 class EmulLCD : public QFrame
00056 {
00057 Q_OBJECT
00058
00059 public:
00060
00061 enum { WIDTH = 128, HEIGHT = 64 };
00062
00063
00064 EmulLCD(QWidget *parent = 0);
00065 virtual ~EmulLCD();
00066
00067
00068 protected:
00069 virtual void paintEvent(QPaintEvent *event);
00070
00071 #if CONFIG_EMULLCD_SCALE
00072 virtual int heightForWidth(int w) const;
00073 #endif
00074
00075
00076 public:
00077 void writeRaster(uint8_t *raster);
00078
00079
00080 protected:
00082 int frame_width;
00083
00085 QColor fg_color;
00086 QBrush bg_brush;
00087
00089 unsigned char raster[(WIDTH + 7 / 8) * HEIGHT];
00090 };
00091
00092 #endif // DRV_LCD_GFX_QT_H