From 7be55ffa061c026e35e2d6a0effe1161ddb0d41f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:53:50 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kmail/templatesconfiguration.cpp | 104 +++++++++++++++++++-------------------- 1 file changed, 52 insertions(+), 52 deletions(-) (limited to 'kmail/templatesconfiguration.cpp') diff --git a/kmail/templatesconfiguration.cpp b/kmail/templatesconfiguration.cpp index bc09eff4..1e2d74cb 100644 --- a/kmail/templatesconfiguration.cpp +++ b/kmail/templatesconfiguration.cpp @@ -22,13 +22,13 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -#include +#include #include #include "templatesconfiguration_base.h" @@ -38,34 +38,34 @@ #include "templatesconfiguration.h" -TemplatesConfiguration::TemplatesConfiguration( QWidget *parent, const char *name ) +TemplatesConfiguration::TemplatesConfiguration( TQWidget *parent, const char *name ) :TemplatesConfigurationBase( parent, name ) { - QFont f = KGlobalSettings::fixedFont(); + TQFont f = KGlobalSettings::fixedFont(); textEdit_new->setFont( f ); textEdit_reply->setFont( f ); textEdit_reply_all->setFont( f ); textEdit_forward->setFont( f ); - setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ); + setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ); sizeHint(); - connect( textEdit_new, SIGNAL( textChanged() ), - this, SLOT( slotTextChanged( void ) ) ); - connect( textEdit_reply, SIGNAL( textChanged() ), - this, SLOT( slotTextChanged( void ) ) ); - connect( textEdit_reply_all, SIGNAL( textChanged() ), - this, SLOT( slotTextChanged( void ) ) ); - connect( textEdit_forward, SIGNAL( textChanged() ), - this, SLOT( slotTextChanged( void ) ) ); - connect( lineEdit_quote, SIGNAL( textChanged( const QString & ) ), - this, SLOT( slotTextChanged( void ) ) ); - - connect( mInsertCommand, SIGNAL( insertCommand(QString, int) ), - this, SLOT( slotInsertCommand(QString, int) ) ); - - QString help; - if ( QString( name ) == "folder-templates" ) { + connect( textEdit_new, TQT_SIGNAL( textChanged() ), + this, TQT_SLOT( slotTextChanged( void ) ) ); + connect( textEdit_reply, TQT_SIGNAL( textChanged() ), + this, TQT_SLOT( slotTextChanged( void ) ) ); + connect( textEdit_reply_all, TQT_SIGNAL( textChanged() ), + this, TQT_SLOT( slotTextChanged( void ) ) ); + connect( textEdit_forward, TQT_SIGNAL( textChanged() ), + this, TQT_SLOT( slotTextChanged( void ) ) ); + connect( lineEdit_quote, TQT_SIGNAL( textChanged( const TQString & ) ), + this, TQT_SLOT( slotTextChanged( void ) ) ); + + connect( mInsertCommand, TQT_SIGNAL( insertCommand(TQString, int) ), + this, TQT_SLOT( slotInsertCommand(TQString, int) ) ); + + TQString help; + if ( TQString( name ) == "folder-templates" ) { help = i18n( "" "

Here you can create message templates to use when you " @@ -77,7 +77,7 @@ TemplatesConfiguration::TemplatesConfiguration( QWidget *parent, const char *nam "They override both global templates and per-identity " "templates if they are specified.

" "
" ); - } else if ( QString( name ) == "identity-templates" ) { + } else if ( TQString( name ) == "identity-templates" ) { help = i18n( "" "

Here you can create message templates to use when you " @@ -117,7 +117,7 @@ void TemplatesConfiguration::loadFromGlobal() importFromPhrases(); } - QString str; + TQString str; str = GlobalSettings::self()->templateNewMessage(); if ( str.isEmpty() ) { textEdit_new->setText( defaultNewMessage() ); @@ -163,9 +163,9 @@ void TemplatesConfiguration::saveToGlobal() void TemplatesConfiguration::loadFromIdentity( uint id ) { - Templates t( QString("IDENTITY_%1").arg( id ) ); + Templates t( TQString("IDENTITY_%1").arg( id ) ); - QString str; + TQString str; str = t.templateNewMessage(); if ( str.isEmpty() ) { @@ -215,7 +215,7 @@ void TemplatesConfiguration::loadFromIdentity( uint id ) void TemplatesConfiguration::saveToIdentity( uint id ) { - Templates t( QString("IDENTITY_%1").arg( id ) ); + Templates t( TQString("IDENTITY_%1").arg( id ) ); t.setTemplateNewMessage( strOrBlank( textEdit_new->text() ) ); t.setTemplateReply( strOrBlank( textEdit_reply->text() ) ); @@ -225,16 +225,16 @@ void TemplatesConfiguration::saveToIdentity( uint id ) t.writeConfig(); } -void TemplatesConfiguration::loadFromFolder( QString id, uint identity ) +void TemplatesConfiguration::loadFromFolder( TQString id, uint identity ) { Templates t( id ); Templates* tid = 0; if ( identity ) { - tid = new Templates( QString("IDENTITY_%1").arg( identity ) ); + tid = new Templates( TQString("IDENTITY_%1").arg( identity ) ); } - QString str; + TQString str; str = t.templateNewMessage(); if ( str.isEmpty() && tid ) { @@ -299,7 +299,7 @@ void TemplatesConfiguration::loadFromFolder( QString id, uint identity ) delete(tid); } -void TemplatesConfiguration::saveToFolder( QString id ) +void TemplatesConfiguration::saveToFolder( TQString id ) { Templates t( id ); @@ -315,11 +315,11 @@ void TemplatesConfiguration::loadFromPhrases() { int currentNr = GlobalSettings::self()->replyCurrentLanguage(); - ReplyPhrases replyPhrases( QString::number( currentNr ) ); + ReplyPhrases replyPhrases( TQString::number( currentNr ) ); textEdit_new->setText( defaultNewMessage() ); - QString str; + TQString str; str = replyPhrases.phraseReplySender(); if ( !str.isEmpty() ) { @@ -339,7 +339,7 @@ void TemplatesConfiguration::loadFromPhrases() str = replyPhrases.phraseForward(); if ( !str.isEmpty() ) { - textEdit_forward->setText( QString( i18n( + textEdit_forward->setText( TQString( i18n( "%REM=\"Default forward template\"%-\n" "---------- %1 ----------\n" "%TEXT\n" @@ -366,9 +366,9 @@ void TemplatesConfiguration::importFromPhrases() int currentNr = GlobalSettings::self()->replyCurrentLanguage(); - ReplyPhrases replyPhrases( QString::number( currentNr ) ); + ReplyPhrases replyPhrases( TQString::number( currentNr ) ); - QString str; + TQString str; str = replyPhrases.phraseReplySender(); if ( !str.isEmpty() ) { @@ -388,7 +388,7 @@ void TemplatesConfiguration::importFromPhrases() str = replyPhrases.phraseForward(); if ( !str.isEmpty() ) { - GlobalSettings::self()->setTemplateForward( QString( i18n( + GlobalSettings::self()->setTemplateForward( TQString( i18n( "%REM=\"Default forward template\"%-\n" "\n" "---------- %1 ----------\n" @@ -419,10 +419,10 @@ void TemplatesConfiguration::importFromPhrases() GlobalSettings::self()->writeConfig(); } -QString TemplatesConfiguration::convertPhrases( QString &str ) +TQString TemplatesConfiguration::convertPhrases( TQString &str ) { - QString result; - QChar ch; + TQString result; + TQChar ch; unsigned int strLength( str.length() ); for ( uint i = 0; i < strLength; ) { @@ -478,9 +478,9 @@ QString TemplatesConfiguration::convertPhrases( QString &str ) return result; } -void TemplatesConfiguration::slotInsertCommand( QString cmd, int adjustCursor ) +void TemplatesConfiguration::slotInsertCommand( TQString cmd, int adjustCursor ) { - QTextEdit* edit; + TQTextEdit* edit; if( toolBox1->currentItem() == page_new ) { edit = textEdit_new; @@ -506,14 +506,14 @@ void TemplatesConfiguration::slotInsertCommand( QString cmd, int adjustCursor ) edit->setCursorPosition( para, index + cmd.length() ); } -QString TemplatesConfiguration::defaultNewMessage() { +TQString TemplatesConfiguration::defaultNewMessage() { return i18n( "%REM=\"Default new message template\"%-\n" "%BLANK" ); } -QString TemplatesConfiguration::defaultReply() { +TQString TemplatesConfiguration::defaultReply() { return i18n( "%REM=\"Default reply template\"%-\n" "On %ODATEEN %OTIMELONGEN you wrote:\n" @@ -522,7 +522,7 @@ QString TemplatesConfiguration::defaultReply() { ); } -QString TemplatesConfiguration::defaultReplyAll() { +TQString TemplatesConfiguration::defaultReplyAll() { return i18n( "%REM=\"Default reply all template\"%-\n" "On %ODATEEN %OTIMELONGEN %OFROMNAME wrote:\n" @@ -531,7 +531,7 @@ QString TemplatesConfiguration::defaultReplyAll() { ); } -QString TemplatesConfiguration::defaultForward() { +TQString TemplatesConfiguration::defaultForward() { return i18n( "%REM=\"Default forward template\"%-\n" "\n" @@ -547,13 +547,13 @@ QString TemplatesConfiguration::defaultForward() { ); } -QString TemplatesConfiguration::defaultQuoteString() { +TQString TemplatesConfiguration::defaultQuoteString() { return "> "; } -QString TemplatesConfiguration::strOrBlank( QString str ) { +TQString TemplatesConfiguration::strOrBlank( TQString str ) { if ( str.stripWhiteSpace().isEmpty() ) { - return QString( "%BLANK" ); + return TQString( "%BLANK" ); } return str; } -- cgit v1.2.3