diff options
Diffstat (limited to 'kopete/plugins/translator')
-rw-r--r-- | kopete/plugins/translator/translatordialog.cpp | 4 | ||||
-rw-r--r-- | kopete/plugins/translator/translatordialog.h | 6 | ||||
-rw-r--r-- | kopete/plugins/translator/translatorguiclient.cpp | 22 | ||||
-rw-r--r-- | kopete/plugins/translator/translatorguiclient.h | 6 | ||||
-rw-r--r-- | kopete/plugins/translator/translatorlanguages.cpp | 6 | ||||
-rw-r--r-- | kopete/plugins/translator/translatorlanguages.h | 34 | ||||
-rw-r--r-- | kopete/plugins/translator/translatorplugin.cpp | 108 | ||||
-rw-r--r-- | kopete/plugins/translator/translatorplugin.h | 30 | ||||
-rw-r--r-- | kopete/plugins/translator/translatorprefs.cpp | 8 |
9 files changed, 112 insertions, 112 deletions
diff --git a/kopete/plugins/translator/translatordialog.cpp b/kopete/plugins/translator/translatordialog.cpp index c03921fc..02e405ec 100644 --- a/kopete/plugins/translator/translatordialog.cpp +++ b/kopete/plugins/translator/translatordialog.cpp @@ -21,7 +21,7 @@ #include "translatordialog.h" -TranslatorDialog::TranslatorDialog(const QString &text,QWidget *parent, const char *name ) : KDialogBase(parent,name,true,i18n("Translator Plugin"), Ok) +TranslatorDialog::TranslatorDialog(const TQString &text,TQWidget *parent, const char *name ) : KDialogBase(parent,name,true,i18n("Translator Plugin"), Ok) { m_textEdit=new KTextEdit(this); setMainWidget(m_textEdit); @@ -31,7 +31,7 @@ TranslatorDialog::~TranslatorDialog() { } -QString TranslatorDialog::translatedText() +TQString TranslatorDialog::translatedText() { return m_textEdit->text(); } diff --git a/kopete/plugins/translator/translatordialog.h b/kopete/plugins/translator/translatordialog.h index 70fd46c0..40a5523e 100644 --- a/kopete/plugins/translator/translatordialog.h +++ b/kopete/plugins/translator/translatordialog.h @@ -18,7 +18,7 @@ #ifndef TRANSLATORDIALOG_H #define TRANSLATORDIALOG_H -#include <qwidget.h> +#include <tqwidget.h> #include <kdialogbase.h> //#include <kopetemessage.h> @@ -33,10 +33,10 @@ class TranslatorDialog : public KDialogBase Q_OBJECT public: - TranslatorDialog(const QString &translated, QWidget *parent=0, const char *name=0); + TranslatorDialog(const TQString &translated, TQWidget *parent=0, const char *name=0); ~TranslatorDialog(); - QString translatedText(); + TQString translatedText(); private: KTextEdit *m_textEdit; diff --git a/kopete/plugins/translator/translatorguiclient.cpp b/kopete/plugins/translator/translatorguiclient.cpp index ae175f41..6af66f37 100644 --- a/kopete/plugins/translator/translatorguiclient.cpp +++ b/kopete/plugins/translator/translatorguiclient.cpp @@ -17,7 +17,7 @@ ************************************************************************* */ -#include <qvariant.h> +#include <tqvariant.h> #include <kdebug.h> #include <kaction.h> @@ -34,14 +34,14 @@ #include "translatorlanguages.h" TranslatorGUIClient::TranslatorGUIClient( Kopete::ChatSession *parent, const char *name ) -: QObject( parent, name ), KXMLGUIClient( parent ) +: TQObject( parent, name ), KXMLGUIClient( parent ) { setInstance( TranslatorPlugin::plugin()->instance() ); - connect( TranslatorPlugin::plugin(), SIGNAL( destroyed( QObject * ) ), this, SLOT( deleteLater() ) ); + connect( TranslatorPlugin::plugin(), TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( deleteLater() ) ); m_manager = parent; - new KAction( i18n( "Translate" ), "locale", CTRL + Key_T, this, SLOT( slotTranslateChat() ), actionCollection(), "translateCurrentMessage" ); + new KAction( i18n( "Translate" ), "locale", CTRL + Key_T, this, TQT_SLOT( slotTranslateChat() ), actionCollection(), "translateCurrentMessage" ); setXMLFile( "translatorchatui.rc" ); } @@ -56,14 +56,14 @@ void TranslatorGUIClient::slotTranslateChat() return; Kopete::Message msg = m_manager->view()->currentMessage(); - QString body = msg.plainBody(); + TQString body = msg.plainBody(); if ( body.isEmpty() ) return; - QString src_lang = TranslatorPlugin::plugin()->m_myLang; - QString dst_lang; + TQString src_lang = TranslatorPlugin::plugin()->m_myLang; + TQString dst_lang; - QPtrList<Kopete::Contact> list = m_manager->members(); + TQPtrList<Kopete::Contact> list = m_manager->members(); Kopete::MetaContact *to = list.first()->metaContact(); dst_lang = to->pluginData( TranslatorPlugin::plugin(), "languageKey" ); if ( dst_lang.isEmpty() || dst_lang == "null" ) @@ -73,12 +73,12 @@ void TranslatorGUIClient::slotTranslateChat() } // We search for src_dst - TranslatorPlugin::plugin()->translateMessage( body, src_lang, dst_lang, this, SLOT( messageTranslated( const QVariant & ) ) ); + TranslatorPlugin::plugin()->translateMessage( body, src_lang, dst_lang, this, TQT_SLOT( messageTranslated( const TQVariant & ) ) ); } -void TranslatorGUIClient::messageTranslated( const QVariant &result ) +void TranslatorGUIClient::messageTranslated( const TQVariant &result ) { - QString translated = result.toString(); + TQString translated = result.toString(); if ( translated.isEmpty() ) { kdDebug( 14308 ) << k_funcinfo << "Empty string returned" << endl; diff --git a/kopete/plugins/translator/translatorguiclient.h b/kopete/plugins/translator/translatorguiclient.h index 32ff015f..68cb4fa7 100644 --- a/kopete/plugins/translator/translatorguiclient.h +++ b/kopete/plugins/translator/translatorguiclient.h @@ -20,7 +20,7 @@ #ifndef TRANSLATORGUICLIENT_H #define TRANSLATORGUICLIENT_H -#include <qobject.h> +#include <tqobject.h> #include <kxmlguiclient.h> #include <kio/job.h> @@ -34,7 +34,7 @@ namespace Kopete { class ChatSession; } * @author Olivier Goffart <ogoffart @ kde.org> */ -class TranslatorGUIClient : public QObject , public KXMLGUIClient +class TranslatorGUIClient : public TQObject , public KXMLGUIClient { Q_OBJECT @@ -44,7 +44,7 @@ public: private slots: void slotTranslateChat(); - void messageTranslated(const QVariant&); + void messageTranslated(const TQVariant&); private: Kopete::ChatSession *m_manager; diff --git a/kopete/plugins/translator/translatorlanguages.cpp b/kopete/plugins/translator/translatorlanguages.cpp index d0a1e0a0..5eecbf22 100644 --- a/kopete/plugins/translator/translatorlanguages.cpp +++ b/kopete/plugins/translator/translatorlanguages.cpp @@ -19,8 +19,8 @@ ************************************************************************* */ -#include <qstring.h> -#include <qmap.h> +#include <tqstring.h> +#include <tqmap.h> #include <klocale.h> #include "translatorlanguages.h" @@ -83,7 +83,7 @@ TranslatorLanguages::TranslatorLanguages() m_supported["google"].append("it_en"); m_supported["google"].append("pt_en"); - QMap<QString,QString>::ConstIterator i; + TQMap<TQString,TQString>::ConstIterator i; for ( i = m_langs.begin(); i != m_langs.end() ; ++i ) { diff --git a/kopete/plugins/translator/translatorlanguages.h b/kopete/plugins/translator/translatorlanguages.h index cbd6385f..3ef4fb16 100644 --- a/kopete/plugins/translator/translatorlanguages.h +++ b/kopete/plugins/translator/translatorlanguages.h @@ -22,8 +22,8 @@ #ifndef TRANSLATORLANGUAGES_H_ #define TRANSLATORLANGUAGES_H_ -#include <qmap.h> -#include <qstringlist.h> +#include <tqmap.h> +#include <tqstringlist.h> class QString; @@ -37,28 +37,28 @@ public: * Language APIs * ***************************************************************************/ - const QString& languageName( const QString &key ) + const TQString& languageName( const TQString &key ) { return m_langs[key]; }; - const int languageIndex ( const QString &key ) + const int languageIndex ( const TQString &key ) { return m_langKeyIntMap[key]; }; - const QString& languageKey( const int index ) + const TQString& languageKey( const int index ) { return m_langIntKeyMap[index]; }; - const QMap<QString,QString>& languagesMap() + const TQMap<TQString,TQString>& languagesMap() { return m_langs; }; - const QMap<QString,QString>& servicesMap() + const TQMap<TQString,TQString>& servicesMap() { return m_services; }; - const QStringList& supported( const QString &servicekey ) + const TQStringList& supported( const TQString &servicekey ) { return m_supported[servicekey]; }; - const int serviceIndex ( const QString &key ) + const int serviceIndex ( const TQString &key ) { return m_servicesKeyIntMap[key]; }; - const QString& serviceKey( const int index ) + const TQString& serviceKey( const int index ) { return m_servicesIntKeyMap[index]; }; int numLanguages() { return m_lc; }; @@ -68,21 +68,21 @@ public: private: /* Known Languages key -> desc ie: en -> English */ - QMap< QString, QString> m_langs; + TQMap< TQString, TQString> m_langs; /* Known Services key -> desc ie: en -> English */ - QMap< QString, QString> m_services; + TQMap< TQString, TQString> m_services; /* Supported translations per service, src_dst format ( ie: en_es )*/ - QMap< QString, QStringList > m_supported; + TQMap< TQString, TQStringList > m_supported; /* int to lang key and viceversa*/ - QMap<int, QString> m_langIntKeyMap; - QMap<QString, int> m_langKeyIntMap; + TQMap<int, TQString> m_langIntKeyMap; + TQMap<TQString, int> m_langKeyIntMap; /* int to services key and viceversa*/ - QMap<int, QString> m_servicesIntKeyMap; - QMap<QString, int> m_servicesKeyIntMap; + TQMap<int, TQString> m_servicesIntKeyMap; + TQMap<TQString, int> m_servicesKeyIntMap; /* Lang counter */ int m_lc; diff --git a/kopete/plugins/translator/translatorplugin.cpp b/kopete/plugins/translator/translatorplugin.cpp index 4ac8367f..0767e24e 100644 --- a/kopete/plugins/translator/translatorplugin.cpp +++ b/kopete/plugins/translator/translatorplugin.cpp @@ -20,10 +20,10 @@ google translation page layout (13-sept-2007) */ -#include <qapplication.h> -#include <qregexp.h> -#include <qsignal.h> -#include <qstring.h> +#include <tqapplication.h> +#include <tqregexp.h> +#include <tqsignal.h> +#include <tqstring.h> #include <kdebug.h> #include <kaction.h> @@ -51,7 +51,7 @@ K_EXPORT_COMPONENT_FACTORY( kopete_translator, TranslatorPluginFactory( &aboutda K_EXPORT_COMPONENT_FACTORY( kopete_translator, TranslatorPluginFactory( "kopete_translator" ) ) #endif -TranslatorPlugin::TranslatorPlugin( QObject *parent, const char *name, const QStringList & /* args */ ) +TranslatorPlugin::TranslatorPlugin( TQObject *parent, const char *name, const TQStringList & /* args */ ) : Kopete::Plugin( TranslatorPluginFactory::instance(), parent, name ) { kdDebug( 14308 ) << k_funcinfo << endl; @@ -64,32 +64,32 @@ TranslatorPlugin::TranslatorPlugin( QObject *parent, const char *name, const QSt m_languages = new TranslatorLanguages; - connect( Kopete::ChatSessionManager::self(), SIGNAL( aboutToDisplay( Kopete::Message & ) ), - this, SLOT( slotIncomingMessage( Kopete::Message & ) ) ); - connect( Kopete::ChatSessionManager::self(), SIGNAL( aboutToSend( Kopete::Message & ) ), - this, SLOT( slotOutgoingMessage( Kopete::Message & ) ) ); - connect( Kopete::ChatSessionManager::self(), SIGNAL( chatSessionCreated( Kopete::ChatSession * ) ), - this, SLOT( slotNewKMM( Kopete::ChatSession * ) ) ); + connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( aboutToDisplay( Kopete::Message & ) ), + this, TQT_SLOT( slotIncomingMessage( Kopete::Message & ) ) ); + connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( aboutToSend( Kopete::Message & ) ), + this, TQT_SLOT( slotOutgoingMessage( Kopete::Message & ) ) ); + connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( chatSessionCreated( Kopete::ChatSession * ) ), + this, TQT_SLOT( slotNewKMM( Kopete::ChatSession * ) ) ); - QStringList keys; - QMap<QString, QString> m = m_languages->languagesMap(); + TQStringList keys; + TQMap<TQString, TQString> m = m_languages->languagesMap(); for ( int k = 0; k <= m_languages->numLanguages(); k++ ) keys << m[ m_languages->languageKey( k ) ]; m_actionLanguage = new KSelectAction( i18n( "Set &Language" ), "locale", 0, actionCollection(), "contactLanguage" ); m_actionLanguage->setItems( keys ); - connect( m_actionLanguage, SIGNAL( activated() ), this, SLOT(slotSetLanguage() ) ); - connect( Kopete::ContactList::self(), SIGNAL( metaContactSelected( bool ) ), this, SLOT( slotSelectionChanged( bool ) ) ); + connect( m_actionLanguage, TQT_SIGNAL( activated() ), this, TQT_SLOT(slotSetLanguage() ) ); + connect( Kopete::ContactList::self(), TQT_SIGNAL( metaContactSelected( bool ) ), this, TQT_SLOT( slotSelectionChanged( bool ) ) ); setXMLFile( "translatorui.rc" ); //Add GUI action to all already existing kmm (if the plugin is launched when kopete already rining) - QValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions(); - for (QValueListIterator<Kopete::ChatSession*> it= sessions.begin(); it!=sessions.end() ; ++it) + TQValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions(); + for (TQValueListIterator<Kopete::ChatSession*> it= sessions.begin(); it!=sessions.end() ; ++it) slotNewKMM( *it ); loadSettings(); - connect( this, SIGNAL( settingsChanged() ), this, SLOT( loadSettings() ) ); + connect( this, TQT_SIGNAL( settingsChanged() ), this, TQT_SLOT( loadSettings() ) ); } TranslatorPlugin::~TranslatorPlugin() @@ -147,7 +147,7 @@ void TranslatorPlugin::slotSelectionChanged( bool b ) if( !m ) return; - QString languageKey = m->pluginData( this, "languageKey" ); + TQString languageKey = m->pluginData( this, "languageKey" ); if ( !languageKey.isEmpty() && languageKey != "null" ) m_actionLanguage->setCurrentItem( m_languages->languageIndex( languageKey ) ); else @@ -164,8 +164,8 @@ void TranslatorPlugin::slotIncomingMessage( Kopete::Message &msg ) if ( m_incomingMode == DontTranslate ) return; - QString src_lang; - QString dst_lang; + TQString src_lang; + TQString dst_lang; if ( ( msg.direction() == Kopete::Message::Inbound ) && !msg.plainBody().isEmpty() ) { @@ -193,8 +193,8 @@ void TranslatorPlugin::slotOutgoingMessage( Kopete::Message &msg ) if ( m_outgoingMode == DontTranslate ) return; - QString src_lang; - QString dst_lang; + TQString src_lang; + TQString dst_lang; if ( ( msg.direction() == Kopete::Message::Outbound ) && ( !msg.plainBody().isEmpty() ) ) { @@ -218,12 +218,12 @@ void TranslatorPlugin::slotOutgoingMessage( Kopete::Message &msg ) } } -void TranslatorPlugin::translateMessage( const QString &msg, const QString &from, const QString &to, QObject *obj, const char* slot ) +void TranslatorPlugin::translateMessage( const TQString &msg, const TQString &from, const TQString &to, TQObject *obj, const char* slot ) { - QSignal completeSignal; + TQSignal completeSignal; completeSignal.connect( obj, slot ); - QString result = translateMessage( msg, from, to ); + TQString result = translateMessage( msg, from, to ); if(!result.isNull()) { @@ -232,19 +232,19 @@ void TranslatorPlugin::translateMessage( const QString &msg, const QString &from } } -QString TranslatorPlugin::translateMessage( const QString &msg, const QString &from, const QString &to ) +TQString TranslatorPlugin::translateMessage( const TQString &msg, const TQString &from, const TQString &to ) { if ( from == to ) { kdDebug( 14308 ) << k_funcinfo << "Src and Dst languages are the same" << endl; - return QString::null; + return TQString::null; } // We search for src_dst if(! m_languages->supported( m_service ).contains( from + "_" + to ) ) { kdDebug( 14308 ) << k_funcinfo << from << "_" << to << " is not supported by service " << m_service << endl; - return QString::null; + return TQString::null; } @@ -253,19 +253,19 @@ QString TranslatorPlugin::translateMessage( const QString &msg, const QString &f else if ( m_service == "google" ) return googleTranslateMessage( msg ,from, to ); else - return QString::null; + return TQString::null; } -QString TranslatorPlugin::googleTranslateMessage( const QString &msg, const QString &from, const QString &to ) +TQString TranslatorPlugin::googleTranslateMessage( const TQString &msg, const TQString &from, const TQString &to ) { KURL translatorURL ( "http://translate.google.com/translate_t"); - QString body = KURL::encode_string( msg ); - QString lp = from + "|" + to; + TQString body = KURL::encode_string( msg ); + TQString lp = from + "|" + to; - QCString postData = QString( "text=" + body + "&langpair=" + lp ).utf8(); + TQCString postData = TQString( "text=" + body + "&langpair=" + lp ).utf8(); - QString gurl = "http://translate.google.com/translate_t?text=" + body +"&langpair=" + lp; + TQString gurl = "http://translate.google.com/translate_t?text=" + body +"&langpair=" + lp; kdDebug(14308) << k_funcinfo << " URL: " << gurl << endl; KURL geturl ( gurl ); @@ -275,8 +275,8 @@ QString TranslatorPlugin::googleTranslateMessage( const QString &msg, const QStr //job->addMetaData( "content-type", "application/x-www-form-urlencoded" ); //job->addMetaData( "referrer", "http://www.google.com" ); - QObject::connect( job, SIGNAL( data( KIO::Job *, const QByteArray & ) ), this, SLOT( slotDataReceived( KIO::Job *, const QByteArray & ) ) ); - QObject::connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotJobDone( KIO::Job * ) ) ); + TQObject::connect( job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ), this, TQT_SLOT( slotDataReceived( KIO::Job *, const TQByteArray & ) ) ); + TQObject::connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotJobDone( KIO::Job * ) ) ); // KIO is async and we use a sync API, so use the processEvents hack to work around that // FIXME: We need to make the libkopete API async to get rid of this processEvents. @@ -284,7 +284,7 @@ QString TranslatorPlugin::googleTranslateMessage( const QString &msg, const QStr while ( !m_completed[ job ] ) qApp->processEvents(); - QString data = QString::fromLatin1( m_data[ job ] ); + TQString data = TQString::fromLatin1( m_data[ job ] ); // After hacks, we need to clean m_data.remove( job ); @@ -292,27 +292,27 @@ QString TranslatorPlugin::googleTranslateMessage( const QString &msg, const QStr // kdDebug( 14308 ) << k_funcinfo << "Google response:"<< endl << data << endl; -// QRegExp re( "<textarea name=q rows=5 cols=45 wrap=PHYSICAL>(.*)</textarea>" ); - QRegExp re( "<textarea name=utrans wrap=PHYSICAL dilr=ltr rows=5 id=suggestion>(.*)</textarea>"); +// TQRegExp re( "<textarea name=q rows=5 cols=45 wrap=PHYSICAL>(.*)</textarea>" ); + TQRegExp re( "<textarea name=utrans wrap=PHYSICAL dilr=ltr rows=5 id=suggestion>(.*)</textarea>"); re.setMinimal( true ); re.search( data ); return re.cap( 1 ); } -QString TranslatorPlugin::babelTranslateMessage( const QString &msg, const QString &from, const QString &to ) +TQString TranslatorPlugin::babelTranslateMessage( const TQString &msg, const TQString &from, const TQString &to ) { - QString body = KURL::encode_string( msg); - QString lp = from + "_" + to; - QString gurl = "http://babelfish.altavista.com/babelfish/tr?enc=utf8&doit=done&tt=urltext&urltext=" + body + "&lp=" + lp; + TQString body = KURL::encode_string( msg); + TQString lp = from + "_" + to; + TQString gurl = "http://babelfish.altavista.com/babelfish/tr?enc=utf8&doit=done&tt=urltext&urltext=" + body + "&lp=" + lp; KURL geturl ( gurl ); kdDebug( 14308 ) << k_funcinfo << "URL: " << gurl << endl; KIO::TransferJob *job = KIO::get( geturl, false, true ); - QObject::connect( job, SIGNAL( data( KIO::Job *, const QByteArray & ) ), this, SLOT( slotDataReceived( KIO::Job *, const QByteArray & ) ) ); - QObject::connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotJobDone( KIO::Job * ) ) ); + TQObject::connect( job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ), this, TQT_SLOT( slotDataReceived( KIO::Job *, const TQByteArray & ) ) ); + TQObject::connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotJobDone( KIO::Job * ) ) ); // KIO is async and we use a sync API, so use the processEvents hack to work around that // FIXME: We need to make the libkopete API async to get rid of this processEvents. @@ -320,7 +320,7 @@ QString TranslatorPlugin::babelTranslateMessage( const QString &msg, const QStri while ( !m_completed[ job ] ) qApp->processEvents(); - QString data = QString::fromUtf8( m_data[ job ] ); + TQString data = TQString::fromUtf8( m_data[ job ] ); // After hacks, we need to clean m_data.remove( job ); @@ -328,15 +328,15 @@ QString TranslatorPlugin::babelTranslateMessage( const QString &msg, const QStri //kdDebug( 14308 ) << k_funcinfo << "Babelfish response: " << endl << data << endl; -// QRegExp re( "<Div style=padding:10px; lang=..>(.*)</div" ); - QRegExp re( "<div style=padding:10px;>(.*)</div>" ); +// TQRegExp re( "<Div style=padding:10px; lang=..>(.*)</div" ); + TQRegExp re( "<div style=padding:10px;>(.*)</div>" ); re.setMinimal( true ); re.search( data ); return re.cap( 1 ); } -void TranslatorPlugin::sendTranslation( Kopete::Message &msg, const QString &translated ) +void TranslatorPlugin::sendTranslation( Kopete::Message &msg, const TQString &translated ) { if ( translated.isEmpty() ) { @@ -381,16 +381,16 @@ void TranslatorPlugin::sendTranslation( Kopete::Message &msg, const QString &tra }; } -void TranslatorPlugin::slotDataReceived ( KIO::Job *job, const QByteArray &data ) +void TranslatorPlugin::slotDataReceived ( KIO::Job *job, const TQByteArray &data ) { - m_data[ job ] += QCString( data, data.size() + 1 ); + m_data[ job ] += TQCString( data, data.size() + 1 ); } void TranslatorPlugin::slotJobDone ( KIO::Job *job ) { m_completed[ job ] = true; - QObject::disconnect( job, SIGNAL( data( KIO::Job *, const QByteArray & ) ), this, SLOT( slotDataReceived( KIO::Job *, const QByteArray & ) ) ); - QObject::disconnect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotJobDone( KIO::Job * ) ) ); + TQObject::disconnect( job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ), this, TQT_SLOT( slotDataReceived( KIO::Job *, const TQByteArray & ) ) ); + TQObject::disconnect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotJobDone( KIO::Job * ) ) ); } void TranslatorPlugin::slotSetLanguage() diff --git a/kopete/plugins/translator/translatorplugin.h b/kopete/plugins/translator/translatorplugin.h index 2a04b509..823b6eef 100644 --- a/kopete/plugins/translator/translatorplugin.h +++ b/kopete/plugins/translator/translatorplugin.h @@ -21,10 +21,10 @@ #ifndef BABELFISHPLUGIN_H #define BABELFISHPLUGIN_H -#include <qobject.h> -#include <qmap.h> -#include <qcstring.h> -#include <qintdict.h> +#include <tqobject.h> +#include <tqmap.h> +#include <tqcstring.h> +#include <tqintdict.h> #include <kio/job.h> @@ -58,7 +58,7 @@ friend class TranslatorGUIClient; public: static TranslatorPlugin *plugin(); - TranslatorPlugin( QObject *parent, const char *name, const QStringList &args ); + TranslatorPlugin( TQObject *parent, const char *name, const TQStringList &args ); ~TranslatorPlugin(); enum TranslateMode @@ -72,7 +72,7 @@ public: private slots: void slotIncomingMessage( Kopete::Message& msg ); void slotOutgoingMessage( Kopete::Message& msg ); - void slotDataReceived ( KIO::Job *, const QByteArray &data); + void slotDataReceived ( KIO::Job *, const TQByteArray &data); void slotJobDone ( KIO::Job *); void slotSetLanguage(); void slotSelectionChanged(bool); @@ -80,17 +80,17 @@ private slots: void loadSettings(); public: - QString translateMessage( const QString &, const QString &, const QString & ); - void translateMessage( const QString &, const QString &, const QString & , QObject * , const char*); + TQString translateMessage( const TQString &, const TQString &, const TQString & ); + void translateMessage( const TQString &, const TQString &, const TQString & , TQObject * , const char*); protected: - QString googleTranslateMessage( const QString &, const QString &, const QString & ); - QString babelTranslateMessage(const QString &, const QString &, const QString & ); + TQString googleTranslateMessage( const TQString &, const TQString &, const TQString & ); + TQString babelTranslateMessage(const TQString &, const TQString &, const TQString & ); private: - QMap< KIO::Job *, QCString> m_data; - QMap< KIO::Job *, bool> m_completed; + TQMap< KIO::Job *, TQCString> m_data; + TQMap< KIO::Job *, bool> m_completed; KSelectAction* m_actionLanguage; @@ -98,13 +98,13 @@ private: TranslatorLanguages *m_languages; //Settings - QString m_myLang; - QString m_service; + TQString m_myLang; + TQString m_service; unsigned int m_outgoingMode; unsigned int m_incomingMode; private: - void sendTranslation(Kopete::Message &msg, const QString &translated); + void sendTranslation(Kopete::Message &msg, const TQString &translated); }; #endif diff --git a/kopete/plugins/translator/translatorprefs.cpp b/kopete/plugins/translator/translatorprefs.cpp index cb67c4c6..8d06b49f 100644 --- a/kopete/plugins/translator/translatorprefs.cpp +++ b/kopete/plugins/translator/translatorprefs.cpp @@ -20,7 +20,7 @@ #include "kcautoconfigmodule.h" #include "translatorprefsbase.h" #include "translatorlanguages.h" -#include <qcombobox.h> +#include <tqcombobox.h> class TranslatorPreferences; @@ -30,13 +30,13 @@ K_EXPORT_COMPONENT_FACTORY( kcm_kopete_translator, TranslatorConfigFactory( "kcm class TranslatorPreferences : public KCAutoConfigModule { public: - TranslatorPreferences( QWidget *parent = 0, const char * = 0, const QStringList &args = QStringList() ) : KCAutoConfigModule( TranslatorConfigFactory::instance(), parent, args ) + TranslatorPreferences( TQWidget *parent = 0, const char * = 0, const TQStringList &args = TQStringList() ) : KCAutoConfigModule( TranslatorConfigFactory::instance(), parent, args ) { TranslatorPrefsUI *preferencesDialog = new TranslatorPrefsUI(this); TranslatorLanguages languages; - QMap<QString,QString>::ConstIterator i; - QMap<QString,QString> m; + TQMap<TQString,TQString>::ConstIterator i; + TQMap<TQString,TQString> m; m = languages.languagesMap(); for ( i = m.begin(); i != m.end() ; ++i ) |