3
* BW_LED_Number a very very primitive LED
5
* Copyright: Bernd Johannes Wuebben, wuebben@math.cornell.edu
8
* $Id: bwlednum.h,v 1.4 1999/06/27 17:57:34 kulow Exp $
10
* $Log: bwlednum.h,v $
11
* Revision 1.4 1999/06/27 17:57:34 kulow
12
* fixes for --enable-final and other problems :)
14
* Revision 1.3 1999/03/01 23:37:24 kulow
15
* CVS_SILENT ported to Qt 2.0
17
* Revision 1.2.6.1 1999/02/22 22:28:05 kulow
18
* CVS_SILENT replaced old qt header names with new ones
20
* Revision 1.2 1998/04/06 18:44:11 wuebben
21
* Bernd: layout changes
23
* Revision 1.3 1997/10/25 15:15:35 wuebben
24
* Bernd: fixed the segfault error if you had no permiision to access the cdrom
27
* Revision 1.2 1997/08/15 22:51:26 wuebben
28
* *** empty log message ***
30
* Revision 1.2 1997/08/15 22:42:54 wuebben
31
* Bernd -- Version 0.4
32
* o Support for cdda on Solaris
34
* o New interactive configuration script
35
* o lot of header, define and configuration changes. -- Keep your
36
* fingers crossed .... ;-)
38
* Revision 1.1 1997/08/14 23:51:07 wuebben
41
* Revision 1.1 1997/06/21 23:09:10 wuebben
44
* Revision 1.2 1997/03/22 22:09:37 wuebben
45
* Added support for visibe non-illuminated Segments
47
* Revision 1.1 1997/03/22 12:45:25 wuebben
60
#include "qbitarray.h"
63
class BW_LED_Number : public QFrame
69
BW_LED_Number( QWidget *parent=0, const char *name=0 );
72
void setSmallLED(bool ); // if you LED is small it might look better
73
// if you call setSmallLED(TRUE)
75
// this sets the fore and background color of the LED
76
// the forground defaults to yellow, the background defaults
79
void setLEDColor( const QColor& foregroundColor, const QColor& backgroundColor );
82
// this sets the color of the segments that are not iluminated
83
// the default is a rather dark red.
85
void setLEDoffColor(QColor color);
87
// calling showOffColon(TRUE) will show the colon if not illuminated
88
// this is rather ugly -- the default is that they are not shown.
90
void showOffColon(bool off);
94
// display one of the characters " 0 1 2 3 4 5 6 7 8 9 . : - "
95
void display( char c );
97
// display on e of the numbers " 0 1 2 3 4 5 6 7 8 9"
98
void display( int i );
102
void resizeEvent( QResizeEvent * );
103
void drawContents( QPainter * );
107
bool seg_contained_in( char c, char* seg);
108
void drawSegment( const QPoint &, char, QPainter &, int, bool = FALSE );
109
void drawSymbol( QPainter *p,char s ,bool repaint);
112
char* current_segments;
124
private: // Disabled copy constructor and operator=
126
BW_LED_Number( const BW_LED_Number & );
127
BW_LED_Number &operator=( const BW_LED_Number & );
132
#endif // BW_LED_NUM_H