diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-29 16:05:55 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-29 16:05:55 +0000 |
commit | 87a016680e3677da3993f333561e79eb0cead7d5 (patch) | |
tree | cbda2b4df8b8ee0d8d1617e6c75bec1e3ee0ccba /src/micro | |
parent | 6ce3d1ad09c1096b5ed3db334e02859e45d5c32b (diff) | |
download | ktechlab-87a016680e3677da3993f333561e79eb0cead7d5.tar.gz ktechlab-87a016680e3677da3993f333561e79eb0cead7d5.zip |
TQt4 port ktechlab
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktechlab@1238801 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/micro')
-rw-r--r-- | src/micro/asminfo.cpp | 8 | ||||
-rw-r--r-- | src/micro/asminfo.h | 24 | ||||
-rw-r--r-- | src/micro/microinfo.cpp | 8 | ||||
-rw-r--r-- | src/micro/microinfo.h | 6 | ||||
-rw-r--r-- | src/micro/microlibrary.cpp | 6 | ||||
-rw-r--r-- | src/micro/microlibrary.h | 12 | ||||
-rw-r--r-- | src/micro/micropackage.cpp | 16 | ||||
-rw-r--r-- | src/micro/micropackage.h | 30 |
8 files changed, 55 insertions, 55 deletions
diff --git a/src/micro/asminfo.cpp b/src/micro/asminfo.cpp index 3a12b57..6006c63 100644 --- a/src/micro/asminfo.cpp +++ b/src/micro/asminfo.cpp @@ -22,7 +22,7 @@ AsmInfo::~AsmInfo() } -void AsmInfo::addInstruction( const QString & operand, const QString & description, const QString & opcode ) +void AsmInfo::addInstruction( const TQString & operand, const TQString & description, const TQString & opcode ) { Instruction instruction; instruction.operand = operand; @@ -33,7 +33,7 @@ void AsmInfo::addInstruction( const QString & operand, const QString & descripti } -QString AsmInfo::setToString( Set set ) +TQString AsmInfo::setToString( Set set ) { switch (set) { @@ -48,11 +48,11 @@ QString AsmInfo::setToString( Set set ) } kdWarning() << k_funcinfo << "Unrecognized set="<<set<<endl; - return QString::null; + return TQString(); } -AsmInfo::Set AsmInfo::stringToSet( const QString & set ) +AsmInfo::Set AsmInfo::stringToSet( const TQString & set ) { if ( set == "PIC12" ) return PIC12; diff --git a/src/micro/asminfo.h b/src/micro/asminfo.h index 2026b7d..c2bc0bf 100644 --- a/src/micro/asminfo.h +++ b/src/micro/asminfo.h @@ -11,20 +11,20 @@ #ifndef ASMINFO_H #define ASMINFO_H -#include <qstring.h> -#include <qstringlist.h> -#include <qvaluelist.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqvaluelist.h> /** @author David Saxton */ struct Instruction { - QString operand; - QString description; - QString opcode; + TQString operand; + TQString description; + TQString opcode; }; -typedef QValueList<Instruction> InstructionList; +typedef TQValueList<Instruction> InstructionList; /** @short Base class for all instruction sets @@ -44,8 +44,8 @@ public: }; enum { AsmSetAll = PIC12 | PIC14 | PIC16 }; - static QString setToString( Set set ); - static Set stringToSet( const QString & set ); + static TQString setToString( Set set ); + static Set stringToSet( const TQString & set ); /** * @return the instruction set in use @@ -54,18 +54,18 @@ public: /** * Returns a list of instruction operands (all uppercase). */ - QStringList operandList() const { return m_operandList; } + TQStringList operandList() const { return m_operandList; } /** * @param operand is the name of the instruction - eg 'addwf' or 'clrwdt'. * @param description is instruction description - eg 'Add W and f'. * @param opcode' is the 14-bit code for the instruction, eg * '000111dfffffff'for addwf. */ - void addInstruction( const QString &operand, const QString &description, const QString &opcode ); + void addInstruction( const TQString &operand, const TQString &description, const TQString &opcode ); private: InstructionList m_instructionList; - QStringList m_operandList; + TQStringList m_operandList; }; #endif diff --git a/src/micro/microinfo.cpp b/src/micro/microinfo.cpp index b6d59a2..febf2af 100644 --- a/src/micro/microinfo.cpp +++ b/src/micro/microinfo.cpp @@ -23,19 +23,19 @@ MicroInfo::~MicroInfo() } #if 0 -QStringList MicroInfo::portNames() +TQStringList MicroInfo::portNames() { if (m_package) return m_package->portNames(); else return ""; } -QStringList MicroInfo::pinIDs() +TQStringList MicroInfo::pinIDs() { if (m_package) return m_package->pinIDs(); else return ""; } -QStringList MicroInfo::bidirPinIDs() +TQStringList MicroInfo::bidirPinIDs() { if (m_package) return m_package->bidirPinIDs(); else return ""; @@ -53,7 +53,7 @@ int MicroInfo::numIOPins() else return 0; } -int MicroInfo::numIOPins( const QString &portName ) +int MicroInfo::numIOPins( const TQString &portName ) { if (m_package) return m_package->numIOPins(portName); else return 0; diff --git a/src/micro/microinfo.h b/src/micro/microinfo.h index 7a22bf7..7aae10e 100644 --- a/src/micro/microinfo.h +++ b/src/micro/microinfo.h @@ -11,7 +11,7 @@ #ifndef MICROINFO_H #define MICROINFO_H -#include <qstringlist.h> +#include <tqstringlist.h> class AsmInfo; class MicroPackage; @@ -53,10 +53,10 @@ public: /** * Returns an id unique to the Micro */ - QString id() const { return m_id; } + TQString id() const { return m_id; } protected: - QString m_id; + TQString m_id; MicroPackage *m_package; }; diff --git a/src/micro/microlibrary.cpp b/src/micro/microlibrary.cpp index f0faabc..2c0a4f0 100644 --- a/src/micro/microlibrary.cpp +++ b/src/micro/microlibrary.cpp @@ -79,7 +79,7 @@ MicroLibrary::~MicroLibrary() } } -MicroInfo * const MicroLibrary::microInfoWithID( QString id ) +MicroInfo * const MicroLibrary::microInfoWithID( TQString id ) { id = id.upper(); const MicroInfoList::iterator end = m_microInfoList.end(); @@ -97,9 +97,9 @@ void MicroLibrary::addMicroInfo( MicroInfo *microInfo ) m_microInfoList += microInfo; } -QStringList MicroLibrary::microIDs( unsigned asmSet, unsigned gpsimSupport, unsigned flowCodeSupport, unsigned microbeSupport ) +TQStringList MicroLibrary::microIDs( unsigned asmSet, unsigned gpsimSupport, unsigned flowCodeSupport, unsigned microbeSupport ) { - QStringList ids; + TQStringList ids; const MicroInfoList::iterator end = m_microInfoList.end(); for ( MicroInfoList::iterator it = m_microInfoList.begin(); it != end; ++it ) diff --git a/src/micro/microlibrary.h b/src/micro/microlibrary.h index 537cf6c..0484ca0 100644 --- a/src/micro/microlibrary.h +++ b/src/micro/microlibrary.h @@ -14,13 +14,13 @@ #include "asminfo.h" #include "microinfo.h" -#include <qstring.h> -#include <qstringlist.h> -#include <qvaluelist.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqvaluelist.h> class MicroInfo; class MicroLibrary; -typedef QValueList<MicroInfo*> MicroInfoList; +typedef TQValueList<MicroInfo*> MicroInfoList; inline MicroLibrary *microLibrary(); @@ -35,14 +35,14 @@ class MicroLibrary ~MicroLibrary(); - MicroInfo * const microInfoWithID( QString id ); + MicroInfo * const microInfoWithID( TQString id ); void addMicroInfo( MicroInfo *microInfo ); /** * Returns a list of micro ids with the given properties (OR'ed * together). */ - QStringList microIDs( unsigned asmSet = AsmInfo::AsmSetAll, unsigned gpsimSupport = MicroInfo::AllSupport, unsigned flowCodeSupport = MicroInfo::AllSupport, unsigned microbeSupport = MicroInfo::AllSupport ); + TQStringList microIDs( unsigned asmSet = AsmInfo::AsmSetAll, unsigned gpsimSupport = MicroInfo::AllSupport, unsigned flowCodeSupport = MicroInfo::AllSupport, unsigned microbeSupport = MicroInfo::AllSupport ); private: MicroLibrary(); diff --git a/src/micro/micropackage.cpp b/src/micro/micropackage.cpp index 9becbab..a5e8809 100644 --- a/src/micro/micropackage.cpp +++ b/src/micro/micropackage.cpp @@ -21,7 +21,7 @@ PicPin::PicPin() } -PicPin::PicPin( const QString &_pinID, PicPin::pin_type _type, const QString &_portName, int _portPosition ) +PicPin::PicPin( const TQString &_pinID, PicPin::pin_type _type, const TQString &_portName, int _portPosition ) { pinID = _pinID; type = _type; @@ -38,14 +38,14 @@ MicroPackage::~MicroPackage() { } -void MicroPackage::assignPin( int pinPosition, PicPin::pin_type type, const QString& pinID, const QString& portName, int portPosition ) +void MicroPackage::assignPin( int pinPosition, PicPin::pin_type type, const TQString& pinID, const TQString& portName, int portPosition ) { - if ( m_picPinMap.find(pinPosition) != m_picPinMap.end() ) + if ( m_picPinMap.tqfind(pinPosition) != m_picPinMap.end() ) { kdError() << "PicDevice::assignBidirPin: Attempting to reset pin "<<pinPosition<<endl; return; } - if ( !m_portNames.contains(portName) && !portName.isEmpty() ) + if ( !m_portNames.tqcontains(portName) && !portName.isEmpty() ) { m_portNames.append(portName); m_portNames.sort(); @@ -55,7 +55,7 @@ void MicroPackage::assignPin( int pinPosition, PicPin::pin_type type, const QStr } -PicPinMap MicroPackage::pins( uint pinType, const QString& portName ) +PicPinMap MicroPackage::pins( uint pinType, const TQString& portName ) { if ( pinType == 0 ) pinType = (1<<30)-1; @@ -74,10 +74,10 @@ PicPinMap MicroPackage::pins( uint pinType, const QString& portName ) return list; } -QStringList MicroPackage::pinIDs( uint pinType, const QString& portName ) +TQStringList MicroPackage::pinIDs( uint pinType, const TQString& portName ) { if ( pinType == 0 ) pinType = (1<<30)-1; - QStringList list; + TQStringList list; const PicPinMap::iterator picPinListEnd = m_picPinMap.end(); for ( PicPinMap::iterator it = m_picPinMap.begin(); it != picPinListEnd; ++it ) @@ -92,7 +92,7 @@ QStringList MicroPackage::pinIDs( uint pinType, const QString& portName ) return list; } -int MicroPackage::pinCount( uint pinType, const QString& portName ) +int MicroPackage::pinCount( uint pinType, const TQString& portName ) { if ( pinType == 0 ) pinType = (1<<30)-1; int count = 0; diff --git a/src/micro/micropackage.h b/src/micro/micropackage.h index 0dc98fe..11b9a09 100644 --- a/src/micro/micropackage.h +++ b/src/micro/micropackage.h @@ -11,10 +11,10 @@ #ifndef PICPACKAGES_H #define PICPACKAGES_H -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> -#include <qmap.h> +#include <tqmap.h> /** @author David Saxton @@ -34,17 +34,17 @@ public: }; PicPin(); - PicPin( const QString &_pinID, PicPin::pin_type _type, const QString &_portName = "", int _portPosition = -1 ); + PicPin( const TQString &_pinID, PicPin::pin_type _type, const TQString &_portName = "", int _portPosition = -1 ); PicPin::pin_type type; - QString pinID; // Id of pin, eg 'MCLR' + TQString pinID; // Id of pin, eg 'MCLR' // For bidir (io) pins - QString portName; // Name of port, eg 'PORTA' + TQString portName; // Name of port, eg 'PORTA' int portPosition; // Position in port }; -typedef QMap<int, PicPin> PicPinMap; +typedef TQMap<int, PicPin> PicPinMap; /** @short Describes the PIC package (i.e. pins) @@ -59,30 +59,30 @@ public: /** * Assigns a pin to a position in the package. */ - void assignPin( int pinPosition, PicPin::pin_type type, const QString& pinID, const QString& portName = "", int portPosition = -1); + void assignPin( int pinPosition, PicPin::pin_type type, const TQString& pinID, const TQString& portName = "", int portPosition = -1); /** * Returns the pins of the given type(s). If portName is not specified, all pins will be returned; * not just those belonging to a given port. pin_type's can be OR'ed together * e.g. pins( PicPin::type_input | PicPin::type_bidir, "PORTA" ) will return all bidirectional or * input pins belonging to PORTA. If pinType is 0, then this will return all pins */ - PicPinMap pins( uint pinType = 0, const QString& portName = "" ); + PicPinMap pins( uint pinType = 0, const TQString& portName = "" ); /** - * Returns just a QStringList of the pin ids. - * @see pins( uint pinType, const QString& portName ) + * Returns just a TQStringList of the pin ids. + * @see pins( uint pinType, const TQString& portName ) */ - QStringList pinIDs( uint pinType = 0, const QString& portName = "" ); + TQStringList pinIDs( uint pinType = 0, const TQString& portName = "" ); /** * Returns the number of pins of the given type(s) (which can be OR'ed together), with the given * port name if specified, while avoiding the construction of a new PicPinMap. if pinType is 0, * then all pin types are considered * @see pins */ - int pinCount( uint pinType = 0, const QString& portName = "" ); + int pinCount( uint pinType = 0, const TQString& portName = "" ); /** * Returns a list of port names, eg 'PORTA', 'PORTB' for the package */ - QStringList portNames() const { return m_portNames; } + TQStringList portNames() const { return m_portNames; } /** * Returns the number of ports */ @@ -90,7 +90,7 @@ public: private: PicPinMap m_picPinMap; - QStringList m_portNames; + TQStringList m_portNames; int m_numPins; }; |