diff options
Diffstat (limited to 'src/kpicosim.cpp')
-rwxr-xr-x | src/kpicosim.cpp | 164 |
1 files changed, 82 insertions, 82 deletions
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* ) ) ) ; } */ } |