summaryrefslogtreecommitdiffstats
path: root/src/options.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/options.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/options.cpp')
-rwxr-xr-xsrc/options.cpp146
1 files changed, 73 insertions, 73 deletions
diff --git a/src/options.cpp b/src/options.cpp
index fc1a5a8..cbecd6f 100755
--- a/src/options.cpp
+++ b/src/options.cpp
@@ -4,10 +4,10 @@
#include "optionsdetailed.h"
#include "config.h"
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qfile.h>
-#include <qcolor.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqfile.h>
+#include <tqcolor.h>
#include <klocale.h>
#include <ktabwidget.h>
@@ -18,15 +18,15 @@
// FIXME prevent converting wav files to wav
-Options::Options( Config* _config, const QString &text, QWidget *parent, const char *name )
- : QWidget( parent, name )
+Options::Options( Config* _config, const TQString &text, TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent, name )
{
config = _config;
- connect( config, SIGNAL(configChanged()),
- this, SLOT(configChanged())
+ connect( config, TQT_SIGNAL(configChanged()),
+ this, TQT_SLOT(configChanged())
);
- QGridLayout *gridLayout = new QGridLayout( this, 1, 1 );
+ TQGridLayout *gridLayout = new TQGridLayout( this, 1, 1 );
tab = new KTabWidget( this, "tab" );
@@ -34,79 +34,79 @@ Options::Options( Config* _config, const QString &text, QWidget *parent, const c
optionsSimple = new OptionsSimple( config, optionsDetailed, text, this, "optionsSimple" );
tab->addTab( optionsSimple, i18n("Simple") );
- connect( optionsSimple, SIGNAL(optionsChanged()),
- this, SLOT(somethingChanged())
+ connect( optionsSimple, TQT_SIGNAL(optionsChanged()),
+ this, TQT_SLOT(somethingChanged())
);
tab->addTab( optionsDetailed, i18n("Detailed") );
- connect( optionsDetailed, SIGNAL(optionsChanged()),
- this, SLOT(somethingChanged())
+ connect( optionsDetailed, TQT_SIGNAL(optionsChanged()),
+ this, TQT_SLOT(somethingChanged())
);
-// connect( optionsSimple, SIGNAL(setFormat(const QString&)),
-// optionsDetailed, SLOT(setFormat(const QString&))
+// connect( optionsSimple, TQT_SIGNAL(setFormat(const TQString&)),
+// optionsDetailed, TQT_SLOT(setFormat(const TQString&))
// );
-// connect( optionsSimple, SIGNAL(setQualityMode(const QString&)),
-// optionsDetailed, SLOT(setQualityMode(const QString&))
+// connect( optionsSimple, TQT_SIGNAL(setQualityMode(const TQString&)),
+// optionsDetailed, TQT_SLOT(setQualityMode(const TQString&))
// );
-// connect( optionsSimple, SIGNAL(setQuality(int)),
-// optionsDetailed, SLOT(setQuality(int))
+// connect( optionsSimple, TQT_SIGNAL(setQuality(int)),
+// optionsDetailed, TQT_SLOT(setQuality(int))
// );
-// connect( optionsSimple, SIGNAL(setBitrateMode(const QString&)),
-// optionsDetailed, SLOT(setBitrateMode(const QString&))
+// connect( optionsSimple, TQT_SIGNAL(setBitrateMode(const TQString&)),
+// optionsDetailed, TQT_SLOT(setBitrateMode(const TQString&))
// );
-// connect( optionsSimple, SIGNAL(setBitrateRangeEnabled(bool)),
-// optionsDetailed, SLOT(setBitrateRangeEnabled(bool))
+// connect( optionsSimple, TQT_SIGNAL(setBitrateRangeEnabled(bool)),
+// optionsDetailed, TQT_SLOT(setBitrateRangeEnabled(bool))
// );
-// connect( optionsSimple, SIGNAL(setMinBitrate(int)),
-// optionsDetailed, SLOT(setMinBitrate(int))
+// connect( optionsSimple, TQT_SIGNAL(setMinBitrate(int)),
+// optionsDetailed, TQT_SLOT(setMinBitrate(int))
// );
-// connect( optionsSimple, SIGNAL(setMaxBitrate(int)),
-// optionsDetailed, SLOT(setMaxBitrate(int))
+// connect( optionsSimple, TQT_SIGNAL(setMaxBitrate(int)),
+// optionsDetailed, TQT_SLOT(setMaxBitrate(int))
// );
-// connect( optionsSimple, SIGNAL(setSamplingrateEnabled(bool)),
-// optionsDetailed, SLOT(setSamplingrateEnabled(bool))
+// connect( optionsSimple, TQT_SIGNAL(setSamplingrateEnabled(bool)),
+// optionsDetailed, TQT_SLOT(setSamplingrateEnabled(bool))
// );
-// connect( optionsSimple, SIGNAL(setSamplingrate(int)),
-// optionsDetailed, SLOT(setSamplingrate(int))
+// connect( optionsSimple, TQT_SIGNAL(setSamplingrate(int)),
+// optionsDetailed, TQT_SLOT(setSamplingrate(int))
// );
-// connect( optionsSimple, SIGNAL(setSamplingrate(const QString&)),
-// optionsDetailed, SLOT(setSamplingrate(const QString&))
+// connect( optionsSimple, TQT_SIGNAL(setSamplingrate(const TQString&)),
+// optionsDetailed, TQT_SLOT(setSamplingrate(const TQString&))
// );
-// connect( optionsSimple, SIGNAL(setChannelsEnabled(bool)),
-// optionsDetailed, SLOT(setChannelsEnabled(bool))
+// connect( optionsSimple, TQT_SIGNAL(setChannelsEnabled(bool)),
+// optionsDetailed, TQT_SLOT(setChannelsEnabled(bool))
// );
-// connect( optionsSimple, SIGNAL(setChannels(const QString&)),
-// optionsDetailed, SLOT(setChannels(const QString&))
+// connect( optionsSimple, TQT_SIGNAL(setChannels(const TQString&)),
+// optionsDetailed, TQT_SLOT(setChannels(const TQString&))
// );
-// connect( optionsSimple, SIGNAL(setReplayGainEnabled(bool)),
-// optionsDetailed, SLOT(setReplayGainEnabled(bool))
+// connect( optionsSimple, TQT_SIGNAL(setReplayGainEnabled(bool)),
+// optionsDetailed, TQT_SLOT(setReplayGainEnabled(bool))
// );
-// connect( optionsSimple, SIGNAL(setOutputDirectoryMode(OutputDirectory::Mode)),
-// optionsDetailed, SLOT(setOutputDirectoryMode(OutputDirectory::Mode))
+// connect( optionsSimple, TQT_SIGNAL(setOutputDirectoryMode(OutputDirectory::Mode)),
+// optionsDetailed, TQT_SLOT(setOutputDirectoryMode(OutputDirectory::Mode))
// );
-// connect( optionsSimple, SIGNAL(setOutputDirectoryPath(const QString&)),
-// optionsDetailed, SLOT(setOutputDirectoryPath(const QString&))
+// connect( optionsSimple, TQT_SIGNAL(setOutputDirectoryPath(const TQString&)),
+// optionsDetailed, TQT_SLOT(setOutputDirectoryPath(const TQString&))
// );
-// connect( optionsSimple, SIGNAL(setOptions(const ConversionOptions&)),
-// optionsDetailed, SLOT(setCurrentOptions(const ConversionOptions&))
+// connect( optionsSimple, TQT_SIGNAL(setOptions(const ConversionOptions&)),
+// optionsDetailed, TQT_SLOT(setCurrentOptions(const ConversionOptions&))
// );
-// connect( optionsSimple, SIGNAL(setUserOptions(const QString&)),
-// optionsDetailed, SLOT(setUserOptions(const QString&))
+// connect( optionsSimple, TQT_SIGNAL(setUserOptions(const TQString&)),
+// optionsDetailed, TQT_SLOT(setUserOptions(const TQString&))
// );
if( config->data.general.startTab == 0 ) tab->setCurrentPage( config->data.general.lastTab );
else tab->setCurrentPage( config->data.general.startTab - 1 );
gridLayout->addWidget( tab, 0, 0 );
- connect( tab, SIGNAL( currentChanged(QWidget*) ),
- this, SLOT( tabChanged(QWidget*) )
+ connect( tab, TQT_SIGNAL( currentChanged(TQWidget*) ),
+ this, TQT_SLOT( tabChanged(TQWidget*) )
);
// draw the toggle button
- QVBoxLayout *optionsTopBox = new QVBoxLayout( -1, "optionsTopBox" );
+ TQVBoxLayout *optionsTopBox = new TQVBoxLayout( -1, "optionsTopBox" );
gridLayout->addLayout( optionsTopBox, 0, 0 );
- QHBoxLayout *optionsBox = new QHBoxLayout( 6, "optionsBox" );
+ TQHBoxLayout *optionsBox = new TQHBoxLayout( 6, "optionsBox" );
optionsTopBox->addLayout( optionsBox );
optionsTopBox->addStretch();
@@ -114,43 +114,43 @@ Options::Options( Config* _config, const QString &text, QWidget *parent, const c
// pPluginsNotify = new KPushButton( "", this, "pPluginsNotify");
// pPluginsNotify->setPixmap( KGlobal::iconLoader()->loadIcon("connect_creating",KIcon::Toolbar) );
-// QToolTip::add( pPluginsNotify, i18n("There are new plugin updates available.\nClick on this button in order to open the configuration dialog.") );
+// TQToolTip::add( pPluginsNotify, i18n("There are new plugin updates available.\nClick on this button in order to open the configuration dialog.") );
// pPluginsNotify->hide();
-// pPluginsNotify->setPaletteBackgroundColor( QColor(255,220,247) );
+// pPluginsNotify->setPaletteBackgroundColor( TQColor(255,220,247) );
// optionsBox->addWidget( pPluginsNotify );
-// connect( pPluginsNotify, SIGNAL(clicked()),
-// this, SLOT(showConfigDialogPlugins())
+// connect( pPluginsNotify, TQT_SIGNAL(clicked()),
+// this, TQT_SLOT(showConfigDialogPlugins())
// );
pBackendsNotify = new KPushButton( "", this, "pBackendsNotify");
pBackendsNotify->setPixmap( KGlobal::iconLoader()->loadIcon("kcmsystem",KIcon::Toolbar) );
- QToolTip::add( pBackendsNotify, i18n("soundKonverter either found new backends or misses some.\nClick on this button in order to open the configuration dialog.") );
+ TQToolTip::add( pBackendsNotify, i18n("soundKonverter either found new backends or misses some.\nClick on this button in order to open the configuration dialog.") );
pBackendsNotify->setShown( config->backendsChanged );
config->backendsChanged = false;
- pBackendsNotify->setPaletteBackgroundColor( QColor(255,220,247) );
+ pBackendsNotify->setPaletteBackgroundColor( TQColor(255,220,247) );
optionsBox->addWidget( pBackendsNotify );
- connect( pBackendsNotify, SIGNAL(clicked()),
- this, SLOT(showConfigDialogBackends())
+ connect( pBackendsNotify, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(showConfigDialogBackends())
);
pAdvancedOptionsToggle = new KPushButton( i18n("Advanced Options"), this, "pAdvancedOptionsToggle");
pAdvancedOptionsToggle->setToggleButton( true );
pAdvancedOptionsToggle->hide();
optionsBox->addWidget( pAdvancedOptionsToggle );
- connect( pAdvancedOptionsToggle, SIGNAL(clicked()),
- optionsDetailed, SLOT(toggleAdvancedOptions())
+ connect( pAdvancedOptionsToggle, TQT_SIGNAL(clicked()),
+ optionsDetailed, TQT_SLOT(toggleAdvancedOptions())
);
/* NOTE kaligames.de is down
if( config->data.plugins.checkForUpdates ) {
config->onlinePluginsChanged = false;
- getPluginListJob = KIO::file_copy("http://kaligames.de/downloads/soundkonverter/plugins/download.php?version=" + QString::number(config->data.app.configVersion),
+ getPluginListJob = KIO::file_copy("http://kaligames.de/downloads/soundkonverter/plugins/download.php?version=" + TQString::number(config->data.app.configVersion),
locateLocal("data","soundkonverter/pluginlist_new.txt"), -1, true, false, false );
- connect( getPluginListJob, SIGNAL(result(KIO::Job*)),
- this, SLOT(getPluginListFinished(KIO::Job*))
+ connect( getPluginListJob, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(getPluginListFinished(KIO::Job*))
);
}
*/
- if( config->data.general.defaultProfile == i18n("Last used") || config->getAllProfiles().findIndex(config->data.general.defaultProfile) != -1 ) {
+ if( config->data.general.defaultProfile == i18n("Last used") || config->getAllProfiles().tqfindIndex(config->data.general.defaultProfile) != -1 ) {
setCurrentOptions( config->getProfile(config->data.general.defaultProfile) );
}
else {
@@ -165,8 +165,8 @@ Options::~Options()
// void Options::getPluginListFinished( KIO::Job* job )
// {
// if( job->error() == 0 ) {
-// QFile file( locateLocal("data","soundkonverter/pluginlist.txt") );
-// QFile newFile( locateLocal("data","soundkonverter/pluginlist_new.txt") );
+// TQFile file( locateLocal("data","soundkonverter/pluginlist.txt") );
+// TQFile newFile( locateLocal("data","soundkonverter/pluginlist_new.txt") );
//
// if( !file.exists() ) { // TODO check against the installed plugins
// pPluginsNotify->show();
@@ -176,8 +176,8 @@ Options::~Options()
// }
//
// if( file.open(IO_ReadOnly) && newFile.open(IO_ReadOnly) ) {
-// QTextStream stream( &file );
-// QTextStream newStream( &newFile );
+// TQTextStream stream( &file );
+// TQTextStream newStream( &newFile );
// while( !stream.atEnd() && !newStream.atEnd() ) {
// if( stream.readLine() != newStream.readLine() ) {
// file.close();
@@ -229,7 +229,7 @@ void Options::setCurrentOptions( const ConversionOptions& options )
optionsSimple->refill();
}
-void Options::tabChanged( QWidget* widget )
+void Options::tabChanged( TQWidget* widget )
{
if( widget == optionsSimple ) {
pAdvancedOptionsToggle->hide();
@@ -241,17 +241,17 @@ void Options::tabChanged( QWidget* widget )
config->data.general.lastTab = tab->currentPageIndex();
}
-void Options::setProfile( const QString& profile )
+void Options::setProfile( const TQString& profile )
{
optionsSimple->setCurrentProfile( profile );
}
-void Options::setFormat( const QString& format )
+void Options::setFormat( const TQString& format )
{
optionsSimple->setCurrentFormat( format );
}
-void Options::setOutputDirectory( const QString& directory )
+void Options::setOutputDirectory( const TQString& directory )
{
optionsSimple->setCurrentOutputDirectory( directory );
}