summaryrefslogtreecommitdiffstats
path: root/kttsd/players
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-17 22:17:08 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-17 22:17:08 +0000
commitf138d74fe16092003b06f5bde9663841929cde7f (patch)
treee9c497a0e59bc7d34264ac9404740d2ea76f3de4 /kttsd/players
parent3a3c4b256baee79bdcfe72c5e01b9ded9b525900 (diff)
downloadtdeaccessibility-f138d74fe16092003b06f5bde9663841929cde7f.tar.gz
tdeaccessibility-f138d74fe16092003b06f5bde9663841929cde7f.zip
TQt4 port kdeaccessibility
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaccessibility@1237325 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kttsd/players')
-rw-r--r--kttsd/players/akodeplayer/akodeplayer.cpp4
-rw-r--r--kttsd/players/akodeplayer/akodeplayer.h3
-rw-r--r--kttsd/players/alsaplayer/alsaplayer.cpp18
-rw-r--r--kttsd/players/alsaplayer/alsaplayer.h7
-rw-r--r--kttsd/players/artsplayer/artsplayer.cpp6
-rw-r--r--kttsd/players/artsplayer/artsplayer.h3
-rw-r--r--kttsd/players/gstplayer/gstreamerplayer.cpp24
-rw-r--r--kttsd/players/gstplayer/gstreamerplayer.h3
8 files changed, 36 insertions, 32 deletions
diff --git a/kttsd/players/akodeplayer/akodeplayer.cpp b/kttsd/players/akodeplayer/akodeplayer.cpp
index 13f6cf3..a0d38bb 100644
--- a/kttsd/players/akodeplayer/akodeplayer.cpp
+++ b/kttsd/players/akodeplayer/akodeplayer.cpp
@@ -29,8 +29,8 @@ using namespace aKode;
// public methods
////////////////////////////////////////////////////////////////////////////////
-aKodePlayer::aKodePlayer(TQObject* parent, const char* name, const TQStringList& args) :
- Player(parent, name, args),
+aKodePlayer::aKodePlayer(TQObject* tqparent, const char* name, const TQStringList& args) :
+ Player(tqparent, name, args),
m_player(0)
{}
diff --git a/kttsd/players/akodeplayer/akodeplayer.h b/kttsd/players/akodeplayer/akodeplayer.h
index c003d13..13fe8de 100644
--- a/kttsd/players/akodeplayer/akodeplayer.h
+++ b/kttsd/players/akodeplayer/akodeplayer.h
@@ -31,9 +31,10 @@ namespace aKode {
class KDE_EXPORT aKodePlayer : public Player
{
Q_OBJECT
+ TQ_OBJECT
public:
- aKodePlayer(TQObject* parent = 0, const char* name = 0, const TQStringList& args=TQStringList());
+ aKodePlayer(TQObject* tqparent = 0, const char* name = 0, const TQStringList& args=TQStringList());
virtual ~aKodePlayer();
// virtual void play(const FileHandle &file = FileHandle::null());
diff --git a/kttsd/players/alsaplayer/alsaplayer.cpp b/kttsd/players/alsaplayer/alsaplayer.cpp
index 72a242a..5c435d8 100644
--- a/kttsd/players/alsaplayer/alsaplayer.cpp
+++ b/kttsd/players/alsaplayer/alsaplayer.cpp
@@ -38,7 +38,7 @@
# endif
#endif
-// Qt includes.
+// TQt includes.
#include <tqdir.h>
#include <tqapplication.h>
#include <tqcstring.h>
@@ -128,8 +128,8 @@ TQString AlsaPlayer::timestamp() const
// public methods
////////////////////////////////////////////////////////////////////////////////
-AlsaPlayer::AlsaPlayer(TQObject* parent, const char* name, const TQStringList& args) :
- Player(parent, name, args),
+AlsaPlayer::AlsaPlayer(TQObject* tqparent, const char* name, const TQStringList& args) :
+ Player(tqparent, name, args),
m_currentVolume(1.0),
m_pcmName("default"),
m_defPeriodSize(128),
@@ -432,10 +432,10 @@ TQStringList AlsaPlayer::getPluginList( const TQCString& /*classname*/ )
infoName += snd_pcm_info_get_name(pcminfo);
infoName += ")";
if (0 == devCnt) {
- TQString pcmName = TQString("default:%1").arg(card);
+ TQString pcmName = TQString("default:%1").tqarg(card);
result.append(pcmName + infoName);
}
- TQString pcmName = TQString("plughw:%1,%2").arg(card).arg(device);
+ TQString pcmName = TQString("plughw:%1,%2").tqarg(card).tqarg(device);
result.append(pcmName + infoName);
}
snd_ctl_close(handle);
@@ -1001,7 +1001,7 @@ void AlsaPlayer::xrun()
stream == SND_PCM_STREAM_PLAYBACK ? "underrun" : "overrun",
diff.tv_sec * 1000 + diff.tv_usec / 1000.0);
if (m_debugLevel >= 2) {
- DBG("Status:");
+ DBG("tqStatus:");
snd_pcm_status_dump(status, log);
}
if ((res = snd_pcm_prepare(handle))<0) {
@@ -1011,7 +1011,7 @@ void AlsaPlayer::xrun()
return; /* ok, data should be accepted again */
} if (SND_PCM_STATE_DRAINING == snd_pcm_status_get_state(status)) {
if (m_debugLevel >= 2) {
- DBG("Status(DRAINING):");
+ DBG("tqStatus(DRAINING):");
snd_pcm_status_dump(status, log);
}
if (stream == SND_PCM_STREAM_CAPTURE) {
@@ -1024,7 +1024,7 @@ void AlsaPlayer::xrun()
}
}
if (m_debugLevel >= 2) {
- DBG("Status(R/W):");
+ DBG("tqStatus(R/W):");
snd_pcm_status_dump(status, log);
}
ERR("read/write error, state = %s", snd_pcm_state_name(snd_pcm_status_get_state(status)));
@@ -1496,7 +1496,7 @@ void AlsaPlayer::header(int /*rtype*/, const char* /*name*/)
else if (hwdata.channels == 2)
channels = "Stereo";
else
- channels = TQString("Channels %1").arg(hwdata.channels);
+ channels = TQString("Channels %1").tqarg(hwdata.channels);
DBG("Format: %s, Rate %d Hz, %s",
snd_pcm_format_description(hwdata.format),
hwdata.rate,
diff --git a/kttsd/players/alsaplayer/alsaplayer.h b/kttsd/players/alsaplayer/alsaplayer.h
index d307060..7dedc87 100644
--- a/kttsd/players/alsaplayer/alsaplayer.h
+++ b/kttsd/players/alsaplayer/alsaplayer.h
@@ -28,7 +28,7 @@
#include <alsa/asoundlib.h>
#include <sys/poll.h>
-// Qt includes.
+// TQt includes.
#include <tqstring.h>
#include <tqobject.h>
#include <tqthread.h>
@@ -63,12 +63,13 @@ static snd_pcm_sframes_t (*writei_func)(snd_pcm_t *handle, const void *buffer, s
static snd_pcm_sframes_t (*readn_func)(snd_pcm_t *handle, void **bufs, snd_pcm_uframes_t size);
static snd_pcm_sframes_t (*writen_func)(snd_pcm_t *handle, void **bufs, snd_pcm_uframes_t size);
-class KDE_EXPORT AlsaPlayer : public Player, QThread
+class KDE_EXPORT AlsaPlayer : public Player, TQThread
{
Q_OBJECT
+ TQ_OBJECT
public:
- AlsaPlayer(TQObject* parent = 0, const char* name = 0, const TQStringList& args=TQStringList());
+ AlsaPlayer(TQObject* tqparent = 0, const char* name = 0, const TQStringList& args=TQStringList());
~AlsaPlayer();
virtual void startPlay(const TQString& file);
diff --git a/kttsd/players/artsplayer/artsplayer.cpp b/kttsd/players/artsplayer/artsplayer.cpp
index 9e6e771..63652de 100644
--- a/kttsd/players/artsplayer/artsplayer.cpp
+++ b/kttsd/players/artsplayer/artsplayer.cpp
@@ -40,8 +40,8 @@
// public methods
////////////////////////////////////////////////////////////////////////////////
-ArtsPlayer::ArtsPlayer(TQObject* parent, const char* name, const TQStringList& args) :
- Player(parent, name, args),
+ArtsPlayer::ArtsPlayer(TQObject* tqparent, const char* name, const TQStringList& args) :
+ Player(tqparent, name, args),
m_dispatcher(0),
m_server(0),
m_factory(0),
@@ -234,7 +234,7 @@ void ArtsPlayer::setupArtsObjects()
if(m_amanPlay->isNull() || !m_factory) {
KMessageBox::error(0, i18n("Connecting/starting aRts soundserver failed. "
"Make sure that artsd is configured properly."));
- qApp->exit(1);
+ tqApp->exit(1);
}
m_amanPlay->setTitle(i18n("kttsd"));
diff --git a/kttsd/players/artsplayer/artsplayer.h b/kttsd/players/artsplayer/artsplayer.h
index 879dccc..307999a 100644
--- a/kttsd/players/artsplayer/artsplayer.h
+++ b/kttsd/players/artsplayer/artsplayer.h
@@ -43,9 +43,10 @@ namespace KDE {
class KDE_EXPORT ArtsPlayer : public Player
{
Q_OBJECT
+ TQ_OBJECT
public:
- ArtsPlayer(TQObject* parent = 0, const char* name = 0, const TQStringList& args=TQStringList());
+ ArtsPlayer(TQObject* tqparent = 0, const char* name = 0, const TQStringList& args=TQStringList());
~ArtsPlayer();
// virtual void play(const FileHandle &file = FileHandle::null());
diff --git a/kttsd/players/gstplayer/gstreamerplayer.cpp b/kttsd/players/gstplayer/gstreamerplayer.cpp
index 4d56556..ae06557 100644
--- a/kttsd/players/gstplayer/gstreamerplayer.cpp
+++ b/kttsd/players/gstplayer/gstreamerplayer.cpp
@@ -12,7 +12,7 @@
* *
***************************************************************************/
-// Qt includes.
+// TQt includes.
#include <tqfile.h>
// KDE includes.
@@ -29,8 +29,8 @@
// public methods
////////////////////////////////////////////////////////////////////////////////
-GStreamerPlayer::GStreamerPlayer(TQObject* parent, const char* name, const TQStringList& args) :
- Player(parent, name, args),
+GStreamerPlayer::GStreamerPlayer(TQObject* tqparent, const char* name, const TQStringList& args) :
+ Player(tqparent, name, args),
m_initialized(false),
m_pipeline(0),
m_source(0),
@@ -94,18 +94,18 @@ bool GStreamerPlayer::paused() const
int GStreamerPlayer::totalTime() const
{
- return time(GST_QUERY_TOTAL) / GST_SECOND;
+ return time(GST_TQUERY_TOTAL) / GST_SECOND;
}
int GStreamerPlayer::currentTime() const
{
- return time(GST_QUERY_POSITION) / GST_SECOND;
+ return time(GST_TQUERY_POSITION) / GST_SECOND;
}
int GStreamerPlayer::position() const
{
- long long total = time(GST_QUERY_TOTAL);
- long long current = time(GST_QUERY_POSITION);
+ long long total = time(GST_TQUERY_TOTAL);
+ long long current = time(GST_TQUERY_POSITION);
return total > 0 ? int((double(current) / double(total)) * double(1000) + 0.5) : 0;
}
@@ -117,7 +117,7 @@ void GStreamerPlayer::seek(int seekTime)
void GStreamerPlayer::seekPosition(int position)
{
- long long total = time(GST_QUERY_TOTAL);
+ long long total = time(GST_TQUERY_TOTAL);
if(total > 0)
seek(int(double(position) / double(1000) * double(totalTime()) + 0.5));
}
@@ -189,12 +189,12 @@ bool GStreamerPlayer::requireVersion(uint major, uint minor, uint micro)
}
gst_version(&gmajor, &gminor, &gmicro);
- // kdDebug() << TQString("GStreamerPlayer::requireVersion: You have gstreamer %1.%2.%3 installed.").arg(gmajor).arg(gminor).arg(gmicro) << endl;
+ // kdDebug() << TQString("GStreamerPlayer::requireVersion: You have gstreamer %1.%2.%3 installed.").tqarg(gmajor).tqarg(gminor).tqarg(gmicro) << endl;
if (gmajor > major) return true;
if (gminor > minor) return true;
if (gmicro >= micro) return true;
- kdDebug() << TQString("GStreamerPlayer::requireVersion: You have gstreamer %1.%2.%3 installed.").arg(gmajor).arg(gminor).arg(gmicro) << endl;
- kdDebug() << TQString("GStreamerPlayer::requireVersion: This application requires %1.%2.%3 or greater.").arg(major).arg(minor).arg(micro) << endl;
+ kdDebug() << TQString("GStreamerPlayer::requireVersion: You have gstreamer %1.%2.%3 installed.").tqarg(gmajor).tqarg(gminor).tqarg(gmicro) << endl;
+ kdDebug() << TQString("GStreamerPlayer::requireVersion: This application requires %1.%2.%3 or greater.").tqarg(major).tqarg(minor).tqarg(micro) << endl;
return false;
}
@@ -207,7 +207,7 @@ void GStreamerPlayer::setSinkName(const TQString &sinkName) { m_sinkName = sinkN
void GStreamerPlayer::readConfig()
{
KConfigGroup config(KGlobal::config(), "GStreamerPlayer");
- m_sinkName = config.readEntry("SinkName", TQString::null);
+ m_sinkName = config.readEntry("SinkName", TQString());
}
void GStreamerPlayer::setupPipeline()
diff --git a/kttsd/players/gstplayer/gstreamerplayer.h b/kttsd/players/gstplayer/gstreamerplayer.h
index 13701ab..066b493 100644
--- a/kttsd/players/gstplayer/gstreamerplayer.h
+++ b/kttsd/players/gstplayer/gstreamerplayer.h
@@ -28,9 +28,10 @@ extern "C" {
class GStreamerPlayer : public Player
{
Q_OBJECT
+ TQ_OBJECT
public:
- GStreamerPlayer(TQObject* parent = 0, const char* name = 0, const TQStringList& args=TQStringList());
+ GStreamerPlayer(TQObject* tqparent = 0, const char* name = 0, const TQStringList& args=TQStringList());
virtual ~GStreamerPlayer();
// virtual void play(const FileHandle &file = FileHandle::null());