summaryrefslogtreecommitdiffstats
path: root/microbe/pic14.h
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 /microbe/pic14.h
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 'microbe/pic14.h')
-rw-r--r--microbe/pic14.h94
1 files changed, 47 insertions, 47 deletions
diff --git a/microbe/pic14.h b/microbe/pic14.h
index 5fd5a40..fc97cb4 100644
--- a/microbe/pic14.h
+++ b/microbe/pic14.h
@@ -24,9 +24,9 @@
#include "expression.h"
#include "microbe.h"
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
class Code;
class Microbe;
@@ -38,7 +38,7 @@ class Parser;
class PortPin
{
public:
- PortPin( const QString & port, int pin );
+ PortPin( const TQString & port, int pin );
/**
* Creates an invalid PortPin ( pin() will return -1).
*/
@@ -46,7 +46,7 @@ class PortPin
/**
* Returns port (uppercase).
*/
- QString port() const { return m_port; }
+ TQString port() const { return m_port; }
/**
* Returns the port position (e.g. "PORTA" is 0, "PORTB" is 1, etc).
*/
@@ -57,10 +57,10 @@ class PortPin
int pin() const { return m_pin; }
protected:
- QString m_port;
+ TQString m_port;
int m_pin;
};
-typedef QValueList<PortPin> PortPinList;
+typedef TQValueList<PortPin> PortPinList;
/**
@@ -103,7 +103,7 @@ class PIC14
* Tries to convert the string to a PIC type, returning unknown if
* unsuccessful.
*/
- static Type toType( const QString & text );
+ static Type toType( const TQString & text );
/**
* @return the PIC type.
*/
@@ -111,13 +111,13 @@ class PIC14
/**
* @return the Type as a string without the P at the front.
*/
- QString minimalTypeString() const;
+ TQString minimalTypeString() const;
/**
* Translates the portPinString (e.g. "PORTA.2") into a PortPin if the port
* and pin combination is valid (otherwise returns an invalid PortPin with
* a pin of -1.
*/
- PortPin toPortPin( const QString & portPinString );
+ PortPin toPortPin( const TQString & portPinString );
/**
* Returns the address that the General Purpose Registers starts at.
*/
@@ -134,63 +134,63 @@ class PIC14
Code * m_ifCode;
Code * m_elseCode;
- void postCompileConstruct( const QStringList &interrupts );
+ void postCompileConstruct( const TQStringList &interrupts );
/**
* @returns whether or not the port is valid.
* @see isValidPortPin
*/
- bool isValidPort( const QString & portName ) const;
+ bool isValidPort( const TQString & portName ) const;
/**
* @returns whether or not the port and pin is a valid combination.
* @see isValidPort
*/
bool isValidPortPin( const PortPin & portPin ) const;
- bool isValidTris( const QString & trisName ) const;
- bool isValidInterrupt( const QString & interruptName ) const;
+ bool isValidTris( const TQString & trisName ) const;
+ bool isValidInterrupt( const TQString & interruptName ) const;
- void Sgoto(const QString &label);
- void Slabel(const QString &label);
+ void Sgoto(const TQString &label);
+ void Slabel(const TQString &label);
void Send();
- void Ssubroutine(const QString &procName, Code * compiledProcCode);
- void Sinterrupt(const QString & procName, Code * compiledProcCode);
- void Scall(const QString &name);
+ void Ssubroutine(const TQString &procName, Code * compiledProcCode);
+ void Sinterrupt(const TQString & procName, Code * compiledProcCode);
+ void Scall(const TQString &name);
void Ssetlh( const PortPin & portPin, bool high);
- void add( QString val1, QString val2, LocationType val1Type, LocationType val2Type );
- void subtract( const QString & val1, const QString & val2, LocationType val1Type, LocationType val2Type );
- void mul( QString val1, QString val2, LocationType val1Type, LocationType val2Type);
- void div( const QString & val1, const QString & val2, LocationType val1Type, LocationType val2Type);
+ void add( TQString val1, TQString val2, LocationType val1Type, LocationType val2Type );
+ void subtract( const TQString & val1, const TQString & val2, LocationType val1Type, LocationType val2Type );
+ void mul( TQString val1, TQString val2, LocationType val1Type, LocationType val2Type);
+ void div( const TQString & val1, const TQString & val2, LocationType val1Type, LocationType val2Type);
- void assignNum(const QString & val);
- void assignVar(const QString & val);
+ void assignNum(const TQString & val);
+ void assignVar(const TQString & val);
- void saveToReg(const QString &dest);
+ void saveToReg(const TQString &dest);
/**
* Move the contents of the working register to the register with the given
* name.
*/
- void saveResultToVar( const QString & var );
+ void saveResultToVar( const TQString & var );
/** Code for "==" */
- void equal( const QString &val1, const QString &val2, LocationType val1Type, LocationType val2Type );
+ void equal( const TQString &val1, const TQString &val2, LocationType val1Type, LocationType val2Type );
/** Code for "!=" */
- void notEqual( const QString &val1, const QString &val2, LocationType val1Type, LocationType val2Type );
+ void notEqual( const TQString &val1, const TQString &val2, LocationType val1Type, LocationType val2Type );
/** Code for ">" */
- void greaterThan( const QString &val1, const QString &val2, LocationType val1Type, LocationType val2Type );
+ void greaterThan( const TQString &val1, const TQString &val2, LocationType val1Type, LocationType val2Type );
/** Code for "<" */
- void lessThan( const QString &val1, const QString &val2, LocationType val1Type, LocationType val2Type );
+ void lessThan( const TQString &val1, const TQString &val2, LocationType val1Type, LocationType val2Type );
/** Code for ">=" */
- void greaterOrEqual( const QString &val1, const QString &val2, LocationType val1Type, LocationType val2Type );
+ void greaterOrEqual( const TQString &val1, const TQString &val2, LocationType val1Type, LocationType val2Type );
/** Code for "<=" */
- void lessOrEqual( const QString &val1, const QString &val2, LocationType val1Type, LocationType val2Type );
+ void lessOrEqual( const TQString &val1, const TQString &val2, LocationType val1Type, LocationType val2Type );
- void bitwise( Expression::Operation op, const QString &val1, const QString &val2, bool val1IsNum, bool val2IsNum );
+ void bitwise( Expression::Operation op, const TQString &val1, const TQString &val2, bool val1IsNum, bool val2IsNum );
- void Swhile( Code * whileCode, const QString &expression);
- void Srepeat( Code * repeatCode, const QString &expression);
- void Sif( Code * ifCode, Code * elseCode, const QString &expression);
- void Sfor( Code * forCode, Code * initCode, const QString &expression, const QString &variable, const QString &step, bool stepPositive);
+ void Swhile( Code * whileCode, const TQString &expression);
+ void Srepeat( Code * repeatCode, const TQString &expression);
+ void Sif( Code * ifCode, Code * elseCode, const TQString &expression);
+ void Sfor( Code * forCode, Code * initCode, const TQString &expression, const TQString &variable, const TQString &step, bool stepPositive);
void Spin( const PortPin & portPin, bool NOT);
void addCommonFunctions( DelaySubroutine delay );
@@ -215,14 +215,14 @@ class PIC14
void Skeypad( const Variable & pinMap );
//END "Special Functionality" functions
- void SincVar( const QString &var );
- void SdecVar( const QString &var );
- void SrotlVar( const QString &var );
- void SrotrVar( const QString &var );
+ void SincVar( const TQString &var );
+ void SdecVar( const TQString &var );
+ void SrotlVar( const TQString &var );
+ void SrotrVar( const TQString &var );
- void Stristate( const QString &port );
+ void Stristate( const TQString &port );
- void Sasm(const QString &raw);
+ void Sasm(const TQString &raw);
protected:
void multiply();
@@ -235,19 +235,19 @@ class PIC14
Microbe * mb;
Code * m_pCode;
- void ifInitCode( const QString &val1, const QString &val2, LocationType val1Type, LocationType val2Type );
+ void ifInitCode( const TQString &val1, const TQString &val2, LocationType val1Type, LocationType val2Type );
/**
* The function makes sure that val1 always contains a working register
* variable, if one has been passed, this is done by swapping val1 and val2 when
* neccessary
*/
- void rearrangeOpArguments( QString * val1, QString * val2, LocationType * val1Type, LocationType * val2Type);
+ void rearrangeOpArguments( TQString * val1, TQString * val2, LocationType * val1Type, LocationType * val2Type);
/**
* @param flag True means give flag bit, false means give enable bit instead
*/
- int interruptNameToBit(const QString &name, bool flag);
+ int interruptNameToBit(const TQString &name, bool flag);
};
#endif