summaryrefslogtreecommitdiffstats
path: root/src/electronics/components/ecled.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-29 16:05:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-29 16:05:55 +0000
commit87a016680e3677da3993f333561e79eb0cead7d5 (patch)
treecbda2b4df8b8ee0d8d1617e6c75bec1e3ee0ccba /src/electronics/components/ecled.cpp
parent6ce3d1ad09c1096b5ed3db334e02859e45d5c32b (diff)
downloadktechlab-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/ecled.cpp')
-rw-r--r--src/electronics/components/ecled.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/electronics/components/ecled.cpp b/src/electronics/components/ecled.cpp
index c865de6..f7c5cca 100644
--- a/src/electronics/components/ecled.cpp
+++ b/src/electronics/components/ecled.cpp
@@ -16,7 +16,7 @@
#include "simulator.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* ECLed::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -26,7 +26,7 @@ Item* ECLed::construct( ItemDocument *itemDocument, bool newItem, const char *id
LibraryItem* ECLed::libraryItem()
{
return new LibraryItem(
- QString::QString("ec/led"),
+ TQString::TQString("ec/led"),
i18n("LED"),
i18n("Outputs"),
"led.png",
@@ -58,7 +58,7 @@ ECLed::~ECLed()
void ECLed::dataChanged()
{
- QColor color = dataColor("0-color");
+ TQColor color = dataColor("0-color");
r = color.red();
g = color.green();
b = color.blue();
@@ -74,7 +74,7 @@ void ECLed::stepNonLogic()
lastUpdatePeriod += interval;
}
-void ECLed::drawShape( QPainter &p )
+void ECLed::drawShape( TQPainter &p )
{
int _x = int(x());
int _y = int(y());
@@ -93,12 +93,12 @@ void ECLed::drawShape( QPainter &p )
avg_brightness = 0.;
lastUpdatePeriod = 0.;
- p.setBrush( QColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ) );
+ p.setBrush( TQColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ) );
- QPointArray pa(3);
- pa[0] = QPoint( 8, 0 );
- pa[1] = QPoint( -8, -8 );
- pa[2] = QPoint( -8, 8 );
+ TQPointArray pa(3);
+ pa[0] = TQPoint( 8, 0 );
+ pa[1] = TQPoint( -8, -8 );
+ pa[2] = TQPoint( -8, 8 );
pa.translate( _x, _y );
p.drawPolygon(pa);
p.drawPolyline(pa);