summaryrefslogtreecommitdiffstats
path: root/kscd/kcompactdisc.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/kcompactdisc.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/kcompactdisc.cpp')
-rw-r--r--kscd/kcompactdisc.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/kscd/kcompactdisc.cpp b/kscd/kcompactdisc.cpp
index e1d0b9db..c412a932 100644
--- a/kscd/kcompactdisc.cpp
+++ b/kscd/kcompactdisc.cpp
@@ -20,7 +20,7 @@
#include <dcopclient.h>
#include <dcopref.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <klocale.h>
#include <kprotocolmanager.h>
@@ -81,7 +81,7 @@ extern "C"
#endif
}
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include <fixx11h.h>
// Our internal definition of when we have no disc. Used to guard some
@@ -94,17 +94,17 @@ extern "C"
#define TRACK_VALID(track) \
((track) && (track <= m_tracks))
-const QString KCompactDisc::defaultDevice = DEFAULT_CD_DEVICE;
+const TQString KCompactDisc::defaultDevice = DEFAULT_CD_DEVICE;
const unsigned KCompactDisc::missingDisc = (unsigned)-1;
KCompactDisc::KCompactDisc(InformationMode infoMode) :
- m_device(QString::null),
+ m_device(TQString::null),
m_status(0),
m_previousStatus(123456),
m_discId(missingDisc),
m_previousDiscId(0),
- m_artist(QString::null),
- m_title(QString::null),
+ m_artist(TQString::null),
+ m_title(TQString::null),
m_track(0),
m_previousTrack(99999999),
m_infoMode(infoMode)
@@ -114,7 +114,7 @@ KCompactDisc::KCompactDisc(InformationMode infoMode) :
m_trackArtists.clear();
m_trackTitles.clear();
m_trackStartFrames.clear();
- connect(&timer, SIGNAL(timeout()), SLOT(timerExpired()));
+ connect(&timer, TQT_SIGNAL(timeout()), TQT_SLOT(timerExpired()));
}
KCompactDisc::~KCompactDisc()
@@ -126,7 +126,7 @@ KCompactDisc::~KCompactDisc()
wm_cd_destroy();
}
-const QString &KCompactDisc::device() const
+const TQString &KCompactDisc::device() const
{
return m_device;
}
@@ -143,9 +143,9 @@ unsigned KCompactDisc::discPosition() const
return cur_pos_abs * 1000 - FRAMES_TO_MS(m_trackStartFrames[0]);
}
-QString KCompactDisc::discStatus(int status)
+TQString KCompactDisc::discStatus(int status)
{
- QString message;
+ TQString message;
switch (status)
{
@@ -183,7 +183,7 @@ QString KCompactDisc::discStatus(int status)
if (status <= 0)
message = strerror(-status);
else
- message = QString::number(status);
+ message = TQString::number(status);
break;
}
return message;
@@ -232,15 +232,15 @@ void KCompactDisc::play(unsigned startTrack, unsigned startTrackPosition, unsign
wm_cd_play(TRACK_VALID(startTrack) ? startTrack : 1, startTrackPosition / 1000, TRACK_VALID(endTrack) ? endTrack : WM_ENDTRACK );
}
-QString KCompactDisc::urlToDevice(const QString& device)
+TQString KCompactDisc::urlToDevice(const TQString& device)
{
KURL deviceUrl(device);
if (deviceUrl.protocol() == "media" || deviceUrl.protocol() == "system")
{
kdDebug() << "Asking mediamanager for " << deviceUrl.fileName() << endl;
DCOPRef mediamanager("kded", "mediamanager");
- DCOPReply reply = mediamanager.call("properties(QString)", deviceUrl.fileName());
- QStringList properties = reply;
+ DCOPReply reply = mediamanager.call("properties(TQString)", deviceUrl.fileName());
+ TQStringList properties = reply;
if (!reply.isValid() || properties.count() < 6)
{
kdError() << "Invalid reply from mediamanager" << endl;
@@ -257,22 +257,22 @@ QString KCompactDisc::urlToDevice(const QString& device)
}
bool KCompactDisc::setDevice(
- const QString &device_,
+ const TQString &device_,
unsigned volume,
bool digitalPlayback,
- const QString &audioSystem,
- const QString &audioDevice)
+ const TQString &audioSystem,
+ const TQString &audioDevice)
{
timer.stop();
- QString device = urlToDevice(device_);
+ TQString device = urlToDevice(device_);
#if !defined(BUILD_CDDA)
digitalPlayback = false;
#endif
int status = wm_cd_init(
digitalPlayback ? WM_CDDA : WM_CDIN,
- QFile::encodeName(device),
+ TQFile::encodeName(device),
digitalPlayback ? audioSystem.ascii() : 0,
digitalPlayback ? audioDevice.ascii() : 0,
0);
@@ -280,14 +280,14 @@ bool KCompactDisc::setDevice(
kdDebug() << "Device change: "
<< (digitalPlayback ? "WM_CDDA, " : "WM_CDIN, ")
<< m_device << ", "
- << (digitalPlayback ? audioSystem : QString::null) << ", "
- << (digitalPlayback ? audioDevice : QString::null) << ", status: "
+ << (digitalPlayback ? audioSystem : TQString::null) << ", "
+ << (digitalPlayback ? audioDevice : TQString::null) << ", status: "
<< discStatus(status) << endl;
if (status < 0)
{
// Severe (OS-level) error.
- m_device = QString::null;
+ m_device = TQString::null;
}
else
{
@@ -301,7 +301,7 @@ bool KCompactDisc::setDevice(
timerExpired();
else
timer.start(1000, true);
- return m_device != QString::null;
+ return m_device != TQString::null;
}
void KCompactDisc::setVolume(unsigned volume)
@@ -315,15 +315,15 @@ void KCompactDisc::stop()
wm_cd_stop();
}
-const QString &KCompactDisc::trackArtist() const
+const TQString &KCompactDisc::trackArtist() const
{
return trackArtist(m_track);
}
-const QString &KCompactDisc::trackArtist(unsigned track) const
+const TQString &KCompactDisc::trackArtist(unsigned track) const
{
if (NO_DISC || !TRACK_VALID(track))
- return QString::null;
+ return TQString::null;
return m_trackArtists[track - 1];
}
@@ -349,15 +349,15 @@ unsigned KCompactDisc::tracks() const
return m_tracks;
}
-const QString &KCompactDisc::trackTitle() const
+const TQString &KCompactDisc::trackTitle() const
{
return trackTitle(m_track);
}
-const QString &KCompactDisc::trackTitle(unsigned track) const
+const TQString &KCompactDisc::trackTitle(unsigned track) const
{
if (NO_DISC || !TRACK_VALID(track))
- return QString::null;
+ return TQString::null;
return m_trackTitles[track - 1];
}
@@ -378,7 +378,7 @@ void KCompactDisc::timerExpired()
{
m_status = wm_cd_status();
- if (WM_CDS_NO_DISC(m_status) || (m_device == QString::null))
+ if (WM_CDS_NO_DISC(m_status) || (m_device == TQString::null))
{
if (m_previousStatus != m_status)
{
@@ -428,7 +428,7 @@ void KCompactDisc::timerExpired()
else
{
m_trackArtists.append(i18n("Unknown Artist"));
- m_trackTitles.append(i18n("Track %1").arg(QString::number(i).rightJustify(2, '0')));
+ m_trackTitles.append(i18n("Track %1").arg(TQString::number(i).rightJustify(2, '0')));
}
// FIXME: KDE4
// track.length = cd->trk[i - 1].length;