summaryrefslogtreecommitdiffstats
path: root/src/configpluginspage.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-01 23:15:51 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-01 23:15:51 +0000
commit6b1b516f42036cf9eff691dba3fd6e9eab82a7e1 (patch)
tree6830f75fd57d0fac7e33c097ee98b210e90c5239 /src/configpluginspage.cpp
parent6318b8bb3ef964cfa99ba454a2630779cc9ac3ec (diff)
downloadsoundkonverter-6b1b516f42036cf9eff691dba3fd6e9eab82a7e1.tar.gz
soundkonverter-6b1b516f42036cf9eff691dba3fd6e9eab82a7e1.zip
TQt4 port soundkonverter
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/soundkonverter@1239038 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/configpluginspage.cpp')
-rwxr-xr-xsrc/configpluginspage.cpp346
1 files changed, 173 insertions, 173 deletions
diff --git a/src/configpluginspage.cpp b/src/configpluginspage.cpp
index a6bc560..a79f852 100755
--- a/src/configpluginspage.cpp
+++ b/src/configpluginspage.cpp
@@ -5,16 +5,16 @@
#include "replaygainpluginloader.h"
#include "ripperpluginloader.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qcheckbox.h>
-// #include <qevent.h>
-// #include <qdragobject.h>
-#include <qtooltip.h>
-#include <qlocale.h>
-// #include <qurl.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqcheckbox.h>
+// #include <tqevent.h>
+// #include <tqdragobject.h>
+#include <tqtooltip.h>
+#include <tqlocale.h>
+// #include <tqurl.h>
#include <klocale.h>
#include <kpushbutton.h>
@@ -26,88 +26,88 @@
#include <klistbox.h>
//#include <kurl.h>
-ConfigPluginsPage::ConfigPluginsPage( Config* _config, QWidget* parent, const char* name )
- : ConfigPageBase( parent, name )
+ConfigPluginsPage::ConfigPluginsPage( Config* _config, TQWidget* tqparent, const char* name )
+ : ConfigPageBase( tqparent, name )
{
config = _config;
// create an icon loader object for loading icons
KIconLoader* iconLoader = new KIconLoader();
- QVBoxLayout* box = new QVBoxLayout( parent, 0, 6 );
+ TQVBoxLayout* box = new TQVBoxLayout( tqparent, 0, 6 );
- QLabel* lPluginsLabel = new QLabel( i18n("Installed plugins")+":", parent, "lPluginsLabel" );
+ TQLabel* lPluginsLabel = new TQLabel( i18n("Installed plugins")+":", tqparent, "lPluginsLabel" );
box->addWidget( lPluginsLabel );
- QHBoxLayout* pluginsBox = new QHBoxLayout( box );
- lPlugins = new KListBox( parent, "lPlugins" );
+ TQHBoxLayout* pluginsBox = new TQHBoxLayout( box );
+ lPlugins = new KListBox( tqparent, "lPlugins" );
pluginsBox->addWidget(lPlugins);
- connect( lPlugins, SIGNAL(highlighted(int)),
- this, SLOT(pluginsSelectionChanged(int))
+ connect( lPlugins, TQT_SIGNAL(highlighted(int)),
+ this, TQT_SLOT(pluginsSelectionChanged(int))
);
refreshPlugins();
- QVBoxLayout* pluginsRightBox = new QVBoxLayout( pluginsBox );
- pAddPlugin = new KPushButton( iconLoader->loadIcon("add",KIcon::Small), i18n("Add ..."), parent, "pAddPlugin" );
+ TQVBoxLayout* pluginsRightBox = new TQVBoxLayout( pluginsBox );
+ pAddPlugin = new KPushButton( iconLoader->loadIcon("add",KIcon::Small), i18n("Add ..."), tqparent, "pAddPlugin" );
pluginsRightBox->addWidget( pAddPlugin );
- connect( pAddPlugin, SIGNAL(clicked()),
- this, SLOT(getPlugin())
+ connect( pAddPlugin, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(getPlugin())
);
- pRemovePlugin = new KPushButton( iconLoader->loadIcon("remove",KIcon::Small), i18n("Remove"), parent, "pRemovePlugin" );
+ pRemovePlugin = new KPushButton( iconLoader->loadIcon("remove",KIcon::Small), i18n("Remove"), tqparent, "pRemovePlugin" );
pRemovePlugin->setEnabled( false );
pluginsRightBox->addWidget( pRemovePlugin );
- connect( pRemovePlugin, SIGNAL(clicked()),
- this, SLOT(removePlugin())
+ connect( pRemovePlugin, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(removePlugin())
);
pluginsRightBox->addStretch();
- pAboutPlugin = new KPushButton( iconLoader->loadIcon("messagebox_info",KIcon::Small), i18n("About"), parent, "pAboutPlugin" );
+ pAboutPlugin = new KPushButton( iconLoader->loadIcon("messagebox_info",KIcon::Small), i18n("About"), tqparent, "pAboutPlugin" );
pAboutPlugin->setEnabled( false );
pluginsRightBox->addWidget( pAboutPlugin );
- connect( pAboutPlugin, SIGNAL(clicked()),
- this, SLOT(aboutPlugin())
+ connect( pAboutPlugin, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(aboutPlugin())
);
/* NOTE kaligames.de is down
box->addSpacing( 5 );
- QLabel* lOnlinePluginsLabel = new QLabel( i18n("Available plugins")+":", parent, "lOnlinePluginsLabel" );
+ TQLabel* lOnlinePluginsLabel = new TQLabel( i18n("Available plugins")+":", tqparent, "lOnlinePluginsLabel" );
box->addWidget( lOnlinePluginsLabel );
- QHBoxLayout* onlinePluginsBox = new QHBoxLayout( box );
- lOnlinePlugins = new KListBox( parent, "lOnlinePlugins" );
+ TQHBoxLayout* onlinePluginsBox = new TQHBoxLayout( box );
+ lOnlinePlugins = new KListBox( tqparent, "lOnlinePlugins" );
onlinePluginsBox->addWidget( lOnlinePlugins );
- connect( lOnlinePlugins, SIGNAL(highlighted(int)),
- this, SLOT(onlinePluginsSelectionChanged(int))
+ connect( lOnlinePlugins, TQT_SIGNAL(highlighted(int)),
+ this, TQT_SLOT(onlinePluginsSelectionChanged(int))
);
- QVBoxLayout* onlinePluginsRightBox = new QVBoxLayout( onlinePluginsBox );
- pRefreshOnlinePlugins = new KPushButton( iconLoader->loadIcon("reload",KIcon::Small), i18n("Refresh"), parent, "pRefreshOnlinePlugins" );
- QToolTip::add( pRefreshOnlinePlugins, i18n("Download the latest list of available plugins.") );
+ TQVBoxLayout* onlinePluginsRightBox = new TQVBoxLayout( onlinePluginsBox );
+ pRefreshOnlinePlugins = new KPushButton( iconLoader->loadIcon("reload",KIcon::Small), i18n("Refresh"), tqparent, "pRefreshOnlinePlugins" );
+ TQToolTip::add( pRefreshOnlinePlugins, i18n("Download the latest list of available plugins.") );
onlinePluginsRightBox->addWidget( pRefreshOnlinePlugins );
- connect( pRefreshOnlinePlugins, SIGNAL(clicked()),
- this, SLOT(refreshOnlinePlugins())
+ connect( pRefreshOnlinePlugins, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(refreshOnlinePlugins())
);
// TODO upgrade button
-// pUpgradeOnlinePlugins = new KPushButton( iconLoader->loadIcon("filesave",KIcon::Small), i18n("Upgrade"), parent, "pUpgradeOnlinePlugins" );
+// pUpgradeOnlinePlugins = new KPushButton( iconLoader->loadIcon("filesave",KIcon::Small), i18n("Upgrade"), tqparent, "pUpgradeOnlinePlugins" );
// pUpgradeOnlinePlugins->setEnabled( false );
-// QToolTip::add( pUpgradeOnlinePlugins, i18n("Download all plugins and install them into the soundKonverter directory.") );
+// TQToolTip::add( pUpgradeOnlinePlugins, i18n("Download all plugins and install them into the soundKonverter directory.") );
// onlinePluginsRightBox->addWidget( pUpgradeOnlinePlugins );
-// connect(pInstallAllOnlinePlugins,SIGNAL(clicked()),this,SLOT(upgradeOnlinePlugins()));
+// connect(pInstallAllOnlinePlugins,TQT_SIGNAL(clicked()),this,TQT_SLOT(upgradeOnlinePlugins()));
onlinePluginsRightBox->addStretch();
- pInstallOnlinePlugin = new KPushButton( iconLoader->loadIcon("filesave",KIcon::Small), i18n("Install"), parent, "pInstallOnlinePlugin" );
+ pInstallOnlinePlugin = new KPushButton( iconLoader->loadIcon("filesave",KIcon::Small), i18n("Install"), tqparent, "pInstallOnlinePlugin" );
pInstallOnlinePlugin->setEnabled( false );
- QToolTip::add( pInstallOnlinePlugin, i18n("Download the selected plugin and install it into the soundKonverter directory.") );
+ TQToolTip::add( pInstallOnlinePlugin, i18n("Download the selected plugin and install it into the soundKonverter directory.") );
onlinePluginsRightBox->addWidget( pInstallOnlinePlugin );
- connect( pInstallOnlinePlugin, SIGNAL(clicked()),
- this, SLOT(getOnlinePlugin())
+ connect( pInstallOnlinePlugin, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(getOnlinePlugin())
);
- pAboutOnlinePlugin = new KPushButton( iconLoader->loadIcon("messagebox_info",KIcon::Small), i18n("About"), parent, "pAboutOnlinePlugin" );
+ pAboutOnlinePlugin = new KPushButton( iconLoader->loadIcon("messagebox_info",KIcon::Small), i18n("About"), tqparent, "pAboutOnlinePlugin" );
pAboutOnlinePlugin->setEnabled( false );
onlinePluginsRightBox->addWidget( pAboutOnlinePlugin );
- connect( pAboutOnlinePlugin, SIGNAL(clicked()),
- this, SLOT(aboutOnlinePlugin())
+ connect( pAboutOnlinePlugin, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(aboutOnlinePlugin())
);
- cCheckOnlinePlugins = new QCheckBox( i18n("Check for new plugins on every startup"), parent, "cCheckOnlinePlugins" );
+ cCheckOnlinePlugins = new TQCheckBox( i18n("Check for new plugins on every startup"), tqparent, "cCheckOnlinePlugins" );
cCheckOnlinePlugins->setChecked( config->data.plugins.checkForUpdates );
box->addWidget( cCheckOnlinePlugins );
- connect( cCheckOnlinePlugins, SIGNAL(toggled(bool)),
- this, SLOT(cfgChanged())
+ connect( cCheckOnlinePlugins, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(cfgChanged())
);
// box->addStretch();
@@ -117,21 +117,21 @@ ConfigPluginsPage::ConfigPluginsPage( Config* _config, QWidget* parent, const ch
if( config->data.plugins.checkForUpdates && config->onlinePluginsChanged ) {
// NOTE copied from below
- QString line;
+ TQString line;
bool add;
- QFile file( locateLocal("data","soundkonverter/pluginlist.txt") );
+ TQFile file( locateLocal("data","soundkonverter/pluginlist.txt") );
if( file.open(IO_ReadOnly) ) {
- QTextStream stream( &file );
+ TQTextStream stream( &file );
while( !stream.atEnd() ) {
line = stream.readLine(); // line of text excluding '\n'
- line.replace( "&amp;", "&" );
- line.replace( "&auml;", "ä" );
- line.replace( "&Auml;", "Ä" );
- line.replace( "&ouml;", "ö" );
- line.replace( "&Ouml;", "Ö" );
- line.replace( "&uuml;", "ü" );
- line.replace( "&Uuml;", "Ü" );
- line.replace( "&szlig;", "ß" );
+ line.tqreplace( "&amp;", "&" );
+ line.tqreplace( "&auml;", "ä" );
+ line.tqreplace( "&Auml;", "Ä" );
+ line.tqreplace( "&ouml;", "ö" );
+ line.tqreplace( "&Ouml;", "Ö" );
+ line.tqreplace( "&uuml;", "ü" );
+ line.tqreplace( "&Uuml;", "Ü" );
+ line.tqreplace( "&szlig;", "ß" );
add = true;
for( uint i=0; i<lPlugins->count(); i++ ) {
@@ -165,32 +165,32 @@ void ConfigPluginsPage::saveSettings()
void ConfigPluginsPage::pluginsSelectionChanged( int index )
{
- QString name = lPlugins->text( index );
+ TQString name = lPlugins->text( index );
- QValueList<ConvertPlugin*> converters = config->allConverters();
- for( QValueList<ConvertPlugin*>::Iterator it = converters.begin(); it != converters.end(); ++it ) {
- if( name == (*it)->info.name + " v. " + QString::number((*it)->info.version) ) {
- QFileInfo file( (*it)->filePathName );
+ TQValueList<ConvertPlugin*> converters = config->allConverters();
+ for( TQValueList<ConvertPlugin*>::Iterator it = converters.begin(); it != converters.end(); ++it ) {
+ if( name == (*it)->info.name + " v. " + TQString::number((*it)->info.version) ) {
+ TQFileInfo file( (*it)->filePathName );
if( file.isWritable() ) pRemovePlugin->setEnabled( true );
else pRemovePlugin->setEnabled( false );
break;
}
}
- QValueList<ReplayGainPlugin*> replaygains = config->allReplayGains();
- for( QValueList<ReplayGainPlugin*>::Iterator it = replaygains.begin(); it != replaygains.end(); ++it ) {
- if( name == (*it)->info.name + " v. " + QString::number((*it)->info.version) ) {
- QFileInfo file( (*it)->filePathName );
+ TQValueList<ReplayGainPlugin*> replaygains = config->allReplayGains();
+ for( TQValueList<ReplayGainPlugin*>::Iterator it = replaygains.begin(); it != replaygains.end(); ++it ) {
+ if( name == (*it)->info.name + " v. " + TQString::number((*it)->info.version) ) {
+ TQFileInfo file( (*it)->filePathName );
if( file.isWritable() ) pRemovePlugin->setEnabled( true );
else pRemovePlugin->setEnabled( false );
break;
}
}
- QValueList<RipperPlugin*> rippers = config->allRippers();
- for( QValueList<RipperPlugin*>::Iterator it = rippers.begin(); it != rippers.end(); ++it ) {
- if( name == (*it)->info.name + " v. " + QString::number((*it)->info.version) ) {
- QFileInfo file( (*it)->filePathName );
+ TQValueList<RipperPlugin*> rippers = config->allRippers();
+ for( TQValueList<RipperPlugin*>::Iterator it = rippers.begin(); it != rippers.end(); ++it ) {
+ if( name == (*it)->info.name + " v. " + TQString::number((*it)->info.version) ) {
+ TQFileInfo file( (*it)->filePathName );
if( file.isWritable() ) pRemovePlugin->setEnabled( true );
else pRemovePlugin->setEnabled( false );
break;
@@ -204,35 +204,35 @@ void ConfigPluginsPage::refreshPlugins()
{
lPlugins->clear();
- QValueList<ConvertPlugin*> converters = config->allConverters();
- for( QValueList<ConvertPlugin*>::Iterator it = converters.begin(); it != converters.end(); ++it ) {
- lPlugins->insertItem( (*it)->info.name + " v. " + QString::number((*it)->info.version) );
- //lPlugins->insertItem( i18n("%1, Version: %2").arg((*it)->info.name).arg((*it)->info.version) );
+ TQValueList<ConvertPlugin*> converters = config->allConverters();
+ for( TQValueList<ConvertPlugin*>::Iterator it = converters.begin(); it != converters.end(); ++it ) {
+ lPlugins->insertItem( (*it)->info.name + " v. " + TQString::number((*it)->info.version) );
+ //lPlugins->insertItem( i18n("%1, Version: %2").tqarg((*it)->info.name).tqarg((*it)->info.version) );
}
- QValueList<ReplayGainPlugin*> replaygains = config->allReplayGains();
- for( QValueList<ReplayGainPlugin*>::Iterator it = replaygains.begin(); it != replaygains.end(); ++it ) {
- lPlugins->insertItem( (*it)->info.name + " v. " + QString::number((*it)->info.version) );
- //lPlugins->insertItem( i18n("%1, Version: %2").arg((*it)->info.name).arg((*it)->info.version) );
+ TQValueList<ReplayGainPlugin*> replaygains = config->allReplayGains();
+ for( TQValueList<ReplayGainPlugin*>::Iterator it = replaygains.begin(); it != replaygains.end(); ++it ) {
+ lPlugins->insertItem( (*it)->info.name + " v. " + TQString::number((*it)->info.version) );
+ //lPlugins->insertItem( i18n("%1, Version: %2").tqarg((*it)->info.name).tqarg((*it)->info.version) );
}
- QValueList<RipperPlugin*> rippers = config->allRippers();
- for( QValueList<RipperPlugin*>::Iterator it = rippers.begin(); it != rippers.end(); ++it ) {
- lPlugins->insertItem( (*it)->info.name + " v. " + QString::number((*it)->info.version) );
- //lPlugins->insertItem( i18n("%1, Version: %2").arg((*it)->info.name).arg((*it)->info.version) );
+ TQValueList<RipperPlugin*> rippers = config->allRippers();
+ for( TQValueList<RipperPlugin*>::Iterator it = rippers.begin(); it != rippers.end(); ++it ) {
+ lPlugins->insertItem( (*it)->info.name + " v. " + TQString::number((*it)->info.version) );
+ //lPlugins->insertItem( i18n("%1, Version: %2").tqarg((*it)->info.name).tqarg((*it)->info.version) );
}
}
void ConfigPluginsPage::getPlugin()
{
- QString url = KFileDialog::getOpenFileName( QDir::homeDirPath(), i18n("*.soundkonverter.xml|Plugins (*.soundkonverter.xml)"), this, i18n("Choose a plugin to add!") );
+ TQString url = KFileDialog::getOpenFileName( TQDir::homeDirPath(), i18n("*.soundkonverter.xml|Plugins (*.soundkonverter.xml)"), this, i18n("Choose a plugin to add!") );
if( !url.isEmpty() ) {
- QString filePathName = KURL::decode_string( url );
- QString fileName = filePathName.right( filePathName.length() - filePathName.findRev("/") );
+ TQString filePathName = KURL::decode_string( url );
+ TQString fileName = filePathName.right( filePathName.length() - filePathName.tqfindRev("/") );
getPluginFilePathName = locateLocal("data","soundkonverter/plugins/") + fileName;
getPluginJob = KIO::file_copy( url, getPluginFilePathName, -1, true, false, false );
- connect( getPluginJob, SIGNAL(result(KIO::Job*)),
- this, SLOT(getPluginFinished(KIO::Job*))
+ connect( getPluginJob, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(getPluginFinished(KIO::Job*))
);
}
}
@@ -258,19 +258,19 @@ void ConfigPluginsPage::getPluginFinished( KIO::Job* job )
// TODO reload plugins without restart
// ConvertPlugin* plugin = convertPluginLoader->loadFile( getPluginFilePathName );
// if( plugin->info.version != -1 ) {
-// lPlugins->insertItem( plugin->info.name + " v. " + QString::number(plugin->info.version) + " (" + i18n("restart necessary") + ")" );
+// lPlugins->insertItem( plugin->info.name + " v. " + TQString::number(plugin->info.version) + " (" + i18n("restart necessary") + ")" );
// }
// else {
// delete plugin;
// ConvertPlugin* plugin = convertPluginLoader->loadFile( getPluginFilePathName );
// if( plugin->info.version != -1 ) {
-// lPlugins->insertItem( plugin->info.name + " v. " + QString::number(plugin->info.version) + " (" + i18n("restart necessary") + ")" );
+// lPlugins->insertItem( plugin->info.name + " v. " + TQString::number(plugin->info.version) + " (" + i18n("restart necessary") + ")" );
// }
// else {
// delete plugin;
// ConvertPlugin* plugin = convertPluginLoader->loadFile( getPluginFilePathName );
// if( plugin->info.version != -1 ) {
-// lPlugins->insertItem( plugin->info.name + " v. " + QString::number(plugin->info.version) + " (" + i18n("restart necessary") + ")" );
+// lPlugins->insertItem( plugin->info.name + " v. " + TQString::number(plugin->info.version) + " (" + i18n("restart necessary") + ")" );
// }
// }
// }
@@ -299,12 +299,12 @@ void ConfigPluginsPage::removePlugin()
{
// TODO reload plugins without restart
- QString name = lPlugins->currentText();
+ TQString name = lPlugins->currentText();
- QValueList<ConvertPlugin*> converters = config->allConverters();
- for( QValueList<ConvertPlugin*>::Iterator it = converters.begin(); it != converters.end(); ++it ) {
- if( name == (*it)->info.name + " v. " + QString::number((*it)->info.version) ) {
- QFile file( (*it)->filePathName );
+ TQValueList<ConvertPlugin*> converters = config->allConverters();
+ for( TQValueList<ConvertPlugin*>::Iterator it = converters.begin(); it != converters.end(); ++it ) {
+ if( name == (*it)->info.name + " v. " + TQString::number((*it)->info.version) ) {
+ TQFile file( (*it)->filePathName );
if( file.remove() ) {
lPlugins->removeItem( lPlugins->currentItem() );
KMessageBox::information( this,
@@ -320,10 +320,10 @@ void ConfigPluginsPage::removePlugin()
}
}
- QValueList<ReplayGainPlugin*> replaygains = config->allReplayGains();
- for( QValueList<ReplayGainPlugin*>::Iterator it = replaygains.begin(); it != replaygains.end(); ++it ) {
- if( name == (*it)->info.name + " v. " + QString::number((*it)->info.version) ) {
- QFile file( (*it)->filePathName );
+ TQValueList<ReplayGainPlugin*> replaygains = config->allReplayGains();
+ for( TQValueList<ReplayGainPlugin*>::Iterator it = replaygains.begin(); it != replaygains.end(); ++it ) {
+ if( name == (*it)->info.name + " v. " + TQString::number((*it)->info.version) ) {
+ TQFile file( (*it)->filePathName );
if( file.remove() ) {
lPlugins->removeItem( lPlugins->currentItem() );
KMessageBox::information( this,
@@ -339,10 +339,10 @@ void ConfigPluginsPage::removePlugin()
}
}
- QValueList<RipperPlugin*> rippers = config->allRippers();
- for( QValueList<RipperPlugin*>::Iterator it = rippers.begin(); it != rippers.end(); ++it ) {
- if( name == (*it)->info.name + " v. " + QString::number((*it)->info.version) ) {
- QFile file( (*it)->filePathName );
+ TQValueList<RipperPlugin*> rippers = config->allRippers();
+ for( TQValueList<RipperPlugin*>::Iterator it = rippers.begin(); it != rippers.end(); ++it ) {
+ if( name == (*it)->info.name + " v. " + TQString::number((*it)->info.version) ) {
+ TQFile file( (*it)->filePathName );
if( file.remove() ) {
lPlugins->removeItem( lPlugins->currentItem() );
KMessageBox::information( this,
@@ -373,38 +373,38 @@ void ConfigPluginsPage::aboutPlugin()
{
// TODO add link support
- QString name = lPlugins->currentText();
+ TQString name = lPlugins->currentText();
- QValueList<ConvertPlugin*> converters = config->allConverters();
- for( QValueList<ConvertPlugin*>::Iterator it = converters.begin(); it != converters.end(); ++it ) {
- if( name == (*it)->info.name + " v. " + QString::number((*it)->info.version) ) {
+ TQValueList<ConvertPlugin*> converters = config->allConverters();
+ for( TQValueList<ConvertPlugin*>::Iterator it = converters.begin(); it != converters.end(); ++it ) {
+ if( name == (*it)->info.name + " v. " + TQString::number((*it)->info.version) ) {
KMessageBox::information( this,
i18n((*it)->info.about) + "\n" +
- i18n("Version") + ": " + QString::number((*it)->info.version) + "\n" +
+ i18n("Version") + ": " + TQString::number((*it)->info.version) + "\n" +
i18n("Author") + ": " + (*it)->info.author,
i18n("About") + ": " + (*it)->info.name );
break;
}
}
- QValueList<ReplayGainPlugin*> replaygains = config->allReplayGains();
- for( QValueList<ReplayGainPlugin*>::Iterator it = replaygains.begin(); it != replaygains.end(); ++it ) {
- if( name == (*it)->info.name + " v. " + QString::number((*it)->info.version) ) {
+ TQValueList<ReplayGainPlugin*> replaygains = config->allReplayGains();
+ for( TQValueList<ReplayGainPlugin*>::Iterator it = replaygains.begin(); it != replaygains.end(); ++it ) {
+ if( name == (*it)->info.name + " v. " + TQString::number((*it)->info.version) ) {
KMessageBox::information( this,
i18n((*it)->info.about) + "\n" +
- i18n("Version") + ": " + QString::number((*it)->info.version) + "\n" +
+ i18n("Version") + ": " + TQString::number((*it)->info.version) + "\n" +
i18n("Author") + ": " + (*it)->info.author,
i18n("About") + ": " + (*it)->info.name );
break;
}
}
- QValueList<RipperPlugin*> rippers = config->allRippers();
- for( QValueList<RipperPlugin*>::Iterator it = rippers.begin(); it != rippers.end(); ++it ) {
- if( name == (*it)->info.name + " v. " + QString::number((*it)->info.version) ) {
+ TQValueList<RipperPlugin*> rippers = config->allRippers();
+ for( TQValueList<RipperPlugin*>::Iterator it = rippers.begin(); it != rippers.end(); ++it ) {
+ if( name == (*it)->info.name + " v. " + TQString::number((*it)->info.version) ) {
KMessageBox::information( this,
i18n((*it)->info.about) + "\n" +
- i18n("Version") + ": " + QString::number((*it)->info.version) + "\n" +
+ i18n("Version") + ": " + TQString::number((*it)->info.version) + "\n" +
i18n("Author") + ": " + (*it)->info.author,
i18n("About") + ": " + (*it)->info.name );
break;
@@ -428,10 +428,10 @@ void ConfigPluginsPage::refreshOnlinePlugins()
{
pRefreshOnlinePlugins->setEnabled( false );
- refreshOnlinePluginsJob = KIO::file_copy( "http://kaligames.de/downloads/soundkonverter/plugins/download.php?version=" + QString::number(config->data.app.configVersion),
+ refreshOnlinePluginsJob = KIO::file_copy( "http://kaligames.de/downloads/soundkonverter/plugins/download.php?version=" + TQString::number(config->data.app.configVersion),
locateLocal("data","soundkonverter/pluginlist.txt"), -1, true, false, false );
- connect( refreshOnlinePluginsJob, SIGNAL(result(KIO::Job*)),
- this, SLOT(refreshOnlinePluginsFinished(KIO::Job*))
+ connect( refreshOnlinePluginsJob, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(refreshOnlinePluginsFinished(KIO::Job*))
);
}
@@ -440,21 +440,21 @@ void ConfigPluginsPage::refreshOnlinePluginsFinished( KIO::Job* job )
if( job->error() == 0 ) {
lOnlinePlugins->clear();
- QString line;
+ TQString line;
bool add;
- QFile file( locateLocal("data","soundkonverter/pluginlist.txt") );
+ TQFile file( locateLocal("data","soundkonverter/pluginlist.txt") );
if( file.open(IO_ReadOnly) ) {
- QTextStream stream( &file );
+ TQTextStream stream( &file );
while( !stream.atEnd() ) {
line = stream.readLine(); // line of text excluding '\n'
- line.replace( "&amp;", "&" );
- line.replace( "&auml;", "ä" );
- line.replace( "&Auml;", "Ä" );
- line.replace( "&ouml;", "ö" );
- line.replace( "&Ouml;", "Ö" );
- line.replace( "&uuml;", "ü" );
- line.replace( "&Uuml;", "Ü" );
- line.replace( "&szlig;", "ß" );
+ line.tqreplace( "&amp;", "&" );
+ line.tqreplace( "&auml;", "ä" );
+ line.tqreplace( "&Auml;", "Ä" );
+ line.tqreplace( "&ouml;", "ö" );
+ line.tqreplace( "&Ouml;", "Ö" );
+ line.tqreplace( "&uuml;", "ü" );
+ line.tqreplace( "&Uuml;", "Ü" );
+ line.tqreplace( "&szlig;", "ß" );
add = true;
for( uint i=0; i<lPlugins->count(); i++ ) {
@@ -484,7 +484,7 @@ void ConfigPluginsPage::refreshOnlinePluginsFinished( KIO::Job* job )
void ConfigPluginsPage::getOnlinePlugin()
{
pInstallOnlinePlugin->setEnabled( false );
- QString name;
+ TQString name;
for( uint i=0; i<lOnlinePlugins->count(); i++ ) {
if( lOnlinePlugins->isSelected(i) ) {
@@ -494,35 +494,35 @@ void ConfigPluginsPage::getOnlinePlugin()
}
}
- name.replace( "&", "&amp;" );
- name.replace( "ä", "&auml;" );
- name.replace( "Ä", "&Auml;" );
- name.replace( "ö", "&ouml;" );
- name.replace( "Ö", "&Ouml;" );
- name.replace( "ü", "&uuml;" );
- name.replace( "Ü", "&Uuml;" );
- name.replace( "ß", "&szlig;" );
+ name.tqreplace( "&", "&amp;" );
+ name.tqreplace( "ä", "&auml;" );
+ name.tqreplace( "Ä", "&Auml;" );
+ name.tqreplace( "ö", "&ouml;" );
+ name.tqreplace( "Ö", "&Ouml;" );
+ name.tqreplace( "ü", "&uuml;" );
+ name.tqreplace( "Ü", "&Uuml;" );
+ name.tqreplace( "ß", "&szlig;" );
KURL::encode_string( name );
- getOnlinePluginJob = KIO::file_copy( "http://kaligames.de/downloads/soundkonverter/plugins/getfile.php?version=" + QString::number(config->data.app.configVersion) + "&file=" + name,
+ getOnlinePluginJob = KIO::file_copy( "http://kaligames.de/downloads/soundkonverter/plugins/getfile.php?version=" + TQString::number(config->data.app.configVersion) + "&file=" + name,
locateLocal("data","soundkonverter/plugins/newplugin.xml"), -1, true, false, false );
- connect( getOnlinePluginJob, SIGNAL(result(KIO::Job*)),
- this, SLOT(getOnlinePluginFinished(KIO::Job*))
+ connect( getOnlinePluginJob, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(getOnlinePluginFinished(KIO::Job*))
);
}
void ConfigPluginsPage::getOnlinePluginFinished( KIO::Job* job )
{
if( job->error() == 0 ) {
- QString name;
- QString line;
- QFile file( locateLocal("data","soundkonverter/plugins/newplugin.xml") );
+ TQString name;
+ TQString line;
+ TQFile file( locateLocal("data","soundkonverter/plugins/newplugin.xml") );
if( file.open(IO_ReadOnly) ) {
- QTextStream stream( &file );
+ TQTextStream stream( &file );
name = stream.readLine(); // read the file name from the top of the file
getPluginFilePathName = locateLocal("data","soundkonverter/plugins/") + name;
- QFile newFile( getPluginFilePathName );
+ TQFile newFile( getPluginFilePathName );
if( newFile.open(IO_WriteOnly) ) {
- QTextStream newStream( &newFile );
+ TQTextStream newStream( &newFile );
while( !stream.atEnd() ) {
line = stream.readLine(); // line of text excluding '\n'
newStream << line << "\n";
@@ -551,19 +551,19 @@ void ConfigPluginsPage::getOnlinePluginFinished( KIO::Job* job )
// TODO reload plugins without restart
// ConvertPlugin* plugin = convertPluginLoader->loadFile( getPluginFilePathName );
// if( plugin->info.version != -1 ) {
-// lPlugins->insertItem( plugin->info.name + " v. " + QString::number(plugin->info.version) + " (" + i18n("restart necessary") + ")" );
+// lPlugins->insertItem( plugin->info.name + " v. " + TQString::number(plugin->info.version) + " (" + i18n("restart necessary") + ")" );
// }
// else {
// delete plugin;
// ConvertPlugin* plugin = convertPluginLoader->loadFile( getPluginFilePathName );
// if( plugin->info.version != -1 ) {
-// lPlugins->insertItem( plugin->info.name + " v. " + QString::number(plugin->info.version) + " (" + i18n("restart necessary") + ")" );
+// lPlugins->insertItem( plugin->info.name + " v. " + TQString::number(plugin->info.version) + " (" + i18n("restart necessary") + ")" );
// }
// else {
// delete plugin;
// ConvertPlugin* plugin = convertPluginLoader->loadFile( getPluginFilePathName );
// if( plugin->info.version != -1 ) {
-// lPlugins->insertItem( plugin->info.name + " v. " + QString::number(plugin->info.version) + " (" + i18n("restart necessary") + ")" );
+// lPlugins->insertItem( plugin->info.name + " v. " + TQString::number(plugin->info.version) + " (" + i18n("restart necessary") + ")" );
// }
// }
// }
@@ -592,34 +592,34 @@ void ConfigPluginsPage::aboutOnlinePlugin()
{
pAboutOnlinePlugin->setEnabled( false );
- QString name = lOnlinePlugins->currentText();
- name.replace( "&", "&amp;" );
- name.replace( "ä", "&auml;" );
- name.replace( "Ä", "&Auml;" );
- name.replace( "ö", "&ouml;" );
- name.replace( "Ö", "&Ouml;" );
- name.replace( "ü", "&uuml;" );
- name.replace( "Ü", "&Uuml;" );
- name.replace( "ß", "&szlig;" );
+ TQString name = lOnlinePlugins->currentText();
+ name.tqreplace( "&", "&amp;" );
+ name.tqreplace( "ä", "&auml;" );
+ name.tqreplace( "Ä", "&Auml;" );
+ name.tqreplace( "ö", "&ouml;" );
+ name.tqreplace( "Ö", "&Ouml;" );
+ name.tqreplace( "ü", "&uuml;" );
+ name.tqreplace( "Ü", "&Uuml;" );
+ name.tqreplace( "ß", "&szlig;" );
KURL::encode_string( name );
- aboutOnlinePluginJob = KIO::file_copy( "http://kaligames.de/downloads/soundkonverter/plugins/info.php?file=" + name + "&lang=" + QLocale::languageToString(QLocale::system().language()),
+ aboutOnlinePluginJob = KIO::file_copy( "http://kaligames.de/downloads/soundkonverter/plugins/info.php?file=" + name + "&lang=" + TQLocale::languageToString(TQLocale::system().language()),
locateLocal("data","soundkonverter/plugin_info.txt"), -1, true, false, false );
- connect( aboutOnlinePluginJob, SIGNAL(result(KIO::Job*)),
- this, SLOT(aboutOnlinePluginFinished(KIO::Job*))
+ connect( aboutOnlinePluginJob, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(aboutOnlinePluginFinished(KIO::Job*))
);
}
void ConfigPluginsPage::aboutOnlinePluginFinished( KIO::Job* job )
{
if( job->error() == 0 ) {
- QString name = lOnlinePlugins->currentText();
+ TQString name = lOnlinePlugins->currentText();
- QFile file( locateLocal("data","soundkonverter/plugin_info.txt") );
+ TQFile file( locateLocal("data","soundkonverter/plugin_info.txt") );
if( file.open(IO_ReadOnly) ) {
- QTextStream stream( &file );
- QString data = stream.readLine();
+ TQTextStream stream( &file );
+ TQString data = stream.readLine();
KMessageBox::information( this, i18n(data), i18n("About") + ": " + name,
- QString::null, KMessageBox::Notify | KMessageBox::AllowLink );
+ TQString(), KMessageBox::Notify | KMessageBox::AllowLink );
}
else {
KMessageBox::error( this,