From 38ee62537b483ab7412fb448c86010d48998e324 Mon Sep 17 00:00:00 2001 From: bernd Date: Wed, 20 Jul 2011 06:00:02 +0200 Subject: [PATCH] Correct LED colors and positions --- simulat0r/gui/qsimulat0r.cc | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/simulat0r/gui/qsimulat0r.cc b/simulat0r/gui/qsimulat0r.cc index a5ae2d9..f519766 100644 --- a/simulat0r/gui/qsimulat0r.cc +++ b/simulat0r/gui/qsimulat0r.cc @@ -27,6 +27,15 @@ extern int lcd_layout; time_t starttime; long framecount=0; +const int colorGreenLED=QColor(0,255,0).rgb(); +const int colorRedLED=QColor(255,0,0).rgb(); +const int colorOffLED=QColor(64,64,64).rgb(); + +const int colorPixelOn=QColor(255,192,0).rgb(); +const int colorPixelOff=QColor(64,64,64).rgb(); +const int colorInvertedPixelOn=QColor(128,128,128).rgb(); // inverted and on => dark +const int colorInvertedPixelOff=QColor(128,255,128).rgb(); // inverted and off => bright + class LCD : public QWidget { public: static const int ledsize=10; @@ -41,8 +50,8 @@ public: static const int dimx=RESX; //96; static const int dimy=RESY; - void drawLED(QImage& pixmap,int led, int x, int y) { - int color=simGetLED(led)?QColor(255,0,0).rgb():QColor(64,64,64).rgb(); + void drawLED(QImage& pixmap,int led, int x, int y,int colorOn) { + int color=simGetLED(led)?colorOn:colorOffLED; for(int minix=0; minix