Rename a number of classes to enhance compatibility with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent 6e5c9473ba
commit 74b3ea38c5

@ -111,7 +111,7 @@ class CAssembler {
m_labelTable.clear() ; m_labelTable.clear() ;
m_constantTable.clear() ; m_constantTable.clear() ;
} }
void setMessageList( KListView *messageList ) void setMessageList( TDEListView *messageList )
{ {
m_messageList = messageList ; m_messageList = messageList ;
} }
@ -143,5 +143,5 @@ class CAssembler {
bool addInstruction( instrNumber instr, CSourceLine sourceLine, int offset ) ; bool addInstruction( instrNumber instr, CSourceLine sourceLine, int offset ) ;
CCode * m_code ; CCode * m_code ;
KListView *m_messageList ; TDEListView *m_messageList ;
} ; } ;

@ -99,7 +99,7 @@ enum IDs {
} ; } ;
KPicoSim::KPicoSim() : KMainWindow( 0, "KPicoSim" ) KPicoSim::KPicoSim() : TDEMainWindow( 0, "KPicoSim" )
{ {
// set the shell's ui resource file // set the shell's ui resource file
// setXMLFile("kpicosimui.rc"); // setXMLFile("kpicosimui.rc");
@ -107,7 +107,7 @@ KPicoSim::KPicoSim() : KMainWindow( 0, "KPicoSim" )
m_splitter = new TQSplitter( this ) ; m_splitter = new TQSplitter( this ) ;
m_tabWidget = new TQTabWidget( m_splitter ) ; m_tabWidget = new TQTabWidget( m_splitter ) ;
m_editor = new CodeEditor( m_tabWidget ) ; m_editor = new CodeEditor( m_tabWidget ) ;
m_messages = new KListView( m_splitter, "messages" ) ; m_messages = new TDEListView( m_splitter, "messages" ) ;
m_simulator = new KSimulator( TQT_TQOBJECT(this) ) ; m_simulator = new KSimulator( TQT_TQOBJECT(this) ) ;
m_processorView = new TDEProcessorView( this ) ; m_processorView = new TDEProcessorView( this ) ;
@ -122,7 +122,7 @@ KPicoSim::KPicoSim() : KMainWindow( 0, "KPicoSim" )
buildMenu() ; buildMenu() ;
KToolBar *toolbar = new KToolBar( this ) ; TDEToolBar *toolbar = new TDEToolBar( this ) ;
addDockWindow( toolbar ) ; addDockWindow( toolbar ) ;
toolbar->insertButton( "filenew", -1, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(m_editor), TQT_SLOT( slotNewFile() ), true, "New" ) ; toolbar->insertButton( "filenew", -1, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(m_editor), TQT_SLOT( slotNewFile() ), true, "New" ) ;
@ -130,7 +130,7 @@ KPicoSim::KPicoSim() : KMainWindow( 0, "KPicoSim" )
toolbar->insertButton( "filesave", -1, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(m_editor), TQT_SLOT( slotSave() ), true, "Save" ) ; 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" ) ; toolbar->insertButton( "filesaveas", -1, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(m_editor), TQT_SLOT( slotSaveAs() ), true, "Save As" ) ;
m_debugBar = new KToolBar( this ) ; m_debugBar = new TDEToolBar( this ) ;
addDockWindow( m_debugBar ) ; addDockWindow( m_debugBar ) ;
m_debugBar->insertButton( UserIcon( "rebuild" ), COMPILE_ID, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( compile() ), true, "Compile" ) ; 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->insertButton( "run", START_SIM_ID, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( startSim() ), true, "Start/Stop Debug" ) ;
@ -174,14 +174,14 @@ void KPicoSim::buildMenu()
{ {
KIconLoader * ldr = TDEGlobal::iconLoader() ; KIconLoader * ldr = TDEGlobal::iconLoader() ;
KPopupMenu * exportMenu = new KPopupMenu( this ) ; TDEPopupMenu * exportMenu = new TDEPopupMenu( this ) ;
exportMenu->insertItem( "VHDL", TQT_TQOBJECT(this), TQT_SLOT( fileExportVHDL() ) ) ; exportMenu->insertItem( "VHDL", TQT_TQOBJECT(this), TQT_SLOT( fileExportVHDL() ) ) ;
// exportMenu->insertItem( "COE", TQT_TQOBJECT(this), TQT_SLOT( fileExportCOE() ) ) ; // exportMenu->insertItem( "COE", TQT_TQOBJECT(this), TQT_SLOT( fileExportCOE() ) ) ;
exportMenu->insertItem( "MEM", TQT_TQOBJECT(this), TQT_SLOT( fileExportMEM() ) ) ; exportMenu->insertItem( "MEM", TQT_TQOBJECT(this), TQT_SLOT( fileExportMEM() ) ) ;
exportMenu->insertItem( "HEX", TQT_TQOBJECT(this), TQT_SLOT( fileExportHEX() ) ) ; exportMenu->insertItem( "HEX", TQT_TQOBJECT(this), TQT_SLOT( fileExportHEX() ) ) ;
m_fileMenu = new KPopupMenu( this ) ; m_fileMenu = new TDEPopupMenu( this ) ;
m_fileMenu->insertItem( ldr->loadIcon( "filenew", KIcon::Small ), "New", TQT_TQOBJECT(this), TQT_SLOT( slotFileNew() ) ) ; 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->insertItem( ldr->loadIcon( "fileopen", KIcon::Small ), "Open", TQT_TQOBJECT(m_editor), TQT_SLOT( slotOpen() ) ) ;
m_fileMenu->insertSeparator() ; m_fileMenu->insertSeparator() ;
@ -194,7 +194,7 @@ void KPicoSim::buildMenu()
m_fileMenu->insertSeparator() ; m_fileMenu->insertSeparator() ;
m_fileMenu->insertItem( ldr->loadIcon( "fileclose", KIcon::Small ), "Quit", TQT_TQOBJECT(this), TQT_SLOT( slotClose() ) ) ; m_fileMenu->insertItem( ldr->loadIcon( "fileclose", KIcon::Small ), "Quit", TQT_TQOBJECT(this), TQT_SLOT( slotClose() ) ) ;
m_editMenu = new KPopupMenu( this ) ; m_editMenu = new TDEPopupMenu( this ) ;
m_editMenu->insertItem( ldr->loadIcon( "undo", KIcon::Small ), "Undo", TQT_TQOBJECT(m_editor), TQT_SLOT( slotUndo() ),TQKeySequence( "CTRL+Z" ) ) ; m_editMenu->insertItem( ldr->loadIcon( "undo", KIcon::Small ), "Undo", TQT_TQOBJECT(m_editor), TQT_SLOT( slotUndo() ),TQKeySequence( "CTRL+Z" ) ) ;
m_editMenu->insertItem( ldr->loadIcon( "redo", KIcon::Small ), "Redo", TQT_TQOBJECT(m_editor), TQT_SLOT( slotRedo() ),TQKeySequence( "CTRL+SHIFT+Z" ) ) ; m_editMenu->insertItem( ldr->loadIcon( "redo", KIcon::Small ), "Redo", TQT_TQOBJECT(m_editor), TQT_SLOT( slotRedo() ),TQKeySequence( "CTRL+SHIFT+Z" ) ) ;
m_editMenu->insertSeparator() ; m_editMenu->insertSeparator() ;
@ -208,7 +208,7 @@ void KPicoSim::buildMenu()
m_editMenu->insertItem( "Find Next", TQT_TQOBJECT(m_editor), TQT_SLOT( slotFindNext() ), TQKeySequence( "F3" ) ) ; m_editMenu->insertItem( "Find Next", TQT_TQOBJECT(m_editor), TQT_SLOT( slotFindNext() ), TQKeySequence( "F3" ) ) ;
m_debugMenu = new KPopupMenu( this ) ; m_debugMenu = new TDEPopupMenu( this ) ;
m_debugMenu->insertSeparator() ; m_debugMenu->insertSeparator() ;
m_debugMenu->insertItem( ldr->loadIcon( "rebuild", KIcon::Small ), "Compile", TQT_TQOBJECT(this), TQT_SLOT( compile() ), TQKeySequence( "SHIFT+F9" ) ) ; m_debugMenu->insertItem( ldr->loadIcon( "rebuild", KIcon::Small ), "Compile", TQT_TQOBJECT(this), TQT_SLOT( compile() ), TQKeySequence( "SHIFT+F9" ) ) ;
m_debugMenu->insertItem( ldr->loadIcon( "run", KIcon::Small ), "Start Debug", TQT_TQOBJECT(this), TQT_SLOT( startSim() ), TQKeySequence( "F9" ) , START_SIM_ID ) ; m_debugMenu->insertItem( ldr->loadIcon( "run", KIcon::Small ), "Start Debug", TQT_TQOBJECT(this), TQT_SLOT( startSim() ), TQKeySequence( "F9" ) , START_SIM_ID ) ;
@ -222,15 +222,15 @@ void KPicoSim::buildMenu()
m_debugMenu->insertSeparator() ; m_debugMenu->insertSeparator() ;
m_debugMenu->insertItem( "Toggle Breakpoint", TQT_TQOBJECT(m_editor), TQT_SLOT( slotToggleBreakpoint() ), TQKeySequence( "F8" ) ) ; m_debugMenu->insertItem( "Toggle Breakpoint", TQT_TQOBJECT(m_editor), TQT_SLOT( slotToggleBreakpoint() ), TQKeySequence( "F8" ) ) ;
m_settingsMenu = new KPopupMenu( this ) ; m_settingsMenu = new TDEPopupMenu( this ) ;
m_settingsMenu->insertItem( "Configure Editor...", TQT_TQOBJECT(m_editor), TQT_SLOT( slotShowConfig() ) ) ; m_settingsMenu->insertItem( "Configure Editor...", TQT_TQOBJECT(m_editor), TQT_SLOT( slotShowConfig() ) ) ;
m_peripheralMenu = new KPopupMenu( this ) ; m_peripheralMenu = new TDEPopupMenu( this ) ;
m_peripheralMenu->insertItem( "I/O Port", TQT_TQOBJECT(this), TQT_SLOT( newIOPort() ) ) ; 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( "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( "Serial port", TQT_TQOBJECT(this), TQT_SLOT( showSerialPort() ), 0, VIEW_SERIAL_ID ) ;
m_jtagMenu = new KPopupMenu( this ) ; m_jtagMenu = new TDEPopupMenu( this ) ;
m_jtagMenu->insertItem( "Download", TQT_TQOBJECT(this), TQT_SLOT( jtagDownload() ) ) ; m_jtagMenu->insertItem( "Download", TQT_TQOBJECT(this), TQT_SLOT( jtagDownload() ) ) ;
TDEAboutData *aboutData = new TDEAboutData( TDEAboutData *aboutData = new TDEAboutData(
@ -247,7 +247,7 @@ void KPicoSim::buildMenu()
aboutData->addAuthor( "Mark Six", "m6@xs4all.nl", "http://www.xs4all.nl/~marksix" ) ; aboutData->addAuthor( "Mark Six", "m6@xs4all.nl", "http://www.xs4all.nl/~marksix" ) ;
KHelpMenu *helpMenu = new KHelpMenu( this, aboutData, false ) ; KHelpMenu *helpMenu = new KHelpMenu( this, aboutData, false ) ;
KPopupMenu *help = helpMenu->menu() ; TDEPopupMenu *help = helpMenu->menu() ;
menuBar()->insertItem( "File", m_fileMenu ) ; menuBar()->insertItem( "File", m_fileMenu ) ;
menuBar()->insertItem( "Edit", m_editMenu ) ; menuBar()->insertItem( "Edit", m_editMenu ) ;

@ -40,7 +40,7 @@
#include "kscratchpadview.h" #include "kscratchpadview.h"
#include "kportview.h" #include "kportview.h"
class KPicoSim : public KMainWindow class KPicoSim : public TDEMainWindow
{ {
Q_OBJECT Q_OBJECT
@ -50,14 +50,14 @@ class KPicoSim : public KMainWindow
protected: protected:
CodeEditor * m_editor ; CodeEditor * m_editor ;
KListView * m_messages ; TDEListView * m_messages ;
TQSplitter * m_splitter ; TQSplitter * m_splitter ;
TDEProcessorView * m_processorView ; TDEProcessorView * m_processorView ;
KSerialView *m_serialView ; KSerialView *m_serialView ;
KScratchpadView *m_scratchpadView ; KScratchpadView *m_scratchpadView ;
TQTabWidget *m_tabWidget ; TQTabWidget *m_tabWidget ;
KPopupMenu * m_fileMenu, * m_debugMenu, * m_settingsMenu, * m_editMenu, * m_peripheralMenu, *m_jtagMenu, *m_helpMenu ; TDEPopupMenu * m_fileMenu, * m_debugMenu, * m_settingsMenu, * m_editMenu, * m_peripheralMenu, *m_jtagMenu, *m_helpMenu ;
KSimulator * m_simulator ; KSimulator * m_simulator ;
@ -82,7 +82,7 @@ class KPicoSim : public KMainWindow
TQString m_bitfile ; TQString m_bitfile ;
TQPixmap m_runPxp, m_stopPxp ; TQPixmap m_runPxp, m_stopPxp ;
KToolBar *m_debugBar ; TDEToolBar *m_debugBar ;
signals: signals:
void run() ; void run() ;

@ -22,7 +22,7 @@
#include <tqlabel.h> #include <tqlabel.h>
KPortView::KPortView( CPicoBlaze *cpu, TQWidget *parent, const char *name) KPortView::KPortView( CPicoBlaze *cpu, TQWidget *parent, const char *name)
: KToolBar(parent, name) : TDEToolBar(parent, name)
{ {
m_cpu = cpu ; m_cpu = cpu ;

@ -26,7 +26,7 @@
#include "kport.h" #include "kport.h"
#include <ksimpleconfig.h> #include <ksimpleconfig.h>
class KPortView : public KToolBar class KPortView : public TDEToolBar
{ {
Q_OBJECT Q_OBJECT

@ -8,17 +8,17 @@
#include <tqpopupmenu.h> #include <tqpopupmenu.h>
#include <tqcursor.h> #include <tqcursor.h>
MyListView::MyListView(TQWidget *parent) : KListView(parent) MyListView::MyListView(TQWidget *parent) : TDEListView(parent)
{ {
connect( this, TQT_SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & ) ), connect( this, TQT_SIGNAL( contextMenu( TDEListView *, TQListViewItem *, const TQPoint & ) ),
TQT_SLOT( slotContextMenu( KListView *, TQListViewItem *, const TQPoint & ) ) ); TQT_SLOT( slotContextMenu( TDEListView *, TQListViewItem *, const TQPoint & ) ) );
} }
MyListView::~MyListView() MyListView::~MyListView()
{ {
} }
void MyListView::slotContextMenu( KListView *, TQListViewItem *, const TQPoint & ) void MyListView::slotContextMenu( TDEListView *, TQListViewItem *, const TQPoint & )
{ {
// mousePressEvent( NULL ) ; // mousePressEvent( NULL ) ;
emit showPopupMenu() ; emit showPopupMenu() ;
@ -31,12 +31,12 @@ void MyListView::mousePressEvent( TQMouseEvent * event )
// if ( event->button() == RightButton ) // if ( event->button() == RightButton )
emit showPopupMenu() ; emit showPopupMenu() ;
// else // else
// KListView::mousePressEvent( event ) ; // TDEListView::mousePressEvent( event ) ;
} }
*/ */
TDEProcessorView::TDEProcessorView(TQWidget *parent, const char *name) TDEProcessorView::TDEProcessorView(TQWidget *parent, const char *name)
: KToolBar(parent) : TDEToolBar(parent)
{ {
name = name ; // avoid compiler warning name = name ; // avoid compiler warning

@ -7,7 +7,7 @@
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <klistview.h> #include <klistview.h>
class MyListView : public KListView class MyListView : public TDEListView
{ {
Q_OBJECT Q_OBJECT
@ -20,14 +20,14 @@ class MyListView : public KListView
public slots: public slots:
void slotContextMenu( KListView *, TQListViewItem *, const TQPoint & ) ; void slotContextMenu( TDEListView *, TQListViewItem *, const TQPoint & ) ;
signals: signals:
void showPopupMenu() ; void showPopupMenu() ;
} ; } ;
class TDEProcessorView : public KToolBar class TDEProcessorView : public TDEToolBar
{ {
Q_OBJECT Q_OBJECT

@ -20,7 +20,7 @@
#include "kscratchpadview.h" #include "kscratchpadview.h"
KScratchpadView::KScratchpadView( TQWidget *parent, const char *name) KScratchpadView::KScratchpadView( TQWidget *parent, const char *name)
: KToolBar(parent, name) : TDEToolBar(parent, name)
{ {
view = new KTextEdit( this ) ; view = new KTextEdit( this ) ;
view->setFont( TQFont( "Courier", view->font().pointSize() ) ) ; view->setFont( TQFont( "Courier", view->font().pointSize() ) ) ;

@ -23,7 +23,7 @@
#include <ktoolbar.h> #include <ktoolbar.h>
#include <ktextedit.h> #include <ktextedit.h>
class KScratchpadView : public KToolBar class KScratchpadView : public TDEToolBar
{ {
Q_OBJECT Q_OBJECT

@ -41,7 +41,7 @@ KSimulator::~KSimulator()
delete m_assembler ; delete m_assembler ;
} }
void KSimulator::setMessageList( KListView *messageList ) void KSimulator::setMessageList( TDEListView *messageList )
{ {
m_assembler->setMessageList( messageList ) ; m_assembler->setMessageList( messageList ) ;
} }

@ -63,7 +63,7 @@ class KSimulator : public TQObject
unsigned int getNextSourceLine() ; unsigned int getNextSourceLine() ;
void assemblerError( unsigned int line, const char * str ) ; void assemblerError( unsigned int line, const char * str ) ;
void setMessageList( KListView *messageList ) ; void setMessageList( TDEListView *messageList ) ;
bool isRunning() ; bool isRunning() ;
@ -85,7 +85,7 @@ class KSimulator : public TQObject
CAssembler * m_assembler ; CAssembler * m_assembler ;
TQTimer * m_timer ; TQTimer * m_timer ;
bool m_bInterrupt ; bool m_bInterrupt ;
KListView *m_messageList ; TDEListView *m_messageList ;
bool m_run ; bool m_run ;
}; };

Loading…
Cancel
Save