summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/cassembler.cpp2
-rwxr-xr-xsrc/codeeditor.cpp48
-rwxr-xr-xsrc/codeeditor.h23
-rw-r--r--src/jtagprogrammer.cpp10
-rw-r--r--src/jtagprogrammer.h9
-rwxr-xr-xsrc/kexportdialog.cpp40
-rwxr-xr-xsrc/kexportdialog.h33
-rw-r--r--src/kjtagdialog.cpp32
-rw-r--r--src/kjtagdialog.h23
-rwxr-xr-xsrc/kpicosim.cpp164
-rwxr-xr-xsrc/kpicosim.h23
-rwxr-xr-xsrc/kport.h5
-rwxr-xr-xsrc/kportview.cpp54
-rwxr-xr-xsrc/kportview.h19
-rwxr-xr-xsrc/kprocessorview.cpp66
-rwxr-xr-xsrc/kprocessorview.h20
-rwxr-xr-xsrc/kscratchpadview.cpp8
-rwxr-xr-xsrc/kscratchpadview.h3
-rwxr-xr-xsrc/kserialview.cpp96
-rwxr-xr-xsrc/kserialview.h44
-rwxr-xr-xsrc/ksimulator.cpp8
-rwxr-xr-xsrc/ksimulator.h11
22 files changed, 377 insertions, 364 deletions
diff --git a/src/cassembler.cpp b/src/cassembler.cpp
index 1175181..2beb7f9 100755
--- a/src/cassembler.cpp
+++ b/src/cassembler.cpp
@@ -46,7 +46,7 @@ void CAssembler::error( unsigned int line, const char *description )
if ( m_messageList ) {
char str[ 128 ] ;
sprintf( str, "%u", line + 1 ) ;
- QListViewItem *item = new QListViewItem( m_messageList, m_messageList->lastChild() ) ;
+ TQListViewItem *item = new TQListViewItem( m_messageList, m_messageList->lastChild() ) ;
if ( line != NO_LINE_NR )
item->setText( 0, str ) ;
diff --git a/src/codeeditor.cpp b/src/codeeditor.cpp
index 2e5c086..b3a5305 100755
--- a/src/codeeditor.cpp
+++ b/src/codeeditor.cpp
@@ -20,24 +20,24 @@
#include "codeeditor.h"
#include <klibloader.h>
-#include <qmessagebox.h>
+#include <tqmessagebox.h>
#include <kmessagebox.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kfiledialog.h>
-CodeEditor::CodeEditor(QWidget *parent, const char *name)
- : QWidget(parent, name)
+CodeEditor::CodeEditor(TQWidget *tqparent, const char *name)
+ : TQWidget(tqparent, name)
{
- QVBoxLayout *layout = new QVBoxLayout(this) ;
+ TQVBoxLayout *tqlayout = new TQVBoxLayout(this) ;
KLibFactory *factory = KLibLoader::self()->factory( "libkatepart" ) ;
m_doc = ( Kate::Document* ) factory->create( 0L, "kate", "KTextEditor::Document" ) ;
m_view = ( Kate::View * ) m_doc->createView( this ) ;
m_view->setIconBorder( true ) ;
- connect( m_view, SIGNAL(cursorPositionChanged()), this, SLOT(slotCursorPositionChanged()) );
+ connect( m_view, TQT_SIGNAL(cursorPositionChanged()), this, TQT_SLOT(slotCursorPositionChanged()) );
- layout->addWidget( m_view ) ;
+ tqlayout->addWidget( m_view ) ;
m_exeLine = 0 ;
m_filename = "" ;
@@ -56,7 +56,7 @@ CodeEditor::CodeEditor(QWidget *parent, const char *name)
m_statusBar = new KStatusBar( this ) ;
- layout->addWidget( m_statusBar ) ;
+ tqlayout->addWidget( m_statusBar ) ;
m_statusBar->insertItem( "", 0, 0, true ) ;
slotCursorPositionChanged() ;
@@ -74,7 +74,7 @@ void CodeEditor::slotCursorPositionChanged()
{
unsigned int line, column ;
m_view->cursorPosition( &line, &column ) ;
- m_statusBar->changeItem( QString( " Line: %1 Col: %2 " ).arg( QString::number( line+1 ) ).arg( QString::number( column+1 ) ), 0 ) ;
+ m_statusBar->changeItem( TQString( " Line: %1 Col: %2 " ).tqarg( TQString::number( line+1 ) ).tqarg( TQString::number( column+1 ) ), 0 ) ;
}
void CodeEditor::slotToggleBreakpoint()
@@ -204,7 +204,7 @@ void CodeEditor::slotRedo()
void CodeEditor::slotOpen()
{
- QString filename = KFileDialog::getOpenFileName( QString::null, QString( "*.psm|PicoBlaze assembly files" ) ) ;
+ TQString filename = KFileDialog::getOpenFileName( TQString(), TQString( "*.psm|PicoBlaze assembly files" ) ) ;
if ( filename != "" ) {
m_filename = filename ;
m_bFilename = true ;
@@ -213,7 +213,7 @@ void CodeEditor::slotOpen()
}
}
-void CodeEditor::open( QString filename )
+void CodeEditor::open( TQString filename )
{
if ( filename != "" ) {
m_filename = filename ;
@@ -223,7 +223,7 @@ void CodeEditor::open( QString filename )
}
}
-QString CodeEditor::getFilename()
+TQString CodeEditor::getFilename()
{
return m_filename ;
}
@@ -244,13 +244,13 @@ void CodeEditor::setHighlightMode()
bool CodeEditor::askSave()
{
- QString filename ;
+ TQString filename ;
if ( m_bFilename )
filename = m_filename ;
else
filename = "Untitled" ;
- int choice = KMessageBox::warningYesNoCancel( this, QString( "The document \'%1\' has been modified.\nDo you want to save it?").arg( filename ), "Save Document?", KGuiItem( "Save" ), KGuiItem( "Discard" ) );
+ int choice = KMessageBox::warningYesNoCancel( this, TQString( "The document \'%1\' has been modified.\nDo you want to save it?").tqarg( filename ), "Save Document?", KGuiItem( "Save" ), KGuiItem( "Discard" ) );
if ( choice == KMessageBox::Yes )
save() ;
@@ -265,7 +265,7 @@ bool CodeEditor::close()
return true ;
}
-const QPixmap* CodeEditor::inactiveBreakpointPixmap()
+const TQPixmap* CodeEditor::inactiveBreakpointPixmap()
{
const char*breakpoint_gr_xpm[]={
"11 16 6 1",
@@ -291,12 +291,12 @@ const QPixmap* CodeEditor::inactiveBreakpointPixmap()
"...........",
"...........",
"..........."};
- static QPixmap pixmap( breakpoint_gr_xpm );
+ static TQPixmap pixmap( breakpoint_gr_xpm );
return &pixmap;
}
-const QPixmap* CodeEditor::activeBreakpointPixmap()
+const TQPixmap* CodeEditor::activeBreakpointPixmap()
{
const char* breakpoint_xpm[]={
"11 16 6 1",
@@ -322,13 +322,13 @@ const QPixmap* CodeEditor::activeBreakpointPixmap()
"...........",
"...........",
"..........."};
- static QPixmap pixmap( breakpoint_xpm );
+ static TQPixmap pixmap( breakpoint_xpm );
return &pixmap;
}
-const QPixmap* CodeEditor::reachedBreakpointPixmap()
+const TQPixmap* CodeEditor::reachedBreakpointPixmap()
{
const char*breakpoint_bl_xpm[]={
"11 16 7 1",
@@ -355,12 +355,12 @@ const QPixmap* CodeEditor::reachedBreakpointPixmap()
"...........",
"...........",
"..........."};
- static QPixmap pixmap( breakpoint_bl_xpm );
+ static TQPixmap pixmap( breakpoint_bl_xpm );
return &pixmap;
}
-const QPixmap* CodeEditor::disabledBreakpointPixmap()
+const TQPixmap* CodeEditor::disabledBreakpointPixmap()
{
const char*breakpoint_wh_xpm[]={
"11 16 7 1",
@@ -387,12 +387,12 @@ const QPixmap* CodeEditor::disabledBreakpointPixmap()
"...........",
"...........",
"..........."};
- static QPixmap pixmap( breakpoint_wh_xpm );
+ static TQPixmap pixmap( breakpoint_wh_xpm );
return &pixmap;
}
-const QPixmap* CodeEditor::executionPointPixmap()
+const TQPixmap* CodeEditor::executionPointPixmap()
{
const char*exec_xpm[]={
"11 16 4 1",
@@ -416,7 +416,7 @@ const QPixmap* CodeEditor::executionPointPixmap()
"...........",
"...........",
"..........."};
- static QPixmap pixmap( exec_xpm );
+ static TQPixmap pixmap( exec_xpm );
return &pixmap;
}
diff --git a/src/codeeditor.h b/src/codeeditor.h
index a3a57ce..06f905e 100755
--- a/src/codeeditor.h
+++ b/src/codeeditor.h
@@ -20,26 +20,27 @@
#ifndef CODEEDITOR_H
#define CODEEDITOR_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kate/view.h>
#include <kate/document.h>
#include <kstatusbar.h>
-class CodeEditor : public QWidget
+class CodeEditor : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- CodeEditor(QWidget *parent = 0, const char *name = 0);
+ CodeEditor(TQWidget *tqparent = 0, const char *name = 0);
~CodeEditor();
void clearExecutionMarker() ;
void setExecutionMarker( unsigned int line ) ;
- QString getFilename() ;
+ TQString getFilename() ;
bool isBreakpoint( unsigned int line ) ;
void setCursor( unsigned int line ) ;
- void open( QString filename ) ;
+ void open( TQString filename ) ;
bool close() ;
bool save() ;
@@ -50,7 +51,7 @@ class CodeEditor : public QWidget
KStatusBar *m_statusBar ;
unsigned int m_exeLine ;
- QString m_filename ;
+ TQString m_filename ;
bool m_bFilename ;
void setHighlightMode() ;
bool askSave() ;
@@ -65,11 +66,11 @@ class CodeEditor : public QWidget
};
- static const QPixmap* inactiveBreakpointPixmap();
- static const QPixmap* activeBreakpointPixmap();
- static const QPixmap* reachedBreakpointPixmap();
- static const QPixmap* disabledBreakpointPixmap();
- static const QPixmap* executionPointPixmap();
+ static const TQPixmap* inactiveBreakpointPixmap();
+ static const TQPixmap* activeBreakpointPixmap();
+ static const TQPixmap* reachedBreakpointPixmap();
+ static const TQPixmap* disabledBreakpointPixmap();
+ static const TQPixmap* executionPointPixmap();
public slots:
diff --git a/src/jtagprogrammer.cpp b/src/jtagprogrammer.cpp
index f825fd7..fc1b22e 100644
--- a/src/jtagprogrammer.cpp
+++ b/src/jtagprogrammer.cpp
@@ -27,8 +27,8 @@
#include "jtagprogrammer.h"
#include <iostream>
-#include <qapplication.h>
-#include <qeventloop.h>
+#include <tqapplication.h>
+#include <tqeventloop.h>
bool IDCODE_PROM[] = { 0, 1, 1, 1, 1, 1, 1, 1 } ;
bool BYPASS_PROM[] = { 1, 1, 1, 1, 1, 1, 1, 1 } ;
@@ -66,9 +66,9 @@ const unsigned int id_code[] =
#define MAX_IDS ( sizeof( id_code ) / sizeof( int ) )
-JTAGProgrammer::JTAGProgrammer( QObject *parent )
+JTAGProgrammer::JTAGProgrammer( TQObject *tqparent )
{
- m_parent = parent ;
+ m_parent = tqparent ;
m_bitFilename = "" ;
m_dev = new CJTAG ;
@@ -201,7 +201,7 @@ void JTAGProgrammer::program()
m_dev->setDR( frame, dummy, 8 ) ;
cur = next ;
- QApplication::eventLoop()->processEvents( QEventLoop::AllEvents ) ;
+ TQApplication::eventLoop()->processEvents( TQEventLoop::AllEvents ) ;
}
std::cout << std::endl ;
diff --git a/src/jtagprogrammer.h b/src/jtagprogrammer.h
index becb368..ec03ac0 100644
--- a/src/jtagprogrammer.h
+++ b/src/jtagprogrammer.h
@@ -20,15 +20,16 @@
#ifndef JTAGPROGRAMMER_H
#define JTAGPROGRAMMER_H
-#include <qobject.h>
+#include <tqobject.h>
#include <string.h>
#include "jtag.h"
-class JTAGProgrammer : public QObject
+class JTAGProgrammer : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- JTAGProgrammer( QObject *parent );
+ JTAGProgrammer( TQObject *tqparent );
~JTAGProgrammer();
void setBitFile( std::string filename ) ;
@@ -46,7 +47,7 @@ class JTAGProgrammer : public QObject
std::string m_bitFilename ;
CJTAG *m_dev ;
- QObject *m_parent ;
+ TQObject *m_parent ;
};
diff --git a/src/kexportdialog.cpp b/src/kexportdialog.cpp
index ae5a444..7b2e8fa 100755
--- a/src/kexportdialog.cpp
+++ b/src/kexportdialog.cpp
@@ -20,20 +20,20 @@
#include "kexportdialog.h"
#include <kfiledialog.h>
-KExportDialog::KExportDialog( QWidget *parent, const char *name ) : QDialog(parent, name)
+KExportDialog::KExportDialog( TQWidget *tqparent, const char *name ) : TQDialog(tqparent, name)
{
m_templateFile = "" ;
m_outputDir = "" ;
- QLabel *label = new QLabel( this ) ;
+ TQLabel *label = new TQLabel( this ) ;
label->setText( "Template file" ) ;
label->move( 10, 10 ) ;
- label = new QLabel( this ) ;
+ label = new TQLabel( this ) ;
label->setText( "Output directory" ) ;
label->move( 10, 35 ) ;
- label = new QLabel( this ) ;
+ label = new TQLabel( this ) ;
label->setText( "Entity name" ) ;
label->move( 10, 60 ) ;
@@ -52,29 +52,29 @@ KExportDialog::KExportDialog( QWidget *parent, const char *name ) : QDialog(pare
m_lineEntityName->setFixedSize( 150, 20 ) ;
m_lineEntityName->move( 110, 60 ) ;
- QPushButton *button = new QPushButton( this ) ;
+ TQPushButton *button = new TQPushButton( this ) ;
button->setText( "OK" ) ;
button->setFixedSize( 60, 25 ) ;
button->move( 100, 90 ) ;
- connect( button, SIGNAL( clicked() ), this, SLOT( btnOKClicked() ) ) ;
+ connect( button, TQT_SIGNAL( clicked() ), this, TQT_SLOT( btnOKClicked() ) ) ;
- button = new QPushButton( this ) ;
+ button = new TQPushButton( this ) ;
button->setText( "Cancel" ) ;
button->setFixedSize( 60, 25 ) ;
button->move( 200, 90 ) ;
- connect( button, SIGNAL( clicked() ), this, SLOT( btnCancelClicked() ) ) ;
+ connect( button, TQT_SIGNAL( clicked() ), this, TQT_SLOT( btnCancelClicked() ) ) ;
- button = new QPushButton( this ) ;
+ button = new TQPushButton( this ) ;
button->setText( "..." ) ;
button->setFixedSize( 25, 20 ) ;
button->move( 270, 10 ) ;
- connect( button, SIGNAL( clicked() ), this, SLOT( showFileDialog() ) ) ;
+ connect( button, TQT_SIGNAL( clicked() ), this, TQT_SLOT( showFileDialog() ) ) ;
- button = new QPushButton( this ) ;
+ button = new TQPushButton( this ) ;
button->setText( "..." ) ;
button->setFixedSize( 25, 20 ) ;
button->move( 270, 35 ) ;
- connect( button, SIGNAL( clicked() ), this, SLOT( showDirDialog() ) ) ;
+ connect( button, TQT_SIGNAL( clicked() ), this, TQT_SLOT( showDirDialog() ) ) ;
setFixedSize( 340, 130 ) ;
setCaption( "Export to VHDL" ) ;
@@ -92,7 +92,7 @@ void KExportDialog::modal()
void KExportDialog::showFileDialog()
{
- KFileDialog dlg( QString::null, "*.vhd|vhdl template file", this, "template dlg", true ) ;
+ KFileDialog dlg( TQString(), "*.vhd|vhdl template file", this, "template dlg", true ) ;
dlg.exec() ;
if ( dlg.selectedFile() != "" )
@@ -101,7 +101,7 @@ void KExportDialog::showFileDialog()
void KExportDialog::showDirDialog()
{
- QString dir = KFileDialog::getExistingDirectory ( QString::null, this, "Export directory" ) ;
+ TQString dir = KFileDialog::getExistingDirectory ( TQString(), this, "Export directory" ) ;
if ( dir != "" )
m_lineOutputDir->setText( dir ) ;
}
@@ -124,32 +124,32 @@ void KExportDialog::btnCancelClicked()
close() ;
}
-void KExportDialog::setTemplateFile( QString file )
+void KExportDialog::setTemplateFile( TQString file )
{
m_lineTemplateFile->setText( file ) ;
}
-void KExportDialog::setOutputDir( QString dir )
+void KExportDialog::setOutputDir( TQString dir )
{
m_lineOutputDir->setText( dir ) ;
}
-void KExportDialog::setEntityName( QString name )
+void KExportDialog::setEntityName( TQString name )
{
m_lineEntityName->setText( name ) ;
}
-QString KExportDialog::getTemplateFile()
+TQString KExportDialog::getTemplateFile()
{
return m_templateFile ;
}
-QString KExportDialog::getOutputDir()
+TQString KExportDialog::getOutputDir()
{
return m_outputDir ;
}
-QString KExportDialog::getEntityName()
+TQString KExportDialog::getEntityName()
{
return m_entityName ;
}
diff --git a/src/kexportdialog.h b/src/kexportdialog.h
index 2069ae8..a2151df 100755
--- a/src/kexportdialog.h
+++ b/src/kexportdialog.h
@@ -20,35 +20,36 @@
#ifndef KEXPORTDIALOG_H
#define KEXPORTDIALOG_H
-#include <qobject.h>
+#include <tqobject.h>
#include <klineedit.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qstring.h>
-#include <qdialog.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqstring.h>
+#include <tqdialog.h>
-class KExportDialog : public QDialog
+class KExportDialog : public TQDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- KExportDialog(QWidget *parent = 0, const char *name = 0 );
+ KExportDialog(TQWidget *tqparent = 0, const char *name = 0 );
~KExportDialog();
- void setOutputDir( QString dir ) ;
- void setTemplateFile( QString file ) ;
- void setEntityName( QString name ) ;
+ void setOutputDir( TQString dir ) ;
+ void setTemplateFile( TQString file ) ;
+ void setEntityName( TQString name ) ;
- QString getTemplateFile() ;
- QString getOutputDir() ;
- QString getEntityName() ;
+ TQString getTemplateFile() ;
+ TQString getOutputDir() ;
+ TQString getEntityName() ;
void modal() ;
bool isCanceled() { return m_bCanceled ; }
protected:
- QString m_outputDir ;
- QString m_templateFile ;
- QString m_entityName ;
+ TQString m_outputDir ;
+ TQString m_templateFile ;
+ TQString m_entityName ;
KLineEdit * m_lineTemplateFile, * m_lineOutputDir, *m_lineEntityName ;
bool m_bCanceled ;
diff --git a/src/kjtagdialog.cpp b/src/kjtagdialog.cpp
index a8d445e..e3d2305 100644
--- a/src/kjtagdialog.cpp
+++ b/src/kjtagdialog.cpp
@@ -18,32 +18,32 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#include "kjtagdialog.h"
-#include <qmessagebox.h>
+#include <tqmessagebox.h>
#include <kfiledialog.h>
#include <kiconloader.h>
-KJTAGDialog::KJTAGDialog( QWidget *parent )
- : QDialog( parent )
+KJTAGDialog::KJTAGDialog( TQWidget *tqparent )
+ : TQDialog( tqparent )
{
setFixedSize( 330, 300 ) ;
- m_groupConfigure = new QGroupBox( "Configure", this ) ;
+ m_groupConfigure = new TQGroupBox( "Configure", this ) ;
m_groupConfigure->setFixedSize( 310, 45 ) ;
m_groupConfigure->move( 10, 10 ) ;
- m_selectFileBtn = new QPushButton( m_groupConfigure ) ;
+ m_selectFileBtn = new TQPushButton( m_groupConfigure ) ;
m_selectFileBtn->setFixedSize( 30, 25 ) ;
m_selectFileBtn->move( 205, 15 ) ;
m_selectFileBtn->setPixmap( KGlobal::iconLoader()->loadIcon( "fileopen", KIcon::Small ) ) ;
- connect( m_selectFileBtn, SIGNAL( clicked() ), this, SLOT( selectFileName() ) ) ;
+ connect( m_selectFileBtn, TQT_SIGNAL( clicked() ), this, TQT_SLOT( selectFileName() ) ) ;
- m_configureBtn = new QPushButton( "Configure", m_groupConfigure ) ;
+ m_configureBtn = new TQPushButton( "Configure", m_groupConfigure ) ;
m_configureBtn->setFixedSize( 60, 25 ) ;
m_configureBtn->move( 240, 15 ) ;
- connect( m_configureBtn, SIGNAL( clicked() ), this, SLOT( configure() ) ) ;
+ connect( m_configureBtn, TQT_SIGNAL( clicked() ), this, TQT_SLOT( configure() ) ) ;
- m_bitFileLabel = new QLabel( "Bit file", m_groupConfigure ) ;
+ m_bitFileLabel = new TQLabel( "Bit file", m_groupConfigure ) ;
m_bitFileLabel->setFixedSize( 50, 25 ) ;
m_bitFileLabel->move( 10, 15 ) ;
@@ -60,9 +60,9 @@ KJTAGDialog::KJTAGDialog( QWidget *parent )
m_debug->setFixedSize( 310, 200 ) ;
m_debug->move( 10, 60 ) ;
- m_programmer = new JTAGProgrammer( this ) ;
- connect( m_programmer, SIGNAL( progress(int) ), this, SLOT( progress(int) ) ) ;
- connect( m_programmer, SIGNAL( message(const char*) ), this, SLOT( addMessage(const char*) ) ) ;
+ m_programmer = new JTAGProgrammer( TQT_TQOBJECT(this) ) ;
+ connect( m_programmer, TQT_SIGNAL( progress(int) ), this, TQT_SLOT( progress(int) ) ) ;
+ connect( m_programmer, TQT_SIGNAL( message(const char*) ), this, TQT_SLOT( addMessage(const char*) ) ) ;
m_debug->insert( "This option is still very experimental!!\n"
"The code is tested with the Spartan-3 Development Board.\n"
@@ -79,7 +79,7 @@ KJTAGDialog::~KJTAGDialog()
void KJTAGDialog::configure()
{
m_debug->clear() ;
- m_programmer->setBitFile( m_bitFileEdit->text() ) ;
+ m_programmer->setBitFile( m_bitFileEdit->text().ascii() ) ;
m_programmer->program() ;
m_progress->setProgress( 0 ) ;
}
@@ -89,19 +89,19 @@ void KJTAGDialog::progress( int percent )
m_progress->setProgress( percent ) ;
}
-void KJTAGDialog::setFilename( QString filename )
+void KJTAGDialog::setFilename( TQString filename )
{
m_bitFileEdit->setText( filename ) ;
}
-QString KJTAGDialog::getFilename()
+TQString KJTAGDialog::getFilename()
{
return m_bitFileEdit->text() ;
}
void KJTAGDialog::selectFileName()
{
- QString filename = KFileDialog::getOpenFileName( QString::null,
+ TQString filename = KFileDialog::getOpenFileName( TQString(),
"*.bit|bit files\n*|All files",
this,
"Select configuration file" ) ;
diff --git a/src/kjtagdialog.h b/src/kjtagdialog.h
index 7bc25a5..7c7f3fb 100644
--- a/src/kjtagdialog.h
+++ b/src/kjtagdialog.h
@@ -20,12 +20,12 @@
#ifndef KJTAGDIALOG_H
#define KJTAGDIALOG_H
-#include <qdialog.h>
-#include <qpushbutton.h>
+#include <tqdialog.h>
+#include <tqpushbutton.h>
#include <klineedit.h>
#include <kprogress.h>
-#include <qlabel.h>
-#include <qgroupbox.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
#include <ktextedit.h>
#include "jtagprogrammer.h"
@@ -33,15 +33,16 @@
-class KJTAGDialog : public QDialog
+class KJTAGDialog : public TQDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- KJTAGDialog(QWidget *parent);
+ KJTAGDialog(TQWidget *tqparent);
~KJTAGDialog();
- void setFilename( QString filename ) ;
- QString getFilename() ;
+ void setFilename( TQString filename ) ;
+ TQString getFilename() ;
public slots:
void configure() ;
@@ -50,11 +51,11 @@ class KJTAGDialog : public QDialog
void addMessage( const char *msg ) ;
protected:
- QPushButton *m_configureBtn, *m_selectFileBtn ;
+ TQPushButton *m_configureBtn, *m_selectFileBtn ;
KLineEdit *m_bitFileEdit ;
KProgress *m_progress ;
- QLabel *m_bitFileLabel ;
- QGroupBox *m_groupConfigure ;
+ TQLabel *m_bitFileLabel ;
+ TQGroupBox *m_groupConfigure ;
KTextEdit *m_debug ;
JTAGProgrammer *m_programmer ;
diff --git a/src/kpicosim.cpp b/src/kpicosim.cpp
index cf3eb13..f6b3d71 100755
--- a/src/kpicosim.cpp
+++ b/src/kpicosim.cpp
@@ -61,25 +61,25 @@
#include "kpicosim.h"
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kmainwindow.h>
#include <klocale.h>
#include <kmenubar.h>
-#include <qlayout.h>
-#include <qkeysequence.h>
+#include <tqlayout.h>
+#include <tqkeysequence.h>
#include <knuminput.h>
-#include <qnamespace.h>
+#include <tqnamespace.h>
#include <kportview.h>
-#include <qdockwindow.h>
+#include <tqdockwindow.h>
#include <kstatusbar.h>
#include <kiconloader.h>
#include "kexportdialog.h"
#include "kjtagdialog.h"
#include <kfiledialog.h>
#include <kmessagebox.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <ksimpleconfig.h>
#include <khelpmenu.h>
#include <kaboutdata.h>
@@ -104,17 +104,17 @@ KPicoSim::KPicoSim() : KMainWindow( 0, "KPicoSim" )
// set the shell's ui resource file
// setXMLFile("kpicosimui.rc");
- m_splitter = new QSplitter( this ) ;
- m_tabWidget = new QTabWidget( m_splitter ) ;
+ m_splitter = new TQSplitter( this ) ;
+ m_tabWidget = new TQTabWidget( m_splitter ) ;
m_editor = new CodeEditor( m_tabWidget ) ;
m_messages = new KListView( m_splitter, "messages" ) ;
- m_simulator = new KSimulator( this ) ;
+ m_simulator = new KSimulator( TQT_TQOBJECT(this) ) ;
m_processorView = new KProcessorView( this ) ;
m_tabWidget->addTab( m_editor, "Source" ) ;
addDockWindow( m_processorView, DockLeft ) ;
- m_splitter->setOrientation( QSplitter::Vertical ) ;
+ m_splitter->setOrientation( Qt::Vertical ) ;
setCentralWidget( m_splitter ) ;
m_messages->setAllColumnsShowFocus( true ) ;
m_messages->setFullWidth( true ) ;
@@ -125,28 +125,28 @@ KPicoSim::KPicoSim() : KMainWindow( 0, "KPicoSim" )
KToolBar *toolbar = new KToolBar( this ) ;
addDockWindow( toolbar ) ;
- toolbar->insertButton( "filenew", -1, SIGNAL( clicked() ), m_editor, SLOT( slotNewFile() ), true, "New" ) ;
- toolbar->insertButton( "fileopen", -1, SIGNAL( clicked() ), m_editor, SLOT( slotOpen() ), true, "Open" ) ;
- toolbar->insertButton( "filesave", -1, SIGNAL( clicked() ), m_editor, SLOT( slotSave() ), true, "Save" ) ;
- toolbar->insertButton( "filesaveas", -1, SIGNAL( clicked() ), m_editor, SLOT( slotSaveAs() ), true, "Save As" ) ;
+ toolbar->insertButton( "filenew", -1, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(m_editor), TQT_SLOT( slotNewFile() ), true, "New" ) ;
+ toolbar->insertButton( "fileopen", -1, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(m_editor), TQT_SLOT( slotOpen() ), true, "Open" ) ;
+ toolbar->insertButton( "filesave", -1, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(m_editor), TQT_SLOT( slotSave() ), true, "Save" ) ;
+ toolbar->insertButton( "filesaveas", -1, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(m_editor), TQT_SLOT( slotSaveAs() ), true, "Save As" ) ;
m_debugBar = new KToolBar( this ) ;
addDockWindow( m_debugBar ) ;
- m_debugBar->insertButton( UserIcon( "rebuild" ), COMPILE_ID, SIGNAL( clicked() ), this, SLOT( compile() ), true, "Compile" ) ;
- m_debugBar->insertButton( "run", START_SIM_ID, SIGNAL( clicked() ), this, SLOT( startSim() ), true, "Start/Stop Debug" ) ;
+ m_debugBar->insertButton( UserIcon( "rebuild" ), COMPILE_ID, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( compile() ), true, "Compile" ) ;
+ m_debugBar->insertButton( "run", START_SIM_ID, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( startSim() ), true, "Start/Stop Debug" ) ;
m_debugBar->insertSeparator() ;
- m_debugBar->insertButton( UserIcon( "continue" ), RUN_ID, SIGNAL( clicked() ), this, SLOT( startStop() ), false, "Continue" ) ;
+ m_debugBar->insertButton( UserIcon( "continue" ), RUN_ID, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( startStop() ), false, "Continue" ) ;
- m_debugBar->insertButton( UserIcon( "next" ), NEXT_ID, SIGNAL( clicked() ), m_simulator, SLOT( next() ), false, "Next" ) ;
- m_debugBar->insertButton( UserIcon( "interrupt" ), INTERRUPT_ID, SIGNAL( clicked() ), m_simulator, SLOT( interrupt() ), false, "Interrupt" ) ;
- m_debugBar->insertButton( UserIcon( "reset" ), RESET_ID, SIGNAL( clicked() ), m_simulator, SLOT( reset() ), false, "Reset" ) ;
+ m_debugBar->insertButton( UserIcon( "next" ), NEXT_ID, TQT_SIGNAL( clicked() ), m_simulator, TQT_SLOT( next() ), false, "Next" ) ;
+ m_debugBar->insertButton( UserIcon( "interrupt" ), INTERRUPT_ID, TQT_SIGNAL( clicked() ), m_simulator, TQT_SLOT( interrupt() ), false, "Interrupt" ) ;
+ m_debugBar->insertButton( UserIcon( "reset" ), RESET_ID, TQT_SIGNAL( clicked() ), m_simulator, TQT_SLOT( reset() ), false, "Reset" ) ;
- connect( this, SIGNAL( run() ), m_simulator, SLOT( run() ) );
- connect( this, SIGNAL( stop() ), m_simulator, SLOT( stop() ) ) ;
- connect( m_simulator, SIGNAL( stepped( unsigned int ) ), this, SLOT( stepped( unsigned int ) ) ) ;
- connect( m_processorView, SIGNAL( processorRegsChanged() ), this, SLOT( updateProcessorRegs() ) ) ;
- connect( m_processorView, SIGNAL( processorFlagsChanged() ), this, SLOT( updateProcessorFlags() ) ) ;
- connect( m_messages, SIGNAL( clicked( QListViewItem * ) ), this, SLOT( messageListClicked( QListViewItem * ) ) ) ;
+ connect( TQT_TQOBJECT(this), TQT_SIGNAL( run() ), m_simulator, TQT_SLOT( run() ) );
+ connect( TQT_TQOBJECT(this), TQT_SIGNAL( stop() ), m_simulator, TQT_SLOT( stop() ) ) ;
+ connect( m_simulator, TQT_SIGNAL( stepped( unsigned int ) ), TQT_TQOBJECT(this), TQT_SLOT( stepped( unsigned int ) ) ) ;
+ connect( m_processorView, TQT_SIGNAL( processorRegsChanged() ), TQT_TQOBJECT(this), TQT_SLOT( updateProcessorRegs() ) ) ;
+ connect( m_processorView, TQT_SIGNAL( processorFlagsChanged() ), TQT_TQOBJECT(this), TQT_SLOT( updateProcessorFlags() ) ) ;
+ connect( m_messages, TQT_SIGNAL( clicked( TQListViewItem * ) ), TQT_TQOBJECT(this), TQT_SLOT( messageListClicked( TQListViewItem * ) ) ) ;
m_messages->addColumn( "Line" ) ;
m_messages->addColumn( "Description" ) ;
@@ -157,9 +157,9 @@ KPicoSim::KPicoSim() : KMainWindow( 0, "KPicoSim" )
m_scratchpadView = NULL ;
m_serialView = NULL ;
- statusBar()->insertItem( QString( "Mode: Edit" ), 0 ) ;
- statusBar()->insertItem( QString( "Status: Stopped" ), 1 ) ;
- statusBar()->insertItem( QString( "Instructions: 0" ), 2 ) ;
+ statusBar()->insertItem( TQString( "Mode: Edit" ), 0 ) ;
+ statusBar()->insertItem( TQString( "tqStatus: Stopped" ), 1 ) ;
+ statusBar()->insertItem( TQString( "Instructions: 0" ), 2 ) ;
m_templateFile = "" ;
m_outputDir = "" ;
@@ -176,62 +176,62 @@ void KPicoSim::buildMenu()
KPopupMenu * exportMenu = new KPopupMenu( this ) ;
- exportMenu->insertItem( "VHDL", this, SLOT( fileExportVHDL() ) ) ;
-// exportMenu->insertItem( "COE", this, SLOT( fileExportCOE() ) ) ;
- exportMenu->insertItem( "MEM", this, SLOT( fileExportMEM() ) ) ;
- exportMenu->insertItem( "HEX", this, SLOT( fileExportHEX() ) ) ;
+ exportMenu->insertItem( "VHDL", TQT_TQOBJECT(this), TQT_SLOT( fileExportVHDL() ) ) ;
+// exportMenu->insertItem( "COE", TQT_TQOBJECT(this), TQT_SLOT( fileExportCOE() ) ) ;
+ exportMenu->insertItem( "MEM", TQT_TQOBJECT(this), TQT_SLOT( fileExportMEM() ) ) ;
+ exportMenu->insertItem( "HEX", TQT_TQOBJECT(this), TQT_SLOT( fileExportHEX() ) ) ;
m_fileMenu = new KPopupMenu( this ) ;
- m_fileMenu->insertItem( ldr->loadIcon( "filenew", KIcon::Small ), "New", this, SLOT( slotFileNew() ) ) ;
- m_fileMenu->insertItem( ldr->loadIcon( "fileopen", KIcon::Small ), "Open", m_editor, SLOT( slotOpen() ) ) ;
+ m_fileMenu->insertItem( ldr->loadIcon( "filenew", KIcon::Small ), "New", TQT_TQOBJECT(this), TQT_SLOT( slotFileNew() ) ) ;
+ m_fileMenu->insertItem( ldr->loadIcon( "fileopen", KIcon::Small ), "Open", TQT_TQOBJECT(m_editor), TQT_SLOT( slotOpen() ) ) ;
m_fileMenu->insertSeparator() ;
- m_fileMenu->insertItem( ldr->loadIcon( "filesave", KIcon::Small ), "Save", m_editor, SLOT( slotSave() ), QKeySequence::QKeySequence( "CTRL+S" ) ) ;
- m_fileMenu->insertItem( ldr->loadIcon( "filesaveas", KIcon::Small ), "Save As...", m_editor, SLOT( slotSaveAs() ) ) ;
+ m_fileMenu->insertItem( ldr->loadIcon( "filesave", KIcon::Small ), "Save", TQT_TQOBJECT(m_editor), TQT_SLOT( slotSave() ), TQKeySequence::TQKeySequence( "CTRL+S" ) ) ;
+ m_fileMenu->insertItem( ldr->loadIcon( "filesaveas", KIcon::Small ), "Save As...", TQT_TQOBJECT(m_editor), TQT_SLOT( slotSaveAs() ) ) ;
m_fileMenu->insertSeparator() ;
- m_fileMenu->insertItem( ldr->loadIcon( "fileprint", KIcon::Small ), "Print...", m_editor, SLOT( slotPrint() ), QKeySequence::QKeySequence( "CTRL+P" ) ) ;
+ m_fileMenu->insertItem( ldr->loadIcon( "fileprint", KIcon::Small ), "Print...", TQT_TQOBJECT(m_editor), TQT_SLOT( slotPrint() ), TQKeySequence::TQKeySequence( "CTRL+P" ) ) ;
m_fileMenu->insertSeparator() ;
m_fileMenu->insertItem( "Export", exportMenu ) ;
m_fileMenu->insertSeparator() ;
- m_fileMenu->insertItem( ldr->loadIcon( "fileclose", KIcon::Small ), "Quit", this, SLOT( slotClose() ) ) ;
+ m_fileMenu->insertItem( ldr->loadIcon( "fileclose", KIcon::Small ), "Quit", TQT_TQOBJECT(this), TQT_SLOT( slotClose() ) ) ;
m_editMenu = new KPopupMenu( this ) ;
- m_editMenu->insertItem( ldr->loadIcon( "undo", KIcon::Small ), "Undo", m_editor, SLOT( slotUndo() ),QKeySequence::QKeySequence( "CTRL+Z" ) ) ;
- m_editMenu->insertItem( ldr->loadIcon( "redo", KIcon::Small ), "Redo", m_editor, SLOT( slotRedo() ),QKeySequence::QKeySequence( "CTRL+SHIFT+Z" ) ) ;
+ m_editMenu->insertItem( ldr->loadIcon( "undo", KIcon::Small ), "Undo", TQT_TQOBJECT(m_editor), TQT_SLOT( slotUndo() ),TQKeySequence::TQKeySequence( "CTRL+Z" ) ) ;
+ m_editMenu->insertItem( ldr->loadIcon( "redo", KIcon::Small ), "Redo", TQT_TQOBJECT(m_editor), TQT_SLOT( slotRedo() ),TQKeySequence::TQKeySequence( "CTRL+SHIFT+Z" ) ) ;
m_editMenu->insertSeparator() ;
- m_editMenu->insertItem( "Select All", m_editor, SLOT( slotSelectAll() ),QKeySequence::QKeySequence( "CTRL+A" ) ) ;
+ m_editMenu->insertItem( "Select All", TQT_TQOBJECT(m_editor), TQT_SLOT( slotSelectAll() ),TQKeySequence::TQKeySequence( "CTRL+A" ) ) ;
m_editMenu->insertSeparator() ;
- m_editMenu->insertItem( ldr->loadIcon( "editcut", KIcon::Small ), "Cut", m_editor, SLOT( slotCut() ),QKeySequence::QKeySequence( "CTRL+X" ) ) ;
- m_editMenu->insertItem( ldr->loadIcon( "editcopy", KIcon::Small ), "Copy", m_editor, SLOT( slotCopy() ),QKeySequence::QKeySequence( "CTRL+C" ) ) ;
- m_editMenu->insertItem( ldr->loadIcon( "editpaste", KIcon::Small ), "Paste", m_editor, SLOT( slotPaste() ),QKeySequence::QKeySequence( "CTRL+V" ) ) ;
+ m_editMenu->insertItem( ldr->loadIcon( "editcut", KIcon::Small ), "Cut", TQT_TQOBJECT(m_editor), TQT_SLOT( slotCut() ),TQKeySequence::TQKeySequence( "CTRL+X" ) ) ;
+ m_editMenu->insertItem( ldr->loadIcon( "editcopy", KIcon::Small ), "Copy", TQT_TQOBJECT(m_editor), TQT_SLOT( slotCopy() ),TQKeySequence::TQKeySequence( "CTRL+C" ) ) ;
+ m_editMenu->insertItem( ldr->loadIcon( "editpaste", KIcon::Small ), "Paste", TQT_TQOBJECT(m_editor), TQT_SLOT( slotPaste() ),TQKeySequence::TQKeySequence( "CTRL+V" ) ) ;
m_editMenu->insertSeparator() ;
- m_editMenu->insertItem( ldr->loadIcon( "find", KIcon::Small ), "Find...", m_editor, SLOT( slotFind() ), QKeySequence::QKeySequence( "CTRL+F" ) ) ;
- m_editMenu->insertItem( "Find Next", m_editor, SLOT( slotFindNext() ), QKeySequence::QKeySequence( "F3" ) ) ;
+ m_editMenu->insertItem( ldr->loadIcon( "tqfind", KIcon::Small ), "Find...", TQT_TQOBJECT(m_editor), TQT_SLOT( slotFind() ), TQKeySequence::TQKeySequence( "CTRL+F" ) ) ;
+ m_editMenu->insertItem( "Find Next", TQT_TQOBJECT(m_editor), TQT_SLOT( slotFindNext() ), TQKeySequence::TQKeySequence( "F3" ) ) ;
m_debugMenu = new KPopupMenu( this ) ;
m_debugMenu->insertSeparator() ;
- m_debugMenu->insertItem( ldr->loadIcon( "rebuild", KIcon::Small ), "Compile", this, SLOT( compile() ), QKeySequence::QKeySequence( "SHIFT+F9" ) ) ;
- m_debugMenu->insertItem( ldr->loadIcon( "run", KIcon::Small ), "Start Debug", this, SLOT( startSim() ), QKeySequence::QKeySequence( "F9" ) , START_SIM_ID ) ;
+ m_debugMenu->insertItem( ldr->loadIcon( "rebuild", KIcon::Small ), "Compile", TQT_TQOBJECT(this), TQT_SLOT( compile() ), TQKeySequence::TQKeySequence( "SHIFT+F9" ) ) ;
+ m_debugMenu->insertItem( ldr->loadIcon( "run", KIcon::Small ), "Start Debug", TQT_TQOBJECT(this), TQT_SLOT( startSim() ), TQKeySequence::TQKeySequence( "F9" ) , START_SIM_ID ) ;
m_debugMenu->insertSeparator() ;
- m_debugMenu->insertItem( "Continue", this, SLOT( startStop() ), QKeySequence::QKeySequence( "F10" ) , RUN_ID ) ;
- m_debugMenu->insertItem( "Next", m_simulator, SLOT( next() ), QKeySequence::QKeySequence( "F5" ) , NEXT_ID ) ;
- m_debugMenu->insertItem( "Interrupt", m_simulator, SLOT( interrupt() ), QKeySequence::QKeySequence( "F4" ) , INTERRUPT_ID ) ;
- m_debugMenu->insertItem( "Reset", m_simulator, SLOT( reset() ), QKeySequence::QKeySequence( "F11" ) , RESET_ID ) ;
+ m_debugMenu->insertItem( "Continue", TQT_TQOBJECT(this), TQT_SLOT( startStop() ), TQKeySequence::TQKeySequence( "F10" ) , RUN_ID ) ;
+ m_debugMenu->insertItem( "Next", m_simulator, TQT_SLOT( next() ), TQKeySequence::TQKeySequence( "F5" ) , NEXT_ID ) ;
+ m_debugMenu->insertItem( "Interrupt", m_simulator, TQT_SLOT( interrupt() ), TQKeySequence::TQKeySequence( "F4" ) , INTERRUPT_ID ) ;
+ m_debugMenu->insertItem( "Reset", m_simulator, TQT_SLOT( reset() ), TQKeySequence::TQKeySequence( "F11" ) , RESET_ID ) ;
m_debugMenu->insertSeparator() ;
- m_debugMenu->insertItem( "Toggle Breakpoint", m_editor, SLOT( slotToggleBreakpoint() ), QKeySequence::QKeySequence( "F8" ) ) ;
+ m_debugMenu->insertItem( "Toggle Breakpoint", TQT_TQOBJECT(m_editor), TQT_SLOT( slotToggleBreakpoint() ), TQKeySequence::TQKeySequence( "F8" ) ) ;
m_settingsMenu = new KPopupMenu( this ) ;
- m_settingsMenu->insertItem( "Configure Editor...", m_editor, SLOT( slotShowConfig() ) ) ;
+ m_settingsMenu->insertItem( "Configure Editor...", TQT_TQOBJECT(m_editor), TQT_SLOT( slotShowConfig() ) ) ;
m_peripheralMenu = new KPopupMenu( this ) ;
- m_peripheralMenu->insertItem( "I/O Port", this, SLOT( newIOPort() ) ) ;
- m_peripheralMenu->insertItem( "Scratchpad", this, SLOT( showScratchpad() ), 0, VIEW_SCRATCHPAD_ID ) ;
- m_peripheralMenu->insertItem( "Serial port", this, SLOT( showSerialPort() ), 0, VIEW_SERIAL_ID ) ;
+ m_peripheralMenu->insertItem( "I/O Port", TQT_TQOBJECT(this), TQT_SLOT( newIOPort() ) ) ;
+ m_peripheralMenu->insertItem( "Scratchpad", TQT_TQOBJECT(this), TQT_SLOT( showScratchpad() ), 0, VIEW_SCRATCHPAD_ID ) ;
+ m_peripheralMenu->insertItem( "Serial port", TQT_TQOBJECT(this), TQT_SLOT( showSerialPort() ), 0, VIEW_SERIAL_ID ) ;
m_jtagMenu = new KPopupMenu( this ) ;
- m_jtagMenu->insertItem( "Download", this, SLOT( jtagDownload() ) ) ;
+ m_jtagMenu->insertItem( "Download", TQT_TQOBJECT(this), TQT_SLOT( jtagDownload() ) ) ;
KAboutData *aboutData = new KAboutData(
"kpicosim",
@@ -294,24 +294,24 @@ void KPicoSim::fileExportCOE()
void KPicoSim::fileExportHEX()
{
- QString filename = KFileDialog::getSaveFileName( QString::null,
+ TQString filename = KFileDialog::getSaveFileName( TQString(),
"*.hex|HEX files\n*|All files",
this,
"Export HEX" ) ;
if ( filename != "" && compile() ) {
- m_simulator->exportHEX( filename, FALSE ) ;
+ m_simulator->exportHEX( filename.ascii(), FALSE ) ;
}
}
void KPicoSim::fileExportMEM()
{
- QString filename = KFileDialog::getSaveFileName( QString::null,
+ TQString filename = KFileDialog::getSaveFileName( TQString(),
"*.mem|MEM files\n*|All files",
this,
"Export MEM" ) ;
if ( filename != "" && compile() ) {
- m_simulator->exportHEX( filename, TRUE ) ;
+ m_simulator->exportHEX( filename.ascii(), TRUE ) ;
}
}
@@ -331,7 +331,7 @@ void KPicoSim::fileExportVHDL()
m_outputDir = dlg.getOutputDir() ;
m_entityName = dlg.getEntityName() ;
- if ( compile() && m_simulator->exportVHDL( m_templateFile, m_outputDir, m_entityName ) ) {
+ if ( compile() && m_simulator->exportVHDL( m_templateFile.ascii(), m_outputDir.ascii(), m_entityName.ascii() ) ) {
appendMessage( "File '" + m_outputDir + "/" + m_entityName + ".vhd' exported" ) ;
appendMessage( "Template file '" + m_templateFile + "' used" ) ;
appendMessage( "***Export Success***" ) ;
@@ -351,7 +351,7 @@ void KPicoSim::slotClose()
close() ;
}
-void KPicoSim::closeEvent( QCloseEvent * e )
+void KPicoSim::closeEvent( TQCloseEvent * e )
{
if ( m_editor->close() )
e->accept() ;
@@ -367,7 +367,7 @@ void KPicoSim::newIOPort()
KPortView * ioport = new KPortView( m_simulator->getCpu(), 0 ) ; /* port id is 0 */
// m_ioList.append( ioport ) ;
addDockWindow( ioport, DockRight ) ;
-// connect( ioport, SIGNAL( closing( KPortView* ) ), this, SLOT( removeIOPort( KPortView* ) ) ) ;
+// connect( ioport, TQT_SIGNAL( closing( KPortView* ) ), TQT_TQOBJECT(this), TQT_SLOT( removeIOPort( KPortView* ) ) ) ;
}
void KPicoSim::showSerialPort()
@@ -424,15 +424,15 @@ void KPicoSim::startStop()
m_debugMenu->changeItem( RUN_ID, "Stop" ) ;
m_editor->clearExecutionMarker() ;
m_simulator->run() ;
- statusBar()->changeItem( QString( "Status: Running" ), 1 ) ;
+ statusBar()->changeItem( TQString( "tqStatus: Running" ), 1 ) ;
m_debugBar->setButton( RUN_ID, true ) ;
} else {
m_simulator->stop() ;
updateViews() ;
m_debugMenu->changeItem( RUN_ID, "Continue" ) ;
m_editor->setExecutionMarker( m_simulator->getNextSourceLine() ) ;
- statusBar()->changeItem( QString( "Status: Stopped" ), 1 ) ;
- QString str ;
+ statusBar()->changeItem( TQString( "tqStatus: Stopped" ), 1 ) ;
+ TQString str ;
str.sprintf( "Instructions: %u", m_nrInstructions ) ;
statusBar()->changeItem( str, 2 ) ;
m_debugBar->setButton( RUN_ID, false ) ;
@@ -440,7 +440,7 @@ void KPicoSim::startStop()
}
}
-void KPicoSim::messageListClicked( QListViewItem *item )
+void KPicoSim::messageListClicked( TQListViewItem *item )
{
if ( item ) {
bool ok ;
@@ -472,7 +472,7 @@ void KPicoSim::updateViews()
updateScratchpadView() ;
- QString str ;
+ TQString str ;
str.sprintf( "Instructions: %u", m_nrInstructions ) ;
statusBar()->changeItem( str, 2 ) ;
}
@@ -502,9 +502,9 @@ void KPicoSim::stepped( unsigned int line )
}
}
-void KPicoSim::appendMessage( QString str )
+void KPicoSim::appendMessage( TQString str )
{
- QListViewItem *item = new QListViewItem( m_messages, m_messages->lastChild() ) ;
+ TQListViewItem *item = new TQListViewItem( m_messages, m_messages->lastChild() ) ;
item->setText( 0, "" ) ;
item->setText( 1, str ) ;
@@ -519,7 +519,7 @@ bool KPicoSim::compile()
return FALSE;
appendMessage( "File '" + m_editor->getFilename() + "' saved" ) ;
- m_simulator->setFilename( m_editor->getFilename() ) ;
+ m_simulator->setFilename( m_editor->getFilename().ascii() ) ;
if ( m_simulator->compile() == TRUE ) {
appendMessage( "***Compile Success*** " ) ;
@@ -557,9 +557,9 @@ void KPicoSim::startSim()
}
if ( m_simulationMode ) {
- statusBar()->changeItem( QString( "Mode: Debug" ), 0 ) ;
+ statusBar()->changeItem( TQString( "Mode: Debug" ), 0 ) ;
} else {
- statusBar()->changeItem( QString( "Mode: Edit" ), 0 ) ;
+ statusBar()->changeItem( TQString( "Mode: Edit" ), 0 ) ;
}
m_debugMenu->setItemEnabled( RUN_ID, m_simulationMode ) ;
@@ -593,7 +593,7 @@ void KPicoSim::closeGUI()
/*
config.writeEntry( "numIOPorts", m_ioList.count() ) ;
for ( int i = 0 ; i < m_ioList.count() ; i++ ) {
- QString group ;
+ TQString group ;
group.sprintf( "IO Port %d", i ) ;
m_ioList.at(i)->writeConfig( config, group ) ;
}
@@ -606,24 +606,24 @@ void KPicoSim::openGUI()
config.setGroup( "Peripherals" ) ;
- if ( config.readPropertyEntry( "serial", QVariant::Bool ).toBool() )
+ if ( config.readPropertyEntry( "serial", TQVariant::Bool ).toBool() )
showSerialPort() ;
- if ( config.readPropertyEntry( "scratchpad", QVariant::Bool ).toBool() )
+ if ( config.readPropertyEntry( "scratchpad", TQVariant::Bool ).toBool() )
showScratchpad() ;
m_editor->open( config.readEntry( "filename" ) ) ;
m_bitfile = config.readEntry( "bitfile" ) ;
/*
- int nports = config.readPropertyEntry( "numIOPorts", QVariant::Int ).toInt() ;
+ int nports = config.readPropertyEntry( "numIOPorts", TQVariant::Int ).toInt() ;
for ( int i = 0 ; i < nports ; i++ ) {
- QString group ;
+ TQString group ;
group.sprintf( "IO Port %d", i ) ;
KPortView * ioport = new KPortView( m_simulator->getCpu(), 0 ) ;
ioport->readConfig( config, group ) ;
m_ioList.append( ioport ) ;
addDockWindow( ioport, DockRight ) ;
- connect( ioport, SIGNAL( closing( KPortView* ) ), this, SLOT( removeIOPort( KPortView* ) ) ) ;
+ connect( ioport, TQT_SIGNAL( closing( KPortView* ) ), TQT_TQOBJECT(this), TQT_SLOT( removeIOPort( KPortView* ) ) ) ;
}
*/
}
diff --git a/src/kpicosim.h b/src/kpicosim.h
index 5ed9893..bfc8822 100755
--- a/src/kpicosim.h
+++ b/src/kpicosim.h
@@ -31,10 +31,10 @@
#include <kmainwindow.h>
#include <klistview.h>
-#include <qsplitter.h>
+#include <tqsplitter.h>
#include <kpopupmenu.h>
#include <ktoolbar.h>
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
#include "kprocessorview.h"
#include "kserialview.h"
#include "kscratchpadview.h"
@@ -43,6 +43,7 @@
class KPicoSim : public KMainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
KPicoSim();
virtual ~KPicoSim();
@@ -50,37 +51,37 @@ class KPicoSim : public KMainWindow
protected:
CodeEditor * m_editor ;
KListView * m_messages ;
- QSplitter * m_splitter ;
+ TQSplitter * m_splitter ;
KProcessorView * m_processorView ;
KSerialView *m_serialView ;
KScratchpadView *m_scratchpadView ;
- QTabWidget *m_tabWidget ;
+ TQTabWidget *m_tabWidget ;
KPopupMenu * m_fileMenu, * m_debugMenu, * m_settingsMenu, * m_editMenu, * m_peripheralMenu, *m_jtagMenu, *m_helpMenu ;
KSimulator * m_simulator ;
// Export to VHDL
- QString m_templateFile, m_outputDir, m_entityName ;
+ TQString m_templateFile, m_outputDir, m_entityName ;
bool m_simulationMode ;
unsigned int m_nrInstructions ;
- void appendMessage( QString str ) ;
+ void appendMessage( TQString str ) ;
void updateViews() ;
void updateScratchpadView() ;
- virtual void closeEvent( QCloseEvent *e ) ;
+ virtual void closeEvent( TQCloseEvent *e ) ;
void buildMenu() ;
void openGUI() ;
void closeGUI() ;
-// QPtrList<KPortView> m_ioList ;
- QString m_bitfile ;
+// TQPtrList<KPortView> m_ioList ;
+ TQString m_bitfile ;
- QPixmap m_runPxp, m_stopPxp ;
+ TQPixmap m_runPxp, m_stopPxp ;
KToolBar *m_debugBar ;
signals:
@@ -91,7 +92,7 @@ class KPicoSim : public KMainWindow
void startSim() ;
void startStop() ;
void stepped( unsigned int line ) ;
- void messageListClicked( QListViewItem * item ) ;
+ void messageListClicked( TQListViewItem * item ) ;
void updateProcessorRegs() ;
void updateProcessorFlags() ;
diff --git a/src/kport.h b/src/kport.h
index 6038826..16fcb7f 100755
--- a/src/kport.h
+++ b/src/kport.h
@@ -20,12 +20,13 @@
#ifndef KPORT_H
#define KPORT_H
-#include <qobject.h>
+#include <tqobject.h>
#include "cpicoblaze.h"
-class KPort : public QObject, public CIOPort
+class KPort : public TQObject, public CIOPort
{
Q_OBJECT
+ TQ_OBJECT
public:
KPort( unsigned char portID ) : CIOPort( portID ) {}
virtual ~KPort() {} ;
diff --git a/src/kportview.cpp b/src/kportview.cpp
index 7bf410e..f15a9a3 100755
--- a/src/kportview.cpp
+++ b/src/kportview.cpp
@@ -18,57 +18,57 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#include "kportview.h"
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
-KPortView::KPortView( CPicoBlaze *cpu, QWidget *parent, const char *name)
- : KToolBar(parent, name)
+KPortView::KPortView( CPicoBlaze *cpu, TQWidget *tqparent, const char *name)
+ : KToolBar(tqparent, name)
{
m_cpu = cpu ;
- QWidget *widget = new QWidget( this ) ;
+ TQWidget *widget = new TQWidget( this ) ;
widget->setMinimumSize( 200, 65 ) ;
- QLabel *label = new QLabel( "ID", widget ) ;
+ TQLabel *label = new TQLabel( "ID", widget ) ;
label->move( 3, 0 ) ;
- label = new QLabel( "b7", widget ) ;
+ label = new TQLabel( "b7", widget ) ;
label->move( 32, 0 ) ;
- label = new QLabel( "b0", widget ) ;
+ label = new TQLabel( "b0", widget ) ;
label->move( 137, 0 ) ;
- label = new QLabel( "I", widget ) ;
+ label = new TQLabel( "I", widget ) ;
label->move( 160, 0 ) ;
- label = new QLabel( "O", widget ) ;
+ label = new TQLabel( "O", widget ) ;
label->move( 175, 0 ) ;
m_editID = new KLineEdit( widget ) ;
m_editID->setText( "0" ) ;
m_editID->setFixedSize( 30, 20 ) ;
m_editID->move( 2, 22 );
- connect( m_editID, SIGNAL( textChanged( const QString &) ), this, SLOT( setID( const QString &) ) ) ;
+ connect( m_editID, TQT_SIGNAL( textChanged( const TQString &) ), this, TQT_SLOT( setID( const TQString &) ) ) ;
int i ;
for ( i = 0 ; i < 8 ; i++ ) {
- m_bits[ i ] = new QCheckBox( widget ) ;
+ m_bits[ i ] = new TQCheckBox( widget ) ;
m_bits[ i ]->move( 35 + i * 15, 22 ) ;
}
- m_readable = new QCheckBox( widget ) ;
+ m_readable = new TQCheckBox( widget ) ;
m_readable->move( 160, 22 ) ;
- m_writeable = new QCheckBox( widget ) ;
+ m_writeable = new TQCheckBox( widget ) ;
m_writeable->move( 175, 22 ) ;
m_port = new KPort( 0 ) ;
m_cpu->addPort( m_port ) ;
- connect( m_port, SIGNAL( read() ), this, SLOT( read() ) ) ;
- connect( m_port, SIGNAL( write(unsigned char) ), this, SLOT( write(unsigned char) ) ) ;
- connect( m_readable, SIGNAL( toggled(bool) ), this, SLOT( readableToggled(bool) ) ) ;
- connect( m_writeable, SIGNAL( toggled(bool) ), this, SLOT( writeableToggled(bool) ) ) ;
+ connect( m_port, TQT_SIGNAL( read() ), this, TQT_SLOT( read() ) ) ;
+ connect( m_port, TQT_SIGNAL( write(unsigned char) ), this, TQT_SLOT( write(unsigned char) ) ) ;
+ connect( m_readable, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( readableToggled(bool) ) ) ;
+ connect( m_writeable, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( writeableToggled(bool) ) ) ;
setWidget( widget ) ;
setCloseMode( Always ) ;
@@ -88,14 +88,14 @@ KPortView::~KPortView()
m_cpu->deletePort( m_port ) ;
}
/*
-void KPortView::closeEvent ( QCloseEvent * e )
+void KPortView::closeEvent ( TQCloseEvent * e )
{
emit closing( this ) ;
}
*/
-void KPortView::setID( const QString &newID )
+void KPortView::setID( const TQString &newID )
{
- QString str ;
+ TQString str ;
bool ok ;
int id ;
@@ -106,7 +106,7 @@ void KPortView::setID( const QString &newID )
m_editID->setText( newID ) ;
m_editID->setBackgroundColor( m_backgroundColor ) ;
} else {
- m_editID->setBackgroundColor( QColor( 255, 128, 128 ) ) ;
+ m_editID->setBackgroundColor( TQColor( 255, 128, 128 ) ) ;
}
@@ -116,7 +116,7 @@ void KPortView::setID( const QString &newID )
}*/
}
-QString KPortView::id()
+TQString KPortView::id()
{
return m_editID->text() ;
}
@@ -159,20 +159,20 @@ void KPortView::writeableToggled( bool on )
m_port->setMode( mode ) ;
}
-void KPortView::readConfig( KSimpleConfig &config, QString group )
+void KPortView::readConfig( KSimpleConfig &config, TQString group )
{
config.setGroup( group ) ;
- int mode = config.readPropertyEntry( "Mode", QVariant::Int ).toInt() ;
+ int mode = config.readPropertyEntry( "Mode", TQVariant::Int ).toInt() ;
m_port->setMode( mode ) ;
m_readable->setChecked( (mode & PortReadable) != 0 ) ;
m_writeable->setChecked( (mode & PortWriteable ) != 0 ) ;
- QString id = config.readEntry( "Id" ) ;
+ TQString id = config.readEntry( "Id" ) ;
setID( id ) ;
}
-void KPortView::writeConfig( KSimpleConfig &config, QString group )
+void KPortView::writeConfig( KSimpleConfig &config, TQString group )
{
config.setGroup( group ) ;
diff --git a/src/kportview.h b/src/kportview.h
index b4f2f0c..98d5656 100755
--- a/src/kportview.h
+++ b/src/kportview.h
@@ -21,7 +21,7 @@
#define KPORTVIEW_H
#include <ktoolbar.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <klineedit.h>
#include "kport.h"
#include <ksimpleconfig.h>
@@ -29,8 +29,9 @@
class KPortView : public KToolBar
{
Q_OBJECT
+ TQ_OBJECT
public:
- KPortView( CPicoBlaze *cpu, QWidget *parent = 0, const char *name = 0);
+ KPortView( CPicoBlaze *cpu, TQWidget *tqparent = 0, const char *name = 0);
~KPortView();
KPort * m_port ;
@@ -42,24 +43,24 @@ class KPortView : public KToolBar
void writeableToggled( bool on ) ;
void readableToggled( bool on ) ;
- void setID( const QString & newID ) ;
- QString id() ;
+ void setID( const TQString & newID ) ;
+ TQString id() ;
- void readConfig( KSimpleConfig &config, QString group ) ;
- void writeConfig( KSimpleConfig &config, QString group ) ;
+ void readConfig( KSimpleConfig &config, TQString group ) ;
+ void writeConfig( KSimpleConfig &config, TQString group ) ;
signals:
// void closing( KPortView *ioport ) ;
protected:
-// virtual void closeEvent ( QCloseEvent * e ) ;
+// virtual void closeEvent ( TQCloseEvent * e ) ;
- QCheckBox * m_bits[ 8 ], * m_readable, * m_writeable ;
+ TQCheckBox * m_bits[ 8 ], * m_readable, * m_writeable ;
KLineEdit * m_editID ;
CPicoBlaze * m_cpu ;
- QColor m_backgroundColor ;
+ TQColor m_backgroundColor ;
};
diff --git a/src/kprocessorview.cpp b/src/kprocessorview.cpp
index f54469a..717bfa2 100755
--- a/src/kprocessorview.cpp
+++ b/src/kprocessorview.cpp
@@ -1,32 +1,32 @@
#include "kprocessorview.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qscrollview.h>
-#include <qsize.h>
-#include <qmessagebox.h>
-#include <qpopupmenu.h>
-#include <qcursor.h>
-
-MyListView::MyListView(QWidget *parent) : KListView(parent)
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqscrollview.h>
+#include <tqsize.h>
+#include <tqmessagebox.h>
+#include <tqpopupmenu.h>
+#include <tqcursor.h>
+
+MyListView::MyListView(TQWidget *tqparent) : KListView(tqparent)
{
- connect( this, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & ) ),
- SLOT( slotContextMenu( KListView *, QListViewItem *, const QPoint & ) ) );
+ connect( this, TQT_SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & ) ),
+ TQT_SLOT( slotContextMenu( KListView *, TQListViewItem *, const TQPoint & ) ) );
}
MyListView::~MyListView()
{
}
-void MyListView::slotContextMenu( KListView *, QListViewItem *, const QPoint & )
+void MyListView::slotContextMenu( KListView *, TQListViewItem *, const TQPoint & )
{
// mousePressEvent( NULL ) ;
emit showPopupMenu() ;
}
/*
-void MyListView::mousePressEvent( QMouseEvent * event )
+void MyListView::mousePressEvent( TQMouseEvent * event )
{
- //QMessageBox::information( this, "information", "mouse pressed" ) ;
+ //TQMessageBox::information( this, "information", "mouse pressed" ) ;
// if ( event->button() == RightButton )
emit showPopupMenu() ;
@@ -35,15 +35,15 @@ void MyListView::mousePressEvent( QMouseEvent * event )
}
*/
-KProcessorView::KProcessorView(QWidget *parent, const char *name)
- : KToolBar(parent)
+KProcessorView::KProcessorView(TQWidget *tqparent, const char *name)
+ : KToolBar(tqparent)
{
name = name ; // avoid compiler warning
view = new MyListView( this ) ;
- connect( view, SIGNAL( itemRenamed( QListViewItem*) ), this, SLOT( slotItemRenamed(QListViewItem*) ) ) ;
- connect( view, SIGNAL( showPopupMenu() ), this, SLOT( showPopupMenu() ) ) ;
+ connect( view, TQT_SIGNAL( itemRenamed( TQListViewItem*) ), this, TQT_SLOT( slotItemRenamed(TQListViewItem*) ) ) ;
+ connect( view, TQT_SIGNAL( showPopupMenu() ), this, TQT_SLOT( showPopupMenu() ) ) ;
view->addColumn( "Register" ) ;
view->addColumn( "Value" ) ;
@@ -57,29 +57,29 @@ KProcessorView::KProcessorView(QWidget *parent, const char *name)
int i ;
char str[ 128 ] ;
- QListViewItem *cpu = new QListViewItem( view ) ;
+ TQListViewItem *cpu = new TQListViewItem( view ) ;
cpu->setText( 0, "CPU" ) ;
- QListViewItem *flags = new QListViewItem( cpu ) ;
+ TQListViewItem *flags = new TQListViewItem( cpu ) ;
flags->setText( 0, "Flags" ) ;
- zeroFlag = new QListViewItem( flags ) ;
+ zeroFlag = new TQListViewItem( flags ) ;
zeroFlag->setText( 0, "Zero" ) ;
zeroFlag->setText( 1, "0" ) ;
- carryFlag = new QListViewItem( flags ) ;
+ carryFlag = new TQListViewItem( flags ) ;
carryFlag->setText( 0, "Carry" ) ;
carryFlag->setText( 1, "0" ) ;
- ieFlag = new QListViewItem( flags ) ;
+ ieFlag = new TQListViewItem( flags ) ;
ieFlag->setText( 0, "IE" ) ;
ieFlag->setText( 1, "0" ) ;
- QListViewItem *reg = new QListViewItem( cpu ) ;
+ TQListViewItem *reg = new TQListViewItem( cpu ) ;
reg->setText( 0, "Registers" ) ;
for ( i = 0 ; i < 16 ; i++ ) {
- regs[ i ] = new QListViewItem( reg ) ;
+ regs[ i ] = new TQListViewItem( reg ) ;
sprintf( str, "s%X", i ) ;
regs[ i ]->setText( 0, str ) ;
regs[ i ]->setText( 1, "0" ) ;
@@ -103,13 +103,13 @@ void KProcessorView::slotHexMode()
void KProcessorView::showPopupMenu()
{
- QPopupMenu *menu = new QPopupMenu( this ) ;
- menu->insertItem( "Hexadecimal", this, SLOT( slotHexMode() ), 0, 1 ) ;
+ TQPopupMenu *menu = new TQPopupMenu( this ) ;
+ menu->insertItem( "Hexadecimal", this, TQT_SLOT( slotHexMode() ), 0, 1 ) ;
menu->setItemChecked( 1, m_bHexMode ) ;
- menu->exec( QCursor::pos() );
+ menu->exec( TQCursor::pos() );
}
-void KProcessorView::slotItemRenamed( QListViewItem * item )
+void KProcessorView::slotItemRenamed( TQListViewItem * item )
{
int i, value, base ;
bool ok ;
@@ -125,7 +125,7 @@ void KProcessorView::slotItemRenamed( QListViewItem * item )
value = item->text(1).toInt( &ok, base ) ;
if ( !ok || value < 0 || value > 255 ) {
- QMessageBox::warning( parentWidget(), "Modify register", "Value should be between 0-255" ) ;
+ TQMessageBox::warning( tqparentWidget(), "Modify register", "Value should be between 0-255" ) ;
view->rename( item, 1 ) ;
} else {
emit processorRegsChanged() ;
@@ -137,13 +137,13 @@ void KProcessorView::slotItemRenamed( QListViewItem * item )
if ( zeroFlag == item || carryFlag == item || ieFlag == item ) {
value = item->text(1).toInt( &ok ) ;
if ( !ok || value < 0 || value > 1 ) {
- QMessageBox::warning( parentWidget(), "Modify flag", "Value should be between 0-1" ) ;
+ TQMessageBox::warning( tqparentWidget(), "Modify flag", "Value should be between 0-1" ) ;
} else
emit processorFlagsChanged() ;
}
}
-void KProcessorView::resizeEvent( QResizeEvent *event )
+void KProcessorView::resizeEvent( TQResizeEvent *event )
{
event = event ;
// view->resize( width() - 10, height() - 10 ) ;
@@ -169,7 +169,7 @@ void KProcessorView::setRegisterValues( unsigned char *values )
if ( m_bHexMode ) base = 16 ;
else base = 10 ;
- QString str;
+ TQString str;
for ( i = 0 ; i < 16 ; i++ ) {
str.setNum( values[ i ], base ) ;
regs[ i ]->setText( 1, str ) ;
diff --git a/src/kprocessorview.h b/src/kprocessorview.h
index ae4b6fc..ae21e3d 100755
--- a/src/kprocessorview.h
+++ b/src/kprocessorview.h
@@ -4,22 +4,23 @@
#include <ktoolbar.h>
#include <knuminput.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <klistview.h>
class MyListView : public KListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- MyListView(QWidget *parent) ;
+ MyListView(TQWidget *tqparent) ;
~MyListView() ;
protected:
-// virtual void mousePressEvent( QMouseEvent *event ) ;
+// virtual void mousePressEvent( TQMouseEvent *event ) ;
public slots:
- void slotContextMenu( KListView *, QListViewItem *, const QPoint & ) ;
+ void slotContextMenu( KListView *, TQListViewItem *, const TQPoint & ) ;
signals:
void showPopupMenu() ;
@@ -29,8 +30,9 @@ class MyListView : public KListView
class KProcessorView : public KToolBar
{
Q_OBJECT
+ TQ_OBJECT
public:
- KProcessorView(QWidget *parent = 0, const char *name = 0);
+ KProcessorView(TQWidget *tqparent = 0, const char *name = 0);
~KProcessorView();
void setRegisterValues( unsigned char *values ) ;
@@ -40,7 +42,7 @@ class KProcessorView : public KToolBar
unsigned char getFlags() ;
public slots:
- void slotItemRenamed( QListViewItem * item ) ;
+ void slotItemRenamed( TQListViewItem * item ) ;
void slotHexMode() ;
void showPopupMenu() ;
@@ -49,12 +51,12 @@ class KProcessorView : public KToolBar
void processorFlagsChanged() ;
private:
- virtual void resizeEvent( QResizeEvent *event ) ;
+ virtual void resizeEvent( TQResizeEvent *event ) ;
protected:
MyListView *view ;
- QListViewItem * regs[ 16 ] ;
- QListViewItem * zeroFlag, * carryFlag, * ieFlag ;
+ TQListViewItem * regs[ 16 ] ;
+ TQListViewItem * zeroFlag, * carryFlag, * ieFlag ;
bool m_bHexMode ;
};
diff --git a/src/kscratchpadview.cpp b/src/kscratchpadview.cpp
index fffe989..b52a5ce 100755
--- a/src/kscratchpadview.cpp
+++ b/src/kscratchpadview.cpp
@@ -19,11 +19,11 @@
***************************************************************************/
#include "kscratchpadview.h"
-KScratchpadView::KScratchpadView( QWidget *parent, const char *name)
- : KToolBar(parent, name)
+KScratchpadView::KScratchpadView( TQWidget *tqparent, const char *name)
+ : KToolBar(tqparent, name)
{
view = new KTextEdit( this ) ;
- view->setFont( QFont( "Courier", view->font().pointSize() ) ) ;
+ view->setFont( TQFont( "Courier", view->font().pointSize() ) ) ;
view->setReadOnly( true ) ;
setWidget( view ) ;
@@ -39,7 +39,7 @@ void KScratchpadView::setContent( unsigned char *values, unsigned int len )
{
unsigned int i, val ;
- QString text, str ;
+ TQString text, str ;
text = "Scratchpad" ;
for ( i = 0 ; i < len ; i++ ) {
diff --git a/src/kscratchpadview.h b/src/kscratchpadview.h
index eebc00c..205ce3c 100755
--- a/src/kscratchpadview.h
+++ b/src/kscratchpadview.h
@@ -26,8 +26,9 @@
class KScratchpadView : public KToolBar
{
Q_OBJECT
+ TQ_OBJECT
public:
- KScratchpadView(QWidget *parent = 0, const char *name = 0);
+ KScratchpadView(TQWidget *tqparent = 0, const char *name = 0);
~KScratchpadView();
void setContent( unsigned char *values, unsigned int len ) ;
diff --git a/src/kserialview.cpp b/src/kserialview.cpp
index 6ce0457..2239c2b 100755
--- a/src/kserialview.cpp
+++ b/src/kserialview.cpp
@@ -18,12 +18,12 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#include "kserialview.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qframe.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqframe.h>
-KSerialView::KSerialView( CPicoBlaze *cpu, QWidget * parent ) : QWidget( parent )
+KSerialView::KSerialView( CPicoBlaze *cpu, TQWidget * tqparent ) : TQWidget( tqparent )
{
m_cpu = cpu ;
@@ -37,29 +37,29 @@ KSerialView::KSerialView( CPicoBlaze *cpu, QWidget * parent ) : QWidget( parent
statusPort->setMode( PortReadable ) ;
view = new KSerialWindow( this ) ;
- QWidget *settings = new QWidget( this ) ;
+ TQWidget *settings = new TQWidget( this ) ;
settings->setMinimumSize( 90, 90 ) ;
- QVBoxLayout *layout = new QVBoxLayout( this ) ;
- layout->addWidget( view ) ;
- layout->addWidget( settings ) ;
+ TQVBoxLayout *tqlayout = new TQVBoxLayout( this ) ;
+ tqlayout->addWidget( view ) ;
+ tqlayout->addWidget( settings ) ;
- QGroupBox *groupBox = new QGroupBox( "Serial Settings", settings ) ;
+ TQGroupBox *groupBox = new TQGroupBox( "Serial Settings", settings ) ;
groupBox->setFixedSize( 200, 80 ) ;
groupBox->move( 10, 0 ) ;
- QLabel *label = new QLabel( groupBox ) ;
+ TQLabel *label = new TQLabel( groupBox ) ;
label->setText( "Transmit" ) ;
label->move( 5, 15 ) ;
label->setFixedSize( 55, 18 ) ;
- label = new QLabel( groupBox ) ;
+ label = new TQLabel( groupBox ) ;
label->setText( "Receive" ) ;
label->move( 5, 35 ) ;
label->setFixedSize( 55, 18 ) ;
- label = new QLabel( groupBox ) ;
- label->setText( "Status" ) ;
+ label = new TQLabel( groupBox ) ;
+ label->setText( "tqStatus" ) ;
label->move( 5, 55 ) ;
label->setFixedSize( 55, 18 ) ;
@@ -79,56 +79,56 @@ KSerialView::KSerialView( CPicoBlaze *cpu, QWidget * parent ) : QWidget( parent
statusPortID->setFixedSize( 40, 18 ) ;
statusPort->setReadValue( 0 ) ; // Buffers are empty, nothing received.
- connect( txPort, SIGNAL( write( unsigned char ) ), this, SLOT( transmit( unsigned char ) ) ) ;
- connect( rxPort, SIGNAL( read() ), this, SLOT( receive() ) ) ;
- connect( view, SIGNAL( keyPressed( int ) ), this, SLOT( keyPressed( int ) ) ) ;
+ connect( txPort, TQT_SIGNAL( write( unsigned char ) ), this, TQT_SLOT( transmit( unsigned char ) ) ) ;
+ connect( rxPort, TQT_SIGNAL( read() ), this, TQT_SLOT( receive() ) ) ;
+ connect( view, TQT_SIGNAL( keyPressed( int ) ), this, TQT_SLOT( keyPressed( int ) ) ) ;
- connect( txPortID, SIGNAL( textChanged( const QString & ) ), this, SLOT( updateTxId( const QString & ) ) ) ;
- connect( rxPortID, SIGNAL( textChanged( const QString & ) ), this, SLOT( updateRxId( const QString & ) ) ) ;
- connect( statusPortID, SIGNAL( textChanged( const QString & ) ), this, SLOT( updateStatusId( const QString & ) ) ) ;
+ connect( txPortID, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( updateTxId( const TQString & ) ) ) ;
+ connect( rxPortID, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( updateRxId( const TQString & ) ) ) ;
+ connect( statusPortID, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( updateStatusId( const TQString & ) ) ) ;
- groupBox = new QGroupBox( "Status Register", settings ) ;
+ groupBox = new TQGroupBox( "tqStatus Register", settings ) ;
groupBox->setFixedSize( 200, 80 ) ;
groupBox->move( 250, 0 ) ;
- label = new QLabel( groupBox ) ;
+ label = new TQLabel( groupBox ) ;
label->setText( "RX" ) ;
label->move( 106, 15 ) ;
label->setFixedSize( 20, 20 ) ;
- label = new QLabel( groupBox ) ;
+ label = new TQLabel( groupBox ) ;
label->setText( "TX" ) ;
label->move( 168, 15 ) ;
label->setFixedSize( 20, 20 ) ;
- label = new QLabel( groupBox ) ;
+ label = new TQLabel( groupBox ) ;
label->setText( "DR" ) ;
label->move( 80, 30 ) ;
label->setFixedSize( 20, 20 ) ;
- label = new QLabel( groupBox ) ;
+ label = new TQLabel( groupBox ) ;
label->setText( "F" ) ;
label->move( 110, 30 ) ;
label->setFixedSize( 20, 20 ) ;
- label = new QLabel( groupBox ) ;
+ label = new TQLabel( groupBox ) ;
label->setText( "HF" ) ;
label->move( 130, 30 ) ;
label->setFixedSize( 20, 20 ) ;
- label = new QLabel( groupBox ) ;
+ label = new TQLabel( groupBox ) ;
label->setText( "F" ) ;
label->move( 160, 30 ) ;
label->setFixedSize( 20, 20 ) ;
- label = new QLabel( groupBox ) ;
+ label = new TQLabel( groupBox ) ;
label->setText( "HF" ) ;
label->move( 179, 30 ) ;
label->setFixedSize( 20, 20 ) ;
int i ;
for ( i = 0 ; i < 8 ; i++ ) {
- m_statusBits[ i ] = new QCheckBox( groupBox ) ;
+ m_statusBits[ i ] = new TQCheckBox( groupBox ) ;
m_statusBits[ i ]->move( 5 + i * 25, 50 ) ;
m_statusBits[ i ]->setFixedSize( 15, 20 ) ;
}
@@ -137,20 +137,20 @@ KSerialView::KSerialView( CPicoBlaze *cpu, QWidget * parent ) : QWidget( parent
m_statusBits[ i ]->setEnabled( false ) ;
}
- QFrame *frame = new QFrame( groupBox ) ;
- frame->setFrameRect( QRect( 0, 0, 1, 50 ) ) ;
- frame->setFrameShape( QFrame::VLine ) ;
+ TQFrame *frame = new TQFrame( groupBox ) ;
+ frame->setFrameRect( TQRect( 0, 0, 1, 50 ) ) ;
+ frame->setFrameShape( TQFrame::VLine ) ;
frame->move( 73, 20 ) ;
frame->setFixedSize( 1, 50 ) ;
- frame = new QFrame( groupBox ) ;
- frame->setFrameRect( QRect( 0, 0, 1, 50 ) ) ;
- frame->setFrameShape( QFrame::VLine ) ;
+ frame = new TQFrame( groupBox ) ;
+ frame->setFrameRect( TQRect( 0, 0, 1, 50 ) ) ;
+ frame->setFrameShape( TQFrame::VLine ) ;
frame->move( 149, 20 ) ;
frame->setFixedSize( 1, 50 ) ;
- connect( m_statusBits[ 6 ], SIGNAL( toggled( bool ) ), this, SLOT( txFlagsChanged( bool ) ) ) ;
- connect( m_statusBits[ 7 ], SIGNAL( toggled( bool ) ), this, SLOT( txFlagsChanged( bool ) ) ) ;
+ connect( m_statusBits[ 6 ], TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( txFlagsChanged( bool ) ) ) ;
+ connect( m_statusBits[ 7 ], TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( txFlagsChanged( bool ) ) ) ;
fifoPtr = 0 ;
@@ -174,18 +174,18 @@ KSerialView::~KSerialView()
delete view ;
}
-void KSerialView::updateTxId( const QString & str )
+void KSerialView::updateTxId( const TQString & str )
{
bool ok ;
int val ;
- QString s ;
+ TQString s ;
val = str.toInt( &ok ) ;
if ( ok && val >= 0 && val <= 255 ) {
txPortID->setBackgroundColor( m_backgroundColor ) ;
txPort->setID( val ) ;
} else {
- txPortID->setBackgroundColor( QColor( 255, 128, 128 ) ) ;
+ txPortID->setBackgroundColor( TQColor( 255, 128, 128 ) ) ;
}
@@ -196,18 +196,18 @@ void KSerialView::updateTxId( const QString & str )
*/
}
-void KSerialView::updateRxId( const QString & str )
+void KSerialView::updateRxId( const TQString & str )
{
bool ok ;
int val ;
- QString s ;
+ TQString s ;
val = str.toInt( &ok ) ;
if ( ok && val >= 0 && val <= 255 ) {
rxPortID->setBackgroundColor( m_backgroundColor ) ;
rxPort->setID( val ) ;
} else {
- rxPortID->setBackgroundColor( QColor( 255, 128, 128 ) ) ;
+ rxPortID->setBackgroundColor( TQColor( 255, 128, 128 ) ) ;
}
/*else {
@@ -217,18 +217,18 @@ void KSerialView::updateRxId( const QString & str )
*/
}
-void KSerialView::updateStatusId( const QString & str )
+void KSerialView::updateStatusId( const TQString & str )
{
bool ok ;
int val ;
- QString s ;
+ TQString s ;
val = str.toInt( &ok ) ;
if ( ok && val >= 0 && val <= 255 ) {
statusPort->setID( val ) ;
statusPortID->setBackgroundColor( m_backgroundColor ) ;
} else {
- statusPortID->setBackgroundColor( QColor( 255, 128, 128 ) ) ;
+ statusPortID->setBackgroundColor( TQColor( 255, 128, 128 ) ) ;
}
/*else {
s.sprintf( "%u", statusPort->getID() ) ;
@@ -243,9 +243,9 @@ void KSerialView::transmit( unsigned char b )
b = '\n' ;
if ( b == 0x08 ) { // Backspace
- view->doKeyboardAction( QTextEdit::ActionBackspace ) ;
+ view->doKeyboardAction( TQTextEdit::ActionBackspace ) ;
} else {
- QString str ;
+ TQString str ;
view->insert( (str+=b) ) ;
}
}
diff --git a/src/kserialview.h b/src/kserialview.h
index 1a21dbc..c474607 100755
--- a/src/kserialview.h
+++ b/src/kserialview.h
@@ -23,39 +23,40 @@
#include <ktoolbar.h>
#include <ktextedit.h>
#include <klineedit.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qfont.h>
-#include <qpopupmenu.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqfont.h>
+#include <tqpopupmenu.h>
#include "kport.h"
class KSerialWindow : public KTextEdit
{
Q_OBJECT
+ TQ_OBJECT
public:
- KSerialWindow( QWidget *parent ) : KTextEdit( parent ) {
+ KSerialWindow( TQWidget *tqparent ) : KTextEdit( tqparent ) {
setWrapColumnOrWidth( 80 ) ; // Serial window is a terminal
- setWrapPolicy( QTextEdit::Anywhere ) ;
- setWordWrap( QTextEdit::FixedColumnWidth ) ;
+ setWrapPolicy( TQTextEdit::Anywhere ) ;
+ setWordWrap( TQTextEdit::FixedColumnWidth ) ;
setFont( KGlobalSettings::fixedFont() ) ; // Use default fixed font
}
virtual ~KSerialWindow() {} ;
protected:
- virtual void keyPressEvent( QKeyEvent *e )
+ virtual void keyPressEvent( TQKeyEvent *e )
{
emit keyPressed( e->ascii() ) ;
}
- virtual void mousePressEvent( QMouseEvent *e ) {
+ virtual void mousePressEvent( TQMouseEvent *e ) {
}
- virtual void mouseReleaseEvent( QMouseEvent *e ) {}
- virtual QPopupMenu *createPopupMenu( const QPoint &pos )
+ virtual void mouseReleaseEvent( TQMouseEvent *e ) {}
+ virtual TQPopupMenu *createPopupMenu( const TQPoint &pos )
{
- QPopupMenu *menu = new QPopupMenu( this ) ;
- menu->insertItem( "clear view", this, SLOT( clearView() ) ) ;
+ TQPopupMenu *menu = new TQPopupMenu( this ) ;
+ menu->insertItem( "clear view", this, TQT_SLOT( clearView() ) ) ;
return menu ;
}
public slots:
@@ -68,11 +69,12 @@ class KSerialWindow : public KTextEdit
} ;
-class KSerialView : public QWidget
+class KSerialView : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KSerialView( CPicoBlaze *cpu, QWidget *parent );
+ KSerialView( CPicoBlaze *cpu, TQWidget *tqparent );
~KSerialView();
KPort * rxPort, * txPort, * statusPort ;
@@ -95,15 +97,15 @@ class KSerialView : public QWidget
CPicoBlaze * m_cpu ;
KLineEdit *txPortID, *rxPortID, *statusPortID ;
- QCheckBox *m_statusBits[ 8 ] ;
+ TQCheckBox *m_statusBits[ 8 ] ;
- QColor m_backgroundColor ;
- QPushButton *m_clearButton ;
+ TQColor m_backgroundColor ;
+ TQPushButton *m_clearButton ;
public slots:
- void updateTxId( const QString & ) ;
- void updateRxId( const QString & ) ;
- void updateStatusId( const QString & ) ;
+ void updateTxId( const TQString & ) ;
+ void updateRxId( const TQString & ) ;
+ void updateStatusId( const TQString & ) ;
void txFlagsChanged( bool en ) ;
};
diff --git a/src/ksimulator.cpp b/src/ksimulator.cpp
index 57b2f43..611f386 100755
--- a/src/ksimulator.cpp
+++ b/src/ksimulator.cpp
@@ -19,19 +19,19 @@
***************************************************************************/
#include "ksimulator.h"
-KSimulator::KSimulator(QObject *parent, const char *name )
- : QObject(parent, name)
+KSimulator::KSimulator(TQObject *tqparent, const char *name )
+ : TQObject(tqparent, name)
{
m_picoBlaze = new CPicoBlaze() ;
m_assembler = new CAssembler() ;
m_assembler->setCode( m_picoBlaze->code ) ;
- m_timer = new QTimer( this ) ;
+ m_timer = new TQTimer( this ) ;
m_bInterrupt = FALSE ;
m_timer->stop() ;
m_run = false ;
- connect( m_timer, SIGNAL( timeout() ), this, SLOT( next() ) ) ;
+ connect( m_timer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( next() ) ) ;
}
KSimulator::~KSimulator()
diff --git a/src/ksimulator.h b/src/ksimulator.h
index f54f5be..03e8a10 100755
--- a/src/ksimulator.h
+++ b/src/ksimulator.h
@@ -20,12 +20,12 @@
#ifndef KSIMULATOR_H
#define KSIMULATOR_H
-#include <qobject.h>
+#include <tqobject.h>
#include "cpicoblaze.h"
#include "cassembler.h"
#include <string>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <klistview.h>
#include "kprocessorview.h"
@@ -34,11 +34,12 @@
#define CARRY_FLAG 0x02
#define INTERRUPT_FLAG 0x04
-class KSimulator : public QObject
+class KSimulator : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- KSimulator(QObject *parent = 0, const char *name = 0);
+ KSimulator(TQObject *tqparent = 0, const char *name = 0);
~KSimulator();
void setFilename( string filename ) { m_assembler->setFilename( filename ) ; }
@@ -82,7 +83,7 @@ class KSimulator : public QObject
private:
CPicoBlaze * m_picoBlaze ;
CAssembler * m_assembler ;
- QTimer * m_timer ;
+ TQTimer * m_timer ;
bool m_bInterrupt ;
KListView *m_messageList ;
bool m_run ;