summaryrefslogtreecommitdiffstats
path: root/kscd/kscd.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 06:00:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 06:00:15 +0000
commitb1057f437bf65300831a0ccb45b920787c6b318d (patch)
treef8a73db06ca1180d0da0ba6dfbe786197b4f4bc3 /kscd/kscd.cpp
parent4ddfca384ced9ad654213aef9dc2c3973720b980 (diff)
downloadtdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.tar.gz
tdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.zip
TQt4 port kdemultimedia
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1236079 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kscd/kscd.cpp')
-rw-r--r--kscd/kscd.cpp132
1 files changed, 66 insertions, 66 deletions
diff --git a/kscd/kscd.cpp b/kscd/kscd.cpp
index bb2b0ae5..ef944999 100644
--- a/kscd/kscd.cpp
+++ b/kscd/kscd.cpp
@@ -89,9 +89,9 @@ bool stoppedByUser = false;
The GUI part
*****************************************************************************/
-KSCD::KSCD( TQWidget *parent, const char *name )
+KSCD::KSCD( TQWidget *tqparent, const char *name )
: DCOPObject("CDPlayer"),
- kscdPanelDlg( parent, name, Qt::WDestructiveClose ),
+ kscdPanelDlg( tqparent, name, TQt::WDestructiveClose ),
configDialog(0L),
cddialog(0L), //!!!!
jumpToTrack(0L),
@@ -103,7 +103,7 @@ KSCD::KSCD( TQWidget *parent, const char *name )
random_current = random_list.begin();
cddb = new KCDDB::Client();
- connect(cddb, TQT_SIGNAL(finished(CDDB::Result)), this, TQT_SLOT(lookupCDDBDone(CDDB::Result)));
+ connect(cddb, TQT_SIGNAL(finished(CDDB::Result)), TQT_TQOBJECT(this), TQT_SLOT(lookupCDDBDone(CDDB::Result)));
#if defined(BUILD_CDDA)
audio_systems_list
@@ -139,11 +139,11 @@ KSCD::KSCD( TQWidget *parent, const char *name )
/* FIXME check for return value */
setDevicePaths(/*Prefs::cdDevice(), Prefs::audioSystem(), Prefs::audioDevice()*/);
- 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(m_cd, TQT_SIGNAL(trackPlaying(unsigned, unsigned)), TQT_TQOBJECT(this), TQT_SLOT(trackUpdate(unsigned, unsigned)));
+ connect(m_cd, TQT_SIGNAL(trackPaused(unsigned, unsigned)), TQT_TQOBJECT(this), TQT_SLOT(trackUpdate(unsigned, unsigned)));
+ connect(m_cd, TQT_SIGNAL(trackChanged(unsigned, unsigned)), TQT_TQOBJECT(this), TQT_SLOT(trackChanged(unsigned, unsigned)));
+ connect(m_cd, TQT_SIGNAL(discStopped()), TQT_TQOBJECT(this), TQT_SLOT(discStopped()));
+ connect(m_cd, TQT_SIGNAL(discChanged(unsigned)), TQT_TQOBJECT(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()) );
@@ -160,8 +160,8 @@ KSCD::KSCD( TQWidget *parent, const char *name )
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()));
+ connect(kapp, TQT_SIGNAL(kdisplayPaletteChanged()), TQT_TQOBJECT(this), TQT_SLOT(setColors()));
+ connect(kapp, TQT_SIGNAL(iconChanged(int)), TQT_TQOBJECT(this), TQT_SLOT(setIcons()));
TQToolTip::remove(songListCB);
TQToolTip::add(songListCB, i18n("Track list"));
@@ -170,24 +170,24 @@ KSCD::KSCD( TQWidget *parent, const char *name )
m_actions = new KActionCollection(this);
KAction* action;
- 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");
+ action = new KAction(i18n("Play/Pause"), Key_P, TQT_TQOBJECT(this), TQT_SLOT(playClicked()), m_actions, "Play/Pause");
+ action = new KAction(i18n("Stop"), Key_S, TQT_TQOBJECT(this), TQT_SLOT(stopClicked()), m_actions, "Stop");
+ action = new KAction(i18n("Previous"), Key_B, TQT_TQOBJECT(this), TQT_SLOT(prevClicked()), m_actions, "Previous");
+ action = new KAction(i18n("Next"), Key_N, TQT_TQOBJECT(this), TQT_SLOT(nextClicked()), m_actions, "Next");
+ action = KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(quitClicked()), m_actions);
+ action = KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(configureKeys()), m_actions, "options_configure_shortcuts");
+ action = KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(configureGlobalKeys()), m_actions, "options_configure_globals");
+ action = KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(showConfig()), m_actions);
+ action = new KAction(i18n("Loop"), Key_L, TQT_TQOBJECT(this), TQT_SLOT(loopClicked()), m_actions, "Loop");
+ action = new KAction(i18n("Eject"), CTRL + Key_E, TQT_TQOBJECT(this), TQT_SLOT(ejectClicked()), m_actions, "Eject");
+ action = new KAction(i18n("Increase Volume"), Key_Plus, TQT_TQOBJECT(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, 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");
+ action = new KAction(i18n("Decrease Volume"), Key_Minus, TQT_TQOBJECT(this), TQT_SLOT(decVolume()), m_actions, "DecVolume");
+ action = new KAction(i18n("Options"), CTRL + Key_T, TQT_TQOBJECT(this), TQT_SLOT(showConfig()), m_actions, "Options");
+ action = new KAction(i18n("Shuffle"), Key_R, TQT_TQOBJECT(this), TQT_SLOT(randomSelected()), m_actions, "Shuffle");
+ action = new KAction(i18n("CDDB"), CTRL + Key_D, TQT_TQOBJECT(this), TQT_SLOT(CDDialogSelected()), m_actions, "CDDB");
m_actions->readShortcutSettings("Shortcuts");
@@ -210,9 +210,9 @@ KSCD::KSCD( TQWidget *parent, const char *name )
setDocking(Prefs::docking());
- setFocusPolicy(TQWidget::NoFocus);
+ setFocusPolicy(TQ_NoFocus);
- songListCB->setSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed);
+ songListCB->tqsetSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed);
adjustSize();
setFixedHeight(this->height());
} // KSCD
@@ -227,25 +227,25 @@ KSCD::~KSCD()
void KSCD::initGlobalShortcuts() {
- m_globalAccel = new KGlobalAccel( this );
+ m_globalAccel = new KGlobalAccel( TQT_TQOBJECT(this) );
//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, TQT_SLOT(nextClicked()));
+ TQT_TQOBJECT(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, TQT_SLOT(prevClicked()));
+ TQT_TQOBJECT(this), TQT_SLOT(prevClicked()));
m_globalAccel->insert("Play/Pause", i18n("Play/Pause"), 0, KKey("WIN+P"), 0,
- this, TQT_SLOT(playClicked()));
+ TQT_TQOBJECT(this), TQT_SLOT(playClicked()));
m_globalAccel->insert("Stop", i18n("Stop"), 0, KKey("WIN+S"), 0,
- this, TQT_SLOT(stopClicked()));
+ TQT_TQOBJECT(this), TQT_SLOT(stopClicked()));
m_globalAccel->insert("IncVolume", i18n("Increase Volume"), 0, KKey("WIN+Plus"), KKey("WIN+Up"),
- this, TQT_SLOT(incVolume()));
+ TQT_TQOBJECT(this), TQT_SLOT(incVolume()));
m_globalAccel->insert("DecVolume", i18n("Decrease Volume"), 0, KKey("WIN+Minus"), KKey("WIN+Down"),
- this, TQT_SLOT(decVolume()));
+ TQT_TQOBJECT(this), TQT_SLOT(decVolume()));
m_globalAccel->insert("Shuffle", i18n("Shuffle"), 0, KKey("WIN+R"), 0,
- this, TQT_SLOT(incVolume()));
+ TQT_TQOBJECT(this), TQT_SLOT(incVolume()));
m_globalAccel->setConfigGroup( "GlobalShortcuts" );
m_globalAccel->readSettings( kapp->config() );
@@ -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], TQT_SIGNAL(clicked()), this, TQT_SLOT(cycleplaytimemode()));
+ connect(trackTimeLED[u], TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(cycleplaytimemode()));
}
setLEDs(-1);
@@ -550,7 +550,7 @@ void KSCD::trackChanged(unsigned track, unsigned trackLength)
justTheName = justTheName.right(justTheName.length() - 4);
TQToolTip::remove(songListCB);
- TQToolTip::add(songListCB, i18n("Current track: %1").arg(justTheName));
+ TQToolTip::add(songListCB, i18n("Current track: %1").tqarg(justTheName));
}
timeSlider->blockSignals(true);
timeSlider->setRange(0, trackLength ? trackLength - 1 : 0);
@@ -688,7 +688,7 @@ void KSCD::randomSelected()
{
setShuffle(Prefs::randomPlay()?0:1);
- /* FIXME this helps us to display "Random" in Status line
+ /* FIXME this helps us to display "Random" in tqStatus line
should it maybe to be replaced with symbol "RAND" or something others */
statuslabel->setText(Prefs::randomPlay()?i18n("Random"):i18n("Play"));
} // randomSelected
@@ -734,7 +734,7 @@ void KSCD::showConfig()
configDialog = new KConfigDialog(this, "settings", Prefs::self());
- configDialog->setHelp(TQString::null);
+ configDialog->setHelp(TQString());
confWidget = new configWidget(this, 0, "Kscd");
@@ -765,7 +765,7 @@ void KSCD::showConfig()
updateConfigDialog(confWidget);
- connect(configDialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(configDone()));
+ connect(configDialog, TQT_SIGNAL(settingsChanged()), TQT_TQOBJECT(this), TQT_SLOT(configDone()));
configDialog -> show();
} // showConfig()
@@ -800,7 +800,7 @@ void KSCD::setDevicePaths()
{
// This device did not seem usable.
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(
+ "Please make sure you have access permissions to:\n%1").tqarg(
KCompactDisc::urlToDevice(Prefs::cdDevice()));
KMessageBox::error(this, str, i18n("Error"));
}
@@ -814,7 +814,7 @@ void KSCD::setDocking(bool dock)
if (!m_dockWidget)
{
m_dockWidget = new DockWidget(this, "dockw");
- connect(m_dockWidget, TQT_SIGNAL(quitSelected()), this, TQT_SLOT(quitClicked()));
+ connect(m_dockWidget, TQT_SIGNAL(quitSelected()), TQT_TQOBJECT(this), TQT_SLOT(quitClicked()));
}
m_dockWidget->show();
@@ -881,7 +881,7 @@ void KSCD::make_random_list()
{
do {
selected = 1 + (int) randSequence.getLong(m_cd->tracks());
- rejected = (random_list.find(selected) != random_list.end());
+ rejected = (random_list.tqfind(selected) != random_list.end());
} while(rejected == true);
random_list.append(selected);
}
@@ -1211,8 +1211,8 @@ void KSCD::lookupCDDBDone(CDDB::Result result)
CDInfoList::iterator it;
TQStringList list;
for ( it = cddb_info.begin(); it != cddb_info.end(); ++it ) {
- list.append( TQString("%1, %2, %3").arg((*it).artist).arg((*it).title)
- .arg((*it).genre));
+ list.append( TQString("%1, %2, %3").tqarg((*it).artist).tqarg((*it).title)
+ .tqarg((*it).genre));
}
bool ok(false);
@@ -1245,7 +1245,7 @@ void KSCD::lookupCDDBDone(CDDB::Result result)
void KSCD::setCDInfo(KCDDB::CDInfo info)
{
// Some sanity provisions to ensure that the number of records matches what
- // the CD actually contains.
+ // the CD actually tqcontains.
while (info.trackInfoList.count() < cddbInfo.trackInfoList.count())
{
info.trackInfoList.append(KCDDB::TrackInfo());
@@ -1313,7 +1313,7 @@ int KSCD::currentPosition()
return m_cd->trackPosition();
}
-int KSCD::getStatus()
+int KSCD::gettqStatus()
{
if (m_cd->isPlaying())
return 2;
@@ -1419,62 +1419,62 @@ void KSCD::information(int i)
{
case 0:
str = TQString("http://musicmoz.org/cgi-bin/ext.cgi?artist=%1")
- .arg(encodedArtist);
+ .tqarg(encodedArtist);
break;
case 1:
str = TQString("http://ubl.artistdirect.com/cgi-bin/gx.cgi/AppLogic+Search?select=MusicArtist&searchstr=%1&searchtype=NormalSearch")
- .arg(encodedArtist);
+ .tqarg(encodedArtist);
break;
case 2:
str = TQString("http://www.cduniverse.com/cgi-bin/cdubin.exe/rlinka/ean=%1")
- .arg(encodedArtist);
+ .tqarg(encodedArtist);
break;
case 3:
str = TQString("http://www.alltheweb.com/search?cat=web&q=%1")
- .arg(encodedArtist);
+ .tqarg(encodedArtist);
break;
case 4:
str = TQString("http://altavista.com/web/results?q=%1&kgs=0&kls=1&avkw=xytx")
- .arg(encodedArtist);
+ .tqarg(encodedArtist);
break;
case 5:
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);
+ .tqarg(encodedArtist);
break;
case 6:
str = TQString("http://www.google.com/search?q=%1")
- .arg(encodedArtist);
+ .tqarg(encodedArtist);
break;
case 7:
str = TQString("http://groups.google.com/groups?oi=djq&as_q=%1&num=20")
- .arg(encodedArtist);
+ .tqarg(encodedArtist);
break;
case 8:
str = TQString("http://www.hotbot.com/default.asp?prov=Inktomi&query=%1&ps=&loc=searchbox&tab=web")
- .arg(encodedArtist);
+ .tqarg(encodedArtist);
break;
case 9:
str = TQString("http://search.lycos.com/default.asp?lpv=1&loc=searchhp&tab=web&query=%1")
- .arg(encodedArtist);
+ .tqarg(encodedArtist);
break;
case 10:
str = TQString("http://search.dmoz.org/cgi-bin/search?search=%1")
- .arg(encodedArtist);
+ .tqarg(encodedArtist);
break;
case 11:
str = TQString("http://search.yahoo.com/bin/search?p=%1")
- .arg(encodedArtist);
+ .tqarg(encodedArtist);
break;
default:
@@ -1488,7 +1488,7 @@ void KSCD::information(int i)
/**
* Save state on session termination
*/
-bool KSCD::saveState(QSessionManager& /*sm*/)
+bool KSCD::saveState(TQSessionManager& /*sm*/)
{
writeSettings();
KConfig* config = KApplication::kApplication()->sessionConfig();
@@ -1506,7 +1506,7 @@ void KSCD::keyPressEvent(TQKeyEvent* e)
bool isNum;
int value = e->text().toInt(&isNum);
- if (e->key() == Qt::Key_F1)
+ if (e->key() == TQt::Key_F1)
{
kapp->invokeHelp();
}
@@ -1540,7 +1540,7 @@ void KSCD::jumpTracks()
TQString KSCD::currentTrackTitle()
{
int track = m_cd->track();
- return (track > -1) ? cddbInfo.trackInfoList[track-1].title : TQString::null;
+ return (track > -1) ? cddbInfo.trackInfoList[track-1].title : TQString();
}
TQString KSCD::currentAlbum()
@@ -1563,13 +1563,13 @@ TQStringList KSCD::trackList()
return tracks;
}
-void KSCD::populateSongList(TQString infoStatus)
+void KSCD::populateSongList(TQString infotqStatus)
{
// set the artist and title labels as well as the dock tooltip.
- if (!infoStatus.isEmpty())
- artistlabel->setText(infoStatus);
+ if (!infotqStatus.isEmpty())
+ artistlabel->setText(infotqStatus);
else
- artistlabel->setText(TQString("%1 - %2").arg(cddbInfo.artist, cddbInfo.title));
+ artistlabel->setText(TQString("%1 - %2").tqarg(cddbInfo.artist, cddbInfo.title));
songListCB->clear();
for (unsigned i = 0; i < cddbInfo.trackInfoList.count(); i++)