bidirled.h

00001 /***************************************************************************
00002  *   Copyright (C) 2005 by David Saxton                                    *
00003  *   david@bluehaze.org                                                    *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  ***************************************************************************/
00010 
00011 #ifndef BIDIRLED_H
00012 #define BIDIRLED_H
00013 
00014 #include <component.h>
00015 
00023 class BiDirLED : public Component
00024 {
00025         public:
00026                 BiDirLED( ICNDocument * icnDocument, bool newItem, const char *id = 0 );
00027                 ~BiDirLED();
00028         
00029                 static Item* construct( ItemDocument *itemDocument, bool newItem, const char *id );
00030                 static LibraryItem *libraryItem();
00031         
00032                 virtual void dataChanged();
00033                 virtual void stepNonLogic();
00034                 virtual bool doesStepNonLogic() const { return true; }
00035         
00036         private:
00037                 virtual void drawShape( QPainter &p );
00038 
00039 // The standard precision for most graphics libraries 32 bit. 
00040                 float r[2];
00041                 float g[2];
00042                 float b[2];
00043         
00044                 double avg_brightness[2];
00045                 uint last_brightness[2];
00046                 double lastUpdatePeriod;
00047                 Diode *m_pDiode[2];
00048 };
00049 
00050 #endif

Generated on Tue May 8 17:05:27 2007 for KTechLab by  doxygen 1.5.1