summaryrefslogtreecommitdiffstats
path: root/src/codeeditor.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 20:31:54 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 20:31:54 +0000
commit8f1624dd9a394be19ccf9d63e4de0a0558831ca3 (patch)
tree21ca6a6c0f51a294752e693bb883120ababb6062 /src/codeeditor.cpp
parentff1242765ed5cce09ca185f874de5b05b08e109f (diff)
downloadkpicosim-8f1624dd9a394be19ccf9d63e4de0a0558831ca3.tar.gz
kpicosim-8f1624dd9a394be19ccf9d63e4de0a0558831ca3.zip
TQt4 port kpicosim
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kpicosim@1238884 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/codeeditor.cpp')
-rwxr-xr-xsrc/codeeditor.cpp48
1 files changed, 24 insertions, 24 deletions
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;
}