00001
00002
00003
00004
00005
00006
00007
00008
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
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