From a5674939dab000f67fb1046cd1dbf470ba96bdd5 Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 15 May 2007 13:18:18 +0000 Subject: [PATCH] Porting to Qt4 --- src/LogWindow/LogWindow.cxx | 18 ++++----- src/LogWindow/LogWindow.pro | 7 +++- src/LogWindow/resources/LogWindow_msg_en.ts | 41 +++++++++++++++++++++ 3 files changed, 56 insertions(+), 10 deletions(-) create mode 100644 src/LogWindow/resources/LogWindow_msg_en.ts diff --git a/src/LogWindow/LogWindow.cxx b/src/LogWindow/LogWindow.cxx index 277747772..7c4104db2 100755 --- a/src/LogWindow/LogWindow.cxx +++ b/src/LogWindow/LogWindow.cxx @@ -289,23 +289,23 @@ bool LogWindow::saveLog( const QString& fileName ) */ void LogWindow::createActions() { - QAction* a = new QAction( tr( "&Copy" ), this ); - a->setStatusTip( tr( "&Copy" ) ); + QAction* a = new QAction( tr( "EDIT_COPY_CMD" ), this ); + a->setStatusTip( tr( "EDIT_COPY_CMD" ) ); connect( a, SIGNAL( triggered( bool ) ), SLOT( onCopy() ) ); myActions.insert( CopyId, a ); - a = new QAction( tr( "Clea&r" ), this ); - a->setStatusTip( tr( "Clea&r" ) ); + a = new QAction( tr( "EDIT_CLEAR_CMD" ), this ); + a->setStatusTip( tr( "EDIT_CLEAR_CMD" ) ); connect( a, SIGNAL( triggered( bool ) ), SLOT( onClear() ) ); myActions.insert( ClearId, a ); - a = new QAction( tr( "Select &All" ), this ); - a->setStatusTip( tr( "Select &All" ) ); + a = new QAction( tr( "EDIT_SELECTALL_CMD" ), this ); + a->setStatusTip( tr( "EDIT_SELECTALL_CMD" ) ); connect( a, SIGNAL( triggered( bool ) ), SLOT( onSelectAll() ) ); myActions.insert( SelectAllId, a ); - a = new QAction( tr( "&Save log to file..." ), this ); - a->setStatusTip( tr( "&Save log to file..." ) ); + a = new QAction( tr( "EDIT_SAVETOFILE_CMD" ), this ); + a->setStatusTip( tr( "EDIT_SAVETOFILE_CMD" ) ); connect( a, SIGNAL( triggered( bool ) ), SLOT( onSaveToFile() ) ); myActions.insert( SaveToFileId, a ); } @@ -365,7 +365,7 @@ void LogWindow::onSaveToFile() QApplication::restoreOverrideCursor(); if ( !bOk ) - SUIT_MessageBox::error1( this, tr( "Error" ), tr( "Can't save file" ), tr( "OK" ) ); + SUIT_MessageBox::error1( this, tr( "ERR_ERROR" ), tr( "ERR_CANT_SAVE_FILE" ), tr( "BUT_OK" ) ); } /*! diff --git a/src/LogWindow/LogWindow.pro b/src/LogWindow/LogWindow.pro index 22315f2df..8f50fc2ca 100644 --- a/src/LogWindow/LogWindow.pro +++ b/src/LogWindow/LogWindow.pro @@ -17,7 +17,12 @@ HEADERS = LogWindow.h SOURCES = LogWindow.cxx +TRANSLATIONS = resources/LogWindow_msg_en.ts + includes.files = $$HEADERS includes.path = ../../include -INSTALLS += includes +resources.files = resources/*.qm +resources.path = ../../resources + +INSTALLS += includes resources diff --git a/src/LogWindow/resources/LogWindow_msg_en.ts b/src/LogWindow/resources/LogWindow_msg_en.ts new file mode 100644 index 000000000..2e2aef574 --- /dev/null +++ b/src/LogWindow/resources/LogWindow_msg_en.ts @@ -0,0 +1,41 @@ + + + + LogWindow + + + EDIT_COPY_CMD + &Copy + + + + EDIT_CLEAR_CMD + Clea&r + + + + EDIT_SELECTALL_CMD + Select &All + + + + EDIT_SAVETOFILE_CMD + &Save log to file... + + + + ERR_ERROR + Error + + + + ERR_CANT_SAVE_FILE + Can't save file + + + + BUT_OK + &OK + + + -- 2.39.2