summaryrefslogtreecommitdiffstats
path: root/src/electronics
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
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')
-rw-r--r--src/electronics/component.cpp114
-rw-r--r--src/electronics/component.h51
-rw-r--r--src/electronics/components/addac.cpp16
-rw-r--r--src/electronics/components/bidirled.cpp24
-rw-r--r--src/electronics/components/bidirled.h2
-rw-r--r--src/electronics/components/binarycounter.cpp14
-rw-r--r--src/electronics/components/bussplitter.cpp12
-rw-r--r--src/electronics/components/bussplitter.h10
-rw-r--r--src/electronics/components/demultiplexer.cpp14
-rw-r--r--src/electronics/components/demultiplexer.h6
-rw-r--r--src/electronics/components/dependentsource.cpp74
-rw-r--r--src/electronics/components/dependentsource.h14
-rw-r--r--src/electronics/components/discretelogic.cpp44
-rw-r--r--src/electronics/components/discretelogic.h10
-rw-r--r--src/electronics/components/ec555.cpp24
-rw-r--r--src/electronics/components/ec555.h2
-rw-r--r--src/electronics/components/ecbcdto7segment.cpp6
-rw-r--r--src/electronics/components/ecbjt.cpp18
-rw-r--r--src/electronics/components/ecbjt.h2
-rw-r--r--src/electronics/components/eccapacitor.cpp10
-rw-r--r--src/electronics/components/eccapacitor.h2
-rw-r--r--src/electronics/components/ecclockinput.cpp10
-rw-r--r--src/electronics/components/ecclockinput.h2
-rw-r--r--src/electronics/components/eccurrentsignal.cpp12
-rw-r--r--src/electronics/components/eccurrentsignal.h2
-rw-r--r--src/electronics/components/eccurrentsource.cpp10
-rw-r--r--src/electronics/components/eccurrentsource.h2
-rw-r--r--src/electronics/components/ecdiode.cpp14
-rw-r--r--src/electronics/components/ecdiode.h2
-rw-r--r--src/electronics/components/ecfixedvoltage.cpp10
-rw-r--r--src/electronics/components/ecfixedvoltage.h2
-rw-r--r--src/electronics/components/ecground.cpp8
-rw-r--r--src/electronics/components/ecground.h2
-rw-r--r--src/electronics/components/eckeypad.cpp28
-rw-r--r--src/electronics/components/eckeypad.h4
-rw-r--r--src/electronics/components/ecled.cpp18
-rw-r--r--src/electronics/components/ecled.h2
-rw-r--r--src/electronics/components/ecopamp.cpp20
-rw-r--r--src/electronics/components/ecopamp.h2
-rw-r--r--src/electronics/components/ecpotentiometer.cpp30
-rw-r--r--src/electronics/components/ecpotentiometer.h8
-rw-r--r--src/electronics/components/ecresistor.cpp10
-rw-r--r--src/electronics/components/ecresistor.h2
-rw-r--r--src/electronics/components/ecsevensegment.cpp38
-rw-r--r--src/electronics/components/ecsevensegment.h2
-rw-r--r--src/electronics/components/ecsignallamp.cpp10
-rw-r--r--src/electronics/components/ecsignallamp.h2
-rw-r--r--src/electronics/components/ecsubcircuit.cpp22
-rw-r--r--src/electronics/components/ecsubcircuit.h9
-rw-r--r--src/electronics/components/ecvoltagesignal.cpp12
-rw-r--r--src/electronics/components/ecvoltagesignal.h2
-rw-r--r--src/electronics/components/ecvoltagesource.cpp10
-rw-r--r--src/electronics/components/ecvoltagesource.h2
-rw-r--r--src/electronics/components/externalconnection.cpp10
-rw-r--r--src/electronics/components/externalconnection.h2
-rw-r--r--src/electronics/components/flipflop.cpp68
-rw-r--r--src/electronics/components/flipflop.h6
-rw-r--r--src/electronics/components/fulladder.cpp4
-rw-r--r--src/electronics/components/inductor.cpp8
-rw-r--r--src/electronics/components/inductor.h2
-rw-r--r--src/electronics/components/magnitudecomparator.cpp24
-rw-r--r--src/electronics/components/magnitudecomparator.h14
-rw-r--r--src/electronics/components/matrixdisplay.cpp22
-rw-r--r--src/electronics/components/matrixdisplay.h14
-rw-r--r--src/electronics/components/matrixdisplaydriver.cpp14
-rw-r--r--src/electronics/components/matrixdisplaydriver.h6
-rw-r--r--src/electronics/components/meter.cpp28
-rw-r--r--src/electronics/components/meter.h6
-rw-r--r--src/electronics/components/multiinputgate.cpp56
-rw-r--r--src/electronics/components/multiinputgate.h12
-rw-r--r--src/electronics/components/multiplexer.cpp16
-rw-r--r--src/electronics/components/multiplexer.h6
-rw-r--r--src/electronics/components/parallelportcomponent.cpp66
-rw-r--r--src/electronics/components/parallelportcomponent.h6
-rw-r--r--src/electronics/components/piccomponent.cpp88
-rw-r--r--src/electronics/components/piccomponent.h17
-rw-r--r--src/electronics/components/piccomponentpin.h4
-rw-r--r--src/electronics/components/probe.cpp26
-rw-r--r--src/electronics/components/probe.h6
-rw-r--r--src/electronics/components/pushswitch.cpp28
-rw-r--r--src/electronics/components/pushswitch.h8
-rw-r--r--src/electronics/components/ram.cpp28
-rw-r--r--src/electronics/components/ram.h12
-rw-r--r--src/electronics/components/resistordip.cpp22
-rw-r--r--src/electronics/components/resistordip.h2
-rw-r--r--src/electronics/components/rotoswitch.cpp20
-rw-r--r--src/electronics/components/rotoswitch.h8
-rw-r--r--src/electronics/components/serialportcomponent.cpp40
-rw-r--r--src/electronics/components/serialportcomponent.h4
-rw-r--r--src/electronics/components/toggleswitch.cpp34
-rw-r--r--src/electronics/components/toggleswitch.h16
-rw-r--r--src/electronics/ecnode.cpp36
-rw-r--r--src/electronics/ecnode.h19
-rw-r--r--src/electronics/gpsimprocessor.cpp154
-rw-r--r--src/electronics/gpsimprocessor.h77
-rw-r--r--src/electronics/pin.cpp20
-rw-r--r--src/electronics/pin.h24
-rw-r--r--src/electronics/port.cpp54
-rw-r--r--src/electronics/port.h20
-rw-r--r--src/electronics/simulation/capacitance.cpp6
-rw-r--r--src/electronics/simulation/capacitance.h2
-rw-r--r--src/electronics/simulation/circuit.cpp12
-rw-r--r--src/electronics/simulation/circuit.h14
-rw-r--r--src/electronics/simulation/element.cpp10
-rw-r--r--src/electronics/simulation/element.h2
-rw-r--r--src/electronics/simulation/elementset.cpp2
-rw-r--r--src/electronics/simulation/elementset.h6
-rw-r--r--src/electronics/simulation/inductance.cpp6
-rw-r--r--src/electronics/simulation/inductance.h2
-rw-r--r--src/electronics/simulation/logic.h6
-rw-r--r--src/electronics/simulation/reactive.cpp6
-rw-r--r--src/electronics/simulation/reactive.h2
-rw-r--r--src/electronics/subcircuits.cpp54
-rw-r--r--src/electronics/subcircuits.h13
-rw-r--r--src/electronics/switch.cpp10
-rw-r--r--src/electronics/switch.h19
-rw-r--r--src/electronics/wire.h10
117 files changed, 1063 insertions, 1054 deletions
diff --git a/src/electronics/component.cpp b/src/electronics/component.cpp
index f9f3c12..c05993d 100644
--- a/src/electronics/component.cpp
+++ b/src/electronics/component.cpp
@@ -38,10 +38,10 @@
#include <cmath>
#include <kdebug.h>
-#include <qbitarray.h>
-#include <qpainter.h>
-#include <qwidget.h>
-#include <qwmatrix.h>
+#include <tqbitarray.h>
+#include <tqpainter.h>
+#include <tqwidget.h>
+#include <tqwmatrix.h>
const int dipWidth = 112;
const int pairSep = 32;
@@ -49,7 +49,7 @@ const int pairSep = 32;
// Degrees per radian
static const double DPR = 57.29577951308232087665461840231273527024;
-Component::Component( ICNDocument *icnDocument, bool newItem, const QString &id )
+Component::Component( ICNDocument *icnDocument, bool newItem, const TQString &id )
: CNItem( icnDocument, newItem, id ),
m_angleDegrees(0),
b_flipped(false)
@@ -167,7 +167,7 @@ void Component::setNodalCurrents()
}
-void Component::initPainter( QPainter &p )
+void Component::initPainter( TQPainter &p )
{
CNItem::initPainter(p);
@@ -185,7 +185,7 @@ void Component::initPainter( QPainter &p )
}
-void Component::deinitPainter( QPainter &p )
+void Component::deinitPainter( TQPainter &p )
{
if ( !b_flipped && (m_angleDegrees%360 == 0) )
return;
@@ -216,7 +216,7 @@ void Component::setFlipped( bool flipped )
void Component::itemPointsChanged()
{
- QPointArray transformedPoints = transMatrix( m_angleDegrees, b_flipped, 0, 0, false ).map(m_itemPoints);
+ TQPointArray transformedPoints = transMatrix( m_angleDegrees, b_flipped, 0, 0, false ).map(m_itemPoints);
// transformedPoints.translate( int(x()), int(y()) );
setPoints(transformedPoints);
}
@@ -240,9 +240,9 @@ ItemData Component::itemData() const
}
-QWMatrix Component::transMatrix( int angleDegrees, bool flipped, int x, int y, bool inverse )
+TQWMatrix Component::transMatrix( int angleDegrees, bool flipped, int x, int y, bool inverse )
{
- QWMatrix m;
+ TQWMatrix m;
m.translate( x, y );
if (inverse)
{
@@ -257,7 +257,7 @@ QWMatrix Component::transMatrix( int angleDegrees, bool flipped, int x, int y, b
m.rotate(angleDegrees);
}
m.translate( -x, -y );
- m.setTransformationMode( QWMatrix::Areas );
+ m.setTransformationMode( TQWMatrix::Areas );
return m;
}
@@ -305,17 +305,17 @@ void Component::updateAttachedPositioning()
//BEGIN Transform the GuiParts
- QWMatrix m;
+ TQWMatrix m;
if (b_flipped)
m.scale( -1, 1 );
m.rotate(m_angleDegrees);
- m.setTransformationMode( QWMatrix::Areas );
+ m.setTransformationMode( TQWMatrix::Areas );
const TextMap::iterator textMapEnd = m_textMap.end();
for ( TextMap::iterator it = m_textMap.begin(); it != textMapEnd; ++it )
{
- QRect newPos = m.mapRect( it.data()->recommendedRect() );
+ TQRect newPos = m.mapRect( it.data()->recommendedRect() );
it.data()->move( newPos.x() + x(), newPos.y() + y() );
it.data()->setGuiPartSize( newPos.width(), newPos.height() );
it.data()->setAngleDegrees(m_angleDegrees);
@@ -323,7 +323,7 @@ void Component::updateAttachedPositioning()
const WidgetMap::iterator widgetMapEnd = m_widgetMap.end();
for ( WidgetMap::iterator it = m_widgetMap.begin(); it != widgetMapEnd; ++it )
{
- QRect newPos = m.mapRect( it.data()->recommendedRect() );
+ TQRect newPos = m.mapRect( it.data()->recommendedRect() );
it.data()->move( newPos.x() + x(), newPos.y() + y() );
it.data()->setGuiPartSize( newPos.width(), newPos.height() );
it.data()->setAngleDegrees(m_angleDegrees);
@@ -332,7 +332,7 @@ void Component::updateAttachedPositioning()
}
-void Component::drawPortShape( QPainter & p )
+void Component::drawPortShape( TQPainter & p )
{
int h = height();
int w = width() - 1;
@@ -351,7 +351,7 @@ void Component::drawPortShape( QPainter & p )
int outer16 = int(16*outer*DPR);
p.save();
- p.setPen( Qt::NoPen );
+ p.setPen( TQt::NoPen );
p.drawPolygon( areaPoints() );
p.restore();
@@ -388,7 +388,7 @@ void Component::drawPortShape( QPainter & p )
}
-void Component::initDIP( const QStringList & pins )
+void Component::initDIP( const TQStringList & pins )
{
const int numPins = pins.size();
const int numSide = numPins/2 + numPins%2;
@@ -433,15 +433,15 @@ void Component::initDIP( const QStringList & pins )
updateAttachedPositioning();
}
-void Component::initDIPSymbol( const QStringList & pins, int _width )
+void Component::initDIPSymbol( const TQStringList & pins, int _width )
{
const int numPins = pins.size();
const int numSide = numPins/2 + numPins%2;
setSize( -(_width-(_width%16))/2, -(numSide+1)*8, _width, (numSide+1)*16, true );
- QWidget tmpWidget;
- QPainter p(&tmpWidget);
+ TQWidget tmpWidget;
+ TQPainter p(&tmpWidget);
p.setFont(m_font);
@@ -450,14 +450,14 @@ void Component::initDIPSymbol( const QStringList & pins, int _width )
{
if ( !pins[i].isEmpty() )
{
- const QString text = *pins.at(i);
+ const TQString text = *pins.at(i);
const int _top = (i+1)*16-8 + offsetY();
const int _width = width()/2 - 6;
const int _left = 6 + offsetX();
const int _height = 16;
- QRect br = p.boundingRect( QRect( _left, _top, _width, _height ), Qt::AlignLeft, text );
+ TQRect br = p.boundingRect( TQRect( _left, _top, _width, _height ), TQt::AlignLeft, text );
addDisplayText( text, br, text );
}
}
@@ -466,14 +466,14 @@ void Component::initDIPSymbol( const QStringList & pins, int _width )
{
if ( !pins[i].isEmpty() )
{
- const QString text = *pins.at(i);
+ const TQString text = *pins.at(i);
const int _top = (2*numSide-i)*16 - 8 + offsetY();
const int _width = width()/2 - 6;
const int _left = (width()/2) + offsetX();
const int _height = 16;
- QRect br = p.boundingRect( QRect( _left, _top, _width, _height ), Qt::AlignRight, text );
+ TQRect br = p.boundingRect( TQRect( _left, _top, _width, _height ), TQt::AlignRight, text );
addDisplayText( text, br, text );
}
}
@@ -482,7 +482,7 @@ void Component::initDIPSymbol( const QStringList & pins, int _width )
}
-// QString createNode( double _x, double _y, int shape, int orientation, const QString &name, int type, bool isInput = true );
+// TQString createNode( double _x, double _y, int tqshape, int orientation, const TQString &name, int type, bool isInput = true );
void Component::init1PinLeft( int h1 )
{
@@ -566,7 +566,7 @@ void Component::init4PinRight( int h1, int h2, int h3, int h4 )
}
-ECNode* Component::ecNodeWithID( const QString &ecNodeId )
+ECNode* Component::ecNodeWithID( const TQString &ecNodeId )
{
return dynamic_cast<ECNode*>( p_icnDocument->nodeWithID( nodeId(ecNodeId) ) );
}
@@ -627,7 +627,7 @@ BJT* Component::createBJT( Pin *cN, Pin *bN, Pin *eN, bool isNPN )
{
BJT *e = new BJT(isNPN);
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << bN << cN << eN;
ElementMapList::iterator it = handleElement( e, pins );
@@ -639,7 +639,7 @@ Capacitance* Component::createCapacitance( Pin *n0, Pin *n1, double capacitance
{
Capacitance *e = new Capacitance( capacitance, 1./LINEAR_UPDATE_RATE );
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << n0 << n1;
ElementMapList::iterator it = handleElement( e, pins );
@@ -651,7 +651,7 @@ CCCS* Component::createCCCS( Pin *n0, Pin *n1, Pin *n2, Pin *n3, double gain )
{
CCCS *e = new CCCS(gain);
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << n0 << n1 << n2 << n3;
ElementMapList::iterator it = handleElement( e, pins );
@@ -663,7 +663,7 @@ CCVS* Component::createCCVS( Pin *n0, Pin *n1, Pin *n2, Pin *n3, double gain )
{
CCVS *e = new CCVS(gain);
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << n0 << n1 << n2 << n3;
ElementMapList::iterator it = handleElement( e, pins );
@@ -684,7 +684,7 @@ CurrentSignal* Component::createCurrentSignal( Pin *n0, Pin *n1, double current
{
CurrentSignal *e = new CurrentSignal( 1./LINEAR_UPDATE_RATE, current );
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << n0 << n1;
ElementMapList::iterator it = handleElement( e, pins );
@@ -696,7 +696,7 @@ CurrentSource* Component::createCurrentSource( Pin *n0, Pin *n1, double current
{
CurrentSource *e = new CurrentSource(current);
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << n0 << n1;
ElementMapList::iterator it = handleElement( e, pins );
@@ -708,7 +708,7 @@ Diode* Component::createDiode( Pin *n0, Pin *n1 )
{
Diode *e = new Diode();
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << n0 << n1;
ElementMapList::iterator it = handleElement( e, pins );
@@ -720,7 +720,7 @@ Inductance* Component::createInductance( Pin *n0, Pin *n1, double inductance )
{
Inductance *e = new Inductance( inductance, 1./LINEAR_UPDATE_RATE );
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << n0 << n1;
ElementMapList::iterator it = handleElement( e, pins );
@@ -732,7 +732,7 @@ LogicIn *Component::createLogicIn( Pin *node )
{
LogicIn *e = new LogicIn(LogicIn::getConfig());
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << node;
ElementMapList::iterator it = handleElement( e, pins );
@@ -743,7 +743,7 @@ LogicOut *Component::createLogicOut( Pin *node, bool isHigh )
{
LogicOut *e = new LogicOut( LogicIn::getConfig(), isHigh);
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << node;
ElementMapList::iterator it = handleElement( e, pins );
@@ -755,7 +755,7 @@ OpAmp * Component::createOpAmp( Pin * nonInverting, Pin * inverting, Pin * out )
{
OpAmp * e = new OpAmp();
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << nonInverting << inverting << out;
ElementMapList::iterator it = handleElement( e, pins );
@@ -767,7 +767,7 @@ Resistance* Component::createResistance( Pin *n0, Pin *n1, double resistance )
{
Resistance *e = new Resistance(resistance);
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << n0 << n1;
ElementMapList::iterator it = handleElement( e, pins );
@@ -792,7 +792,7 @@ VCCS* Component::createVCCS( Pin *n0, Pin *n1, Pin *n2, Pin *n3, double gain )
{
VCCS *e = new VCCS(gain);
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << n0 << n1 << n2 << n3;
ElementMapList::iterator it = handleElement( e, pins );
@@ -804,7 +804,7 @@ VCVS* Component::createVCVS( Pin *n0, Pin *n1, Pin *n2, Pin *n3, double gain )
{
VCVS *e = new VCVS(gain);
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << n0 << n1 << n2 << n3;
ElementMapList::iterator it = handleElement( e, pins );
@@ -824,7 +824,7 @@ VoltagePoint* Component::createVoltagePoint( Pin *n0, double voltage )
{
VoltagePoint *e = new VoltagePoint(voltage);
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << n0;
ElementMapList::iterator it = handleElement( e, pins );
@@ -836,7 +836,7 @@ VoltageSignal* Component::createVoltageSignal( Pin *n0, Pin *n1, double voltage
{
VoltageSignal *e = new VoltageSignal( 1./LINEAR_UPDATE_RATE, voltage );
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << n0 << n1;
ElementMapList::iterator it = handleElement( e, pins );
@@ -848,7 +848,7 @@ VoltageSource* Component::createVoltageSource( Pin *n0, Pin *n1, double voltage
{
VoltageSource *e = new VoltageSource(voltage);
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << n0 << n1;
ElementMapList::iterator it = handleElement( e, pins );
@@ -857,7 +857,7 @@ VoltageSource* Component::createVoltageSource( Pin *n0, Pin *n1, double voltage
}
-ElementMapList::iterator Component::handleElement( Element *e, const QValueList<Pin*> & pins )
+ElementMapList::iterator Component::handleElement( Element *e, const TQValueList<Pin*> & pins )
{
if (!e)
return m_elementMapList.end();
@@ -865,8 +865,8 @@ ElementMapList::iterator Component::handleElement( Element *e, const QValueList<
ElementMap em;
em.e = e;
int at = 0;
- QValueList<Pin*>::ConstIterator end = pins.end();
- for ( QValueList<Pin*>::ConstIterator it = pins.begin(); it != end; ++it )
+ TQValueList<Pin*>::ConstIterator end = pins.end();
+ for ( TQValueList<Pin*>::ConstIterator it = pins.begin(); it != end; ++it )
{
(*it)->addElement(e);
em.n[at++] = *it;
@@ -879,19 +879,19 @@ ElementMapList::iterator Component::handleElement( Element *e, const QValueList<
}
-void Component::setInterDependent( ElementMapList::iterator it, const QValueList<Pin*> & pins )
+void Component::setInterDependent( ElementMapList::iterator it, const TQValueList<Pin*> & pins )
{
setInterCircuitDependent( it, pins );
setInterGroundDependent( it, pins );
}
-void Component::setInterCircuitDependent( ElementMapList::iterator it, const QValueList<Pin*> & pins )
+void Component::setInterCircuitDependent( ElementMapList::iterator it, const TQValueList<Pin*> & pins )
{
- QValueList<Pin*>::ConstIterator end = pins.end();
- for ( QValueList<Pin*>::ConstIterator it1 = pins.begin(); it1 != end; ++it1 )
+ TQValueList<Pin*>::ConstIterator end = pins.end();
+ for ( TQValueList<Pin*>::ConstIterator it1 = pins.begin(); it1 != end; ++it1 )
{
- for ( QValueList<Pin*>::ConstIterator it2 = pins.begin(); it2 != end; ++it2 )
+ for ( TQValueList<Pin*>::ConstIterator it2 = pins.begin(); it2 != end; ++it2 )
{
(*it1)->addCircuitDependentPin( *it2 );
}
@@ -901,12 +901,12 @@ void Component::setInterCircuitDependent( ElementMapList::iterator it, const QVa
}
-void Component::setInterGroundDependent( ElementMapList::iterator it, const QValueList<Pin*> & pins )
+void Component::setInterGroundDependent( ElementMapList::iterator it, const TQValueList<Pin*> & pins )
{
- QValueList<Pin*>::ConstIterator end = pins.end();
- for ( QValueList<Pin*>::ConstIterator it1 = pins.begin(); it1 != end; ++it1 )
+ TQValueList<Pin*>::ConstIterator end = pins.end();
+ for ( TQValueList<Pin*>::ConstIterator it1 = pins.begin(); it1 != end; ++it1 )
{
- for ( QValueList<Pin*>::ConstIterator it2 = pins.begin(); it2 != end; ++it2 )
+ for ( TQValueList<Pin*>::ConstIterator it2 = pins.begin(); it2 != end; ++it2 )
{
(*it1)->addGroundDependentPin( *it2 );
}
@@ -996,7 +996,7 @@ void Component::initElements( const uint stage )
}
-ECNode * Component::createPin( double x, double y, int orientation, const QString & name )
+ECNode * Component::createPin( double x, double y, int orientation, const TQString & name )
{
return dynamic_cast<ECNode*>( createNode( x, y, orientation, name, Node::ec_pin ) );
}
diff --git a/src/electronics/component.h b/src/electronics/component.h
index d45d835..8a30315 100644
--- a/src/electronics/component.h
+++ b/src/electronics/component.h
@@ -13,7 +13,7 @@
#include "cnitem.h"
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
class ICNDocument;
class CircuitDocument;
@@ -43,11 +43,11 @@ class VoltagePoint;
class VoltageSignal;
class VoltageSource;
-typedef QValueList<ECNode*> ECNodeList;
-typedef QValueList<Element*> ElementList;
-typedef QValueList<Switch*> SwitchList;
+typedef TQValueList<ECNode*> ECNodeList;
+typedef TQValueList<Element*> ElementList;
+typedef TQValueList<Switch*> SwitchList;
-typedef QValueList< QValueList<Pin*> > PinListList;
+typedef TQValueList< TQValueList<Pin*> > PinListList;
/**
Contains vital information about the elements in the component.
@@ -67,7 +67,7 @@ class ElementMap
PinListList interGroundDependent;
};
-typedef QValueList<ElementMap> ElementMapList;
+typedef TQValueList<ElementMap> ElementMapList;
/**
@short Bass class for all electrical components
@@ -76,11 +76,12 @@ typedef QValueList<ElementMap> ElementMapList;
class Component : public CNItem
{
Q_OBJECT
+ TQ_OBJECT
public:
- Component( ICNDocument *icnDocument, bool newItem, const QString &id );
+ Component( ICNDocument *icnDocument, bool newItem, const TQString &id );
virtual ~Component();
- ECNode* createPin( double _x, double _y, int orientation, const QString &name );
+ ECNode* createPin( double _x, double _y, int orientation, const TQString &name );
/**
* Reinherit this function to disallow rotation of the component.
*/
@@ -127,7 +128,7 @@ class Component : public CNItem
* @param y y co-ordinate of the center of the object to be mapped
* @param inverse If false, maps the unrotated item to a rotated one, else mapped->unmapped
*/
- static QWMatrix transMatrix( int angleDegrees, bool flipped, int x, int y, bool inverse = false );
+ static TQWMatrix transMatrix( int angleDegrees, bool flipped, int x, int y, bool inverse = false );
/**
* @return Information about the component in an ItemData struct.
*/
@@ -192,7 +193,7 @@ class Component : public CNItem
VoltageSource * createVoltageSource( ECNode *n0, ECNode *n1, double voltage );
- ECNode* ecNodeWithID( const QString &ecNodeId );
+ ECNode* ecNodeWithID( const TQString &ecNodeId );
/**
* Safely delete an element - in this case, calls element->componentDeleted,
@@ -243,29 +244,29 @@ class Component : public CNItem
protected:
/**
- * Convenience functionality provided for components in a port shape
+ * Convenience functionality provided for components in a port tqshape
* (such as ParallelPortComponent and SerialPortComponent).
*/
- void drawPortShape( QPainter & p );
+ void drawPortShape( TQPainter & p );
virtual void itemPointsChanged();
virtual void updateAttachedPositioning();
- virtual void initPainter( QPainter &p );
+ virtual void initPainter( TQPainter &p );
/**
* Untranforms the painter from the matrix. This *must* be called after doing
- * initPainter( QPainter &p );
+ * initPainter( TQPainter &p );
*/
- virtual void deinitPainter( QPainter &p );
+ virtual void deinitPainter( TQPainter &p );
/**
- * This creates a set of nodes with their internal IDs set to those in QStringList pins.
+ * This creates a set of nodes with their internal IDs set to those in TQStringList pins.
* The pins are in a DIP arrangement, and are spaced width() apart.
*/
- void initDIP( const QStringList & pins );
+ void initDIP( const TQStringList & pins );
/**
* Creates the DIP symbol:
- * @li constructs rectangular shape
- * @li puts on text labels in appropriate positions from QStringList pins
+ * @li constructs rectangular tqshape
+ * @li puts on text labels in appropriate positions from TQStringList pins
*/
- void initDIPSymbol( const QStringList & pins, int width );
+ void initDIPSymbol( const TQStringList & pins, int width );
/**
* Create 1 pin on the left of the component, placed half way down if h1 is
* -1 - else at the position of h1.
@@ -316,7 +317,7 @@ class Component : public CNItem
ECNode * m_pPNode[4];
ECNode * m_pNNode[4];
- QGuardedPtr<CircuitDocument> m_pCircuitDocument;
+ TQGuardedPtr<CircuitDocument> m_pCircuitDocument;
int m_angleDegrees;
bool b_flipped;
@@ -327,7 +328,7 @@ class Component : public CNItem
* @param it Which pins are inter-dependent needs to be recorded in case
* this information is later needed in rebuildPinInterDependence.
*/
- void setInterDependent( ElementMapList::iterator it, const QValueList<Pin*> & pins );
+ void setInterDependent( ElementMapList::iterator it, const TQValueList<Pin*> & pins );
/**
* Sets all pins independent of each other.
*/
@@ -336,12 +337,12 @@ class Component : public CNItem
* The given pins will affect the simulation of each other. Therefore, they
* will need to be simulated in the same circuit.
*/
- void setInterCircuitDependent( ElementMapList::iterator it, const QValueList<Pin*> & pins );
+ void setInterCircuitDependent( ElementMapList::iterator it, const TQValueList<Pin*> & pins );
/**
* If any of the given pins are ground, then that will affect whether
* any of the other pins can be ground.
*/
- void setInterGroundDependent( ElementMapList::iterator it, const QValueList<Pin*> & pins );
+ void setInterGroundDependent( ElementMapList::iterator it, const TQValueList<Pin*> & pins );
/**
* List of ElementMaps; which contain information on the pins associated
* with the element as well as the dependence between the pins for that
@@ -356,7 +357,7 @@ class Component : public CNItem
/**
* @return an iterator to the element in m_elementMapList
*/
- ElementMapList::iterator handleElement( Element *e, const QValueList<Pin*> & pins );
+ ElementMapList::iterator handleElement( Element *e, const TQValueList<Pin*> & pins );
};
#endif
diff --git a/src/electronics/components/addac.cpp b/src/electronics/components/addac.cpp
index a58e2d8..f1f7a92 100644
--- a/src/electronics/components/addac.cpp
+++ b/src/electronics/components/addac.cpp
@@ -143,7 +143,7 @@ void ADC::initPins()
if ( numBits == m_numBits )
return;
- QStringList pins;
+ TQStringList pins;
int inPos = (numBits-1+(numBits%2))/2;
for ( int i=0; i<inPos; ++i )
@@ -155,7 +155,7 @@ void ADC::initPins()
pins += "";
for ( int i=numBits-1; i>=0; --i )
- pins += QString::number(i);
+ pins += TQString::number(i);
initDIPSymbol( pins, 64 );
initDIP(pins);
@@ -168,7 +168,7 @@ void ADC::initPins()
{
for ( int i=m_numBits; i<numBits; ++i )
{
- ECNode *node = ecNodeWithID( QString::number(i) );
+ ECNode *node = ecNodeWithID( TQString::number(i) );
m_logic[i] = createLogicOut( node, false );
}
}
@@ -176,7 +176,7 @@ void ADC::initPins()
{
for ( int i=numBits; i<m_numBits; ++i )
{
- QString id = QString::number(i);
+ TQString id = TQString::number(i);
removeDisplayText(id);
removeElement( m_logic[i], false );
removeNode(id);
@@ -235,10 +235,10 @@ void DAC::initPins()
if ( numBits == m_numBits )
return;
- QStringList pins;
+ TQStringList pins;
for ( int i=0; i<numBits; ++i )
- pins += QString::number(i);
+ pins += TQString::number(i);
int inPos = (numBits+1+(numBits%2))/2;
for ( int i=numBits-1; i>=inPos; --i )
@@ -259,7 +259,7 @@ void DAC::initPins()
{
for ( int i=m_numBits; i<numBits; ++i )
{
- ECNode *node = ecNodeWithID( QString::number(i) );
+ ECNode *node = ecNodeWithID( TQString::number(i) );
m_logic[i] = createLogicIn(node);
}
}
@@ -267,7 +267,7 @@ void DAC::initPins()
{
for ( int i=numBits; i<m_numBits; ++i )
{
- QString id = QString::number(i);
+ TQString id = TQString::number(i);
removeDisplayText(id);
removeElement( m_logic[i], false );
removeNode(id);
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()) );
diff --git a/src/electronics/components/bidirled.h b/src/electronics/components/bidirled.h
index e80f4e0..9165063 100644
--- a/src/electronics/components/bidirled.h
+++ b/src/electronics/components/bidirled.h
@@ -30,7 +30,7 @@ class BiDirLED : public Component
virtual bool doesStepNonLogic() const { return true; }
private:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
double r[2];
double g[2];
diff --git a/src/electronics/components/binarycounter.cpp b/src/electronics/components/binarycounter.cpp
index f278104..a93a1b2 100644
--- a/src/electronics/components/binarycounter.cpp
+++ b/src/electronics/components/binarycounter.cpp
@@ -23,7 +23,7 @@ Item* BinaryCounter::construct( ItemDocument *itemDocument, bool newItem, const
LibraryItem* BinaryCounter::libraryItem()
{
- QStringList ids;
+ TQStringList ids;
ids << "ec/binary_counter" << "ec/4_bit_binary_counter";
return new LibraryItem(
ids,
@@ -56,7 +56,7 @@ BinaryCounter::BinaryCounter( ICNDocument *icnDocument, bool newItem, const char
createProperty( "trig", Variant::Type::Select );
property("trig")->setCaption( i18n("Trigger Edge") );
- property("trig")->setAllowed( QStringList::split( ',', "Rising,Falling" ) );
+ property("trig")->setAllowed( TQStringList::split( ',', "Rising,Falling" ) );
property("trig")->setValue("Rising");
createProperty( "bitcount", Variant::Type::Int );
@@ -86,14 +86,14 @@ void BinaryCounter::initPins( unsigned numBits )
if ( m_numBits == numBits )
return;
- QStringList pins;
+ TQStringList pins;
pins << "en" << ">" << "u/d" << "r";
- for ( int i = 0; i < QABS(4-int(numBits)); i++ )
+ for ( int i = 0; i < TQABS(4-int(numBits)); i++ )
pins << "";
for ( int i = numBits-1; i >= 0; i-- )
- pins << QChar('A'+i);
+ pins << TQChar('A'+i);
initDIPSymbol( pins, 64 );
initDIP(pins);
@@ -101,13 +101,13 @@ void BinaryCounter::initPins( unsigned numBits )
if ( m_numBits < numBits )
{
for ( unsigned i = m_numBits; i < numBits; i++ )
- m_pLogicOut[i] = createLogicOut( ecNodeWithID( QChar('A'+i) ), false );
+ m_pLogicOut[i] = createLogicOut( ecNodeWithID( TQChar('A'+i) ), false );
}
else
{
for ( unsigned i = numBits; i < m_numBits; i++ )
{
- QString id = QChar('A'+i);
+ TQString id = TQChar('A'+i);
removeElement( m_pLogicOut[i], false );
removeDisplayText(id);
removeNode(id);
diff --git a/src/electronics/components/bussplitter.cpp b/src/electronics/components/bussplitter.cpp
index 62fbb39..85619a4 100644
--- a/src/electronics/components/bussplitter.cpp
+++ b/src/electronics/components/bussplitter.cpp
@@ -14,7 +14,7 @@
#include "wire.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* BusSplitter::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -105,24 +105,24 @@ void BusSplitter::dataChanged()
}
-QString BusSplitter::outNodeID( unsigned node ) const
+TQString BusSplitter::outNodeID( unsigned node ) const
{
- return QString("out_%1").arg(QString::number(node));
+ return TQString("out_%1").tqarg(TQString::number(node));
}
-void BusSplitter::drawShape( QPainter &p )
+void BusSplitter::drawShape( TQPainter &p )
{
initPainter(p);
-// QPen pen(p.pen());
+// TQPen pen(p.pen());
// pen.setWidth();
// p.setPen(pen);
int _x = int(x());
int _y = int(y());
- QRect r = m_sizeRect;
+ TQRect r = m_sizeRect;
r.moveBy( _x, _y );
p.drawRect(r);
diff --git a/src/electronics/components/bussplitter.h b/src/electronics/components/bussplitter.h
index ccd1994..22b3054 100644
--- a/src/electronics/components/bussplitter.h
+++ b/src/electronics/components/bussplitter.h
@@ -13,8 +13,8 @@
#include <component.h>
-#include <qguardedptr.h>
-#include <qvaluevector.h>
+#include <tqguardedptr.h>
+#include <tqvaluevector.h>
class Wire;
@@ -33,12 +33,12 @@ class BusSplitter : public Component
virtual bool canFlip() const { return true; }
protected:
- QString outNodeID( unsigned node ) const;
+ TQString outNodeID( unsigned node ) const;
virtual void dataChanged();
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
unsigned m_busSize;
- QValueVector<QGuardedPtr<Wire> > m_pWires;
+ TQValueVector<TQGuardedPtr<Wire> > m_pWires;
ECNode * m_pInNode;
};
diff --git a/src/electronics/components/demultiplexer.cpp b/src/electronics/components/demultiplexer.cpp
index 8a01808..7124c89 100644
--- a/src/electronics/components/demultiplexer.cpp
+++ b/src/electronics/components/demultiplexer.cpp
@@ -110,17 +110,17 @@ void Demultiplexer::initPins( unsigned newAddressSize )
if ( newXLogicCount == oldXLogicCount )
return;
- QStringList pins;
+ TQStringList pins;
for ( unsigned i=0; i<newAddressSize; ++i )
- pins += "A"+QString::number(i);
+ pins += "A"+TQString::number(i);
for ( unsigned i=newAddressSize; i<(newXLogicCount+(newXLogicCount%2))/2; ++i )
pins += "";
pins += "X";
for ( unsigned i=(newXLogicCount+(newXLogicCount%2))/2+1; i<newXLogicCount; ++i )
pins += "";
for ( int i=newXLogicCount-1; i>=0; --i )
- pins += "X"+QString::number(i);
+ pins += "X"+TQString::number(i);
initDIPSymbol( pins, 64 );
initDIP(pins);
@@ -139,14 +139,14 @@ void Demultiplexer::initPins( unsigned newAddressSize )
m_xLogic.resize(newXLogicCount);
for ( unsigned i = oldXLogicCount; i < newXLogicCount; ++i )
{
- node = ecNodeWithID("X"+QString::number(i));
+ node = ecNodeWithID("X"+TQString::number(i));
m_xLogic.insert( i, createLogicOut(node,false) );
}
m_aLogic.resize(newAddressSize);
for ( unsigned i = oldAddressSize; i < newAddressSize; ++i )
{
- node = ecNodeWithID("A"+QString::number(i));
+ node = ecNodeWithID("A"+TQString::number(i));
m_aLogic.insert( i, createLogicIn(node) );
m_aLogic[i]->setCallback( this, (CallbackPtr)(&Demultiplexer::inStateChanged) );
}
@@ -155,7 +155,7 @@ void Demultiplexer::initPins( unsigned newAddressSize )
{
for ( unsigned i = newXLogicCount; i < oldXLogicCount; ++i )
{
- QString id = "X"+QString::number(i);
+ TQString id = "X"+TQString::number(i);
removeDisplayText(id);
removeElement( m_xLogic[i], false );
removeNode(id);
@@ -164,7 +164,7 @@ void Demultiplexer::initPins( unsigned newAddressSize )
for ( unsigned i = newAddressSize; i < oldAddressSize; ++i )
{
- QString id = "A"+QString::number(i);
+ TQString id = "A"+TQString::number(i);
removeDisplayText(id);
removeElement( m_aLogic[i], false );
removeNode(id);
diff --git a/src/electronics/components/demultiplexer.h b/src/electronics/components/demultiplexer.h
index a2b52dd..eabcc2c 100644
--- a/src/electronics/components/demultiplexer.h
+++ b/src/electronics/components/demultiplexer.h
@@ -14,7 +14,7 @@
#include "component.h"
#include "logic.h"
-#include <qptrvector.h>
+#include <tqptrvector.h>
/**
@author David Saxton
@@ -38,8 +38,8 @@ protected:
void inStateChanged( bool newState );
- QPtrVector<LogicIn> m_aLogic;
- QPtrVector<LogicOut> m_xLogic;
+ TQPtrVector<LogicIn> m_aLogic;
+ TQPtrVector<LogicOut> m_xLogic;
LogicIn * m_input;
};
diff --git a/src/electronics/components/dependentsource.cpp b/src/electronics/components/dependentsource.cpp
index 764cc53..1808c86 100644
--- a/src/electronics/components/dependentsource.cpp
+++ b/src/electronics/components/dependentsource.cpp
@@ -19,7 +19,7 @@
#include "vcvs.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
//BEGIN class DependentSource
DependentSource::DependentSource( ICNDocument *icnDocument, bool newItem, const char *id )
@@ -34,7 +34,7 @@ DependentSource::DependentSource( ICNDocument *icnDocument, bool newItem, const
property("gain")->setCaption( i18n("Gain") );
property("gain")->setValue(1.0);
- addDisplayText( "gain", QRect( -16, -32, 32, 16 ), "" );
+ addDisplayText( "gain", TQRect( -16, -32, 32, 16 ), "" );
}
@@ -43,7 +43,7 @@ DependentSource::~DependentSource()
}
-void DependentSource::drawOutline( QPainter & p )
+void DependentSource::drawOutline( TQPainter & p )
{
const int _x = (int)x()-16;
const int _y = (int)y()-32;
@@ -52,67 +52,67 @@ void DependentSource::drawOutline( QPainter & p )
p.drawRect( _x, _y+19, width(), 11 );
p.save();
- bool canSetCol = (p.pen().color() != Qt::color0) && (p.pen().color() != Qt::color1);
+ bool canSetCol = (p.pen().color() != TQt::color0) && (p.pen().color() != TQt::color1);
// Bottom lines
if (canSetCol)
- p.setPen( m_pNNode[1]->isSelected() ? m_selectedCol : Qt::black );
+ p.setPen( m_pNNode[1]->isSelected() ? m_selectedCol : TQt::black );
p.drawLine( _x, _y+40, _x+8, _y+40 ); // Left inny
if (canSetCol)
- p.setPen( m_pPNode[1]->isSelected() ? m_selectedCol : Qt::black );
+ p.setPen( m_pPNode[1]->isSelected() ? m_selectedCol : TQt::black );
p.drawLine( _x+width(), _y+40, _x+24, _y+40 ); // Right inny
p.restore();
// Bottom diamond
- QPointArray pa4(4);
- pa4[0] = QPoint( _x+6, _y+40 );
- pa4[1] = QPoint( _x+16, _y+32 );
- pa4[2] = QPoint( _x+26, _y+40 );
- pa4[3] = QPoint( _x+16, _y+48 );
+ TQPointArray pa4(4);
+ pa4[0] = TQPoint( _x+6, _y+40 );
+ pa4[1] = TQPoint( _x+16, _y+32 );
+ pa4[2] = TQPoint( _x+26, _y+40 );
+ pa4[3] = TQPoint( _x+16, _y+48 );
p.drawPolygon(pa4);
}
-void DependentSource::drawTopArrow( QPainter & p )
+void DependentSource::drawTopArrow( TQPainter & p )
{
const int _x = (int)x()-16;
const int _y = (int)y()-32;
if ( p.pen().color() == m_selectedCol )
- p.setPen(Qt::black);
+ p.setPen(TQt::black);
if ( p.brush().color() == m_brushCol )
- p.setBrush(Qt::black);
+ p.setBrush(TQt::black);
p.drawLine( _x+8, _y+24, _x+24, _y+24 );
- QPointArray pa3(3);
- pa3[0] = QPoint( _x+24, _y+24 );
- pa3[1] = QPoint( _x+19, _y+21 );
- pa3[2] = QPoint( _x+19, _y+27 );
+ TQPointArray pa3(3);
+ pa3[0] = TQPoint( _x+24, _y+24 );
+ pa3[1] = TQPoint( _x+19, _y+21 );
+ pa3[2] = TQPoint( _x+19, _y+27 );
p.drawPolygon(pa3);
}
-void DependentSource::drawBottomArrow( QPainter & p )
+void DependentSource::drawBottomArrow( TQPainter & p )
{
const int _x = (int)x()-16;
const int _y = (int)y()-32;
if ( p.pen().color() == m_selectedCol )
- p.setPen(Qt::black);
+ p.setPen(TQt::black);
if ( p.brush().color() == m_brushCol )
- p.setBrush(Qt::black);
+ p.setBrush(TQt::black);
p.drawLine( _x+11, _y+40, _x+21, _y+40 );
- QPointArray pa3(3);
- pa3[0] = QPoint( _x+21, _y+40 );
- pa3[1] = QPoint( _x+16, _y+37 );
- pa3[2] = QPoint( _x+16, _y+43 );
+ TQPointArray pa3(3);
+ pa3[0] = TQPoint( _x+21, _y+40 );
+ pa3[1] = TQPoint( _x+16, _y+37 );
+ pa3[2] = TQPoint( _x+16, _y+43 );
p.drawPolygon(pa3);
}
//END class DependentSource
@@ -127,7 +127,7 @@ Item* ECCCCS::construct( ItemDocument *itemDocument, bool newItem, const char *i
LibraryItem* ECCCCS::libraryItem()
{
return new LibraryItem(
- QString("ec/cccs"),
+ TQString("ec/cccs"),
i18n("CCCS"),
i18n("Sources"),
"cccs.png",
@@ -151,13 +151,13 @@ void ECCCCS::dataChanged()
{
double gain = dataDouble("gain");
- QString display = QString::number( gain / getMultiplier(gain), 'g', 3 ) + getNumberMag(gain) + QChar(' ');
+ TQString display = TQString::number( gain / getMultiplier(gain), 'g', 3 ) + getNumberMag(gain) + TQChar(' ');
setDisplayText( "gain", display );
m_cccs->setGain(gain);
}
-void ECCCCS::drawShape( QPainter &p )
+void ECCCCS::drawShape( TQPainter &p )
{
initPainter(p);
drawOutline(p);
@@ -177,7 +177,7 @@ Item* ECCCVS::construct( ItemDocument *itemDocument, bool newItem, const char *i
LibraryItem* ECCCVS::libraryItem()
{
return new LibraryItem(
- QString("ec/ccvs"),
+ TQString("ec/ccvs"),
i18n("CCVS"),
i18n("Sources"),
"ccvs.png",
@@ -201,13 +201,13 @@ void ECCCVS::dataChanged()
{
double gain = dataDouble("gain");
- QString display = QString::number( gain / getMultiplier(gain), 'g', 3 ) + getNumberMag(gain) + QChar(' ');
+ TQString display = TQString::number( gain / getMultiplier(gain), 'g', 3 ) + getNumberMag(gain) + TQChar(' ');
setDisplayText( "gain", display );
m_ccvs->setGain(gain);
}
-void ECCCVS::drawShape( QPainter &p )
+void ECCCVS::drawShape( TQPainter &p )
{
initPainter(p);
drawOutline(p);
@@ -226,7 +226,7 @@ Item* ECVCCS::construct( ItemDocument *itemDocument, bool newItem, const char *i
LibraryItem* ECVCCS::libraryItem()
{
return new LibraryItem(
- QString("ec/vccs"),
+ TQString("ec/vccs"),
i18n("VCCS"),
i18n("Sources"),
"vccs.png",
@@ -250,13 +250,13 @@ void ECVCCS::dataChanged()
{
double gain = dataDouble("gain");
- QString display = QString::number( gain / getMultiplier(gain), 'g', 3 ) + getNumberMag(gain) + QChar(' ');
+ TQString display = TQString::number( gain / getMultiplier(gain), 'g', 3 ) + getNumberMag(gain) + TQChar(' ');
setDisplayText( "gain", display );
m_vccs->setGain(gain);
}
-void ECVCCS::drawShape( QPainter &p )
+void ECVCCS::drawShape( TQPainter &p )
{
initPainter(p);
drawOutline(p);
@@ -275,7 +275,7 @@ Item* ECVCVS::construct( ItemDocument *itemDocument, bool newItem, const char *i
LibraryItem* ECVCVS::libraryItem()
{
return new LibraryItem(
- QString("ec/vcvs"),
+ TQString("ec/vcvs"),
i18n("VCVS"),
i18n("Sources"),
"vcvs.png",
@@ -299,13 +299,13 @@ void ECVCVS::dataChanged()
{
double gain = dataDouble("gain");
- QString display = QString::number( gain / getMultiplier(gain), 'g', 3 ) + getNumberMag(gain) + QChar(' ');
+ TQString display = TQString::number( gain / getMultiplier(gain), 'g', 3 ) + getNumberMag(gain) + TQChar(' ');
setDisplayText( "gain", display );
m_vcvs->setGain(gain);
}
-void ECVCVS::drawShape( QPainter &p )
+void ECVCVS::drawShape( TQPainter &p )
{
initPainter(p);
drawOutline(p);
diff --git a/src/electronics/components/dependentsource.h b/src/electronics/components/dependentsource.h
index 2bccbb7..8b9e264 100644
--- a/src/electronics/components/dependentsource.h
+++ b/src/electronics/components/dependentsource.h
@@ -24,9 +24,9 @@ class DependentSource : public Component
virtual bool canFlip() const { return true; }
protected:
- void drawOutline( QPainter & p );
- void drawTopArrow( QPainter & p );
- void drawBottomArrow( QPainter & p );
+ void drawOutline( TQPainter & p );
+ void drawTopArrow( TQPainter & p );
+ void drawBottomArrow( TQPainter & p );
};
/**
@@ -44,7 +44,7 @@ class ECCCCS : public DependentSource
protected:
virtual void dataChanged();
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
CCCS *m_cccs;
};
@@ -64,7 +64,7 @@ class ECCCVS : public DependentSource
protected:
virtual void dataChanged();
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
CCVS *m_ccvs;
};
@@ -84,7 +84,7 @@ class ECVCCS : public DependentSource
protected:
virtual void dataChanged();
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
VCCS *m_vccs;
};
@@ -104,7 +104,7 @@ class ECVCVS : public DependentSource
protected:
virtual void dataChanged();
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
VCVS *m_vcvs;
};
diff --git a/src/electronics/components/discretelogic.cpp b/src/electronics/components/discretelogic.cpp
index e2e284e..03f4468 100644
--- a/src/electronics/components/discretelogic.cpp
+++ b/src/electronics/components/discretelogic.cpp
@@ -16,7 +16,7 @@
#include "simulator.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
//BEGIN class Inverter
@@ -27,7 +27,7 @@ Item* Inverter::construct( ItemDocument *itemDocument, bool newItem, const char
LibraryItem* Inverter::libraryItem()
{
- QStringList ids;
+ TQStringList ids;
ids << "ec/inverter" << "ec/not";
return new LibraryItem(
ids,
@@ -67,15 +67,15 @@ void Inverter::inStateChanged( bool newState )
}
-void Inverter::drawShape( QPainter &p )
+void Inverter::drawShape( TQPainter &p )
{
initPainter(p);
int _x = (int)x()-8;
int _y = (int)y()-8;
- QPointArray pa(3);
- pa[0] = QPoint( _x, _y );
- pa[1] = QPoint( _x+width()-6, _y+(height()/2) );
- pa[2] = QPoint( _x, _y+height() );
+ TQPointArray pa(3);
+ pa[0] = TQPoint( _x, _y );
+ pa[1] = TQPoint( _x+width()-6, _y+(height()/2) );
+ pa[2] = TQPoint( _x, _y+height() );
p.drawPolygon(pa);
p.drawPolyline(pa);
p.drawEllipse( _x+width()-6, _y+(height()/2)-3, 7, 7 );
@@ -93,7 +93,7 @@ Item* Buffer::construct( ItemDocument *itemDocument, bool newItem, const char *i
LibraryItem* Buffer::libraryItem()
{
return new LibraryItem(
- QString::QString("ec/buffer"),
+ TQString::TQString("ec/buffer"),
i18n("Buffer"),
i18n("Logic"),
"buffer.png",
@@ -130,15 +130,15 @@ void Buffer::inStateChanged( bool newState )
}
-void Buffer::drawShape( QPainter &p )
+void Buffer::drawShape( TQPainter &p )
{
initPainter(p);
int _x = (int)x()-8;
int _y = (int)y()-8;
- QPointArray pa(3);
- pa[0] = QPoint( _x, _y );
- pa[1] = QPoint( _x+width(), _y+(height()/2) );
- pa[2] = QPoint( _x, _y+height() );
+ TQPointArray pa(3);
+ pa[0] = TQPoint( _x, _y );
+ pa[1] = TQPoint( _x+width(), _y+(height()/2) );
+ pa[2] = TQPoint( _x, _y+height() );
p.drawPolygon(pa);
p.drawPolyline(pa);
deinitPainter(p);
@@ -155,7 +155,7 @@ Item* ECLogicInput::construct( ItemDocument *itemDocument, bool newItem, const c
LibraryItem* ECLogicInput::libraryItem()
{
return new LibraryItem(
- QString::QString("ec/logic_input"),
+ TQString::TQString("ec/logic_input"),
i18n("Logic Input"),
i18n("Logic"),
"logic_input.png",
@@ -172,7 +172,7 @@ ECLogicInput::ECLogicInput( ICNDocument *icnDocument, bool newItem, const char *
setSize( -8, -8, 16, 16 );
b_state = false;
- addButton( "button", QRect( -24, -8, 16, 16 ), "", true );
+ addButton( "button", TQRect( -24, -8, 16, 16 ), "", true );
createProperty( "useToggle", Variant::Type::Bool );
property("useToggle")->setCaption( i18n("Use Toggle") );
@@ -195,19 +195,19 @@ void ECLogicInput::dataChanged()
}
-void ECLogicInput::drawShape( QPainter &p )
+void ECLogicInput::drawShape( TQPainter &p )
{
initPainter(p);
if (b_state)
- p.setBrush( QColor( 255, 166, 0 ) );
+ p.setBrush( TQColor( 255, 166, 0 ) );
else
- p.setBrush( Qt::white );
+ p.setBrush( TQt::white );
p.drawEllipse( (int)x()-4, (int)y()-6, 12, 12 );
deinitPainter(p);
}
-void ECLogicInput::buttonStateChanged( const QString &, bool state )
+void ECLogicInput::buttonStateChanged( const TQString &, bool state )
{
b_state = state;
m_pOut->setHigh(b_state);
@@ -224,7 +224,7 @@ Item* ECLogicOutput::construct( ItemDocument *itemDocument, bool newItem, const
LibraryItem* ECLogicOutput::libraryItem()
{
return new LibraryItem(
- QString::QString("ec/logic_output"),
+ TQString::TQString("ec/logic_output"),
i18n("Logic Output"),
i18n("Logic"),
"logic_output.png",
@@ -276,7 +276,7 @@ void ECLogicOutput::inStateChanged( bool newState )
}
-void ECLogicOutput::drawShape( QPainter &p )
+void ECLogicOutput::drawShape( TQPainter &p )
{
unsigned long long newTime = m_pSimulator->time();
unsigned long long runTime = newTime - m_lastDrawTime;
@@ -297,7 +297,7 @@ void ECLogicOutput::drawShape( QPainter &p )
state = m_lastDrawState = double(m_highTime)/double(runTime);
initPainter(p);
- p.setBrush( QColor( 255, uint(255-state*(255-166)), uint((1-state)*255) ) );
+ p.setBrush( TQColor( 255, uint(255-state*(255-166)), uint((1-state)*255) ) );
p.drawEllipse( int(x()-8), int(y()-8), width(), height() );
deinitPainter(p);
diff --git a/src/electronics/components/discretelogic.h b/src/electronics/components/discretelogic.h
index 82775bf..c8a5778 100644
--- a/src/electronics/components/discretelogic.h
+++ b/src/electronics/components/discretelogic.h
@@ -31,7 +31,7 @@ class Inverter : public CallbackClass, public Component
protected:
void inStateChanged( bool newState );
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
LogicIn * m_pIn;
LogicOut * m_pOut;
@@ -52,7 +52,7 @@ public:
private:
void inStateChanged( bool newState );
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
LogicIn * m_pIn;
LogicOut * m_pOut;
@@ -71,11 +71,11 @@ public:
static Item* construct( ItemDocument *itemDocument, bool newItem, const char *id );
static LibraryItem *libraryItem();
- virtual void buttonStateChanged( const QString &id, bool state );
+ virtual void buttonStateChanged( const TQString &id, bool state );
private:
virtual void dataChanged();
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
LogicOut * m_pOut;
bool b_state;
};
@@ -95,7 +95,7 @@ class ECLogicOutput : public CallbackClass, public Component
protected:
void inStateChanged( bool newState );
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
unsigned long long m_lastDrawTime;
unsigned long long m_lastSwitchTime;
diff --git a/src/electronics/components/ec555.cpp b/src/electronics/components/ec555.cpp
index eccf2bd..3f43cb3 100644
--- a/src/electronics/components/ec555.cpp
+++ b/src/electronics/components/ec555.cpp
@@ -17,7 +17,7 @@
#include <kiconloader.h>
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* EC555::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -27,7 +27,7 @@ Item* EC555::construct( ItemDocument *itemDocument, bool newItem, const char *id
LibraryItem* EC555::libraryItem()
{
return new LibraryItem(
- QString::QString("ec/555"),
+ TQString::TQString("ec/555"),
i18n("555"),
i18n("Integrated Circuits"),
"ic1.png",
@@ -41,8 +41,8 @@ EC555::EC555( ICNDocument *icnDocument, bool newItem, const char *id )
{
m_name = i18n("555");
m_desc = i18n("Common timer IC");
-// m_pins = QStringList::split( ',', "Gnd,Trg,Out,Res,CV,Th,Dis,Vcc" );
-// m_pins = QStringList::split( ',', "Dis,Th,Trg,Gnd,CV,Out,Res,Vcc" );
+// m_pins = TQStringList::split( ',', "Gnd,Trg,Out,Res,CV,Th,Dis,Vcc" );
+// m_pins = TQStringList::split( ',', "Dis,Th,Trg,Gnd,CV,Out,Res,Vcc" );
old_com1 = false;
old_com2 = false;
@@ -55,15 +55,15 @@ EC555::EC555( ICNDocument *icnDocument, bool newItem, const char *id )
// Pin 7
discharge = createPin( -40, -16, 0, "Dis" )->pin();
- addDisplayText( "dis", QRect( -32, -24, 24, 16 ), "Dis" );
+ addDisplayText( "dis", TQRect( -32, -24, 24, 16 ), "Dis" );
// Pin 6
threshold = createPin( -40, 0, 0, "Th" )->pin();
- addDisplayText( "th", QRect( -32, -8, 24, 16 ), "Th" );
+ addDisplayText( "th", TQRect( -32, -8, 24, 16 ), "Th" );
// Pin 2
trigger = createPin( -40, 16, 0, "Trg" )->pin();
- addDisplayText( "trg", QRect( -32, 8, 24, 16 ), "Trg" );
+ addDisplayText( "trg", TQRect( -32, 8, 24, 16 ), "Trg" );
@@ -71,11 +71,11 @@ EC555::EC555( ICNDocument *icnDocument, bool newItem, const char *id )
// Pin 8
vcc = createPin( -16, -40, 90, "Vcc" )->pin();
- addDisplayText( "vcc", QRect( -24, -32, 16, 8 ), "+" );
+ addDisplayText( "vcc", TQRect( -24, -32, 16, 8 ), "+" );
// Pin 4
reset = createPin( 16, -40, 90, "Res" )->pin();
- addDisplayText( "res", QRect( 8, -28, 16, 16 ), "Res" );
+ addDisplayText( "res", TQRect( 8, -28, 16, 16 ), "Res" );
@@ -83,11 +83,11 @@ EC555::EC555( ICNDocument *icnDocument, bool newItem, const char *id )
// Pin 1
ground = createPin( -16, 40, 270, "Gnd" )->pin();
- addDisplayText( "gnd", QRect( -24, 20, 16, 8 ), "-" );
+ addDisplayText( "gnd", TQRect( -24, 20, 16, 8 ), "-" );
// Pin 5
control = createPin( 16, 40, 270, "CV" )->pin();
- addDisplayText( "cv", QRect( 8, 12, 16, 16 ), "CV" );
+ addDisplayText( "cv", TQRect( 8, 12, 16, 16 ), "CV" );
@@ -95,7 +95,7 @@ EC555::EC555( ICNDocument *icnDocument, bool newItem, const char *id )
// Pin 3
output = createPin( 40, 0, 180, "Out" )->pin();
- addDisplayText( "out", QRect( 8, -8, 16, 16 ), "Out" );
+ addDisplayText( "out", TQRect( 8, -8, 16, 16 ), "Out" );
diff --git a/src/electronics/components/ec555.h b/src/electronics/components/ec555.h
index edeb2a5..79b121f 100644
--- a/src/electronics/components/ec555.h
+++ b/src/electronics/components/ec555.h
@@ -13,7 +13,7 @@
#include "component.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
/**
@short 555 IC
diff --git a/src/electronics/components/ecbcdto7segment.cpp b/src/electronics/components/ecbcdto7segment.cpp
index fb210ea..b6a7dd8 100644
--- a/src/electronics/components/ecbcdto7segment.cpp
+++ b/src/electronics/components/ecbcdto7segment.cpp
@@ -43,7 +43,7 @@ Item* ECBCDTo7Segment::construct( ItemDocument *itemDocument, bool newItem, cons
LibraryItem* ECBCDTo7Segment::libraryItem()
{
return new LibraryItem(
- QString::QString("ec/bcd_to_seven_segment"),
+ TQString::TQString("ec/bcd_to_seven_segment"),
i18n("BCD to 7 Segment"),
i18n("Integrated Circuits"),
"ic2.png",
@@ -68,7 +68,7 @@ ECBCDTo7Segment::ECBCDTo7Segment( ICNDocument *icnDocument, bool newItem, const
oldOut[i] = false;
}
- QStringList pins = QStringList::split( ',', "A,B,C,D,,lt,rb,en,d,e,f,g,,a,b,c", true );
+ TQStringList pins = TQStringList::split( ',', "A,B,C,D,,lt,rb,en,d,e,f,g,,a,b,c", true );
initDIPSymbol( pins, 48 );
initDIP(pins);
@@ -90,7 +90,7 @@ ECBCDTo7Segment::ECBCDTo7Segment( ICNDocument *icnDocument, bool newItem, const
for ( uint i=0; i<7; ++i )
{
- outLogic[i] = createLogicOut( ecNodeWithID( QChar('a'+i) ), false );
+ outLogic[i] = createLogicOut( ecNodeWithID( TQChar('a'+i) ), false );
outLogic[i]->setCallback( this, (CallbackPtr)(&ECBCDTo7Segment::inStateChanged) );
}
inStateChanged(false);
diff --git a/src/electronics/components/ecbjt.cpp b/src/electronics/components/ecbjt.cpp
index b4b59f2..aed928e 100644
--- a/src/electronics/components/ecbjt.cpp
+++ b/src/electronics/components/ecbjt.cpp
@@ -15,7 +15,7 @@
#include <kiconloader.h>
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item * ECBJT::constructNPN( ItemDocument * itemDocument, bool newItem, const char * id )
{
@@ -122,7 +122,7 @@ void ECBJT::dataChanged()
}
-void ECBJT::drawShape( QPainter &p )
+void ECBJT::drawShape( TQPainter &p )
{
const int _x = int(x());
const int _y = int(y());
@@ -133,18 +133,18 @@ void ECBJT::drawShape( QPainter &p )
p.drawLine( _x+8, _y-8, _x-8, _y );
p.drawLine( _x+8, _y+8, _x-8, _y );
- QPointArray pa(3);
+ TQPointArray pa(3);
if ( m_bIsNPN )
{
- pa[0] = QPoint( _x+6, _y+7 );
- pa[1] = QPoint( _x+2, _y+8 );
- pa[2] = QPoint( _x+6, _y+3 );
+ pa[0] = TQPoint( _x+6, _y+7 );
+ pa[1] = TQPoint( _x+2, _y+8 );
+ pa[2] = TQPoint( _x+6, _y+3 );
}
else
{
- pa[0] = QPoint( _x-7, _y+1 );
- pa[1] = QPoint( _x-4, _y+5 );
- pa[2] = QPoint( _x-2, _y );
+ pa[0] = TQPoint( _x-7, _y+1 );
+ pa[1] = TQPoint( _x-4, _y+5 );
+ pa[2] = TQPoint( _x-2, _y );
}
p.setBrush( p.pen().color() );
p.drawPolygon(pa);
diff --git a/src/electronics/components/ecbjt.h b/src/electronics/components/ecbjt.h
index 17a63e9..9a6d6dd 100644
--- a/src/electronics/components/ecbjt.h
+++ b/src/electronics/components/ecbjt.h
@@ -33,7 +33,7 @@ class ECBJT : public Component
protected:
virtual void dataChanged();
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
bool m_bIsNPN;
BJT * m_pBJT;
diff --git a/src/electronics/components/eccapacitor.cpp b/src/electronics/components/eccapacitor.cpp
index 76a09b0..c951291 100644
--- a/src/electronics/components/eccapacitor.cpp
+++ b/src/electronics/components/eccapacitor.cpp
@@ -14,7 +14,7 @@
#include "libraryitem.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* ECCapacitor::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -53,7 +53,7 @@ ECCapacitor::ECCapacitor( ICNDocument *icnDocument, bool newItem, const char *id
property("Capacitance")->setMaxValue(1e12);
property("Capacitance")->setValue(1e-3);
- addDisplayText( "capacitance", QRect( -8, -24, 16, 16 ), "", false );
+ addDisplayText( "capacitance", TQRect( -8, -24, 16, 16 ), "", false );
}
ECCapacitor::~ECCapacitor()
@@ -64,20 +64,20 @@ void ECCapacitor::dataChanged()
{
double capacitance = dataDouble("Capacitance");
- QString display = QString::number( capacitance / getMultiplier(capacitance), 'g', 3 ) + getNumberMag(capacitance) + "F";
+ TQString display = TQString::number( capacitance / getMultiplier(capacitance), 'g', 3 ) + getNumberMag(capacitance) + "F";
setDisplayText( "capacitance", display );
m_capacitance->setCapacitance(capacitance);
}
-void ECCapacitor::drawShape( QPainter &p )
+void ECCapacitor::drawShape( TQPainter &p )
{
initPainter(p);
int _y = (int)y()-8;
int _x = (int)x()-8;
- QPen pen;
+ TQPen pen;
pen.setWidth(1);
pen.setColor( p.pen().color() );
p.setPen(pen);
diff --git a/src/electronics/components/eccapacitor.h b/src/electronics/components/eccapacitor.h
index 4dd0ee6..891ec14 100644
--- a/src/electronics/components/eccapacitor.h
+++ b/src/electronics/components/eccapacitor.h
@@ -32,7 +32,7 @@ public:
private:
void dataChanged();
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
Capacitance * m_capacitance;
};
diff --git a/src/electronics/components/ecclockinput.cpp b/src/electronics/components/ecclockinput.cpp
index 7f1ec9c..7d3d608 100644
--- a/src/electronics/components/ecclockinput.cpp
+++ b/src/electronics/components/ecclockinput.cpp
@@ -15,7 +15,7 @@
#include "simulator.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <cmath>
@@ -32,7 +32,7 @@ Item* ECClockInput::construct( ItemDocument *itemDocument, bool newItem, const c
LibraryItem* ECClockInput::libraryItem()
{
return new LibraryItem(
- QString("ec/clock_input"),
+ TQString("ec/clock_input"),
i18n("Clock Input"),
i18n("Logic"),
"clockinput.png",
@@ -76,7 +76,7 @@ ECClockInput::ECClockInput( ICNDocument *icnDocument, bool newItem, const char *
property("high-time")->setMinValue(1.0/LOGIC_UPDATE_RATE);
property("high-time")->setValue(0.5);
- addDisplayText( "freq", QRect( -16, -24, 32, 14 ), "", false );
+ addDisplayText( "freq", TQRect( -16, -24, 32, 14 ), "", false );
}
@@ -97,7 +97,7 @@ void ECClockInput::dataChanged()
m_period = m_low_time+m_high_time;
const double frequency = 1./(dataDouble("high-time")+dataDouble("low-time"));
- QString display = QString::number( frequency / getMultiplier(frequency), 'g', 3 ) + getNumberMag(frequency) + "Hz";
+ TQString display = TQString::number( frequency / getMultiplier(frequency), 'g', 3 ) + getNumberMag(frequency) + "Hz";
setDisplayText( "freq", display );
bool setStepCallbacks = m_period > 100;
@@ -159,7 +159,7 @@ void ECClockInput::stepNonLogic()
}
-void ECClockInput::drawShape( QPainter &p )
+void ECClockInput::drawShape( TQPainter &p )
{
initPainter(p);
diff --git a/src/electronics/components/ecclockinput.h b/src/electronics/components/ecclockinput.h
index c7f7d14..db5f7bc 100644
--- a/src/electronics/components/ecclockinput.h
+++ b/src/electronics/components/ecclockinput.h
@@ -38,7 +38,7 @@ public:
virtual bool doesStepNonLogic() const { return true; }
protected:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
void dataChanged();
uint m_time;
diff --git a/src/electronics/components/eccurrentsignal.cpp b/src/electronics/components/eccurrentsignal.cpp
index e6dc351..14c632b 100644
--- a/src/electronics/components/eccurrentsignal.cpp
+++ b/src/electronics/components/eccurrentsignal.cpp
@@ -16,7 +16,7 @@
#include "simulator.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* ECCurrentSignal::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -26,7 +26,7 @@ Item* ECCurrentSignal::construct( ItemDocument *itemDocument, bool newItem, cons
LibraryItem* ECCurrentSignal::libraryItem()
{
return new LibraryItem(
- QString("ec/ac_current"),
+ TQString("ec/ac_current"),
i18n("Current Signal"),
i18n("Sources"),
"currentsignal.png",
@@ -62,8 +62,8 @@ ECCurrentSignal::ECCurrentSignal( ICNDocument *icnDocument, bool newItem, const
property("1-current")->setMaxValue(1e12);
property("1-current")->setValue(0.02);
- addDisplayText( "~", QRect( -8, -8, 16, 16 ), "~" );
- addDisplayText( "current", QRect( -16, -24, 32, 16 ), "" );
+ addDisplayText( "~", TQRect( -8, -8, 16, 16 ), "~" );
+ addDisplayText( "current", TQRect( -16, -24, 32, 16 ), "" );
}
@@ -76,14 +76,14 @@ void ECCurrentSignal::dataChanged()
const double current = dataDouble("1-current");
const double frequency = dataDouble("1-frequency");
- QString display = QString::number( current / getMultiplier(current), 'g', 3 ) + getNumberMag(current) + "A";
+ TQString display = TQString::number( current / getMultiplier(current), 'g', 3 ) + getNumberMag(current) + "A";
setDisplayText( "current", display );
m_currentSignal->setStep( 1./LINEAR_UPDATE_RATE, ElementSignal::st_sinusoidal, frequency );
m_currentSignal->setCurrent(current);
}
-void ECCurrentSignal::drawShape( QPainter &p )
+void ECCurrentSignal::drawShape( TQPainter &p )
{
initPainter(p);
p.drawEllipse( (int)x()-8, (int)y()-8, width(), height() );
diff --git a/src/electronics/components/eccurrentsignal.h b/src/electronics/components/eccurrentsignal.h
index 88dd276..802221d 100644
--- a/src/electronics/components/eccurrentsignal.h
+++ b/src/electronics/components/eccurrentsignal.h
@@ -27,7 +27,7 @@ public:
static LibraryItem *libraryItem();
protected:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
void dataChanged();
CurrentSignal *m_currentSignal;
diff --git a/src/electronics/components/eccurrentsource.cpp b/src/electronics/components/eccurrentsource.cpp
index 76ecf3e..6184ef1 100644
--- a/src/electronics/components/eccurrentsource.cpp
+++ b/src/electronics/components/eccurrentsource.cpp
@@ -16,7 +16,7 @@
#include "pin.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* ECCurrentSource::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -26,7 +26,7 @@ Item* ECCurrentSource::construct( ItemDocument *itemDocument, bool newItem, cons
LibraryItem* ECCurrentSource::libraryItem()
{
return new LibraryItem(
- QString::QString("ec/current_source"),
+ TQString::TQString("ec/current_source"),
i18n("Current Source"),
i18n("Sources"),
"current_source.png",
@@ -54,7 +54,7 @@ ECCurrentSource::ECCurrentSource( ICNDocument *icnDocument, bool newItem, const
property("current")->setMaxValue(1e12);
property("current")->setValue(0.02);
- addDisplayText("current", QRect( -16, -16, 24, 0 ), "" );
+ addDisplayText("current", TQRect( -16, -16, 24, 0 ), "" );
}
@@ -67,11 +67,11 @@ void ECCurrentSource::dataChanged()
double current = dataDouble("current");
m_currentSource->setCurrent(current);
- QString display = QString::number( current / getMultiplier(current), 'g', 3 ) + getNumberMag(current) + "A";
+ TQString display = TQString::number( current / getMultiplier(current), 'g', 3 ) + getNumberMag(current) + "A";
setDisplayText("current", display );
}
-void ECCurrentSource::drawShape( QPainter &p )
+void ECCurrentSource::drawShape( TQPainter &p )
{
initPainter(p);
diff --git a/src/electronics/components/eccurrentsource.h b/src/electronics/components/eccurrentsource.h
index 6332eba..36a98b5 100644
--- a/src/electronics/components/eccurrentsource.h
+++ b/src/electronics/components/eccurrentsource.h
@@ -27,7 +27,7 @@ public:
static LibraryItem *libraryItem();
private:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
void dataChanged();
CurrentSource *m_currentSource;
diff --git a/src/electronics/components/ecdiode.cpp b/src/electronics/components/ecdiode.cpp
index 1d63bce..744f27e 100644
--- a/src/electronics/components/ecdiode.cpp
+++ b/src/electronics/components/ecdiode.cpp
@@ -14,7 +14,7 @@
#include "libraryitem.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* ECDiode::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -72,7 +72,7 @@ ECDiode::ECDiode( ICNDocument *icnDocument, bool newItem, const char *id )
// createProperty( "R", Variant::Type::Double );
// property("R")->setCaption( i18n("Series Resistance") );
-// property("R")->setUnit( QChar(0x3a9) );
+// property("R")->setUnit( TQChar(0x3a9) );
// property("R")->setMinValue(1e-5);
// property("R")->setMaxValue(1e0);
// property("R")->setValue( ds.R );
@@ -98,17 +98,17 @@ void ECDiode::dataChanged()
}
-void ECDiode::drawShape( QPainter & p )
+void ECDiode::drawShape( TQPainter & p )
{
initPainter(p);
int _x = int(x());
int _y = int(y());
- 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);
diff --git a/src/electronics/components/ecdiode.h b/src/electronics/components/ecdiode.h
index fa8d034..a44a950 100644
--- a/src/electronics/components/ecdiode.h
+++ b/src/electronics/components/ecdiode.h
@@ -27,7 +27,7 @@ public:
static LibraryItem *libraryItem();
protected:
- void drawShape( QPainter & p );
+ void drawShape( TQPainter & p );
void dataChanged();
Diode *m_diode;
};
diff --git a/src/electronics/components/ecfixedvoltage.cpp b/src/electronics/components/ecfixedvoltage.cpp
index 06eb707..fa21dfe 100644
--- a/src/electronics/components/ecfixedvoltage.cpp
+++ b/src/electronics/components/ecfixedvoltage.cpp
@@ -15,7 +15,7 @@
#include "libraryitem.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* ECFixedVoltage::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -42,7 +42,7 @@ ECFixedVoltage::ECFixedVoltage( ICNDocument *icnDocument, bool newItem, const ch
init1PinRight();
m_voltagePoint = createVoltagePoint( m_pPNode[0], 5.0 );
- addDisplayText( "voltage", QRect( -24, -20, width()+32, 12 ), "" );
+ addDisplayText( "voltage", TQRect( -24, -20, width()+32, 12 ), "" );
createProperty( "voltage", Variant::Type::Double );
property("voltage")->setUnit("V");
@@ -59,18 +59,18 @@ ECFixedVoltage::~ECFixedVoltage()
void ECFixedVoltage::dataChanged()
{
const double voltage = dataDouble("voltage");
- QString display = QString::number( voltage / getMultiplier(voltage), 'g', 3 ) + getNumberMag(voltage) + "V";
+ TQString display = TQString::number( voltage / getMultiplier(voltage), 'g', 3 ) + getNumberMag(voltage) + "V";
setDisplayText( "voltage", display );
m_voltagePoint->setVoltage(voltage);
}
-void ECFixedVoltage::drawShape( QPainter &p )
+void ECFixedVoltage::drawShape( TQPainter &p )
{
initPainter(p);
int _x = int(x());
int _y = int(y());
p.drawEllipse( _x-4, _y-4, 8, 8 );
- p.setPen( m_pPNode[0]->isSelected() ? m_selectedCol : Qt::black );
+ p.setPen( m_pPNode[0]->isSelected() ? m_selectedCol : TQt::black );
p.drawLine( _x+4, _y, _x+8, _y );
deinitPainter(p);
}
diff --git a/src/electronics/components/ecfixedvoltage.h b/src/electronics/components/ecfixedvoltage.h
index ba20358..c2a632d 100644
--- a/src/electronics/components/ecfixedvoltage.h
+++ b/src/electronics/components/ecfixedvoltage.h
@@ -27,7 +27,7 @@ public:
static LibraryItem *libraryItem();
private:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
void dataChanged();
VoltagePoint *m_voltagePoint;
};
diff --git a/src/electronics/components/ecground.cpp b/src/electronics/components/ecground.cpp
index efbfc41..2e98cfa 100644
--- a/src/electronics/components/ecground.cpp
+++ b/src/electronics/components/ecground.cpp
@@ -15,7 +15,7 @@
#include "pin.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* ECGround::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -24,7 +24,7 @@ Item* ECGround::construct( ItemDocument *itemDocument, bool newItem, const char
LibraryItem* ECGround::libraryItem()
{
return new LibraryItem(
- QString::QString("ec/ground"),
+ TQString::TQString("ec/ground"),
i18n("Ground (0V)"),
i18n("Sources"),
"ground.png",
@@ -47,12 +47,12 @@ ECGround::~ECGround()
{
}
-void ECGround::drawShape( QPainter &p )
+void ECGround::drawShape( TQPainter &p )
{
initPainter(p);
int _x = (int)x()-8;
int _y = (int)y()-8;
- QPen pen;
+ TQPen pen;
pen.setWidth(2);
pen.setColor( p.pen().color() );
p.setPen(pen);
diff --git a/src/electronics/components/ecground.h b/src/electronics/components/ecground.h
index 0cf97bc..9740fd9 100644
--- a/src/electronics/components/ecground.h
+++ b/src/electronics/components/ecground.h
@@ -27,7 +27,7 @@ public:
static LibraryItem *libraryItem();
private:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
};
#endif
diff --git a/src/electronics/components/eckeypad.cpp b/src/electronics/components/eckeypad.cpp
index 89d2659..c92a562 100644
--- a/src/electronics/components/eckeypad.cpp
+++ b/src/electronics/components/eckeypad.cpp
@@ -24,7 +24,7 @@ Item* ECKeyPad::construct( ItemDocument *itemDocument, bool newItem, const char
LibraryItem* ECKeyPad::libraryItem()
{
return new LibraryItem(
- QString("ec/keypad"),
+ TQString("ec/keypad"),
i18n("Keypad"),
i18n("Switches"),
"keypad.png",
@@ -32,7 +32,7 @@ LibraryItem* ECKeyPad::libraryItem()
ECKeyPad::construct );
}
-const QString text[4][9] =
+const TQString text[4][9] =
{ { "1","2","3","A","E","I","M","Q","U" },
{ "4","5","6","B","F","J","N","R","V" },
{ "7","8","9","C","G","K","O","S","W" },
@@ -66,7 +66,7 @@ ECKeyPad::ECKeyPad( ICNDocument *icnDocument, bool newItem, const char *id )
v->setValue(5e-3);
for ( int i = 0; i < 4; i++ )
- createPin( 0, -32+i*24, 0, QString("row_%1").arg(QString::number(i)) );
+ createPin( 0, -32+i*24, 0, TQString("row_%1").tqarg(TQString::number(i)) );
m_numCols = 0;
}
@@ -77,9 +77,9 @@ ECKeyPad::~ECKeyPad()
}
-QString ECKeyPad::buttonID( int row, int col ) const
+TQString ECKeyPad::buttonID( int row, int col ) const
{
- return QString("b_%1_%2").arg(QString::number(row)).arg(QString::number(col));
+ return TQString("b_%1_%2").tqarg(TQString::number(row)).tqarg(TQString::number(col));
}
@@ -129,17 +129,17 @@ void ECKeyPad::initPins( unsigned numCols )
for ( unsigned i = 0; i < 4; i++ )
{
for ( unsigned j = m_numCols; j < numCols; j++ )
- addButton( buttonID(i,j), QRect( 0, 0, 20, 20 ), text[i][j] );
+ addButton( buttonID(i,j), TQRect( 0, 0, 20, 20 ), text[i][j] );
}
ECNode * cols[numCols];
for ( unsigned j = m_numCols; j < numCols; j++ )
- cols[j] = createPin( 0, 64, 270, "col_" + QString::number(j) );
+ cols[j] = createPin( 0, 64, 270, "col_" + TQString::number(j) );
for ( unsigned i = 0; i < 4; i++ )
{
- ECNode * row = ecNodeWithID("row_"+QString::number(i));
+ ECNode * row = ecNodeWithID("row_"+TQString::number(i));
for ( unsigned j = m_numCols; j < numCols; j++ )
m_switch[i][j] = createSwitch( cols[j], row, true );
}
@@ -155,7 +155,7 @@ void ECKeyPad::initPins( unsigned numCols )
}
for ( unsigned j = numCols; j < m_numCols; j++ )
- removeNode( "col_" + QString::number(j) );
+ removeNode( "col_" + TQString::number(j) );
for ( unsigned i = 0; i < 4; i++ )
{
@@ -172,27 +172,27 @@ void ECKeyPad::initPins( unsigned numCols )
for ( int j = 0; j < int(m_numCols); j++ )
{
widgetWithID( buttonID(i,j) )->setOriginalRect(
- QRect( offsetX() + 6 + 24*j, offsetY() + 6 + 24*i, 20, 20 ) );
+ TQRect( offsetX() + 6 + 24*j, offsetY() + 6 + 24*i, 20, 20 ) );
}
}
for ( int i = 0; i < 4; i++ )
- m_nodeMap["row_" + QString::number(i)].x = width()+offsetX();
+ m_nodeMap["row_" + TQString::number(i)].x = width()+offsetX();
for ( int j = 0; j < int(m_numCols); j++ )
- m_nodeMap["col_" + QString::number(j)].x = 24*j+offsetX()+16;
+ m_nodeMap["col_" + TQString::number(j)].x = 24*j+offsetX()+16;
updateAttachedPositioning();
//END Update Positions
}
-void ECKeyPad::buttonStateChanged( const QString &id, bool state )
+void ECKeyPad::buttonStateChanged( const TQString &id, bool state )
{
if ( !id.startsWith("b_") )
return;
- QStringList tags = QStringList::split( '_', id );
+ TQStringList tags = TQStringList::split( '_', id );
const int i = tags[1].toInt();
const int j = tags[2].toInt();
m_switch[i][j]->setState( state ? Switch::Closed : Switch::Open );
diff --git a/src/electronics/components/eckeypad.h b/src/electronics/components/eckeypad.h
index 18a497c..c2794e5 100644
--- a/src/electronics/components/eckeypad.h
+++ b/src/electronics/components/eckeypad.h
@@ -26,13 +26,13 @@ class ECKeyPad : public Component
static Item* construct( ItemDocument *itemDocument, bool newItem, const char *id );
static LibraryItem *libraryItem();
- virtual void buttonStateChanged( const QString &id, bool state );
+ virtual void buttonStateChanged( const TQString &id, bool state );
virtual bool canFlip() const { return true; }
protected:
virtual void dataChanged();
void initPins( unsigned numCols);
- QString buttonID( int row, int col ) const;
+ TQString buttonID( int row, int col ) const;
int sideLength( unsigned numButtons ) const;
Switch *m_switch[4][11];
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);
diff --git a/src/electronics/components/ecled.h b/src/electronics/components/ecled.h
index ce24598..0d0d3c5 100644
--- a/src/electronics/components/ecled.h
+++ b/src/electronics/components/ecled.h
@@ -36,7 +36,7 @@ public:
virtual bool doesStepNonLogic() const { return true; }
private:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
double r, g, b;
diff --git a/src/electronics/components/ecopamp.cpp b/src/electronics/components/ecopamp.cpp
index dbb7457..04ed81f 100644
--- a/src/electronics/components/ecopamp.cpp
+++ b/src/electronics/components/ecopamp.cpp
@@ -14,7 +14,7 @@
#include "libraryitem.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* ECOpAmp::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -40,10 +40,10 @@ ECOpAmp::ECOpAmp( ICNDocument *icnDocument, bool newItem, const char *id )
m_name = i18n("Operational Amplifier");
m_desc = i18n("Ideal amplifier");
- QPointArray pa(3);
- pa[0] = QPoint( -16, -16 );
- pa[1] = QPoint( 16, 0 );
- pa[2] = QPoint( -16, 16 );
+ TQPointArray pa(3);
+ pa[0] = TQPoint( -16, -16 );
+ pa[1] = TQPoint( 16, 0 );
+ pa[2] = TQPoint( -16, 16 );
setItemPoints( pa, true );
init2PinLeft( -8, 8 );
@@ -57,17 +57,17 @@ ECOpAmp::~ECOpAmp()
}
-void ECOpAmp::drawShape( QPainter & p )
+void ECOpAmp::drawShape( TQPainter & p )
{
initPainter(p);
int _x = int(x());
int _y = int(y());
- QPointArray pa(3);
- pa[0] = QPoint( _x-16, _y-16 );
- pa[1] = QPoint( _x+16, _y );
- pa[2] = QPoint( _x-16, _y+16 );
+ TQPointArray pa(3);
+ pa[0] = TQPoint( _x-16, _y-16 );
+ pa[1] = TQPoint( _x+16, _y );
+ pa[2] = TQPoint( _x-16, _y+16 );
p.drawPolygon(pa);
p.drawPolyline(pa);
diff --git a/src/electronics/components/ecopamp.h b/src/electronics/components/ecopamp.h
index 6b6b147..ceb5010 100644
--- a/src/electronics/components/ecopamp.h
+++ b/src/electronics/components/ecopamp.h
@@ -29,7 +29,7 @@ class ECOpAmp : public Component
static LibraryItem *libraryItem();
protected:
- virtual void drawShape( QPainter & p );
+ virtual void drawShape( TQPainter & p );
};
#endif
diff --git a/src/electronics/components/ecpotentiometer.cpp b/src/electronics/components/ecpotentiometer.cpp
index db0fedd..8f55ff5 100644
--- a/src/electronics/components/ecpotentiometer.cpp
+++ b/src/electronics/components/ecpotentiometer.cpp
@@ -15,8 +15,8 @@
#include "resistance.h"
#include <klocale.h>
-#include <qpainter.h>
-#include <qstyle.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
Item* ECPotentiometer::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -48,16 +48,16 @@ ECPotentiometer::ECPotentiometer( ICNDocument *icnDocument, bool newItem, const
m_r1 = createResistance( createPin( -8, -24, 90, "n1" ), m_p1, 1. );
m_r2 = createResistance( createPin( -8, 24, 270, "n2" ), m_p1, 1. );
- Slider * s = addSlider( "slider", 0, 100, 5, 50, Qt::Vertical, QRect( 0, -16, 16, 32 ) );
- m_pSlider = static_cast<QSlider*>(s->widget());
+ Slider * s = addSlider( "slider", 0, 100, 5, 50, Qt::Vertical, TQRect( 0, -16, 16, 32 ) );
+ m_pSlider = static_cast<TQSlider*>(s->widget());
createProperty( "resistance", Variant::Type::Double );
property("resistance")->setCaption( i18n("Resistance") );
- property("resistance")->setUnit( QChar(0x3a9) );
+ property("resistance")->setUnit( TQChar(0x3a9) );
property("resistance")->setMinValue(1e-6);
property("resistance")->setValue(1e5);
- addDisplayText( "res", QRect( -56, -8, 40, 16 ), "" );
+ addDisplayText( "res", TQRect( -56, -8, 40, 16 ), "" );
}
ECPotentiometer::~ECPotentiometer()
@@ -68,13 +68,13 @@ void ECPotentiometer::dataChanged()
{
m_resistance = dataDouble("resistance");
- QString display = QString::number( m_resistance / getMultiplier(m_resistance), 'g', 3 ) + getNumberMag(m_resistance) + QChar(0x3a9);
+ TQString display = TQString::number( m_resistance / getMultiplier(m_resistance), 'g', 3 ) + getNumberMag(m_resistance) + TQChar(0x3a9);
setDisplayText( "res", display );
sliderValueChanged( "slider", slider("slider")->value() );
}
-void ECPotentiometer::sliderValueChanged( const QString &id, int newValue )
+void ECPotentiometer::sliderValueChanged( const TQString &id, int newValue )
{
if ( id != "slider" )
return;
@@ -85,7 +85,7 @@ void ECPotentiometer::sliderValueChanged( const QString &id, int newValue )
m_r2->setResistance( m_resistance*(double)(100.-newValue)/100. );
}
-void ECPotentiometer::drawShape( QPainter &p )
+void ECPotentiometer::drawShape( TQPainter &p )
{
initPainter(p);
int _x = int(x());
@@ -93,17 +93,17 @@ void ECPotentiometer::drawShape( QPainter &p )
p.drawRect( _x-14, _y-16, 12, 32 );
- QPointArray pa(3);
- pa[0] = QPoint( 0, 0 );
- pa[1] = QPoint( 4, -3 );
- pa[2] = QPoint( 4, 3 );
+ TQPointArray pa(3);
+ pa[0] = TQPoint( 0, 0 );
+ pa[1] = TQPoint( 4, -3 );
+ pa[2] = TQPoint( 4, 3 );
- int space = m_pSlider->style().pixelMetric( QStyle::PM_SliderSpaceAvailable, m_pSlider );
+ int space = m_pSlider->tqstyle().tqpixelMetric( TQStyle::PM_SliderSpaceAvailable, m_pSlider );
int base_y = _y + (( angleDegrees() == 0 || angleDegrees() == 270 ) ? 1 : -1) * int( space * m_sliderProp );
pa.translate( _x+16, base_y );
- QColor c = m_p1->isSelected() ? m_selectedCol : black;
+ TQColor c = m_p1->isSelected() ? m_selectedCol : black;
p.setPen(c);
p.setBrush(c);
diff --git a/src/electronics/components/ecpotentiometer.h b/src/electronics/components/ecpotentiometer.h
index e7ca83b..0ecf362 100644
--- a/src/electronics/components/ecpotentiometer.h
+++ b/src/electronics/components/ecpotentiometer.h
@@ -13,7 +13,7 @@
#include "component.h"
-class QSlider;
+class TQSlider;
/**
@short Potentiometer
@@ -28,16 +28,16 @@ public:
static Item* construct( ItemDocument *itemDocument, bool newItem, const char *id );
static LibraryItem *libraryItem();
- virtual void sliderValueChanged( const QString &id, int newValue );
+ virtual void sliderValueChanged( const TQString &id, int newValue );
private:
void dataChanged();
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
ECNode * m_p1;
Resistance *m_r1, *m_r2;
double m_resistance;
double m_sliderProp;
- QSlider * m_pSlider;
+ TQSlider * m_pSlider;
};
#endif
diff --git a/src/electronics/components/ecresistor.cpp b/src/electronics/components/ecresistor.cpp
index e4ee7a3..e03be7b 100644
--- a/src/electronics/components/ecresistor.cpp
+++ b/src/electronics/components/ecresistor.cpp
@@ -14,7 +14,7 @@
#include "resistance.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* ECResistor::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -45,11 +45,11 @@ ECResistor::ECResistor( 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);
- addDisplayText( "res", QRect( -16, -22, 32, 12 ), "", false );
+ addDisplayText( "res", TQRect( -16, -22, 32, 12 ), "", false );
}
ECResistor::~ECResistor()
@@ -60,13 +60,13 @@ void ECResistor::dataChanged()
{
double resistance = dataDouble("resistance");
- QString display = QString::number( resistance / getMultiplier(resistance), 'g', 3 ) + getNumberMag(resistance) + QChar(0x3a9);
+ TQString display = TQString::number( resistance / getMultiplier(resistance), 'g', 3 ) + getNumberMag(resistance) + TQChar(0x3a9);
setDisplayText( "res", display );
m_resistance->setResistance(resistance);
}
-void ECResistor::drawShape( QPainter &p )
+void ECResistor::drawShape( TQPainter &p )
{
initPainter(p);
p.drawRect( (int)x()-16, (int)y()-6, width(), 12 );
diff --git a/src/electronics/components/ecresistor.h b/src/electronics/components/ecresistor.h
index 17e799e..d9e756d 100644
--- a/src/electronics/components/ecresistor.h
+++ b/src/electronics/components/ecresistor.h
@@ -28,7 +28,7 @@ class ECResistor : public Component
protected:
virtual void dataChanged();
- virtual void drawShape( QPainter & p );
+ virtual void drawShape( TQPainter & p );
Resistance * m_resistance;
};
diff --git a/src/electronics/components/ecsevensegment.cpp b/src/electronics/components/ecsevensegment.cpp
index ec35776..e68bf7c 100644
--- a/src/electronics/components/ecsevensegment.cpp
+++ b/src/electronics/components/ecsevensegment.cpp
@@ -17,8 +17,8 @@
#include "simulator.h"
#include <klocale.h>
-#include <qpainter.h>
-#include <qstring.h>
+#include <tqpainter.h>
+#include <tqstring.h>
Item* ECSevenSegment::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -43,7 +43,7 @@ ECSevenSegment::ECSevenSegment( ICNDocument *icnDocument, bool newItem, const ch
m_desc = i18n("A seven segment display with a decimal point. This can be configured to either have a common cathode or a common anode.");
m_bDynamicContent = true;
- QStringList pins = QStringList::split( ',', "g,f,e,d,"+QString(QChar(0xB7))+",c,b,a" );
+ TQStringList pins = TQStringList::split( ',', "g,f,e,d,"+TQString(TQChar(0xB7))+",c,b,a" );
createProperty( "0-color", Variant::Type::Color );
property("0-color")->setCaption( i18n("Color") );
@@ -51,7 +51,7 @@ ECSevenSegment::ECSevenSegment( ICNDocument *icnDocument, bool newItem, const ch
createProperty( "diode-polarity", Variant::Type::Select );
property("diode-polarity")->setCaption( i18n("Configuration") );
- property("diode-polarity")->setAllowed( QStringList::split(',',"Common Cathode,Common Anode") );
+ property("diode-polarity")->setAllowed( TQStringList::split(',',"Common Cathode,Common Anode") );
property("diode-polarity")->setValue("Common Cathode");
for ( int i=0; i<8; i++ )
@@ -71,9 +71,9 @@ ECSevenSegment::ECSevenSegment( ICNDocument *icnDocument, bool newItem, const ch
m_nNode = createPin( width()/2+offsetX(), height()+8+offsetY(), 270, "-v" );
for ( int i=0; i<7; i++ )
- m_nodes[i] = ecNodeWithID( QChar('a'+i) );
+ m_nodes[i] = ecNodeWithID( TQChar('a'+i) );
- m_nodes[7] = ecNodeWithID(QChar(0xB7));
+ m_nodes[7] = ecNodeWithID(TQChar(0xB7));
m_bCommonCathode = false; // Force update
}
@@ -86,7 +86,7 @@ ECSevenSegment::~ECSevenSegment()
void ECSevenSegment::dataChanged()
{
- QColor color = dataColor("0-color");
+ TQColor color = dataColor("0-color");
r = color.red();
g = color.green();
b = color.blue();
@@ -129,7 +129,7 @@ void ECSevenSegment::stepNonLogic()
lastUpdatePeriod += interval;
}
-void ECSevenSegment::drawShape( QPainter &p )
+void ECSevenSegment::drawShape( TQPainter &p )
{
CNItem::drawShape(p);
@@ -145,9 +145,9 @@ void ECSevenSegment::drawShape( QPainter &p )
const int y3 = y1 + _height;
const int ds = 2; // "Slope"
-// QPen pen;
+// TQPen pen;
// pen.setWidth(2);
-// pen.setCapStyle(Qt::RoundCap);
+// pen.setCapStyle(TQt::RoundCap);
// p.setPen(pen);
if ( lastUpdatePeriod != 0. )
@@ -162,43 +162,43 @@ void ECSevenSegment::drawShape( QPainter &p )
// Top
_b = last_brightness[0];
- p.setPen( QPen( QColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ), 2 ) );
+ p.setPen( TQPen( TQColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ), 2 ) );
p.drawLine( x1+3+ds, y1+0, x2-3+ds, y1+0 );
// Top right
_b = last_brightness[1];
- p.setPen( QPen( QColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ), 2 ) );
+ p.setPen( TQPen( TQColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ), 2 ) );
p.drawLine( x2+0+ds, y1+3, x2+0, y2-3 );
// Bottom right
_b = last_brightness[2];
- p.setPen( QPen( QColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ), 2 ) );
+ p.setPen( TQPen( TQColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ), 2 ) );
p.drawLine( x2+0, y2+3, x2+0-ds, y3-3 );
// Bottom
_b = last_brightness[3];
- p.setPen( QPen( QColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ), 2 ) );
+ p.setPen( TQPen( TQColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ), 2 ) );
p.drawLine( x2-3-ds, y3+0, x1+3-ds, y3+0 );
// Bottom left
_b = last_brightness[4];
- p.setPen( QPen( QColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ), 2 ) );
+ p.setPen( TQPen( TQColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ), 2 ) );
p.drawLine( x1+0-ds, y3-3, x1+0, y2+3 );
// Top left
_b = last_brightness[5];
- p.setPen( QPen( QColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ), 2 ) );
+ p.setPen( TQPen( TQColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ), 2 ) );
p.drawLine( x1+0, y2-3, x1+0+ds, y1+3 );
// Middle
_b = last_brightness[6];
- p.setPen( QPen( QColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ), 2 ) );
+ p.setPen( TQPen( TQColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ), 2 ) );
p.drawLine( x1+3, y2+0, x2-3, y2+0 );
// Decimal point
_b = last_brightness[7];
- p.setBrush( QBrush( QColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ) ) );
- p.setPen( Qt::NoPen );
+ p.setBrush( TQBrush( TQColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ) ) );
+ p.setPen( TQt::NoPen );
p.drawPie( x2+3, y3-2, 3, 3, 0, 16*360 );
lastUpdatePeriod = 0.;
diff --git a/src/electronics/components/ecsevensegment.h b/src/electronics/components/ecsevensegment.h
index 7041c9a..0ec9923 100644
--- a/src/electronics/components/ecsevensegment.h
+++ b/src/electronics/components/ecsevensegment.h
@@ -35,7 +35,7 @@ public:
virtual bool canFlip() const { return true; }
private:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
bool m_bCommonCathode;
double lastUpdatePeriod;
diff --git a/src/electronics/components/ecsignallamp.cpp b/src/electronics/components/ecsignallamp.cpp
index c7034f7..0a25c39 100644
--- a/src/electronics/components/ecsignallamp.cpp
+++ b/src/electronics/components/ecsignallamp.cpp
@@ -16,7 +16,7 @@
#include "pin.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* ECSignalLamp::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -26,7 +26,7 @@ Item* ECSignalLamp::construct( ItemDocument *itemDocument, bool newItem, const c
LibraryItem* ECSignalLamp::libraryItem()
{
return new LibraryItem(
- QString("ec/signal_lamp"),
+ TQString("ec/signal_lamp"),
i18n("Signal Lamp"),
i18n("Outputs"),
"signal_lamp.png",
@@ -58,10 +58,10 @@ ECSignalLamp::~ECSignalLamp()
void ECSignalLamp::stepNonLogic()
{
const double voltage = m_pPNode[0]->pin()->voltage()-m_pNNode[0]->pin()->voltage();
- avgPower = QABS(avgPower*advanceSinceUpdate + (voltage*voltage/100))/++advanceSinceUpdate;
+ avgPower = TQABS(avgPower*advanceSinceUpdate + (voltage*voltage/100))/++advanceSinceUpdate;
}
-void ECSignalLamp::drawShape( QPainter &p )
+void ECSignalLamp::drawShape( TQPainter &p )
{
initPainter(p);
@@ -73,7 +73,7 @@ void ECSignalLamp::drawShape( QPainter &p )
int brightness = (avgPower<0.025) ? 255 : ((avgPower>0.5) ? 0 : (int)(255*(1-((avgPower-0.025)/0.475))));
advanceSinceUpdate = 0;
- p.setBrush( QColor( 255, 255, brightness ) );
+ p.setBrush( TQColor( 255, 255, brightness ) );
p.drawEllipse( _x-8, _y-8, 16, 16 );
// 2*sqrt(2) = 2.828427125...
diff --git a/src/electronics/components/ecsignallamp.h b/src/electronics/components/ecsignallamp.h
index e56d724..fdc67c1 100644
--- a/src/electronics/components/ecsignallamp.h
+++ b/src/electronics/components/ecsignallamp.h
@@ -32,7 +32,7 @@ public:
virtual bool doesStepNonLogic() const { return true; }
private:
- void drawShape( QPainter &p );
+ void drawShape( TQPainter &p );
double avgPower;
uint advanceSinceUpdate;
};
diff --git a/src/electronics/components/ecsubcircuit.cpp b/src/electronics/components/ecsubcircuit.cpp
index a69e720..8ae898c 100644
--- a/src/electronics/components/ecsubcircuit.cpp
+++ b/src/electronics/components/ecsubcircuit.cpp
@@ -17,7 +17,7 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qfile.h>
+#include <tqfile.h>
Item* ECSubcircuit::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -27,10 +27,10 @@ Item* ECSubcircuit::construct( ItemDocument *itemDocument, bool newItem, const c
LibraryItem* ECSubcircuit::libraryItem()
{
return new LibraryItem(
- QString::QString("ec/subcircuit"),
- QString::null,
- QString::null,
- QString::null,
+ TQString::TQString("ec/subcircuit"),
+ TQString(),
+ TQString(),
+ TQString(),
LibraryItem::lit_subcircuit,
ECSubcircuit::construct );
}
@@ -73,17 +73,17 @@ void ECSubcircuit::setNumExtCon( unsigned numExtCon )
p_icnDocument->flushDeleteList();
m_nodeMap.clear();
- QStringList pins;
+ TQStringList pins;
for ( unsigned i=0; i<numExtCon; ++i )
{
- pins += QString::number(i);
+ pins += TQString::number(i);
}
initDIPSymbol( pins, 80 );
// We don't want the text that the dip symbol gave us as we initialize it later...
for ( unsigned i = 0; i < numExtCon; ++i )
- removeDisplayText( QString::number(i) );
+ removeDisplayText( TQString::number(i) );
initDIP(pins);
}
@@ -100,7 +100,7 @@ void ECSubcircuit::dataChanged()
}
-void ECSubcircuit::setExtConName( unsigned numId, const QString & name )
+void ECSubcircuit::setExtConName( unsigned numId, const TQString & name )
{
if ( numId > m_conNames.size() )
return;
@@ -111,14 +111,14 @@ void ECSubcircuit::setExtConName( unsigned numId, const QString & name )
void ECSubcircuit::doneSCInit()
{
- QStringList pins;
+ TQStringList pins;
for ( unsigned i = 0; i < m_conNames.size(); ++i )
pins << m_conNames[i];
initDIPSymbol( pins, 80 );
}
-void ECSubcircuit::drawShape( QPainter &p )
+void ECSubcircuit::drawShape( TQPainter &p )
{
Component::drawShape(p);
}
diff --git a/src/electronics/components/ecsubcircuit.h b/src/electronics/components/ecsubcircuit.h
index eaf21ec..7bc9655 100644
--- a/src/electronics/components/ecsubcircuit.h
+++ b/src/electronics/components/ecsubcircuit.h
@@ -13,7 +13,7 @@
#include <component.h>
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
/**
"Container" component for subcircuits
@@ -22,6 +22,7 @@
class ECSubcircuit : public Component
{
Q_OBJECT
+ TQ_OBJECT
public:
ECSubcircuit( ICNDocument *icnDocument, bool newItem, const char *id = 0L );
~ECSubcircuit();
@@ -37,7 +38,7 @@ public:
/**
* Give the connecting node at position numId the given name
*/
- void setExtConName( unsigned numId, const QString & name );
+ void setExtConName( unsigned numId, const TQString & name );
/**
* Called from SubcircuitData once the subcircuit has been fully attached
*/
@@ -54,8 +55,8 @@ signals:
protected:
virtual void dataChanged();
- virtual void drawShape( QPainter &p );
- QValueVector<QString> m_conNames;
+ virtual void drawShape( TQPainter &p );
+ TQValueVector<TQString> m_conNames;
};
#endif
diff --git a/src/electronics/components/ecvoltagesignal.cpp b/src/electronics/components/ecvoltagesignal.cpp
index c338f36..1590766 100644
--- a/src/electronics/components/ecvoltagesignal.cpp
+++ b/src/electronics/components/ecvoltagesignal.cpp
@@ -16,7 +16,7 @@
#include "voltagesignal.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
const double conductance = 1e5; // Internal resistance
@@ -28,7 +28,7 @@ Item* ECVoltageSignal::construct( ItemDocument *itemDocument, bool newItem, cons
LibraryItem* ECVoltageSignal::libraryItem()
{
return new LibraryItem(
- QString("ec/voltage_signal"),
+ TQString("ec/voltage_signal"),
i18n("Voltage Signal"),
i18n("Sources"),
"voltagesignal.png",
@@ -64,8 +64,8 @@ ECVoltageSignal::ECVoltageSignal( ICNDocument *icnDocument, bool newItem, const
property("voltage")->setMaxValue(1e12);
property("voltage")->setValue(5.0);
- addDisplayText( "~", QRect( -8, -8, 16, 16 ), "~" );
- addDisplayText( "voltage", QRect( -16, -24, 32, 16 ), "" );
+ addDisplayText( "~", TQRect( -8, -8, 16, 16 ), "~" );
+ addDisplayText( "voltage", TQRect( -16, -24, 32, 16 ), "" );
}
@@ -78,7 +78,7 @@ void ECVoltageSignal::dataChanged()
const double voltage = dataDouble("voltage");
const double frequency = dataDouble("frequency");
- QString display = QString::number( voltage / getMultiplier(voltage), 'g', 3 ) + getNumberMag(voltage) + "V";
+ TQString display = TQString::number( voltage / getMultiplier(voltage), 'g', 3 ) + getNumberMag(voltage) + "V";
setDisplayText( "voltage", display );
m_voltageSignal->setStep( 1./LINEAR_UPDATE_RATE, ElementSignal::st_sinusoidal, frequency );
@@ -86,7 +86,7 @@ void ECVoltageSignal::dataChanged()
}
-void ECVoltageSignal::drawShape( QPainter &p )
+void ECVoltageSignal::drawShape( TQPainter &p )
{
initPainter(p);
p.drawEllipse( (int)x()-8, (int)y()-8, width(), height() );
diff --git a/src/electronics/components/ecvoltagesignal.h b/src/electronics/components/ecvoltagesignal.h
index 7102132..de23be9 100644
--- a/src/electronics/components/ecvoltagesignal.h
+++ b/src/electronics/components/ecvoltagesignal.h
@@ -27,7 +27,7 @@ public:
static LibraryItem *libraryItem();
protected:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
void dataChanged();
VoltageSignal *m_voltageSignal;
diff --git a/src/electronics/components/ecvoltagesource.cpp b/src/electronics/components/ecvoltagesource.cpp
index 4b8c543..9090b3b 100644
--- a/src/electronics/components/ecvoltagesource.cpp
+++ b/src/electronics/components/ecvoltagesource.cpp
@@ -16,7 +16,7 @@
#include "pin.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
const double conductance = 1e5; // Internal resistance
@@ -27,7 +27,7 @@ Item* ECCell::construct( ItemDocument *itemDocument, bool newItem, const char *i
LibraryItem* ECCell::libraryItem()
{
- QStringList ids;
+ TQStringList ids;
ids << "ec/battery" << "ec/cell";
return new LibraryItem(
ids,
@@ -59,7 +59,7 @@ ECCell::ECCell( ICNDocument *icnDocument, bool newItem, const char *id )
property("voltage")->setMaxValue(1e12);
property("voltage")->setValue(5.0);
- addDisplayText( "voltage", QRect( -16, -24, 32, 16 ), "" );
+ addDisplayText( "voltage", TQRect( -16, -24, 32, 16 ), "" );
}
ECCell::~ECCell()
@@ -71,11 +71,11 @@ void ECCell::dataChanged()
voltage = dataDouble("voltage");
m_voltageSource->setVoltage(voltage);
- QString display = QString::number( voltage / getMultiplier(voltage), 'g', 3 ) + getNumberMag(voltage) + "V";
+ TQString display = TQString::number( voltage / getMultiplier(voltage), 'g', 3 ) + getNumberMag(voltage) + "V";
setDisplayText( "voltage", display );
}
-void ECCell::drawShape( QPainter &p )
+void ECCell::drawShape( TQPainter &p )
{
initPainter(p);
diff --git a/src/electronics/components/ecvoltagesource.h b/src/electronics/components/ecvoltagesource.h
index 4ba87ef..9b252e1 100644
--- a/src/electronics/components/ecvoltagesource.h
+++ b/src/electronics/components/ecvoltagesource.h
@@ -29,7 +29,7 @@ public:
private:
void dataChanged();
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
VoltageSource *m_voltageSource;
double voltage;
};
diff --git a/src/electronics/components/externalconnection.cpp b/src/electronics/components/externalconnection.cpp
index 596727a..ca89240 100644
--- a/src/electronics/components/externalconnection.cpp
+++ b/src/electronics/components/externalconnection.cpp
@@ -12,7 +12,7 @@
#include "libraryitem.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* ExternalConnection::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -43,7 +43,7 @@ ExternalConnection::ExternalConnection( ICNDocument *icnDocument, bool newItem,
init1PinLeft();
- addDisplayText( "name", QRect( -24, 8, 3*width(), 16 ), "ExtCon" );
+ addDisplayText( "name", TQRect( -24, 8, 3*width(), 16 ), "ExtCon" );
}
ExternalConnection::~ExternalConnection()
@@ -53,14 +53,14 @@ ExternalConnection::~ExternalConnection()
void ExternalConnection::dataChanged()
{
- QString name = dataString("name");
+ TQString name = dataString("name");
- QRect r( -width(), 16, 3*width(), 16 );
+ TQRect r( -width(), 16, 3*width(), 16 );
setDisplayText( "name", name );
}
-void ExternalConnection::drawShape( QPainter &p )
+void ExternalConnection::drawShape( TQPainter &p )
{
initPainter(p);
int _x = (int)x()-8;
diff --git a/src/electronics/components/externalconnection.h b/src/electronics/components/externalconnection.h
index 9b733fc..914c774 100644
--- a/src/electronics/components/externalconnection.h
+++ b/src/electronics/components/externalconnection.h
@@ -29,7 +29,7 @@ public:
private:
void dataChanged();
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
};
#endif
diff --git a/src/electronics/components/flipflop.cpp b/src/electronics/components/flipflop.cpp
index 5c55baf..69d983d 100644
--- a/src/electronics/components/flipflop.cpp
+++ b/src/electronics/components/flipflop.cpp
@@ -17,7 +17,7 @@
#include <kiconloader.h>
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
//BEGIN class ECDFlipFlop
@@ -57,17 +57,17 @@ ECDFlipFlop::ECDFlipFlop( ICNDocument *icnDocument, bool newItem, const char *id
m_pD = createLogicIn( m_pNNode[0] );
m_pClock = createLogicIn( m_pNNode[1] );
m_pQ = createLogicOut( m_pPNode[0], false );
- m_pQBar = createLogicOut( m_pPNode[1], false );
+ m_pTQBar = createLogicOut( m_pPNode[1], false );
setp = createLogicIn( createPin( 0, -32, 90, "set" ) );
rstp = createLogicIn( createPin( 0, 32, 270, "rst" ) );
- addDisplayText( "D", QRect( -32, -16, 20, 16 ), "D" );
- addDisplayText( ">", QRect( -32, 0, 20, 16 ), ">" );
- addDisplayText( "Q", QRect( 12, -16, 20, 16 ), "Q" );
- addDisplayText( "Q'", QRect( 12, 0, 20, 16 ), "Q'" );
- addDisplayText( "Set", QRect( -16, -20, 32, 16 ), "Set" );
- addDisplayText( "Rst", QRect( -16, 4, 32, 16 ), "Rst" );
+ addDisplayText( "D", TQRect( -32, -16, 20, 16 ), "D" );
+ addDisplayText( ">", TQRect( -32, 0, 20, 16 ), ">" );
+ addDisplayText( "Q", TQRect( 12, -16, 20, 16 ), "Q" );
+ addDisplayText( "Q'", TQRect( 12, 0, 20, 16 ), "Q'" );
+ addDisplayText( "Set", TQRect( -16, -20, 32, 16 ), "Set" );
+ addDisplayText( "Rst", TQRect( -16, 4, 32, 16 ), "Rst" );
m_pD->setCallback( this, (CallbackPtr)(&ECDFlipFlop::inputChanged) );
m_pClock->setCallback( this, (CallbackPtr)(&ECDFlipFlop::clockChanged) );
@@ -88,7 +88,7 @@ void ECDFlipFlop::asyncChanged(bool)
if(set || rst)
{
m_pQ->setHigh(set);
- m_pQBar->setHigh(rst);
+ m_pTQBar->setHigh(rst);
}
}
@@ -119,7 +119,7 @@ void ECDFlipFlop::clockChanged( bool newState )
bool d = ( simTime == m_prevDSimTime ) ? m_prevD[1-m_whichPrevD] : m_prevD[m_whichPrevD];
m_pQ->setHigh(d);
- m_pQBar->setHigh(!d);
+ m_pTQBar->setHigh(!d);
}
}
@@ -127,7 +127,7 @@ void ECDFlipFlop::inStateChanged(bool)
{
// Only called when the flipflop is created.
m_pQ->setHigh(false);
- m_pQBar->setHigh(true);
+ m_pTQBar->setHigh(true);
}
//END class ECDFlipFlop
@@ -141,7 +141,7 @@ Item* ECJKFlipFlop::construct( ItemDocument *itemDocument, bool newItem, const c
LibraryItem* ECJKFlipFlop::libraryItem()
{
return new LibraryItem(
- QString::QString("ec/jk_flipflop"),
+ TQString::TQString("ec/jk_flipflop"),
i18n("JK Flip-Flop"),
i18n("Integrated Circuits"),
"ic3.png",
@@ -165,18 +165,18 @@ ECJKFlipFlop::ECJKFlipFlop( ICNDocument *icnDocument, bool newItem, const char *
m_pK = createLogicIn( m_pNNode[2] );
m_pQ = createLogicOut( m_pPNode[0], false );
- m_pQBar = createLogicOut( m_pPNode[1], false );
+ m_pTQBar = createLogicOut( m_pPNode[1], false );
setp = createLogicIn( createPin( 0, -40, 90, "set" ) );
rstp = createLogicIn( createPin( 0, 40, 270, "rst" ) );
- addDisplayText( "J", QRect( -32, -24, 20, 16 ), "J" );
- addDisplayText( ">", QRect( -32, -8, 20, 16 ), ">" );
- addDisplayText( "K", QRect( -32, 8, 20, 16 ), "K" );
- addDisplayText( "Q", QRect( 12, -24, 20, 16 ), "Q" );
- addDisplayText( "Q'", QRect( 12, 8, 20, 16 ), "Q'" );
- addDisplayText( "Set", QRect( -16, -28, 32, 16 ), "Set" );
- addDisplayText( "Rst", QRect( -16, 12, 32, 16 ), "Rst" );
+ addDisplayText( "J", TQRect( -32, -24, 20, 16 ), "J" );
+ addDisplayText( ">", TQRect( -32, -8, 20, 16 ), ">" );
+ addDisplayText( "K", TQRect( -32, 8, 20, 16 ), "K" );
+ addDisplayText( "Q", TQRect( 12, -24, 20, 16 ), "Q" );
+ addDisplayText( "Q'", TQRect( 12, 8, 20, 16 ), "Q'" );
+ addDisplayText( "Set", TQRect( -16, -28, 32, 16 ), "Set" );
+ addDisplayText( "Rst", TQRect( -16, 12, 32, 16 ), "Rst" );
m_pClock->setCallback( this, (CallbackPtr)(&ECJKFlipFlop::clockChanged) );
setp->setCallback( this, (CallbackPtr)(&ECJKFlipFlop::asyncChanged) );
@@ -202,12 +202,12 @@ void ECJKFlipFlop::clockChanged(bool newvalue)
if (!newvalue && (j || k)) {
if ( j && k ) {
m_pQ->setHigh(!prev_state);
- m_pQBar->setHigh(prev_state);
+ m_pTQBar->setHigh(prev_state);
prev_state = !prev_state;
} else {
// (J=1 && K=0) || (J=0 && K=1)
m_pQ->setHigh(j);
- m_pQBar->setHigh(k);
+ m_pTQBar->setHigh(k);
prev_state = j;
}
}
@@ -220,14 +220,14 @@ void ECJKFlipFlop::asyncChanged(bool)
if (set || rst) {
m_pQ->setHigh(set);
- m_pQBar->setHigh(rst);
+ m_pTQBar->setHigh(rst);
prev_state = set;
}
}
void ECJKFlipFlop::inStateChanged(bool)
{
- m_pQBar->setHigh(true);
+ m_pTQBar->setHigh(true);
m_pQ->setHigh(false);
prev_state = false;
}
@@ -243,7 +243,7 @@ Item* ECSRFlipFlop::construct( ItemDocument *itemDocument, bool newItem, const c
LibraryItem* ECSRFlipFlop::libraryItem()
{
return new LibraryItem(
- QString::QString("ec/sr_flipflop"),
+ TQString::TQString("ec/sr_flipflop"),
i18n("SR Flip-Flop"),
i18n("Integrated Circuits"),
"ic3.png",
@@ -265,22 +265,22 @@ ECSRFlipFlop::ECSRFlipFlop( ICNDocument *icnDocument, bool newItem, const char *
m_pS = createLogicIn( m_pNNode[0] );
m_pR = createLogicIn( m_pNNode[1] );
m_pQ = createLogicOut( m_pPNode[0], true );
- m_pQBar = createLogicOut( m_pPNode[1], false );
+ m_pTQBar = createLogicOut( m_pPNode[1], false );
old_q1 = true;
old_q2 = false;
m_pQ->setHigh(old_q1);
- m_pQBar->setHigh(old_q2);
+ m_pTQBar->setHigh(old_q2);
- addDisplayText( "S", QRect( -24, -16, 20, 16 ), "S" );
- addDisplayText( "R", QRect( -24, 0, 20, 16 ), "R" );
- addDisplayText( "Q", QRect( 4, -16, 20, 16 ), "Q" );
- addDisplayText( "Q'", QRect( 4, 0, 20, 16 ), "Q'" );
+ addDisplayText( "S", TQRect( -24, -16, 20, 16 ), "S" );
+ addDisplayText( "R", TQRect( -24, 0, 20, 16 ), "R" );
+ addDisplayText( "Q", TQRect( 4, -16, 20, 16 ), "Q" );
+ addDisplayText( "Q'", TQRect( 4, 0, 20, 16 ), "Q'" );
m_pS->setCallback( this, (CallbackPtr)(&ECSRFlipFlop::inStateChanged) );
m_pR->setCallback( this, (CallbackPtr)(&ECSRFlipFlop::inStateChanged) );
m_pQ->setCallback( this, (CallbackPtr)(&ECSRFlipFlop::inStateChanged) );
- m_pQBar->setCallback( this, (CallbackPtr)(&ECSRFlipFlop::inStateChanged) );
+ m_pTQBar->setCallback( this, (CallbackPtr)(&ECSRFlipFlop::inStateChanged) );
}
ECSRFlipFlop::~ECSRFlipFlop()
@@ -296,7 +296,7 @@ void ECSRFlipFlop::inStateChanged(bool)
bool s = m_pS->isHigh();
bool r = m_pR->isHigh();
bool q1 = m_pQ->isHigh();
- bool q2 = m_pQBar->isHigh();
+ bool q2 = m_pTQBar->isHigh();
// Easy ones to do :-)
if (!q1) new_q2 = true;
@@ -342,6 +342,6 @@ void ECSRFlipFlop::inStateChanged(bool)
old_q2 = new_q2;
m_pQ->setHigh(new_q1);
- m_pQBar->setHigh(new_q2);
+ m_pTQBar->setHigh(new_q2);
}
//END class ECSRFlipFlop
diff --git a/src/electronics/components/flipflop.h b/src/electronics/components/flipflop.h
index 7b9d5b7..744be38 100644
--- a/src/electronics/components/flipflop.h
+++ b/src/electronics/components/flipflop.h
@@ -39,7 +39,7 @@ private:
LogicIn *m_pD;
LogicIn *m_pClock;
LogicOut *m_pQ;
- LogicOut *m_pQBar;
+ LogicOut *m_pTQBar;
LogicIn *setp;
LogicIn *rstp;
bool m_bPrevClock;
@@ -76,7 +76,7 @@ private:
LogicIn *setp;
LogicIn *rstp;
LogicOut *m_pQ;
- LogicOut *m_pQBar;
+ LogicOut *m_pTQBar;
};
@@ -99,7 +99,7 @@ protected:
LogicIn * m_pS;
LogicIn * m_pR;
LogicOut * m_pQ;
- LogicOut * m_pQBar;
+ LogicOut * m_pTQBar;
bool old_q1;
bool old_q2;
};
diff --git a/src/electronics/components/fulladder.cpp b/src/electronics/components/fulladder.cpp
index ad5e40c..3c71210 100644
--- a/src/electronics/components/fulladder.cpp
+++ b/src/electronics/components/fulladder.cpp
@@ -25,7 +25,7 @@ Item* FullAdder::construct( ItemDocument *itemDocument, bool newItem, const char
LibraryItem* FullAdder::libraryItem()
{
return new LibraryItem(
- QString("ec/adder"),
+ TQString("ec/adder"),
i18n("Adder"),
i18n("Integrated Circuits"),
"ic1.png",
@@ -43,7 +43,7 @@ FullAdder::FullAdder( ICNDocument *icnDocument, bool newItem, const char *id )
ALogic = BLogic = inLogic = 0l;
outLogic = SLogic = 0l;
- QStringList pins = QStringList::split( ',', "A,B,>,,S,C", true );
+ TQStringList pins = TQStringList::split( ',', "A,B,>,,S,C", true );
initDIPSymbol( pins, 48 );
initDIP(pins);
diff --git a/src/electronics/components/inductor.cpp b/src/electronics/components/inductor.cpp
index 9e30b34..5949a3b 100644
--- a/src/electronics/components/inductor.cpp
+++ b/src/electronics/components/inductor.cpp
@@ -13,7 +13,7 @@
#include "libraryitem.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* Inductor::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -52,7 +52,7 @@ Inductor::Inductor( ICNDocument *icnDocument, bool newItem, const char *id )
property("Inductance")->setMaxValue(1e12);
property("Inductance")->setValue(1e-3);
- addDisplayText( "inductance", QRect( -8, -24, 16, 16 ), "", false );
+ addDisplayText( "inductance", TQRect( -8, -24, 16, 16 ), "", false );
}
Inductor::~Inductor()
@@ -63,13 +63,13 @@ void Inductor::dataChanged()
{
double inductance = dataDouble("Inductance");
- QString display = QString::number( inductance / getMultiplier(inductance), 'g', 3 ) + getNumberMag(inductance) + "H";
+ TQString display = TQString::number( inductance / getMultiplier(inductance), 'g', 3 ) + getNumberMag(inductance) + "H";
setDisplayText( "inductance", display );
m_pInductance->setInductance(inductance);
}
-void Inductor::drawShape( QPainter &p )
+void Inductor::drawShape( TQPainter &p )
{
initPainter(p);
int _y = int(y());
diff --git a/src/electronics/components/inductor.h b/src/electronics/components/inductor.h
index abb4eec..285c54c 100644
--- a/src/electronics/components/inductor.h
+++ b/src/electronics/components/inductor.h
@@ -27,7 +27,7 @@ class Inductor : public Component
private:
void dataChanged();
- virtual void drawShape( QPainter & p );
+ virtual void drawShape( TQPainter & p );
Inductance * m_pInductance;
};
diff --git a/src/electronics/components/magnitudecomparator.cpp b/src/electronics/components/magnitudecomparator.cpp
index 2659122..3e1f8f9 100644
--- a/src/electronics/components/magnitudecomparator.cpp
+++ b/src/electronics/components/magnitudecomparator.cpp
@@ -23,7 +23,7 @@ Item* MagnitudeComparator::construct( ItemDocument *itemDocument, bool newItem,
LibraryItem* MagnitudeComparator::libraryItem()
{
return new LibraryItem(
- QString("ec/magnitudecomparator"),
+ TQString("ec/magnitudecomparator"),
i18n("Magnitude Comparator"),
i18n("Integrated Circuits"),
"ic1.png",
@@ -114,29 +114,29 @@ void MagnitudeComparator::initPins()
if ( newABLogicCount == m_oldABLogicCount )
return;
- QStringList leftPins;
+ TQStringList leftPins;
int space = 3 - newABLogicCount;
for ( int i = 0; i < space; i++ )
leftPins << "";
for ( int i = 0; i < newABLogicCount; i++ )
- leftPins << QString("A%1").arg( QString::number(i) );
+ leftPins << TQString("A%1").tqarg( TQString::number(i) );
for ( int i = 0; i < newABLogicCount; i++ )
- leftPins << QString("B%1").arg( QString::number(i) );
+ leftPins << TQString("B%1").tqarg( TQString::number(i) );
for ( int i = 0; i < space; i++ )
leftPins << "";
- QStringList rightPins;
+ TQStringList rightPins;
space = -space;
for ( int i = 0; i < space; i++ )
rightPins << "";
- QString inNames[] = { "I: A>B", "I: A<B", "I: A=B" };
+ TQString inNames[] = { "I: A>B", "I: A<B", "I: A=B" };
rightPins << inNames[2] << inNames[1] << inNames[0];
- QString outNames[] = { "O: A>B", "O: A<B", "O: A=B" };
+ TQString outNames[] = { "O: A>B", "O: A<B", "O: A=B" };
rightPins << outNames[2] << outNames[1] << outNames[0];
for ( int i = 0; i < space; i++ )
rightPins << "";
- QStringList pins = leftPins + rightPins;
+ TQStringList pins = leftPins + rightPins;
initDIPSymbol( pins, 88 );
initDIP(pins);
@@ -166,7 +166,7 @@ void MagnitudeComparator::initPins()
m_aLogic.resize(newABLogicCount);
for ( int i=m_oldABLogicCount; i<newABLogicCount; ++i )
{
- node = ecNodeWithID("A"+QString::number(i));
+ node = ecNodeWithID("A"+TQString::number(i));
m_aLogic.insert( i, createLogicIn(node) );
m_aLogic[i]->setCallback( this, (CallbackPtr)(&MagnitudeComparator::inStateChanged) );
}
@@ -174,7 +174,7 @@ void MagnitudeComparator::initPins()
m_bLogic.resize(newABLogicCount);
for ( int i=m_oldABLogicCount; i<newABLogicCount; ++i )
{
- node = ecNodeWithID("B"+QString::number(i));
+ node = ecNodeWithID("B"+TQString::number(i));
m_bLogic.insert( i, createLogicIn(node) );
m_bLogic[i]->setCallback( this, (CallbackPtr)(&MagnitudeComparator::inStateChanged) );
}
@@ -183,7 +183,7 @@ void MagnitudeComparator::initPins()
{
for ( int i=newABLogicCount; i<m_oldABLogicCount; ++i )
{
- QString id = "A"+QString::number(i);
+ TQString id = "A"+TQString::number(i);
removeDisplayText(id);
removeElement( m_aLogic[i], false );
removeNode(id);
@@ -191,7 +191,7 @@ void MagnitudeComparator::initPins()
m_aLogic.resize(newABLogicCount);
for ( int i=newABLogicCount; i<m_oldABLogicCount; ++i )
{
- QString id = "B"+QString::number(i);
+ TQString id = "B"+TQString::number(i);
removeDisplayText(id);
removeElement( m_bLogic[i], false );
removeNode(id);
diff --git a/src/electronics/components/magnitudecomparator.h b/src/electronics/components/magnitudecomparator.h
index 57dc748..ef8cf12 100644
--- a/src/electronics/components/magnitudecomparator.h
+++ b/src/electronics/components/magnitudecomparator.h
@@ -13,8 +13,8 @@
#include "component.h"
#include "logic.h"
-#include <qbitarray.h>
-#include <qptrvector.h>
+#include <tqbitarray.h>
+#include <tqptrvector.h>
/**
@author Fredy Yanardi
@@ -39,12 +39,12 @@ class MagnitudeComparator : public CallbackClass, public Component
int outputs;
bool firstTime;
- QBitArray m_data;
+ TQBitArray m_data;
- QPtrVector<LogicIn> m_aLogic;
- QPtrVector<LogicIn> m_bLogic;
- QPtrVector<LogicIn> m_cLogic;
- QPtrVector<LogicOut> m_output;
+ TQPtrVector<LogicIn> m_aLogic;
+ TQPtrVector<LogicIn> m_bLogic;
+ TQPtrVector<LogicIn> m_cLogic;
+ TQPtrVector<LogicOut> m_output;
};
#endif
diff --git a/src/electronics/components/matrixdisplay.cpp b/src/electronics/components/matrixdisplay.cpp
index dd40b6a..c2a271d 100644
--- a/src/electronics/components/matrixdisplay.cpp
+++ b/src/electronics/components/matrixdisplay.cpp
@@ -18,8 +18,8 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qpainter.h>
-#include <qstring.h>
+#include <tqpainter.h>
+#include <tqstring.h>
Item* MatrixDisplay::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -77,7 +77,7 @@ MatrixDisplay::MatrixDisplay( ICNDocument *icnDocument, bool newItem, const char
createProperty( "diode-configuration", Variant::Type::Select );
property("diode-configuration")->setCaption( i18n("Configuration") );
- property("diode-configuration")->setAllowed( QStringList::split(',',"Row Cathode,Column Cathode") );
+ property("diode-configuration")->setAllowed( TQStringList::split(',',"Row Cathode,Column Cathode") );
property("diode-configuration")->setValue("Row Cathode");
property("diode-configuration")->setAdvanced(true);
}
@@ -90,7 +90,7 @@ MatrixDisplay::~MatrixDisplay()
void MatrixDisplay::dataChanged()
{
- QColor color = dataColor("color");
+ TQColor color = dataColor("color");
m_r = double(color.red()) / double(0x100);
m_g = double(color.green()) / double(0x100);
m_b = double(color.blue()) / double(0x100);
@@ -221,13 +221,13 @@ void MatrixDisplay::initPins( unsigned numRows, unsigned numCols )
}
-QString MatrixDisplay::colPinID( int col ) const
+TQString MatrixDisplay::colPinID( int col ) const
{
- return QString("col_%1").arg(QString::number(col));
+ return TQString("col_%1").tqarg(TQString::number(col));
}
-QString MatrixDisplay::rowPinID( int row ) const
+TQString MatrixDisplay::rowPinID( int row ) const
{
- return QString("row_%1").arg(QString::number(row));
+ return TQString("row_%1").tqarg(TQString::number(row));
}
@@ -245,7 +245,7 @@ void MatrixDisplay::stepNonLogic()
}
-void MatrixDisplay::drawShape( QPainter &p )
+void MatrixDisplay::drawShape( TQPainter &p )
{
if ( isSelected() )
p.setPen(m_selectedCol);
@@ -269,9 +269,9 @@ void MatrixDisplay::drawShape( QPainter &p )
double _b = m_lastBrightness[i][j];
- QColor brush = QColor( uint(255-(255-_b)*(1-m_r)), uint(255-(255-_b)*(1-m_g)), uint(255-(255-_b)*(1-m_b)) );
+ TQColor brush = TQColor( uint(255-(255-_b)*(1-m_r)), uint(255-(255-_b)*(1-m_g)), uint(255-(255-_b)*(1-m_b)) );
p.setBrush(brush);
- p.setPen( Qt::NoPen );
+ p.setPen( TQt::NoPen );
p.drawEllipse( _x+10+i*16, _y+10+j*16, 12, 12 );
}
}
diff --git a/src/electronics/components/matrixdisplay.h b/src/electronics/components/matrixdisplay.h
index 4851817..e36564a 100644
--- a/src/electronics/components/matrixdisplay.h
+++ b/src/electronics/components/matrixdisplay.h
@@ -12,7 +12,7 @@
#define MATRIXDISPLAY_H
#include <component.h>
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
const unsigned max_md_width = 100;
const unsigned max_md_height = 20;
@@ -34,16 +34,16 @@ class MatrixDisplay : public Component
virtual bool doesStepNonLogic() const { return true; }
protected:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
virtual void dataChanged();
void initPins( unsigned numRows, unsigned numCols );
- QString colPinID( int col ) const;
- QString rowPinID( int row ) const;
+ TQString colPinID( int col ) const;
+ TQString rowPinID( int row ) const;
- QValueVector< QValueVector<double> > m_avgBrightness;
- QValueVector< QValueVector<unsigned> > m_lastBrightness;
- QValueVector< QValueVector<Diode*> > m_pDiodes;
+ TQValueVector< TQValueVector<double> > m_avgBrightness;
+ TQValueVector< TQValueVector<unsigned> > m_lastBrightness;
+ TQValueVector< TQValueVector<Diode*> > m_pDiodes;
ECNode * m_pRowNodes[max_md_height];
ECNode * m_pColNodes[max_md_width];
diff --git a/src/electronics/components/matrixdisplaydriver.cpp b/src/electronics/components/matrixdisplaydriver.cpp
index da00bb7..a25bb7a 100644
--- a/src/electronics/components/matrixdisplaydriver.cpp
+++ b/src/electronics/components/matrixdisplaydriver.cpp
@@ -13,8 +13,8 @@
#include "matrixdisplaydriver.h"
#include <klocale.h>
-#include <qpainter.h>
-#include <qstring.h>
+#include <tqpainter.h>
+#include <tqstring.h>
#include <assert.h>
@@ -319,22 +319,22 @@ MatrixDisplayDriver::MatrixDisplayDriver( ICNDocument *icnDocument, bool newItem
createProperty( "diode-configuration", Variant::Type::Select );
property("diode-configuration")->setCaption( i18n("Configuration") );
- property("diode-configuration")->setAllowed( QStringList::split(',',"Row Cathode,Column Cathode") );
+ property("diode-configuration")->setAllowed( TQStringList::split(',',"Row Cathode,Column Cathode") );
property("diode-configuration")->setValue("Row Cathode");
property("diode-configuration")->setAdvanced(true);
- QStringList pins = QStringList::split( ',', "D0,D1,D2,D3,D4,D5,D6,D7,,,,,,C4,C3,C2,C1,C0,,R0,R1,R2,R3,R4,R5,R6", true );
+ TQStringList pins = TQStringList::split( ',', "D0,D1,D2,D3,D4,D5,D6,D7,,,,,,C4,C3,C2,C1,C0,,R0,R1,R2,R3,R4,R5,R6", true );
initDIPSymbol( pins, 64 );
initDIP(pins);
m_pValueLogic.resize( 8, 0l );
for ( unsigned i = 0; i < 8; ++i )
- m_pValueLogic[i] = createLogicIn( ecNodeWithID("D"+QString::number(i)) );
+ m_pValueLogic[i] = createLogicIn( ecNodeWithID("D"+TQString::number(i)) );
m_pRowLogic.resize( 7, 0l );
for ( unsigned i = 0; i < 7; ++i )
{
- m_pRowLogic[i] = createLogicOut( ecNodeWithID("R"+QString::number(i)), false );
+ m_pRowLogic[i] = createLogicOut( ecNodeWithID("R"+TQString::number(i)), false );
m_pRowLogic[i]->setOutputLowConductance( 1.0 );
m_pRowLogic[i]->setOutputHighVoltage(5.0);
}
@@ -342,7 +342,7 @@ MatrixDisplayDriver::MatrixDisplayDriver( ICNDocument *icnDocument, bool newItem
m_pColLogic.resize( 5, 0l );
for ( unsigned i = 0; i < 5; ++i )
{
- m_pColLogic[i] = createLogicOut( ecNodeWithID("C"+QString::number(i)), false );
+ m_pColLogic[i] = createLogicOut( ecNodeWithID("C"+TQString::number(i)), false );
m_pColLogic[i]->setOutputHighVoltage(5.0);
}
}
diff --git a/src/electronics/components/matrixdisplaydriver.h b/src/electronics/components/matrixdisplaydriver.h
index e6b01cc..f6b3f91 100644
--- a/src/electronics/components/matrixdisplaydriver.h
+++ b/src/electronics/components/matrixdisplaydriver.h
@@ -30,9 +30,9 @@ class MatrixDisplayDriver : public Component
virtual bool doesStepNonLogic() const { return true; }
protected:
- QValueVector<LogicIn*> m_pValueLogic;
- QValueVector<LogicOut*> m_pRowLogic;
- QValueVector<LogicOut*> m_pColLogic;
+ TQValueVector<LogicIn*> m_pValueLogic;
+ TQValueVector<LogicOut*> m_pRowLogic;
+ TQValueVector<LogicOut*> m_pColLogic;
unsigned m_prevCol;
unsigned m_nextCol;
diff --git a/src/electronics/components/meter.cpp b/src/electronics/components/meter.cpp
index 4437794..fc021a6 100644
--- a/src/electronics/components/meter.cpp
+++ b/src/electronics/components/meter.cpp
@@ -20,7 +20,7 @@
#include <cmath>
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
//BEGIN class Meter
@@ -35,7 +35,7 @@ Meter::Meter( ICNDocument *icnDocument, bool newItem, const char *id )
b_firstRun = true;
setSize( -16, -16, 32, 32 );
- p_displayText = addDisplayText( "meter", QRect( -16, 16, 32, 16 ), displayText() );
+ p_displayText = addDisplayText( "meter", TQRect( -16, 16, 32, 16 ), displayText() );
createProperty( "0-minValue", Variant::Type::Double );
property("0-minValue")->setCaption( i18n("Minimum Value") );
@@ -93,12 +93,12 @@ void Meter::stepNonLogic()
}
}
-void Meter::drawShape( QPainter &p )
+void Meter::drawShape( TQPainter &p )
{
initPainter(p);
p.drawEllipse( (int)x()-16, (int)y()-16, width(), width() );
- p.setPen(QPen(Qt::black,2));
- p.setBrush(Qt::black);
+ p.setPen(TQPen(TQt::black,2));
+ p.setBrush(TQt::black);
// The proportion between 0.1mV and 10KV, on a logarithmic scale
double prop;
@@ -118,17 +118,17 @@ void Meter::drawShape( QPainter &p )
int cy = int(y()-16+(height()/2));
p.drawLine( int(cx-sin_prop), int(cy-cos_prop), int(cx+sin_prop), int(cy+cos_prop) );
- QPointArray pa(3);
- pa[0] = QPoint( int(cx-sin_prop), int(cy-cos_prop) ); // Arrow head
- pa[1] = QPoint( int(cx-sin_prop + 8*std::sin(1.571*(-0.3+prop))), int(cy-cos_prop + 8*std::cos(1.571*(-0.3+prop))) );
- pa[2] = QPoint( int(cx-sin_prop + 8*std::sin(1.571*(0.3+prop))), int(cy-cos_prop + 8*std::cos(1.571*(0.3+prop))) );
+ TQPointArray pa(3);
+ pa[0] = TQPoint( int(cx-sin_prop), int(cy-cos_prop) ); // Arrow head
+ pa[1] = TQPoint( int(cx-sin_prop + 8*std::sin(1.571*(-0.3+prop))), int(cy-cos_prop + 8*std::cos(1.571*(-0.3+prop))) );
+ pa[2] = TQPoint( int(cx-sin_prop + 8*std::sin(1.571*(0.3+prop))), int(cy-cos_prop + 8*std::cos(1.571*(0.3+prop))) );
p.drawPolygon(pa);
deinitPainter(p);
}
-QString Meter::displayText()
+TQString Meter::displayText()
{
double value = m_avgValue/m_timeSinceUpdate;
if ( !std::isfinite(value) ) value = m_old_value;
@@ -137,7 +137,7 @@ QString Meter::displayText()
m_avgValue = 0.;
m_timeSinceUpdate = 0.;
b_timerStarted = false;
- return QString::number( value/CNItem::getMultiplier(value), 'g', 3 ) + CNItem::getNumberMag(value) + m_unit;
+ return TQString::number( value/CNItem::getMultiplier(value), 'g', 3 ) + CNItem::getNumberMag(value) + m_unit;
}
//END class Meter
@@ -151,7 +151,7 @@ Item* FrequencyMeter::construct( ItemDocument *itemDocument, bool newItem, const
LibraryItem* FrequencyMeter::libraryItem()
{
return new LibraryItem(
- QString("ec/frequencymeter"),
+ TQString("ec/frequencymeter"),
i18n("Frequency Meter (TODO)"),
i18n("Outputs"),
"frequencymeter.png",
@@ -188,7 +188,7 @@ Item* ECAmmeter::construct( ItemDocument *itemDocument, bool newItem, const char
LibraryItem* ECAmmeter::libraryItem()
{
- QStringList ids;
+ TQStringList ids;
ids << "ec/ammeter" << "ec/ammmeter";
return new LibraryItem(
ids,
@@ -234,7 +234,7 @@ Item* ECVoltMeter::construct( ItemDocument *itemDocument, bool newItem, const ch
LibraryItem* ECVoltMeter::libraryItem()
{
return new LibraryItem(
- QString("ec/voltmeter"),
+ TQString("ec/voltmeter"),
i18n("Voltmeter"),
i18n("Outputs"),
"voltmeter.png",
diff --git a/src/electronics/components/meter.h b/src/electronics/components/meter.h
index fa52e95..8a70cdc 100644
--- a/src/electronics/components/meter.h
+++ b/src/electronics/components/meter.h
@@ -24,10 +24,10 @@ public:
virtual void stepNonLogic();
virtual bool doesStepNonLogic() const { return true; }
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
protected:
- QString displayText();
+ TQString displayText();
virtual void dataChanged();
/**
* Return the value / current, or whatever the meter is measuring
@@ -42,7 +42,7 @@ protected:
double m_minValue;
double m_maxValue;
Text *p_displayText;
- QString m_unit;
+ TQString m_unit;
};
/**
diff --git a/src/electronics/components/multiinputgate.cpp b/src/electronics/components/multiinputgate.cpp
index 7453845..6b76bde 100644
--- a/src/electronics/components/multiinputgate.cpp
+++ b/src/electronics/components/multiinputgate.cpp
@@ -16,7 +16,7 @@
#include <cmath>
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
//BEGIN class MultiInputGate
MultiInputGate::MultiInputGate( ICNDocument *icnDocument, bool newItem, const char *id, int baseWidth )
@@ -58,7 +58,7 @@ MultiInputGate::~MultiInputGate()
void MultiInputGate::dataChanged()
{
- updateInputs( QMIN( maxGateInput, dataInt("numInput") ) );
+ updateInputs( TQMIN( maxGateInput, dataInt("numInput") ) );
}
@@ -84,7 +84,7 @@ void MultiInputGate::updateInputs( int newNum )
{
for ( int i = m_numInputs; i<newNum; ++i )
{
- ECNode *node = createPin( 0, 0, 0, "in"+QString::number(i) );
+ ECNode *node = createPin( 0, 0, 0, "in"+TQString::number(i) );
inNode[i] = node;
inLogic[i] = createLogicIn(node);
inLogic[i]->setCallback( this, (CallbackPtr)(&MultiInputGate::inStateChanged) );
@@ -94,7 +94,7 @@ void MultiInputGate::updateInputs( int newNum )
{
for ( int i=newNum; i<m_numInputs; ++i )
{
- removeNode("in"+QString::number(i));
+ removeNode("in"+TQString::number(i));
removeElement( inLogic[i], false );
inNode[i] = 0l;
inLogic[i] = 0l;
@@ -114,7 +114,7 @@ void MultiInputGate::updateInputs( int newNum )
void MultiInputGate::updateAttachedPositioning()
{
// Check that our ndoes have been created before we attempt to use them
- if ( !m_nodeMap.contains("p1") || !m_nodeMap.contains("in"+QString::number(m_numInputs-1)) )
+ if ( !m_nodeMap.tqcontains("p1") || !m_nodeMap.tqcontains("in"+TQString::number(m_numInputs-1)) )
return;
int _x = offsetX()+8;
@@ -125,8 +125,8 @@ void MultiInputGate::updateAttachedPositioning()
for ( int i=0; i< m_numInputs; ++i )
{
- m_nodeMap["in"+QString::number(i)].x = _x - 16;
- m_nodeMap["in"+QString::number(i)].y = _y + 16*i;
+ m_nodeMap["in"+TQString::number(i)].x = _x - 16;
+ m_nodeMap["in"+TQString::number(i)].y = _y + 16*i;
}
if (b_doneInit)
@@ -144,7 +144,7 @@ Item* ECXnor::construct( ItemDocument *itemDocument, bool newItem, const char *i
LibraryItem* ECXnor::libraryItem()
{
return new LibraryItem(
- QString::QString("ec/xnor"),
+ TQString::TQString("ec/xnor"),
i18n("XNOR gate"),
i18n("Logic"),
"xnor.png",
@@ -177,14 +177,14 @@ void ECXnor::inStateChanged(bool)
m_pOut->setHigh( highCount != 1 );
}
-void ECXnor::drawShape( QPainter &p )
+void ECXnor::drawShape( TQPainter &p )
{
initPainter(p);
int _x = (int)x()+offsetX();
int _y = (int)y()+offsetY();
p.save();
- p.setPen( Qt::NoPen );
+ p.setPen( TQt::NoPen );
p.drawChord( _x-width()+22, _y, 2*width()-28, height(), -16*81, 16*162 );
p.restore();
@@ -197,7 +197,7 @@ void ECXnor::drawShape( QPainter &p )
const int n = m_numInputs;
for ( int i=0; i<n; ++i )
{
- p.setPen( inNode[i]->isSelected() ? m_selectedCol : Qt::black );
+ p.setPen( inNode[i]->isSelected() ? m_selectedCol : TQt::black );
int pin_x = (int)std::sqrt((double)(64*n*n - (8*n-8-16*i)*(8*n-8-16*i)))/n;
p.drawLine( _x, _y+16*i+8, _x+pin_x, _y+16*i+8 );
}
@@ -216,7 +216,7 @@ Item* ECXor::construct( ItemDocument *itemDocument, bool newItem, const char *id
LibraryItem* ECXor::libraryItem()
{
return new LibraryItem(
- QString::QString("ec/xor"),
+ TQString::TQString("ec/xor"),
i18n("XOR gate"),
i18n("Logic"),
"xor.png",
@@ -249,14 +249,14 @@ void ECXor::inStateChanged(bool)
m_pOut->setHigh( highCount == 1 );
}
-void ECXor::drawShape( QPainter &p )
+void ECXor::drawShape( TQPainter &p )
{
initPainter(p);
int _x = (int)x()+offsetX();
int _y = (int)y()+offsetY();
p.save();
- p.setPen( Qt::NoPen );
+ p.setPen( TQt::NoPen );
p.drawChord( _x-width()+16, _y, 2*width()-16, height(), -16*81, 16*162 );
p.restore();
@@ -267,7 +267,7 @@ void ECXor::drawShape( QPainter &p )
const int n = m_numInputs;
for ( int i=0; i<n; ++i )
{
- p.setPen( inNode[i]->isSelected() ? m_selectedCol : Qt::black );
+ p.setPen( inNode[i]->isSelected() ? m_selectedCol : TQt::black );
int pin_x = (int)std::sqrt((double)(64*n*n - (8*n-8-16*i)*(8*n-8-16*i)))/n;
p.drawLine( _x, _y+16*i+8, _x+pin_x, _y+16*i+8 );
}
@@ -286,7 +286,7 @@ Item* ECOr::construct( ItemDocument *itemDocument, bool newItem, const char *id
LibraryItem* ECOr::libraryItem()
{
return new LibraryItem(
- QString::QString("ec/or"),
+ TQString::TQString("ec/or"),
i18n("OR gate"),
i18n("Logic"),
"or.png",
@@ -319,15 +319,15 @@ void ECOr::inStateChanged(bool)
m_pOut->setHigh(!allLow);
}
-void ECOr::drawShape( QPainter &p )
+void ECOr::drawShape( TQPainter &p )
{
initPainter(p);
int _x = (int)x()+offsetX();
int _y = (int)y()+offsetY();
p.save();
- p.setPen( Qt::NoPen );
-// p.setBrush( Qt::red );
+ p.setPen( TQt::NoPen );
+// p.setBrush( TQt::red );
p.drawChord( _x-width(), _y, 2*width(), height(), -16*81, 16*162 );
// p.drawPie( _x-width()+16, _y, 2*width()-16, height(), -16*100, 16*200 );
p.restore();
@@ -338,7 +338,7 @@ void ECOr::drawShape( QPainter &p )
const int n = m_numInputs;
for ( int i=0; i<n; ++i )
{
- p.setPen( inNode[i]->isSelected() ? m_selectedCol : Qt::black );
+ p.setPen( inNode[i]->isSelected() ? m_selectedCol : TQt::black );
int pin_x = (int)std::sqrt((double)(64*n*n - (8*n-8-16*i)*(8*n-8-16*i)))/n;
p.drawLine( _x, _y+16*i+8, _x+pin_x, _y+16*i+8 );
}
@@ -357,7 +357,7 @@ Item* ECNor::construct( ItemDocument *itemDocument, bool newItem, const char *id
LibraryItem* ECNor::libraryItem()
{
return new LibraryItem(
- QString::QString("ec/nor"),
+ TQString::TQString("ec/nor"),
i18n("NOR gate"),
i18n("Logic"),
"nor.png",
@@ -390,14 +390,14 @@ void ECNor::inStateChanged(bool)
m_pOut->setHigh(allLow);
}
-void ECNor::drawShape( QPainter &p )
+void ECNor::drawShape( TQPainter &p )
{
initPainter(p);
int _x = (int)x()+offsetX();
int _y = (int)y()+offsetY();
p.save();
- p.setPen( Qt::NoPen );
+ p.setPen( TQt::NoPen );
p.drawChord( _x-width()+6, _y, 2*width()-12, height(), -16*81, 16*162 );
p.restore();
@@ -409,7 +409,7 @@ void ECNor::drawShape( QPainter &p )
const int n = m_numInputs;
for ( int i=0; i<n; ++i )
{
- p.setPen( inNode[i]->isSelected() ? m_selectedCol : Qt::black );
+ p.setPen( inNode[i]->isSelected() ? m_selectedCol : TQt::black );
int pin_x = (int)std::sqrt((double)(64*n*n - (8*n-8-16*i)*(8*n-8-16*i)))/n;
p.drawLine( _x, _y+16*i+8, _x+pin_x, _y+16*i+8 );
}
@@ -428,7 +428,7 @@ Item* ECNand::construct( ItemDocument *itemDocument, bool newItem, const char *i
LibraryItem* ECNand::libraryItem()
{
return new LibraryItem(
- QString::QString("ec/nand"),
+ TQString::TQString("ec/nand"),
i18n("NAND gate"),
i18n("Logic"),
"nand.png",
@@ -461,7 +461,7 @@ void ECNand::inStateChanged(bool)
m_pOut->setHigh(!allHigh);
}
-void ECNand::drawShape( QPainter &p )
+void ECNand::drawShape( TQPainter &p )
{
initPainter(p);
int _x = (int)x()+offsetX();
@@ -481,7 +481,7 @@ Item* ECAnd::construct( ItemDocument *itemDocument, bool newItem, const char *id
LibraryItem* ECAnd::libraryItem()
{
- QStringList idList;
+ TQStringList idList;
idList << "ec/and" << "ec/and_2";
return new LibraryItem(
idList,
@@ -517,7 +517,7 @@ void ECAnd::inStateChanged(bool)
m_pOut->setHigh(allHigh);
}
-void ECAnd::drawShape( QPainter &p )
+void ECAnd::drawShape( TQPainter &p )
{
initPainter(p);
diff --git a/src/electronics/components/multiinputgate.h b/src/electronics/components/multiinputgate.h
index 1981217..4ebc9cc 100644
--- a/src/electronics/components/multiinputgate.h
+++ b/src/electronics/components/multiinputgate.h
@@ -60,7 +60,7 @@ public:
private:
void inStateChanged( bool newState );
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
};
@@ -79,7 +79,7 @@ public:
protected:
void inStateChanged( bool newState );
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
};
@@ -98,7 +98,7 @@ public:
protected:
void inStateChanged( bool newState );
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
};
/**
@@ -116,7 +116,7 @@ public:
private:
void inStateChanged( bool newState );
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
};
/**
@@ -134,7 +134,7 @@ public:
private:
void inStateChanged( bool newState );
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
};
/**
@@ -152,7 +152,7 @@ public:
private:
void inStateChanged( bool newState );
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
};
diff --git a/src/electronics/components/multiplexer.cpp b/src/electronics/components/multiplexer.cpp
index e421fee..a8770e4 100644
--- a/src/electronics/components/multiplexer.cpp
+++ b/src/electronics/components/multiplexer.cpp
@@ -26,7 +26,7 @@ Item* Multiplexer::construct( ItemDocument *itemDocument, bool newItem, const ch
LibraryItem* Multiplexer::libraryItem()
{
return new LibraryItem(
- QString("ec/multiplexer"),
+ TQString("ec/multiplexer"),
i18n("Multiplexer"),
i18n("Integrated Circuits"),
"ic1.png",
@@ -109,14 +109,14 @@ void Multiplexer::initPins( unsigned newAddressSize )
if ( newXLogicCount == oldXLogicCount )
return;
- QStringList pins;
+ TQStringList pins;
const int length = newAddressSize + newXLogicCount;
for ( unsigned i=0; i<newAddressSize; ++i )
- pins += "A"+QString::number(i);
+ pins += "A"+TQString::number(i);
for ( unsigned i=0; i<newXLogicCount; ++i )
- pins += "X"+QString::number(i);
+ pins += "X"+TQString::number(i);
for ( int i=0; i<(length-(length%2))/2; ++i )
pins += "";
pins += "X";
@@ -139,7 +139,7 @@ void Multiplexer::initPins( unsigned newAddressSize )
m_xLogic.resize(newXLogicCount);
for ( unsigned i=oldXLogicCount; i<newXLogicCount; ++i )
{
- node = ecNodeWithID("X"+QString::number(i));
+ node = ecNodeWithID("X"+TQString::number(i));
m_xLogic.insert( i, createLogicIn(node) );
m_xLogic[i]->setCallback( this, (CallbackPtr)(&Multiplexer::inStateChanged) );
}
@@ -147,7 +147,7 @@ void Multiplexer::initPins( unsigned newAddressSize )
m_aLogic.resize(newAddressSize);
for ( unsigned i=oldAddressSize; i<newAddressSize; ++i )
{
- node = ecNodeWithID("A"+QString::number(i));
+ node = ecNodeWithID("A"+TQString::number(i));
m_aLogic.insert( i, createLogicIn(node) );
m_aLogic[i]->setCallback( this, (CallbackPtr)(&Multiplexer::inStateChanged) );
}
@@ -156,7 +156,7 @@ void Multiplexer::initPins( unsigned newAddressSize )
{
for ( unsigned i = newXLogicCount; i < oldXLogicCount; ++i )
{
- QString id = "X"+QString::number(i);
+ TQString id = "X"+TQString::number(i);
removeDisplayText(id);
removeElement( m_xLogic[i], false );
removeNode(id);
@@ -165,7 +165,7 @@ void Multiplexer::initPins( unsigned newAddressSize )
for ( unsigned i = newAddressSize; i < oldAddressSize; ++i )
{
- QString id = "A"+QString::number(i);
+ TQString id = "A"+TQString::number(i);
removeDisplayText(id);
removeElement( m_aLogic[i], false );
removeNode(id);
diff --git a/src/electronics/components/multiplexer.h b/src/electronics/components/multiplexer.h
index 42bcfc1..8e86bab 100644
--- a/src/electronics/components/multiplexer.h
+++ b/src/electronics/components/multiplexer.h
@@ -14,7 +14,7 @@
#include "component.h"
#include "logic.h"
-#include <qptrvector.h>
+#include <tqptrvector.h>
/**
@author David Saxton
@@ -38,8 +38,8 @@ protected:
void inStateChanged( bool newState );
- QPtrVector<LogicIn> m_aLogic;
- QPtrVector<LogicIn> m_xLogic;
+ TQPtrVector<LogicIn> m_aLogic;
+ TQPtrVector<LogicIn> m_xLogic;
LogicOut * m_output;
};
diff --git a/src/electronics/components/parallelportcomponent.cpp b/src/electronics/components/parallelportcomponent.cpp
index 9bc17b4..577253f 100644
--- a/src/electronics/components/parallelportcomponent.cpp
+++ b/src/electronics/components/parallelportcomponent.cpp
@@ -19,7 +19,7 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <cmath>
#include <termios.h>
@@ -51,7 +51,7 @@ ParallelPortComponent::ParallelPortComponent( ICNDocument *icnDocument, bool new
"<ul>"
"<li><b>D<i>[0..7]</i></b></li>"
"</ul><br>"
- "<b>Status Pins</b><br><br>"
+ "<b>tqStatus Pins</b><br><br>"
"The status pins are read-only. They area:"
"<ul>"
"<li><b>ERR</b> - Error</li>"
@@ -70,11 +70,11 @@ ParallelPortComponent::ParallelPortComponent( ICNDocument *icnDocument, bool new
"The remaining pins are all ground."
);
- QPointArray pa( 4 );
- pa[0] = QPoint( -32, -112 );
- pa[1] = QPoint( 32, -104 );
- pa[2] = QPoint( 32, 104 );
- pa[3] = QPoint( -32, 112 );
+ TQPointArray pa( 4 );
+ pa[0] = TQPoint( -32, -112 );
+ pa[1] = TQPoint( 32, -104 );
+ pa[2] = TQPoint( 32, 104 );
+ pa[3] = TQPoint( -32, 112 );
setItemPoints( pa );
m_pParallelPort = new ParallelPort();
@@ -87,11 +87,11 @@ ParallelPortComponent::ParallelPortComponent( ICNDocument *icnDocument, bool new
//BEGIN Data register
for ( int i = 0; i < 8; ++i )
{
- QString id = QString("D%1").arg(i);
- QString name = id;
+ TQString id = TQString("D%1").tqarg(i);
+ TQString name = id;
pin = createPin( -40, -80 + 16*i, 0, id );
- addDisplayText( id, QRect( -28, -88 + 16*i, 28, 16 ), name, true, Qt::AlignLeft | Qt::AlignVCenter );
+ addDisplayText( id, TQRect( -28, -88 + 16*i, 28, 16 ), name, true, TQt::AlignLeft | TQt::AlignVCenter );
m_pLogic[i] = createLogicOut( pin, false );
m_pLogic[i]->setCallback( this, (CallbackPtr)(&ParallelPortComponent::dataCallback) );
@@ -99,62 +99,62 @@ ParallelPortComponent::ParallelPortComponent( ICNDocument *icnDocument, bool new
//END Data register
- //BEGIN Status register
- QString statusNames[] = { "ERR", "ON", "PE", "ACK", "BUSY" };
+ //BEGIN tqStatus register
+ TQString statusNames[] = { "ERR", "ON", "PE", "ACK", "BUSY" };
// The statusIDs are referenced in the save file and must not change
- QString statusIDs[] = { "ERROR", "ONLINE", "PE", "ACK", "BUSY" };
+ TQString statusIDs[] = { "ERROR", "ONLINE", "PE", "ACK", "BUSY" };
- // Bits 0...2 in the Status register are not used
+ // Bits 0...2 in the tqStatus register are not used
for ( int i = 3; i < 8; ++i )
{
- QString id = statusIDs[i-3];
- QString name = statusNames[i-3];
+ TQString id = statusIDs[i-3];
+ TQString name = statusNames[i-3];
// Bit 3 (pin 15) doesn't not follow the same positioning pattern as
- // the other pins in the Status register.
+ // the other pins in the tqStatus register.
if ( i == 3 )
{
pin = createPin( 40, -72, 180, id );
- addDisplayText( id, QRect( 0, -80, 28, 16 ), name, true, Qt::AlignRight | Qt::AlignVCenter );
+ addDisplayText( id, TQRect( 0, -80, 28, 16 ), name, true, TQt::AlignRight | TQt::AlignVCenter );
}
else
{
pin = createPin( -40, -16 + 16*i, 0, id );
- addDisplayText( id, QRect( -28, -24 + 16*i, 28, 16 ), name, true, Qt::AlignLeft | Qt::AlignVCenter );
+ addDisplayText( id, TQRect( -28, -24 + 16*i, 28, 16 ), name, true, TQt::AlignLeft | TQt::AlignVCenter );
}
m_pLogic[i+8] = createLogicOut( pin, false );
}
- //END Status register
+ //END tqStatus register
//BEGIN Control register
- QString controlNames[] = { "STR", "AUT", "INIT", "SEL" };
+ TQString controlNames[] = { "STR", "AUT", "INIT", "SEL" };
// The controlIDs are referenced in the save file and must not change
- QString controlIDs[] = { "STROBE", "AUTO", "INIT", "SELECT" };
+ TQString controlIDs[] = { "STROBE", "AUTO", "INIT", "SELECT" };
// Bits 4..7 are not used (well; bit 5 is, but not as a pin)
for ( int i = 0; i < 4; ++i )
{
- QString id = controlIDs[i];
- QString name = controlNames[i];
+ TQString id = controlIDs[i];
+ TQString name = controlNames[i];
if ( i == 0 )
{
pin = createPin( -40, -96, 0, id );
- addDisplayText( id, QRect( -28, -104, 28, 16 ), name, true, Qt::AlignLeft | Qt::AlignVCenter );
+ addDisplayText( id, TQRect( -28, -104, 28, 16 ), name, true, TQt::AlignLeft | TQt::AlignVCenter );
}
else if ( i == 1 )
{
pin = createPin( 40, -88, 180, id );
- addDisplayText( id, QRect( 0, -96, 28, 16 ), name, true, Qt::AlignRight | Qt::AlignVCenter );
+ addDisplayText( id, TQRect( 0, -96, 28, 16 ), name, true, TQt::AlignRight | TQt::AlignVCenter );
}
else
{
pin = createPin( 40, -88 + i*16, 180, id );
- addDisplayText( id, QRect( 0, -96 + i*16, 28, 16 ), name, true, Qt::AlignRight | Qt::AlignVCenter );
+ addDisplayText( id, TQRect( 0, -96 + i*16, 28, 16 ), name, true, TQt::AlignRight | TQt::AlignVCenter );
}
m_pLogic[i+16] = createLogicOut( pin, false );
@@ -167,7 +167,7 @@ ParallelPortComponent::ParallelPortComponent( ICNDocument *icnDocument, bool new
// And make the rest of the pins ground
for ( int i = 0; i < 8; ++i )
{
- pin = createPin( 40, -24 + i*16, 180, QString("GND%1").arg( i ) );
+ pin = createPin( 40, -24 + i*16, 180, TQString("GND%1").tqarg( i ) );
pin->pin()->setGroundType( Pin::gt_always );
}
#endif
@@ -190,7 +190,7 @@ void ParallelPortComponent::dataChanged()
}
-void ParallelPortComponent::initPort( const QString & port )
+void ParallelPortComponent::initPort( const TQString & port )
{
if ( port.isEmpty() )
{
@@ -200,7 +200,7 @@ void ParallelPortComponent::initPort( const QString & port )
if ( ! m_pParallelPort->openPort( port ) )
{
- p_itemDocument->canvas()->setMessage( i18n("Could not open port %1").arg( port ) );
+ p_itemDocument->canvas()->setMessage( i18n("Could not open port %1").tqarg( port ) );
return;
}
}
@@ -228,14 +228,14 @@ void ParallelPortComponent::controlCallback( bool )
void ParallelPortComponent::stepNonLogic()
{
- uchar status = m_pParallelPort->readFromRegister( ParallelPort::Status );
- // Bits 0...2 in the Status register are not used
+ uchar status = m_pParallelPort->readFromRegister( ParallelPort::tqStatus );
+ // Bits 0...2 in the tqStatus register are not used
for ( int i = 3; i < 8; ++i )
m_pLogic[i + 8]->setHigh( status | (1 << i) );
}
-void ParallelPortComponent::drawShape( QPainter & p )
+void ParallelPortComponent::drawShape( TQPainter & p )
{
drawPortShape( p );
}
diff --git a/src/electronics/components/parallelportcomponent.h b/src/electronics/components/parallelportcomponent.h
index 89ead80..eebc12b 100644
--- a/src/electronics/components/parallelportcomponent.h
+++ b/src/electronics/components/parallelportcomponent.h
@@ -33,14 +33,14 @@ class ParallelPortComponent : public CallbackClass, public Component
virtual bool doesStepNonLogic() const { return true; }
protected:
- void initPort( const QString & port );
+ void initPort( const TQString & port );
virtual void dataChanged();
- virtual void drawShape( QPainter & p );
+ virtual void drawShape( TQPainter & p );
void dataCallback( bool );
void controlCallback( bool );
- /// Registers: { Data[0...7], Status[0...5], 0[6...7], Control[0...4], 0[5...7] }
+ /// Registers: { Data[0...7], tqStatus[0...5], 0[6...7], Control[0...4], 0[5...7] }
LogicOut * m_pLogic[24];
ParallelPort * m_pParallelPort;
diff --git a/src/electronics/components/piccomponent.cpp b/src/electronics/components/piccomponent.cpp
index 47320bb..5bfda22 100644
--- a/src/electronics/components/piccomponent.cpp
+++ b/src/electronics/components/piccomponent.cpp
@@ -29,13 +29,13 @@
#include <kiconloader.h>
#include <klocale.h>
#include <kmessagebox.h>
-#include <qguardedptr.h>
-#include <qstringlist.h>
+#include <tqguardedptr.h>
+#include <tqstringlist.h>
#include "gpsim/ioports.h"
#include "gpsim/pic-processor.h"
-const QString _def_PICComponent_fileName = i18n("<Enter location of PIC Program>");
+const TQString _def_PICComponent_fileName = i18n("<Enter location of PIC Program>");
Item* PICComponent::construct( ItemDocument *itemDocument, bool newItem, const char *id )
@@ -46,7 +46,7 @@ Item* PICComponent::construct( ItemDocument *itemDocument, bool newItem, const c
LibraryItem* PICComponent::libraryItem()
{
- QStringList IDs;
+ TQStringList IDs;
IDs << "ec/pic" << "ec/picitem" << "ec/picitem_18pin";
return new LibraryItem(
@@ -82,20 +82,20 @@ PICComponent::PICComponent( ICNDocument *icnDocument, bool newItem, const char *
m_bLoadingProgram = false;
m_pGpsim = 0L;
- addButton( "run", QRect(), KGlobal::iconLoader()->loadIcon( "player_play", KIcon::Small ) );
- addButton( "pause", QRect(), KGlobal::iconLoader()->loadIcon( "player_pause", KIcon::Small ) );
- addButton( "reset", QRect(), KGlobal::iconLoader()->loadIcon( "stop", KIcon::Small ) );
- addButton( "reload", QRect(), KGlobal::iconLoader()->loadIcon( "reload", KIcon::Small ) );
+ addButton( "run", TQRect(), KGlobal::iconLoader()->loadIcon( "player_play", KIcon::Small ) );
+ addButton( "pause", TQRect(), KGlobal::iconLoader()->loadIcon( "player_pause", KIcon::Small ) );
+ addButton( "reset", TQRect(), KGlobal::iconLoader()->loadIcon( "stop", KIcon::Small ) );
+ addButton( "reload", TQRect(), KGlobal::iconLoader()->loadIcon( "reload", KIcon::Small ) );
if ( icnDocument->ktechlab() )
- connect( icnDocument->ktechlab(), SIGNAL(recentFileAdded(const KURL &)), this, SLOT(slotUpdateFileList()) );
+ connect( icnDocument->ktechlab(), TQT_SIGNAL(recentFileAdded(const KURL &)), this, TQT_SLOT(slotUpdateFileList()) );
- connect( ProjectManager::self(), SIGNAL(projectOpened()), this, SLOT(slotUpdateFileList()) );
- connect( ProjectManager::self(), SIGNAL(projectClosed()), this, SLOT(slotUpdateFileList()) );
- connect( ProjectManager::self(), SIGNAL(projectCreated()), this, SLOT(slotUpdateFileList()) );
- connect( ProjectManager::self(), SIGNAL(subprojectCreated()), this, SLOT(slotUpdateFileList()) );
- connect( ProjectManager::self(), SIGNAL(filesAdded()), this, SLOT(slotUpdateFileList()) );
- connect( ProjectManager::self(), SIGNAL(filesRemoved()), this, SLOT(slotUpdateFileList()) );
+ connect( ProjectManager::self(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(slotUpdateFileList()) );
+ connect( ProjectManager::self(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(slotUpdateFileList()) );
+ connect( ProjectManager::self(), TQT_SIGNAL(projectCreated()), this, TQT_SLOT(slotUpdateFileList()) );
+ connect( ProjectManager::self(), TQT_SIGNAL(subprojectCreated()), this, TQT_SLOT(slotUpdateFileList()) );
+ connect( ProjectManager::self(), TQT_SIGNAL(filesAdded()), this, TQT_SLOT(slotUpdateFileList()) );
+ connect( ProjectManager::self(), TQT_SIGNAL(filesRemoved()), this, TQT_SLOT(slotUpdateFileList()) );
createProperty( "program", Variant::Type::FileName );
property("program")->setCaption( i18n("Program") );
@@ -146,7 +146,7 @@ void PICComponent::initPIC( bool forceReload )
initPackage( microInfo );
}
- QString newProgram = KURL( dataString("program") ).path();
+ TQString newProgram = KURL( dataString("program") ).path();
bool newFile = (m_picFile != newProgram);
if ( !newFile && !forceReload )
return;
@@ -159,15 +159,15 @@ void PICComponent::initPIC( bool forceReload )
case GpsimProcessor::DoesntExist:
if ( newProgram == _def_PICComponent_fileName && !newProgram.isEmpty() )
break;
- KMessageBox::sorry( 0l, i18n("The file \"%1\" does not exist.").arg( newProgram ) );
- m_picFile = QString::null;
+ KMessageBox::sorry( 0l, i18n("The file \"%1\" does not exist.").tqarg( newProgram ) );
+ m_picFile = TQString();
break;
case GpsimProcessor::IncorrectType:
if ( newProgram == _def_PICComponent_fileName && !newProgram.isEmpty() )
break;
- KMessageBox::sorry( 0L, i18n("\"%1\" is not a valid PIC program.\nThe file must exist, and the extension should be \".cod\", \".asm\", \".flowcode\", \".basic\", \".microbe\" or \".c\".\n\".hex\" is allowed, provided that there is a corresponding \".cod\" file.").arg(newProgram) );
- m_picFile = QString::null;
+ KMessageBox::sorry( 0L, i18n("\"%1\" is not a valid PIC program.\nThe file must exist, and the extension should be \".cod\", \".asm\", \".flowcode\", \".basic\", \".microbe\" or \".c\".\n\".hex\" is allowed, provided that there is a corresponding \".cod\" file.").tqarg(newProgram) );
+ m_picFile = TQString();
break;
case GpsimProcessor::Valid:
@@ -198,14 +198,14 @@ void PICComponent::initPackage( MicroInfo * microInfo )
m_bCreatedInitialPackage = true;
//BEGIN Get pin IDs
- QStringList allPinIDs = microPackage->pinIDs();
- QStringList ioPinIDs = microPackage->pinIDs( PicPin::type_bidir | PicPin::type_input | PicPin::type_open );
+ TQStringList allPinIDs = microPackage->pinIDs();
+ TQStringList ioPinIDs = microPackage->pinIDs( PicPin::type_bidir | PicPin::type_input | PicPin::type_open );
// Now, we make the unwanted pin ids blank, so a pin is not created for them
- const QStringList::iterator allPinIDsEnd = allPinIDs.end();
- for ( QStringList::iterator it = allPinIDs.begin(); it != allPinIDsEnd; ++it )
+ const TQStringList::iterator allPinIDsEnd = allPinIDs.end();
+ for ( TQStringList::iterator it = allPinIDs.begin(); it != allPinIDsEnd; ++it )
{
- if ( !ioPinIDs.contains(*it) )
+ if ( !ioPinIDs.tqcontains(*it) )
*it = "";
}
//END Get pin IDs
@@ -226,7 +226,7 @@ void PICComponent::initPackage( MicroInfo * microInfo )
const NodeMap::iterator nodeMapEnd = nodeMapCopy.end();
for ( NodeMap::iterator it = nodeMapCopy.begin(); it != nodeMapEnd; ++it )
{
- if ( !ioPinIDs.contains(it.key()) )
+ if ( !ioPinIDs.tqcontains(it.key()) )
removeNode( it.key() );
}
@@ -247,7 +247,7 @@ void PICComponent::initPackage( MicroInfo * microInfo )
removeDisplayText( "no_file" );
- addDisplayText( "picid", QRect(offsetX(), offsetY()-16, width(), 16), microInfo->id() );
+ addDisplayText( "picid", TQRect(offsetX(), offsetY()-16, width(), 16), microInfo->id() );
}
else
{
@@ -259,10 +259,10 @@ void PICComponent::initPackage( MicroInfo * microInfo )
//BEGIN Update button positions
int leftpos = (width()-88)/2+offsetX();
- button("run")->setOriginalRect( QRect( leftpos, height()+4+offsetY(), 20, 20 ) );
- button("pause")->setOriginalRect( QRect( leftpos+23, height()+4+offsetY(), 20, 20 ) );
- button("reset")->setOriginalRect( QRect( leftpos+46, height()+4+offsetY(), 20, 20 ) );
- button("reload")->setOriginalRect( QRect( leftpos+69, height()+4+offsetY(), 20, 20 ) );
+ button("run")->setOriginalRect( TQRect( leftpos, height()+4+offsetY(), 20, 20 ) );
+ button("pause")->setOriginalRect( TQRect( leftpos+23, height()+4+offsetY(), 20, 20 ) );
+ button("reset")->setOriginalRect( TQRect( leftpos+46, height()+4+offsetY(), 20, 20 ) );
+ button("reload")->setOriginalRect( TQRect( leftpos+69, height()+4+offsetY(), 20, 20 ) );
updateAttachedPositioning();
//END Update button positions
}
@@ -283,11 +283,11 @@ void PICComponent::attachPICComponentPins()
void PICComponent::slotUpdateFileList()
{
- QStringList preFileList;
+ TQStringList preFileList;
if ( p_icnDocument && p_icnDocument->ktechlab() )
preFileList += p_icnDocument->ktechlab()->recentFiles();
- QStringList fileList;
+ TQStringList fileList;
if ( ProjectInfo * info = ProjectManager::self()->currentProject() )
{
@@ -297,23 +297,23 @@ void PICComponent::slotUpdateFileList()
fileList << (*it).path();
}
- const QStringList::iterator end = preFileList.end();
- for ( QStringList::iterator it = preFileList.begin(); it != end; ++it )
+ const TQStringList::iterator end = preFileList.end();
+ for ( TQStringList::iterator it = preFileList.begin(); it != end; ++it )
{
- QString file = KURL(*it).path();
- if ( (file.endsWith(".flowcode") || file.endsWith(".asm") || file.endsWith(".cod") || file.endsWith(".basic") || file.endsWith(".microbe") ) && !fileList.contains(file) ) {
+ TQString file = KURL(*it).path();
+ if ( (file.endsWith(".flowcode") || file.endsWith(".asm") || file.endsWith(".cod") || file.endsWith(".basic") || file.endsWith(".microbe") ) && !fileList.tqcontains(file) ) {
fileList.append(file);
}
}
- QString fileName = dataString("program");
+ TQString fileName = dataString("program");
property("program")->setAllowed(fileList);
property("program")->setValue( fileName.isEmpty() ? _def_PICComponent_fileName : fileName );
}
-void PICComponent::buttonStateChanged( const QString &id, bool state )
+void PICComponent::buttonStateChanged( const TQString &id, bool state )
{
if (!state)
return;
@@ -359,12 +359,12 @@ bool PICComponent::mouseDoubleClickEvent ( const EventInfo &eventInfo )
}
-QString PICComponent::createSymbolFile()
+TQString PICComponent::createSymbolFile()
{
m_bLoadingProgram = true;
slotUpdateBtns();
- return GpsimProcessor::generateSymbolFile( dataString("program"), this, SLOT(slotCODCreationSucceeded()), SLOT(slotCODCreationFailed()) );
+ return GpsimProcessor::generateSymbolFile( dataString("program"), this, TQT_SLOT(slotCODCreationSucceeded()), TQT_SLOT(slotCODCreationFailed()) );
}
@@ -375,19 +375,19 @@ void PICComponent::slotCODCreationSucceeded()
delete m_pGpsim;
m_pGpsim = new GpsimProcessor(m_symbolFile);
- if ( m_pGpsim->codLoadStatus() == GpsimProcessor::CodSuccess )
+ if ( m_pGpsim->codLoadtqStatus() == GpsimProcessor::CodSuccess )
{
MicroInfo * microInfo = m_pGpsim->microInfo();
property("lastPackage")->setValue( microInfo->id() );
initPackage( microInfo );
- connect( m_pGpsim, SIGNAL(runningStatusChanged(bool )), this, SLOT(slotUpdateBtns()) );
+ connect( m_pGpsim, TQT_SIGNAL(runningStatusChanged(bool )), this, TQT_SLOT(slotUpdateBtns()) );
attachPICComponentPins();
}
else
{
- m_pGpsim->displayCodLoadStatus();
+ m_pGpsim->displayCodLoadtqStatus();
delete m_pGpsim;
m_pGpsim = 0l;
}
diff --git a/src/electronics/components/piccomponent.h b/src/electronics/components/piccomponent.h
index 165fbf6..d5e668d 100644
--- a/src/electronics/components/piccomponent.h
+++ b/src/electronics/components/piccomponent.h
@@ -16,8 +16,8 @@
#include "component.h"
-#include <qguardedptr.h>
-#include <qmap.h>
+#include <tqguardedptr.h>
+#include <tqmap.h>
class Document;
class ECNode;
@@ -32,7 +32,7 @@ class PICComponentPin;
class PicPin;
class TextDocument;
-typedef QMap< int, PICComponentPin * > PICComponentPinMap;
+typedef TQMap< int, PICComponentPin * > PICComponentPinMap;
/**
@short Electronic PIC device
@@ -41,6 +41,7 @@ typedef QMap< int, PICComponentPin * > PICComponentPinMap;
class PICComponent : public Component
{
Q_OBJECT
+ TQ_OBJECT
public:
PICComponent( ICNDocument * icnDocument, bool newItem, const char *id = 0L );
~PICComponent();
@@ -49,7 +50,7 @@ class PICComponent : public Component
static Item * construct( ItemDocument *itemDocument, bool newItem, const char *id );
static LibraryItem * libraryItem();
- virtual void buttonStateChanged( const QString &id, bool state );
+ virtual void buttonStateChanged( const TQString &id, bool state );
virtual bool mouseDoubleClickEvent( const EventInfo &eventInfo );
void programReload();
@@ -78,16 +79,16 @@ class PICComponent : public Component
* Attempts to compile the program to a symbol file, and connects the assembly
* finish signal to loadGpsim
*/
- QString createSymbolFile();
+ TQString createSymbolFile();
virtual void dataChanged();
/**
* Initializes the PIC from the options the user has selected.
*/
void initPIC( bool forceReload );
- QGuardedPtr<GpsimProcessor> m_pGpsim;
- QString m_picFile; ///< The input program that the user selected
- QString m_symbolFile; ///< The symbol file that was generated from m_picFile
+ TQGuardedPtr<GpsimProcessor> m_pGpsim;
+ TQString m_picFile; ///< The input program that the user selected
+ TQString m_symbolFile; ///< The symbol file that was generated from m_picFile
bool m_bLoadingProgram; ///< True between createSymbolFile being called and the file being created
PICComponentPinMap m_picComponentPinMap;
bool m_bCreatedInitialPackage; ///< Set true once the initial package is loaded; until then, will load a package from the lastPackage data
diff --git a/src/electronics/components/piccomponentpin.h b/src/electronics/components/piccomponentpin.h
index 0fc433d..cd41db9 100644
--- a/src/electronics/components/piccomponentpin.h
+++ b/src/electronics/components/piccomponentpin.h
@@ -17,7 +17,7 @@
#include "logic.h"
#include "gpsim/stimuli.h"
-#include <qstring.h>
+#include <tqstring.h>
/**
@short Controls a pin on the PIC component
@@ -61,7 +61,7 @@ class PICComponentPin : public CallbackClass, public stimulus
LogicIn * m_pLogicIn;
PICComponent * m_pPICComponent;
Stimulus_Node * m_pStimulusNode;
- const QString m_id;
+ const TQString m_id;
};
#endif
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 );
diff --git a/src/electronics/components/probe.h b/src/electronics/components/probe.h
index 9beb62e..ab5040f 100644
--- a/src/electronics/components/probe.h
+++ b/src/electronics/components/probe.h
@@ -30,7 +30,7 @@ class Probe : public Component
virtual void dataChanged();
ProbeData * p_probeData; // As obtained via registering with the oscilloscope
- QColor m_color;
+ TQColor m_color;
};
/**
@@ -46,7 +46,7 @@ class FloatingProbe : public Probe
protected:
virtual void dataChanged();
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
FloatingProbeData * m_pFloatingProbeData;
};
@@ -103,7 +103,7 @@ class LogicProbe : public CallbackClass, public Probe
void logicCallback( bool value );
protected:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
LogicProbeData * p_logicProbeData;
LogicIn * m_pIn;
diff --git a/src/electronics/components/pushswitch.cpp b/src/electronics/components/pushswitch.cpp
index b7b38b7..8257440 100644
--- a/src/electronics/components/pushswitch.cpp
+++ b/src/electronics/components/pushswitch.cpp
@@ -14,10 +14,10 @@
#include "switch.h"
#include <klocale.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qpoint.h>
-#include <qpointarray.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqpoint.h>
+#include <tqpointarray.h>
//BEGIN class ECPTBSwitch
Item* ECPTBSwitch::construct( ItemDocument *itemDocument, bool newItem, const char *id )
@@ -28,7 +28,7 @@ Item* ECPTBSwitch::construct( ItemDocument *itemDocument, bool newItem, const ch
LibraryItem* ECPTBSwitch::libraryItem()
{
return new LibraryItem(
- QString("ec/ptb_switch"),
+ TQString("ec/ptb_switch"),
i18n("Push-to-Break"),
i18n("Switches"),
"ptb.png",
@@ -42,7 +42,7 @@ ECPTBSwitch::ECPTBSwitch( ICNDocument *icnDocument, bool newItem, const char *id
m_name = i18n("Push to Break");
setSize( -16, -16, 32, 24 );
- addButton( "button", QRect( -16, 8, 32, 20 ), "" );
+ addButton( "button", TQRect( -16, 8, 32, 20 ), "" );
createProperty( "button_text", Variant::Type::String );
property("button_text")->setCaption( i18n("Button Text") );
@@ -80,7 +80,7 @@ void ECPTBSwitch::dataChanged()
}
-void ECPTBSwitch::drawShape( QPainter &p )
+void ECPTBSwitch::drawShape( TQPainter &p )
{
initPainter(p);
@@ -93,7 +93,7 @@ void ECPTBSwitch::drawShape( QPainter &p )
p.drawLine( _x+width()/4, _y+dy, _x+(3*width())/4, _y+dy ); // Top horizontal line
p.drawLine( _x, _y+(_height/2)-radius+dy, _x+width(), _y+(_height/2)-radius+dy ); // Bottom horizontal line
- p.drawLine( _x+width()/2, _y+dy, _x+width()/2, _y+(_height/2)-radius+dy ); // Vertical line
+ p.drawLine( _x+width()/2, _y+dy, _x+width()/2, _y+(_height/2)-radius+dy ); //Qt::Vertical line
p.drawEllipse( _x, _y+(_height/2)-radius, 2*radius, 2*radius ); // Left circle
p.drawEllipse( _x+width()-2*radius+1, _y+(_height/2)-radius, 2*radius, 2*radius ); // Right circle
@@ -101,7 +101,7 @@ void ECPTBSwitch::drawShape( QPainter &p )
deinitPainter(p);
}
-void ECPTBSwitch::buttonStateChanged( const QString &id, bool state )
+void ECPTBSwitch::buttonStateChanged( const TQString &id, bool state )
{
if ( id != "button" )
return;
@@ -120,7 +120,7 @@ Item* ECPTMSwitch::construct( ItemDocument *itemDocument, bool newItem, const ch
LibraryItem* ECPTMSwitch::libraryItem()
{
return new LibraryItem(
- QString("ec/ptm_switch"),
+ TQString("ec/ptm_switch"),
i18n("Push-to-Make"),
i18n("Switches"),
"ptm.png",
@@ -134,7 +134,7 @@ ECPTMSwitch::ECPTMSwitch( ICNDocument *icnDocument, bool newItem, const char *id
m_name = i18n("Push to Make");
setSize( -16, -16, 32, 24 );
- addButton( "button", QRect( -16, 8, 32, 20 ), "" );
+ addButton( "button", TQRect( -16, 8, 32, 20 ), "" );
createProperty( "button_text", Variant::Type::String );
property("button_text")->setCaption( i18n("Button Text") );
@@ -173,7 +173,7 @@ void ECPTMSwitch::dataChanged()
}
-void ECPTMSwitch::drawShape( QPainter &p )
+void ECPTMSwitch::drawShape( TQPainter &p )
{
initPainter(p);
@@ -186,7 +186,7 @@ void ECPTMSwitch::drawShape( QPainter &p )
p.drawLine( _x+width()/4, _y-dy, _x+(3*width())/4, _y-dy ); // Top horizontal line
p.drawLine( _x, _y+(_height/2)-radius-dy, _x+width(), _y+(_height/2)-radius-dy ); // Bottom horizontal line
- p.drawLine( _x+width()/2, _y-dy, _x+width()/2, _y+(_height/2)-radius-dy ); // Vertical line
+ p.drawLine( _x+width()/2, _y-dy, _x+width()/2, _y+(_height/2)-radius-dy ); //Qt::Vertical line
p.drawEllipse( _x, _y+(_height/2)-radius, 2*radius, 2*radius ); // Left circle
p.drawEllipse( _x+width()-2*radius+1, _y+(_height/2)-radius, 2*radius, 2*radius ); // Right circle
@@ -194,7 +194,7 @@ void ECPTMSwitch::drawShape( QPainter &p )
deinitPainter(p);
}
-void ECPTMSwitch::buttonStateChanged( const QString &id, bool state )
+void ECPTMSwitch::buttonStateChanged( const TQString &id, bool state )
{
if ( id != "button" ) return;
m_switch->setState( state ? Switch::Closed : Switch::Open );
diff --git a/src/electronics/components/pushswitch.h b/src/electronics/components/pushswitch.h
index c22ea93..1854eb2 100644
--- a/src/electronics/components/pushswitch.h
+++ b/src/electronics/components/pushswitch.h
@@ -26,11 +26,11 @@ public:
static Item* construct( ItemDocument *itemDocument, bool newItem, const char *id );
static LibraryItem *libraryItem();
- virtual void buttonStateChanged( const QString &id, bool state );
+ virtual void buttonStateChanged( const TQString &id, bool state );
virtual void dataChanged();
private:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
Switch *m_switch;
bool pressed;
};
@@ -49,11 +49,11 @@ public:
static Item* construct( ItemDocument *itemDocument, bool newItem, const char *id );
static LibraryItem *libraryItem();
- virtual void buttonStateChanged( const QString &id, bool state );
+ virtual void buttonStateChanged( const TQString &id, bool state );
virtual void dataChanged();
private:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
Switch *m_switch;
bool pressed;
};
diff --git a/src/electronics/components/ram.cpp b/src/electronics/components/ram.cpp
index add745a..8c20736 100644
--- a/src/electronics/components/ram.cpp
+++ b/src/electronics/components/ram.cpp
@@ -24,7 +24,7 @@ Item* RAM::construct( ItemDocument *itemDocument, bool newItem, const char *id )
LibraryItem* RAM::libraryItem()
{
return new LibraryItem(
- QString("ec/ram"),
+ TQString("ec/ram"),
i18n("RAM"),
i18n("Integrated Circuits"),
"ic2.png",
@@ -37,7 +37,7 @@ RAM::RAM( ICNDocument *icnDocument, bool newItem, const char *id )
: Component( icnDocument, newItem, id ? id : "ram" )
{
m_name = i18n("RAM");
- m_desc = i18n("This RAM stores data as a collection of words; each of which contains <i>word size</i> bits of data.<br><br>To read data, set the CS (<i>chip select</i>) and the OE (<i>output enable</i>) pins high, and select the word using the address pins <i>A*</i>. The word is outputted on the data-out pins: <i>DO*</i>.<br><br>To write data, set the CS (<i>chip select</i>) and the WE (<i>write enable</i>) pins high, and select the address to write to with the <i>A*</i> pins. Write to the selected word using the data-in pins: <i>DI*</i>.<br><br>The <i>Address Size</i> is the number of bits that determine an address; so the total number of words stored will be 2^<sup><i>Address Size</i></sup>.");
+ m_desc = i18n("This RAM stores data as a collection of words; each of which tqcontains <i>word size</i> bits of data.<br><br>To read data, set the CS (<i>chip select</i>) and the OE (<i>output enable</i>) pins high, and select the word using the address pins <i>A*</i>. The word is outputted on the data-out pins: <i>DO*</i>.<br><br>To write data, set the CS (<i>chip select</i>) and the WE (<i>write enable</i>) pins high, and select the address to write to with the <i>A*</i> pins. Write to the selected word using the data-in pins: <i>DI*</i>.<br><br>The <i>Address Size</i> is the number of bits that determine an address; so the total number of words stored will be 2^<sup><i>Address Size</i></sup>.");
m_data = 0l;
m_pCS = 0l;
@@ -125,16 +125,16 @@ void RAM::initPins()
newWordSize == oldWordSize )
return;
- QStringList leftPins; // Pins on left of IC
+ TQStringList leftPins; // Pins on left of IC
leftPins << "CS" << "OE" << "WE";
for ( int i = 0; i < newAddressSize; ++i )
- leftPins << QString("A%1").arg( QString::number(i) );
+ leftPins << TQString("A%1").tqarg( TQString::number(i) );
- QStringList rightPins; // Pins on right of IC
+ TQStringList rightPins; // Pins on right of IC
for ( unsigned i = newWordSize; i > 0; --i )
- rightPins << QString("DI%1").arg( QString::number(i-1) );
+ rightPins << TQString("DI%1").tqarg( TQString::number(i-1) );
for ( unsigned i = newWordSize; i > 0; --i )
- rightPins << QString("DO%1").arg( QString::number(i-1) );
+ rightPins << TQString("DO%1").tqarg( TQString::number(i-1) );
// Make pin lists of consistent sizes
for ( unsigned i = leftPins.size(); i < rightPins.size(); ++i )
@@ -142,7 +142,7 @@ void RAM::initPins()
for ( unsigned i = rightPins.size(); i < leftPins.size(); ++i )
rightPins.prepend("");
- QStringList pins = leftPins + rightPins;
+ TQStringList pins = leftPins + rightPins;
initDIPSymbol( pins, 72 );
initDIP(pins);
@@ -177,11 +177,11 @@ void RAM::initPins()
for ( int i = oldWordSize; i < newWordSize; ++i )
{
- node = ecNodeWithID( QString("DI%1").arg( QString::number(i) ) );
+ node = ecNodeWithID( TQString("DI%1").tqarg( TQString::number(i) ) );
m_dataIn.insert( i, createLogicIn(node) );
m_dataIn[i]->setCallback( this, (CallbackPtr)(&RAM::inStateChanged) );
- node = ecNodeWithID( QString("DO%1").arg( QString::number(i) ) );
+ node = ecNodeWithID( TQString("DO%1").tqarg( TQString::number(i) ) );
m_dataOut.insert( i, createLogicOut(node, false) );
}
}
@@ -189,12 +189,12 @@ void RAM::initPins()
{
for ( int i = newWordSize; i < oldWordSize; ++i )
{
- QString id = QString("DO%1").arg( QString::number(i) );
+ TQString id = TQString("DO%1").tqarg( TQString::number(i) );
removeDisplayText(id);
removeElement( m_dataIn[i], false );
removeNode(id);
- id = QString("DI%1").arg( QString::number(i) );
+ id = TQString("DI%1").tqarg( TQString::number(i) );
removeDisplayText(id);
removeElement( m_dataOut[i], false );
removeNode(id);
@@ -210,7 +210,7 @@ void RAM::initPins()
for ( int i = oldAddressSize; i < newAddressSize; ++i )
{
- node = ecNodeWithID( QString("A%1").arg( QString::number(i) ) );
+ node = ecNodeWithID( TQString("A%1").tqarg( TQString::number(i) ) );
m_address.insert( i, createLogicIn(node) );
m_address[i]->setCallback( this, (CallbackPtr)(&RAM::inStateChanged) );
}
@@ -219,7 +219,7 @@ void RAM::initPins()
{
for ( int i = newAddressSize; i < oldAddressSize; ++i )
{
- QString id = QString("A%1").arg( QString::number(i) );
+ TQString id = TQString("A%1").tqarg( TQString::number(i) );
removeDisplayText(id);
removeElement( m_address[i], false );
removeNode(id);
diff --git a/src/electronics/components/ram.h b/src/electronics/components/ram.h
index 7b78ee9..b520969 100644
--- a/src/electronics/components/ram.h
+++ b/src/electronics/components/ram.h
@@ -14,8 +14,8 @@
#include "component.h"
#include "logic.h"
-#include <qbitarray.h>
-#include <qptrvector.h>
+#include <tqbitarray.h>
+#include <tqptrvector.h>
/**
@author David Saxton
@@ -35,7 +35,7 @@ class RAM : public CallbackClass, public Component
virtual void dataChanged();
void inStateChanged( bool newState );
- QBitArray m_data;
+ TQBitArray m_data;
LogicIn * m_pCS; // Chip select
LogicIn * m_pOE; // Output enable
LogicIn * m_pWE; // Write enable
@@ -43,9 +43,9 @@ class RAM : public CallbackClass, public Component
int m_wordSize;
int m_addressSize;
- QPtrVector<LogicIn> m_address;
- QPtrVector<LogicIn> m_dataIn;
- QPtrVector<LogicOut> m_dataOut;
+ TQPtrVector<LogicIn> m_address;
+ TQPtrVector<LogicIn> m_dataIn;
+ TQPtrVector<LogicOut> m_dataOut;
};
#endif
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());
diff --git a/src/electronics/components/resistordip.h b/src/electronics/components/resistordip.h
index ce1d03a..e3996a8 100644
--- a/src/electronics/components/resistordip.h
+++ b/src/electronics/components/resistordip.h
@@ -28,7 +28,7 @@ public:
static LibraryItem *libraryItem();
protected:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
void updateDIPNodePositions();
virtual void dataChanged();
/**
diff --git a/src/electronics/components/rotoswitch.cpp b/src/electronics/components/rotoswitch.cpp
index 872714c..ac7f1a0 100644
--- a/src/electronics/components/rotoswitch.cpp
+++ b/src/electronics/components/rotoswitch.cpp
@@ -16,7 +16,7 @@
#include "switch.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <cmath>
#include <assert.h>
@@ -31,7 +31,7 @@ Item* ECRotoSwitch::construct( ItemDocument *itemDocument, bool newItem, const c
LibraryItem* ECRotoSwitch::libraryItem()
{
return new LibraryItem(
- QString("ec/roto_switch"),
+ TQString("ec/roto_switch"),
i18n("Rotary"),
i18n("Switches"),
"rotary.png",
@@ -47,20 +47,20 @@ m_numPositions(0)
// m_name = i18n("Rotary Switch(WIP)");
m_name = i18n("Rotary Switch");
m_desc = i18n("Rotary Switch"); ///< \todo better description for rotoswitch
- QPointArray pa;
+ TQPointArray pa;
pa.makeArc( -_pinInnerRadius, -_pinInnerRadius, 2*_pinInnerRadius, 2*_pinInnerRadius , 0, 16*360 );
setItemPoints( pa );
//setSize( -64, -64, 128, 128 );
//half the side length of the buttons
int buttonRadius = 10;
- addButton( "go_left", QRect( -_pinOuterRadius/3-buttonRadius, _pinOuterRadius-3*buttonRadius, 2*buttonRadius, 2*buttonRadius ), "<", false );
- addButton( "go_right", QRect(_pinOuterRadius/3-buttonRadius, _pinOuterRadius-3*buttonRadius, 2*buttonRadius, 2*buttonRadius ), ">", false );
+ addButton( "go_left", TQRect( -_pinOuterRadius/3-buttonRadius, _pinOuterRadius-3*buttonRadius, 2*buttonRadius, 2*buttonRadius ), "<", false );
+ addButton( "go_right", TQRect(_pinOuterRadius/3-buttonRadius, _pinOuterRadius-3*buttonRadius, 2*buttonRadius, 2*buttonRadius ), ">", false );
/*Variant * v = createProperty( "button_map", Variant::Type::String );
v->setCaption( i18n("Button Map") );
v->setAdvanced(true);
- const QString defButtonMap("SSSSSSSSSSSM");
+ const TQString defButtonMap("SSSSSSSSSSSM");
v->setValue(defButtonMap);
*/
Variant * v = createProperty( "num_positions", Variant::Type::Int );
@@ -115,7 +115,7 @@ void ECRotoSwitch::dataChanged()
}
inline int roundTo10(int a){return ((a/10)+(a%10<5?0:1))*10;}
-void ECRotoSwitch::drawShape( QPainter &p )
+void ECRotoSwitch::drawShape( TQPainter &p )
{
initPainter(p);
@@ -178,7 +178,7 @@ void ECRotoSwitch::drawShape( QPainter &p )
deinitPainter(p);
}
-void ECRotoSwitch::buttonStateChanged( const QString & id, bool state )
+void ECRotoSwitch::buttonStateChanged( const TQString & id, bool state )
{
SwitchPosition& curSP = m_positions[m_curPosition];
int nextPos = m_curPosition;
@@ -245,7 +245,7 @@ void ECRotoSwitch::setUpSwitches()
for(int i=0; i<m_numPositions; i++)
{
SwitchPosition& sp = m_positions[i];
- QString pinName = QString("pin_%1").arg(i);
+ TQString pinName = TQString("pin_%1").tqarg(i);
removeNode(pinName);
removeSwitch(sp.posSwitch);
}
@@ -284,7 +284,7 @@ void ECRotoSwitch::setUpSwitches()
// kdDebug() << contactX <<", "<< contactY <<endl;
- sp.node = createPin(contactX,-contactY,sp.pinAngle,QString("pin_%1").arg(i));
+ sp.node = createPin(contactX,-contactY,sp.pinAngle,TQString("pin_%1").tqarg(i));
sp.posSwitch = createSwitch(m_inNode, sp.node, true);
sp.isMomentary = false;//(map[i] == 'M');
m_positions.push_back(sp);
diff --git a/src/electronics/components/rotoswitch.h b/src/electronics/components/rotoswitch.h
index 909c0ea..8a4c802 100644
--- a/src/electronics/components/rotoswitch.h
+++ b/src/electronics/components/rotoswitch.h
@@ -12,7 +12,7 @@
#define ROTOSWITCH_H
#include "component.h"
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
struct SwitchPosition
{
@@ -35,11 +35,11 @@ public:
static Item* construct( ItemDocument *itemDocument, bool newItem, const char *id );
static LibraryItem *libraryItem();
- virtual void buttonStateChanged( const QString &id, bool state );
+ virtual void buttonStateChanged( const TQString &id, bool state );
virtual void dataChanged();
private:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
int m_numPositions;
int m_curPosition;
@@ -59,7 +59,7 @@ private:
///The radius of the ring of positions
static const int _contactRingRadius = _contactOuterRadius - _contactRadius;
- QValueVector<SwitchPosition> m_positions;
+ TQValueVector<SwitchPosition> m_positions;
ECNode* m_inNode;
protected:
diff --git a/src/electronics/components/serialportcomponent.cpp b/src/electronics/components/serialportcomponent.cpp
index c8e6a4e..6e6bfed 100644
--- a/src/electronics/components/serialportcomponent.cpp
+++ b/src/electronics/components/serialportcomponent.cpp
@@ -19,7 +19,7 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <cmath>
#include <termios.h>
@@ -58,11 +58,11 @@ SerialPortComponent::SerialPortComponent( ICNDocument *icnDocument, bool newItem
"<li><b>RI</b> - Ring Indicator (control; output)</li>"
"</ul>");
- QPointArray pa( 4 );
- pa[0] = QPoint( -32, -48 );
- pa[1] = QPoint( 32, -40 );
- pa[2] = QPoint( 32, 40 );
- pa[3] = QPoint( -32, 48 );
+ TQPointArray pa( 4 );
+ pa[0] = TQPoint( -32, -48 );
+ pa[1] = TQPoint( 32, -40 );
+ pa[2] = TQPoint( 32, 40 );
+ pa[3] = TQPoint( -32, 48 );
setItemPoints( pa );
@@ -72,51 +72,51 @@ SerialPortComponent::SerialPortComponent( ICNDocument *icnDocument, bool newItem
// Works
pin = createPin( -40, 32, 0, "CD" );
- addDisplayText( "CD", QRect( -28, 24, 28, 16 ), "CD", true, Qt::AlignLeft | Qt::AlignVCenter );
+ addDisplayText( "CD", TQRect( -28, 24, 28, 16 ), "CD", true, TQt::AlignLeft | TQt::AlignVCenter );
m_pCD = createLogicOut( pin, false );
// Doesn't work
// pin = createPin( -40, 16, 0, "RD" );
- addDisplayText( "RD", QRect( -28, 8, 28, 16 ), "RD", true, Qt::AlignLeft | Qt::AlignVCenter );
+ addDisplayText( "RD", TQRect( -28, 8, 28, 16 ), "RD", true, TQt::AlignLeft | TQt::AlignVCenter );
// m_pRD = createLogicOut( pin, false );
// Works
pin = createPin( -40, 0, 0, "TD" );
- addDisplayText( "TD", QRect( -28, -8, 28, 16 ), "TD", true, Qt::AlignLeft | Qt::AlignVCenter );
+ addDisplayText( "TD", TQRect( -28, -8, 28, 16 ), "TD", true, TQt::AlignLeft | TQt::AlignVCenter );
m_pTD = createLogicIn( pin);
m_pTD->setCallback( this, (CallbackPtr)(&SerialPortComponent::tdCallback) );
// Works
pin = createPin( -40, -16, 0, "DTR" );
- addDisplayText( "DTR", QRect( -28, -24, 28, 16 ), "DTR", true, Qt::AlignLeft | Qt::AlignVCenter );
+ addDisplayText( "DTR", TQRect( -28, -24, 28, 16 ), "DTR", true, TQt::AlignLeft | TQt::AlignVCenter );
m_pDTR = createLogicIn( pin );
m_pDTR->setCallback( this, (CallbackPtr)(&SerialPortComponent::dtrCallback) );
// N/A
pin = createPin( -40, -32, 0, "GND" );
- addDisplayText( "GND", QRect( -28, -40, 28, 16 ), "GND", true, Qt::AlignLeft | Qt::AlignVCenter );
+ addDisplayText( "GND", TQRect( -28, -40, 28, 16 ), "GND", true, TQt::AlignLeft | TQt::AlignVCenter );
pin->pin()->setGroundType( Pin::gt_always );
// Doesn't work
// pin = createPin( 40, 24, 180, "DSR" );
- addDisplayText( "DSR", QRect( 0, 16, 28, 16 ), "DSR", true, Qt::AlignRight | Qt::AlignVCenter );
+ addDisplayText( "DSR", TQRect( 0, 16, 28, 16 ), "DSR", true, TQt::AlignRight | TQt::AlignVCenter );
// m_pDSR = createLogicIn( pin );
// m_pDSR->setCallback( this, (CallbackPtr)(&SerialPortComponent::dsrCallback) );
// Doesn't work
// pin = createPin( 40, 8, 180, "RTS" );
- addDisplayText( "RTS", QRect( 0, 0, 28, 16 ), "RTS", true, Qt::AlignRight | Qt::AlignVCenter );
+ addDisplayText( "RTS", TQRect( 0, 0, 28, 16 ), "RTS", true, TQt::AlignRight | TQt::AlignVCenter );
// m_pRTS = createLogicIn( pin );
// m_pRTS->setCallback( this, (CallbackPtr)(&SerialPortComponent::rtsCallback) );
// Works
pin = createPin( 40, -8, 180, "CTS" );
- addDisplayText( "CTS", QRect( 0, -16, 28, 16 ), "CTS", true, Qt::AlignRight | Qt::AlignVCenter );
+ addDisplayText( "CTS", TQRect( 0, -16, 28, 16 ), "CTS", true, TQt::AlignRight | TQt::AlignVCenter );
m_pCTS = createLogicOut( pin, false );
// Works
pin = createPin( 40, -24, 180, "RI" );
- addDisplayText( "RI", QRect( 0, -32, 28, 16 ), "RI", true, Qt::AlignRight | Qt::AlignVCenter );
+ addDisplayText( "RI", TQRect( 0, -32, 28, 16 ), "RI", true, TQt::AlignRight | TQt::AlignVCenter );
m_pRI = createLogicOut( pin, false );
Variant * v = createProperty( "port", Variant::Type::Combo );
@@ -124,7 +124,7 @@ SerialPortComponent::SerialPortComponent( ICNDocument *icnDocument, bool newItem
v->setCaption( i18n("Port") );
// v = createProperty( "baudRate", Variant::Type::Select );
-// v->setAllowed( QStringList::split( ",", "B0,B50,B75,B110,B134,B150,B200,B300,B600,B1200,B1800,B2400,B4800,B9600,B19200,B38400" ) );
+// v->setAllowed( TQStringList::split( ",", "B0,B50,B75,B110,B134,B150,B200,B300,B600,B1200,B1800,B2400,B4800,B9600,B19200,B38400" ) );
// v->setCaption( i18n("Baud rate") );
// v->setValue("B9600");
}
@@ -139,7 +139,7 @@ SerialPortComponent::~SerialPortComponent()
void SerialPortComponent::dataChanged()
{
#if 0
- QString baudString = dataString("baudRate");
+ TQString baudString = dataString("baudRate");
unsigned baudRate = 0;
if ( baudString == "B0" )
@@ -187,7 +187,7 @@ void SerialPortComponent::dataChanged()
}
-void SerialPortComponent::initPort( const QString & port, unsigned baudRate )
+void SerialPortComponent::initPort( const TQString & port, unsigned baudRate )
{
if ( port.isEmpty() )
{
@@ -197,7 +197,7 @@ void SerialPortComponent::initPort( const QString & port, unsigned baudRate )
if ( ! m_pSerialPort->openPort( port, baudRate ) )
{
- p_itemDocument->canvas()->setMessage( i18n("Could not open port %1").arg( port ) );
+ p_itemDocument->canvas()->setMessage( i18n("Could not open port %1").tqarg( port ) );
return;
}
}
@@ -236,7 +236,7 @@ void SerialPortComponent::rtsCallback( bool isHigh )
}
-void SerialPortComponent::drawShape( QPainter & p )
+void SerialPortComponent::drawShape( TQPainter & p )
{
drawPortShape( p );
}
diff --git a/src/electronics/components/serialportcomponent.h b/src/electronics/components/serialportcomponent.h
index 4f9bc9a..21f2387 100644
--- a/src/electronics/components/serialportcomponent.h
+++ b/src/electronics/components/serialportcomponent.h
@@ -36,9 +36,9 @@ class SerialPortComponent : public CallbackClass, public Component
/**
* @param baudRate as defined in <bits/termios.h>
*/
- void initPort( const QString & port, unsigned baudRate );
+ void initPort( const TQString & port, unsigned baudRate );
virtual void dataChanged();
- virtual void drawShape( QPainter & p );
+ virtual void drawShape( TQPainter & p );
void tdCallback( bool isHigh );
void dtrCallback( bool isHigh );
diff --git a/src/electronics/components/toggleswitch.cpp b/src/electronics/components/toggleswitch.cpp
index 4efe9ab..7c877f9 100644
--- a/src/electronics/components/toggleswitch.cpp
+++ b/src/electronics/components/toggleswitch.cpp
@@ -16,7 +16,7 @@
#include "switch.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
//BEGIN class ECDPDT
Item* ECDPDT::construct( ItemDocument *itemDocument, bool newItem, const char *id )
@@ -27,7 +27,7 @@ Item* ECDPDT::construct( ItemDocument *itemDocument, bool newItem, const char *i
LibraryItem* ECDPDT::libraryItem()
{
return new LibraryItem(
- QString("ec/dpdt_toggle"),
+ TQString("ec/dpdt_toggle"),
i18n("DPDT"),
i18n("Switches"),
"dpdt.png",
@@ -43,7 +43,7 @@ ECDPDT::ECDPDT( ICNDocument *icnDocument, bool newItem, const char *id )
m_desc = i18n("Double-Pole Double-Throw switch.");
setSize( -16, -32, 32, 64 );
- addButton( "button", QRect( -16, 32, 32, 20 ), "", true );
+ addButton( "button", TQRect( -16, 32, 32, 20 ), "", true );
createProperty( "button_text", Variant::Type::String );
property("button_text")->setCaption( i18n("Button Text") );
@@ -90,7 +90,7 @@ void ECDPDT::dataChanged()
}
-void ECDPDT::drawShape( QPainter &p )
+void ECDPDT::drawShape( TQPainter &p )
{
initPainter(p);
@@ -113,7 +113,7 @@ void ECDPDT::drawShape( QPainter &p )
deinitPainter(p);
}
-void ECDPDT::buttonStateChanged( const QString &, bool state )
+void ECDPDT::buttonStateChanged( const TQString &, bool state )
{
pressed = state;
m_switch1->setState( state ? Switch::Open : Switch::Closed );
@@ -133,7 +133,7 @@ Item* ECDPST::construct( ItemDocument *itemDocument, bool newItem, const char *i
LibraryItem* ECDPST::libraryItem()
{
return new LibraryItem(
- QString("ec/dpst_toggle"),
+ TQString("ec/dpst_toggle"),
i18n("DPST"),
i18n("Switches"),
"dpst.png",
@@ -148,7 +148,7 @@ ECDPST::ECDPST( ICNDocument *icnDocument, bool newItem, const char *id )
m_desc = i18n("Double-Pole Single-Throw switch.");
setSize( -16, -16, 32, 32 );
- addButton( "button", QRect( -16, 16, 32, 20 ), "", true );
+ addButton( "button", TQRect( -16, 16, 32, 20 ), "", true );
createProperty( "button_text", Variant::Type::String );
property("button_text")->setCaption( i18n("Button Text") );
@@ -190,7 +190,7 @@ void ECDPST::dataChanged()
}
-void ECDPST::drawShape( QPainter &p )
+void ECDPST::drawShape( TQPainter &p )
{
initPainter(p);
@@ -211,7 +211,7 @@ void ECDPST::drawShape( QPainter &p )
deinitPainter(p);
}
-void ECDPST::buttonStateChanged( const QString &, bool state )
+void ECDPST::buttonStateChanged( const TQString &, bool state )
{
m_switch1->setState( state ? Switch::Closed : Switch::Open );
m_switch2->setState( state ? Switch::Closed : Switch::Open );
@@ -229,7 +229,7 @@ Item* ECSPDT::construct( ItemDocument *itemDocument, bool newItem, const char *i
LibraryItem* ECSPDT::libraryItem()
{
return new LibraryItem(
- QString("ec/spdt_toggle"),
+ TQString("ec/spdt_toggle"),
i18n("SPDT"),
i18n("Switches"),
"spdt.png",
@@ -245,7 +245,7 @@ ECSPDT::ECSPDT( ICNDocument *icnDocument, bool newItem, const char *id )
m_desc = i18n("Single-Pole Double-Throw switch.");
setSize( -16, -16, 32, 32 );
- addButton( "button", QRect( -16, 16, width(), 20 ), "", true );
+ addButton( "button", TQRect( -16, 16, width(), 20 ), "", true );
createProperty( "button_text", Variant::Type::String );
property("button_text")->setCaption( i18n("Button Text") );
@@ -288,7 +288,7 @@ void ECSPDT::dataChanged()
}
-void ECSPDT::drawShape( QPainter &p )
+void ECSPDT::drawShape( TQPainter &p )
{
initPainter(p);
@@ -306,7 +306,7 @@ void ECSPDT::drawShape( QPainter &p )
deinitPainter(p);
}
-void ECSPDT::buttonStateChanged( const QString &, bool state )
+void ECSPDT::buttonStateChanged( const TQString &, bool state )
{
pressed = state;
m_switch1->setState( state ? Switch::Open : Switch::Closed );
@@ -324,7 +324,7 @@ Item* ECSPST::construct( ItemDocument *itemDocument, bool newItem, const char *i
LibraryItem* ECSPST::libraryItem()
{
return new LibraryItem(
- QString("ec/spst_toggle"),
+ TQString("ec/spst_toggle"),
i18n("SPST"),
i18n("Switches"),
"spst.png",
@@ -342,7 +342,7 @@ ECSPST::ECSPST( ICNDocument *icnDocument, bool newItem, const char *id )
setSize( -16, -8, 32, 16 );
pressed = false;
- addButton( "button", QRect( -16, 8, width(), 20 ), "", true );
+ addButton( "button", TQRect( -16, 8, width(), 20 ), "", true );
createProperty( "button_text", Variant::Type::String );
property("button_text")->setCaption( i18n("Button Text") );
@@ -382,7 +382,7 @@ void ECSPST::dataChanged()
}
-void ECSPST::drawShape( QPainter &p )
+void ECSPST::drawShape( TQPainter &p )
{
initPainter(p);
@@ -398,7 +398,7 @@ void ECSPST::drawShape( QPainter &p )
deinitPainter(p);
}
-void ECSPST::buttonStateChanged( const QString &, bool state )
+void ECSPST::buttonStateChanged( const TQString &, bool state )
{
pressed = state;
m_switch->setState( state ? Switch::Closed : Switch::Open );
diff --git a/src/electronics/components/toggleswitch.h b/src/electronics/components/toggleswitch.h
index 80fd064..f6947b0 100644
--- a/src/electronics/components/toggleswitch.h
+++ b/src/electronics/components/toggleswitch.h
@@ -26,12 +26,12 @@ public:
static Item* construct( ItemDocument *itemDocument, bool newItem, const char *id );
static LibraryItem *libraryItem();
- virtual void buttonStateChanged( const QString &id, bool state );
+ virtual void buttonStateChanged( const TQString &id, bool state );
virtual void dataChanged();
virtual bool canFlip() const { return true; }
private:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
Switch *m_switch1;
Switch *m_switch2;
Switch *m_switch3;
@@ -53,12 +53,12 @@ public:
static Item* construct( ItemDocument *itemDocument, bool newItem, const char *id );
static LibraryItem *libraryItem();
- virtual void buttonStateChanged( const QString &id, bool state );
+ virtual void buttonStateChanged( const TQString &id, bool state );
virtual void dataChanged();
virtual bool canFlip() const { return true; }
private:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
Switch *m_switch1;
Switch *m_switch2;
bool pressed;
@@ -78,12 +78,12 @@ public:
static Item* construct( ItemDocument *itemDocument, bool newItem, const char *id );
static LibraryItem *libraryItem();
- virtual void buttonStateChanged( const QString &id, bool state );
+ virtual void buttonStateChanged( const TQString &id, bool state );
virtual void dataChanged();
virtual bool canFlip() const { return true; }
private:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
Switch *m_switch1;
Switch *m_switch2;
bool pressed;
@@ -103,12 +103,12 @@ public:
static Item* construct( ItemDocument *itemDocument, bool newItem, const char *id );
static LibraryItem *libraryItem();
- virtual void buttonStateChanged( const QString &id, bool state );
+ virtual void buttonStateChanged( const TQString &id, bool state );
virtual void dataChanged();
virtual bool canFlip() const { return true; }
private:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
Switch *m_switch;
bool pressed;
};
diff --git a/src/electronics/ecnode.cpp b/src/electronics/ecnode.cpp
index 0fb2801..b4079e8 100644
--- a/src/electronics/ecnode.cpp
+++ b/src/electronics/ecnode.cpp
@@ -16,7 +16,7 @@
#include "pin.h"
#include <kdebug.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <cmath>
@@ -52,7 +52,7 @@ inline int calcLength( const double prop, const double v )
return (v>0) ? -int(vLength*prop) : int(vLength*prop);
}
-ECNode::ECNode( ICNDocument *icnDocument, Node::node_type _type, node_dir dir, const QPoint &pos, QString *_id )
+ECNode::ECNode( ICNDocument *icnDocument, Node::node_type _type, node_dir dir, const TQPoint &pos, TQString *_id )
: Node( icnDocument, _type, dir, pos, _id )
{
m_prevV = 0;
@@ -64,9 +64,9 @@ ECNode::ECNode( ICNDocument *icnDocument, Node::node_type _type, node_dir dir, c
if ( type() == ec_pin )
{
- m_pinPoint = new QCanvasRectangle( 0, 0, 3, 3, canvas() );
- m_pinPoint->setBrush(Qt::black);
- m_pinPoint->setPen(Qt::black);
+ m_pinPoint = new TQCanvasRectangle( 0, 0, 3, 3, canvas() );
+ m_pinPoint->setBrush(TQt::black);
+ m_pinPoint->setPen(TQt::black);
}
m_pins.resize(1);
@@ -123,7 +123,7 @@ void ECNode::setNodeChanged()
if ( v != m_prevV || i != m_prevI )
{
- QRect r = boundingRect();
+ TQRect r = boundingRect();
r.setCoords( r.left()+(r.width()/2)-1, r.top()+(r.height()/2)-1, r.right()-(r.width()/2)+1, r.bottom()-(r.height()/2)+1 );
canvas()->setChanged(r);
m_prevV = v;
@@ -132,14 +132,14 @@ void ECNode::setNodeChanged()
}
-void ECNode::setParentItem( CNItem * parentItem )
+void ECNode::setParentItem( CNItem * tqparentItem )
{
- Node::setParentItem(parentItem);
+ Node::setParentItem(tqparentItem);
- if ( Component * component = dynamic_cast<Component*>(parentItem) )
+ if ( Component * component = dynamic_cast<Component*>(tqparentItem) )
{
- connect( component, SIGNAL(elementDestroyed(Element* )), this, SLOT(removeElement(Element* )) );
- connect( component, SIGNAL(switchDestroyed( Switch* )), this, SLOT(removeSwitch( Switch* )) );
+ connect( component, TQT_SIGNAL(elementDestroyed(Element* )), this, TQT_SLOT(removeElement(Element* )) );
+ connect( component, TQT_SIGNAL(switchDestroyed( Switch* )), this, TQT_SLOT(removeSwitch( Switch* )) );
}
}
@@ -158,7 +158,7 @@ void ECNode::removeSwitch( Switch * sw )
}
-void ECNode::drawShape( QPainter &p )
+void ECNode::drawShape( TQPainter &p )
{
const int _x = int(x());
const int _y = int(y());
@@ -174,8 +174,8 @@ void ECNode::drawShape( QPainter &p )
if (m_pinPoint)
{
bool drawDivPoint;
- QPoint divPoint = findConnectorDivergePoint(&drawDivPoint);
- m_pinPoint->setVisible(drawDivPoint);
+ TQPoint divPoint = findConnectorDivergePoint(&drawDivPoint);
+ m_pinPoint->tqsetVisible(drawDivPoint);
m_pinPoint->move( divPoint.x()-1, divPoint.y()-1 );
}
@@ -191,17 +191,17 @@ void ECNode::drawShape( QPainter &p )
{
// we can assume that v != 0 as length != 0
- QPen oldPen = p.pen();
+ TQPen oldPen = p.pen();
double i = pin()->current();
double iProp = calcIProp(i);
int thickness = calcThickness(iProp);
if ( v > 0 )
- p.setPen( QPen( QColor( 255, 166, 0 ), thickness ) );
+ p.setPen( TQPen( TQColor( 255, 166, 0 ), thickness ) );
else
- p.setPen( QPen( QColor( 0, 136, 255 ), thickness ) );
+ p.setPen( TQPen( TQColor( 0, 136, 255 ), thickness ) );
// The node line (drawn at the end of this function) will overdraw
// some of the voltage bar, so we need to adapt the length
@@ -226,7 +226,7 @@ void ECNode::drawShape( QPainter &p )
}
}
- QPen pen( p.pen() );
+ TQPen pen( p.pen() );
pen.setWidth( (numPins() > 1) ? 2 : 1 );
p.setPen(pen);
diff --git a/src/electronics/ecnode.h b/src/electronics/ecnode.h
index 6f8f36e..24d34e4 100644
--- a/src/electronics/ecnode.h
+++ b/src/electronics/ecnode.h
@@ -13,17 +13,17 @@
#include "node.h"
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
class ECNode;
class Element;
class Pin;
class Switch;
-class QTimer;
+class TQTimer;
-typedef QValueList<ECNode*> ECNodeList;
-typedef QValueList<Element*> ElementList;
-typedef QValueVector<Pin*> PinVector;
+typedef TQValueList<ECNode*> ECNodeList;
+typedef TQValueList<Element*> ElementList;
+typedef TQValueVector<Pin*> PinVector;
/**
@short Electrical node with voltage / current / etc properties
@@ -32,12 +32,13 @@ typedef QValueVector<Pin*> PinVector;
class ECNode : public Node
{
Q_OBJECT
+ TQ_OBJECT
public:
- ECNode( ICNDocument *icnDocument, Node::node_type type, node_dir dir, const QPoint &pos, QString *id = 0L );
+ ECNode( ICNDocument *icnDocument, Node::node_type type, node_dir dir, const TQPoint &pos, TQString *id = 0L );
~ECNode();
- virtual void setParentItem( CNItem *parentItem );
- virtual void drawShape( QPainter &p );
+ virtual void setParentItem( CNItem *tqparentItem );
+ virtual void drawShape( TQPainter &p );
/**
* Set the number of pins "contained" in this node.
*/
@@ -64,7 +65,7 @@ class ECNode : public Node
bool m_bShowVoltageBars;
double m_prevV;
double m_prevI;
- QCanvasRectangle * m_pinPoint;
+ TQCanvasRectangle * m_pinPoint;
PinVector m_pins;
};
diff --git a/src/electronics/gpsimprocessor.cpp b/src/electronics/gpsimprocessor.cpp
index 1a3b862..efa3d88 100644
--- a/src/electronics/gpsimprocessor.cpp
+++ b/src/electronics/gpsimprocessor.cpp
@@ -28,9 +28,9 @@
#include <kmessagebox.h>
#include <ktempfile.h>
#include <kstandarddirs.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
#include "gpsim/cod.h"
#include "gpsim/interface.h"
@@ -60,9 +60,9 @@ Work around a bug in gpsim: the directory in a filename is recorded twice, e.g.
"/home/david/afile.asm" is recorded as "/home/david//home/david/afile.asm". This
function will remove the duplicated directory path (by searching for a "//").
*/
-QString sanitizeGpsimFile( QString file )
+TQString sanitizeGpsimFile( TQString file )
{
- int pos = file.find("//");
+ int pos = file.tqfind("//");
if ( pos != -1 )
{
file.remove( 0, pos + 1 );
@@ -71,8 +71,8 @@ QString sanitizeGpsimFile( QString file )
}
-GpsimProcessor::GpsimProcessor( QString symbolFile, QObject *parent )
- : QObject(parent),
+GpsimProcessor::GpsimProcessor( TQString symbolFile, TQObject *tqparent )
+ : TQObject(tqparent),
m_symbolFile(symbolFile)
{
if (!bDoneGpsimInit)
@@ -89,7 +89,7 @@ GpsimProcessor::GpsimProcessor( QString symbolFile, QObject *parent )
m_bCanExecuteNextCycle = true;
m_bIsRunning = false;
m_pPicProcessor = 0l;
- m_codLoadStatus = CodUnknown;
+ m_codLoadtqStatus = CodUnknown;
m_pRegisterMemory = 0l;
m_debugMode = GpsimDebugger::AsmDebugger;
m_pDebugger[0] = m_pDebugger[1] = 0l;
@@ -101,37 +101,37 @@ GpsimProcessor::GpsimProcessor( QString symbolFile, QObject *parent )
switch ( (cod_errors)load_symbol_file( &tempProcessor, fileName ) )
{
case COD_SUCCESS:
- m_codLoadStatus = CodSuccess;
+ m_codLoadtqStatus = CodSuccess;
break;
case COD_FILE_NOT_FOUND:
- m_codLoadStatus = CodFileNotFound;
+ m_codLoadtqStatus = CodFileNotFound;
break;
case COD_UNRECOGNIZED_PROCESSOR:
- m_codLoadStatus = CodUnrecognizedProcessor;
+ m_codLoadtqStatus = CodUnrecognizedProcessor;
break;
case COD_FILE_NAME_TOO_LONG:
- m_codLoadStatus = CodFileNameTooLong;
+ m_codLoadtqStatus = CodFileNameTooLong;
break;
case COD_LST_NOT_FOUND:
- m_codLoadStatus = CodLstNotFound;
+ m_codLoadtqStatus = CodLstNotFound;
break;
case COD_BAD_FILE:
- m_codLoadStatus = CodBadFile;
+ m_codLoadtqStatus = CodBadFile;
break;
default:
- m_codLoadStatus = CodUnknown;
+ m_codLoadtqStatus = CodUnknown;
}
#else // GPSIM_0_21_11+
FILE * pFile = fopen( fileName, "r" );
if ( !pFile )
- m_codLoadStatus = CodFileUnreadable;
+ m_codLoadtqStatus = CodFileUnreadable;
else
- m_codLoadStatus = ( ProgramFileTypeList::GetList().LoadProgramFile( & tempProcessor, fileName, pFile ) ) ? CodSuccess : CodFailure;
+ m_codLoadtqStatus = ( ProgramFileTypeList::GetList().LoadProgramFile( & tempProcessor, fileName, pFile ) ) ? CodSuccess : CodFailure;
#endif
m_pPicProcessor = dynamic_cast<pic_processor*>(tempProcessor);
- if ( codLoadStatus() == CodSuccess )
+ if ( codLoadtqStatus() == CodSuccess )
{
m_pRegisterMemory = new RegisterSet( m_pPicProcessor );
m_pDebugger[0] = new GpsimDebugger( GpsimDebugger::AsmDebugger, this );
@@ -154,33 +154,33 @@ GpsimProcessor::~GpsimProcessor()
}
-void GpsimProcessor::displayCodLoadStatus( )
+void GpsimProcessor::displayCodLoadtqStatus( )
{
- switch (m_codLoadStatus)
+ switch (m_codLoadtqStatus)
{
case CodSuccess:
break;
case CodFileNotFound:
- KMessageBox::sorry( 0l, i18n("The cod file \"%1\" was not found.").arg(m_symbolFile), i18n("File Not Found") );
+ KMessageBox::sorry( 0l, i18n("The cod file \"%1\" was not found.").tqarg(m_symbolFile), i18n("File Not Found") );
break;
case CodUnrecognizedProcessor:
- KMessageBox::sorry( 0l, i18n("The processor for cod file \"%1\" is unrecognized.").arg(m_symbolFile), i18n("Unrecognized Processor") );
+ KMessageBox::sorry( 0l, i18n("The processor for cod file \"%1\" is unrecognized.").tqarg(m_symbolFile), i18n("Unrecognized Processor") );
break;
case CodFileNameTooLong:
- KMessageBox::sorry( 0l, i18n("The file name \"%1\" is too long.").arg(m_symbolFile), i18n("Filename Too Long") );
+ KMessageBox::sorry( 0l, i18n("The file name \"%1\" is too long.").tqarg(m_symbolFile), i18n("Filename Too Long") );
break;
case CodLstNotFound:
- KMessageBox::sorry( 0l, i18n("The lst file associated with the cod file \"%1\" was not found.").arg(m_symbolFile), i18n("LST File Not Found") );
+ KMessageBox::sorry( 0l, i18n("The lst file associated with the cod file \"%1\" was not found.").tqarg(m_symbolFile), i18n("LST File Not Found") );
break;
case CodBadFile:
- KMessageBox::sorry( 0l, i18n("The cod file \"%1\" is bad.").arg(m_symbolFile), i18n("Bad File") );
+ KMessageBox::sorry( 0l, i18n("The cod file \"%1\" is bad.").tqarg(m_symbolFile), i18n("Bad File") );
break;
case CodFileUnreadable:
- KMessageBox::sorry( 0l, i18n("The cod file \"%1\" could not be read from.").arg(m_symbolFile), i18n("Unreadable File") );
+ KMessageBox::sorry( 0l, i18n("The cod file \"%1\" could not be read from.").tqarg(m_symbolFile), i18n("Unreadable File") );
break;
case CodFailure:
case CodUnknown:
- KMessageBox::sorry( 0l, i18n("An error occured with the cod file \"%1\".").arg(m_symbolFile), i18n("Error") );
+ KMessageBox::sorry( 0l, i18n("An error occured with the cod file \"%1\".").tqarg(m_symbolFile), i18n("Error") );
break;
}
}
@@ -192,9 +192,9 @@ unsigned GpsimProcessor::programMemorySize() const
}
-QStringList GpsimProcessor::sourceFileList()
+TQStringList GpsimProcessor::sourceFileList()
{
- QStringList files;
+ TQStringList files;
// Work around nasty bug in gpsim 0.21.4 where nsrc_files value might be used uninitiazed
int max = m_pPicProcessor->files.nsrc_files();
@@ -299,12 +299,12 @@ int GpsimProcessor::operandLiteral( unsigned address )
}
-GpsimProcessor::ProgramFileValidity GpsimProcessor::isValidProgramFile( const QString & programFile )
+GpsimProcessor::ProgramFileValidity GpsimProcessor::isValidProgramFile( const TQString & programFile )
{
if ( !KStandardDirs::exists(programFile) )
return DoesntExist;
- QString extension = programFile.right( programFile.length() - programFile.findRev('.') - 1 ).lower();
+ TQString extension = programFile.right( programFile.length() - programFile.tqfindRev('.') - 1 ).lower();
if ( extension == "flowcode" ||
extension == "asm" ||
@@ -313,40 +313,40 @@ GpsimProcessor::ProgramFileValidity GpsimProcessor::isValidProgramFile( const QS
extension == "c" )
return Valid;
- if ( extension == "hex" && QFile::exists( QString(programFile).replace(".hex",".cod") ) )
+ if ( extension == "hex" && TQFile::exists( TQString(programFile).tqreplace(".hex",".cod") ) )
return Valid;
return IncorrectType;
}
-QString GpsimProcessor::generateSymbolFile( const QString &fileName, QObject *receiver, const char *successMember, const char * failMember )
+TQString GpsimProcessor::generateSymbolFile( const TQString &fileName, TQObject *receiver, const char *successMember, const char * failMember )
{
if ( !isValidProgramFile(fileName) )
- return QString::null;
+ return TQString();
- QString extension = fileName.right( fileName.length() - fileName.findRev('.') - 1 ).lower();
+ TQString extension = fileName.right( fileName.length() - fileName.tqfindRev('.') - 1 ).lower();
if ( extension == "cod" )
{
- QTimer::singleShot( 0, receiver, successMember );
+ TQTimer::singleShot( 0, receiver, successMember );
return fileName;
}
if ( extension == "hex" )
{
- QTimer::singleShot( 0, receiver, successMember );
+ TQTimer::singleShot( 0, receiver, successMember );
// We've already checked for the existance of the ".cod" file in GpsimProcessor::isValidProgramFile
- return QString(fileName).replace(".hex",".cod");
+ return TQString(fileName).tqreplace(".hex",".cod");
}
else if ( extension == "basic" || extension == "microbe" )
{
compileMicrobe( fileName, receiver, successMember, failMember );
- return QString(fileName).replace( "."+extension, ".cod" );
+ return TQString(fileName).tqreplace( "."+extension, ".cod" );
}
else if ( extension == "flowcode" )
{
- const QString hexFile = KTempFile( QString::null, ".hex" ).name();
+ const TQString hexFile = KTempFile( TQString(), ".hex" ).name();
ProcessOptions o;
o.b_addToProject = false;
@@ -359,18 +359,18 @@ QString GpsimProcessor::generateSymbolFile( const QString &fileName, QObject *re
if (receiver)
{
if (successMember)
- connect( pc, SIGNAL(successful()), receiver, successMember );
+ connect( pc, TQT_SIGNAL(successful()), receiver, successMember );
if (failMember)
- connect( pc, SIGNAL(failed()), receiver, failMember );
+ connect( pc, TQT_SIGNAL(failed()), receiver, failMember );
}
- return QString(hexFile).replace( ".hex", ".cod" );
+ return TQString(hexFile).tqreplace( ".hex", ".cod" );
}
else if ( extension == "asm" )
{
ProcessOptions o;
o.b_addToProject = false;
- o.setTargetFile( QString(fileName).replace(".asm",".hex"));
+ o.setTargetFile( TQString(fileName).tqreplace(".asm",".hex"));
o.setInputFiles(fileName);
o.setMethod( ProcessOptions::Method::Forget );
o.setProcessPath( ProcessOptions::ProcessPath::path( ProcessOptions::guessMediaType(fileName), ProcessOptions::ProcessPath::Program ) );
@@ -379,18 +379,18 @@ QString GpsimProcessor::generateSymbolFile( const QString &fileName, QObject *re
if (receiver)
{
if (successMember)
- connect( pc, SIGNAL(successful()), receiver, successMember );
+ connect( pc, TQT_SIGNAL(successful()), receiver, successMember );
if (failMember)
- connect( pc, SIGNAL(failed()), receiver, failMember );
+ connect( pc, TQT_SIGNAL(failed()), receiver, failMember );
}
- return QString(fileName).replace(".asm",".cod");
+ return TQString(fileName).tqreplace(".asm",".cod");
}
else if ( extension == "c" )
{
ProcessOptions o;
o.b_addToProject = false;
- o.setTargetFile( QString(fileName).replace(".c",".hex"));
+ o.setTargetFile( TQString(fileName).tqreplace(".c",".hex"));
o.setInputFiles(fileName);
o.setMethod( ProcessOptions::Method::Forget );
o.setProcessPath( ProcessOptions::ProcessPath::C_Program );
@@ -399,25 +399,25 @@ QString GpsimProcessor::generateSymbolFile( const QString &fileName, QObject *re
if (receiver)
{
if (successMember)
- connect( pc, SIGNAL(successful()), receiver, successMember );
+ connect( pc, TQT_SIGNAL(successful()), receiver, successMember );
if (failMember)
- connect( pc, SIGNAL(failed()), receiver, failMember );
+ connect( pc, TQT_SIGNAL(failed()), receiver, failMember );
}
- return QString(fileName).replace(".c",".cod");
+ return TQString(fileName).tqreplace(".c",".cod");
}
if ( failMember )
- QTimer::singleShot( 0, receiver, failMember );
- return QString::null;
+ TQTimer::singleShot( 0, receiver, failMember );
+ return TQString();
}
-void GpsimProcessor::compileMicrobe( const QString &filename, QObject *receiver, const char * successMember, const char * failMember )
+void GpsimProcessor::compileMicrobe( const TQString &filename, TQObject *receiver, const char * successMember, const char * failMember )
{
ProcessOptions o;
o.b_addToProject = false;
- o.setTargetFile( QString(filename).replace(".microbe",".hex") );
+ o.setTargetFile( TQString(filename).tqreplace(".microbe",".hex") );
o.setInputFiles(filename);
o.setMethod( ProcessOptions::Method::Forget );
o.setProcessPath( ProcessOptions::ProcessPath::Microbe_Program );
@@ -425,9 +425,9 @@ void GpsimProcessor::compileMicrobe( const QString &filename, QObject *receiver,
if (receiver)
{
if (successMember)
- connect( pc, SIGNAL(successful()), receiver, successMember );
+ connect( pc, TQT_SIGNAL(successful()), receiver, successMember );
if (failMember)
- connect( pc, SIGNAL(failed()), receiver, failMember );
+ connect( pc, TQT_SIGNAL(failed()), receiver, failMember );
}
}
//END class GpsimProcessor
@@ -436,7 +436,7 @@ void GpsimProcessor::compileMicrobe( const QString &filename, QObject *receiver,
//BEGIN class GpsimDebugger
GpsimDebugger::GpsimDebugger( Type type, GpsimProcessor * gpsim )
- : QObject()
+ : TQObject()
{
m_pGpsim = gpsim;
m_type = type;
@@ -445,13 +445,13 @@ GpsimDebugger::GpsimDebugger( Type type, GpsimProcessor * gpsim )
m_stackLevelLowerBreak = -1;
m_addressSize = 0;
- connect( m_pGpsim, SIGNAL(runningStatusChanged(bool )), this, SLOT(gpsimRunningStatusChanged(bool )) );
+ connect( m_pGpsim, TQT_SIGNAL(runningStatusChanged(bool )), this, TQT_SLOT(gpsimRunningStatusChanged(bool )) );
if ( type == HLLDebugger )
{
- const QStringList sourceFileList = m_pGpsim->sourceFileList();
- QStringList::const_iterator sflEnd = sourceFileList.end();
- for ( QStringList::const_iterator it = sourceFileList.begin(); it != sflEnd; ++it )
+ const TQStringList sourceFileList = m_pGpsim->sourceFileList();
+ TQStringList::const_iterator sflEnd = sourceFileList.end();
+ for ( TQStringList::const_iterator it = sourceFileList.begin(); it != sflEnd; ++it )
{
AsmParser p(*it);
p.parse(this);
@@ -464,7 +464,7 @@ GpsimDebugger::GpsimDebugger( Type type, GpsimProcessor * gpsim )
GpsimDebugger::~GpsimDebugger()
{
- QValueList<DebugLine*> debugLinesToDelete;
+ TQValueList<DebugLine*> debugLinesToDelete;
for ( unsigned i = 0; i < m_addressSize; ++i )
{
@@ -476,8 +476,8 @@ GpsimDebugger::~GpsimDebugger()
debugLinesToDelete += dl;
}
- const QValueList<DebugLine*>::iterator end = debugLinesToDelete.end();
- for ( QValueList<DebugLine*>::iterator it = debugLinesToDelete.begin(); it != end; ++it )
+ const TQValueList<DebugLine*>::iterator end = debugLinesToDelete.end();
+ for ( TQValueList<DebugLine*>::iterator it = debugLinesToDelete.begin(); it != end; ++it )
delete *it;
delete [] m_addressToLineMap;
@@ -495,7 +495,7 @@ void GpsimDebugger::gpsimRunningStatusChanged( bool isRunning )
}
-void GpsimDebugger::associateLine( const QString & sourceFile, int sourceLine, const QString & assemblyFile, int assemblyLine )
+void GpsimDebugger::associateLine( const TQString & sourceFile, int sourceLine, const TQString & assemblyFile, int assemblyLine )
{
if ( assemblyLine < 0 || sourceLine < 0 )
{
@@ -506,7 +506,7 @@ void GpsimDebugger::associateLine( const QString & sourceFile, int sourceLine, c
SourceLine hllSource = SourceLine( sourceFile, sourceLine );
SourceLine asmSource = SourceLine( assemblyFile, assemblyLine );
- if ( m_sourceLineMap.contains(asmSource) )
+ if ( m_sourceLineMap.tqcontains(asmSource) )
{
kdWarning() << k_funcinfo << "Already have an association for assembly (\""<<assemblyFile<<"\","<<assemblyLine<<")"<<endl;
return;
@@ -546,7 +546,7 @@ void GpsimDebugger::initAddressToLineMap()
int asmToLine = ((next == slmEnd) || (next.key().fileName() != it.key().fileName())) ? -1 : next.key().line() - 1;
- QString asmFile = it.key().fileName();
+ TQString asmFile = it.key().fileName();
int asmFromLine = it.key().line();
SourceLine sourceLine = it.data();
@@ -592,7 +592,7 @@ void GpsimDebugger::initAddressToLineMap()
}
-void GpsimDebugger::setBreakpoints( const QString & path, const IntList & lines )
+void GpsimDebugger::setBreakpoints( const TQString & path, const IntList & lines )
{
for ( unsigned i = 0; i < m_addressSize; i++ )
{
@@ -600,12 +600,12 @@ void GpsimDebugger::setBreakpoints( const QString & path, const IntList & lines
if ( !dl || dl->fileName() != path )
continue;
- dl->setBreakpoint( lines.contains( dl->line() ) );
+ dl->setBreakpoint( lines.tqcontains( dl->line() ) );
}
}
-void GpsimDebugger::setBreakpoint( const QString & path, int line, bool isBreakpoint )
+void GpsimDebugger::setBreakpoint( const TQString & path, int line, bool isBreakpoint )
{
for ( unsigned i = 0; i < m_addressSize; i++ )
{
@@ -659,7 +659,7 @@ void GpsimDebugger::checkForBreak()
}
-int GpsimDebugger::programAddress( const QString & path, int line )
+int GpsimDebugger::programAddress( const TQString & path, int line )
{
for ( unsigned i = 0; i < m_addressSize; ++i )
{
@@ -755,13 +755,13 @@ RegisterInfo * RegisterSet::fromAddress( unsigned address )
}
-RegisterInfo * RegisterSet::fromName( const QString & name )
+RegisterInfo * RegisterSet::fromName( const TQString & name )
{
// First try the name as case sensitive, then as case insensitive.
- if ( m_nameToRegisterMap.contains( name ) )
+ if ( m_nameToRegisterMap.tqcontains( name ) )
return m_nameToRegisterMap[ name ];
- QString nameLower = name.lower();
+ TQString nameLower = name.lower();
RegisterInfoMap::iterator end = m_nameToRegisterMap.end();
for ( RegisterInfoMap::iterator it = m_nameToRegisterMap.begin(); it != end; ++ it )
@@ -831,7 +831,7 @@ void RegisterInfo::update()
}
-QString RegisterInfo::toString( RegisterType type )
+TQString RegisterInfo::toString( RegisterType type )
{
switch ( type )
{
@@ -858,7 +858,7 @@ QString RegisterInfo::toString( RegisterType type )
//BEGIN class DebugLine
-DebugLine::DebugLine( const QString & fileName, int line )
+DebugLine::DebugLine( const TQString & fileName, int line )
: SourceLine( fileName, line )
{
m_bIsBreakpoint = false;
diff --git a/src/electronics/gpsimprocessor.h b/src/electronics/gpsimprocessor.h
index 0650fd9..0259889 100644
--- a/src/electronics/gpsimprocessor.h
+++ b/src/electronics/gpsimprocessor.h
@@ -16,10 +16,10 @@
#include "sourceline.h"
-#include <qmap.h>
-#include <qvaluevector.h>
-#include <qobject.h>
-#include <qvaluelist.h>
+#include <tqmap.h>
+#include <tqvaluevector.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
class DebugLine;
class GpsimProcessor;
@@ -28,16 +28,16 @@ class pic_processor; // from gpsim
class Register;
class RegisterMemoryAccess;
-typedef QMap<SourceLine, SourceLine> SourceLineMap;
-typedef QMap<int, QString> QStringMap;
-typedef QValueList<int> IntList;
+typedef TQMap<SourceLine, SourceLine> SourceLineMap;
+typedef TQMap<int, TQString> TQStringMap;
+typedef TQValueList<int> IntList;
class DebugLine : public SourceLine
{
public:
DebugLine();
- DebugLine( const QString & fileName, int line );
+ DebugLine( const TQString & fileName, int line );
/**
* Whether or not to break when we reach this line.
*/
@@ -69,9 +69,10 @@ class DebugLine : public SourceLine
@short Stores info from gpsim register, used to hide gpsim interface
@author David Saxton
*/
-class RegisterInfo : public QObject
+class RegisterInfo : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
RegisterInfo( Register * reg );
@@ -85,9 +86,9 @@ class RegisterInfo : public QObject
};
RegisterType type() const { return m_type; }
- QString name() const { return m_name; }
+ TQString name() const { return m_name; }
unsigned value() const;
- static QString toString( RegisterType type );
+ static TQString toString( RegisterType type );
/**
* Checks to see if the value has changed; if so, emit new value.
@@ -98,7 +99,7 @@ class RegisterInfo : public QObject
void valueChanged( unsigned newValue );
protected:
- QString m_name;
+ TQString m_name;
RegisterType m_type;
Register * m_pRegister;
unsigned m_prevEmitValue;
@@ -125,22 +126,23 @@ class RegisterSet
unsigned size() const { return m_registers.size(); }
RegisterInfo * fromAddress( unsigned address );
- RegisterInfo * fromName( const QString & name );
+ RegisterInfo * fromName( const TQString & name );
protected:
- typedef QMap< QString, RegisterInfo * > RegisterInfoMap;
+ typedef TQMap< TQString, RegisterInfo * > RegisterInfoMap;
RegisterInfoMap m_nameToRegisterMap;
- QValueVector< RegisterInfo * > m_registers;
+ TQValueVector< RegisterInfo * > m_registers;
};
/**
@author David Saxton
*/
-class GpsimDebugger : public QObject
+class GpsimDebugger : public TQObject
{
friend class GpsimProcessor;
Q_OBJECT
+ TQ_OBJECT
public:
enum Type
@@ -161,7 +163,7 @@ class GpsimDebugger : public QObject
* matches up the assembly file lines with the associated source file
* lines.
*/
- void associateLine( const QString & sourceFile, int sourceLine, const QString & assemblyFile, int assemblyLine );
+ void associateLine( const TQString & sourceFile, int sourceLine, const TQString & assemblyFile, int assemblyLine );
/**
* Check to see if we've hit a breakpoint or similar; if so, this
* function will stop the execution of the PIC program.
@@ -173,11 +175,11 @@ class GpsimDebugger : public QObject
* affected.
* @param path the location of the file (which gpsim must recognise).
*/
- void setBreakpoints( const QString & path, const IntList & lines );
+ void setBreakpoints( const TQString & path, const IntList & lines );
/**
* Sets / removes the breakpoint at the given line
*/
- void setBreakpoint( const QString & path, int line, bool isBreakpoint );
+ void setBreakpoint( const TQString & path, int line, bool isBreakpoint );
/**
* Returns the current source line that gpsim is at. By default, this
* will be the corresponding assembly line. That can be overwritten
@@ -192,7 +194,7 @@ class GpsimDebugger : public QObject
* @return the program address for the given line (or -1 if no such
* line).
*/
- int programAddress( const QString & path, int line );
+ int programAddress( const TQString & path, int line );
/**
* Step into the next program line.
*/
@@ -241,24 +243,25 @@ class GpsimDebugger : public QObject
/**
@author David Saxton
*/
-class GpsimProcessor : public QObject
+class GpsimProcessor : public TQObject
{
friend class GpsimDebugger;
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Create a new gpsim processor. After calling this constructor, you
- * should always call codLoadStatus() to ensure that the cod file was
+ * should always call codLoadtqStatus() to ensure that the cod file was
* loaded successfully.
*/
- GpsimProcessor( QString symbolFile, QObject *parent = 0 );
+ GpsimProcessor( TQString symbolFile, TQObject *tqparent = 0 );
~GpsimProcessor();
void setDebugMode( GpsimDebugger::Type mode ) { m_debugMode = mode; }
GpsimDebugger * currentDebugger() const { return m_pDebugger[m_debugMode]; }
- enum CodLoadStatus
+ enum CodLoadtqStatus
{
CodSuccess,
CodFileNotFound,
@@ -281,18 +284,18 @@ class GpsimProcessor : public QObject
/**
* @return status of opening the COD file
- * @see displayCodLoadStatus
+ * @see displayCodLoadtqStatus
*/
- CodLoadStatus codLoadStatus() const { return m_codLoadStatus; }
+ CodLoadtqStatus codLoadtqStatus() const { return m_codLoadtqStatus; }
/**
- * Popups a messagebox to the user according to the CodLoadStatus. Will
- * only popup a messagebox if the CodLoadStatus wasn't CodSuccess.
+ * Popups a messagebox to the user according to the CodLoadtqStatus. Will
+ * only popup a messagebox if the CodLoadtqStatus wasn't CodSuccess.
*/
- void displayCodLoadStatus();
+ void displayCodLoadtqStatus();
/**
* Returns a list of source files for the currently running program.
*/
- QStringList sourceFileList();
+ TQStringList sourceFileList();
/**
* Set whether or not to run gpsim. (i.e. whether or not the step
* function should do anything when called with force=false).
@@ -340,21 +343,21 @@ class GpsimProcessor : public QObject
/**
* @return information on the validity of the given program file (either
* DoesntExist, IncorrectType, or Valid).
- * @see static QString generateSymbolFile
+ * @see static TQString generateSymbolFile
*/
- static ProgramFileValidity isValidProgramFile( const QString & programFile );
+ static ProgramFileValidity isValidProgramFile( const TQString & programFile );
/**
* Converts the file at programFile to a Symbol file for emulation,
* and returns that symbol file's path
* @param programFile The full url to the file
* @param assembled The slot to connect the assembled signal to
- * @see static bool isValidProgramFile( const QString &programFile )
+ * @see static bool isValidProgramFile( const TQString &programFile )
*/
- static QString generateSymbolFile( const QString &fileName, QObject *receiver, const char *successMember, const char * failMember = 0l );
+ static TQString generateSymbolFile( const TQString &fileName, TQObject *receiver, const char *successMember, const char * failMember = 0l );
/**
*Compile microbe to output to the given filename
*/
- static void compileMicrobe( const QString &filename, QObject *receiver, const char * successMember, const char * failMember = 0l );
+ static void compileMicrobe( const TQString &filename, TQObject *receiver, const char * successMember, const char * failMember = 0l );
//END convenience functions for PIC files
signals:
@@ -370,8 +373,8 @@ class GpsimProcessor : public QObject
void emitLineReached();
pic_processor * m_pPicProcessor;
- CodLoadStatus m_codLoadStatus;
- const QString m_symbolFile;
+ CodLoadtqStatus m_codLoadtqStatus;
+ const TQString m_symbolFile;
RegisterSet * m_pRegisterMemory;
GpsimDebugger::Type m_debugMode;
GpsimDebugger * m_pDebugger[2]; // Asm, HLL
diff --git a/src/electronics/pin.cpp b/src/electronics/pin.cpp
index 56848fc..f9a08d8 100644
--- a/src/electronics/pin.cpp
+++ b/src/electronics/pin.cpp
@@ -13,10 +13,10 @@
#include <assert.h>
#include <kdebug.h>
-Pin::Pin( ECNode * parent )
+Pin::Pin( ECNode * tqparent )
{
- assert(parent);
- m_pECNode = parent;
+ assert(tqparent);
+ m_pECNode = tqparent;
m_voltage = 0.;
m_current = 0.;
m_eqId = -2;
@@ -70,7 +70,7 @@ void Pin::setSwitchConnected( Pin * pin, bool isConnected )
if (isConnected)
{
- if ( !m_switchConnectedPins.contains(pin) )
+ if ( !m_switchConnectedPins.tqcontains(pin) )
m_switchConnectedPins.append(pin);
}
else
@@ -80,14 +80,14 @@ void Pin::setSwitchConnected( Pin * pin, bool isConnected )
void Pin::addCircuitDependentPin( Pin * pin )
{
- if ( pin && !m_circuitDependentPins.contains(pin) )
+ if ( pin && !m_circuitDependentPins.tqcontains(pin) )
m_circuitDependentPins.append(pin);
}
void Pin::addGroundDependentPin( Pin * pin )
{
- if ( pin && !m_groundDependentPins.contains(pin) )
+ if ( pin && !m_groundDependentPins.tqcontains(pin) )
m_groundDependentPins.append(pin);
}
@@ -101,7 +101,7 @@ void Pin::removeDependentPins()
void Pin::addElement( Element * e )
{
- if ( !e || m_elementList.contains(e) )
+ if ( !e || m_elementList.tqcontains(e) )
return;
m_elementList.append(e);
}
@@ -115,7 +115,7 @@ void Pin::removeElement( Element * e )
void Pin::addSwitch( Switch * sw )
{
- if ( !sw || m_switchList.contains( sw ) )
+ if ( !sw || m_switchList.tqcontains( sw ) )
return;
m_switchList << sw;
}
@@ -129,14 +129,14 @@ void Pin::removeSwitch( Switch * sw )
void Pin::addInputWire( Wire * wire )
{
- if ( wire && !m_inputWireList.contains(wire) )
+ if ( wire && !m_inputWireList.tqcontains(wire) )
m_inputWireList << wire;
}
void Pin::addOutputWire( Wire * wire )
{
- if ( wire && !m_outputWireList.contains(wire) )
+ if ( wire && !m_outputWireList.tqcontains(wire) )
m_outputWireList << wire;
}
diff --git a/src/electronics/pin.h b/src/electronics/pin.h
index 1e10663..95aad7c 100644
--- a/src/electronics/pin.h
+++ b/src/electronics/pin.h
@@ -13,9 +13,9 @@
#include "wire.h"
-#include <qguardedptr.h>
-#include <qobject.h>
-#include <qvaluelist.h>
+#include <tqguardedptr.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
class ECNode;
class Element;
@@ -23,16 +23,16 @@ class Pin;
class Switch;
class Wire;
-typedef QValueList<Element*> ElementList;
-typedef QValueList<QGuardedPtr<Pin> > PinList;
-typedef QValueList<Switch*> SwitchList;
-typedef QValueList<QGuardedPtr<Wire> > WireList;
+typedef TQValueList<Element*> ElementList;
+typedef TQValueList<TQGuardedPtr<Pin> > PinList;
+typedef TQValueList<Switch*> SwitchList;
+typedef TQValueList<TQGuardedPtr<Wire> > WireList;
/**
@author David Saxton
*/
-class Pin : public QObject
+class Pin : public TQObject
{
public:
/**
@@ -53,10 +53,10 @@ class Pin : public QObject
gt_low = 15, // current sources
gt_never = 20 // everything else
};
- Pin( ECNode * parent );
+ Pin( ECNode * tqparent );
~Pin();
- ECNode * parentECNode() const { return m_pECNode; }
+ ECNode * tqparentECNode() const { return m_pECNode; }
/**
* This function returns the pins that are directly connected to this pins:
* either at the ends of connected wires, or via switches.
@@ -143,12 +143,12 @@ class Pin : public QObject
void removeDependentPins();
/**
* Returns the ids of the pins whose voltages will affect this pin.
- * @see void setDependentPins( QStringList ids )
+ * @see void setDependentPins( TQStringList ids )
*/
PinList circuitDependentPins() const { return m_circuitDependentPins; }
/**
* Returns the ids of the pins whose voltages will affect this pin.
- * @see void setDependentPins( QStringList ids )
+ * @see void setDependentPins( TQStringList ids )
*/
PinList groundDependentPins() const { return m_groundDependentPins; }
/**
diff --git a/src/electronics/port.cpp b/src/electronics/port.cpp
index 541195b..cb7f4fb 100644
--- a/src/electronics/port.cpp
+++ b/src/electronics/port.cpp
@@ -29,7 +29,7 @@ Port::~Port()
}
-QStringList Port::ports( unsigned probeResult )
+TQStringList Port::ports( unsigned probeResult )
{
return SerialPort::ports(probeResult) + ParallelPort::ports(probeResult);
}
@@ -99,24 +99,24 @@ bool SerialPort::pinState( Pin pin )
if ( m_file == -1 )
return false;
- int mask = 0;
+ int tqmask = 0;
switch ( pin )
{
case CD:
- mask = TIOCM_CD;
+ tqmask = TIOCM_CD;
break;
case RD:
- mask = TIOCM_SR;
+ tqmask = TIOCM_SR;
break;
case CTS:
- mask = TIOCM_CTS;
+ tqmask = TIOCM_CTS;
break;
case RI:
- mask = TIOCM_RI;
+ tqmask = TIOCM_RI;
break;
case TD:
@@ -127,7 +127,7 @@ bool SerialPort::pinState( Pin pin )
break;
}
- if ( mask == 0 )
+ if ( tqmask == 0 )
{
kdError() << k_funcinfo << "Bad pin " << pin << endl;
return false;
@@ -140,11 +140,11 @@ bool SerialPort::pinState( Pin pin )
return false;
}
- return bits & mask;
+ return bits & tqmask;
}
-Port::ProbeResult SerialPort::probe( const QString & port )
+Port::ProbeResult SerialPort::probe( const TQString & port )
{
int file = open( port.ascii(), O_NOCTTY | O_NONBLOCK | O_RDONLY );
if ( file == -1 )
@@ -161,7 +161,7 @@ Port::ProbeResult SerialPort::probe( const QString & port )
}
-bool SerialPort::openPort( const QString & port, speed_t baudRate )
+bool SerialPort::openPort( const TQString & port, speed_t baudRate )
{
closePort();
@@ -201,34 +201,34 @@ void SerialPort::closePort()
}
-QStringList SerialPort::ports( unsigned probeResult )
+TQStringList SerialPort::ports( unsigned probeResult )
{
- QStringList list;
+ TQStringList list;
for ( int i = 0; i < 8; ++i )
{
- QString dev = QString("/dev/ttyS%1").arg(i);
+ TQString dev = TQString("/dev/ttyS%1").tqarg(i);
if ( probe(dev) & probeResult )
list << dev;
}
for ( unsigned i = 0; i < 8; ++i )
{
- QString dev = QString("/dev/tts/%1").arg(i);
+ TQString dev = TQString("/dev/tts/%1").tqarg(i);
if ( probe(dev) & probeResult )
list << dev;
}
for ( unsigned i = 0; i < 8; ++i )
{
- QString dev = QString("/dev/ttyUSB%1").arg(i);
+ TQString dev = TQString("/dev/ttyUSB%1").tqarg(i);
if ( probe(dev) & probeResult )
list << dev;
}
for ( unsigned i = 0; i < 8; ++i )
{
- QString dev = QString("/dev/usb/tts/%1").arg(i);
+ TQString dev = TQString("/dev/usb/tts/%1").tqarg(i);
if ( probe(dev) & probeResult )
list << dev;
}
@@ -240,7 +240,7 @@ QStringList SerialPort::ports( unsigned probeResult )
//BEGIN class ParallelPort
-const int IRQ_MODE_BIT = 1 << 20; // Controls if pin 10 (Ack) causes interrupts
+const int IRTQ_MODE_BIT = 1 << 20; // Controls if pin 10 (Ack) causes interrupts
const int INPUT_MODE_BIT = 1 << 21; // Controls if the data pins are input or output
const int ALWAYS_INPUT_PINS = ParallelPort::STATUS_PINS;
@@ -277,10 +277,10 @@ void ParallelPort::reset()
{
m_file = -1;
m_reg[Data] = 0;
- m_reg[Status] = 0;
+ m_reg[tqStatus] = 0;
m_reg[Control] = 0;
- m_outputPins = INPUT_MODE_BIT | IRQ_MODE_BIT;
- m_inputPins = ALWAYS_INPUT_PINS | INPUT_MODE_BIT | IRQ_MODE_BIT;
+ m_outputPins = INPUT_MODE_BIT | IRTQ_MODE_BIT;
+ m_inputPins = ALWAYS_INPUT_PINS | INPUT_MODE_BIT | IRTQ_MODE_BIT;
}
@@ -309,7 +309,7 @@ int ParallelPort::pinState( int pins )
value |= ((readFromRegister( Data ) & ((pins & DATA_PINS) >> 0)) << 0);
if ( pins & STATUS_PINS )
- value |= ((readFromRegister( Status ) & ((pins & STATUS_PINS) >> 8)) << 8);
+ value |= ((readFromRegister( tqStatus ) & ((pins & STATUS_PINS) >> 8)) << 8);
if ( pins & CONTROL_PINS )
value |= ((readFromRegister( Control ) & ((pins & CONTROL_PINS) >> 16)) << 16);
@@ -429,7 +429,7 @@ void ParallelPort::setControlDirection( int pins, Direction dir )
//END Changing pin directions
-Port::ProbeResult ParallelPort::probe( const QString & port )
+Port::ProbeResult ParallelPort::probe( const TQString & port )
{
int file = open( port.ascii(), O_RDWR );
if ( file == -1 )
@@ -447,20 +447,20 @@ Port::ProbeResult ParallelPort::probe( const QString & port )
}
-QStringList ParallelPort::ports( unsigned probeResult )
+TQStringList ParallelPort::ports( unsigned probeResult )
{
- QStringList list;
+ TQStringList list;
for ( unsigned i = 0; i < 8; ++i )
{
- QString dev = QString("/dev/parport%1").arg(i);
+ TQString dev = TQString("/dev/parport%1").tqarg(i);
if ( probe(dev) & probeResult )
list << dev;
}
for ( unsigned i = 0; i < 8; ++i )
{
- QString dev = QString("/dev/parports/%1").arg(i);
+ TQString dev = TQString("/dev/parports/%1").tqarg(i);
if ( probe(dev) & probeResult )
list << dev;
}
@@ -469,7 +469,7 @@ QStringList ParallelPort::ports( unsigned probeResult )
}
-bool ParallelPort::openPort( const QString & port )
+bool ParallelPort::openPort( const TQString & port )
{
if ( m_file != -1 )
{
diff --git a/src/electronics/port.h b/src/electronics/port.h
index 53182bc..d51cf5d 100644
--- a/src/electronics/port.h
+++ b/src/electronics/port.h
@@ -11,7 +11,7 @@
#ifndef PORT_H
#define PORT_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <termios.h>
@@ -36,7 +36,7 @@ class Port
* This function just returns the combination of the lists for
* SerialPort::ports and ParallelPort::ports.
*/
- static QStringList ports( unsigned probeResult );
+ static TQStringList ports( unsigned probeResult );
};
@@ -70,17 +70,17 @@ class SerialPort : public Port
void setPinState( Pin pin, bool state );
bool pinState( Pin pin );
- static ProbeResult probe( const QString & port );
+ static ProbeResult probe( const TQString & port );
/**
* @see Port::ports
*/
- static QStringList ports( unsigned probeResult );
+ static TQStringList ports( unsigned probeResult );
/**
* Opens the given port.
* @return if the port could be opened.
* @param baudRate The baud rate as defined in bits/termios.h
*/
- bool openPort( const QString & port, speed_t baudRate );
+ bool openPort( const TQString & port, speed_t baudRate );
/**
* Closes any currently open port.
*/
@@ -120,7 +120,7 @@ class ParallelPort : public Port
DATA_PINS = PIN02 | PIN03 | PIN04 | PIN05 | PIN06
| PIN07 | PIN08 | PIN09,
- // Status Register
+ // tqStatus Register
// Offset: Base + 1
// Read only
PIN15 = 1 << 11, // Error
@@ -146,7 +146,7 @@ class ParallelPort : public Port
enum Register
{
Data = 0,
- Status = 1,
+ tqStatus = 1,
Control = 2,
};
@@ -166,7 +166,7 @@ class ParallelPort : public Port
* Opens the given port.
* @return if the port could be opened.
*/
- bool openPort( const QString & port );
+ bool openPort( const TQString & port );
/**
* Closes any currently open port.
*/
@@ -220,11 +220,11 @@ class ParallelPort : public Port
void setControlDirection( int pins, Direction dir );
//END Changing pin directions
- static ProbeResult probe( const QString & port );
+ static ProbeResult probe( const TQString & port );
/**
* @see Port::ports
*/
- static QStringList ports( unsigned probeResult );
+ static TQStringList ports( unsigned probeResult );
protected:
/**
diff --git a/src/electronics/simulation/capacitance.cpp b/src/electronics/simulation/capacitance.cpp
index 9087c7f..c289f90 100644
--- a/src/electronics/simulation/capacitance.cpp
+++ b/src/electronics/simulation/capacitance.cpp
@@ -101,9 +101,9 @@ void Capacitance::time_step()
i_eq_old = i_eq_new;
}
-bool Capacitance::updateStatus()
+bool Capacitance::updatetqStatus()
{
- b_status = Reactive::updateStatus();
+ b_status = Reactive::updatetqStatus();
if ( m_method == Capacitance::m_none ) b_status = false;
return b_status;
}
@@ -111,7 +111,7 @@ bool Capacitance::updateStatus()
void Capacitance::setMethod( Method m )
{
m_method = m;
- updateStatus();
+ updatetqStatus();
}
diff --git a/src/electronics/simulation/capacitance.h b/src/electronics/simulation/capacitance.h
index ccc083d..b26899c 100644
--- a/src/electronics/simulation/capacitance.h
+++ b/src/electronics/simulation/capacitance.h
@@ -42,7 +42,7 @@ public:
protected:
virtual void updateCurrents();
- virtual bool updateStatus();
+ virtual bool updatetqStatus();
private:
double m_cap; // Capacitance
diff --git a/src/electronics/simulation/circuit.cpp b/src/electronics/simulation/circuit.cpp
index c152756..c138a7a 100644
--- a/src/electronics/simulation/circuit.cpp
+++ b/src/electronics/simulation/circuit.cpp
@@ -50,19 +50,19 @@ Circuit::~Circuit()
void Circuit::addPin( Pin *node )
{
- if ( m_pinList.contains(node) ) return;
+ if ( m_pinList.tqcontains(node) ) return;
m_pinList.append(node);
}
void Circuit::addElement( Element *element )
{
- if ( m_elementList.contains(element) ) return;
+ if ( m_elementList.tqcontains(element) ) return;
m_elementList.append(element);
}
-bool Circuit::contains( Pin *node )
+bool Circuit::tqcontains( Pin *node )
{
- return m_pinList.contains(node);
+ return m_pinList.tqcontains(node);
}
@@ -427,7 +427,7 @@ void Circuit::createMatrixMap()
bool Circuit::recursivePinAdd( Pin *node, PinList *unassignedNodes, PinList *associated, PinList *nodes )
{
- if ( !unassignedNodes->contains(node) )
+ if ( !unassignedNodes->tqcontains(node) )
return false;
unassignedNodes->remove(node);
@@ -437,7 +437,7 @@ bool Circuit::recursivePinAdd( Pin *node, PinList *unassignedNodes, PinList *ass
const PinList::const_iterator dEnd = circuitDependentPins.end();
for ( PinList::const_iterator it = circuitDependentPins.begin(); it != dEnd; ++it )
{
- if ( !associated->contains(*it) )
+ if ( !associated->tqcontains(*it) )
associated->append(*it);
}
diff --git a/src/electronics/simulation/circuit.h b/src/electronics/simulation/circuit.h
index 2455edc..c8c53cd 100644
--- a/src/electronics/simulation/circuit.h
+++ b/src/electronics/simulation/circuit.h
@@ -11,9 +11,9 @@
#ifndef CIRCUIT_H
#define CIRCUIT_H
-#include <qguardedptr.h>
-#include "qstringlist.h"
-#include "qvaluelist.h"
+#include <tqguardedptr.h>
+#include "tqstringlist.h"
+#include "tqvaluelist.h"
#include "elementset.h"
@@ -23,8 +23,8 @@ class Pin;
class Element;
class LogicOut;
-typedef QValueList<QGuardedPtr<Pin> > PinList;
-typedef QValueList<Element*> ElementList;
+typedef TQValueList<TQGuardedPtr<Pin> > PinList;
+typedef TQValueList<Element*> ElementList;
class LogicCacheNode
@@ -60,7 +60,7 @@ class Circuit
void addPin( Pin *node );
void addElement( Element *element );
- bool contains( Pin *node );
+ bool tqcontains( Pin *node );
bool containsNonLinear() const { return m_elementSet->containsNonLinear(); }
void init();
@@ -70,7 +70,7 @@ class Circuit
*/
void initCache();
/**
- * Marks all cached results as invalidated and removes them.
+ * Marks all cached results as tqinvalidated and removes them.
*/
void setCacheInvalidated();
/**
diff --git a/src/electronics/simulation/element.cpp b/src/electronics/simulation/element.cpp
index 2411897..46f0442 100644
--- a/src/electronics/simulation/element.cpp
+++ b/src/electronics/simulation/element.cpp
@@ -55,7 +55,7 @@ void Element::setElementSet( ElementSet *c )
p_eSet = c;
p_A = p_eSet->matrix();
p_b = p_eSet->b();
- updateStatus();
+ updatetqStatus();
}
void Element::componentDeleted()
@@ -113,7 +113,7 @@ void Element::setCNodes( const int n0, const int n1, const int n2, const int n3
p_cnode[1] = (n1>-1)?p_eSet->cnodes()[n1]:(n1==-1?p_eSet->ground():0l);
p_cnode[2] = (n2>-1)?p_eSet->cnodes()[n2]:(n2==-1?p_eSet->ground():0l);
p_cnode[3] = (n3>-1)?p_eSet->cnodes()[n3]:(n3==-1?p_eSet->ground():0l);
- updateStatus();
+ updatetqStatus();
}
void Element::setCBranches( const int b0, const int b1, const int b2, const int b3 )
@@ -128,10 +128,10 @@ void Element::setCBranches( const int b0, const int b1, const int b2, const int
p_cbranch[1] = (b1>-1)?p_eSet->cbranches()[b1]:0l;
p_cbranch[2] = (b2>-1)?p_eSet->cbranches()[b2]:0l;
p_cbranch[3] = (b3>-1)?p_eSet->cbranches()[b3]:0l;
- updateStatus();
+ updatetqStatus();
}
-bool Element::updateStatus()
+bool Element::updatetqStatus()
{
// First, set status to false if all nodes in use are ground
b_status = false;
@@ -160,7 +160,7 @@ bool Element::updateStatus()
resetCurrents();
}
// And return the status :-)
-// kdDebug() << "Element::updateStatus(): Setting b_status to "<<(b_status?"true":"false")<<" this="<<this<<endl;
+// kdDebug() << "Element::updatetqStatus(): Setting b_status to "<<(b_status?"true":"false")<<" this="<<this<<endl;
return b_status;
}
diff --git a/src/electronics/simulation/element.h b/src/electronics/simulation/element.h
index e05de46..7b219c9 100644
--- a/src/electronics/simulation/element.h
+++ b/src/electronics/simulation/element.h
@@ -188,7 +188,7 @@ protected:
/**
* Update the status, returning b_status
*/
- virtual bool updateStatus();
+ virtual bool updatetqStatus();
/**
* Set by child class - the number of branches that the element uses
* Typically, this is 0, but could be 1 (e.g. independent voltage source)
diff --git a/src/electronics/simulation/elementset.cpp b/src/electronics/simulation/elementset.cpp
index 25057c2..8a0adc9 100644
--- a/src/electronics/simulation/elementset.cpp
+++ b/src/electronics/simulation/elementset.cpp
@@ -87,7 +87,7 @@ void ElementSet::setCacheInvalidated()
void ElementSet::addElement( Element *e )
{
- if ( !e || m_elementList.contains(e) ) return;
+ if ( !e || m_elementList.tqcontains(e) ) return;
e->setElementSet(this);
m_elementList.append(e);
if ( e->isNonLinear() )
diff --git a/src/electronics/simulation/elementset.h b/src/electronics/simulation/elementset.h
index c7ef7ca..317d8be 100644
--- a/src/electronics/simulation/elementset.h
+++ b/src/electronics/simulation/elementset.h
@@ -13,7 +13,7 @@
#include <vector>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
class CBranch;
class Circuit;
@@ -25,8 +25,8 @@ class Matrix;
class NonLinear;
class Vector;
-typedef QValueList<Element*> ElementList;
-typedef QValueList<NonLinear*> NonLinearList;
+typedef TQValueList<Element*> ElementList;
+typedef TQValueList<NonLinear*> NonLinearList;
/**
Steps in simulation of a set of elements:
diff --git a/src/electronics/simulation/inductance.cpp b/src/electronics/simulation/inductance.cpp
index 22c5f9e..6737ab6 100644
--- a/src/electronics/simulation/inductance.cpp
+++ b/src/electronics/simulation/inductance.cpp
@@ -109,9 +109,9 @@ void Inductance::time_step()
}
-bool Inductance::updateStatus()
+bool Inductance::updatetqStatus()
{
- b_status = Reactive::updateStatus();
+ b_status = Reactive::updatetqStatus();
if ( m_method == Inductance::m_none )
b_status = false;
return b_status;
@@ -121,6 +121,6 @@ bool Inductance::updateStatus()
void Inductance::setMethod( Method m )
{
m_method = m;
- updateStatus();
+ updatetqStatus();
}
diff --git a/src/electronics/simulation/inductance.h b/src/electronics/simulation/inductance.h
index 46ccb09..e4bd119 100644
--- a/src/electronics/simulation/inductance.h
+++ b/src/electronics/simulation/inductance.h
@@ -42,7 +42,7 @@ class Inductance : public Reactive
protected:
virtual void updateCurrents();
- virtual bool updateStatus();
+ virtual bool updatetqStatus();
private:
double m_inductance; // Inductance
diff --git a/src/electronics/simulation/logic.h b/src/electronics/simulation/logic.h
index be8374f..40ab498 100644
--- a/src/electronics/simulation/logic.h
+++ b/src/electronics/simulation/logic.h
@@ -13,14 +13,14 @@
#include "element.h"
-#include <qguardedptr.h>
-#include <qvaluelist.h>
+#include <tqguardedptr.h>
+#include <tqvaluelist.h>
class Component;
class Pin;
class Simulator;
-typedef QValueList<QGuardedPtr<Pin> > PinList;
+typedef TQValueList<TQGuardedPtr<Pin> > PinList;
typedef struct
{
diff --git a/src/electronics/simulation/reactive.cpp b/src/electronics/simulation/reactive.cpp
index 83fcfd4..c753f42 100644
--- a/src/electronics/simulation/reactive.cpp
+++ b/src/electronics/simulation/reactive.cpp
@@ -26,11 +26,11 @@ Reactive::~Reactive()
void Reactive::setDelta( double delta )
{
m_delta = delta;
- updateStatus();
+ updatetqStatus();
}
-bool Reactive::updateStatus()
+bool Reactive::updatetqStatus()
{
- return Element::updateStatus();
+ return Element::updatetqStatus();
}
diff --git a/src/electronics/simulation/reactive.h b/src/electronics/simulation/reactive.h
index 1142b34..a93459b 100644
--- a/src/electronics/simulation/reactive.h
+++ b/src/electronics/simulation/reactive.h
@@ -34,7 +34,7 @@ public:
virtual void time_step() = 0;
protected:
- virtual bool updateStatus();
+ virtual bool updatetqStatus();
double m_delta; // Delta time interval
};
diff --git a/src/electronics/subcircuits.cpp b/src/electronics/subcircuits.cpp
index 65ae8e3..18ff615 100644
--- a/src/electronics/subcircuits.cpp
+++ b/src/electronics/subcircuits.cpp
@@ -20,13 +20,13 @@
#include <kdebug.h>
#include <kiconloader.h>
#include <kstandarddirs.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
Subcircuits::Subcircuits()
- : QObject()
+ : TQObject()
{
- connect( ComponentSelector::self(), SIGNAL(itemRemoved(const QString& )), this, SLOT(slotItemRemoved(const QString& )) );
+ connect( ComponentSelector::self(), TQT_SIGNAL(itemRemoved(const TQString& )), this, TQT_SLOT(slotItemRemoved(const TQString& )) );
}
@@ -37,8 +37,8 @@ Subcircuits::~Subcircuits()
void Subcircuits::initECSubcircuit( int subcircuitId, ECSubcircuit *ecSubcircuit )
{
- const QString fileName = genFileName(subcircuitId);
- if ( !QFile::exists(fileName) )
+ const TQString fileName = genFileName(subcircuitId);
+ if ( !TQFile::exists(fileName) )
{
kdDebug() << "Subcircuits::createSubcircuit: Subcircuit \""<<fileName<<"\" was not found."<<endl;
return;
@@ -68,11 +68,11 @@ void Subcircuits::loadSubcircuits()
KConfig *config = kapp->config();
config->setGroup("Subcircuits");
- QValueList<int> idList = config->readIntListEntry("Ids");
- const QValueList<int>::iterator idListEnd = idList.end();
- for ( QValueList<int>::iterator it = idList.begin(); it != idListEnd; ++it )
+ TQValueList<int> idList = config->readIntListEntry("Ids");
+ const TQValueList<int>::iterator idListEnd = idList.end();
+ for ( TQValueList<int>::iterator it = idList.begin(); it != idListEnd; ++it )
{
- QFile file( genFileName(*it) );
+ TQFile file( genFileName(*it) );
if ( file.open(IO_ReadOnly) == false )
{
// File has mysteriously disappeared....
@@ -80,7 +80,7 @@ void Subcircuits::loadSubcircuits()
}
else
{
- config->setGroup("Subcircuit_"+QString::number(*it));
+ config->setGroup("Subcircuit_"+TQString::number(*it));
updateComponentSelector( *it, config->readEntry("Name") );
}
file.close();
@@ -93,36 +93,36 @@ void Subcircuits::loadSubcircuits()
}
-QString Subcircuits::genFileName( const int nextId )
+TQString Subcircuits::genFileName( const int nextId )
{
- return locateLocal( "appdata", "subcircuit_"+QString::number(nextId)+".circuit" );
+ return locateLocal( "appdata", "subcircuit_"+TQString::number(nextId)+".circuit" );
}
-void Subcircuits::updateComponentSelector( int id, const QString &name )
+void Subcircuits::updateComponentSelector( int id, const TQString &name )
{
if ( name.isEmpty() )
return;
- ComponentSelector::self()->addItem( name, "sc/"+QString::number(id), "Subcircuits", KGlobal::iconLoader()->loadIcon( "ktechlab_circuit", KIcon::Small ), true );
+ ComponentSelector::self()->addItem( name, "sc/"+TQString::number(id), "Subcircuits", KGlobal::iconLoader()->loadIcon( "ktechlab_circuit", KIcon::Small ), true );
}
-void Subcircuits::addSubcircuit( const QString &name, const QString &subcircuitXml )
+void Subcircuits::addSubcircuit( const TQString &name, const TQString &subcircuitXml )
{
KConfig *config = kapp->config();
config->setGroup("Subcircuits");
int nextId = config->readNumEntry( "NextId", 0 );
- while ( QFile::exists( genFileName(nextId) ) ) {
+ while ( TQFile::exists( genFileName(nextId) ) ) {
nextId++;
}
const int id = nextId;
- const QString fileName = genFileName(id);
- QFile file(fileName);
+ const TQString fileName = genFileName(id);
+ TQFile file(fileName);
if ( file.open(IO_WriteOnly) == false )
{
@@ -130,16 +130,16 @@ void Subcircuits::addSubcircuit( const QString &name, const QString &subcircuitX
return;
}
- QTextStream stream(&file);
+ TQTextStream stream(&file);
stream << subcircuitXml;
file.close();
- QValueList<int> idList = config->readIntListEntry("Ids");
+ TQValueList<int> idList = config->readIntListEntry("Ids");
idList += id;
config->writeEntry( "Ids", idList );
config->writeEntry( "NextId", ++nextId );
- config->setGroup("Subcircuit_"+QString::number(id));
+ config->setGroup("Subcircuit_"+TQString::number(id));
config->writeEntry( "Name", name );
// It's important that we write the configuration *now*, lest the subcircuits be lost
@@ -149,22 +149,22 @@ void Subcircuits::addSubcircuit( const QString &name, const QString &subcircuitX
}
-void Subcircuits::slotItemRemoved( const QString &id )
+void Subcircuits::slotItemRemoved( const TQString &id )
{
if ( !id.startsWith("sc/") ) {
return;
}
- QString temp = id;
+ TQString temp = id;
temp.remove("sc/");
const int id_num = temp.toInt();
- const QString fileName = genFileName(id_num);
- QFile file(fileName);
+ const TQString fileName = genFileName(id_num);
+ TQFile file(fileName);
file.remove();
KConfig *config = kapp->config();
config->setGroup("Subcircuits");
- QValueList<int> idList = config->readIntListEntry("Ids");
+ TQValueList<int> idList = config->readIntListEntry("Ids");
idList.remove(id_num);
config->writeEntry( "Ids", idList );
}
diff --git a/src/electronics/subcircuits.h b/src/electronics/subcircuits.h
index 3f08dd9..af56b00 100644
--- a/src/electronics/subcircuits.h
+++ b/src/electronics/subcircuits.h
@@ -11,7 +11,7 @@
#ifndef SUBCIRCUITS_H
#define SUBCIRCUITS_H
-#include <qobject.h>
+#include <tqobject.h>
class CircuitDocument;
class ECSubcircuit;
@@ -22,9 +22,10 @@ inline Subcircuits *subcircuits();
Interface for dealing with loading / saving / etc of subcircuits
@author David Saxton
*/
-class Subcircuits : public QObject
+class Subcircuits : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
~Subcircuits();
/**
@@ -46,19 +47,19 @@ public:
* Saves the given subcircuit to the appdata dir, updates the appropriate
* config entries, and adds the subcircuit to the component selector.
*/
- static void addSubcircuit( const QString &name, const QString &subcircuitXml );
+ static void addSubcircuit( const TQString &name, const TQString &subcircuitXml );
/**
* returns a path to the appdata dir, e.g. genFileName(2) might return
* ~/.kde/share/apps/ktechlab/subcircuit_2.circuit
*/
- static QString genFileName( const int nextId );
+ static TQString genFileName( const int nextId );
/**
* Adds the given entry to the component selector
*/
- static void updateComponentSelector( int id, const QString &name );
+ static void updateComponentSelector( int id, const TQString &name );
protected slots:
- void slotItemRemoved( const QString &id );
+ void slotItemRemoved( const TQString &id );
private:
Subcircuits();
diff --git a/src/electronics/switch.cpp b/src/electronics/switch.cpp
index 7cbda70..f91095a 100644
--- a/src/electronics/switch.cpp
+++ b/src/electronics/switch.cpp
@@ -17,13 +17,13 @@
#include "switch.h"
#include <kdebug.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <cmath>
#include <stdlib.h> // for rand
#include <time.h>
-Switch::Switch( Component * parent, Pin * p1, Pin * p2, State state )
+Switch::Switch( Component * tqparent, Pin * p1, Pin * p2, State state )
{
m_bouncePeriod_ms = 5;
m_bBounce = false;
@@ -31,9 +31,9 @@ Switch::Switch( Component * parent, Pin * p1, Pin * p2, State state )
m_pBounceResistance = 0l;
m_pP1 = p1;
m_pP2 = p2;
- m_pComponent = parent;
- m_pStopBouncingTimer = new QTimer( this );
- connect( m_pStopBouncingTimer, SIGNAL(timeout()), this, SLOT(stopBouncing()) );
+ m_pComponent = tqparent;
+ m_pStopBouncingTimer = new TQTimer( this );
+ connect( m_pStopBouncingTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(stopBouncing()) );
// Force update
m_state = (state == Open) ? Closed : Open;
diff --git a/src/electronics/switch.h b/src/electronics/switch.h
index 40247c9..17fd493 100644
--- a/src/electronics/switch.h
+++ b/src/electronics/switch.h
@@ -11,21 +11,22 @@
#ifndef SWITCH_H
#define SWITCH_H
-#include <qguardedptr.h>
-#include <qobject.h>
+#include <tqguardedptr.h>
+#include <tqobject.h>
class CircuitDocument;
class Component;
class Pin;
class Resistance;
-class QTimer;
+class TQTimer;
/**
@author David Saxton
*/
-class Switch : public QObject
+class Switch : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
enum State
@@ -34,7 +35,7 @@ class Switch : public QObject
Closed,
};
- Switch( Component * parent, Pin * p1, Pin * p2, State state );
+ Switch( Component * tqparent, Pin * p1, Pin * p2, State state );
~Switch();
/**
* If bouncing has been set to true, then the state will not switch
@@ -63,7 +64,7 @@ class Switch : public QObject
protected slots:
/**
- * Called from a QTimer timeout - our bouncing period has come to an
+ * Called from a TQTimer timeout - our bouncing period has come to an
* end. This will then fully disconnect or connect the pins depending
* on the current state.
*/
@@ -78,9 +79,9 @@ class Switch : public QObject
Resistance * m_pBounceResistance;
State m_state;
Component * m_pComponent;
- QGuardedPtr<Pin> m_pP1;
- QGuardedPtr<Pin> m_pP2;
- QTimer * m_pStopBouncingTimer;
+ TQGuardedPtr<Pin> m_pP1;
+ TQGuardedPtr<Pin> m_pP2;
+ TQTimer * m_pStopBouncingTimer;
};
#endif
diff --git a/src/electronics/wire.h b/src/electronics/wire.h
index 368004c..97115df 100644
--- a/src/electronics/wire.h
+++ b/src/electronics/wire.h
@@ -11,15 +11,15 @@
#ifndef WIRE_H
#define WIRE_H
-#include <qguardedptr.h>
-#include <qobject.h>
+#include <tqguardedptr.h>
+#include <tqobject.h>
class Pin;
/**
@author David Saxton
*/
-class Wire : public QObject
+class Wire : public TQObject
{
public:
Wire( Pin * startPin, Pin * endPin );
@@ -57,8 +57,8 @@ class Wire : public QObject
protected:
double m_current;
bool m_bCurrentIsKnown;
- QGuardedPtr<Pin> m_pStartPin;
- QGuardedPtr<Pin> m_pEndPin;
+ TQGuardedPtr<Pin> m_pStartPin;
+ TQGuardedPtr<Pin> m_pEndPin;
};
#endif