summaryrefslogtreecommitdiffstats
path: root/src/electronics/components
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-29 16:05:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-29 16:05:55 +0000
commit87a016680e3677da3993f333561e79eb0cead7d5 (patch)
treecbda2b4df8b8ee0d8d1617e6c75bec1e3ee0ccba /src/electronics/components
parent6ce3d1ad09c1096b5ed3db334e02859e45d5c32b (diff)
downloadktechlab-87a016680e3677da3993f333561e79eb0cead7d5.tar.gz
ktechlab-87a016680e3677da3993f333561e79eb0cead7d5.zip
TQt4 port ktechlab
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktechlab@1238801 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/electronics/components')
-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
89 files changed, 684 insertions, 682 deletions
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;
};