summaryrefslogtreecommitdiffstats
path: root/kscd/kscd.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:43:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:43:15 +0000
commite654398e46e37abf457b2b1122ab898d2c51c49f (patch)
treed39ee6440f3c3663c3ead84a2d4cc2d034667e96 /kscd/kscd.cpp
parente4f29b18e19394b9352f52a6c0d0d0e3932cf511 (diff)
downloadtdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.tar.gz
tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1157644 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kscd/kscd.cpp')
-rw-r--r--kscd/kscd.cpp304
1 files changed, 152 insertions, 152 deletions
diff --git a/kscd/kscd.cpp b/kscd/kscd.cpp
index 426df542..bb2b0ae5 100644
--- a/kscd/kscd.cpp
+++ b/kscd/kscd.cpp
@@ -22,15 +22,15 @@
*
*/
-#include <qdir.h>
-#include <qregexp.h>
-#include <qtextstream.h>
-#include <qlayout.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qapplication.h>
-#include <qgroupbox.h>
-#include <qsqlpropertymap.h>
+#include <tqdir.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqapplication.h>
+#include <tqgroupbox.h>
+#include <tqsqlpropertymap.h>
#include <dcopclient.h>
#include <kaboutdata.h>
@@ -76,7 +76,7 @@
#include "cddbdlg.h"
#include "configWidget.h"
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include <kcompactdisc.h>
#include <fixx11h.h>
@@ -89,7 +89,7 @@ bool stoppedByUser = false;
The GUI part
*****************************************************************************/
-KSCD::KSCD( QWidget *parent, const char *name )
+KSCD::KSCD( TQWidget *parent, const char *name )
: DCOPObject("CDPlayer"),
kscdPanelDlg( parent, name, Qt::WDestructiveClose ),
configDialog(0L),
@@ -103,7 +103,7 @@ KSCD::KSCD( QWidget *parent, const char *name )
random_current = random_list.begin();
cddb = new KCDDB::Client();
- connect(cddb, SIGNAL(finished(CDDB::Result)), this, SLOT(lookupCDDBDone(CDDB::Result)));
+ connect(cddb, TQT_SIGNAL(finished(CDDB::Result)), this, TQT_SLOT(lookupCDDBDone(CDDB::Result)));
#if defined(BUILD_CDDA)
audio_systems_list
@@ -124,77 +124,77 @@ KSCD::KSCD( QWidget *parent, const char *name )
// the time slider
timeIcon->setPixmap(SmallIcon("player_time"));
- connect(timeSlider, SIGNAL(sliderPressed()), SLOT(timeSliderPressed()));
- connect(timeSlider, SIGNAL(sliderReleased()), SLOT(timeSliderReleased()));
- connect(timeSlider, SIGNAL(sliderMoved(int)), SLOT(timeSliderMoved(int)));
- connect(timeSlider, SIGNAL(valueChanged(int)), SLOT(jumpToTime(int)));
+ connect(timeSlider, TQT_SIGNAL(sliderPressed()), TQT_SLOT(timeSliderPressed()));
+ connect(timeSlider, TQT_SIGNAL(sliderReleased()), TQT_SLOT(timeSliderReleased()));
+ connect(timeSlider, TQT_SIGNAL(sliderMoved(int)), TQT_SLOT(timeSliderMoved(int)));
+ connect(timeSlider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(jumpToTime(int)));
// the volume slider
volumeIcon->setPixmap(SmallIcon("player_volume"));
volumeSlider->setValue(Prefs::volume());
- QString str;
- str = QString::fromUtf8( QCString().sprintf(i18n("Vol: %02d%%").utf8(), Prefs::volume()) );
+ TQString str;
+ str = TQString::fromUtf8( TQCString().sprintf(i18n("Vol: %02d%%").utf8(), Prefs::volume()) );
volumelabel->setText(str);
- connect(volumeSlider, SIGNAL(valueChanged(int)), SLOT(volChanged(int)));
+ connect(volumeSlider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(volChanged(int)));
/* FIXME check for return value */
setDevicePaths(/*Prefs::cdDevice(), Prefs::audioSystem(), Prefs::audioDevice()*/);
- connect(m_cd, SIGNAL(trackPlaying(unsigned, unsigned)), this, SLOT(trackUpdate(unsigned, unsigned)));
- connect(m_cd, SIGNAL(trackPaused(unsigned, unsigned)), this, SLOT(trackUpdate(unsigned, unsigned)));
- connect(m_cd, SIGNAL(trackChanged(unsigned, unsigned)), this, SLOT(trackChanged(unsigned, unsigned)));
- connect(m_cd, SIGNAL(discStopped()), this, SLOT(discStopped()));
- connect(m_cd, SIGNAL(discChanged(unsigned)), this, SLOT(discChanged(unsigned)));
- connect( &queryledtimer, SIGNAL(timeout()), SLOT(togglequeryled()) );
- connect( &titlelabeltimer, SIGNAL(timeout()), SLOT(titlelabeltimeout()) );
- connect( &cycletimer, SIGNAL(timeout()), SLOT(cycletimeout()) );
- connect( &jumpTrackTimer, SIGNAL(timeout()), SLOT(jumpTracks()) );
+ connect(m_cd, TQT_SIGNAL(trackPlaying(unsigned, unsigned)), this, TQT_SLOT(trackUpdate(unsigned, unsigned)));
+ connect(m_cd, TQT_SIGNAL(trackPaused(unsigned, unsigned)), this, TQT_SLOT(trackUpdate(unsigned, unsigned)));
+ connect(m_cd, TQT_SIGNAL(trackChanged(unsigned, unsigned)), this, TQT_SLOT(trackChanged(unsigned, unsigned)));
+ connect(m_cd, TQT_SIGNAL(discStopped()), this, TQT_SLOT(discStopped()));
+ connect(m_cd, TQT_SIGNAL(discChanged(unsigned)), this, TQT_SLOT(discChanged(unsigned)));
+ connect( &queryledtimer, TQT_SIGNAL(timeout()), TQT_SLOT(togglequeryled()) );
+ connect( &titlelabeltimer, TQT_SIGNAL(timeout()), TQT_SLOT(titlelabeltimeout()) );
+ connect( &cycletimer, TQT_SIGNAL(timeout()), TQT_SLOT(cycletimeout()) );
+ connect( &jumpTrackTimer, TQT_SIGNAL(timeout()), TQT_SLOT(jumpTracks()) );
/*
these are always connected in base class
- connect( playPB, SIGNAL(clicked()), SLOT(playClicked()) );
- connect( nextPB, SIGNAL(clicked()), SLOT(nextClicked()) );
- connect( prevPB, SIGNAL(clicked()), SLOT(prevClicked()) );
- connect( stopPB, SIGNAL(clicked()), SLOT(stopClicked()) );
- connect( ejectPB, SIGNAL(clicked()), SLOT(ejectClicked()) );
+ connect( playPB, TQT_SIGNAL(clicked()), TQT_SLOT(playClicked()) );
+ connect( nextPB, TQT_SIGNAL(clicked()), TQT_SLOT(nextClicked()) );
+ connect( prevPB, TQT_SIGNAL(clicked()), TQT_SLOT(prevClicked()) );
+ connect( stopPB, TQT_SIGNAL(clicked()), TQT_SLOT(stopClicked()) );
+ connect( ejectPB, TQT_SIGNAL(clicked()), TQT_SLOT(ejectClicked()) );
*/
- connect( repeatPB, SIGNAL(clicked()), SLOT(loopClicked()) );
- connect( songListCB, SIGNAL(activated(int)), SLOT(trackSelected(int)));
- connect( shufflePB, SIGNAL(clicked()), SLOT(randomSelected()));
- connect( cddbPB, SIGNAL(clicked()), SLOT(CDDialogSelected()));
- connect(kapp, SIGNAL(kdisplayPaletteChanged()), this, SLOT(setColors()));
- connect(kapp, SIGNAL(iconChanged(int)), this, SLOT(setIcons()));
- QToolTip::remove(songListCB);
- QToolTip::add(songListCB, i18n("Track list"));
+ connect( repeatPB, TQT_SIGNAL(clicked()), TQT_SLOT(loopClicked()) );
+ connect( songListCB, TQT_SIGNAL(activated(int)), TQT_SLOT(trackSelected(int)));
+ connect( shufflePB, TQT_SIGNAL(clicked()), TQT_SLOT(randomSelected()));
+ connect( cddbPB, TQT_SIGNAL(clicked()), TQT_SLOT(CDDialogSelected()));
+ connect(kapp, TQT_SIGNAL(kdisplayPaletteChanged()), this, TQT_SLOT(setColors()));
+ connect(kapp, TQT_SIGNAL(iconChanged(int)), this, TQT_SLOT(setIcons()));
+ TQToolTip::remove(songListCB);
+ TQToolTip::add(songListCB, i18n("Track list"));
// set up the actions and keyboard accels
m_actions = new KActionCollection(this);
KAction* action;
- action = new KAction(i18n("Play/Pause"), Key_P, this, SLOT(playClicked()), m_actions, "Play/Pause");
- action = new KAction(i18n("Stop"), Key_S, this, SLOT(stopClicked()), m_actions, "Stop");
- action = new KAction(i18n("Previous"), Key_B, this, SLOT(prevClicked()), m_actions, "Previous");
- action = new KAction(i18n("Next"), Key_N, this, SLOT(nextClicked()), m_actions, "Next");
- action = KStdAction::quit(this, SLOT(quitClicked()), m_actions);
- action = KStdAction::keyBindings(this, SLOT(configureKeys()), m_actions, "options_configure_shortcuts");
- action = KStdAction::keyBindings(this, SLOT(configureGlobalKeys()), m_actions, "options_configure_globals");
- action = KStdAction::preferences(this, SLOT(showConfig()), m_actions);
- action = new KAction(i18n("Loop"), Key_L, this, SLOT(loopClicked()), m_actions, "Loop");
- action = new KAction(i18n("Eject"), CTRL + Key_E, this, SLOT(ejectClicked()), m_actions, "Eject");
- action = new KAction(i18n("Increase Volume"), Key_Plus, this, SLOT(incVolume()), m_actions, "IncVolume");
+ action = new KAction(i18n("Play/Pause"), Key_P, this, TQT_SLOT(playClicked()), m_actions, "Play/Pause");
+ action = new KAction(i18n("Stop"), Key_S, this, TQT_SLOT(stopClicked()), m_actions, "Stop");
+ action = new KAction(i18n("Previous"), Key_B, this, TQT_SLOT(prevClicked()), m_actions, "Previous");
+ action = new KAction(i18n("Next"), Key_N, this, TQT_SLOT(nextClicked()), m_actions, "Next");
+ action = KStdAction::quit(this, TQT_SLOT(quitClicked()), m_actions);
+ action = KStdAction::keyBindings(this, TQT_SLOT(configureKeys()), m_actions, "options_configure_shortcuts");
+ action = KStdAction::keyBindings(this, TQT_SLOT(configureGlobalKeys()), m_actions, "options_configure_globals");
+ action = KStdAction::preferences(this, TQT_SLOT(showConfig()), m_actions);
+ action = new KAction(i18n("Loop"), Key_L, this, TQT_SLOT(loopClicked()), m_actions, "Loop");
+ action = new KAction(i18n("Eject"), CTRL + Key_E, this, TQT_SLOT(ejectClicked()), m_actions, "Eject");
+ action = new KAction(i18n("Increase Volume"), Key_Plus, this, TQT_SLOT(incVolume()), m_actions, "IncVolume");
KShortcut increaseVolume = action->shortcut();
increaseVolume.append( KKey( Key_Equal ) );
action->setShortcut( increaseVolume );
- action = new KAction(i18n("Decrease Volume"), Key_Minus, this, SLOT(decVolume()), m_actions, "DecVolume");
- action = new KAction(i18n("Options"), CTRL + Key_T, this, SLOT(showConfig()), m_actions, "Options");
- action = new KAction(i18n("Shuffle"), Key_R, this, SLOT(randomSelected()), m_actions, "Shuffle");
- action = new KAction(i18n("CDDB"), CTRL + Key_D, this, SLOT(CDDialogSelected()), m_actions, "CDDB");
+ action = new KAction(i18n("Decrease Volume"), Key_Minus, this, TQT_SLOT(decVolume()), m_actions, "DecVolume");
+ action = new KAction(i18n("Options"), CTRL + Key_T, this, TQT_SLOT(showConfig()), m_actions, "Options");
+ action = new KAction(i18n("Shuffle"), Key_R, this, TQT_SLOT(randomSelected()), m_actions, "Shuffle");
+ action = new KAction(i18n("CDDB"), CTRL + Key_D, this, TQT_SLOT(CDDialogSelected()), m_actions, "CDDB");
m_actions->readShortcutSettings("Shortcuts");
m_actions->action( "options_configure_globals" )->setText( i18n( "Configure &Global Shortcuts..." ) );
kapp->installKDEPropertyMap();
- QSqlPropertyMap *map = QSqlPropertyMap::defaultMap();
+ TQSqlPropertyMap *map = TQSqlPropertyMap::defaultMap();
map->insert("KComboBox", "currentText");
initGlobalShortcuts();
@@ -210,9 +210,9 @@ KSCD::KSCD( QWidget *parent, const char *name )
setDocking(Prefs::docking());
- setFocusPolicy(QWidget::NoFocus);
+ setFocusPolicy(TQWidget::NoFocus);
- songListCB->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed);
+ songListCB->setSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed);
adjustSize();
setFixedHeight(this->height());
} // KSCD
@@ -232,20 +232,20 @@ void KSCD::initGlobalShortcuts() {
//Definition of global shortcuts is based on 'local' shortcuts which follow
//the WIN key.
m_globalAccel->insert("Next", i18n("Next"), 0, KKey("WIN+N"), KKey("WIN+Right"),
- this, SLOT(nextClicked()));
+ this, TQT_SLOT(nextClicked()));
//NOTE: WIN+B collidates with amarok's default global shortcut.
m_globalAccel->insert("Previous", i18n("Previous"), 0, KKey("WIN+B"), KKey("WIN+Left"),
- this, SLOT(prevClicked()));
+ this, TQT_SLOT(prevClicked()));
m_globalAccel->insert("Play/Pause", i18n("Play/Pause"), 0, KKey("WIN+P"), 0,
- this, SLOT(playClicked()));
+ this, TQT_SLOT(playClicked()));
m_globalAccel->insert("Stop", i18n("Stop"), 0, KKey("WIN+S"), 0,
- this, SLOT(stopClicked()));
+ this, TQT_SLOT(stopClicked()));
m_globalAccel->insert("IncVolume", i18n("Increase Volume"), 0, KKey("WIN+Plus"), KKey("WIN+Up"),
- this, SLOT(incVolume()));
+ this, TQT_SLOT(incVolume()));
m_globalAccel->insert("DecVolume", i18n("Decrease Volume"), 0, KKey("WIN+Minus"), KKey("WIN+Down"),
- this, SLOT(decVolume()));
+ this, TQT_SLOT(decVolume()));
m_globalAccel->insert("Shuffle", i18n("Shuffle"), 0, KKey("WIN+R"), 0,
- this, SLOT(incVolume()));
+ this, TQT_SLOT(incVolume()));
m_globalAccel->setConfigGroup( "GlobalShortcuts" );
m_globalAccel->readSettings( kapp->config() );
@@ -266,7 +266,7 @@ void KSCD::setVolume(int v)
volumeSlider->setValue(v);
}
-void KSCD::setDevice(const QString& dev)
+void KSCD::setDevice(const TQString& dev)
{
Prefs::self()->setCdDevice(dev);
setDevicePaths();
@@ -280,11 +280,11 @@ void KSCD::initFont()
/* int theSmallPtSize = 10;
// Find a font that fits the 13 and 14 pixel widgets
- QFont fn( KGlobalSettings::generalFont().family(), theSmallPtSize, QFont::Bold );
+ TQFont fn( KGlobalSettings::generalFont().family(), theSmallPtSize, TQFont::Bold );
bool fits = false;
while (!fits && theSmallPtSize > 1)
{
- QFontMetrics metrics(fn);
+ TQFontMetrics metrics(fn);
if(metrics.height() > 13)
{
--theSmallPtSize;
@@ -293,7 +293,7 @@ void KSCD::initFont()
fits = true;
}
}
- smallfont = QFont(KGlobalSettings::generalFont().family(), theSmallPtSize, QFont::Bold);
+ smallfont = TQFont(KGlobalSettings::generalFont().family(), theSmallPtSize, TQFont::Bold);
*/
} // initFont()
@@ -312,7 +312,7 @@ void KSCD::drawPanel()
trackTimeLED[u]->setLEDoffColor(Prefs::backColor());
trackTimeLED[u]->setLEDColor(Prefs::ledColor(), Prefs::backColor());
trackTimeLED[u]->setGeometry(2 + u * 18, D, 23, 30);
- connect(trackTimeLED[u], SIGNAL(clicked()), this, SLOT(cycleplaytimemode()));
+ connect(trackTimeLED[u], TQT_SIGNAL(clicked()), this, TQT_SLOT(cycleplaytimemode()));
}
setLEDs(-1);
@@ -342,9 +342,9 @@ void KSCD::setIcons()
void KSCD::setupPopups()
{
- QPopupMenu* mainPopup = new QPopupMenu(this);
+ TQPopupMenu* mainPopup = new TQPopupMenu(this);
infoPB->setPopup(mainPopup);
- infoPopup = new QPopupMenu (this);
+ infoPopup = new TQPopupMenu (this);
infoPopup->insertItem("MusicMoz", 0);
@@ -369,7 +369,7 @@ void KSCD::setupPopups()
mainPopup->insertItem(i18n("Artist Information"), infoPopup);
- connect( infoPopup, SIGNAL(activated(int)), SLOT(information(int)) );
+ connect( infoPopup, TQT_SIGNAL(activated(int)), TQT_SLOT(information(int)) );
KHelpMenu* helpMenu = new KHelpMenu(this, KGlobal::instance()->aboutData(), false);
mainPopup->insertItem(SmallIcon("help"),i18n("&Help"), helpMenu->menu());
@@ -524,7 +524,7 @@ bool KSCD::nextClicked()
void KSCD::trackChanged(unsigned track, unsigned trackLength)
{
- QString tooltip = artistlabel->text();
+ TQString tooltip = artistlabel->text();
if (track < 1)
{
setLEDs(-1);
@@ -546,20 +546,20 @@ void KSCD::trackChanged(unsigned track, unsigned trackLength)
songListCB->setCurrentItem(track - 1);
// drop the number.
// for Mahlah, a picky though otherwise wonderful person - AJS
- QString justTheName = songListCB->currentText();
+ TQString justTheName = songListCB->currentText();
justTheName = justTheName.right(justTheName.length() - 4);
- QToolTip::remove(songListCB);
- QToolTip::add(songListCB, i18n("Current track: %1").arg(justTheName));
+ TQToolTip::remove(songListCB);
+ TQToolTip::add(songListCB, i18n("Current track: %1").arg(justTheName));
}
timeSlider->blockSignals(true);
timeSlider->setRange(0, trackLength ? trackLength - 1 : 0);
timeSlider->blockSignals(false);
- QString str;
+ TQString str;
str.sprintf("%02d/%02d", track, m_cd->tracks());
tracklabel->setText(str);
- QString title = cddbInfo.trackInfoList[track-1].title;
+ TQString title = cddbInfo.trackInfoList[track-1].title;
titlelabel->setText(title);
tooltip += "/";
tooltip += KStringHandler::rsqueeze(title, 30);
@@ -628,9 +628,9 @@ void KSCD::quitClicked()
kapp->quit();
} // quitClicked()
-bool KSCD::event( QEvent *e )
+bool KSCD::event( TQEvent *e )
{
- return QWidget::event(e);
+ return TQWidget::event(e);
} // event
@@ -673,7 +673,7 @@ void KSCD::ejectClicked()
m_cd->eject();
} // ejectClicked
-void KSCD::closeEvent(QCloseEvent *e)
+void KSCD::closeEvent(TQCloseEvent *e)
{
if (Prefs::docking() && !kapp->sessionSaving())
{
@@ -713,7 +713,7 @@ void KSCD::updateConfigDialog(configWidget* widget)
if(!widget)
return;
- static QString originalTitleOfGroupBox = widget->groupBox3->title();
+ static TQString originalTitleOfGroupBox = widget->groupBox3->title();
if(m_cd->isPlaying()) {
widget->groupBox3->setEnabled(false);
widget->groupBox3->setTitle( i18n( "CD Drive (you must stop playing to change this)" ) );
@@ -734,7 +734,7 @@ void KSCD::showConfig()
configDialog = new KConfigDialog(this, "settings", Prefs::self());
- configDialog->setHelp(QString::null);
+ configDialog->setHelp(TQString::null);
confWidget = new configWidget(this, 0, "Kscd");
@@ -754,18 +754,18 @@ void KSCD::showConfig()
m->load();
KCDDB::Config* cfg = new KCDDB::Config();
cfg->readConfig();
- configDialog -> addPage(m, cfg, QString("CDDB"), "cdtrack", i18n("Configure Fetching Items"));
+ configDialog -> addPage(m, cfg, TQString("CDDB"), "cdtrack", i18n("Configure Fetching Items"));
- connect(configDialog, SIGNAL(okClicked()), m, SLOT(save()));
- connect(configDialog, SIGNAL(applyClicked()), m, SLOT(save()));
- connect(configDialog, SIGNAL(defaultClicked()), m, SLOT(defaults()));
+ connect(configDialog, TQT_SIGNAL(okClicked()), m, TQT_SLOT(save()));
+ connect(configDialog, TQT_SIGNAL(applyClicked()), m, TQT_SLOT(save()));
+ connect(configDialog, TQT_SIGNAL(defaultClicked()), m, TQT_SLOT(defaults()));
}
}
}
updateConfigDialog(confWidget);
- connect(configDialog, SIGNAL(settingsChanged()), this, SLOT(configDone()));
+ connect(configDialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(configDone()));
configDialog -> show();
} // showConfig()
@@ -799,7 +799,7 @@ void KSCD::setDevicePaths()
Prefs::audioSystem(), Prefs::audioDevice()))
{
// This device did not seem usable.
- QString str = i18n("CD-ROM read or access error (or no audio disc in drive).\n"\
+ TQString str = i18n("CD-ROM read or access error (or no audio disc in drive).\n"\
"Please make sure you have access permissions to:\n%1").arg(
KCompactDisc::urlToDevice(Prefs::cdDevice()));
KMessageBox::error(this, str, i18n("Error"));
@@ -814,14 +814,14 @@ void KSCD::setDocking(bool dock)
if (!m_dockWidget)
{
m_dockWidget = new DockWidget(this, "dockw");
- connect(m_dockWidget, SIGNAL(quitSelected()), this, SLOT(quitClicked()));
+ connect(m_dockWidget, TQT_SIGNAL(quitSelected()), this, TQT_SLOT(quitClicked()));
}
m_dockWidget->show();
- connect(this, SIGNAL(trackChanged(const QString&)),
- m_dockWidget, SLOT(setToolTip(const QString&)));
- connect(this, SIGNAL(trackChanged(const QString&)),
- m_dockWidget, SLOT(createPopup(const QString&)));
+ connect(this, TQT_SIGNAL(trackChanged(const TQString&)),
+ m_dockWidget, TQT_SLOT(setToolTip(const TQString&)));
+ connect(this, TQT_SIGNAL(trackChanged(const TQString&)),
+ m_dockWidget, TQT_SLOT(createPopup(const TQString&)));
}
else
{
@@ -859,8 +859,8 @@ void KSCD::decVolume()
void KSCD::volChanged( int vol )
{
- QString str;
- str = QString::fromUtf8( QCString().sprintf(i18n("Vol: %02d%%").utf8(), vol) );
+ TQString str;
+ str = TQString::fromUtf8( TQCString().sprintf(i18n("Vol: %02d%%").utf8(), vol) );
volumelabel->setText(str);
m_cd->setVolume(vol);
Prefs::setVolume(vol);
@@ -962,7 +962,7 @@ void KSCD::discChanged(unsigned discId)
}
else
{
- cddbInfo.id = QString::number(discId, 16).rightJustify(8,'0');
+ cddbInfo.id = TQString::number(discId, 16).rightJustify(8,'0');
cddbInfo.length = m_cd->discLength() / 1000;
cddbInfo.artist = m_cd->discArtist();
cddbInfo.title = m_cd->discTitle();
@@ -990,10 +990,10 @@ void KSCD::discChanged(unsigned discId)
}
// Set the total time.
- QTime dml;
+ TQTime dml;
dml = dml.addSecs(m_cd->discLength() / 1000);
- QString fmt;
+ TQString fmt;
if(dml.hour() > 0)
fmt.sprintf("%02d:%02d:%02d",dml.hour(),dml.minute(),dml.second());
else
@@ -1054,7 +1054,7 @@ void KSCD::discStopped()
void KSCD::setLEDs(int milliseconds)
{
- QString symbols;
+ TQString symbols;
if (milliseconds < 0)
{
@@ -1085,23 +1085,23 @@ void KSCD::resetTimeSlider(bool enabled)
void KSCD::setColors()
{
- QColor led_color = Prefs::ledColor();
- QColor background_color = Prefs::backColor();
+ TQColor led_color = Prefs::ledColor();
+ TQColor background_color = Prefs::backColor();
backdrop->setBackgroundColor(background_color);
- QColorGroup colgrp( led_color, background_color, led_color,led_color , led_color,
+ TQColorGroup colgrp( led_color, background_color, led_color,led_color , led_color,
led_color, white );
- titlelabel ->setPalette( QPalette(colgrp,colgrp,colgrp) );
- artistlabel->setPalette( QPalette(colgrp,colgrp,colgrp) );
- volumelabel->setPalette( QPalette(colgrp,colgrp,colgrp) );
- statuslabel->setPalette( QPalette(colgrp,colgrp,colgrp) );
- tracklabel ->setPalette( QPalette(colgrp,colgrp,colgrp) );
- totaltimelabel->setPalette( QPalette(colgrp,colgrp,colgrp) );
+ titlelabel ->setPalette( TQPalette(colgrp,colgrp,colgrp) );
+ artistlabel->setPalette( TQPalette(colgrp,colgrp,colgrp) );
+ volumelabel->setPalette( TQPalette(colgrp,colgrp,colgrp) );
+ statuslabel->setPalette( TQPalette(colgrp,colgrp,colgrp) );
+ tracklabel ->setPalette( TQPalette(colgrp,colgrp,colgrp) );
+ totaltimelabel->setPalette( TQPalette(colgrp,colgrp,colgrp) );
- queryled->setPalette( QPalette(colgrp,colgrp,colgrp) );
- loopled->setPalette( QPalette(colgrp,colgrp,colgrp) );
+ queryled->setPalette( TQPalette(colgrp,colgrp,colgrp) );
+ loopled->setPalette( TQPalette(colgrp,colgrp,colgrp) );
for (int u = 0; u< 5;u++){
trackTimeLED[u]->setLEDoffColor(background_color);
@@ -1155,11 +1155,11 @@ void KSCD::CDDialogSelected()
cddialog = new CDDBDlg(this);
cddialog->setData(cddbInfo, m_cd->discSignature(), playlist);
- connect(cddialog,SIGNAL(cddbQuery()),SLOT(lookupCDDB()));
- connect(cddialog,SIGNAL(newCDInfoStored(KCDDB::CDInfo)),
- SLOT(setCDInfo(KCDDB::CDInfo)));
- connect(cddialog,SIGNAL(finished()),SLOT(CDDialogDone()));
- connect(cddialog,SIGNAL(play(int)),SLOT(trackSelected(int)));
+ connect(cddialog,TQT_SIGNAL(cddbQuery()),TQT_SLOT(lookupCDDB()));
+ connect(cddialog,TQT_SIGNAL(newCDInfoStored(KCDDB::CDInfo)),
+ TQT_SLOT(setCDInfo(KCDDB::CDInfo)));
+ connect(cddialog,TQT_SIGNAL(finished()),TQT_SLOT(CDDialogDone()));
+ connect(cddialog,TQT_SIGNAL(play(int)),TQT_SLOT(trackSelected(int)));
}
cddialog->show();
@@ -1201,7 +1201,7 @@ void KSCD::lookupCDDBDone(CDDB::Result result)
// The intent of the original code here seems to have been to perform the
// lookup, and then to convert all the string data within the CDDB response
- // using the use Prefs::selectedEncoding() and a QTextCodec. However, that
+ // using the use Prefs::selectedEncoding() and a TQTextCodec. However, that
// seems to be irrelevant these days.
KCDDB::CDInfo info = cddb->bestLookupResponse();
// TODO Why doesn't libcddb not return MultipleRecordFound?
@@ -1209,21 +1209,21 @@ void KSCD::lookupCDDBDone(CDDB::Result result)
if( cddb->lookupResponse().count() > 1 ) {
CDInfoList cddb_info = cddb->lookupResponse();
CDInfoList::iterator it;
- QStringList list;
+ TQStringList list;
for ( it = cddb_info.begin(); it != cddb_info.end(); ++it ) {
- list.append( QString("%1, %2, %3").arg((*it).artist).arg((*it).title)
+ list.append( TQString("%1, %2, %3").arg((*it).artist).arg((*it).title)
.arg((*it).genre));
}
bool ok(false);
- QString res = KInputDialog::getItem(
+ TQString res = KInputDialog::getItem(
i18n("Select CDDB Entry"),
i18n("Select a CDDB entry:"), list, 0, false, &ok,
this );
if ( ok ) {
// The user selected and item and pressed OK
uint c = 0;
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
if( *it == res) break;
c++;
}
@@ -1398,8 +1398,8 @@ void KSCD::cycleplaytimemode()
void KSCD::cycletimeout()
{
cycletimer.stop();
- QString str;
- str = QString::fromUtf8( QCString().sprintf(i18n("Vol: %02d%%").utf8(), Prefs::volume()) );
+ TQString str;
+ str = TQString::fromUtf8( TQCString().sprintf(i18n("Vol: %02d%%").utf8(), Prefs::volume()) );
volumelabel->setText(str);
} // cycletimeout
@@ -1411,69 +1411,69 @@ void KSCD::information(int i)
if(cddbInfo.artist.isEmpty())
return;
- QString encodedArtist = KURL::encode_string_no_slash(cddbInfo.artist);
+ TQString encodedArtist = KURL::encode_string_no_slash(cddbInfo.artist);
- QString str;
+ TQString str;
switch(i)
{
case 0:
- str = QString("http://musicmoz.org/cgi-bin/ext.cgi?artist=%1")
+ str = TQString("http://musicmoz.org/cgi-bin/ext.cgi?artist=%1")
.arg(encodedArtist);
break;
case 1:
- str = QString("http://ubl.artistdirect.com/cgi-bin/gx.cgi/AppLogic+Search?select=MusicArtist&searchstr=%1&searchtype=NormalSearch")
+ str = TQString("http://ubl.artistdirect.com/cgi-bin/gx.cgi/AppLogic+Search?select=MusicArtist&searchstr=%1&searchtype=NormalSearch")
.arg(encodedArtist);
break;
case 2:
- str = QString("http://www.cduniverse.com/cgi-bin/cdubin.exe/rlinka/ean=%1")
+ str = TQString("http://www.cduniverse.com/cgi-bin/cdubin.exe/rlinka/ean=%1")
.arg(encodedArtist);
break;
case 3:
- str = QString("http://www.alltheweb.com/search?cat=web&q=%1")
+ str = TQString("http://www.alltheweb.com/search?cat=web&q=%1")
.arg(encodedArtist);
break;
case 4:
- str = QString("http://altavista.com/web/results?q=%1&kgs=0&kls=1&avkw=xytx")
+ str = TQString("http://altavista.com/web/results?q=%1&kgs=0&kls=1&avkw=xytx")
.arg(encodedArtist);
break;
case 5:
- str = QString("http://msxml.excite.com/_1_2UDOUB70SVHVHR__info.xcite/dog/results?otmpl=dog/webresults.htm&qkw=%1&qcat=web&qk=20&top=1&start=&ver=14060")
+ str = TQString("http://msxml.excite.com/_1_2UDOUB70SVHVHR__info.xcite/dog/results?otmpl=dog/webresults.htm&qkw=%1&qcat=web&qk=20&top=1&start=&ver=14060")
.arg(encodedArtist);
break;
case 6:
- str = QString("http://www.google.com/search?q=%1")
+ str = TQString("http://www.google.com/search?q=%1")
.arg(encodedArtist);
break;
case 7:
- str = QString("http://groups.google.com/groups?oi=djq&as_q=%1&num=20")
+ str = TQString("http://groups.google.com/groups?oi=djq&as_q=%1&num=20")
.arg(encodedArtist);
break;
case 8:
- str = QString("http://www.hotbot.com/default.asp?prov=Inktomi&query=%1&ps=&loc=searchbox&tab=web")
+ str = TQString("http://www.hotbot.com/default.asp?prov=Inktomi&query=%1&ps=&loc=searchbox&tab=web")
.arg(encodedArtist);
break;
case 9:
- str = QString("http://search.lycos.com/default.asp?lpv=1&loc=searchhp&tab=web&query=%1")
+ str = TQString("http://search.lycos.com/default.asp?lpv=1&loc=searchhp&tab=web&query=%1")
.arg(encodedArtist);
break;
case 10:
- str = QString("http://search.dmoz.org/cgi-bin/search?search=%1")
+ str = TQString("http://search.dmoz.org/cgi-bin/search?search=%1")
.arg(encodedArtist);
break;
case 11:
- str = QString("http://search.yahoo.com/bin/search?p=%1")
+ str = TQString("http://search.yahoo.com/bin/search?p=%1")
.arg(encodedArtist);
break;
@@ -1501,7 +1501,7 @@ bool KSCD::saveState(QSessionManager& /*sm*/)
/**
* Allow the user to type in the number of the track
*/
-void KSCD::keyPressEvent(QKeyEvent* e)
+void KSCD::keyPressEvent(TQKeyEvent* e)
{
bool isNum;
int value = e->text().toInt(&isNum);
@@ -1523,7 +1523,7 @@ void KSCD::keyPressEvent(QKeyEvent* e)
}
else
{
- QWidget::keyPressEvent(e);
+ TQWidget::keyPressEvent(e);
}
} //keyPressEvent
@@ -1537,25 +1537,25 @@ void KSCD::jumpTracks()
jumpToTrack = 0;
} // jumpTracks
-QString KSCD::currentTrackTitle()
+TQString KSCD::currentTrackTitle()
{
int track = m_cd->track();
- return (track > -1) ? cddbInfo.trackInfoList[track-1].title : QString::null;
+ return (track > -1) ? cddbInfo.trackInfoList[track-1].title : TQString::null;
}
-QString KSCD::currentAlbum()
+TQString KSCD::currentAlbum()
{
return cddbInfo.title;
}
-QString KSCD::currentArtist()
+TQString KSCD::currentArtist()
{
return cddbInfo.artist;
}
-QStringList KSCD::trackList()
+TQStringList KSCD::trackList()
{
- QStringList tracks;
+ TQStringList tracks;
for (TrackInfoList::const_iterator it = cddbInfo.trackInfoList.begin();
it != cddbInfo.trackInfoList.end(); ++it)
tracks << (*it).title;
@@ -1563,13 +1563,13 @@ QStringList KSCD::trackList()
return tracks;
}
-void KSCD::populateSongList(QString infoStatus)
+void KSCD::populateSongList(TQString infoStatus)
{
// set the artist and title labels as well as the dock tooltip.
if (!infoStatus.isEmpty())
artistlabel->setText(infoStatus);
else
- artistlabel->setText(QString("%1 - %2").arg(cddbInfo.artist, cddbInfo.title));
+ artistlabel->setText(TQString("%1 - %2").arg(cddbInfo.artist, cddbInfo.title));
songListCB->clear();
for (unsigned i = 0; i < cddbInfo.trackInfoList.count(); i++)
@@ -1579,9 +1579,9 @@ void KSCD::populateSongList(QString infoStatus)
unsigned mysec;
mymin = tmp / 60000;
mysec = (tmp % 60000) / 1000;
- QString str1;
+ TQString str1;
str1.sprintf("%02d: ", i + 1);
- QString str2;
+ TQString str2;
str2.sprintf(" (%02d:%02d) ", mymin, mysec);
str1.append(cddbInfo.trackInfoList[i].title);
str1.append(str2);
@@ -1635,7 +1635,7 @@ int main( int argc, char *argv[] )
DCOPRef ref("kscd", "CDPlayer");
if (args->count() > 0)
{
- ref.send("setDevice(QString)", QString(args->arg(0)));
+ ref.send("setDevice(TQString)", TQString(args->arg(0)));
}
if (args->isSet("start"))
{