summaryrefslogtreecommitdiffstats
path: root/kicker-applets/mediacontrol/mpdInterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kicker-applets/mediacontrol/mpdInterface.cpp')
-rw-r--r--kicker-applets/mediacontrol/mpdInterface.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/kicker-applets/mediacontrol/mpdInterface.cpp b/kicker-applets/mediacontrol/mpdInterface.cpp
index ea350d2..98ba0cb 100644
--- a/kicker-applets/mediacontrol/mpdInterface.cpp
+++ b/kicker-applets/mediacontrol/mpdInterface.cpp
@@ -118,7 +118,7 @@ void MpdInterface::connected()
{
//kdDebug(90200) << "Connected ok\n";
emit playerStarted();
- emit playingStatusChanged(playingtqStatus());
+ emit playingStatusChanged(playingStatus());
}
else
{
@@ -137,10 +137,10 @@ void MpdInterface::connectionError(int e)
switch (e)
{
case TQSocket::ErrConnectionRefused:
- message=i18n("Connection refused to %1:%2.\nIs mpd running?").tqarg(hostname).tqarg(port);
+ message=i18n("Connection refused to %1:%2.\nIs mpd running?").arg(hostname).arg(port);
break;
case TQSocket::ErrHostNotFound:
- message=i18n("Host '%1' not found.").tqarg(hostname);
+ message=i18n("Host '%1' not found.").arg(hostname);
break;
case TQSocket::ErrSocketRead:
message=i18n("Error reading socket.");
@@ -265,7 +265,7 @@ void MpdInterface::updateSlider()
}
else if (time_re.search(res)>=0)
{
- TQStringList timeinfo=time_re.tqcapturedTexts();
+ TQStringList timeinfo=time_re.capturedTexts();
timeinfo.pop_front();
int elapsed_seconds=timeinfo.first().toInt();
timeinfo.pop_front();
@@ -298,7 +298,7 @@ void MpdInterface::jumpToTime(int sec)
{
if (songid_re.search(res)>=0)
{
- TQStringList songidinfo=songid_re.tqcapturedTexts();
+ TQStringList songidinfo=songid_re.capturedTexts();
songidinfo.pop_front();
songid=songidinfo.first().toInt();
}
@@ -306,7 +306,7 @@ void MpdInterface::jumpToTime(int sec)
if (songid>-1)
{
- if (dispatch(TQString("seekid %1 %2\n").tqarg(songid).tqarg(sec).latin1()))
+ if (dispatch(TQString("seekid %1 %2\n").arg(songid).arg(sec).latin1()))
{
fetchOk(); // unlocks
}
@@ -316,7 +316,7 @@ void MpdInterface::jumpToTime(int sec)
void MpdInterface::playpause()
{
reconnect();
- if (playingtqStatus()==Stopped ? dispatch("play\n") : dispatch("pause\n"))
+ if (playingStatus()==Stopped ? dispatch("play\n") : dispatch("pause\n"))
{
fetchOk();
}
@@ -355,7 +355,7 @@ void MpdInterface::changeVolume(int delta)
{
if (volume_re.search(res)>=0)
{
- TQStringList info=volume_re.tqcapturedTexts();
+ TQStringList info=volume_re.capturedTexts();
info.pop_front();
volume=info.first().toInt();
}
@@ -366,7 +366,7 @@ void MpdInterface::changeVolume(int delta)
volume+=delta;
if (volume<0) volume=0;
if (volume>100) volume=100;
- if (dispatch(TQString("setvol %1\n").tqarg(volume).latin1()))
+ if (dispatch(TQString("setvol %1\n").arg(volume).latin1()))
{
fetchOk();
}
@@ -411,7 +411,7 @@ void MpdInterface::dropEvent(TQDropEvent* event)
TQRegExp id_re("Id: (.+)");
if (file.isEmpty() && file_re.search(res)>=0)
{
- TQStringList info=file_re.tqcapturedTexts();
+ TQStringList info=file_re.capturedTexts();
info.pop_front();
// if the dropped file ends with the same name, record it
if (list.front().path().endsWith(info.first()))
@@ -422,7 +422,7 @@ void MpdInterface::dropEvent(TQDropEvent* event)
else if (!file.isEmpty() && id_re.search(res)>=0)
{
// when we have the file, pick up the id (file scomes first)
- TQStringList info=id_re.tqcapturedTexts();
+ TQStringList info=id_re.capturedTexts();
info.pop_front();
songid=info.first().toInt();
fetchOk(); // skip to the end
@@ -433,7 +433,7 @@ void MpdInterface::dropEvent(TQDropEvent* event)
// found song, so lets play it
if (songid>-1)
{
- if (dispatch((TQString("playid %1\n").tqarg(songid)).latin1()))
+ if (dispatch((TQString("playid %1\n").arg(songid)).latin1()))
{
if (fetchOk()) list.pop_front();
return;
@@ -483,7 +483,7 @@ const TQString MpdInterface::getTrackTitle() const
TQRegExp songid_re("songid: (\\d+)");
if (songid_re.search(res)>=0)
{
- TQStringList songidinfo=songid_re.tqcapturedTexts();
+ TQStringList songidinfo=songid_re.capturedTexts();
songidinfo.pop_front();
songid=songidinfo.first().toInt();
}
@@ -491,7 +491,7 @@ const TQString MpdInterface::getTrackTitle() const
if (!(songid>-1)) return result;
- if (!dispatch(TQString("playlistid %1\n").tqarg(songid).latin1()))
+ if (!dispatch(TQString("playlistid %1\n").arg(songid).latin1()))
return result;
TQString artist;
@@ -508,31 +508,31 @@ const TQString MpdInterface::getTrackTitle() const
TQRegExp file_re("file: (.+)");
if (artist_re.search(res)>=0)
{
- TQStringList info=artist_re.tqcapturedTexts();
+ TQStringList info=artist_re.capturedTexts();
info.pop_front();
artist=info.first();
}
else if (album_re.search(res)>=0)
{
- TQStringList info=album_re.tqcapturedTexts();
+ TQStringList info=album_re.capturedTexts();
info.pop_front();
album=info.first();
}
else if (title_re.search(res)>=0)
{
- TQStringList info=title_re.tqcapturedTexts();
+ TQStringList info=title_re.capturedTexts();
info.pop_front();
title=info.first();
}
else if (track_re.search(res)>=0)
{
- TQStringList info=track_re.tqcapturedTexts();
+ TQStringList info=track_re.capturedTexts();
info.pop_front();
track=info.first();
}
else if (file_re.search(res)>=0)
{
- TQStringList info=file_re.tqcapturedTexts();
+ TQStringList info=file_re.capturedTexts();
info.pop_front();
file=info.first();
}
@@ -559,15 +559,15 @@ const TQString MpdInterface::getTrackTitle() const
else
return album;
}
- return i18n("No tags: %1").tqarg(file);
+ return i18n("No tags: %1").arg(file);
}
-int MpdInterface::playingtqStatus()
+int MpdInterface::playingStatus()
{
//kdDebug(90200) << "looking up playing status\n";
if (!dispatch("status\n")) return Stopped;
- PlayingtqStatus status=Stopped;
+ PlayingStatus status=Stopped;
TQString res;
while(fetchLine(res))
{