diff options
Diffstat (limited to 'src/electronics/gpsimprocessor.h')
-rw-r--r-- | src/electronics/gpsimprocessor.h | 77 |
1 files changed, 40 insertions, 37 deletions
diff --git a/src/electronics/gpsimprocessor.h b/src/electronics/gpsimprocessor.h index 0650fd9..0259889 100644 --- a/src/electronics/gpsimprocessor.h +++ b/src/electronics/gpsimprocessor.h @@ -16,10 +16,10 @@ #include "sourceline.h" -#include <qmap.h> -#include <qvaluevector.h> -#include <qobject.h> -#include <qvaluelist.h> +#include <tqmap.h> +#include <tqvaluevector.h> +#include <tqobject.h> +#include <tqvaluelist.h> class DebugLine; class GpsimProcessor; @@ -28,16 +28,16 @@ class pic_processor; // from gpsim class Register; class RegisterMemoryAccess; -typedef QMap<SourceLine, SourceLine> SourceLineMap; -typedef QMap<int, QString> QStringMap; -typedef QValueList<int> IntList; +typedef TQMap<SourceLine, SourceLine> SourceLineMap; +typedef TQMap<int, TQString> TQStringMap; +typedef TQValueList<int> IntList; class DebugLine : public SourceLine { public: DebugLine(); - DebugLine( const QString & fileName, int line ); + DebugLine( const TQString & fileName, int line ); /** * Whether or not to break when we reach this line. */ @@ -69,9 +69,10 @@ class DebugLine : public SourceLine @short Stores info from gpsim register, used to hide gpsim interface @author David Saxton */ -class RegisterInfo : public QObject +class RegisterInfo : public TQObject { Q_OBJECT + TQ_OBJECT public: RegisterInfo( Register * reg ); @@ -85,9 +86,9 @@ class RegisterInfo : public QObject }; RegisterType type() const { return m_type; } - QString name() const { return m_name; } + TQString name() const { return m_name; } unsigned value() const; - static QString toString( RegisterType type ); + static TQString toString( RegisterType type ); /** * Checks to see if the value has changed; if so, emit new value. @@ -98,7 +99,7 @@ class RegisterInfo : public QObject void valueChanged( unsigned newValue ); protected: - QString m_name; + TQString m_name; RegisterType m_type; Register * m_pRegister; unsigned m_prevEmitValue; @@ -125,22 +126,23 @@ class RegisterSet unsigned size() const { return m_registers.size(); } RegisterInfo * fromAddress( unsigned address ); - RegisterInfo * fromName( const QString & name ); + RegisterInfo * fromName( const TQString & name ); protected: - typedef QMap< QString, RegisterInfo * > RegisterInfoMap; + typedef TQMap< TQString, RegisterInfo * > RegisterInfoMap; RegisterInfoMap m_nameToRegisterMap; - QValueVector< RegisterInfo * > m_registers; + TQValueVector< RegisterInfo * > m_registers; }; /** @author David Saxton */ -class GpsimDebugger : public QObject +class GpsimDebugger : public TQObject { friend class GpsimProcessor; Q_OBJECT + TQ_OBJECT public: enum Type @@ -161,7 +163,7 @@ class GpsimDebugger : public QObject * matches up the assembly file lines with the associated source file * lines. */ - void associateLine( const QString & sourceFile, int sourceLine, const QString & assemblyFile, int assemblyLine ); + void associateLine( const TQString & sourceFile, int sourceLine, const TQString & assemblyFile, int assemblyLine ); /** * Check to see if we've hit a breakpoint or similar; if so, this * function will stop the execution of the PIC program. @@ -173,11 +175,11 @@ class GpsimDebugger : public QObject * affected. * @param path the location of the file (which gpsim must recognise). */ - void setBreakpoints( const QString & path, const IntList & lines ); + void setBreakpoints( const TQString & path, const IntList & lines ); /** * Sets / removes the breakpoint at the given line */ - void setBreakpoint( const QString & path, int line, bool isBreakpoint ); + void setBreakpoint( const TQString & path, int line, bool isBreakpoint ); /** * Returns the current source line that gpsim is at. By default, this * will be the corresponding assembly line. That can be overwritten @@ -192,7 +194,7 @@ class GpsimDebugger : public QObject * @return the program address for the given line (or -1 if no such * line). */ - int programAddress( const QString & path, int line ); + int programAddress( const TQString & path, int line ); /** * Step into the next program line. */ @@ -241,24 +243,25 @@ class GpsimDebugger : public QObject /** @author David Saxton */ -class GpsimProcessor : public QObject +class GpsimProcessor : public TQObject { friend class GpsimDebugger; Q_OBJECT + TQ_OBJECT public: /** * Create a new gpsim processor. After calling this constructor, you - * should always call codLoadStatus() to ensure that the cod file was + * should always call codLoadtqStatus() to ensure that the cod file was * loaded successfully. */ - GpsimProcessor( QString symbolFile, QObject *parent = 0 ); + GpsimProcessor( TQString symbolFile, TQObject *tqparent = 0 ); ~GpsimProcessor(); void setDebugMode( GpsimDebugger::Type mode ) { m_debugMode = mode; } GpsimDebugger * currentDebugger() const { return m_pDebugger[m_debugMode]; } - enum CodLoadStatus + enum CodLoadtqStatus { CodSuccess, CodFileNotFound, @@ -281,18 +284,18 @@ class GpsimProcessor : public QObject /** * @return status of opening the COD file - * @see displayCodLoadStatus + * @see displayCodLoadtqStatus */ - CodLoadStatus codLoadStatus() const { return m_codLoadStatus; } + CodLoadtqStatus codLoadtqStatus() const { return m_codLoadtqStatus; } /** - * Popups a messagebox to the user according to the CodLoadStatus. Will - * only popup a messagebox if the CodLoadStatus wasn't CodSuccess. + * Popups a messagebox to the user according to the CodLoadtqStatus. Will + * only popup a messagebox if the CodLoadtqStatus wasn't CodSuccess. */ - void displayCodLoadStatus(); + void displayCodLoadtqStatus(); /** * Returns a list of source files for the currently running program. */ - QStringList sourceFileList(); + TQStringList sourceFileList(); /** * Set whether or not to run gpsim. (i.e. whether or not the step * function should do anything when called with force=false). @@ -340,21 +343,21 @@ class GpsimProcessor : public QObject /** * @return information on the validity of the given program file (either * DoesntExist, IncorrectType, or Valid). - * @see static QString generateSymbolFile + * @see static TQString generateSymbolFile */ - static ProgramFileValidity isValidProgramFile( const QString & programFile ); + static ProgramFileValidity isValidProgramFile( const TQString & programFile ); /** * Converts the file at programFile to a Symbol file for emulation, * and returns that symbol file's path * @param programFile The full url to the file * @param assembled The slot to connect the assembled signal to - * @see static bool isValidProgramFile( const QString &programFile ) + * @see static bool isValidProgramFile( const TQString &programFile ) */ - static QString generateSymbolFile( const QString &fileName, QObject *receiver, const char *successMember, const char * failMember = 0l ); + static TQString generateSymbolFile( const TQString &fileName, TQObject *receiver, const char *successMember, const char * failMember = 0l ); /** *Compile microbe to output to the given filename */ - static void compileMicrobe( const QString &filename, QObject *receiver, const char * successMember, const char * failMember = 0l ); + static void compileMicrobe( const TQString &filename, TQObject *receiver, const char * successMember, const char * failMember = 0l ); //END convenience functions for PIC files signals: @@ -370,8 +373,8 @@ class GpsimProcessor : public QObject void emitLineReached(); pic_processor * m_pPicProcessor; - CodLoadStatus m_codLoadStatus; - const QString m_symbolFile; + CodLoadtqStatus m_codLoadtqStatus; + const TQString m_symbolFile; RegisterSet * m_pRegisterMemory; GpsimDebugger::Type m_debugMode; GpsimDebugger * m_pDebugger[2]; // Asm, HLL |