From 87a016680e3677da3993f333561e79eb0cead7d5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 29 Jun 2011 16:05:55 +0000 Subject: 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 --- src/electronics/components/ram.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/electronics/components/ram.cpp') 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 word size bits of data.

To read data, set the CS (chip select) and the OE (output enable) pins high, and select the word using the address pins A*. The word is outputted on the data-out pins: DO*.

To write data, set the CS (chip select) and the WE (write enable) pins high, and select the address to write to with the A* pins. Write to the selected word using the data-in pins: DI*.

The Address Size is the number of bits that determine an address; so the total number of words stored will be 2^Address Size."); + m_desc = i18n("This RAM stores data as a collection of words; each of which tqcontains word size bits of data.

To read data, set the CS (chip select) and the OE (output enable) pins high, and select the word using the address pins A*. The word is outputted on the data-out pins: DO*.

To write data, set the CS (chip select) and the WE (write enable) pins high, and select the address to write to with the A* pins. Write to the selected word using the data-in pins: DI*.

The Address Size is the number of bits that determine an address; so the total number of words stored will be 2^Address Size."); 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); -- cgit v1.2.3