diff options
| author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-29 16:05:55 +0000 | 
|---|---|---|
| committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-29 16:05:55 +0000 | 
| commit | 87a016680e3677da3993f333561e79eb0cead7d5 (patch) | |
| tree | cbda2b4df8b8ee0d8d1617e6c75bec1e3ee0ccba /src/electronics/components/bidirled.cpp | |
| parent | 6ce3d1ad09c1096b5ed3db334e02859e45d5c32b (diff) | |
| download | ktechlab-87a016680e3677da3993f333561e79eb0cead7d5.tar.gz ktechlab-87a016680e3677da3993f333561e79eb0cead7d5.zip | |
TQt4 port ktechlab
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktechlab@1238801 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
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()) ); | 
