summaryrefslogtreecommitdiffstats
path: root/kradio3/plugins/recording
diff options
context:
space:
mode:
Diffstat (limited to 'kradio3/plugins/recording')
-rw-r--r--kradio3/plugins/recording/encoder.cpp28
-rw-r--r--kradio3/plugins/recording/encoder.h28
-rw-r--r--kradio3/plugins/recording/encoder_mp3.cpp28
-rw-r--r--kradio3/plugins/recording/encoder_mp3.h4
-rw-r--r--kradio3/plugins/recording/encoder_ogg.cpp14
-rw-r--r--kradio3/plugins/recording/encoder_ogg.h4
-rw-r--r--kradio3/plugins/recording/encoder_pcm.cpp12
-rw-r--r--kradio3/plugins/recording/encoder_pcm.h4
-rw-r--r--kradio3/plugins/recording/reccfg_interfaces.cpp22
-rw-r--r--kradio3/plugins/recording/reccfg_interfaces.h28
-rw-r--r--kradio3/plugins/recording/recording-config.cpp4
-rw-r--r--kradio3/plugins/recording/recording-config.h4
-rw-r--r--kradio3/plugins/recording/recording-configuration-ui.ui100
-rw-r--r--kradio3/plugins/recording/recording-configuration.cpp48
-rw-r--r--kradio3/plugins/recording/recording-configuration.h5
-rw-r--r--kradio3/plugins/recording/recording-datamonitor.cpp94
-rw-r--r--kradio3/plugins/recording/recording-datamonitor.h17
-rw-r--r--kradio3/plugins/recording/recording-monitor.cpp116
-rw-r--r--kradio3/plugins/recording/recording-monitor.h45
-rw-r--r--kradio3/plugins/recording/recording.cpp116
-rw-r--r--kradio3/plugins/recording/recording.h37
-rw-r--r--kradio3/plugins/recording/soundstreamevent.h14
22 files changed, 388 insertions, 384 deletions
diff --git a/kradio3/plugins/recording/encoder.cpp b/kradio3/plugins/recording/encoder.cpp
index b33a8c3..5f051d6 100644
--- a/kradio3/plugins/recording/encoder.cpp
+++ b/kradio3/plugins/recording/encoder.cpp
@@ -23,25 +23,25 @@
#include "recording-configuration.h"
#include "soundstreamevent.h"
-#include <qsocketnotifier.h>
-#include <qevent.h>
-#include <qapplication.h>
-#include <qregexp.h>
+#include <tqsocketnotifier.h>
+#include <tqevent.h>
+#include <tqapplication.h>
+#include <tqregexp.h>
#include <kconfig.h>
#include <kdeversion.h>
#include <klocale.h>
-RecordingEncoding::RecordingEncoding(QObject *parent, SoundStreamID ssid,
+RecordingEncoding::RecordingEncoding(TQObject *tqparent, SoundStreamID ssid,
const RecordingConfig &cfg, const RadioStation *rs,
- const QString &filename)
+ const TQString &filename)
:
- m_parent(parent),
+ m_parent(tqparent),
m_config(cfg),
m_RadioStation(rs ? rs->copy() : NULL),
m_SoundStreamID(ssid),
m_error(false),
- m_errorString(QString::null),
+ m_errorString(TQString()),
m_done(false),
m_InputBuffers(m_config.m_EncodeBufferCount < 3 ? 3 : m_config.m_EncodeBufferCount,
m_config.m_EncodeBufferSize < 4096 ? 4096 : m_config.m_EncodeBufferSize),
@@ -57,9 +57,9 @@ RecordingEncoding::RecordingEncoding(QObject *parent, SoundStreamID s
if (m_config.m_EncodeBufferSize < 4096)
m_config.m_EncodeBufferSize = 4096;
- m_buffersMetaData = new QPtrList<BufferSoundMetaData> *[m_config.m_EncodeBufferCount];
+ m_buffersMetaData = new TQPtrList<BufferSoundMetaData> *[m_config.m_EncodeBufferCount];
for (size_t i = 0; i < m_config.m_EncodeBufferCount; ++i) {
- m_buffersMetaData [i] = new QPtrList<BufferSoundMetaData>;
+ m_buffersMetaData [i] = new TQPtrList<BufferSoundMetaData>;
m_buffersMetaData [i]->setAutoDelete(true);
}
}
@@ -146,7 +146,7 @@ void RecordingEncoding::run()
char *export_buffer = NULL;
size_t export_buffer_size = 0;
- Q_UINT64 old_pos = m_encodedSize;
+ TQ_UINT64 old_pos = m_encodedSize;
encode(buffer, buffer_fill, export_buffer, export_buffer_size);
@@ -159,14 +159,14 @@ void RecordingEncoding::run()
}
if (step_event)
- QApplication::postEvent(m_parent, step_event);
+ TQApplication::postEvent(m_parent, step_event);
}
m_done = true;
closeOutput();
SoundMetaData md(m_encodedSize, last_md.relativeTimestamp(), last_md.absoluteTimestamp(), m_outputURL);
- QApplication::postEvent(m_parent, new SoundStreamEncodingStepEvent(m_SoundStreamID, NULL, 0, md));
+ TQApplication::postEvent(m_parent, new SoundStreamEncodingStepEvent(m_SoundStreamID, NULL, 0, md));
- QApplication::postEvent(m_parent, new SoundStreamEncodingTerminatedEvent(m_SoundStreamID));
+ TQApplication::postEvent(m_parent, new SoundStreamEncodingTerminatedEvent(m_SoundStreamID));
}
diff --git a/kradio3/plugins/recording/encoder.h b/kradio3/plugins/recording/encoder.h
index 271cf83..c127316 100644
--- a/kradio3/plugins/recording/encoder.h
+++ b/kradio3/plugins/recording/encoder.h
@@ -23,9 +23,9 @@
#endif
-#include <qobject.h>
-#include <qstring.h>
-#include <qthread.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqthread.h>
#include "../../src/include/radiostation.h"
#include "../../src/include/multibuffer.h"
@@ -40,7 +40,7 @@ public:
: SoundMetaData(0, 0, 0, KURL()), m_BufferPosition(0) {}
BufferSoundMetaData(const SoundMetaData &md, size_t bufferpos)
: SoundMetaData(md), m_BufferPosition(bufferpos) {}
- BufferSoundMetaData(Q_INT64 pos, time_t rel, time_t abs, const KURL &url, size_t bufferpos)
+ BufferSoundMetaData(TQ_INT64 pos, time_t rel, time_t abs, const KURL &url, size_t bufferpos)
: SoundMetaData(pos, rel, abs, url), m_BufferPosition(bufferpos) {}
size_t bufferPosition() const { return m_BufferPosition; }
@@ -50,10 +50,10 @@ protected:
};
-class RecordingEncoding : public QThread
+class RecordingEncoding : public TQThread
{
public:
- RecordingEncoding(QObject *parent, SoundStreamID id, const RecordingConfig &cfg, const RadioStation *rs, const QString &filename);
+ RecordingEncoding(TQObject *tqparent, SoundStreamID id, const RecordingConfig &cfg, const RadioStation *rs, const TQString &filename);
virtual ~RecordingEncoding();
void run();
@@ -62,37 +62,37 @@ public:
void unlockInputBuffer(size_t bufferSize, const SoundMetaData &md); // bytes we actually wrote
bool error() const { return m_error; }
- const QString &errorString() const { return m_errorString; }
+ const TQString &errorString() const { return m_errorString; }
void setDone();
bool IsDone() { return m_done; }
- virtual bool openOutput(const QString &outputFile) = 0;
+ virtual bool openOutput(const TQString &outputFile) = 0;
virtual void closeOutput() = 0;
- Q_UINT64 encodedSize() const { return m_encodedSize; }
+ TQ_UINT64 encodedSize() const { return m_encodedSize; }
const RecordingConfig &config() const { return m_config; }
protected:
virtual void encode(const char *_buffer, size_t buffer_size, char *&export_buffer, size_t &export_buffer_size) = 0;
- QObject *m_parent;
+ TQObject *m_parent;
RecordingConfig m_config;
RadioStation *m_RadioStation;
SoundStreamID m_SoundStreamID;
bool m_error;
- QString m_errorString;
+ TQString m_errorString;
bool m_done;
MultiBuffer m_InputBuffers;
- QPtrList<BufferSoundMetaData>
+ TQPtrList<BufferSoundMetaData>
**m_buffersMetaData;
- Q_UINT64 m_encodedSize;
+ TQ_UINT64 m_encodedSize;
time_t m_InputStartTime;
- Q_UINT64 m_InputStartPosition;
+ TQ_UINT64 m_InputStartPosition;
KURL m_outputURL;
};
diff --git a/kradio3/plugins/recording/encoder_mp3.cpp b/kradio3/plugins/recording/encoder_mp3.cpp
index 5ba0bc2..71646c7 100644
--- a/kradio3/plugins/recording/encoder_mp3.cpp
+++ b/kradio3/plugins/recording/encoder_mp3.cpp
@@ -17,13 +17,13 @@
#include "encoder_mp3.h"
-#include <qmutex.h>
+#include <tqmutex.h>
#include <klocale.h>
-RecordingEncodingMP3::RecordingEncodingMP3(QObject *parent, SoundStreamID ssid,
+RecordingEncodingMP3::RecordingEncodingMP3(TQObject *tqparent, SoundStreamID ssid,
const RecordingConfig &cfg, const RadioStation *rs,
- const QString &filename)
- : RecordingEncoding(parent, ssid, cfg, rs, filename)
+ const TQString &filename)
+ : RecordingEncoding(tqparent, ssid, cfg, rs, filename)
#ifdef HAVE_LAME
,
m_MP3Buffer(NULL),
@@ -47,7 +47,7 @@ RecordingEncodingMP3::~RecordingEncodingMP3()
}
-static QMutex lameSerialization;
+static TQMutex lameSerialization;
void RecordingEncodingMP3::encode(const char *_buffer, size_t buffer_size, char *&export_buffer, size_t &export_buffer_size)
{
@@ -76,7 +76,7 @@ void RecordingEncodingMP3::encode(const char *_buffer, size_t buffer_size, char
m_MP3BufferSize);
lameSerialization.unlock();
if (n < 0) {
- m_errorString += i18n("Error %1 while encoding mp3. ").arg(QString().setNum(n));
+ m_errorString += i18n("Error %1 while encoding mp3. ").tqarg(TQString().setNum(n));
m_error = true;
} else if (n > 0) {
m_encodedSize += n;
@@ -86,7 +86,7 @@ void RecordingEncodingMP3::encode(const char *_buffer, size_t buffer_size, char
int r = fwrite(m_MP3Buffer, 1, n, m_MP3Output);
if (r <= 0) {
- m_errorString += i18n("Error %1 writing output. ").arg(QString().setNum(r));
+ m_errorString += i18n("Error %1 writing output. ").tqarg(TQString().setNum(r));
m_error = true;
}
}
@@ -95,7 +95,7 @@ void RecordingEncodingMP3::encode(const char *_buffer, size_t buffer_size, char
-bool RecordingEncodingMP3::openOutput(const QString &output)
+bool RecordingEncodingMP3::openOutput(const TQString &output)
{
#ifdef HAVE_LAME
// m_output = NULL;
@@ -120,14 +120,14 @@ bool RecordingEncodingMP3::openOutput(const QString &output)
if (lame_init_params(m_LAMEFlags) < 0) {
m_error = true;
- m_errorString += i18n("Cannot initialize libmp3lame parameters. ").arg(output);
+ m_errorString += i18n("Cannot initialize libmp3lame parameters. ").tqarg(output);
}
if (!m_error) {
id3tag_init(m_LAMEFlags);
id3tag_add_v2(m_LAMEFlags);
- QString title = m_RadioStation->name() + QString().sprintf(" - %s", (QDateTime::currentDateTime().toString(Qt::ISODate)).ascii());
- QString comment = i18n("Recorded by KRadio");
+ TQString title = m_RadioStation->name() + TQString().sprintf(" - %s", (TQDateTime::tqcurrentDateTime().toString(Qt::ISODate)).ascii());
+ TQString comment = i18n("Recorded by KRadio");
size_t l = title.length() + comment.length() + 10;
m_ID3Tags = new char[l];
char *ctitle = m_ID3Tags;
@@ -140,7 +140,7 @@ bool RecordingEncodingMP3::openOutput(const QString &output)
m_MP3Output = fopen(output.ascii(), "wb+");
if (!m_MP3Output) {
- m_errorString += i18n("Cannot open output file %1. ").arg(output);
+ m_errorString += i18n("Cannot open output file %1. ").tqarg(output);
m_error = true;
}
@@ -186,12 +186,12 @@ void RecordingEncodingMP3::closeOutput()
m_MP3BufferSize);
if (n < 0) {
m_error = true;
- m_errorString += i18n("Error %1 while encoding mp3. ").arg(QString().setNum(n));
+ m_errorString += i18n("Error %1 while encoding mp3. ").tqarg(TQString().setNum(n));
} else if (n > 0) {
int r = fwrite(m_MP3Buffer, 1, n, m_MP3Output);
if (r <= 0) {
m_error = true;
- m_errorString += i18n("Error %1 writing output. ").arg(QString().setNum(r));
+ m_errorString += i18n("Error %1 writing output. ").tqarg(TQString().setNum(r));
} else {
lame_mp3_tags_fid(m_LAMEFlags, m_MP3Output);
}
diff --git a/kradio3/plugins/recording/encoder_mp3.h b/kradio3/plugins/recording/encoder_mp3.h
index 2a41832..2b72714 100644
--- a/kradio3/plugins/recording/encoder_mp3.h
+++ b/kradio3/plugins/recording/encoder_mp3.h
@@ -31,10 +31,10 @@
class RecordingEncodingMP3 : public RecordingEncoding
{
public:
- RecordingEncodingMP3(QObject *parent, SoundStreamID id, const RecordingConfig &cfg, const RadioStation *rs, const QString &filename);
+ RecordingEncodingMP3(TQObject *tqparent, SoundStreamID id, const RecordingConfig &cfg, const RadioStation *rs, const TQString &filename);
virtual ~RecordingEncodingMP3();
- bool openOutput(const QString &outputFile);
+ bool openOutput(const TQString &outputFile);
void closeOutput();
protected:
diff --git a/kradio3/plugins/recording/encoder_ogg.cpp b/kradio3/plugins/recording/encoder_ogg.cpp
index e3db6cc..4cd7b58 100644
--- a/kradio3/plugins/recording/encoder_ogg.cpp
+++ b/kradio3/plugins/recording/encoder_ogg.cpp
@@ -20,10 +20,10 @@
#include <klocale.h>
#include <stdlib.h>
-RecordingEncodingOgg::RecordingEncodingOgg(QObject *parent, SoundStreamID ssid,
+RecordingEncodingOgg::RecordingEncodingOgg(TQObject *tqparent, SoundStreamID ssid,
const RecordingConfig &cfg, const RadioStation *rs,
- const QString &filename)
- : RecordingEncoding(parent, ssid, cfg, rs, filename)
+ const TQString &filename)
+ : RecordingEncoding(tqparent, ssid, cfg, rs, filename)
#ifdef HAVE_OGG
,
m_OggOutput(NULL),
@@ -118,7 +118,7 @@ void RecordingEncodingOgg::encode(const char *_buffer, size_t buffer_size, char
#ifdef HAVE_OGG
-static void vorbis_comment_add_tag_new(vorbis_comment *vc, const QString &tag, const QString &value)
+static void vorbis_comment_add_tag_new(vorbis_comment *vc, const TQString &tag, const TQString &value)
{
char *stag = strdup(tag.ascii());
char *svalue = strdup(value.utf8());
@@ -128,12 +128,12 @@ static void vorbis_comment_add_tag_new(vorbis_comment *vc, const QString &tag, c
}
#endif
-bool RecordingEncodingOgg::openOutput(const QString &output)
+bool RecordingEncodingOgg::openOutput(const TQString &output)
{
#ifdef HAVE_OGG
m_OggOutput = fopen(output.ascii(), "wb+");
if (!m_OggOutput) {
- m_errorString += i18n("Cannot open Ogg/Vorbis output file %1. ").arg(output);
+ m_errorString += i18n("Cannot open Ogg/Vorbis output file %1. ").tqarg(output);
m_error = true;
}
@@ -176,7 +176,7 @@ bool RecordingEncodingOgg::openOutput(const QString &output)
vorbis_comment_init (&vc);
vorbis_comment_add_tag_new(&vc, "creator", "KRadio" VERSION);
vorbis_comment_add_tag_new(&vc, "title", m_RadioStation->longName().utf8());
- vorbis_comment_add_tag_new(&vc, "date", QDateTime::currentDateTime().toString(Qt::ISODate));
+ vorbis_comment_add_tag_new(&vc, "date", TQDateTime::tqcurrentDateTime().toString(Qt::ISODate));
vorbis_analysis_headerout(&m_VorbisDSP, &vc,
&header_main, &header_comments, &header_codebooks);
diff --git a/kradio3/plugins/recording/encoder_ogg.h b/kradio3/plugins/recording/encoder_ogg.h
index 55cf8e6..44fc1a7 100644
--- a/kradio3/plugins/recording/encoder_ogg.h
+++ b/kradio3/plugins/recording/encoder_ogg.h
@@ -31,10 +31,10 @@
class RecordingEncodingOgg : public RecordingEncoding
{
public:
- RecordingEncodingOgg(QObject *parent, SoundStreamID id, const RecordingConfig &cfg, const RadioStation *rs, const QString &filename);
+ RecordingEncodingOgg(TQObject *tqparent, SoundStreamID id, const RecordingConfig &cfg, const RadioStation *rs, const TQString &filename);
virtual ~RecordingEncodingOgg();
- bool openOutput(const QString &outputFile);
+ bool openOutput(const TQString &outputFile);
void closeOutput();
protected:
diff --git a/kradio3/plugins/recording/encoder_pcm.cpp b/kradio3/plugins/recording/encoder_pcm.cpp
index 27c671b..a5e6488 100644
--- a/kradio3/plugins/recording/encoder_pcm.cpp
+++ b/kradio3/plugins/recording/encoder_pcm.cpp
@@ -20,10 +20,10 @@
#include <klocale.h>
-RecordingEncodingPCM::RecordingEncodingPCM(QObject *parent, SoundStreamID ssid,
+RecordingEncodingPCM::RecordingEncodingPCM(TQObject *tqparent, SoundStreamID ssid,
const RecordingConfig &cfg, const RadioStation *rs,
- const QString &filename)
- : RecordingEncoding(parent, ssid, cfg, rs, filename),
+ const TQString &filename)
+ : RecordingEncoding(tqparent, ssid, cfg, rs, filename),
m_output(NULL)
{
m_config.m_SoundFormat.m_Encoding = "raw";
@@ -50,12 +50,12 @@ void RecordingEncodingPCM::encode(const char *buffer, size_t buffer_size, char *
if (err != (int)buffer_size) {
m_error = true;
- m_errorString += i18n("Error %1 writing output. ").arg(QString().setNum(err));
+ m_errorString += i18n("Error %1 writing output. ").tqarg(TQString().setNum(err));
}
}
-bool RecordingEncodingPCM::openOutput(const QString &output)
+bool RecordingEncodingPCM::openOutput(const TQString &output)
{
SF_INFO sinfo;
m_config.getSoundFileInfo(sinfo, false);
@@ -63,7 +63,7 @@ bool RecordingEncodingPCM::openOutput(const QString &output)
if (!m_output) {
m_error = true;
- m_errorString += i18n("Cannot open output file %1. ").arg(output);
+ m_errorString += i18n("Cannot open output file %1. ").tqarg(output);
}
return !m_error;
}
diff --git a/kradio3/plugins/recording/encoder_pcm.h b/kradio3/plugins/recording/encoder_pcm.h
index e768bba..667e523 100644
--- a/kradio3/plugins/recording/encoder_pcm.h
+++ b/kradio3/plugins/recording/encoder_pcm.h
@@ -29,10 +29,10 @@
class RecordingEncodingPCM : public RecordingEncoding
{
public:
- RecordingEncodingPCM(QObject *parent, SoundStreamID id, const RecordingConfig &cfg, const RadioStation *rs, const QString &filename);
+ RecordingEncodingPCM(TQObject *tqparent, SoundStreamID id, const RecordingConfig &cfg, const RadioStation *rs, const TQString &filename);
virtual ~RecordingEncodingPCM();
- bool openOutput(const QString &outputFile);
+ bool openOutput(const TQString &outputFile);
void closeOutput();
protected:
diff --git a/kradio3/plugins/recording/reccfg_interfaces.cpp b/kradio3/plugins/recording/reccfg_interfaces.cpp
index 3b5f32f..6876f86 100644
--- a/kradio3/plugins/recording/reccfg_interfaces.cpp
+++ b/kradio3/plugins/recording/reccfg_interfaces.cpp
@@ -32,7 +32,7 @@ IF_IMPL_SENDER ( IRecCfg::notifyMP3QualityChanged(int q),
IF_IMPL_SENDER ( IRecCfg::notifyOggQualityChanged(float q),
noticeOggQualityChanged(q)
);
-IF_IMPL_SENDER ( IRecCfg::notifyRecordingDirectoryChanged(const QString &dir),
+IF_IMPL_SENDER ( IRecCfg::notifyRecordingDirectoryChanged(const TQString &dir),
noticeRecordingDirectoryChanged(dir)
);
IF_IMPL_SENDER ( IRecCfg::notifyOutputFormatChanged(RecordingConfig::OutputFormat of),
@@ -59,7 +59,7 @@ IF_IMPL_SENDER ( IRecCfgClient::sendMP3Quality(int q),
IF_IMPL_SENDER ( IRecCfgClient::sendOggQuality(float q),
setOggQuality(q)
);
-IF_IMPL_SENDER ( IRecCfgClient::sendRecordingDirectory(const QString &dir),
+IF_IMPL_SENDER ( IRecCfgClient::sendRecordingDirectory(const TQString &dir),
setRecordingDirectory(dir)
);
IF_IMPL_SENDER ( IRecCfgClient::sendOutputFormat(RecordingConfig::OutputFormat of),
@@ -72,45 +72,45 @@ IF_IMPL_SENDER ( IRecCfgClient::sendRecordingConfig(const RecordingConfig &cf
setRecordingConfig(cfg)
);
-IF_IMPL_QUERY ( void IRecCfgClient::queryEncoderBuffer(size_t &BufferSize, size_t &BufferCount),
+IF_IMPL_TQUERY ( void IRecCfgClient::queryEncoderBuffer(size_t &BufferSize, size_t &BufferCount),
getEncoderBuffer(BufferSize, BufferCount),
);
static SoundFormat defaultSoundFormat;
-IF_IMPL_QUERY ( const SoundFormat &IRecCfgClient::querySoundFormat (),
+IF_IMPL_TQUERY ( const SoundFormat &IRecCfgClient::querySoundFormat (),
getSoundFormat(),
defaultSoundFormat
);
-IF_IMPL_QUERY ( int IRecCfgClient::queryMP3Quality (),
+IF_IMPL_TQUERY ( int IRecCfgClient::queryMP3Quality (),
getMP3Quality(),
7
);
-IF_IMPL_QUERY ( float IRecCfgClient::queryOggQuality (),
+IF_IMPL_TQUERY ( float IRecCfgClient::queryOggQuality (),
getOggQuality(),
7
);
-static QString defaultRecDir("/tmp");
-IF_IMPL_QUERY ( const QString &IRecCfgClient::queryRecordingDirectory(),
+static TQString defaultRecDir("/tmp");
+IF_IMPL_TQUERY ( const TQString &IRecCfgClient::queryRecordingDirectory(),
getRecordingDirectory(),
defaultRecDir
);
-IF_IMPL_QUERY ( RecordingConfig::OutputFormat IRecCfgClient::queryOutputFormat(),
+IF_IMPL_TQUERY ( RecordingConfig::OutputFormat IRecCfgClient::queryOutputFormat(),
getOutputFormat(),
RecordingConfig::outputWAV
);
-IF_IMPL_QUERY ( bool IRecCfgClient::queryPreRecording(int &seconds),
+IF_IMPL_TQUERY ( bool IRecCfgClient::queryPreRecording(int &seconds),
getPreRecording(seconds),
false
);
static RecordingConfig defaultRecConfig;
-IF_IMPL_QUERY ( const RecordingConfig &IRecCfgClient::queryRecordingConfig(),
+IF_IMPL_TQUERY ( const RecordingConfig &IRecCfgClient::queryRecordingConfig(),
getRecordingConfig(),
defaultRecConfig
);
diff --git a/kradio3/plugins/recording/reccfg_interfaces.h b/kradio3/plugins/recording/reccfg_interfaces.h
index 907f494..e733921 100644
--- a/kradio3/plugins/recording/reccfg_interfaces.h
+++ b/kradio3/plugins/recording/reccfg_interfaces.h
@@ -31,7 +31,7 @@ RECEIVERS:
IF_RECEIVER( setSoundFormat (const SoundFormat &sf) )
IF_RECEIVER( setMP3Quality (int q) )
IF_RECEIVER( setOggQuality (float q) )
- IF_RECEIVER( setRecordingDirectory(const QString &dir) )
+ IF_RECEIVER( setRecordingDirectory(const TQString &dir) )
IF_RECEIVER( setOutputFormat (RecordingConfig::OutputFormat of) )
IF_RECEIVER( setPreRecording (bool enable, int seconds) )
IF_RECEIVER( setRecordingConfig (const RecordingConfig &cfg) )
@@ -41,7 +41,7 @@ SENDERS:
IF_SENDER ( notifySoundFormatChanged (const SoundFormat &sf) )
IF_SENDER ( notifyMP3QualityChanged (int q) )
IF_SENDER ( notifyOggQualityChanged (float q) )
- IF_SENDER ( notifyRecordingDirectoryChanged(const QString &dir) )
+ IF_SENDER ( notifyRecordingDirectoryChanged(const TQString &dir) )
IF_SENDER ( notifyOutputFormatChanged (RecordingConfig::OutputFormat of) )
IF_SENDER ( notifyPreRecordingChanged (bool enable, int seconds) )
IF_SENDER ( notifyRecordingConfigChanged (const RecordingConfig &cfg) )
@@ -51,7 +51,7 @@ ANSWERS:
IF_ANSWER ( const SoundFormat &getSoundFormat () const )
IF_ANSWER ( int getMP3Quality () const )
IF_ANSWER ( float getOggQuality () const )
- IF_ANSWER ( const QString &getRecordingDirectory() const )
+ IF_ANSWER ( const TQString &getRecordingDirectory() const )
IF_ANSWER ( RecordingConfig::OutputFormat getOutputFormat() const )
IF_ANSWER ( bool getPreRecording(int &seconds) const )
IF_ANSWER ( const RecordingConfig &getRecordingConfig() const )
@@ -69,7 +69,7 @@ SENDERS:
IF_SENDER ( sendSoundFormat (const SoundFormat &sf) )
IF_SENDER ( sendMP3Quality (int q) )
IF_SENDER ( sendOggQuality (float q) )
- IF_SENDER ( sendRecordingDirectory(const QString &dir) )
+ IF_SENDER ( sendRecordingDirectory(const TQString &dir) )
IF_SENDER ( sendOutputFormat (RecordingConfig::OutputFormat of) )
IF_SENDER ( sendPreRecording (bool enable, int seconds) )
IF_SENDER ( sendRecordingConfig (const RecordingConfig &cfg) )
@@ -79,20 +79,20 @@ RECEIVERS:
IF_RECEIVER( noticeSoundFormatChanged (const SoundFormat &sf) )
IF_RECEIVER( noticeMP3QualityChanged (int q) )
IF_RECEIVER( noticeOggQualityChanged (float q) )
- IF_RECEIVER( noticeRecordingDirectoryChanged(const QString &dir) )
+ IF_RECEIVER( noticeRecordingDirectoryChanged(const TQString &dir) )
IF_RECEIVER( noticeOutputFormatChanged (RecordingConfig::OutputFormat of) )
IF_RECEIVER( noticePreRecordingChanged (bool enable, int seconds) )
IF_RECEIVER( noticeRecordingConfigChanged (const RecordingConfig &cfg) )
-QUERIES:
- IF_QUERY ( void queryEncoderBuffer(size_t &BufferSize, size_t &BufferCount) )
- IF_QUERY ( const SoundFormat &querySoundFormat () )
- IF_QUERY ( int queryMP3Quality () )
- IF_QUERY ( float queryOggQuality () )
- IF_QUERY ( const QString &queryRecordingDirectory() )
- IF_QUERY ( RecordingConfig::OutputFormat queryOutputFormat() )
- IF_QUERY ( bool queryPreRecording(int &seconds) )
- IF_QUERY ( const RecordingConfig &queryRecordingConfig() )
+TQUERIES:
+ IF_TQUERY ( void queryEncoderBuffer(size_t &BufferSize, size_t &BufferCount) )
+ IF_TQUERY ( const SoundFormat &querySoundFormat () )
+ IF_TQUERY ( int queryMP3Quality () )
+ IF_TQUERY ( float queryOggQuality () )
+ IF_TQUERY ( const TQString &queryRecordingDirectory() )
+ IF_TQUERY ( RecordingConfig::OutputFormat queryOutputFormat() )
+ IF_TQUERY ( bool queryPreRecording(int &seconds) )
+ IF_TQUERY ( const RecordingConfig &queryRecordingConfig() )
RECEIVERS:
virtual void noticeConnectedI (cmplInterface *, bool /*pointer_valid*/);
diff --git a/kradio3/plugins/recording/recording-config.cpp b/kradio3/plugins/recording/recording-config.cpp
index 131953f..5b62fef 100644
--- a/kradio3/plugins/recording/recording-config.cpp
+++ b/kradio3/plugins/recording/recording-config.cpp
@@ -32,7 +32,7 @@ RecordingConfig::RecordingConfig ()
checkFormatSettings();
}
-RecordingConfig::RecordingConfig (const QString &directory,
+RecordingConfig::RecordingConfig (const TQString &directory,
OutputFormat of,
const SoundFormat &sf, int mp3_q, float ogg_q)
: m_EncodeBufferSize(256*1024),
@@ -74,7 +74,7 @@ void RecordingConfig::restoreConfig(KConfig *c)
m_Directory = c->readEntry("directory", "/tmp");
m_mp3Quality = c->readNumEntry("mp3quality", 7);
m_oggQuality = c->readDoubleNumEntry("oggquality", 1.0);
- QString of = c->readEntry("outputFormat", ".wav");
+ TQString of = c->readEntry("outputFormat", ".wav");
if (of == ".wav")
m_OutputFormat = outputWAV;
diff --git a/kradio3/plugins/recording/recording-config.h b/kradio3/plugins/recording/recording-config.h
index bccbb93..ef3d86f 100644
--- a/kradio3/plugins/recording/recording-config.h
+++ b/kradio3/plugins/recording/recording-config.h
@@ -41,7 +41,7 @@ public:
public:
RecordingConfig ();
- RecordingConfig (const QString &directory,
+ RecordingConfig (const TQString &directory,
OutputFormat of,
const SoundFormat &, int mp3_q, float ogg_q);
RecordingConfig (const RecordingConfig &c);
@@ -60,7 +60,7 @@ public:
SoundFormat m_SoundFormat;
int m_mp3Quality;
float m_oggQuality;
- QString m_Directory;
+ TQString m_Directory;
OutputFormat m_OutputFormat;
bool m_PreRecordingEnable;
diff --git a/kradio3/plugins/recording/recording-configuration-ui.ui b/kradio3/plugins/recording/recording-configuration-ui.ui
index a80fece..6d25321 100644
--- a/kradio3/plugins/recording/recording-configuration-ui.ui
+++ b/kradio3/plugins/recording/recording-configuration-ui.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>RecordingConfigurationUI</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>RecordingConfigurationUI</cstring>
</property>
@@ -22,11 +22,11 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QTabWidget" row="0" column="0">
+ <widget class="TQTabWidget" row="0" column="0">
<property name="name">
<cstring>kTabWidget13</cstring>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>TabPage_2</cstring>
</property>
@@ -40,17 +40,17 @@
<property name="margin">
<number>11</number>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout7</cstring>
+ <cstring>tqlayout7</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="2" column="1" rowspan="1" colspan="2">
+ <widget class="TQLayoutWidget" row="2" column="1" rowspan="1" colspan="2">
<property name="name">
- <cstring>layout3_2</cstring>
+ <cstring>tqlayout3_2</cstring>
</property>
<hbox>
<property name="name">
@@ -66,14 +66,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>141</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>editOggQuality</cstring>
</property>
@@ -89,9 +89,9 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="1" column="2">
+ <widget class="TQLayoutWidget" row="1" column="2">
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>tqlayout3</cstring>
</property>
<hbox>
<property name="name">
@@ -107,14 +107,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>141</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>editMP3Quality</cstring>
</property>
@@ -130,7 +130,7 @@
</widget>
</hbox>
</widget>
- <widget class="QLabel" row="1" column="0" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>labelMP3Quality</cstring>
</property>
@@ -186,7 +186,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QLabel" row="3" column="0" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="3" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>lableDirectory</cstring>
</property>
@@ -194,7 +194,7 @@
<string>Recording Directory</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>lableFileFormat</cstring>
</property>
@@ -202,7 +202,7 @@
<string>File Format</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>labelOggQuality</cstring>
</property>
@@ -222,7 +222,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>5</height>
@@ -231,7 +231,7 @@
</spacer>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>TabPage</cstring>
</property>
@@ -245,9 +245,9 @@
<property name="margin">
<number>11</number>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout69</cstring>
+ <cstring>tqlayout69</cstring>
</property>
<grid>
<property name="name">
@@ -263,7 +263,7 @@
<property name="sizeType">
<enum>Minimum</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>225</width>
<height>20</height>
@@ -303,7 +303,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>lableEndianess</cstring>
</property>
@@ -321,7 +321,7 @@
<property name="sizeType">
<enum>Minimum</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>225</width>
<height>20</height>
@@ -351,7 +351,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>labelRate</cstring>
</property>
@@ -405,7 +405,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>lableChannels</cstring>
</property>
@@ -413,7 +413,7 @@
<string>Channels</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>lableBits</cstring>
</property>
@@ -454,7 +454,7 @@
<property name="sizeType">
<enum>Minimum</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>225</width>
<height>20</height>
@@ -473,7 +473,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>5</height>
@@ -482,7 +482,7 @@
</spacer>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>TabPage_3</cstring>
</property>
@@ -496,15 +496,15 @@
<property name="margin">
<number>11</number>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QSpinBox" row="0" column="1">
+ <widget class="TQSpinBox" row="0" column="1">
<property name="name">
<cstring>editBufferSize</cstring>
</property>
@@ -524,7 +524,7 @@
<number>256</number>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>labelEditBufferSize</cstring>
</property>
@@ -532,7 +532,7 @@
<string>Encoding Buffer Size</string>
</property>
</widget>
- <widget class="QSpinBox" row="1" column="1">
+ <widget class="TQSpinBox" row="1" column="1">
<property name="name">
<cstring>editBufferCount</cstring>
</property>
@@ -543,7 +543,7 @@
<number>3</number>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>labelEditBufferCount</cstring>
</property>
@@ -563,7 +563,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>16</height>
@@ -572,7 +572,7 @@
</spacer>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>TabPage_4</cstring>
</property>
@@ -586,23 +586,23 @@
<property name="margin">
<number>11</number>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout68</cstring>
+ <cstring>tqlayout68</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout6</cstring>
+ <cstring>tqlayout6</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_checkboxPreRecordingEnable</cstring>
</property>
@@ -623,7 +623,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>380</width>
<height>20</height>
@@ -632,15 +632,15 @@
</spacer>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout7</cstring>
+ <cstring>tqlayout7</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>m_labelPreRecordingTime</cstring>
</property>
@@ -651,7 +651,7 @@
<string>PreRecording Time</string>
</property>
</widget>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>m_spinboxPreRecordingSeconds</cstring>
</property>
@@ -688,7 +688,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>16</height>
@@ -716,7 +716,7 @@
<slot>setEnabled(bool)</slot>
</connection>
</connections>
-<layoutdefaults spacing="6" margin="0"/>
+<tqlayoutdefaults spacing="6" margin="0"/>
<includehints>
<includehint>kurlrequester.h</includehint>
<includehint>klineedit.h</includehint>
diff --git a/kradio3/plugins/recording/recording-configuration.cpp b/kradio3/plugins/recording/recording-configuration.cpp
index d41bf01..c80b0ac 100644
--- a/kradio3/plugins/recording/recording-configuration.cpp
+++ b/kradio3/plugins/recording/recording-configuration.cpp
@@ -20,38 +20,38 @@
#include <kurlrequester.h>
#include <kcombobox.h>
-#include <qspinbox.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
+#include <tqspinbox.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
#include <ktabwidget.h>
-RecordingConfiguration::RecordingConfiguration (QWidget *parent)
- : RecordingConfigurationUI(parent),
+RecordingConfiguration::RecordingConfiguration (TQWidget *tqparent)
+ : RecordingConfigurationUI(tqparent),
m_dirty(true),
m_ignore_gui_updates(false)
{
editDirectory->setMode(KFile::Directory | KFile::ExistingOnly);
- QObject::connect(editFileFormat, SIGNAL(activated(int)),
- this, SLOT(slotFormatSelectionChanged()));
- QObject::connect(editBits, SIGNAL(activated(int)),
- this, SLOT(slotFormatSelectionChanged()));
-
- connect(editRate, SIGNAL(activated(int)), SLOT(slotSetDirty()));
- connect(editBits, SIGNAL(activated(int)), SLOT(slotSetDirty()));
- connect(editSign, SIGNAL(activated(int)), SLOT(slotSetDirty()));
- connect(editEndianess, SIGNAL(activated(int)), SLOT(slotSetDirty()));
- connect(editChannels, SIGNAL(activated(int)), SLOT(slotSetDirty()));
- connect(editFileFormat, SIGNAL(activated(int)), SLOT(slotSetDirty()));
- connect(editMP3Quality, SIGNAL(valueChanged(int)), SLOT(slotSetDirty()));
- connect(editOggQuality, SIGNAL(valueChanged(int)), SLOT(slotSetDirty()));
- connect(editDirectory, SIGNAL(textChanged(const QString &)), SLOT(slotSetDirty()));
- connect(editBufferSize, SIGNAL(valueChanged(int)), SLOT(slotSetDirty()));
- connect(editBufferCount, SIGNAL(valueChanged(int)), SLOT(slotSetDirty()));
- connect(m_spinboxPreRecordingSeconds, SIGNAL(valueChanged(int)), SLOT(slotSetDirty()));
- connect(m_checkboxPreRecordingEnable, SIGNAL(toggled(bool)), SLOT(slotSetDirty()));
+ TQObject::connect(editFileFormat, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotFormatSelectionChanged()));
+ TQObject::connect(editBits, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotFormatSelectionChanged()));
+
+ connect(editRate, TQT_SIGNAL(activated(int)), TQT_SLOT(slotSetDirty()));
+ connect(editBits, TQT_SIGNAL(activated(int)), TQT_SLOT(slotSetDirty()));
+ connect(editSign, TQT_SIGNAL(activated(int)), TQT_SLOT(slotSetDirty()));
+ connect(editEndianess, TQT_SIGNAL(activated(int)), TQT_SLOT(slotSetDirty()));
+ connect(editChannels, TQT_SIGNAL(activated(int)), TQT_SLOT(slotSetDirty()));
+ connect(editFileFormat, TQT_SIGNAL(activated(int)), TQT_SLOT(slotSetDirty()));
+ connect(editMP3Quality, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotSetDirty()));
+ connect(editOggQuality, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotSetDirty()));
+ connect(editDirectory, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(slotSetDirty()));
+ connect(editBufferSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotSetDirty()));
+ connect(editBufferCount, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotSetDirty()));
+ connect(m_spinboxPreRecordingSeconds, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotSetDirty()));
+ connect(m_checkboxPreRecordingEnable, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotSetDirty()));
// attention: remove items with higher index first ;-) otherwise indexes are not valid
#ifndef HAVE_OGG
@@ -358,7 +358,7 @@ bool RecordingConfiguration::noticeOggQualityChanged (float q)
return true;
}
-bool RecordingConfiguration::noticeRecordingDirectoryChanged(const QString &dir)
+bool RecordingConfiguration::noticeRecordingDirectoryChanged(const TQString &dir)
{
m_ignore_gui_updates = true;
m_RecordingConfig.m_Directory = dir;
diff --git a/kradio3/plugins/recording/recording-configuration.h b/kradio3/plugins/recording/recording-configuration.h
index bf1b8f6..bbc24dc 100644
--- a/kradio3/plugins/recording/recording-configuration.h
+++ b/kradio3/plugins/recording/recording-configuration.h
@@ -80,8 +80,9 @@ class RecordingConfiguration : public RecordingConfigurationUI,
public IRecCfgClient
{
Q_OBJECT
+ TQ_OBJECT
public :
- RecordingConfiguration (QWidget *parent);
+ RecordingConfiguration (TQWidget *tqparent);
~RecordingConfiguration ();
// IRecCfgClient
@@ -90,7 +91,7 @@ public :
bool noticeSoundFormatChanged (const SoundFormat &sf);
bool noticeMP3QualityChanged (int q);
bool noticeOggQualityChanged (float q);
- bool noticeRecordingDirectoryChanged(const QString &dir);
+ bool noticeRecordingDirectoryChanged(const TQString &dir);
bool noticeOutputFormatChanged (RecordingConfig::OutputFormat of);
bool noticePreRecordingChanged (bool enable, int seconds);
bool noticeRecordingConfigChanged (const RecordingConfig &cfg);
diff --git a/kradio3/plugins/recording/recording-datamonitor.cpp b/kradio3/plugins/recording/recording-datamonitor.cpp
index cd8e0f5..bfc1e3b 100644
--- a/kradio3/plugins/recording/recording-datamonitor.cpp
+++ b/kradio3/plugins/recording/recording-datamonitor.cpp
@@ -19,11 +19,11 @@
//#include "recording-context.h"
#include <math.h>
-#include <qpainter.h>
-#include <qimage.h>
-#include <qpixmap.h>
+#include <tqpainter.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
#include <kimageeffect.h> // fading, blending, ...
-#include <kpixmapio.h> // fast conversion between QPixmap/QImage
+#include <kpixmapio.h> // fast conversion between TQPixmap/TQImage
#include <limits.h>
#include <stdlib.h>
@@ -33,8 +33,8 @@
#define BLOCK_W_MIN 10
#define W_MIN (20 * (BLOCK_W_MIN))
-RecordingDataMonitor::RecordingDataMonitor(QWidget *parent, const char *name)
- : QFrame(parent, name),
+RecordingDataMonitor::RecordingDataMonitor(TQWidget *tqparent, const char *name)
+ : TQFrame(tqparent, name),
m_channelsMax(NULL),
m_channelsAvg(NULL),
m_maxValue(INT_MAX),
@@ -47,10 +47,10 @@ RecordingDataMonitor::RecordingDataMonitor(QWidget *parent, const char *name)
setChannels(2);
- setColors(QColor(20, 244, 20),
- QColor(10, 117, 10));
+ setColors(TQColor(20, 244, 20),
+ TQColor(10, 117, 10));
- setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
+ tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding));
}
@@ -90,34 +90,34 @@ void RecordingDataMonitor::setChannels(int n)
m_channelsMax[i] = 0;
m_channelsAvg[i] = 0;
}
- setMinimumSize(QSize(W_MIN, (m_channels + 1 )* CHANNEL_H_MIN));
+ setMinimumSize(TQSize(W_MIN, (m_channels + 1 )* CHANNEL_H_MIN));
}
// QT/KDE ...
-void RecordingDataMonitor::drawContents(QPainter *painter)
+void RecordingDataMonitor::drawContents(TQPainter *painter)
{
if (painter)
internalDrawContents(*painter, true);
}
-void RecordingDataMonitor::internalDrawContents(QPainter &painter, bool repaintAll)
+void RecordingDataMonitor::internalDrawContents(TQPainter &painter, bool tqrepaintAll)
{
if (m_channels <= 0) return;
- QRect r = contentsRect();
+ TQRect r = contentsRect();
- QPen activePen (colorGroup().color(QColorGroup::Text), 1);
- QPen inactivePen (colorGroup().color(QColorGroup::Mid), 1);
- QBrush activeBrush = colorGroup().brush(QColorGroup::Text);
- QBrush inactiveBrush = colorGroup().brush(QColorGroup::Mid);
- QBrush yellowBrush(QColor(255,255,0));
- QBrush orangeBrush(QColor(255,192,0));
- QBrush redBrush (QColor(255,0, 0));
+ TQPen activePen (tqcolorGroup().color(TQColorGroup::Text), 1);
+ TQPen inactivePen (tqcolorGroup().color(TQColorGroup::Mid), 1);
+ TQBrush activeBrush = tqcolorGroup().brush(TQColorGroup::Text);
+ TQBrush inactiveBrush = tqcolorGroup().brush(TQColorGroup::Mid);
+ TQBrush yellowBrush(TQColor(255,255,0));
+ TQBrush orangeBrush(TQColor(255,192,0));
+ TQBrush redBrush (TQColor(255,0, 0));
double ranges [5] = { 0.75, 0.83, 0.91, 1.0, 999 };
- QBrush *brushes[5] = { &activeBrush, &yellowBrush, &orangeBrush, &redBrush, &redBrush };
+ TQBrush *brushes[5] = { &activeBrush, &yellowBrush, &orangeBrush, &redBrush, &redBrush };
painter.setBrush( isEnabled() ? activeBrush : inactiveBrush);
@@ -142,7 +142,7 @@ void RecordingDataMonitor::internalDrawContents(QPainter &painter, bool repaintA
m_pActiveBlocks[c] = m_channelsMax[c] ? (int)rint(nBlocks * (min_dB - dBMax) / min_dB) : 0;
- if (!repaintAll) {
+ if (!tqrepaintAll) {
if (oldActiveBlocks > m_pActiveBlocks[c]) {
startBlock = m_pActiveBlocks[c];
endBlock = oldActiveBlocks - 1;
@@ -165,19 +165,19 @@ void RecordingDataMonitor::internalDrawContents(QPainter &painter, bool repaintA
y += chHeight;
}
- if (repaintAll) {
- QFont f("Helvetica");
+ if (tqrepaintAll) {
+ TQFont f("Helvetica");
painter.setPen (activePen);
f.setPixelSize(CHANNEL_H_MIN);
painter.setFont(f);
- int maxW = QFontMetrics(f).width(i18n("%1 dB").arg((int)min_dB));
+ int maxW = TQFontMetrics(f).width(i18n("%1 dB").tqarg((int)min_dB));
int delta_dB = 5;
while (abs((long)min_dB) / delta_dB * maxW * 2 > r.width()) delta_dB *= 2;
for (int dB = 0; dB >= min_dB; dB -= delta_dB) {
- QString txt = i18n("%1 dB").arg(dB);
- int w = QFontMetrics(f).width(txt);
+ TQString txt = i18n("%1 dB").tqarg(dB);
+ int w = TQFontMetrics(f).width(txt);
int x = x0 + (int)(nBlocks * BLOCK_W_MIN * (min_dB - dB) / min_dB) - w;
if (x < x0) continue;
painter.drawText(x, y + CHANNEL_H_MIN, txt);
@@ -186,24 +186,24 @@ void RecordingDataMonitor::internalDrawContents(QPainter &painter, bool repaintA
}
-bool RecordingDataMonitor::setColors(const QColor &activeText,
- const QColor &button)
+bool RecordingDataMonitor::setColors(const TQColor &activeText,
+ const TQColor &button)
{
m_colorActiveText = activeText;
m_colorButton = button;
- QPalette pl = palette();
- QColorGroup cg = pl.inactive();
+ TQPalette pl = palette();
+ TQColorGroup cg = pl.inactive();
- QBrush fg = cg.brush(QColorGroup::Foreground),
- btn = cg.brush(QColorGroup::Button),
- lgt = cg.brush(QColorGroup::Light),
- drk = cg.brush(QColorGroup::Dark),
- mid = cg.brush(QColorGroup::Mid),
- txt = cg.brush(QColorGroup::Text),
- btx = cg.brush(QColorGroup::BrightText),
- bas = cg.brush(QColorGroup::Base),
- bg = cg.brush(QColorGroup::Background);
+ TQBrush fg = cg.brush(TQColorGroup::Foreground),
+ btn = cg.brush(TQColorGroup::Button),
+ lgt = cg.brush(TQColorGroup::Light),
+ drk = cg.brush(TQColorGroup::Dark),
+ mid = cg.brush(TQColorGroup::Mid),
+ txt = cg.brush(TQColorGroup::Text),
+ btx = cg.brush(TQColorGroup::BrightText),
+ bas = cg.brush(TQColorGroup::Base),
+ bg = cg.brush(TQColorGroup::Background);
fg.setColor (m_colorActiveText);
btn.setColor(m_colorButton);
@@ -215,19 +215,19 @@ bool RecordingDataMonitor::setColors(const QColor &activeText,
bas.setColor(m_colorButton);
bg.setColor (m_colorButton);
- QColorGroup ncg(fg, btn, lgt, drk, mid, txt, btx, bas, bg);
+ TQColorGroup ncg(fg, btn, lgt, drk, mid, txt, btx, bas, bg);
pl.setInactive(ncg);
pl.setActive(ncg);
setPalette(pl);
- if (parentWidget() && parentWidget()->backgroundPixmap() ){
+ if (tqparentWidget() && tqparentWidget()->backgroundPixmap() ){
KPixmapIO io;
- QImage i = io.convertToImage(*parentWidget()->backgroundPixmap());
- KImageEffect::fade(i, 0.5, colorGroup().color(QColorGroup::Dark));
+ TQImage i = io.convertToImage(*tqparentWidget()->backgroundPixmap());
+ KImageEffect::fade(i, 0.5, tqcolorGroup().color(TQColorGroup::Dark));
setPaletteBackgroundPixmap(io.convertToPixmap(i));
setBackgroundOrigin(WindowOrigin);
} else {
- setBackgroundColor(colorGroup().color(QColorGroup::Button));
+ setBackgroundColor(tqcolorGroup().color(TQColorGroup::Button));
}
return true;
@@ -265,9 +265,9 @@ bool RecordingDataMonitor::noticeSoundStreamData(SoundStreamID /*id*/,
for (int i = 0; i < m_channels; ++i)
m_channelsAvg[i] /= nSamples;
- QPainter paint(this);
+ TQPainter paint(this);
if (m_maxValue != old_max) {
- repaint(true);
+ tqrepaint(true);
} else {
internalDrawContents(paint, false);
}
diff --git a/kradio3/plugins/recording/recording-datamonitor.h b/kradio3/plugins/recording/recording-datamonitor.h
index c0b7c40..9d40b51 100644
--- a/kradio3/plugins/recording/recording-datamonitor.h
+++ b/kradio3/plugins/recording/recording-datamonitor.h
@@ -18,19 +18,20 @@
#ifndef KRADIO_RECORDING_DATA_MONITOR
#define KRADIO_RECORDING_DATA_MONITOR
-#include <qframe.h>
-#include <qcolor.h>
+#include <tqframe.h>
+#include <tqcolor.h>
//#include <kradio/interfaces/recording-interfaces.h>
#include "../../src/include/soundstreamclient_interfaces.h"
-class RecordingDataMonitor : public QFrame//,
+class RecordingDataMonitor : public TQFrame//,
//public ISoundStreamClient
//public IRecordingClient
{
Q_OBJECT
+ TQ_OBJECT
public:
- RecordingDataMonitor(QWidget *parent, const char *name);
+ RecordingDataMonitor(TQWidget *tqparent, const char *name);
~RecordingDataMonitor();
bool noticeSoundStreamData(SoundStreamID id,
@@ -41,14 +42,14 @@ public:
protected:
- void drawContents(QPainter *p);
- void internalDrawContents(QPainter &painter, bool repaintAll);
+ void drawContents(TQPainter *p);
+ void internalDrawContents(TQPainter &painter, bool tqrepaintAll);
// own stuff ...
protected:
void setChannels(int n);
- bool setColors(const QColor &activeColor, const QColor &bkgnd);
+ bool setColors(const TQColor &activeColor, const TQColor &bkgnd);
// data
protected:
@@ -58,7 +59,7 @@ protected:
int m_maxValue; // maximum absolute value possible for samples
int m_channels;
- QColor m_colorActiveText, m_colorButton;
+ TQColor m_colorActiveText, m_colorButton;
int *m_pActiveBlocks;
};
diff --git a/kradio3/plugins/recording/recording-monitor.cpp b/kradio3/plugins/recording/recording-monitor.cpp
index 5d6dbf9..6ce59a2 100644
--- a/kradio3/plugins/recording/recording-monitor.cpp
+++ b/kradio3/plugins/recording/recording-monitor.cpp
@@ -19,60 +19,60 @@
#include "recording-datamonitor.h"
#include "../../src/include/aboutwidget.h"
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
#include <kcombobox.h>
#include <klocale.h>
#include <kconfig.h>
#include <kaboutdata.h>
-RecordingMonitor::RecordingMonitor(const QString &name)
- : QWidget(NULL, name.ascii()),
+RecordingMonitor::RecordingMonitor(const TQString &name)
+ : TQWidget(NULL, name.ascii()),
WidgetPluginBase(name, i18n("Recording Monitor")),
m_recording(false),
- m_defaultStreamDescription(QString::null)
+ m_defaultStreamDescription(TQString())
{
setCaption(i18n("KRadio Recording Monitor"));
- QVBoxLayout *l = new QVBoxLayout(this, 10, 4);
- QGridLayout *l0 = new QGridLayout(l, 6, 2);
+ TQVBoxLayout *l = new TQVBoxLayout(this, 10, 4);
+ TQGridLayout *l0 = new TQGridLayout(l, 6, 2);
- l0->addWidget( new QLabel(i18n("SoundStream"), this), 0, 0);
+ l0->addWidget( new TQLabel(i18n("SoundStream"), this), 0, 0);
l0->addWidget(m_comboSoundStreamSelector = new KComboBox( this), 0, 1);
- l0->addWidget( new QLabel(i18n("Status"), this), 1, 0);
- l0->addWidget(m_labelStatus = new QLabel(i18n("<undefined>"), this), 1, 1);
- l0->addWidget( new QLabel(i18n("Recording File"), this), 2, 0);
- l0->addWidget(m_labelFileName = new QLabel(i18n("<undefined>"), this), 2, 1);
- l0->addWidget( new QLabel(i18n("File Size"), this), 3, 0);
- l0->addWidget(m_labelSize = new QLabel(i18n("<undefined>"), this), 3, 1);
- l0->addWidget( new QLabel(i18n("Recording Time"), this), 4, 0);
- l0->addWidget(m_labelTime = new QLabel(i18n("<undefined>"), this), 4, 1);
- l0->addWidget( new QLabel(i18n("Sample Rate"), this), 5, 0);
- l0->addWidget(m_labelRate = new QLabel(i18n("<undefined>"), this), 5, 1);
-
- QPushButton *close = new QPushButton(i18n("&Close"), this);
- m_btnStartStop = new QPushButton(i18n("&Record"), this);
- QObject::connect(close, SIGNAL(clicked()), this, SLOT(hide()));
- QObject::connect(m_btnStartStop, SIGNAL(clicked()), this, SLOT(slotStartStopRecording()));
+ l0->addWidget( new TQLabel(i18n("tqStatus"), this), 1, 0);
+ l0->addWidget(m_labeltqStatus = new TQLabel(i18n("<undefined>"), this), 1, 1);
+ l0->addWidget( new TQLabel(i18n("Recording File"), this), 2, 0);
+ l0->addWidget(m_labelFileName = new TQLabel(i18n("<undefined>"), this), 2, 1);
+ l0->addWidget( new TQLabel(i18n("File Size"), this), 3, 0);
+ l0->addWidget(m_labelSize = new TQLabel(i18n("<undefined>"), this), 3, 1);
+ l0->addWidget( new TQLabel(i18n("Recording Time"), this), 4, 0);
+ l0->addWidget(m_labelTime = new TQLabel(i18n("<undefined>"), this), 4, 1);
+ l0->addWidget( new TQLabel(i18n("Sample Rate"), this), 5, 0);
+ l0->addWidget(m_labelRate = new TQLabel(i18n("<undefined>"), this), 5, 1);
+
+ TQPushButton *close = new TQPushButton(i18n("&Close"), this);
+ m_btnStartStop = new TQPushButton(i18n("&Record"), this);
+ TQObject::connect(close, TQT_SIGNAL(clicked()), this, TQT_SLOT(hide()));
+ TQObject::connect(m_btnStartStop, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotStartStopRecording()));
m_dataMonitor = new RecordingDataMonitor(this, NULL);
m_dataMonitor->setEnabled(false);
- QHBoxLayout *hl0 = new QHBoxLayout(l);
+ TQHBoxLayout *hl0 = new TQHBoxLayout(l);
hl0->addWidget(m_dataMonitor);
- QHBoxLayout *hl2 = new QHBoxLayout(l);
- hl2->addItem(new QSpacerItem(10, 1));
+ TQHBoxLayout *hl2 = new TQHBoxLayout(l);
+ hl2->addItem(new TQSpacerItem(10, 1));
hl2->addWidget(close);
hl2->addWidget(m_btnStartStop);
- hl2->addItem(new QSpacerItem(10, 1));
+ hl2->addItem(new TQSpacerItem(10, 1));
m_comboSoundStreamSelector->insertItem(i18n("nothing"));
- QObject::connect(m_comboSoundStreamSelector, SIGNAL(activated(int)), this, SLOT(slotStreamSelected(int)));
+ TQObject::connect(m_comboSoundStreamSelector, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotStreamSelected(int)));
updateRecordingButton();
}
@@ -86,7 +86,7 @@ RecordingMonitor::~RecordingMonitor()
void RecordingMonitor::saveState (KConfig *config) const
{
- config->setGroup(QString("recordingmonitor-") + name());
+ config->setGroup(TQString("recordingmonitor-") + name());
WidgetPluginBase::saveState(config);
}
@@ -94,7 +94,7 @@ void RecordingMonitor::saveState (KConfig *config) const
void RecordingMonitor::restoreState (KConfig *config)
{
- config->setGroup(QString("recordingmonitor-") + name());
+ config->setGroup(TQString("recordingmonitor-") + name());
WidgetPluginBase::restoreState(config, false);
}
@@ -132,15 +132,15 @@ void RecordingMonitor::noticeConnectedI (ISoundStreamServer *s, bool pointer_val
s->register4_sendStartRecordingWithFormat(this);
s->register4_sendStopRecording(this);
- QMap<QString, SoundStreamID> tmp;
+ TQMap<TQString, SoundStreamID> tmp;
queryEnumerateSoundStreams(tmp);
m_comboSoundStreamSelector->clear();
m_SoundStreamID2idx.clear();
m_idx2SoundStreamID.clear();
m_comboSoundStreamSelector->insertItem(i18n("nothing"));
- QMapConstIterator<QString, SoundStreamID> end = tmp.end();
- for (QMapConstIterator<QString, SoundStreamID> it = tmp.begin(); it != end; ++it) {
+ TQMapConstIterator<TQString, SoundStreamID> end = tmp.end();
+ for (TQMapConstIterator<TQString, SoundStreamID> it = tmp.begin(); it != end; ++it) {
int idx = m_comboSoundStreamSelector->count();
m_comboSoundStreamSelector->insertItem(it.key());
m_idx2SoundStreamID[idx] = *it;
@@ -181,35 +181,35 @@ AboutPageInfo RecordingMonitor::createAboutPage()
void RecordingMonitor::show()
{
WidgetPluginBase::pShow();
- QWidget::show();
+ TQWidget::show();
}
void RecordingMonitor::showOnOrgDesktop()
{
WidgetPluginBase::pShowOnOrgDesktop();
- //QWidget::show();
+ //TQWidget::show();
}
void RecordingMonitor::hide()
{
WidgetPluginBase::pHide();
- QWidget::hide();
+ TQWidget::hide();
}
-void RecordingMonitor::showEvent(QShowEvent *e)
+void RecordingMonitor::showEvent(TQShowEvent *e)
{
- QWidget::showEvent(e);
+ TQWidget::showEvent(e);
WidgetPluginBase::pShowEvent(e);
//m_comboSoundStreamSelector->setCurrentItem(1);
//slotStreamSelected(1);
}
-void RecordingMonitor::hideEvent(QHideEvent *e)
+void RecordingMonitor::hideEvent(TQHideEvent *e)
{
- QWidget::hideEvent(e);
+ TQWidget::hideEvent(e);
WidgetPluginBase::pHideEvent(e);
m_comboSoundStreamSelector->setCurrentItem(0);
slotStreamSelected(0);
@@ -231,7 +231,7 @@ void RecordingMonitor::slotStartStopRecording()
bool RecordingMonitor::noticeSoundStreamCreated(SoundStreamID id)
{
- QString tmp = QString::null;
+ TQString tmp = TQString();
querySoundStreamDescription(id, tmp);
int idx = m_comboSoundStreamSelector->count();
@@ -249,12 +249,12 @@ bool RecordingMonitor::noticeSoundStreamCreated(SoundStreamID id)
bool RecordingMonitor::noticeSoundStreamClosed(SoundStreamID id)
{
- if (m_SoundStreamID2idx.contains(id)) {
+ if (m_SoundStreamID2idx.tqcontains(id)) {
int idx = m_SoundStreamID2idx[id];
m_idx2SoundStreamID.clear();
m_SoundStreamID2idx.remove(id);
- QMapIterator<SoundStreamID, int> end = m_SoundStreamID2idx.end();
- for (QMapIterator<SoundStreamID, int> it = m_SoundStreamID2idx.begin(); it != end; ++it) {
+ TQMapIterator<SoundStreamID, int> end = m_SoundStreamID2idx.end();
+ for (TQMapIterator<SoundStreamID, int> it = m_SoundStreamID2idx.begin(); it != end; ++it) {
if (*it > idx) {
(*it)--;
}
@@ -270,9 +270,9 @@ bool RecordingMonitor::noticeSoundStreamClosed(SoundStreamID id)
bool RecordingMonitor::noticeSoundStreamChanged(SoundStreamID id)
{
- if (m_SoundStreamID2idx.contains(id)) {
+ if (m_SoundStreamID2idx.tqcontains(id)) {
int idx = m_SoundStreamID2idx[id];
- QString tmp = QString::null;
+ TQString tmp = TQString();
querySoundStreamDescription(id, tmp);
m_comboSoundStreamSelector->changeItem(tmp, idx);
if (idx == m_comboSoundStreamSelector->currentItem()) {
@@ -317,7 +317,7 @@ bool RecordingMonitor::noticeSoundStreamData(SoundStreamID id,
int m = (int)(s / 60); s -= 60 * m;
int h = m / 60; m %= 60;
int d = h / 24; h %= 24;
- QString time;
+ TQString time;
if (d) {
time.sprintf("%dd - %02d:%02d:%05.2f", d, h, m, s);
} else {
@@ -335,14 +335,14 @@ bool RecordingMonitor::noticeSoundStreamData(SoundStreamID id,
double kB = B / 1024;
double MB = kB / 1024;
double GB = MB / 1024;
- QString str_size;
- str_size = i18n("%1 Byte").arg(KGlobal::locale()->formatNumber((int)B, 0));
- if (kB > 1) str_size = i18n("%1 kB").arg(KGlobal::locale()->formatNumber(kB, 3));
- if (MB > 1) str_size = i18n("%1 MB").arg(KGlobal::locale()->formatNumber(MB, 3));
- if (GB > 1) str_size = i18n("%1 GB").arg(KGlobal::locale()->formatNumber(GB, 3));
+ TQString str_size;
+ str_size = i18n("%1 Byte").tqarg(KGlobal::locale()->formatNumber((int)B, 0));
+ if (kB > 1) str_size = i18n("%1 kB").tqarg(KGlobal::locale()->formatNumber(kB, 3));
+ if (MB > 1) str_size = i18n("%1 MB").tqarg(KGlobal::locale()->formatNumber(MB, 3));
+ if (GB > 1) str_size = i18n("%1 GB").tqarg(KGlobal::locale()->formatNumber(GB, 3));
m_labelSize->setText(str_size);
- m_labelRate->setText(i18n("%1 Hz").arg(sf.m_SampleRate));
+ m_labelRate->setText(i18n("%1 Hz").tqarg(sf.m_SampleRate));
return true;
}
return false;
@@ -356,7 +356,7 @@ void RecordingMonitor::slotStreamSelected(int idx)
sendStopCapture(old_id);
}
- SoundStreamID id = m_idx2SoundStreamID.contains(idx) ? m_idx2SoundStreamID[idx] : SoundStreamID::InvalidID;
+ SoundStreamID id = m_idx2SoundStreamID.tqcontains(idx) ? m_idx2SoundStreamID[idx] : SoundStreamID::InvalidID;
if (id.isValid()) {
m_defaultStreamDescription = m_comboSoundStreamSelector->text(idx);
@@ -369,7 +369,7 @@ void RecordingMonitor::slotStreamSelected(int idx)
m_labelTime ->setEnabled(true);
m_labelRate ->setEnabled(true);
m_labelFileName ->setEnabled(true);
- m_labelStatus ->setEnabled(true);
+ m_labeltqStatus ->setEnabled(true);
} else {
m_dataMonitor ->setEnabled(false);
m_labelSize ->setEnabled(false);
@@ -377,7 +377,7 @@ void RecordingMonitor::slotStreamSelected(int idx)
m_labelTime ->setEnabled(false);
m_labelRate ->setEnabled(false);
m_labelFileName ->setEnabled(false);
- m_labelStatus ->setEnabled(false);
+ m_labeltqStatus ->setEnabled(false);
}
m_currentStream = id;
m_recording = false;
diff --git a/kradio3/plugins/recording/recording-monitor.h b/kradio3/plugins/recording/recording-monitor.h
index c34e927..a979c02 100644
--- a/kradio3/plugins/recording/recording-monitor.h
+++ b/kradio3/plugins/recording/recording-monitor.h
@@ -22,34 +22,35 @@
#include <config.h>
#endif
-#include <qwidget.h>
+#include <tqwidget.h>
#include "../../src/include/widgetplugins.h"
#include "../../src/include/soundstreamclient_interfaces.h"
//#include <kradio/interfaces/recording-interfaces.h>
-class QLabel;
-class QPushButton;
-class QCheckBox;
+class TQLabel;
+class TQPushButton;
+class TQCheckBox;
class RecordingDataMonitor;
class KComboBox;
-class RecordingMonitor : public QWidget,
+class RecordingMonitor : public TQWidget,
public WidgetPluginBase,
public ISoundStreamClient
//public IRecordingClient
{
Q_OBJECT
+ TQ_OBJECT
public:
- RecordingMonitor(const QString &name);
+ RecordingMonitor(const TQString &name);
virtual ~RecordingMonitor();
- const QString &name() const { return PluginBase::name(); }
- QString &name() { return PluginBase::name(); }
+ const TQString &name() const { return PluginBase::name(); }
+ TQString &name() { return PluginBase::name(); }
- virtual QString pluginClassName() const { return "RecordingMonitor"; }
+ virtual TQString pluginClassName() const { return "RecordingMonitor"; }
// WidgetPluginBase
@@ -91,31 +92,31 @@ protected:
virtual void updateRecordingButton();
- virtual void showEvent(QShowEvent *);
- virtual void hideEvent(QHideEvent *);
+ virtual void showEvent(TQShowEvent *);
+ virtual void hideEvent(TQHideEvent *);
- const QWidget *getWidget() const { return this; }
- QWidget *getWidget() { return this; }
+ const TQWidget *getWidget() const { return this; }
+ TQWidget *getWidget() { return this; }
protected:
- QLabel *m_labelSize;
- QLabel *m_labelTime;
- QLabel *m_labelRate;
- QLabel *m_labelFileName;
- QLabel *m_labelStatus;
- QPushButton *m_btnStartStop;
+ TQLabel *m_labelSize;
+ TQLabel *m_labelTime;
+ TQLabel *m_labelRate;
+ TQLabel *m_labelFileName;
+ TQLabel *m_labeltqStatus;
+ TQPushButton *m_btnStartStop;
KComboBox *m_comboSoundStreamSelector;
- QMap<SoundStreamID, int> m_SoundStreamID2idx;
- QMap<int, SoundStreamID> m_idx2SoundStreamID;
+ TQMap<SoundStreamID, int> m_SoundStreamID2idx;
+ TQMap<int, SoundStreamID> m_idx2SoundStreamID;
SoundStreamID m_currentStream;
RecordingDataMonitor *m_dataMonitor;
bool m_recording;
- QString m_defaultStreamDescription;
+ TQString m_defaultStreamDescription;
};
diff --git a/kradio3/plugins/recording/recording.cpp b/kradio3/plugins/recording/recording.cpp
index b2222ab..b85b22b 100644
--- a/kradio3/plugins/recording/recording.cpp
+++ b/kradio3/plugins/recording/recording.cpp
@@ -29,9 +29,9 @@
#include "encoder_ogg.h"
#include "encoder_pcm.h"
-#include <qevent.h>
-#include <qapplication.h>
-#include <qregexp.h>
+#include <tqevent.h>
+#include <tqapplication.h>
+#include <tqregexp.h>
#include <kconfig.h>
#include <kdeversion.h>
@@ -49,8 +49,8 @@ PLUGIN_LIBRARY_FUNCTIONS2(
///////////////////////////////////////////////////////////////////////
-Recording::Recording(const QString &name)
- : QObject(NULL, NULL),
+Recording::Recording(const TQString &name)
+ : TQObject(NULL, NULL),
PluginBase(name, i18n("KRadio Recording Plugin")),
m_config()
{
@@ -59,8 +59,8 @@ Recording::Recording(const QString &name)
Recording::~Recording()
{
- QMapIterator<SoundStreamID, RecordingEncoding*> it = m_EncodingThreads.begin();
- QMapIterator<SoundStreamID, RecordingEncoding*> end = m_EncodingThreads.end();
+ TQMapIterator<SoundStreamID, RecordingEncoding*> it = m_EncodingThreads.begin();
+ TQMapIterator<SoundStreamID, RecordingEncoding*> end = m_EncodingThreads.end();
for (; it != end; ++it) {
sendStopRecording(it.key());
}
@@ -108,14 +108,14 @@ void Recording::noticeConnectedI (ISoundStreamServer *s, bool pointer_valid)
void Recording::saveState (KConfig *c) const
{
- c->setGroup(QString("recording-") + PluginBase::name());
+ c->setGroup(TQString("recording-") + PluginBase::name());
m_config.saveConfig(c);
}
void Recording::restoreState (KConfig *c)
{
- c->setGroup(QString("recording-") + PluginBase::name());
+ c->setGroup(TQString("recording-") + PluginBase::name());
RecordingConfig cfg;
cfg.restoreConfig(c);
setRecordingConfig(cfg);
@@ -198,7 +198,7 @@ bool Recording::setOggQuality (float q)
return true;
}
-bool Recording::setRecordingDirectory(const QString &dir)
+bool Recording::setRecordingDirectory(const TQString &dir)
{
if (m_config.m_Directory != dir) {
m_config.m_Directory = dir;
@@ -223,17 +223,17 @@ bool Recording::setPreRecording (bool enable, int seconds)
m_config.m_PreRecordingSeconds = seconds;
if (enable) {
- for (QMapIterator<SoundStreamID,FileRingBuffer*> it = m_PreRecordingBuffers.begin(); it != m_PreRecordingBuffers.end(); ++it) {
+ for (TQMapIterator<SoundStreamID,FileRingBuffer*> it = m_PreRecordingBuffers.begin(); it != m_PreRecordingBuffers.end(); ++it) {
if (*it != NULL) {
delete *it;
}
- *it = new FileRingBuffer(m_config.m_Directory + "/kradio-prerecord-"+QString::number(it.key().getID()), m_config.m_PreRecordingSeconds * m_config.m_SoundFormat.m_SampleRate * m_config.m_SoundFormat.frameSize());
+ *it = new FileRingBuffer(m_config.m_Directory + "/kradio-prerecord-"+TQString::number(it.key().getID()), m_config.m_PreRecordingSeconds * m_config.m_SoundFormat.m_SampleRate * m_config.m_SoundFormat.frameSize());
SoundFormat sf = m_config.m_SoundFormat;
sendStartCaptureWithFormat(it.key(), sf, sf, false);
}
}
else {
- for (QMapIterator<SoundStreamID,FileRingBuffer*> it = m_PreRecordingBuffers.begin(); it != m_PreRecordingBuffers.end(); ++it) {
+ for (TQMapIterator<SoundStreamID,FileRingBuffer*> it = m_PreRecordingBuffers.begin(); it != m_PreRecordingBuffers.end(); ++it) {
if (*it != NULL) {
sendStopCapture(it.key());
delete *it;
@@ -268,7 +268,7 @@ float Recording::getOggQuality () const
return m_config.m_oggQuality;
}
-const QString &Recording::getRecordingDirectory() const
+const TQString &Recording::getRecordingDirectory() const
{
return m_config.m_Directory;
}
@@ -310,11 +310,11 @@ bool Recording::setRecordingConfig(const RecordingConfig &c)
// ISoundStreamClient
bool Recording::startPlayback(SoundStreamID id)
{
- if (m_PreRecordingBuffers.contains(id))
+ if (m_PreRecordingBuffers.tqcontains(id))
delete m_PreRecordingBuffers[id];
m_PreRecordingBuffers[id] = NULL;
if (m_config.m_PreRecordingEnable) {
- m_PreRecordingBuffers[id] = new FileRingBuffer(m_config.m_Directory + "/kradio-prerecord-"+QString::number(id.getID()), m_config.m_PreRecordingSeconds * m_config.m_SoundFormat.m_SampleRate * m_config.m_SoundFormat.frameSize());
+ m_PreRecordingBuffers[id] = new FileRingBuffer(m_config.m_Directory + "/kradio-prerecord-"+TQString::number(id.getID()), m_config.m_PreRecordingSeconds * m_config.m_SoundFormat.m_SampleRate * m_config.m_SoundFormat.frameSize());
SoundFormat sf = m_config.m_SoundFormat;
sendStartCaptureWithFormat(id, sf, sf, false);
}
@@ -323,7 +323,7 @@ bool Recording::startPlayback(SoundStreamID id)
bool Recording::stopPlayback(SoundStreamID id)
{
- if (m_PreRecordingBuffers.contains(id)) {
+ if (m_PreRecordingBuffers.tqcontains(id)) {
if (m_PreRecordingBuffers[id])
delete m_PreRecordingBuffers[id];
m_PreRecordingBuffers.remove(id);
@@ -377,17 +377,17 @@ bool Recording::startRecordingWithFormat(SoundStreamID id, const SoundFormat &sf
bool Recording::stopRecording(SoundStreamID id)
{
- if (m_EncodingThreads.contains(id)) {
+ if (m_EncodingThreads.tqcontains(id)) {
sendStopCapture(id);
if (m_config.m_PreRecordingEnable) {
- if (!m_PreRecordingBuffers.contains(id)) {
+ if (!m_PreRecordingBuffers.tqcontains(id)) {
if (m_PreRecordingBuffers[id] != NULL) {
delete m_PreRecordingBuffers[id];
}
bool b = false;
queryIsPlaybackRunning(id, b);
if (b) {
- m_PreRecordingBuffers[id] = new FileRingBuffer(m_config.m_Directory + "/kradio-prerecord-"+QString::number(id.getID()), m_config.m_PreRecordingSeconds * m_config.m_SoundFormat.m_SampleRate * m_config.m_SoundFormat.frameSize());
+ m_PreRecordingBuffers[id] = new FileRingBuffer(m_config.m_Directory + "/kradio-prerecord-"+TQString::number(id.getID()), m_config.m_PreRecordingSeconds * m_config.m_SoundFormat.m_SampleRate * m_config.m_SoundFormat.frameSize());
} else {
m_PreRecordingBuffers[id] = NULL;
}
@@ -406,7 +406,7 @@ bool Recording::noticeSoundStreamData(SoundStreamID id,
const SoundMetaData &md
)
{
- if (m_PreRecordingBuffers.contains(id) && m_PreRecordingBuffers[id] != NULL) {
+ if (m_PreRecordingBuffers.tqcontains(id) && m_PreRecordingBuffers[id] != NULL) {
FileRingBuffer &fbuf = *m_PreRecordingBuffers[id];
if (fbuf.getFreeSize() < size) {
@@ -427,13 +427,13 @@ bool Recording::noticeSoundStreamData(SoundStreamID id,
// fbuf.addData((char*)tmp, sizeof(tmp));
// //END DEBUG
- if (m_EncodingThreads.contains(id)) {
+ if (m_EncodingThreads.tqcontains(id)) {
- //logDebug("recording packet: " + QString::number(size));
+ //logDebug("recording packet: " + TQString::number(size));
RecordingEncoding *thread = m_EncodingThreads[id];
- //logDebug("noticeSoundStreamData thread = " + QString::number((long long)thread, 16));
+ //logDebug("noticeSoundStreamData thread = " + TQString::number((long long)thread, 16));
size_t remSize = fbuf.getFillSize();
@@ -464,13 +464,13 @@ bool Recording::noticeSoundStreamData(SoundStreamID id,
return true;
}
- else if (m_EncodingThreads.contains(id)) {
+ else if (m_EncodingThreads.tqcontains(id)) {
- //logDebug("recording packet: " + QString::number(size));
+ //logDebug("recording packet: " + TQString::number(size));
RecordingEncoding *thread = m_EncodingThreads[id];
- //logDebug("noticeSoundStreamData thread = " + QString::number((long long)thread, 16));
+ //logDebug("noticeSoundStreamData thread = " + TQString::number((long long)thread, 16));
size_t remSize = size;
const char *remData = data;
@@ -479,7 +479,7 @@ bool Recording::noticeSoundStreamData(SoundStreamID id,
size_t bufferSize = remSize;
char *buf = thread->lockInputBuffer(bufferSize);
if (!buf) {
- logWarning(i18n("Encoder input buffer overflow (buffer configuration problem?). Skipped %1 input bytes").arg(QString::number(remSize)));
+ logWarning(i18n("Encoder input buffer overflow (buffer configuration problem?). Skipped %1 input bytes").tqarg(TQString::number(remSize)));
break;
}
if (bufferSize > remSize) {
@@ -503,14 +503,14 @@ bool Recording::noticeSoundStreamData(SoundStreamID id,
bool Recording::startEncoder(SoundStreamID ssid, const RecordingConfig &cfg)
{
- if (m_EncodingThreads.contains(ssid))
+ if (m_EncodingThreads.tqcontains(ssid))
return false;
SoundStreamID encID = createNewSoundStream(ssid, false);
m_RawStreams2EncodedStreams[ssid] = encID;
m_EncodedStreams2RawStreams[encID] = ssid;
- QString ext = ".wav";
+ TQString ext = ".wav";
switch (m_config.m_OutputFormat) {
case RecordingConfig::outputWAV: ext = ".wav"; break;
case RecordingConfig::outputAIFF: ext = ".aiff"; break;
@@ -526,16 +526,16 @@ bool Recording::startEncoder(SoundStreamID ssid, const RecordingConfig &cfg)
}
const RadioStation *rs = NULL;
querySoundStreamRadioStation(ssid, rs);
- QString station = rs ? rs->name() + "-" : "";
- station.replace(QRegExp("[/*?]"), "_");
+ TQString station = rs ? rs->name() + "-" : "";
+ station.tqreplace(TQRegExp("[/*?]"), "_");
- QDate date = QDate::currentDate();
- QTime time = QTime::currentTime();
- QString sdate;
+ TQDate date = TQDate::tqcurrentDate();
+ TQTime time = TQTime::currentTime();
+ TQString sdate;
sdate.sprintf("%d.%d.%d.%d.%d",date.year(),date.month(),date.day(),time.hour(),time.minute());
- QString output = m_config.m_Directory
+ TQString output = m_config.m_Directory
+ "/kradio-recording-"
+ station
+ sdate
@@ -570,7 +570,7 @@ bool Recording::startEncoder(SoundStreamID ssid, const RecordingConfig &cfg)
// store thread even if it has indicated an error
m_EncodingThreads[ssid] = thread;
- //logDebug("startEncoder thread = " + QString::number((long long)thread, 16));
+ //logDebug("startEncoder thread = " + TQString::number((long long)thread, 16));
notifySoundStreamCreated(encID);
return !thread->error();
@@ -579,14 +579,14 @@ bool Recording::startEncoder(SoundStreamID ssid, const RecordingConfig &cfg)
void Recording::stopEncoder(SoundStreamID id)
{
- if (m_EncodingThreads.contains(id)) {
+ if (m_EncodingThreads.tqcontains(id)) {
RecordingEncoding *thread = m_EncodingThreads[id];
thread->setDone();
- //logDebug("stopEncoder thread = " + QString::number((long long)thread, 16));
- //logDebug("stopEncoder thread error = " + QString::number(thread->error(), 16));
+ //logDebug("stopEncoder thread = " + TQString::number((long long)thread, 16));
+ //logDebug("stopEncoder thread error = " + TQString::number(thread->error(), 16));
#if (KDE_VERSION_MAJOR >= 3) && (KDE_VERSION_MINOR >= 1)
// FIXME: set a timer and do waiting "in background"
@@ -604,7 +604,7 @@ void Recording::stopEncoder(SoundStreamID id)
//m_context.setError();
logError(thread->errorString());
} else {
- //Q_UINT64 size = thread->encodedSize();
+ //TQ_UINT64 size = thread->encodedSize();
//m_context.setEncodedSize(low, high);
//notifyRecordingContextChanged(m_context);
}
@@ -621,24 +621,24 @@ void Recording::stopEncoder(SoundStreamID id)
}
-bool Recording::event(QEvent *_e)
+bool Recording::event(TQEvent *_e)
{
if (SoundStreamEvent::isSoundStreamEvent(_e)) {
SoundStreamEvent *e = static_cast<SoundStreamEvent*>(_e);
SoundStreamID id = e->getSoundStreamID();
- if (m_EncodingThreads.contains(id)) {
+ if (m_EncodingThreads.tqcontains(id)) {
RecordingEncoding *thread = m_EncodingThreads[id];
- //logDebug("Recording::event: thread = " + QString::number((long long)thread, 16));
+ //logDebug("Recording::event: thread = " + TQString::number((long long)thread, 16));
if (thread->error()) {
logError(thread->errorString());
//m_context.setError();
stopEncoder(id);
} else {
- //Q_UINT64 size = thread->encodedSize();
+ //TQ_UINT64 size = thread->encodedSize();
//m_context.setEncodedSize(low, high);
//notifyRecordingContextChanged(m_context);
if (e->type() == EncodingTerminated) {
@@ -649,21 +649,21 @@ bool Recording::event(QEvent *_e)
notifySoundStreamData(m_RawStreams2EncodedStreams[id], thread->config().m_SoundFormat,
step->data(), step->size(), consumed_size, step->metaData());
if (consumed_size != SIZE_T_DONT_CARE && consumed_size < step->size()) {
- logError(i18n("Recording::notifySoundStreamData(encoded data): Receivers skipped %1 Bytes").arg(step->size() - consumed_size));
+ logError(i18n("Recording::notifySoundStreamData(encoded data): Receivers skipped %1 Bytes").tqarg(step->size() - consumed_size));
}
}
}
}
return true;
} else {
- return QObject::event(_e);
+ return TQObject::event(_e);
}
}
-bool Recording::getSoundStreamDescription(SoundStreamID id, QString &descr) const
+bool Recording::getSoundStreamDescription(SoundStreamID id, TQString &descr) const
{
- if (m_EncodedStreams2RawStreams.contains(id)) {
+ if (m_EncodedStreams2RawStreams.tqcontains(id)) {
if (querySoundStreamDescription(m_EncodedStreams2RawStreams[id], descr)) {
descr = name() + " - " + descr;
return true;
@@ -675,7 +675,7 @@ bool Recording::getSoundStreamDescription(SoundStreamID id, QString &descr) cons
bool Recording::getSoundStreamRadioStation(SoundStreamID id, const RadioStation *&rs) const
{
- if (m_EncodedStreams2RawStreams.contains(id)) {
+ if (m_EncodedStreams2RawStreams.tqcontains(id)) {
if (querySoundStreamRadioStation(m_EncodedStreams2RawStreams[id], rs)) {
return true;
}
@@ -684,11 +684,11 @@ bool Recording::getSoundStreamRadioStation(SoundStreamID id, const RadioStation
}
-bool Recording::enumerateSoundStreams(QMap<QString, SoundStreamID> &list) const
+bool Recording::enumerateSoundStreams(TQMap<TQString, SoundStreamID> &list) const
{
- QMapConstIterator<SoundStreamID,SoundStreamID> end = m_RawStreams2EncodedStreams.end();
- for (QMapConstIterator<SoundStreamID,SoundStreamID> it = m_RawStreams2EncodedStreams.begin(); it != end; ++it) {
- QString tmp = QString::null;
+ TQMapConstIterator<SoundStreamID,SoundStreamID> end = m_RawStreams2EncodedStreams.end();
+ for (TQMapConstIterator<SoundStreamID,SoundStreamID> it = m_RawStreams2EncodedStreams.begin(); it != end; ++it) {
+ TQString tmp = TQString();
getSoundStreamDescription(*it, tmp);
list[tmp] = *it;
}
@@ -698,7 +698,7 @@ bool Recording::enumerateSoundStreams(QMap<QString, SoundStreamID> &list) const
bool Recording::noticeSoundStreamChanged(SoundStreamID id)
{
- if (m_RawStreams2EncodedStreams.contains(id)) {
+ if (m_RawStreams2EncodedStreams.tqcontains(id)) {
notifySoundStreamChanged(m_RawStreams2EncodedStreams[id]);
return true;
}
@@ -708,7 +708,7 @@ bool Recording::noticeSoundStreamChanged(SoundStreamID id)
bool Recording::isRecordingRunning(SoundStreamID id, bool &b, SoundFormat &sf) const
{
- if (m_EncodingThreads.contains(id)) {
+ if (m_EncodingThreads.tqcontains(id)) {
b = m_EncodingThreads[id]->running();
sf = getSoundFormat();
return true;
@@ -719,13 +719,13 @@ bool Recording::isRecordingRunning(SoundStreamID id, bool &b, SoundFormat &sf) c
bool Recording::noticeSoundStreamClosed(SoundStreamID id)
{
- if (m_PreRecordingBuffers.contains(id)) {
+ if (m_PreRecordingBuffers.tqcontains(id)) {
if (m_PreRecordingBuffers[id])
delete m_PreRecordingBuffers[id];
m_PreRecordingBuffers.remove(id);
}
- if (m_EncodingThreads.contains(id)) {
+ if (m_EncodingThreads.tqcontains(id)) {
sendStopRecording(id);
return true;
}
diff --git a/kradio3/plugins/recording/recording.h b/kradio3/plugins/recording/recording.h
index bef3a3a..9b8d41c 100644
--- a/kradio3/plugins/recording/recording.h
+++ b/kradio3/plugins/recording/recording.h
@@ -23,9 +23,9 @@
#endif
-#include <qobject.h>
-#include <qstring.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqmap.h>
#include "../../src/include/plugins.h"
#include "../../src/include/timecontrol_interfaces.h"
@@ -37,24 +37,25 @@
class RadioStation;
class StationList;
-class QSocketNotifier;
+class TQSocketNotifier;
class RecordingEncoding;
class FileRingBuffer;
-class Recording : public QObject,
+class Recording : public TQObject,
public PluginBase,
public ISoundStreamClient,
public IRecCfg
{
Q_OBJECT
+ TQ_OBJECT
public:
- Recording(const QString &name);
+ Recording(const TQString &name);
~Recording();
- virtual QString pluginClassName() const { return "Recording"; }
+ virtual TQString pluginClassName() const { return "Recording"; }
- virtual const QString &name() const { return PluginBase::name(); }
- virtual QString &name() { return PluginBase::name(); }
+ virtual const TQString &name() const { return PluginBase::name(); }
+ virtual TQString &name() { return PluginBase::name(); }
virtual bool connectI(Interface *i);
virtual bool disconnectI(Interface *i);
@@ -80,7 +81,7 @@ protected:
bool setSoundFormat (const SoundFormat &sf);
bool setMP3Quality (int q);
bool setOggQuality (float q);
- bool setRecordingDirectory(const QString &dir);
+ bool setRecordingDirectory(const TQString &dir);
bool setOutputFormat (RecordingConfig::OutputFormat of);
bool setPreRecording (bool enable, int seconds);
bool setRecordingConfig (const RecordingConfig &cfg);
@@ -89,7 +90,7 @@ protected:
const SoundFormat &getSoundFormat () const;
int getMP3Quality () const;
float getOggQuality () const;
- const QString &getRecordingDirectory() const;
+ const TQString &getRecordingDirectory() const;
RecordingConfig::OutputFormat getOutputFormat() const;
bool getPreRecording(int &seconds) const;
const RecordingConfig &getRecordingConfig() const;
@@ -107,17 +108,17 @@ protected:
bool stopRecording(SoundStreamID id);
bool isRecordingRunning(SoundStreamID id, bool &b, SoundFormat &sf) const;
- bool getSoundStreamDescription(SoundStreamID id, QString &descr) const;
+ bool getSoundStreamDescription(SoundStreamID id, TQString &descr) const;
bool getSoundStreamRadioStation(SoundStreamID id, const RadioStation *&rs) const;
bool noticeSoundStreamClosed(SoundStreamID id);
bool noticeSoundStreamChanged(SoundStreamID id);
- bool enumerateSoundStreams(QMap<QString, SoundStreamID> &list) const;
+ bool enumerateSoundStreams(TQMap<TQString, SoundStreamID> &list) const;
protected slots:
- bool event(QEvent *e);
+ bool event(TQEvent *e);
protected:
@@ -127,11 +128,11 @@ protected:
protected:
RecordingConfig m_config;
- QMap<SoundStreamID, FileRingBuffer*> m_PreRecordingBuffers;
+ TQMap<SoundStreamID, FileRingBuffer*> m_PreRecordingBuffers;
- QMap<SoundStreamID, RecordingEncoding*> m_EncodingThreads;
- QMap<SoundStreamID, SoundStreamID> m_RawStreams2EncodedStreams;
- QMap<SoundStreamID, SoundStreamID> m_EncodedStreams2RawStreams;
+ TQMap<SoundStreamID, RecordingEncoding*> m_EncodingThreads;
+ TQMap<SoundStreamID, SoundStreamID> m_RawStreams2EncodedStreams;
+ TQMap<SoundStreamID, SoundStreamID> m_EncodedStreams2RawStreams;
};
/* PreRecording Notes: listen for startplayback, stopplayback, closestream
diff --git a/kradio3/plugins/recording/soundstreamevent.h b/kradio3/plugins/recording/soundstreamevent.h
index 0cf6cdd..c7b986e 100644
--- a/kradio3/plugins/recording/soundstreamevent.h
+++ b/kradio3/plugins/recording/soundstreamevent.h
@@ -22,20 +22,20 @@
#include <config.h>
#endif
-#include <qevent.h>
+#include <tqevent.h>
#include "../../src/include/sound_metadata.h"
-const QEvent::Type EncodingTerminated = (QEvent::Type)(QEvent::User+1);
-const QEvent::Type EncodingStep = (QEvent::Type)(QEvent::User+2);
+const TQEvent::Type EncodingTerminated = (TQEvent::Type)(TQEvent::User+1);
+const TQEvent::Type EncodingStep = (TQEvent::Type)(TQEvent::User+2);
-class SoundStreamEvent : public QEvent
+class SoundStreamEvent : public TQEvent
{
public:
- SoundStreamEvent(QEvent::Type t, SoundStreamID id) : QEvent(t), m_SSID(id) {}
+ SoundStreamEvent(TQEvent::Type t, SoundStreamID id) : TQEvent(t), m_SSID(id) {}
const SoundStreamID &getSoundStreamID() const { return m_SSID; }
- static bool isSoundStreamEvent (const QEvent *e) { return e && ((e->type() == EncodingTerminated) || (e->type() == EncodingStep)); }
+ static bool isSoundStreamEvent (const TQEvent *e) { return e && ((e->type() == EncodingTerminated) || (e->type() == EncodingStep)); }
protected:
SoundStreamID m_SSID;
@@ -76,7 +76,7 @@ public:
size_t size() const { return m_Size; }
const SoundMetaData &metaData() const { return m_MetaData; }
- static bool isSoundStreamEncodingStep (const QEvent *e) { return e && (e->type() == EncodingStep); }
+ static bool isSoundStreamEncodingStep (const TQEvent *e) { return e && (e->type() == EncodingStep); }
protected:
char *m_Data;