summaryrefslogtreecommitdiffstats
path: root/src/electronics/components/resistordip.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/resistordip.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/resistordip.cpp')
-rw-r--r--src/electronics/components/resistordip.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/electronics/components/resistordip.cpp b/src/electronics/components/resistordip.cpp
index d2c5bdb..3ff030c 100644
--- a/src/electronics/components/resistordip.cpp
+++ b/src/electronics/components/resistordip.cpp
@@ -15,7 +15,7 @@
#include <kiconloader.h>
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* ResistorDIP::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -46,7 +46,7 @@ ResistorDIP::ResistorDIP( ICNDocument *icnDocument, bool newItem, const char *id
createProperty( "resistance", Variant::Type::Double );
property("resistance")->setCaption( i18n("Resistance") );
- property("resistance")->setUnit( QChar(0x3a9) );
+ property("resistance")->setUnit( TQChar(0x3a9) );
property("resistance")->setValue(1e4);
property("resistance")->setMinValue(1e-6);
@@ -69,8 +69,8 @@ void ResistorDIP::dataChanged()
for ( int i=0; i<m_resistorCount; ++i )
m_resistance[i]->setResistance(resistance);
- const QString display = QString::number( resistance / getMultiplier(resistance), 'g', 3 ) + getNumberMag(resistance) + QChar(0x3a9);
- addDisplayText( "res", QRect( offsetX(), offsetY()-16, 32, 12 ), display );
+ const TQString display = TQString::number( resistance / getMultiplier(resistance), 'g', 3 ) + getNumberMag(resistance) + TQChar(0x3a9);
+ addDisplayText( "res", TQRect( offsetX(), offsetY()-16, 32, 12 ), display );
}
@@ -88,16 +88,16 @@ void ResistorDIP::initPins()
{
removeElement( m_resistance[i], false );
m_resistance[i] = 0l;
- removeNode( "n"+QString::number(i) );
- removeNode( "p"+QString::number(i) );
+ removeNode( "n"+TQString::number(i) );
+ removeNode( "p"+TQString::number(i) );
}
}
else
{
for ( int i=m_resistorCount; i<count; ++i )
{
- const QString nid = "n"+QString::number(i);
- const QString pid = "p"+QString::number(i);
+ const TQString nid = "n"+TQString::number(i);
+ const TQString pid = "p"+TQString::number(i);
m_resistance[i] = createResistance( createPin( -24, 0, 0, nid ), createPin( 24, 0, 180, pid ), resistance );
}
}
@@ -112,14 +112,14 @@ void ResistorDIP::updateDIPNodePositions()
{
for ( int i=0; i<m_resistorCount; ++i )
{
- m_nodeMap["n"+QString::number(i)].y = offsetY() + 8 + 16*i;
- m_nodeMap["p"+QString::number(i)].y = offsetY() + 8 + 16*i;
+ m_nodeMap["n"+TQString::number(i)].y = offsetY() + 8 + 16*i;
+ m_nodeMap["p"+TQString::number(i)].y = offsetY() + 8 + 16*i;
}
updateAttachedPositioning();
}
-void ResistorDIP::drawShape( QPainter &p )
+void ResistorDIP::drawShape( TQPainter &p )
{
int _x = int(x()+offsetX());
int _y = int(y()+offsetY());