diff options
Diffstat (limited to 'src/electronics/components/ecsignallamp.cpp')
-rw-r--r-- | src/electronics/components/ecsignallamp.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/electronics/components/ecsignallamp.cpp b/src/electronics/components/ecsignallamp.cpp index c7034f7..0a25c39 100644 --- a/src/electronics/components/ecsignallamp.cpp +++ b/src/electronics/components/ecsignallamp.cpp @@ -16,7 +16,7 @@ #include "pin.h" #include <klocale.h> -#include <qpainter.h> +#include <tqpainter.h> Item* ECSignalLamp::construct( ItemDocument *itemDocument, bool newItem, const char *id ) { @@ -26,7 +26,7 @@ Item* ECSignalLamp::construct( ItemDocument *itemDocument, bool newItem, const c LibraryItem* ECSignalLamp::libraryItem() { return new LibraryItem( - QString("ec/signal_lamp"), + TQString("ec/signal_lamp"), i18n("Signal Lamp"), i18n("Outputs"), "signal_lamp.png", @@ -58,10 +58,10 @@ ECSignalLamp::~ECSignalLamp() void ECSignalLamp::stepNonLogic() { const double voltage = m_pPNode[0]->pin()->voltage()-m_pNNode[0]->pin()->voltage(); - avgPower = QABS(avgPower*advanceSinceUpdate + (voltage*voltage/100))/++advanceSinceUpdate; + avgPower = TQABS(avgPower*advanceSinceUpdate + (voltage*voltage/100))/++advanceSinceUpdate; } -void ECSignalLamp::drawShape( QPainter &p ) +void ECSignalLamp::drawShape( TQPainter &p ) { initPainter(p); @@ -73,7 +73,7 @@ void ECSignalLamp::drawShape( QPainter &p ) int brightness = (avgPower<0.025) ? 255 : ((avgPower>0.5) ? 0 : (int)(255*(1-((avgPower-0.025)/0.475)))); advanceSinceUpdate = 0; - p.setBrush( QColor( 255, 255, brightness ) ); + p.setBrush( TQColor( 255, 255, brightness ) ); p.drawEllipse( _x-8, _y-8, 16, 16 ); // 2*sqrt(2) = 2.828427125... |