summaryrefslogtreecommitdiffstats
path: root/kscd
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-07 17:57:16 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-07 17:57:16 -0600
commit09a22d33a25cf6f9bf6ec2db5db4fc350cc7cea9 (patch)
tree55c5352241ba2c8967efb47330e577f18f84b985 /kscd
parent3111786e2c01633a9aed14eaea7523e086ecfc5a (diff)
downloadtdemultimedia-09a22d33a25cf6f9bf6ec2db5db4fc350cc7cea9.tar.gz
tdemultimedia-09a22d33a25cf6f9bf6ec2db5db4fc350cc7cea9.zip
Rename KComp to avoid conflicts with KDE4
Diffstat (limited to 'kscd')
-rw-r--r--kscd/kcompactdisc.cpp58
-rw-r--r--kscd/kcompactdisc.h12
-rw-r--r--kscd/kscd.cpp14
-rw-r--r--kscd/kscd.h4
4 files changed, 44 insertions, 44 deletions
diff --git a/kscd/kcompactdisc.cpp b/kscd/kcompactdisc.cpp
index ea87fce4..4e477055 100644
--- a/kscd/kcompactdisc.cpp
+++ b/kscd/kcompactdisc.cpp
@@ -1,5 +1,5 @@
/*
- * KCompactDisc - A CD drive interface for the KDE Project.
+ * TDECompactDisc - A CD drive interface for the KDE Project.
*
* Copyright (c) 2005 Shaheedur R. Haque <srhaque@iee.org>
*
@@ -94,10 +94,10 @@ extern "C"
#define TRACK_VALID(track) \
((track) && (track <= m_tracks))
-const TQString KCompactDisc::defaultDevice = DEFAULT_CD_DEVICE;
-const unsigned KCompactDisc::missingDisc = (unsigned)-1;
+const TQString TDECompactDisc::defaultDevice = DEFAULT_CD_DEVICE;
+const unsigned TDECompactDisc::missingDisc = (unsigned)-1;
-KCompactDisc::KCompactDisc(InformationMode infoMode) :
+TDECompactDisc::TDECompactDisc(InformationMode infoMode) :
m_device(TQString()),
m_status(0),
m_previousStatus(123456),
@@ -117,7 +117,7 @@ KCompactDisc::KCompactDisc(InformationMode infoMode) :
connect(&timer, TQT_SIGNAL(timeout()), TQT_SLOT(timerExpired()));
}
-KCompactDisc::~KCompactDisc()
+TDECompactDisc::~TDECompactDisc()
{
// Ensure nothing else starts happening.
timer.stop();
@@ -126,24 +126,24 @@ KCompactDisc::~KCompactDisc()
wm_cd_destroy();
}
-const TQString &KCompactDisc::device() const
+const TQString &TDECompactDisc::device() const
{
return m_device;
}
-unsigned KCompactDisc::discLength() const
+unsigned TDECompactDisc::discLength() const
{
if (NO_DISC || !m_tracks)
return 0;
return FRAMES_TO_MS(m_trackStartFrames[m_tracks+1] - m_trackStartFrames[0]);
}
-unsigned KCompactDisc::discPosition() const
+unsigned TDECompactDisc::discPosition() const
{
return cur_pos_abs * 1000 - FRAMES_TO_MS(m_trackStartFrames[0]);
}
-TQString KCompactDisc::discStatus(int status)
+TQString TDECompactDisc::discStatus(int status)
{
TQString message;
@@ -192,7 +192,7 @@ TQString KCompactDisc::discStatus(int status)
/**
* Do everything needed if the user requested to eject the disc.
*/
-void KCompactDisc::eject()
+void TDECompactDisc::eject()
{
if (m_status == WM_CDM_EJECTED)
{
@@ -206,33 +206,33 @@ void KCompactDisc::eject()
}
}
-unsigned KCompactDisc::track() const
+unsigned TDECompactDisc::track() const
{
return m_track;
}
-bool KCompactDisc::isPaused() const
+bool TDECompactDisc::isPaused() const
{
return (m_status == WM_CDM_PAUSED);
}
-bool KCompactDisc::isPlaying() const
+bool TDECompactDisc::isPlaying() const
{
return WM_CDS_DISC_PLAYING(m_status) && (m_status != WM_CDM_PAUSED) && (m_status != WM_CDM_TRACK_DONE);
}
-void KCompactDisc::pause()
+void TDECompactDisc::pause()
{
// wm_cd_pause "does the right thing" by flipping between pause and resume.
wm_cd_pause();
}
-void KCompactDisc::play(unsigned startTrack, unsigned startTrackPosition, unsigned endTrack)
+void TDECompactDisc::play(unsigned startTrack, unsigned startTrackPosition, unsigned endTrack)
{
wm_cd_play(TRACK_VALID(startTrack) ? startTrack : 1, startTrackPosition / 1000, TRACK_VALID(endTrack) ? endTrack : WM_ENDTRACK );
}
-TQString KCompactDisc::urlToDevice(const TQString& device)
+TQString TDECompactDisc::urlToDevice(const TQString& device)
{
KURL deviceUrl(device);
if (deviceUrl.protocol() == "media" || deviceUrl.protocol() == "system")
@@ -256,7 +256,7 @@ TQString KCompactDisc::urlToDevice(const TQString& device)
return device;
}
-bool KCompactDisc::setDevice(
+bool TDECompactDisc::setDevice(
const TQString &device_,
unsigned volume,
bool digitalPlayback,
@@ -304,64 +304,64 @@ bool KCompactDisc::setDevice(
return m_device != TQString();
}
-void KCompactDisc::setVolume(unsigned volume)
+void TDECompactDisc::setVolume(unsigned volume)
{
int status = wm_cd_volume(volume, WM_BALANCE_SYMMETRED);
kdDebug() << "Volume change: " << volume << ", status: " << discStatus(status) << endl;
}
-void KCompactDisc::stop()
+void TDECompactDisc::stop()
{
wm_cd_stop();
}
-const TQString &KCompactDisc::trackArtist() const
+const TQString &TDECompactDisc::trackArtist() const
{
return trackArtist(m_track);
}
-const TQString &KCompactDisc::trackArtist(unsigned track) const
+const TQString &TDECompactDisc::trackArtist(unsigned track) const
{
if (NO_DISC || !TRACK_VALID(track))
return TQString();
return m_trackArtists[track - 1];
}
-unsigned KCompactDisc::trackLength() const
+unsigned TDECompactDisc::trackLength() const
{
return trackLength(m_track);
}
-unsigned KCompactDisc::trackLength(unsigned track) const
+unsigned TDECompactDisc::trackLength(unsigned track) const
{
if (NO_DISC || !TRACK_VALID(track))
return 0;
return cd->trk[track - 1].length * 1000;
}
-unsigned KCompactDisc::trackPosition() const
+unsigned TDECompactDisc::trackPosition() const
{
return cur_pos_rel * 1000;
}
-unsigned KCompactDisc::tracks() const
+unsigned TDECompactDisc::tracks() const
{
return m_tracks;
}
-const TQString &KCompactDisc::trackTitle() const
+const TQString &TDECompactDisc::trackTitle() const
{
return trackTitle(m_track);
}
-const TQString &KCompactDisc::trackTitle(unsigned track) const
+const TQString &TDECompactDisc::trackTitle(unsigned track) const
{
if (NO_DISC || !TRACK_VALID(track))
return TQString();
return m_trackTitles[track - 1];
}
-bool KCompactDisc::isAudio(unsigned track) const
+bool TDECompactDisc::isAudio(unsigned track) const
{
if (NO_DISC || !TRACK_VALID(track))
return 0;
@@ -374,7 +374,7 @@ bool KCompactDisc::isAudio(unsigned track) const
* - Data discs not recognized as data discs.
*
*/
-void KCompactDisc::timerExpired()
+void TDECompactDisc::timerExpired()
{
m_status = wm_cd_status();
diff --git a/kscd/kcompactdisc.h b/kscd/kcompactdisc.h
index 5825126d..2e6830ca 100644
--- a/kscd/kcompactdisc.h
+++ b/kscd/kcompactdisc.h
@@ -1,5 +1,5 @@
/*
- * KCompactDisc - A CD drive interface for the KDE Project.
+ * TDECompactDisc - A CD drive interface for the KDE Project.
*
* Copyright (c) 2005 Shaheedur R. Haque <srhaque@iee.org>
*
@@ -26,7 +26,7 @@
#include <tqvaluelist.h>
/**
- * KCompactDisc - A CD drive interface for the KDE Project.
+ * TDECompactDisc - A CD drive interface for the KDE Project.
*
* The disc lifecycle is modelled by these signals:
*
@@ -43,7 +43,7 @@
* All times in this interface are in milliseconds. Valid track numbers are
* positive numbers; zero is not a valid track number.
*/
-class KCompactDisc :
+class TDECompactDisc :
public TQObject
{
Q_OBJECT
@@ -55,8 +55,8 @@ public:
Asynchronous // Block until cdrom and cddb infromation has been obtained
};
- KCompactDisc(InformationMode=Synchronous);
- virtual ~KCompactDisc();
+ TDECompactDisc(InformationMode=Synchronous);
+ virtual ~TDECompactDisc();
/**
* Open/close tray.
@@ -294,7 +294,7 @@ private:
unsigned m_previousTrack;
void checkDeviceStatus();
TQString discStatus(int status);
- class KCompactDiscPrivate *d;
+ class TDECompactDiscPrivate *d;
InformationMode m_infoMode;
private slots:
diff --git a/kscd/kscd.cpp b/kscd/kscd.cpp
index 24a12a68..02186e81 100644
--- a/kscd/kscd.cpp
+++ b/kscd/kscd.cpp
@@ -98,7 +98,7 @@ KSCD::KSCD( TQWidget *parent, const char *name )
updateTime(true),
m_dockWidget(0)
{
- m_cd = new KCompactDisc();
+ m_cd = new TDECompactDisc();
cddbInfo.clear(); // The first freedb revision is "0" //!!!!
random_current = random_list.begin();
@@ -379,7 +379,7 @@ void KSCD::setupPopups()
void KSCD::playClicked()
{
- if (m_cd->discId() == KCompactDisc::missingDisc)
+ if (m_cd->discId() == TDECompactDisc::missingDisc)
return;
kapp->processEvents();
@@ -801,7 +801,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(
- KCompactDisc::urlToDevice(Prefs::cdDevice()));
+ TDECompactDisc::urlToDevice(Prefs::cdDevice()));
KMessageBox::error(this, str, i18n("Error"));
}
} // setDevicePath()
@@ -956,7 +956,7 @@ int KSCD::prev_randomtrack()
void KSCD::discChanged(unsigned discId)
{
cddbInfo.clear();
- if (discId == KCompactDisc::missingDisc)
+ if (discId == TDECompactDisc::missingDisc)
{
statuslabel->setText(i18n("No disc"));
}
@@ -1018,7 +1018,7 @@ void KSCD::discChanged(unsigned discId)
void KSCD::discStopped()
{
- if (Prefs::ejectOnFinish() && !stoppedByUser && (m_cd->discId() != KCompactDisc::missingDisc))
+ if (Prefs::ejectOnFinish() && !stoppedByUser && (m_cd->discId() != TDECompactDisc::missingDisc))
{
ejectClicked();
}
@@ -1174,7 +1174,7 @@ void KSCD::CDDialogDone()
void KSCD::lookupCDDB()
{
- if (m_cd->discId() == KCompactDisc::missingDisc)
+ if (m_cd->discId() == TDECompactDisc::missingDisc)
return;
kdDebug(67000) << "lookupCDDB() called" << endl;
@@ -1319,7 +1319,7 @@ int KSCD::getStatus()
return 2;
else if (m_cd->isPaused())
return 4;
- else if (m_cd->discId() != KCompactDisc::missingDisc)
+ else if (m_cd->discId() != TDECompactDisc::missingDisc)
return 5;
else
return 6;
diff --git a/kscd/kscd.h b/kscd/kscd.h
index 9d33b696..f0689368 100644
--- a/kscd/kscd.h
+++ b/kscd/kscd.h
@@ -28,7 +28,7 @@
#include "bwlednum.h"
// CD support.
-class KCompactDisc;
+class TDECompactDisc;
// CDDB support via libkcddb
#include <libkcddb/cddb.h>
@@ -188,7 +188,7 @@ private:
BW_LED_Number *trackTimeLED[6];
- KCompactDisc *m_cd;
+ TDECompactDisc *m_cd;
TQTimer titlelabeltimer;
TQTimer queryledtimer;
TQTimer cycletimer;