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/probe.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/probe.cpp')
-rw-r--r-- | src/electronics/components/probe.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/electronics/components/probe.cpp b/src/electronics/components/probe.cpp index db6725e..1915d51 100644 --- a/src/electronics/components/probe.cpp +++ b/src/electronics/components/probe.cpp @@ -19,7 +19,7 @@ #include "voltagesource.h" #include <klocale.h> -#include <qpainter.h> +#include <tqpainter.h> //BEGIN class Probe Probe::Probe( ICNDocument *icnDocument, bool newItem, const char *id ) @@ -30,7 +30,7 @@ Probe::Probe( ICNDocument *icnDocument, bool newItem, const char *id ) createProperty( "color", Variant::Type::Color ); property("color")->setCaption( i18n("Color") ); - property("color")->setValue( Qt::black ); + property("color")->setValue( TQt::black ); } @@ -60,7 +60,7 @@ FloatingProbe::FloatingProbe( ICNDocument *icnDocument, bool newItem, const char createProperty( "scaling", Variant::Type::Select ); property("scaling")->setCaption( i18n("Scaling") ); - property("scaling")->setAllowed( QStringList::split( ',', "Linear,Logarithmic") ); + property("scaling")->setAllowed( TQStringList::split( ',', "Linear,Logarithmic") ); property("scaling")->setValue("Linear"); property("scaling")->setAdvanced( true ); @@ -99,7 +99,7 @@ void FloatingProbe::dataChanged() } -void FloatingProbe::drawShape( QPainter &p ) +void FloatingProbe::drawShape( TQPainter &p ) { initPainter(p); @@ -108,14 +108,14 @@ void FloatingProbe::drawShape( QPainter &p ) p.drawRect( _x, _y, 32, 16 ); - QPointArray bezier(4); + TQPointArray bezier(4); - bezier[0] = QPoint( _x+4, _y+10 ); - bezier[1] = QPoint( _x+12, _y-6 ); - bezier[2] = QPoint( _x+20, _y+24 ); - bezier[3] = QPoint( _x+28, _y+4 ); + bezier[0] = TQPoint( _x+4, _y+10 ); + bezier[1] = TQPoint( _x+12, _y-6 ); + bezier[2] = TQPoint( _x+20, _y+24 ); + bezier[3] = TQPoint( _x+28, _y+4 ); - p.setPen( QPen( m_color, 2 ) ); + p.setPen( TQPen( m_color, 2 ) ); p.drawCubicBezier(bezier); deinitPainter(p); @@ -220,7 +220,7 @@ Item* LogicProbe::construct( ItemDocument *itemDocument, bool newItem, const cha LibraryItem* LogicProbe::libraryItem() { - QStringList ids; + TQStringList ids; ids << "ec/probe" << "ec/logicprobe"; return new LibraryItem( ids, @@ -260,7 +260,7 @@ void LogicProbe::logicCallback( bool value ) } -void LogicProbe::drawShape( QPainter &p ) +void LogicProbe::drawShape( TQPainter &p ) { initPainter(p); @@ -269,7 +269,7 @@ void LogicProbe::drawShape( QPainter &p ) p.drawRect( _x, _y, 32, 16 ); - p.setPen( QPen( m_color, 2 ) ); + p.setPen( TQPen( m_color, 2 ) ); p.drawLine( _x+4, _y+11, _x+6, _y+11 ); p.drawLine( _x+6, _y+11, _x+6, _y+4 ); |