diff options
Diffstat (limited to 'src/electronics/components/bidirled.cpp')
-rw-r--r-- | src/electronics/components/bidirled.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/electronics/components/bidirled.cpp b/src/electronics/components/bidirled.cpp index 92e242d..50e7052 100644 --- a/src/electronics/components/bidirled.cpp +++ b/src/electronics/components/bidirled.cpp @@ -17,7 +17,7 @@ #include "simulator.h" #include <klocale.h> -#include <qpainter.h> +#include <tqpainter.h> Item* BiDirLED::construct( ItemDocument *itemDocument, bool newItem, const char *id ) { @@ -71,10 +71,10 @@ BiDirLED::~BiDirLED() void BiDirLED::dataChanged() { - QString colors[] = { "0-color1", "0-color2" }; + TQString colors[] = { "0-color1", "0-color2" }; for ( unsigned i = 0; i < 2; i++ ) { - QColor color = dataColor(colors[i]); + TQColor color = dataColor(colors[i]); r[i] = color.red(); g[i] = color.green(); b[i] = color.blue(); @@ -93,7 +93,7 @@ void BiDirLED::stepNonLogic() avg_brightness[i] += ECLed::brightness(m_pDiode[i]->current())*interval; } -void BiDirLED::drawShape( QPainter &p ) +void BiDirLED::drawShape( TQPainter &p ) { initPainter(p); @@ -110,21 +110,21 @@ void BiDirLED::drawShape( QPainter &p ) } avg_brightness[i] = 0.; - p.setBrush( QColor( uint(255-(255-_b)*(1-r[i])), uint(255-(255-_b)*(1-g[i])), uint(255-(255-_b)*(1-b[i])) ) ); + p.setBrush( TQColor( uint(255-(255-_b)*(1-r[i])), uint(255-(255-_b)*(1-g[i])), uint(255-(255-_b)*(1-b[i])) ) ); - QPointArray pa(3); + TQPointArray pa(3); if ( i == 0 ) { - pa[0] = QPoint( 8, -8 ); - pa[1] = QPoint( -8, -16 ); - pa[2] = QPoint( -8, 0 ); + pa[0] = TQPoint( 8, -8 ); + pa[1] = TQPoint( -8, -16 ); + pa[2] = TQPoint( -8, 0 ); } else { - pa[0] = QPoint( -8, 8 ); - pa[1] = QPoint( 8, 0 ); - pa[2] = QPoint( 8, 16 ); + pa[0] = TQPoint( -8, 8 ); + pa[1] = TQPoint( 8, 0 ); + pa[2] = TQPoint( 8, 16 ); } pa.translate( int(x()), int(y()) ); |