summaryrefslogtreecommitdiffstats
path: root/kmail/kmlineeditspell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmail/kmlineeditspell.cpp')
-rw-r--r--kmail/kmlineeditspell.cpp60
1 files changed, 30 insertions, 30 deletions
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 <kcompletionbox.h>
#include <klocale.h>
-#include <qevent.h>
-#include <qfile.h>
-#include <qcstring.h>
-#include <qcursor.h>
+#include <tqevent.h>
+#include <tqfile.h>
+#include <tqcstring.h>
+#include <tqcursor.h>
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( "<qt>Unable to access <b>%1</b>.</qt>" );
+ TQString text = i18n( "<qt>Unable to access <b>%1</b>.</qt>" );
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 )
{