summaryrefslogtreecommitdiffstats
path: root/konq-plugins/babelfish
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:22:56 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:22:56 +0000
commit7346aee26bf190a7e70333c40fab4caca847cd27 (patch)
tree4b019b434f88dcc3eeaafe1d3f26240b4c4718e8 /konq-plugins/babelfish
parent23a3d3aa5b44cbdf305495919866d9dbf4f6da54 (diff)
downloadtdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.tar.gz
tdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1157634 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'konq-plugins/babelfish')
-rw-r--r--konq-plugins/babelfish/plugin_babelfish.cpp138
-rw-r--r--konq-plugins/babelfish/plugin_babelfish.h4
2 files changed, 71 insertions, 71 deletions
diff --git a/konq-plugins/babelfish/plugin_babelfish.cpp b/konq-plugins/babelfish/plugin_babelfish.cpp
index 302b71a..fc7a80e 100644
--- a/konq-plugins/babelfish/plugin_babelfish.cpp
+++ b/konq-plugins/babelfish/plugin_babelfish.cpp
@@ -34,8 +34,8 @@ typedef KGenericFactory<PluginBabelFish> BabelFishFactory;
static const KAboutData aboutdata("babelfish", I18N_NOOP("Translate Web Page") , "1.0" );
K_EXPORT_COMPONENT_FACTORY( libbabelfishplugin, BabelFishFactory( &aboutdata ) )
-PluginBabelFish::PluginBabelFish( QObject* parent, const char* name,
- const QStringList & )
+PluginBabelFish::PluginBabelFish( TQObject* parent, const char* name,
+ const TQStringList & )
: Plugin( parent, name )
{
setInstance(BabelFishFactory::instance());
@@ -60,104 +60,104 @@ PluginBabelFish::PluginBabelFish( QObject* parent, const char* name,
actionCollection(), "translatewebpage_nl" );
m_en->insert( new KAction( i18n("&Chinese (Simplified)"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "en_zh") );
m_en->insert( new KAction( i18n("Chinese (&Traditional)"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "en_zhTW") );
m_en->insert( new KAction( i18n("&Dutch"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "en_nl") );
m_en->insert( new KAction( i18n("&French"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "en_fr") );
m_en->insert( new KAction( i18n("&German"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "en_de") );
m_en->insert( new KAction( i18n("&Italian"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "en_it") );
m_en->insert( new KAction( i18n("&Japanese"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "en_ja") );
m_en->insert( new KAction( i18n("&Korean"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "en_ko") );
m_en->insert( new KAction( i18n("&Norwegian"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "en_no") );
m_en->insert( new KAction( i18n("&Portuguese"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "en_pt") );
m_en->insert( new KAction( i18n("&Russian"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "en_ru") );
m_en->insert( new KAction( i18n("&Spanish"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "en_es") );
m_en->insert( new KAction( i18n("T&hai"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "en_th") );
m_fr->insert( new KAction( i18n("&Dutch"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "fr_nl") );
m_fr->insert( new KAction( i18n("&English"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "fr_en") );
m_fr->insert( new KAction( i18n("&German"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "fr_de") );
m_fr->insert( new KAction( i18n("&Italian"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "fr_it") );
m_fr->insert( new KAction( i18n("&Portuguese"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "fr_pt") );
m_fr->insert( new KAction( i18n("&Spanish"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "fr_es") );
m_de->insert( new KAction( i18n("&English"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "de_en") );
m_de->insert( new KAction( i18n("&French"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "de_fr") );
m_es->insert( new KAction( i18n("&English"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "es_en") );
m_es->insert( new KAction( i18n("&French"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "es_fr") );
m_pt->insert( new KAction( i18n("&English"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "pt_en") );
m_pt->insert( new KAction( i18n("&French"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "pt_fr") );
m_it->insert( new KAction( i18n("&English"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "it_en") );
m_it->insert( new KAction( i18n("&French"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "it_fr") );
m_nl->insert( new KAction( i18n("&English"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "nl_en") );
m_nl->insert( new KAction( i18n("&French"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "nl_fr") );
m_menu->insert( new KAction( i18n("&Chinese (Simplified) to English"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "zh_en") );
m_menu->insert( new KAction( i18n("Chinese (&Traditional) to English"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "zhTW_en") );
m_menu->insert( m_nl );
m_menu->insert( m_en );
@@ -165,14 +165,14 @@ PluginBabelFish::PluginBabelFish( QObject* parent, const char* name,
m_menu->insert( m_de );
m_menu->insert( m_it );
m_menu->insert( new KAction( i18n("&Japanese to English"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "ja_en") );
m_menu->insert( new KAction( i18n("&Korean to English"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "ko_en") );
m_menu->insert( m_pt );
m_menu->insert( new KAction( i18n("&Russian to English"), 0,
- this, SLOT(translateURL()),
+ this, TQT_SLOT(translateURL()),
actionCollection(), "ru_en") );
m_menu->insert( m_es );
m_menu->setEnabled( true );
@@ -181,8 +181,8 @@ PluginBabelFish::PluginBabelFish( QObject* parent, const char* name,
if ( parent && parent->inherits( "KHTMLPart" ) )
{
KParts::ReadOnlyPart* part = static_cast<KParts::ReadOnlyPart *>(parent);
- connect( part, SIGNAL(started(KIO::Job*)), this,
- SLOT(slotStarted(KIO::Job*)) );
+ connect( part, TQT_SIGNAL(started(KIO::Job*)), this,
+ TQT_SLOT(slotStarted(KIO::Job*)) );
}
}
@@ -214,8 +214,8 @@ void PluginBabelFish::translateURL()
// The parent is assumed to be a KHTMLPart
if ( !parent()->inherits("KHTMLPart") )
{
- QString title = i18n( "Cannot Translate Source" );
- QString text = i18n( "Only web pages can be translated using "
+ TQString title = i18n( "Cannot Translate Source" );
+ TQString text = i18n( "Only web pages can be translated using "
"this plugin." );
KMessageBox::sorry( 0L, text, title );
@@ -224,7 +224,7 @@ void PluginBabelFish::translateURL()
// Select engine
KConfig cfg( "translaterc", true );
- QString engine = cfg.readEntry( sender()->name(), "babelfish" );
+ TQString engine = cfg.readEntry( sender()->name(), "babelfish" );
// Get URL
KHTMLPart *part = dynamic_cast<KHTMLPart *>(parent());
@@ -233,7 +233,7 @@ void PluginBabelFish::translateURL()
// we check if we have text selected. if so, we translate that. If
// not, we translate the url
- QString totrans;
+ TQString totrans;
if ( part->hasSelection() )
{
if( engine == "reverso" || engine == "tsail" )
@@ -248,8 +248,8 @@ void PluginBabelFish::translateURL()
// Check syntax
if ( !url.isValid() )
{
- QString title = i18n( "Malformed URL" );
- QString text = i18n( "The URL you entered is not valid, please "
+ TQString title = i18n( "Malformed URL" );
+ TQString text = i18n( "The URL you entered is not valid, please "
"correct it and try again." );
KMessageBox::sorry( 0L, text, title );
return;
@@ -259,36 +259,36 @@ void PluginBabelFish::translateURL()
// Create URL
KURL result;
- QString query;
+ TQString query;
if( engine == "freetranslation" ) {
query = "sequence=core&Submit=FREE Translation&language=";
- if( sender()->name() == QString( "en_es" ) )
+ if( sender()->name() == TQString( "en_es" ) )
query += "English/Spanish";
- else if( sender()->name() == QString( "en_de" ) )
+ else if( sender()->name() == TQString( "en_de" ) )
query += "English/German";
- else if( sender()->name() == QString( "en_it" ) )
+ else if( sender()->name() == TQString( "en_it" ) )
query += "English/Italian";
- else if( sender()->name() == QString( "en_nl" ) )
+ else if( sender()->name() == TQString( "en_nl" ) )
query += "English/Dutch";
- else if( sender()->name() == QString( "en_pt" ) )
+ else if( sender()->name() == TQString( "en_pt" ) )
query += "English/Portuguese";
- else if( sender()->name() == QString( "en_no" ) )
+ else if( sender()->name() == TQString( "en_no" ) )
query += "English/Norwegian";
- else if( sender()->name() == QString( "en_zh" ) )
+ else if( sender()->name() == TQString( "en_zh" ) )
query += "English/SimplifiedChinese";
- else if( sender()->name() == QString( "en_zhTW" ) )
+ else if( sender()->name() == TQString( "en_zhTW" ) )
query += "English/TraditionalChinese";
- else if( sender()->name() == QString( "es_en" ) )
+ else if( sender()->name() == TQString( "es_en" ) )
query += "Spanish/English";
- else if( sender()->name() == QString( "fr_en" ) )
+ else if( sender()->name() == TQString( "fr_en" ) )
query += "French/English";
- else if( sender()->name() == QString( "de_en" ) )
+ else if( sender()->name() == TQString( "de_en" ) )
query += "German/English";
- else if( sender()->name() == QString( "it_en" ) )
+ else if( sender()->name() == TQString( "it_en" ) )
query += "Italian/English";
- else if( sender()->name() == QString( "nl_en" ) )
+ else if( sender()->name() == TQString( "nl_en" ) )
query += "Dutch/English";
- else if( sender()->name() == QString( "pt_en" ) )
+ else if( sender()->name() == TQString( "pt_en" ) )
query += "Portuguese/English";
else // Should be en_fr
query += "English/French";
@@ -313,21 +313,21 @@ void PluginBabelFish::translateURL()
} else if( engine == "reverso" ) {
result = KURL( "http://www.reverso.net/url/frame.asp" );
query = "autotranslate=on&templates=0&x=0&y=0&directions=";
- if( sender()->name() == QString( "de_fr" ) )
+ if( sender()->name() == TQString( "de_fr" ) )
query += "524292";
- else if( sender()->name() == QString( "fr_en" ) )
+ else if( sender()->name() == TQString( "fr_en" ) )
query += "65544";
- else if( sender()->name() == QString( "fr_de" ) )
+ else if( sender()->name() == TQString( "fr_de" ) )
query += "262152";
- else if( sender()->name() == QString( "de_en" ) )
+ else if( sender()->name() == TQString( "de_en" ) )
query += "65540";
- else if( sender()->name() == QString( "en_de" ) )
+ else if( sender()->name() == TQString( "en_de" ) )
query += "262145";
- else if( sender()->name() == QString( "en_es" ) )
+ else if( sender()->name() == TQString( "en_es" ) )
query += "2097153";
- else if( sender()->name() == QString( "es_en" ) )
+ else if( sender()->name() == TQString( "es_en" ) )
query += "65568";
- else if( sender()->name() == QString( "fr_es" ) )
+ else if( sender()->name() == TQString( "fr_es" ) )
query += "2097160";
else // "en_fr"
query += "524289";
@@ -336,9 +336,9 @@ void PluginBabelFish::translateURL()
} else if( engine == "tsail" ) {
result = KURL( "http://www.t-mail.com/cgi-bin/tsail" );
query = "sail=full&lp=";
- if( sender()->name() == QString( "zhTW_en" ) )
+ if( sender()->name() == TQString( "zhTW_en" ) )
query += "tw-en";
- else if( sender()->name() == QString( "en_zhTW" ) )
+ else if( sender()->name() == TQString( "en_zhTW" ) )
query += "en-tw";
else
{
diff --git a/konq-plugins/babelfish/plugin_babelfish.h b/konq-plugins/babelfish/plugin_babelfish.h
index d4e8b01..1844ce1 100644
--- a/konq-plugins/babelfish/plugin_babelfish.h
+++ b/konq-plugins/babelfish/plugin_babelfish.h
@@ -29,8 +29,8 @@ class PluginBabelFish : public KParts::Plugin
{
Q_OBJECT
public:
- PluginBabelFish( QObject* parent, const char* name,
- const QStringList & );
+ PluginBabelFish( TQObject* parent, const char* name,
+ const TQStringList & );
virtual ~PluginBabelFish();
public slots: