diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-01 03:43:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-01 03:43:07 +0000 |
commit | 70b9eea2ba01c3691497f49e4c45cb070c16193c (patch) | |
tree | 9a6df61aa247a27275aad9c5245e419e89c2c640 /kradio3/src/soundstreamclient_interfaces.cpp | |
parent | 998c1384ace4ae4655997c181fa33242148cd0a4 (diff) | |
download | tderadio-70b9eea2ba01c3691497f49e4c45cb070c16193c.tar.gz tderadio-70b9eea2ba01c3691497f49e4c45cb070c16193c.zip |
TQt4 port kradio
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kradio@1238952 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kradio3/src/soundstreamclient_interfaces.cpp')
-rw-r--r-- | kradio3/src/soundstreamclient_interfaces.cpp | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/kradio3/src/soundstreamclient_interfaces.cpp b/kradio3/src/soundstreamclient_interfaces.cpp index c030ec4..943276c 100644 --- a/kradio3/src/soundstreamclient_interfaces.cpp +++ b/kradio3/src/soundstreamclient_interfaces.cpp @@ -27,7 +27,7 @@ const char *dev_urandom = "/dev/urandom"; void ISoundStreamServer::noticeConnectedI(cmplInterface *i, bool pointer_valid) { - for (QPtrListIterator<cmplInterface> it(iConnections); it.current(); ++it) { + for (TQPtrListIterator<cmplInterface> it(iConnections); it.current(); ++it) { it.current()->noticeConnectedSoundClient(i, pointer_valid); cmplInterface *x = it.current(); if (x != i && pointer_valid) @@ -37,7 +37,7 @@ void ISoundStreamServer::noticeConnectedI(cmplInterface *i, bool pointer_valid) void ISoundStreamServer::noticeDisconnectedI(cmplInterface *i, bool pointer_valid) { - for (QPtrListIterator<cmplInterface> it(iConnections); it.current(); ++it) { + for (TQPtrListIterator<cmplInterface> it(iConnections); it.current(); ++it) { it.current()->noticeDisconnectedSoundClient(i, pointer_valid); cmplInterface *x = it.current(); if (x != i && pointer_valid) @@ -47,20 +47,20 @@ void ISoundStreamServer::noticeDisconnectedI(cmplInterface *i, bool pointer_vali -QPtrList<ISoundStreamClient> ISoundStreamServer::getPlaybackMixers() const +TQPtrList<ISoundStreamClient> ISoundStreamServer::getPlaybackMixers() const { - QPtrList<ISoundStreamClient> tmp; - for (QPtrListIterator<ISoundStreamClient> it(iConnections); it.current(); ++it) { + TQPtrList<ISoundStreamClient> tmp; + for (TQPtrListIterator<ISoundStreamClient> it(iConnections); it.current(); ++it) { if (it.current()->supportsPlayback()) tmp.append(it.current()); } return tmp; } -QPtrList<ISoundStreamClient> ISoundStreamServer::getCaptureMixers() const +TQPtrList<ISoundStreamClient> ISoundStreamServer::getCaptureMixers() const { - QPtrList<ISoundStreamClient> tmp; - for (QPtrListIterator<ISoundStreamClient> it(iConnections); it.current(); ++it) { + TQPtrList<ISoundStreamClient> tmp; + for (TQPtrListIterator<ISoundStreamClient> it(iConnections); it.current(); ++it) { if (it.current()->supportsCapture()) tmp.append(it.current()); } @@ -196,18 +196,18 @@ IF_IMPL_SENDER_FINE ( ISoundStreamServer, queryIsMuted, (SoundStreamID id, bool isMuted(id, m) ); -IF_IMPL_SENDER_FINE ( ISoundStreamServer, notifyPlaybackChannelsChanged, (const QString &client_id, const QStringList &map), +IF_IMPL_SENDER_FINE ( ISoundStreamServer, notifyPlaybackChannelsChanged, (const TQString &client_id, const TQStringList &map), noticePlaybackChannelsChanged(client_id, map) ); -IF_IMPL_SENDER_FINE ( ISoundStreamServer, notifyCaptureChannelsChanged, (const QString &client_id, const QStringList &map), +IF_IMPL_SENDER_FINE ( ISoundStreamServer, notifyCaptureChannelsChanged, (const TQString &client_id, const TQStringList &map), noticeCaptureChannelsChanged (client_id, map) ); -IF_IMPL_SENDER_FINE ( ISoundStreamServer, querySoundStreamDescription, (SoundStreamID id, QString &descr), +IF_IMPL_SENDER_FINE ( ISoundStreamServer, querySoundStreamDescription, (SoundStreamID id, TQString &descr), getSoundStreamDescription(id, descr) ); IF_IMPL_SENDER_FINE ( ISoundStreamServer, querySoundStreamRadioStation, (SoundStreamID id, const RadioStation *&rs), getSoundStreamRadioStation(id, rs) ); -IF_IMPL_SENDER_FINE ( ISoundStreamServer, queryEnumerateSoundStreams, (QMap<QString, SoundStreamID> &list), +IF_IMPL_SENDER_FINE ( ISoundStreamServer, queryEnumerateSoundStreams, (TQMap<TQString, SoundStreamID> &list), enumerateSoundStreams(list) ); @@ -228,26 +228,26 @@ ISoundStreamClient::~ISoundStreamClient() { } -QString ISoundStreamClient::createNewSoundStreamClientID() +TQString ISoundStreamClient::createNewSoundStreamClientID() { const int buffersize = 32; unsigned char buffer[buffersize]; - QString stime, srandom = QString::null; + TQString stime, srandom = TQString(); stime.setNum(time(NULL)); int fd = open (dev_urandom, O_RDONLY); read(fd, buffer, buffersize); close(fd); for (int i = 0; i < buffersize; ++i) - srandom += QString().sprintf("%02X", (unsigned int)buffer[i]); + srandom += TQString().sprintf("%02X", (unsigned int)buffer[i]); return stime + srandom; } -void ISoundStreamClient::setSoundStreamClientID(const QString &s) +void ISoundStreamClient::setSoundStreamClientID(const TQString &s) { ISoundStreamServer *server = getSoundStreamServer(); if (server) @@ -258,7 +258,7 @@ void ISoundStreamClient::setSoundStreamClientID(const QString &s) } -const QString &ISoundStreamClient::getSoundStreamClientID() const +const TQString &ISoundStreamClient::getSoundStreamClientID() const { return m_SoundStreamClientID; } @@ -304,30 +304,30 @@ void ISoundStreamClient::closeSoundStream(SoundStreamID id, bool notify) } -static const QStringList emptyList; +static const TQStringList emptyList; -const QStringList &ISoundStreamClient::getPlaybackChannels() const +const TQStringList &ISoundStreamClient::getPlaybackChannels() const { return emptyList; } -const QStringList &ISoundStreamClient::getCaptureChannels() const +const TQStringList &ISoundStreamClient::getCaptureChannels() const { return emptyList; } -static const QMap<QString, ISoundStreamClient *> emptyClientMap; -QMap<QString, ISoundStreamClient *> ISoundStreamClient::getPlaybackClients() const +static const TQMap<TQString, ISoundStreamClient *> emptyClientMap; +TQMap<TQString, ISoundStreamClient *> ISoundStreamClient::getPlaybackClients() const { return iConnections.count() ? iConnections.getFirst()->getPlaybackClients() : emptyClientMap; } -QMap<QString, ISoundStreamClient *> ISoundStreamServer::getPlaybackClients() const +TQMap<TQString, ISoundStreamClient *> ISoundStreamServer::getPlaybackClients() const { - QMap<QString, ISoundStreamClient *> map; - for (QPtrListIterator<ISoundStreamClient> it(ISoundStreamServer::iConnections); it.current(); ++it) { + TQMap<TQString, ISoundStreamClient *> map; + for (TQPtrListIterator<ISoundStreamClient> it(ISoundStreamServer::iConnections); it.current(); ++it) { if (it.current()->supportsPlayback()) map.insert(it.current()->getSoundStreamClientID(), it.current()); } @@ -336,16 +336,16 @@ QMap<QString, ISoundStreamClient *> ISoundStreamServer::getPlaybackClients() con -static const QMap<QString, QString> emptyClientDescrMap; -QMap<QString, QString> ISoundStreamClient::getPlaybackClientDescriptions() const +static const TQMap<TQString, TQString> emptyClientDescrMap; +TQMap<TQString, TQString> ISoundStreamClient::getPlaybackClientDescriptions() const { return iConnections.count() ? iConnections.getFirst()->getPlaybackClientDescriptions() : emptyClientDescrMap; } -QMap<QString, QString> ISoundStreamServer::getPlaybackClientDescriptions() const +TQMap<TQString, TQString> ISoundStreamServer::getPlaybackClientDescriptions() const { - QMap<QString, QString> map; - for (QPtrListIterator<ISoundStreamClient> it(ISoundStreamServer::iConnections); it.current(); ++it) { + TQMap<TQString, TQString> map; + for (TQPtrListIterator<ISoundStreamClient> it(ISoundStreamServer::iConnections); it.current(); ++it) { if (it.current()->supportsPlayback()) map.insert(it.current()->getSoundStreamClientID(), it.current()->getSoundStreamClientDescription()); } @@ -355,16 +355,16 @@ QMap<QString, QString> ISoundStreamServer::getPlaybackClientDescriptions() const -QMap<QString, ISoundStreamClient *> ISoundStreamClient::getCaptureClients() const +TQMap<TQString, ISoundStreamClient *> ISoundStreamClient::getCaptureClients() const { return iConnections.count() ? iConnections.getFirst()->getCaptureClients() : emptyClientMap; } -QMap<QString, ISoundStreamClient *> ISoundStreamServer::getCaptureClients() const +TQMap<TQString, ISoundStreamClient *> ISoundStreamServer::getCaptureClients() const { - QMap<QString, ISoundStreamClient *> map; - for (QPtrListIterator<ISoundStreamClient> it(ISoundStreamServer::iConnections); it.current(); ++it) { + TQMap<TQString, ISoundStreamClient *> map; + for (TQPtrListIterator<ISoundStreamClient> it(ISoundStreamServer::iConnections); it.current(); ++it) { if (it.current()->supportsCapture()) map.insert(it.current()->getSoundStreamClientID(), it.current()); } @@ -374,15 +374,15 @@ QMap<QString, ISoundStreamClient *> ISoundStreamServer::getCaptureClients() cons -QMap<QString, QString> ISoundStreamClient::getCaptureClientDescriptions() const +TQMap<TQString, TQString> ISoundStreamClient::getCaptureClientDescriptions() const { return iConnections.count() ? iConnections.getFirst()->getCaptureClientDescriptions() : emptyClientDescrMap; } -QMap<QString, QString> ISoundStreamServer::getCaptureClientDescriptions() const +TQMap<TQString, TQString> ISoundStreamServer::getCaptureClientDescriptions() const { - QMap<QString, QString> map; - for (QPtrListIterator<ISoundStreamClient> it(ISoundStreamServer::iConnections); it.current(); ++it) { + TQMap<TQString, TQString> map; + for (TQPtrListIterator<ISoundStreamClient> it(ISoundStreamServer::iConnections); it.current(); ++it) { if (it.current()->supportsCapture()) map.insert(it.current()->getSoundStreamClientID(), it.current()->getSoundStreamClientDescription()); } @@ -393,15 +393,15 @@ QMap<QString, QString> ISoundStreamServer::getCaptureClientDescriptions() const -ISoundStreamClient *ISoundStreamClient::getSoundStreamClientWithID(const QString &search_id) const +ISoundStreamClient *ISoundStreamClient::getSoundStreamClientWithID(const TQString &search_id) const { return iConnections.count() ? iConnections.getFirst()->getSoundStreamClientWithID(search_id) : NULL; } -ISoundStreamClient *ISoundStreamServer::getSoundStreamClientWithID(const QString &search_id) const +ISoundStreamClient *ISoundStreamServer::getSoundStreamClientWithID(const TQString &search_id) const { - for (QPtrListIterator<ISoundStreamClient> it(ISoundStreamServer::iConnections); it.current(); ++it) { - const QString &id = it.current()->getSoundStreamClientID(); + for (TQPtrListIterator<ISoundStreamClient> it(ISoundStreamServer::iConnections); it.current(); ++it) { + const TQString &id = it.current()->getSoundStreamClientID(); if (id == search_id) return it.current(); } @@ -416,11 +416,11 @@ void ISoundStreamClient::noticeDisconnectedSoundClient(thisInterface */*i*/, boo { } -static const QPtrList<ISoundStreamClient> emptyClientList; -IF_IMPL_QUERY ( QPtrList<ISoundStreamClient> ISoundStreamClient::queryPlaybackMixers(), +static const TQPtrList<ISoundStreamClient> emptyClientList; +IF_IMPL_TQUERY ( TQPtrList<ISoundStreamClient> ISoundStreamClient::queryPlaybackMixers(), getPlaybackMixers(), emptyClientList ); -IF_IMPL_QUERY ( QPtrList<ISoundStreamClient> ISoundStreamClient::queryCaptureMixers(), +IF_IMPL_TQUERY ( TQPtrList<ISoundStreamClient> ISoundStreamClient::queryCaptureMixers(), getPlaybackMixers(), emptyClientList ); |