diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-14 16:45:05 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-14 16:45:05 +0000 |
commit | 48d4a26399959121f33d2bc3bfe51c7827b654fc (patch) | |
tree | 5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.cpp | |
parent | 7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff) | |
download | tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip |
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.cpp')
-rw-r--r-- | languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.cpp b/languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.cpp index f3c5f7f2..4b78645a 100644 --- a/languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.cpp +++ b/languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.cpp @@ -11,7 +11,7 @@ #include <tqtextedit.h> #include <tqfile.h> #include <tqfiledialog.h> -#include <tqstatusbar.h> +#include <statusbar.h> #include <tqmessagebox.h> #include <tqprinter.h> #include <tqapplication.h> @@ -36,17 +36,17 @@ openIcon = TQPixmap( fileopen ); TQToolButton * fileOpen - = new TQToolButton( openIcon, tr("Open File"), TQString::null, + = new TQToolButton( openIcon, tr("Open File"), TQString(), this, TQT_SLOT(choose()), fileTools, "open file" ); saveIcon = TQPixmap( filesave ); TQToolButton * fileSave - = new TQToolButton( saveIcon, tr("Save File"), TQString::null, + = new TQToolButton( saveIcon, tr("Save File"), TQString(), this, TQT_SLOT(save()), fileTools, "save file" ); printIcon = TQPixmap( fileprint ); TQToolButton * filePrint - = new TQToolButton( printIcon, tr("Print File"), TQString::null, + = new TQToolButton( printIcon, tr("Print File"), TQString(), this, TQT_SLOT(print()), fileTools, "print file" ); @@ -103,7 +103,7 @@ file->insertItem( tr("&Close"), this, TQT_SLOT(close()), CTRL+Key_W ); - file->insertItem( tr("&Quit"), qApp, TQT_SLOT( closeAllWindows() ), CTRL+Key_Q ); + file->insertItem( tr("&Quit"), tqApp, TQT_SLOT( closeAllWindows() ), CTRL+Key_Q ); menuBar()->insertSeparator(); @@ -111,7 +111,7 @@ menuBar()->insertItem( tr("&Help"), help ); help->insertItem( tr("&About"), this, TQT_SLOT(about()), Key_F1 ); - help->insertItem( tr("About &Qt"), this, TQT_SLOT(aboutQt()) ); + help->insertItem( tr("About &TQt"), this, TQT_SLOT(aboutTQt()) ); help->insertSeparator(); help->insertItem( tr("What's &This"), this, TQT_SLOT(whatsThis()), SHIFT+Key_F1 ); @@ -134,13 +134,13 @@ void %{APPNAME}::newDoc() { %{APPNAME} *ed = new %{APPNAME}; - ed->setCaption(tr("Qt Example - Application")); + ed->setCaption(tr("TQt Example - Application")); ed->show(); } void %{APPNAME}::choose() { - TQString fn = TQFileDialog::getOpenFileName( TQString::null, TQString::null, + TQString fn = TQFileDialog::getOpenFileName( TQString(), TQString(), this); if ( !fn.isEmpty() ) load( fn ); @@ -159,7 +159,7 @@ void %{APPNAME}::load( const TQString &fileName ) e->setText( ts.read() ); e->setModified( FALSE ); setCaption( fileName ); - statusBar()->message( tr("Loaded document %1").arg(fileName), 2000 ); + statusBar()->message( tr("Loaded document %1").tqarg(fileName), 2000 ); } @@ -173,7 +173,7 @@ void %{APPNAME}::save() TQString text = e->text(); TQFile f( filename ); if ( !f.open( IO_WriteOnly ) ) { - statusBar()->message( tr("Could not write to %1").arg(filename), + statusBar()->message( tr("Could not write to %1").tqarg(filename), 2000 ); return; } @@ -186,13 +186,13 @@ void %{APPNAME}::save() setCaption( filename ); - statusBar()->message( tr( "File %1 saved" ).arg( filename ), 2000 ); + statusBar()->message( tr( "File %1 saved" ).tqarg( filename ), 2000 ); } void %{APPNAME}::saveAs() { - TQString fn = TQFileDialog::getSaveFileName( TQString::null, TQString::null, + TQString fn = TQFileDialog::getSaveFileName( TQString(), TQString(), this ); if ( !fn.isEmpty() ) { filename = fn; @@ -249,7 +249,7 @@ void %{APPNAME}::closeEvent( TQCloseEvent* ce ) return; } - switch( TQMessageBox::information( this, tr("Qt Application Example"), + switch( TQMessageBox::information( this, tr("TQt Application Example"), tr("Do you want to save the changes" " to the document?"), tr("Yes"), tr("No"), tr("Cancel"), @@ -271,13 +271,13 @@ void %{APPNAME}::closeEvent( TQCloseEvent* ce ) void %{APPNAME}::about() { - TQMessageBox::about( this, tr("Qt Application Example"), + TQMessageBox::about( this, tr("TQt Application Example"), tr("This example demonstrates simple use of " - "TQMainWindow,\nQMenuBar and TQToolBar.")); + "TQMainWindow,\nTQMenuBar and TQToolBar.")); } -void %{APPNAME}::aboutQt() +void %{APPNAME}::aboutTQt() { - TQMessageBox::aboutQt( this, tr("Qt Application Example") ); + TQMessageBox::aboutTQt( this, tr("TQt Application Example") ); } |