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/kmlineeditspell.cpp | 60 +++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'kmail/kmlineeditspell.cpp') diff --git a/kmail/kmlineeditspell.cpp b/kmail/kmlineeditspell.cpp index ca315dea1..835421873 100644 --- a/kmail/kmlineeditspell.cpp +++ b/kmail/kmlineeditspell.cpp @@ -22,14 +22,14 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include KMLineEdit::KMLineEdit(bool useCompletion, - QWidget *parent, const char *name) + TQWidget *parent, const char *name) : KPIM::AddresseeLineEdit(parent,useCompletion,name) { allowSemiColonAsSeparator( GlobalSettings::allowSemicolonAsAddressSeparator() ); @@ -37,7 +37,7 @@ KMLineEdit::KMLineEdit(bool useCompletion, //----------------------------------------------------------------------------- -void KMLineEdit::keyPressEvent(QKeyEvent *e) +void KMLineEdit::keyPressEvent(TQKeyEvent *e) { if ((e->key() == Key_Enter || e->key() == Key_Return) && !completionBox()->isVisible()) @@ -60,12 +60,12 @@ void KMLineEdit::keyPressEvent(QKeyEvent *e) } -void KMLineEdit::insertEmails( const QStringList & emails ) +void KMLineEdit::insertEmails( const TQStringList & emails ) { if ( emails.empty() ) return; - QString contents = text(); + TQString contents = text(); if ( !contents.isEmpty() ) contents += ','; // only one address, don't need kpopup to choose @@ -75,17 +75,17 @@ void KMLineEdit::insertEmails( const QStringList & emails ) } //multiple emails, let the user choose one KPopupMenu menu( this, "Addresschooser" ); - for ( QStringList::const_iterator it = emails.begin(), end = emails.end() ; it != end; ++it ) + for ( TQStringList::const_iterator it = emails.begin(), end = emails.end() ; it != end; ++it ) menu.insertItem( *it ); - const int result = menu.exec( QCursor::pos() ); + const int result = menu.exec( TQCursor::pos() ); if ( result < 0 ) return; setText( contents + menu.text( result ) ); } -void KMLineEdit::dropEvent(QDropEvent *event) +void KMLineEdit::dropEvent(TQDropEvent *event) { - QString vcards; + TQString vcards; KVCardDrag::decode( event, vcards ); if ( !vcards.isEmpty() ) { KABC::VCardConverter converter; @@ -101,19 +101,19 @@ void KMLineEdit::dropEvent(QDropEvent *event) KURL::List::Iterator it = urls.begin(); KABC::VCardConverter converter; KABC::Addressee::List list; - QString fileName; - QString caption( i18n( "vCard Import Failed" ) ); + TQString fileName; + TQString caption( i18n( "vCard Import Failed" ) ); for ( it = urls.begin(); it != urls.end(); ++it ) { if ( KIO::NetAccess::download( *it, fileName, parentWidget() ) ) { - QFile file( fileName ); + TQFile file( fileName ); file.open( IO_ReadOnly ); - QByteArray rawData = file.readAll(); + TQByteArray rawData = file.readAll(); file.close(); - QString data = QString::fromUtf8( rawData.data(), rawData.size() + 1 ); + TQString data = TQString::fromUtf8( rawData.data(), rawData.size() + 1 ); list += converter.parseVCards( data ); KIO::NetAccess::removeTempFile( fileName ); } else { - QString text = i18n( "Unable to access %1." ); + TQString text = i18n( "Unable to access %1." ); KMessageBox::error( parentWidget(), text.arg( (*it).url() ), caption ); } KABC::Addressee::List::Iterator ait; @@ -126,15 +126,15 @@ void KMLineEdit::dropEvent(QDropEvent *event) } } -QPopupMenu *KMLineEdit::createPopupMenu() +TQPopupMenu *KMLineEdit::createPopupMenu() { - QPopupMenu *menu = KPIM::AddresseeLineEdit::createPopupMenu(); + TQPopupMenu *menu = KPIM::AddresseeLineEdit::createPopupMenu(); if ( !menu ) return 0; menu->insertSeparator(); menu->insertItem( i18n( "Edit Recent Addresses..." ), - this, SLOT( editRecentAddresses() ) ); + this, TQT_SLOT( editRecentAddresses() ) ); return menu; } @@ -146,8 +146,8 @@ void KMLineEdit::editRecentAddresses() if ( !dlg.exec() ) return; KRecentAddress::RecentAddresses::self( KMKernel::config() )->clear(); - const QStringList addrList = dlg.addresses(); - for ( QStringList::const_iterator it = addrList.begin(), end = addrList.end() ; it != end ; ++it ) + const TQStringList addrList = dlg.addresses(); + for ( TQStringList::const_iterator it = addrList.begin(), end = addrList.end() ; it != end ; ++it ) KRecentAddress::RecentAddresses::self( KMKernel::config() )->add( *it ); loadContacts(); } @@ -161,10 +161,10 @@ void KMLineEdit::loadContacts() if ( GlobalSettings::self()->showRecentAddressesInComposer() ){ if ( KMKernel::self() ) { - QStringList recent = + TQStringList recent = KRecentAddress::RecentAddresses::self( KMKernel::config() )->addresses(); - QStringList::Iterator it = recent.begin(); - QString name, email; + TQStringList::Iterator it = recent.begin(); + TQString name, email; int idx = addCompletionSource( i18n( "Recent Addresses" ) ); for ( ; it != recent.end(); ++it ) { KABC::Addressee addr; @@ -179,7 +179,7 @@ void KMLineEdit::loadContacts() KMLineEditSpell::KMLineEditSpell(bool useCompletion, - QWidget *parent, const char *name) + TQWidget *parent, const char *name) : KMLineEdit(useCompletion,parent,name) { } @@ -190,18 +190,18 @@ void KMLineEditSpell::highLightWord( unsigned int length, unsigned int pos ) setSelection ( pos, length ); } -void KMLineEditSpell::spellCheckDone( const QString &s ) +void KMLineEditSpell::spellCheckDone( const TQString &s ) { if( s != text() ) setText( s ); } -void KMLineEditSpell::spellCheckerMisspelling( const QString &_text, const QStringList&, unsigned int pos) +void KMLineEditSpell::spellCheckerMisspelling( const TQString &_text, const TQStringList&, unsigned int pos) { highLightWord( _text.length(),pos ); } -void KMLineEditSpell::spellCheckerCorrected( const QString &old, const QString &corr, unsigned int pos) +void KMLineEditSpell::spellCheckerCorrected( const TQString &old, const TQString &corr, unsigned int pos) { if( old!= corr ) { -- cgit v1.2.1