From bb32ffafc904de3a070c8132721ac19bea77da4a Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Thu, 7 Dec 2023 13:21:07 +0900 Subject: Replaced various '#define' with actual strings - part 6 Signed-off-by: Michele Calgaro (cherry picked from commit 113054cd5b4ce6ed21917e36f30d1fdcf780c525) --- src/kjtagdialog.cpp | 2 +- src/kpicosim.cpp | 86 ++++++++++++++++++++++++++--------------------------- 2 files changed, 44 insertions(+), 44 deletions(-) (limited to 'src') diff --git a/src/kjtagdialog.cpp b/src/kjtagdialog.cpp index e8b092b..f75910d 100644 --- a/src/kjtagdialog.cpp +++ b/src/kjtagdialog.cpp @@ -60,7 +60,7 @@ KJTAGDialog::KJTAGDialog( TQWidget *parent ) m_debug->setFixedSize( 310, 200 ) ; m_debug->move( 10, 60 ) ; - m_programmer = new JTAGProgrammer( TQT_TQOBJECT(this) ) ; + m_programmer = new JTAGProgrammer( 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*) ) ) ; diff --git a/src/kpicosim.cpp b/src/kpicosim.cpp index 17894c4..18a5f7b 100644 --- a/src/kpicosim.cpp +++ b/src/kpicosim.cpp @@ -108,7 +108,7 @@ KPicoSim::KPicoSim() : TDEMainWindow( 0, "KPicoSim" ) m_tabWidget = new TQTabWidget( m_splitter ) ; m_editor = new CodeEditor( m_tabWidget ) ; m_messages = new TDEListView( m_splitter, "messages" ) ; - m_simulator = new KSimulator( TQT_TQOBJECT(this) ) ; + m_simulator = new KSimulator( this ) ; m_processorView = new TDEProcessorView( this ) ; m_tabWidget->addTab( m_editor, "Source" ) ; @@ -125,28 +125,28 @@ KPicoSim::KPicoSim() : TDEMainWindow( 0, "KPicoSim" ) TDEToolBar *toolbar = new TDEToolBar( this ) ; addDockWindow( toolbar ) ; - toolbar->insertButton( "document-new", -1, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(m_editor), TQT_SLOT( slotNewFile() ), true, "New" ) ; - toolbar->insertButton( "document-open", -1, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(m_editor), TQT_SLOT( slotOpen() ), true, "Open" ) ; - toolbar->insertButton( "document-save", -1, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(m_editor), TQT_SLOT( slotSave() ), true, "Save" ) ; - toolbar->insertButton( "document-save-as", -1, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(m_editor), TQT_SLOT( slotSaveAs() ), true, "Save As" ) ; + toolbar->insertButton( "document-new", -1, TQT_SIGNAL( clicked() ), m_editor, TQT_SLOT( slotNewFile() ), true, "New" ) ; + toolbar->insertButton( "document-open", -1, TQT_SIGNAL( clicked() ), m_editor, TQT_SLOT( slotOpen() ), true, "Open" ) ; + toolbar->insertButton( "document-save", -1, TQT_SIGNAL( clicked() ), m_editor, TQT_SLOT( slotSave() ), true, "Save" ) ; + toolbar->insertButton( "document-save-as", -1, TQT_SIGNAL( clicked() ), m_editor, TQT_SLOT( slotSaveAs() ), true, "Save As" ) ; m_debugBar = new TDEToolBar( this ) ; addDockWindow( m_debugBar ) ; - m_debugBar->insertButton( UserIcon( "rebuild" ), COMPILE_ID, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( compile() ), true, "Compile" ) ; - m_debugBar->insertButton( "system-run", START_SIM_ID, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( startSim() ), true, "Start/Stop Debug" ) ; + m_debugBar->insertButton( UserIcon( "rebuild" ), COMPILE_ID, TQT_SIGNAL( clicked() ), this, TQT_SLOT( compile() ), true, "Compile" ) ; + m_debugBar->insertButton( "system-run", START_SIM_ID, TQT_SIGNAL( clicked() ), this, TQT_SLOT( startSim() ), true, "Start/Stop Debug" ) ; m_debugBar->insertSeparator() ; - m_debugBar->insertButton( UserIcon( "continue" ), RUN_ID, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( startStop() ), false, "Continue" ) ; + m_debugBar->insertButton( UserIcon( "continue" ), RUN_ID, TQT_SIGNAL( clicked() ), this, TQT_SLOT( startStop() ), false, "Continue" ) ; 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( 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 * ) ) ) ; + connect( this, TQT_SIGNAL( run() ), m_simulator, TQT_SLOT( run() ) ); + connect( this, TQT_SIGNAL( stop() ), m_simulator, TQT_SLOT( stop() ) ) ; + connect( m_simulator, TQT_SIGNAL( stepped( unsigned int ) ), this, TQT_SLOT( stepped( unsigned int ) ) ) ; + connect( m_processorView, TQT_SIGNAL( processorRegsChanged() ), this, TQT_SLOT( updateProcessorRegs() ) ) ; + connect( m_processorView, TQT_SIGNAL( processorFlagsChanged() ), this, TQT_SLOT( updateProcessorFlags() ) ) ; + connect( m_messages, TQT_SIGNAL( clicked( TQListViewItem * ) ), this, TQT_SLOT( messageListClicked( TQListViewItem * ) ) ) ; m_messages->addColumn( "Line" ) ; m_messages->addColumn( "Description" ) ; @@ -176,62 +176,62 @@ void KPicoSim::buildMenu() TDEPopupMenu * exportMenu = new TDEPopupMenu( this ) ; - 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() ) ) ; + exportMenu->insertItem( "VHDL", this, TQT_SLOT( fileExportVHDL() ) ) ; +// exportMenu->insertItem( "COE", this, TQT_SLOT( fileExportCOE() ) ) ; + exportMenu->insertItem( "MEM", this, TQT_SLOT( fileExportMEM() ) ) ; + exportMenu->insertItem( "HEX", this, TQT_SLOT( fileExportHEX() ) ) ; m_fileMenu = new TDEPopupMenu( this ) ; - m_fileMenu->insertItem( ldr->loadIcon( "document-new", TDEIcon::Small ), "New", TQT_TQOBJECT(this), TQT_SLOT( slotFileNew() ) ) ; - m_fileMenu->insertItem( ldr->loadIcon( "document-open", TDEIcon::Small ), "Open", TQT_TQOBJECT(m_editor), TQT_SLOT( slotOpen() ) ) ; + m_fileMenu->insertItem( ldr->loadIcon( "document-new", TDEIcon::Small ), "New", this, TQT_SLOT( slotFileNew() ) ) ; + m_fileMenu->insertItem( ldr->loadIcon( "document-open", TDEIcon::Small ), "Open", m_editor, TQT_SLOT( slotOpen() ) ) ; m_fileMenu->insertSeparator() ; - m_fileMenu->insertItem( ldr->loadIcon( "document-save", TDEIcon::Small ), "Save", TQT_TQOBJECT(m_editor), TQT_SLOT( slotSave() ), TQKeySequence( "CTRL+S" ) ) ; - m_fileMenu->insertItem( ldr->loadIcon( "document-save-as", TDEIcon::Small ), "Save As...", TQT_TQOBJECT(m_editor), TQT_SLOT( slotSaveAs() ) ) ; + m_fileMenu->insertItem( ldr->loadIcon( "document-save", TDEIcon::Small ), "Save", m_editor, TQT_SLOT( slotSave() ), TQKeySequence( "CTRL+S" ) ) ; + m_fileMenu->insertItem( ldr->loadIcon( "document-save-as", TDEIcon::Small ), "Save As...", m_editor, TQT_SLOT( slotSaveAs() ) ) ; m_fileMenu->insertSeparator() ; - m_fileMenu->insertItem( ldr->loadIcon( "document-print", TDEIcon::Small ), "Print...", TQT_TQOBJECT(m_editor), TQT_SLOT( slotPrint() ), TQKeySequence( "CTRL+P" ) ) ; + m_fileMenu->insertItem( ldr->loadIcon( "document-print", TDEIcon::Small ), "Print...", m_editor, TQT_SLOT( slotPrint() ), TQKeySequence( "CTRL+P" ) ) ; m_fileMenu->insertSeparator() ; m_fileMenu->insertItem( "Export", exportMenu ) ; m_fileMenu->insertSeparator() ; - m_fileMenu->insertItem( ldr->loadIcon( "window-close", TDEIcon::Small ), "Quit", TQT_TQOBJECT(this), TQT_SLOT( slotClose() ) ) ; + m_fileMenu->insertItem( ldr->loadIcon( "window-close", TDEIcon::Small ), "Quit", this, TQT_SLOT( slotClose() ) ) ; m_editMenu = new TDEPopupMenu( this ) ; - m_editMenu->insertItem( ldr->loadIcon( "edit-undo", TDEIcon::Small ), "Undo", TQT_TQOBJECT(m_editor), TQT_SLOT( slotUndo() ),TQKeySequence( "CTRL+Z" ) ) ; - m_editMenu->insertItem( ldr->loadIcon( "edit-redo", TDEIcon::Small ), "Redo", TQT_TQOBJECT(m_editor), TQT_SLOT( slotRedo() ),TQKeySequence( "CTRL+SHIFT+Z" ) ) ; + m_editMenu->insertItem( ldr->loadIcon( "edit-undo", TDEIcon::Small ), "Undo", m_editor, TQT_SLOT( slotUndo() ),TQKeySequence( "CTRL+Z" ) ) ; + m_editMenu->insertItem( ldr->loadIcon( "edit-redo", TDEIcon::Small ), "Redo", m_editor, TQT_SLOT( slotRedo() ),TQKeySequence( "CTRL+SHIFT+Z" ) ) ; m_editMenu->insertSeparator() ; - m_editMenu->insertItem( "Select All", TQT_TQOBJECT(m_editor), TQT_SLOT( slotSelectAll() ),TQKeySequence( "CTRL+A" ) ) ; + m_editMenu->insertItem( "Select All", m_editor, TQT_SLOT( slotSelectAll() ),TQKeySequence( "CTRL+A" ) ) ; m_editMenu->insertSeparator() ; - m_editMenu->insertItem( ldr->loadIcon( "edit-cut", TDEIcon::Small ), "Cut", TQT_TQOBJECT(m_editor), TQT_SLOT( slotCut() ),TQKeySequence( "CTRL+X" ) ) ; - m_editMenu->insertItem( ldr->loadIcon( "edit-copy", TDEIcon::Small ), "Copy", TQT_TQOBJECT(m_editor), TQT_SLOT( slotCopy() ),TQKeySequence( "CTRL+C" ) ) ; - m_editMenu->insertItem( ldr->loadIcon( "edit-paste", TDEIcon::Small ), "Paste", TQT_TQOBJECT(m_editor), TQT_SLOT( slotPaste() ),TQKeySequence( "CTRL+V" ) ) ; + m_editMenu->insertItem( ldr->loadIcon( "edit-cut", TDEIcon::Small ), "Cut", m_editor, TQT_SLOT( slotCut() ),TQKeySequence( "CTRL+X" ) ) ; + m_editMenu->insertItem( ldr->loadIcon( "edit-copy", TDEIcon::Small ), "Copy", m_editor, TQT_SLOT( slotCopy() ),TQKeySequence( "CTRL+C" ) ) ; + m_editMenu->insertItem( ldr->loadIcon( "edit-paste", TDEIcon::Small ), "Paste", m_editor, TQT_SLOT( slotPaste() ),TQKeySequence( "CTRL+V" ) ) ; m_editMenu->insertSeparator() ; - m_editMenu->insertItem( ldr->loadIcon( "edit-find", TDEIcon::Small ), "Find...", TQT_TQOBJECT(m_editor), TQT_SLOT( slotFind() ), TQKeySequence( "CTRL+F" ) ) ; - m_editMenu->insertItem( "Find Next", TQT_TQOBJECT(m_editor), TQT_SLOT( slotFindNext() ), TQKeySequence( "F3" ) ) ; + m_editMenu->insertItem( ldr->loadIcon( "edit-find", TDEIcon::Small ), "Find...", m_editor, TQT_SLOT( slotFind() ), TQKeySequence( "CTRL+F" ) ) ; + m_editMenu->insertItem( "Find Next", m_editor, TQT_SLOT( slotFindNext() ), TQKeySequence( "F3" ) ) ; m_debugMenu = new TDEPopupMenu( this ) ; m_debugMenu->insertSeparator() ; - m_debugMenu->insertItem( ldr->loadIcon( "rebuild", TDEIcon::Small ), "Compile", TQT_TQOBJECT(this), TQT_SLOT( compile() ), TQKeySequence( "SHIFT+F9" ) ) ; - m_debugMenu->insertItem( ldr->loadIcon( "system-run", TDEIcon::Small ), "Start Debug", TQT_TQOBJECT(this), TQT_SLOT( startSim() ), TQKeySequence( "F9" ) , START_SIM_ID ) ; + m_debugMenu->insertItem( ldr->loadIcon( "rebuild", TDEIcon::Small ), "Compile", this, TQT_SLOT( compile() ), TQKeySequence( "SHIFT+F9" ) ) ; + m_debugMenu->insertItem( ldr->loadIcon( "system-run", TDEIcon::Small ), "Start Debug", this, TQT_SLOT( startSim() ), TQKeySequence( "F9" ) , START_SIM_ID ) ; m_debugMenu->insertSeparator() ; - m_debugMenu->insertItem( "Continue", TQT_TQOBJECT(this), TQT_SLOT( startStop() ), TQKeySequence( "F10" ) , RUN_ID ) ; + m_debugMenu->insertItem( "Continue", this, TQT_SLOT( startStop() ), TQKeySequence( "F10" ) , RUN_ID ) ; m_debugMenu->insertItem( "Next", m_simulator, TQT_SLOT( next() ), TQKeySequence( "F5" ) , NEXT_ID ) ; m_debugMenu->insertItem( "Interrupt", m_simulator, TQT_SLOT( interrupt() ), TQKeySequence( "F4" ) , INTERRUPT_ID ) ; m_debugMenu->insertItem( "Reset", m_simulator, TQT_SLOT( reset() ), TQKeySequence( "F11" ) , RESET_ID ) ; m_debugMenu->insertSeparator() ; - m_debugMenu->insertItem( "Toggle Breakpoint", TQT_TQOBJECT(m_editor), TQT_SLOT( slotToggleBreakpoint() ), TQKeySequence( "F8" ) ) ; + m_debugMenu->insertItem( "Toggle Breakpoint", m_editor, TQT_SLOT( slotToggleBreakpoint() ), TQKeySequence( "F8" ) ) ; m_settingsMenu = new TDEPopupMenu( this ) ; - m_settingsMenu->insertItem( "Configure Editor...", TQT_TQOBJECT(m_editor), TQT_SLOT( slotShowConfig() ) ) ; + m_settingsMenu->insertItem( "Configure Editor...", m_editor, TQT_SLOT( slotShowConfig() ) ) ; m_peripheralMenu = new TDEPopupMenu( this ) ; - 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_peripheralMenu->insertItem( "I/O Port", this, TQT_SLOT( newIOPort() ) ) ; + m_peripheralMenu->insertItem( "Scratchpad", this, TQT_SLOT( showScratchpad() ), 0, VIEW_SCRATCHPAD_ID ) ; + m_peripheralMenu->insertItem( "Serial port", this, TQT_SLOT( showSerialPort() ), 0, VIEW_SERIAL_ID ) ; m_jtagMenu = new TDEPopupMenu( this ) ; - m_jtagMenu->insertItem( "Download", TQT_TQOBJECT(this), TQT_SLOT( jtagDownload() ) ) ; + m_jtagMenu->insertItem( "Download", this, TQT_SLOT( jtagDownload() ) ) ; TDEAboutData *aboutData = new TDEAboutData( "kpicosim", @@ -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, TQT_SIGNAL( closing( KPortView* ) ), TQT_TQOBJECT(this), TQT_SLOT( removeIOPort( KPortView* ) ) ) ; +// connect( ioport, TQT_SIGNAL( closing( KPortView* ) ), this, TQT_SLOT( removeIOPort( KPortView* ) ) ) ; } void KPicoSim::showSerialPort() @@ -623,7 +623,7 @@ void KPicoSim::openGUI() ioport->readConfig( config, group ) ; m_ioList.append( ioport ) ; addDockWindow( ioport, DockRight ) ; - connect( ioport, TQT_SIGNAL( closing( KPortView* ) ), TQT_TQOBJECT(this), TQT_SLOT( removeIOPort( KPortView* ) ) ) ; + connect( ioport, TQT_SIGNAL( closing( KPortView* ) ), this, TQT_SLOT( removeIOPort( KPortView* ) ) ) ; } */ } -- cgit v1.2.1