3
* BW_LED_Number a very very primitive LED
5
* Copyright: Bernd Johannes Wuebben, wuebben@math.cornell.edu
8
* $Id: bwlednum.h,v 1.2 1999/03/01 23:38:00 kulow Exp $
10
* $Log: bwlednum.h,v $
11
* Revision 1.2 1999/03/01 23:38:00 kulow
12
* CVS_SILENT ported to Qt 2.0
14
* Revision 1.1.1.1.6.1 1999/02/22 22:28:46 kulow
15
* CVS_SILENT replaced old qt header names with new ones
17
* Revision 1.1.1.1 1997/07/04 21:23:49 kulow
18
* Coolo: added Bernd's kscd
20
* Revision 1.1 1997/06/21 23:10:11 wuebben
23
* Revision 1.2 1997/03/22 22:09:37 wuebben
24
* Added support for visibe non-illuminated Segments
26
* Revision 1.1 1997/03/22 12:45:25 wuebben
39
#include <qbitarray.h>
42
class BW_LED_Number : public QFrame
48
BW_LED_Number( QWidget *parent=0, const char *name=0 );
51
void setSmallLED(bool ); // if you LED is small it might look better
52
// if you call setSmallLED(TRUE)
54
// this sets the fore and background color of the LED
55
// the forground defaults to yellow, the background defaults
58
void setLEDColor( const QColor& foregroundColor, const QColor& backgroundColor );
61
// this sets the color of the segments that are not iluminated
62
// the default is a rather dark red.
64
void setLEDoffColor(QColor color);
66
// calling showOffColon(TRUE) will show the colon if not illuminated
67
// this is rather ugly -- the default is that they are not shown.
69
void showOffColon(bool off);
73
// display one of the characters " 0 1 2 3 4 5 6 7 8 9 . : - "
74
void display( char c );
76
// display on e of the numbers " 0 1 2 3 4 5 6 7 8 9"
77
void display( int i );
81
void resizeEvent( QResizeEvent * );
82
void drawContents( QPainter * );
86
bool seg_contained_in( char c, char* seg);
87
void drawSegment( const QPoint &, char, QPainter &, int, bool = FALSE );
88
void drawSymbol( QPainter *p,char s ,bool repaint);
91
char* current_segments;
103
private: // Disabled copy constructor and operator=
105
BW_LED_Number( const BW_LED_Number & ) {}
106
BW_LED_Number &operator=( const BW_LED_Number & ) { return *this; }
111
#endif // BW_LED_NUM_H