summaryrefslogtreecommitdiffstats
path: root/kradio3/plugins/streaming
diff options
context:
space:
mode:
Diffstat (limited to 'kradio3/plugins/streaming')
-rw-r--r--kradio3/plugins/streaming/streaming-configuration-ui.ui96
-rw-r--r--kradio3/plugins/streaming/streaming-configuration.cpp142
-rw-r--r--kradio3/plugins/streaming/streaming-configuration.h7
-rw-r--r--kradio3/plugins/streaming/streaming-job.cpp36
-rw-r--r--kradio3/plugins/streaming/streaming-job.h23
-rw-r--r--kradio3/plugins/streaming/streaming.cpp132
-rw-r--r--kradio3/plugins/streaming/streaming.h43
7 files changed, 241 insertions, 238 deletions
diff --git a/kradio3/plugins/streaming/streaming-configuration-ui.ui b/kradio3/plugins/streaming/streaming-configuration-ui.ui
index 001d4ae..cadd4a7 100644
--- a/kradio3/plugins/streaming/streaming-configuration-ui.ui
+++ b/kradio3/plugins/streaming/streaming-configuration-ui.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>StreamingConfigurationUI</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>StreamingConfigurationUI</cstring>
</property>
@@ -19,9 +19,9 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout48</cstring>
+ <cstring>tqlayout48</cstring>
</property>
<grid>
<property name="name">
@@ -106,7 +106,7 @@
<enum>Accept</enum>
</property>
</widget>
- <widget class="QLabel" row="0" column="2">
+ <widget class="TQLabel" row="0" column="2">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@@ -114,7 +114,7 @@
<string>Capture URLs</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -122,15 +122,15 @@
<string>Playback URLs</string>
</property>
</widget>
- <widget class="QLayoutWidget" row="1" column="3">
+ <widget class="TQLayoutWidget" row="1" column="3">
<property name="name">
- <cstring>layout38_2</cstring>
+ <cstring>tqlayout38_2</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>m_pbNewCaptureURL</cstring>
</property>
@@ -142,13 +142,13 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>30</width>
<height>30</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>30</width>
<height>30</height>
@@ -161,7 +161,7 @@
<iconset>"filenew2"</iconset>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>m_pbDeleteCaptureURL</cstring>
</property>
@@ -173,13 +173,13 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>30</width>
<height>30</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>30</width>
<height>30</height>
@@ -202,14 +202,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>10</width>
<height>10</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>m_pbUpCaptureURL</cstring>
</property>
@@ -221,13 +221,13 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>30</width>
<height>30</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>30</width>
<height>30</height>
@@ -240,7 +240,7 @@
<iconset>"1uparrow"</iconset>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>m_pbDownCaptureURL</cstring>
</property>
@@ -252,13 +252,13 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>30</width>
<height>30</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>30</width>
<height>30</height>
@@ -273,15 +273,15 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget" row="1" column="1">
+ <widget class="TQLayoutWidget" row="1" column="1">
<property name="name">
- <cstring>layout38</cstring>
+ <cstring>tqlayout38</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>m_pbNewPlaybackURL</cstring>
</property>
@@ -293,13 +293,13 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>30</width>
<height>30</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>30</width>
<height>30</height>
@@ -312,7 +312,7 @@
<iconset>"filenew2"</iconset>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>m_pbDeletePlaybackURL</cstring>
</property>
@@ -324,13 +324,13 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>30</width>
<height>30</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>30</width>
<height>30</height>
@@ -353,14 +353,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>10</width>
<height>10</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>m_pbUpPlaybackURL</cstring>
</property>
@@ -372,13 +372,13 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>30</width>
<height>30</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>30</width>
<height>30</height>
@@ -391,7 +391,7 @@
<iconset>"1uparrow"</iconset>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>m_pbDownPlaybackURL</cstring>
</property>
@@ -403,13 +403,13 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>30</width>
<height>30</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>30</width>
<height>30</height>
@@ -426,7 +426,7 @@
</widget>
</grid>
</widget>
- <widget class="QGroupBox" row="1" column="0">
+ <widget class="TQGroupBox" row="1" column="0">
<property name="name">
<cstring>groupBox3</cstring>
</property>
@@ -463,7 +463,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>lableBits</cstring>
</property>
@@ -471,7 +471,7 @@
<string>Sample Bits</string>
</property>
</widget>
- <widget class="QLabel" row="5" column="0">
+ <widget class="TQLabel" row="5" column="0">
<property name="name">
<cstring>lableChannels</cstring>
</property>
@@ -479,7 +479,7 @@
<string>Channels</string>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>lableEndianess</cstring>
</property>
@@ -601,7 +601,7 @@
<number>4</number>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>labelRate_2</cstring>
</property>
@@ -609,7 +609,7 @@
<string>Buffer Size</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>labelRate_2_2</cstring>
</property>
@@ -617,7 +617,7 @@
<string>Format</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>labelRate</cstring>
</property>
@@ -658,7 +658,7 @@
<property name="sizeType">
<enum>Minimum</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>140</width>
<height>20</height>
@@ -675,7 +675,7 @@
<property name="sizeType">
<enum>Minimum</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>140</width>
<height>20</height>
@@ -692,7 +692,7 @@
<property name="sizeType">
<enum>Minimum</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>140</width>
<height>20</height>
@@ -709,7 +709,7 @@
<property name="sizeType">
<enum>Minimum</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>140</width>
<height>20</height>
@@ -726,7 +726,7 @@
<property name="sizeType">
<enum>Minimum</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>140</width>
<height>20</height>
@@ -762,7 +762,7 @@
<include location="global" impldecl="in implementation">kiconloader.h</include>
</includes>
<pixmapfunction>SmallIconSet</pixmapfunction>
-<layoutdefaults spacing="6" margin="0"/>
+<tqlayoutdefaults spacing="6" margin="0"/>
<includehints>
<includehint>klistview.h</includehint>
<includehint>klistview.h</includehint>
diff --git a/kradio3/plugins/streaming/streaming-configuration.cpp b/kradio3/plugins/streaming/streaming-configuration.cpp
index ea1801d..89a5949 100644
--- a/kradio3/plugins/streaming/streaming-configuration.cpp
+++ b/kradio3/plugins/streaming/streaming-configuration.cpp
@@ -15,7 +15,7 @@
* *
***************************************************************************/
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kurlrequester.h>
#include <knuminput.h>
@@ -28,33 +28,33 @@
#include "streaming-configuration.h"
#include "streaming.h"
-StreamingConfiguration::StreamingConfiguration (QWidget *parent, StreamingDevice *streamer)
- : StreamingConfigurationUI(parent),
+StreamingConfiguration::StreamingConfiguration (TQWidget *tqparent, StreamingDevice *streamer)
+ : StreamingConfigurationUI(tqparent),
m_ignore_updates(false),
m_dirty(true),
m_StreamingDevice(streamer)
{
- connect(m_pbNewPlaybackURL, SIGNAL(clicked()), this, SLOT(slotNewPlaybackChannel()));
- connect(m_pbDeletePlaybackURL, SIGNAL(clicked()), this, SLOT(slotDeletePlaybackChannel()));
- connect(m_pbUpPlaybackURL, SIGNAL(clicked()), this, SLOT(slotUpPlaybackChannel()));
- connect(m_pbDownPlaybackURL, SIGNAL(clicked()), this, SLOT(slotDownPlaybackChannel()));
- connect(m_ListPlaybackURLs, SIGNAL(selectionChanged()), this, SLOT(slotPlaybackSelectionChanged()));
- connect(m_ListPlaybackURLs, SIGNAL(itemRenamed(QListViewItem *)), this, SLOT(slotSetDirty()));
-
- connect(m_pbNewCaptureURL, SIGNAL(clicked()), this, SLOT(slotNewCaptureChannel()));
- connect(m_pbDeleteCaptureURL, SIGNAL(clicked()), this, SLOT(slotDeleteCaptureChannel()));
- connect(m_pbUpCaptureURL, SIGNAL(clicked()), this, SLOT(slotUpCaptureChannel()));
- connect(m_pbDownCaptureURL, SIGNAL(clicked()), this, SLOT(slotDownCaptureChannel()));
- connect(m_ListCaptureURLs, SIGNAL(selectionChanged()), this, SLOT(slotCaptureSelectionChanged()));
- connect(m_ListCaptureURLs, SIGNAL(itemRenamed(QListViewItem *)), this, SLOT(slotSetDirty()));
-
- connect(m_cbBits, SIGNAL(activated(int)), this, SLOT(slotUpdateSoundFormat()));
- connect(m_cbChannels, SIGNAL(activated(int)), this, SLOT(slotUpdateSoundFormat()));
- connect(m_cbEndianess, SIGNAL(activated(int)), this, SLOT(slotUpdateSoundFormat()));
- connect(m_cbFormat, SIGNAL(activated(int)), this, SLOT(slotUpdateSoundFormat()));
- connect(m_cbRate, SIGNAL(activated(int)), this, SLOT(slotUpdateSoundFormat()));
- connect(m_cbSign, SIGNAL(activated(int)), this, SLOT(slotUpdateSoundFormat()));
- connect(m_sbBufferSize, SIGNAL(valueChanged(int)), this, SLOT(slotUpdateSoundFormat()));
+ connect(m_pbNewPlaybackURL, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNewPlaybackChannel()));
+ connect(m_pbDeletePlaybackURL, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDeletePlaybackChannel()));
+ connect(m_pbUpPlaybackURL, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUpPlaybackChannel()));
+ connect(m_pbDownPlaybackURL, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDownPlaybackChannel()));
+ connect(m_ListPlaybackURLs, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotPlaybackSelectionChanged()));
+ connect(m_ListPlaybackURLs, TQT_SIGNAL(itemRenamed(TQListViewItem *)), this, TQT_SLOT(slotSetDirty()));
+
+ connect(m_pbNewCaptureURL, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNewCaptureChannel()));
+ connect(m_pbDeleteCaptureURL, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDeleteCaptureChannel()));
+ connect(m_pbUpCaptureURL, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUpCaptureChannel()));
+ connect(m_pbDownCaptureURL, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDownCaptureChannel()));
+ connect(m_ListCaptureURLs, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotCaptureSelectionChanged()));
+ connect(m_ListCaptureURLs, TQT_SIGNAL(itemRenamed(TQListViewItem *)), this, TQT_SLOT(slotSetDirty()));
+
+ connect(m_cbBits, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotUpdateSoundFormat()));
+ connect(m_cbChannels, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotUpdateSoundFormat()));
+ connect(m_cbEndianess, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotUpdateSoundFormat()));
+ connect(m_cbFormat, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotUpdateSoundFormat()));
+ connect(m_cbRate, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotUpdateSoundFormat()));
+ connect(m_cbSign, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotUpdateSoundFormat()));
+ connect(m_sbBufferSize, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotUpdateSoundFormat()));
m_ListPlaybackURLs->setAllColumnsShowFocus(true);
m_ListPlaybackURLs->setSorting(-1);
@@ -78,7 +78,7 @@ void StreamingConfiguration::slotOK()
m_StreamingDevice->resetPlaybackStreams(false);
m_StreamingDevice->resetCaptureStreams(false);
- QListViewItem *item = m_ListPlaybackURLs->firstChild();
+ TQListViewItem *item = m_ListPlaybackURLs->firstChild();
for (int i = 0; item; ++i, item = item->nextSibling()) {
m_StreamingDevice->addPlaybackStream(item->text(1), m_PlaybackSoundFormats[i], m_PlaybackBufferSizes[i], !item->nextSibling());
}
@@ -97,8 +97,8 @@ void StreamingConfiguration::slotCancel()
if (!m_dirty)
return;
- const QStringList &playbackChannels = m_StreamingDevice->getPlaybackChannels();
- const QStringList &captureChannels = m_StreamingDevice->getCaptureChannels();
+ const TQStringList &playbackChannels = m_StreamingDevice->getPlaybackChannels();
+ const TQStringList &captureChannels = m_StreamingDevice->getCaptureChannels();
m_ListPlaybackURLs->clear();
m_PlaybackBufferSizes.clear();
@@ -107,13 +107,13 @@ void StreamingConfiguration::slotCancel()
for (unsigned int i = 0; i < playbackChannels.size(); ++i) {
SoundFormat sf;
size_t buffer_size;
- QString url;
+ TQString url;
m_StreamingDevice->getPlaybackStreamOptions(playbackChannels[i], url, sf, buffer_size);
m_PlaybackSoundFormats.append(sf);
m_PlaybackBufferSizes.append(buffer_size);
- QListViewItem *item = new QListViewItem(m_ListPlaybackURLs, m_ListPlaybackURLs->lastChild());
- item->setText(0, QString::number(m_ListPlaybackURLs->childCount()));
+ TQListViewItem *item = new TQListViewItem(m_ListPlaybackURLs, m_ListPlaybackURLs->lastChild());
+ item->setText(0, TQString::number(m_ListPlaybackURLs->childCount()));
item->setText(1, url);
item->setRenameEnabled(1, true);
}
@@ -125,13 +125,13 @@ void StreamingConfiguration::slotCancel()
for (unsigned int i = 0; i < captureChannels.size(); ++i) {
SoundFormat sf;
size_t buffer_size;
- QString url;
+ TQString url;
m_StreamingDevice->getCaptureStreamOptions(captureChannels[i], url, sf, buffer_size);
m_CaptureSoundFormats.append(sf);
m_CaptureBufferSizes.append(buffer_size);
- QListViewItem *item = new QListViewItem(m_ListCaptureURLs, m_ListCaptureURLs->lastChild());
- item->setText(0, QString::number(m_ListCaptureURLs->childCount()));
+ TQListViewItem *item = new TQListViewItem(m_ListCaptureURLs, m_ListCaptureURLs->lastChild());
+ item->setText(0, TQString::number(m_ListCaptureURLs->childCount()));
item->setText(1, url);
item->setRenameEnabled(1, true);
}
@@ -150,8 +150,8 @@ void StreamingConfiguration::slotUpdateConfig()
void StreamingConfiguration::slotNewPlaybackChannel()
{
slotSetDirty();
- QListViewItem *item = new QListViewItem(m_ListPlaybackURLs, m_ListPlaybackURLs->lastChild());
- item->setText(0, QString::number(m_ListPlaybackURLs->childCount()));
+ TQListViewItem *item = new TQListViewItem(m_ListPlaybackURLs, m_ListPlaybackURLs->lastChild());
+ item->setText(0, TQString::number(m_ListPlaybackURLs->childCount()));
item->setText(1, i18n("new channel"));
item->setRenameEnabled(1,true);
item->startRename(1);
@@ -166,10 +166,10 @@ void StreamingConfiguration::slotNewPlaybackChannel()
void StreamingConfiguration::slotDeletePlaybackChannel()
{
slotSetDirty();
- QListViewItem *item = m_ListPlaybackURLs->selectedItem();
+ TQListViewItem *item = m_ListPlaybackURLs->selectedItem();
if (item) {
int idx = 0;
- QListViewItem *i = m_ListPlaybackURLs->firstChild(),
+ TQListViewItem *i = m_ListPlaybackURLs->firstChild(),
*prev = NULL,
*next = item->nextSibling();
for (; i && i != item; i = i->nextSibling()) {
@@ -183,7 +183,7 @@ void StreamingConfiguration::slotDeletePlaybackChannel()
}
int x = item->text(0).toUInt();
for (i = next; i; i = i->nextSibling(), ++x) {
- i->setText(0, QString::number(x));
+ i->setText(0, TQString::number(x));
}
m_ListPlaybackURLs->takeItem(item);
delete item;
@@ -201,15 +201,15 @@ void StreamingConfiguration::slotDeletePlaybackChannel()
void StreamingConfiguration::slotUpPlaybackChannel()
{
slotSetDirty();
- QListViewItem *prev = NULL;
- QListViewItem *i = m_ListPlaybackURLs->firstChild();
- QListViewItem *item = m_ListPlaybackURLs->selectedItem();
+ TQListViewItem *prev = NULL;
+ TQListViewItem *i = m_ListPlaybackURLs->firstChild();
+ TQListViewItem *item = m_ListPlaybackURLs->selectedItem();
int idx = 0;
for (; i && i != item; i = i->nextSibling(), ++idx) {
prev = i;
}
if (prev && item) {
- QString s = prev->text(1);
+ TQString s = prev->text(1);
prev->setText(1, item->text(1));
item->setText(1, s);
SoundFormat sf = m_PlaybackSoundFormats[idx];
@@ -227,15 +227,15 @@ void StreamingConfiguration::slotUpPlaybackChannel()
void StreamingConfiguration::slotDownPlaybackChannel()
{
slotSetDirty();
- QListViewItem *item = m_ListPlaybackURLs->selectedItem();
- QListViewItem *next = item ? item->nextSibling() : NULL;
- QListViewItem *i = m_ListPlaybackURLs->firstChild();
+ TQListViewItem *item = m_ListPlaybackURLs->selectedItem();
+ TQListViewItem *next = item ? item->nextSibling() : NULL;
+ TQListViewItem *i = m_ListPlaybackURLs->firstChild();
int idx = 0;
for (; i && i != item; i = i->nextSibling()) {
++idx;
}
if (next && item) {
- QString s = next->text(1);
+ TQString s = next->text(1);
next->setText(1, item->text(1));
item->setText(1, s);
SoundFormat sf = m_PlaybackSoundFormats[idx];
@@ -254,8 +254,8 @@ void StreamingConfiguration::slotDownPlaybackChannel()
void StreamingConfiguration::slotNewCaptureChannel()
{
slotSetDirty();
- QListViewItem *item = new QListViewItem(m_ListCaptureURLs, m_ListCaptureURLs->lastChild());
- item->setText(0, QString::number(m_ListCaptureURLs->childCount()));
+ TQListViewItem *item = new TQListViewItem(m_ListCaptureURLs, m_ListCaptureURLs->lastChild());
+ item->setText(0, TQString::number(m_ListCaptureURLs->childCount()));
item->setText(1, i18n("new channel"));
item->setRenameEnabled(1,true);
item->startRename(1);
@@ -270,10 +270,10 @@ void StreamingConfiguration::slotNewCaptureChannel()
void StreamingConfiguration::slotDeleteCaptureChannel()
{
slotSetDirty();
- QListViewItem *item = m_ListCaptureURLs->selectedItem();
+ TQListViewItem *item = m_ListCaptureURLs->selectedItem();
if (item) {
int idx = 0;
- QListViewItem *i = m_ListCaptureURLs->firstChild(),
+ TQListViewItem *i = m_ListCaptureURLs->firstChild(),
*prev = NULL,
*next = item->nextSibling();
for (; i && i != item; i = i->nextSibling()) {
@@ -287,7 +287,7 @@ void StreamingConfiguration::slotDeleteCaptureChannel()
}
int x = item->text(0).toUInt();
for (i = next; i; i = i->nextSibling(), ++x) {
- i->setText(0, QString::number(x));
+ i->setText(0, TQString::number(x));
}
m_ListCaptureURLs->takeItem(item);
delete item;
@@ -305,15 +305,15 @@ void StreamingConfiguration::slotDeleteCaptureChannel()
void StreamingConfiguration::slotUpCaptureChannel()
{
slotSetDirty();
- QListViewItem *prev = NULL;
- QListViewItem *i = m_ListCaptureURLs->firstChild();
- QListViewItem *item = m_ListCaptureURLs->selectedItem();
+ TQListViewItem *prev = NULL;
+ TQListViewItem *i = m_ListCaptureURLs->firstChild();
+ TQListViewItem *item = m_ListCaptureURLs->selectedItem();
int idx = 0;
for (; i && i != item; i = i->nextSibling(), ++idx) {
prev = i;
}
if (prev && item) {
- QString s = prev->text(1);
+ TQString s = prev->text(1);
prev->setText(1, item->text(1));
item->setText(1, s);
SoundFormat sf = m_CaptureSoundFormats[idx];
@@ -331,15 +331,15 @@ void StreamingConfiguration::slotUpCaptureChannel()
void StreamingConfiguration::slotDownCaptureChannel()
{
slotSetDirty();
- QListViewItem *item = m_ListCaptureURLs->selectedItem();
- QListViewItem *next = item ? item->nextSibling() : NULL;
- QListViewItem *i = m_ListCaptureURLs->firstChild();
+ TQListViewItem *item = m_ListCaptureURLs->selectedItem();
+ TQListViewItem *next = item ? item->nextSibling() : NULL;
+ TQListViewItem *i = m_ListCaptureURLs->firstChild();
int idx = 0;
for (; i && i != item; i = i->nextSibling()) {
++idx;
}
if (next && item) {
- QString s = next->text(1);
+ TQString s = next->text(1);
next->setText(1, item->text(1));
item->setText(1, s);
SoundFormat sf = m_CaptureSoundFormats[idx];
@@ -359,12 +359,12 @@ void StreamingConfiguration::slotDownCaptureChannel()
void StreamingConfiguration::slotPlaybackSelectionChanged()
{
- QListViewItem *item = m_ListPlaybackURLs->selectedItem();
+ TQListViewItem *item = m_ListPlaybackURLs->selectedItem();
bool up_possible = false;
bool down_possible = false;
if (item) {
int idx = 0;
- QListViewItem *i = m_ListPlaybackURLs->firstChild();
+ TQListViewItem *i = m_ListPlaybackURLs->firstChild();
for (; i && i != item; i = i->nextSibling()) {
++idx;
}
@@ -376,8 +376,8 @@ void StreamingConfiguration::slotPlaybackSelectionChanged()
if (item)
m_ListCaptureURLs->setSelected(item, false);
}
- QListViewItem *playback_item = m_ListPlaybackURLs->selectedItem();
- QListViewItem *capture_item = m_ListCaptureURLs->selectedItem();
+ TQListViewItem *playback_item = m_ListPlaybackURLs->selectedItem();
+ TQListViewItem *capture_item = m_ListCaptureURLs->selectedItem();
bool e = (playback_item || capture_item);
m_cbFormat ->setEnabled(e);
m_cbRate ->setEnabled(e);
@@ -393,12 +393,12 @@ void StreamingConfiguration::slotPlaybackSelectionChanged()
void StreamingConfiguration::slotCaptureSelectionChanged()
{
- QListViewItem *item = m_ListCaptureURLs->selectedItem();
+ TQListViewItem *item = m_ListCaptureURLs->selectedItem();
bool up_possible = false;
bool down_possible = false;
if (item) {
int idx = 0;
- QListViewItem *i = m_ListCaptureURLs->firstChild();
+ TQListViewItem *i = m_ListCaptureURLs->firstChild();
for (; i && i != item; i = i->nextSibling()) {
++idx;
}
@@ -410,8 +410,8 @@ void StreamingConfiguration::slotCaptureSelectionChanged()
if (item)
m_ListPlaybackURLs->setSelected(item, false);
}
- QListViewItem *playback_item = m_ListPlaybackURLs->selectedItem();
- QListViewItem *capture_item = m_ListCaptureURLs->selectedItem();
+ TQListViewItem *playback_item = m_ListPlaybackURLs->selectedItem();
+ TQListViewItem *capture_item = m_ListCaptureURLs->selectedItem();
bool e = (playback_item || capture_item);
m_cbFormat ->setEnabled(e);
m_cbRate ->setEnabled(e);
@@ -435,11 +435,11 @@ void StreamingConfiguration::slotUpdateSoundFormat()
return;
slotSetDirty();
- QListViewItem *playback_item = m_ListPlaybackURLs->selectedItem();
- QListViewItem *capture_item = m_ListCaptureURLs->selectedItem();
+ TQListViewItem *playback_item = m_ListPlaybackURLs->selectedItem();
+ TQListViewItem *capture_item = m_ListCaptureURLs->selectedItem();
if (playback_item) {
int idx = 0;
- QListViewItem *i = m_ListPlaybackURLs->firstChild();
+ TQListViewItem *i = m_ListPlaybackURLs->firstChild();
for (; i && i != playback_item; i = i->nextSibling()) {
++idx;
}
@@ -447,7 +447,7 @@ void StreamingConfiguration::slotUpdateSoundFormat()
}
else if (capture_item) {
int idx = 0;
- QListViewItem *i = m_ListCaptureURLs->firstChild();
+ TQListViewItem *i = m_ListCaptureURLs->firstChild();
for (; i && i != capture_item; i = i->nextSibling()) {
++idx;
}
diff --git a/kradio3/plugins/streaming/streaming-configuration.h b/kradio3/plugins/streaming/streaming-configuration.h
index f40a0cb..a252662 100644
--- a/kradio3/plugins/streaming/streaming-configuration.h
+++ b/kradio3/plugins/streaming/streaming-configuration.h
@@ -50,8 +50,9 @@
class StreamingConfiguration : public StreamingConfigurationUI
{
Q_OBJECT
+ TQ_OBJECT
public :
- StreamingConfiguration (QWidget *parent, StreamingDevice *streamer);
+ StreamingConfiguration (TQWidget *tqparent, StreamingDevice *streamer);
~StreamingConfiguration ();
protected slots:
@@ -85,8 +86,8 @@ protected:
void getStreamOptions(SoundFormat &sf, int &BufferSize) const ;
- QValueList<SoundFormat> m_PlaybackSoundFormats, m_CaptureSoundFormats;
- QValueList<int> m_PlaybackBufferSizes, m_CaptureBufferSizes;
+ TQValueList<SoundFormat> m_PlaybackSoundFormats, m_CaptureSoundFormats;
+ TQValueList<int> m_PlaybackBufferSizes, m_CaptureBufferSizes;
bool m_ignore_updates;
bool m_dirty;
diff --git a/kradio3/plugins/streaming/streaming-job.cpp b/kradio3/plugins/streaming/streaming-job.cpp
index 0c3736a..4374de9 100644
--- a/kradio3/plugins/streaming/streaming-job.cpp
+++ b/kradio3/plugins/streaming/streaming-job.cpp
@@ -24,8 +24,8 @@
StreamingJob::StreamingJob()
- : QObject(),
- m_URL(QString::null),
+ : TQObject(),
+ m_URL(TQString()),
m_SoundFormat(),
m_BufferSize(65536),
m_Buffer(m_BufferSize),
@@ -38,8 +38,8 @@ StreamingJob::StreamingJob()
{
}
-StreamingJob::StreamingJob(const QString &_URL, const SoundFormat &_SoundFormat, size_t _bufferSize)
- : QObject(),
+StreamingJob::StreamingJob(const TQString &_URL, const SoundFormat &_SoundFormat, size_t _bufferSize)
+ : TQObject(),
m_URL(_URL),
m_SoundFormat(_SoundFormat),
m_BufferSize(_bufferSize),
@@ -54,7 +54,7 @@ StreamingJob::StreamingJob(const QString &_URL, const SoundFormat &_SoundFormat,
}
StreamingJob::StreamingJob(const StreamingJob &c)
- : QObject(),
+ : TQObject(),
m_URL(c.m_URL),
m_SoundFormat(c.m_SoundFormat),
m_BufferSize(c.m_BufferSize),
@@ -73,7 +73,7 @@ StreamingJob::~StreamingJob()
}
-void StreamingJob::setURL(const QString &url)
+void StreamingJob::setURL(const TQString &url)
{
if (m_URL != url) {
m_URL = url;
@@ -109,10 +109,10 @@ bool StreamingJob::startPutJob()
if (!m_KIO_Job)
return false;
m_KIO_Job->setAsyncDataEnabled(true);
- connect (m_KIO_Job, SIGNAL(dataReq(KIO::Job *job, QByteArray &data)),
- this, SLOT(slotWriteData (KIO::Job *job, QByteArray &data)));
- connect (m_KIO_Job, SIGNAL(result(KIO::Job *)),
- this, SLOT(slotIOJobResult(KIO::Job *)));
+ connect (m_KIO_Job, TQT_SIGNAL(dataReq(KIO::Job *job, TQByteArray &data)),
+ this, TQT_SLOT(slotWriteData (KIO::Job *job, TQByteArray &data)));
+ connect (m_KIO_Job, TQT_SIGNAL(result(KIO::Job *)),
+ this, TQT_SLOT(slotIOJobResult(KIO::Job *)));
return true;
}
@@ -154,10 +154,10 @@ bool StreamingJob::startGetJob()
if (!m_KIO_Job)
return false;
m_KIO_Job->setAsyncDataEnabled(true);
- connect (m_KIO_Job, SIGNAL(data(KIO::Job *, const QByteArray &)),
- this, SLOT(slotReadData(KIO::Job *, const QByteArray &)));
- connect (m_KIO_Job, SIGNAL(result(KIO::Job *)),
- this, SLOT(slotIOJobResult(KIO::Job *)));
+ connect (m_KIO_Job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ this, TQT_SLOT(slotReadData(KIO::Job *, const TQByteArray &)));
+ connect (m_KIO_Job, TQT_SIGNAL(result(KIO::Job *)),
+ this, TQT_SLOT(slotIOJobResult(KIO::Job *)));
return true;
}
@@ -196,12 +196,12 @@ bool StreamingJob::stopCapture()
}
-void StreamingJob::slotReadData (KIO::Job */*job*/, const QByteArray &data)
+void StreamingJob::slotReadData (KIO::Job */*job*/, const TQByteArray &data)
{
size_t free = m_Buffer.getFreeSize();
if (free < data.size()) {
m_SkipCount += data.size() - free;
- emit logStreamWarning(m_URL, i18n("skipped %1 bytes").arg(data.size() - free));
+ emit logStreamWarning(m_URL, i18n("skipped %1 bytes").tqarg(data.size() - free));
}
else {
free = data.size();
@@ -216,13 +216,13 @@ void StreamingJob::slotReadData (KIO::Job */*job*/, const QByteArray &data)
}
-void StreamingJob::slotWriteData (KIO::Job */*job*/, QByteArray &)
+void StreamingJob::slotWriteData (KIO::Job */*job*/, TQByteArray &)
{
size_t size = m_Buffer.getFillSize();
if (size) {
char *buf = new char [size];
size = m_Buffer.takeData(buf, size);
- QByteArray data;
+ TQByteArray data;
data.assign(buf, size);
m_KIO_Job->sendAsyncData(data);
m_StreamPos += size;
diff --git a/kradio3/plugins/streaming/streaming-job.h b/kradio3/plugins/streaming/streaming-job.h
index b88c32a..d447f42 100644
--- a/kradio3/plugins/streaming/streaming-job.h
+++ b/kradio3/plugins/streaming/streaming-job.h
@@ -26,25 +26,26 @@
#include "../../src/include/soundformat.h"
#include "../../src/include/soundstreamclient_interfaces.h"
-#include <qobject.h>
+#include <tqobject.h>
#include <kio/jobclasses.h>
-class StreamingJob : public QObject
+class StreamingJob : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
StreamingJob();
- StreamingJob(const QString &_URL, const SoundFormat &_SoundFormat, size_t _bufferSize);
+ StreamingJob(const TQString &_URL, const SoundFormat &_SoundFormat, size_t _bufferSize);
StreamingJob(const StreamingJob &c);
virtual ~StreamingJob();
- const QString &getURL() const { return m_URL; }
+ const TQString &getURL() const { return m_URL; }
const SoundFormat &getSoundFormat() const { return m_SoundFormat; }
int getBufferSize() const { return m_BufferSize; }
- void setURL(const QString &);
+ void setURL(const TQString &);
void setSoundFormat(const SoundFormat &);
void setBufferSize(size_t buffer_size);
@@ -64,14 +65,14 @@ public:
protected slots:
- void slotReadData (KIO::Job *job, const QByteArray &data);
- void slotWriteData (KIO::Job *job, QByteArray &data);
+ void slotReadData (KIO::Job *job, const TQByteArray &data);
+ void slotWriteData (KIO::Job *job, TQByteArray &data);
void slotIOJobResult (KIO::Job *job);
signals:
- void logStreamError(const KURL &url, const QString &s);
- void logStreamWarning(const KURL &url, const QString &s);
+ void logStreamError(const KURL &url, const TQString &s);
+ void logStreamWarning(const KURL &url, const TQString &s);
protected:
@@ -79,14 +80,14 @@ protected:
bool startPutJob();
- QString m_URL;
+ TQString m_URL;
SoundFormat m_SoundFormat;
size_t m_BufferSize;
RingBuffer m_Buffer;
unsigned m_OpenCounter;
- Q_UINT64 m_StreamPos;
+ TQ_UINT64 m_StreamPos;
time_t m_StartTime;
size_t m_SkipCount;
diff --git a/kradio3/plugins/streaming/streaming.cpp b/kradio3/plugins/streaming/streaming.cpp
index 5f5431c..6b2d371 100644
--- a/kradio3/plugins/streaming/streaming.cpp
+++ b/kradio3/plugins/streaming/streaming.cpp
@@ -37,8 +37,8 @@ PLUGIN_LIBRARY_FUNCTIONS(StreamingDevice, "kradio-streaming", i18n("Streaming Su
-StreamingDevice::StreamingDevice(const QString &name)
- : QObject(NULL, NULL),
+StreamingDevice::StreamingDevice(const TQString &name)
+ : TQObject(NULL, NULL),
PluginBase(name, i18n("KRadio Streaming Plugin"))
{
m_CaptureChannels.setAutoDelete(true);
@@ -92,41 +92,41 @@ void StreamingDevice::noticeConnectedI (ISoundStreamServer *s, bool pointer_vali
void StreamingDevice::saveState (KConfig *c) const
{
- c->setGroup(QString("streaming-") + PluginBase::name());
+ c->setGroup(TQString("streaming-") + PluginBase::name());
c->writeEntry("soundstreamclient-id", m_SoundStreamClientID);
c->writeEntry("playback-channels", m_PlaybackChannelList.size());
for (unsigned int i = 0; i < m_PlaybackChannelList.size(); ++i) {
- QString s = m_PlaybackChannelList[i];
+ TQString s = m_PlaybackChannelList[i];
const StreamingJob *j = m_PlaybackChannels[s];
const SoundFormat &sf = j->getSoundFormat();
KURL url = j->getURL();
size_t buffer_size = j->getBufferSize();
- sf.saveConfig("playback-channel-" + QString::number(i), c);
- c->writeEntry("playback-channel-" + QString::number(i) + "-url", url.url());
- c->writeEntry("playback-channel-" + QString::number(i) + "-buffer-size", buffer_size);
+ sf.saveConfig("playback-channel-" + TQString::number(i), c);
+ c->writeEntry("playback-channel-" + TQString::number(i) + "-url", url.url());
+ c->writeEntry("playback-channel-" + TQString::number(i) + "-buffer-size", buffer_size);
}
c->writeEntry("capture-channels", m_CaptureChannelList.size());
for (unsigned int i = 0; i < m_CaptureChannelList.size(); ++i) {
- QString s = m_CaptureChannelList[i];
+ TQString s = m_CaptureChannelList[i];
const StreamingJob *j = m_CaptureChannels[s];
const SoundFormat &sf = j->getSoundFormat();
KURL url = j->getURL();
size_t buffer_size = j->getBufferSize();
- sf.saveConfig("capture-channel-" + QString::number(i), c);
- c->writeEntry("capture-channel-" + QString::number(i) + "-url", url.url());
- c->writeEntry("capture-channel-" + QString::number(i) + "-buffer-size", buffer_size);
+ sf.saveConfig("capture-channel-" + TQString::number(i), c);
+ c->writeEntry("capture-channel-" + TQString::number(i) + "-url", url.url());
+ c->writeEntry("capture-channel-" + TQString::number(i) + "-buffer-size", buffer_size);
}
}
void StreamingDevice::restoreState (KConfig *c)
{
- c->setGroup(QString("streaming-") + PluginBase::name());
+ c->setGroup(TQString("streaming-") + PluginBase::name());
setSoundStreamClientID(c->readEntry("soundstreamclient-id", getSoundStreamClientID()));
resetPlaybackStreams(false);
@@ -135,9 +135,9 @@ void StreamingDevice::restoreState (KConfig *c)
int n = c->readNumEntry("playback-channels", 0);
for (int i = 0; i < n; ++i) {
SoundFormat sf;
- sf.restoreConfig("playback-channel-" + QString::number(i), c);
- QString url = c->readEntry("playback-channel-" + QString::number(i) + "-url", QString::null);
- size_t buffer_size = c->readNum64Entry("playback-channel-" + QString::number(i) + "-buffer-size", 32*1024);
+ sf.restoreConfig("playback-channel-" + TQString::number(i), c);
+ TQString url = c->readEntry("playback-channel-" + TQString::number(i) + "-url", TQString());
+ size_t buffer_size = c->readNum64Entry("playback-channel-" + TQString::number(i) + "-buffer-size", 32*1024);
if (!url.isNull()) {
addPlaybackStream(url, sf, buffer_size, i == n-1);
@@ -147,9 +147,9 @@ void StreamingDevice::restoreState (KConfig *c)
n = c->readNumEntry("capture-channels", 0);
for (int i = 0; i < n; ++i) {
SoundFormat sf;
- sf.restoreConfig("capture-channel-" + QString::number(i), c);
- QString url = c->readEntry("capture-channel-" + QString::number(i) + "-url", QString::null);
- size_t buffer_size = c->readNum64Entry("capture-channel-" + QString::number(i) + "-buffer-size", 32*1024);
+ sf.restoreConfig("capture-channel-" + TQString::number(i), c);
+ TQString url = c->readEntry("capture-channel-" + TQString::number(i) + "-url", TQString());
+ size_t buffer_size = c->readNum64Entry("capture-channel-" + TQString::number(i) + "-buffer-size", 32*1024);
if (!url.isNull()) {
addCaptureStream(url, sf, buffer_size, i == n-1);
@@ -167,7 +167,7 @@ void StreamingDevice::restoreState (KConfig *c)
ConfigPageInfo StreamingDevice::createConfigurationPage()
{
StreamingConfiguration *conf = new StreamingConfiguration(NULL, this);
- QObject::connect(this, SIGNAL(sigUpdateConfig()), conf, SLOT(slotUpdateConfig()));
+ TQObject::connect(this, TQT_SIGNAL(sigUpdateConfig()), conf, TQT_SLOT(slotUpdateConfig()));
return ConfigPageInfo (conf,
i18n("Streaming"),
i18n("Streaming Device Options"),
@@ -182,9 +182,9 @@ AboutPageInfo StreamingDevice::createAboutPage()
-bool StreamingDevice::preparePlayback(SoundStreamID id, const QString &channel, bool /*active_mode*/, bool start_immediately)
+bool StreamingDevice::preparePlayback(SoundStreamID id, const TQString &channel, bool /*active_mode*/, bool start_immediately)
{
- if (id.isValid() && m_PlaybackChannels.find(channel)) {
+ if (id.isValid() && m_PlaybackChannels.tqfind(channel)) {
m_AllPlaybackStreams.insert(id, channel);
if (start_immediately)
startPlayback(id);
@@ -194,10 +194,10 @@ bool StreamingDevice::preparePlayback(SoundStreamID id, const QString &channel,
}
-bool StreamingDevice::prepareCapture(SoundStreamID id, const QString &channel)
+bool StreamingDevice::prepareCapture(SoundStreamID id, const TQString &channel)
{
logDebug("StreamingDevice::prepareCapture");
- if (id.isValid() && m_CaptureChannels.find(channel)) {
+ if (id.isValid() && m_CaptureChannels.tqfind(channel)) {
m_AllCaptureStreams.insert(id, channel);
return true;
}
@@ -206,9 +206,9 @@ bool StreamingDevice::prepareCapture(SoundStreamID id, const QString &channel)
bool StreamingDevice::releasePlayback(SoundStreamID id)
{
- if (id.isValid() && m_AllPlaybackStreams.contains(id)) {
+ if (id.isValid() && m_AllPlaybackStreams.tqcontains(id)) {
stopPlayback(id);
- if (!m_EnabledPlaybackStreams.contains(id))
+ if (!m_EnabledPlaybackStreams.tqcontains(id))
m_AllPlaybackStreams.remove(id);
return true;
}
@@ -218,9 +218,9 @@ bool StreamingDevice::releasePlayback(SoundStreamID id)
bool StreamingDevice::releaseCapture(SoundStreamID id)
{
logDebug("StreamingDevice::releaseCapture");
- if (id.isValid() && m_AllCaptureStreams.contains(id)) {
+ if (id.isValid() && m_AllCaptureStreams.tqcontains(id)) {
stopCapture(id);
- if (!m_EnabledCaptureStreams.contains(id))
+ if (!m_EnabledCaptureStreams.tqcontains(id))
m_AllCaptureStreams.remove(id);
return true;
}
@@ -241,9 +241,9 @@ bool StreamingDevice::supportsCapture() const
bool StreamingDevice::startPlayback(SoundStreamID id)
{
- if (id.isValid() && m_AllPlaybackStreams.contains(id)) {
+ if (id.isValid() && m_AllPlaybackStreams.tqcontains(id)) {
m_EnabledPlaybackStreams.insert(id, m_AllPlaybackStreams[id]);
- StreamingJob &x = *m_PlaybackChannels.find(m_AllPlaybackStreams[id]);
+ StreamingJob &x = *m_PlaybackChannels.tqfind(m_AllPlaybackStreams[id]);
x.startPlayback();
return true;
} else {
@@ -261,8 +261,8 @@ bool StreamingDevice::pausePlayback(SoundStreamID /*id*/)
bool StreamingDevice::stopPlayback(SoundStreamID id)
{
- if (id.isValid() && m_EnabledPlaybackStreams.contains(id)) {
- StreamingJob &x = *m_PlaybackChannels.find(m_AllPlaybackStreams[id]);
+ if (id.isValid() && m_EnabledPlaybackStreams.tqcontains(id)) {
+ StreamingJob &x = *m_PlaybackChannels.tqfind(m_AllPlaybackStreams[id]);
if (x.stopPlayback()) {
m_EnabledPlaybackStreams.remove(id);
}
@@ -275,7 +275,7 @@ bool StreamingDevice::stopPlayback(SoundStreamID id)
bool StreamingDevice::isPlaybackRunning(SoundStreamID id, bool &b) const
{
- if (id.isValid() && m_EnabledPlaybackStreams.contains(id)) {
+ if (id.isValid() && m_EnabledPlaybackStreams.tqcontains(id)) {
b = true;
return true;
} else {
@@ -289,9 +289,9 @@ bool StreamingDevice::startCaptureWithFormat(SoundStreamID id,
bool force_format)
{
logDebug("StreamingDevice::startCaptureWithFormat");
- if (id.isValid() && m_AllCaptureStreams.contains(id)) {
+ if (id.isValid() && m_AllCaptureStreams.tqcontains(id)) {
m_EnabledCaptureStreams.insert(id, m_AllCaptureStreams[id]);
- StreamingJob &x = *m_CaptureChannels.find(m_AllCaptureStreams[id]);
+ StreamingJob &x = *m_CaptureChannels.tqfind(m_AllCaptureStreams[id]);
x.startCapture(proposed_format, real_format, force_format);
return true;
} else {
@@ -302,8 +302,8 @@ bool StreamingDevice::startCaptureWithFormat(SoundStreamID id,
bool StreamingDevice::stopCapture(SoundStreamID id)
{
- if (id.isValid() && m_EnabledCaptureStreams.contains(id)) {
- StreamingJob &x = *m_CaptureChannels.find(m_AllCaptureStreams[id]);
+ if (id.isValid() && m_EnabledCaptureStreams.tqcontains(id)) {
+ StreamingJob &x = *m_CaptureChannels.tqfind(m_AllCaptureStreams[id]);
if (x.stopCapture()) {
m_EnabledCaptureStreams.remove(id);
}
@@ -316,8 +316,8 @@ bool StreamingDevice::stopCapture(SoundStreamID id)
bool StreamingDevice::isCaptureRunning(SoundStreamID id, bool &b, SoundFormat &sf) const
{
- if (id.isValid() && m_EnabledCaptureStreams.contains(id)) {
- StreamingJob &x = *m_CaptureChannels.find(m_AllCaptureStreams[id]);
+ if (id.isValid() && m_EnabledCaptureStreams.tqcontains(id)) {
+ StreamingJob &x = *m_CaptureChannels.tqfind(m_AllCaptureStreams[id]);
sf = x.getSoundFormat();
b = true;
return true;
@@ -339,22 +339,22 @@ bool StreamingDevice::noticeSoundStreamRedirected(SoundStreamID oldID, SoundStre
{
bool found = false;
if (newID != oldID) {
- if (m_AllPlaybackStreams.contains(oldID)) {
+ if (m_AllPlaybackStreams.tqcontains(oldID)) {
m_AllPlaybackStreams.insert(newID, m_AllPlaybackStreams[oldID]);
m_AllPlaybackStreams.remove(oldID);
found = true;
}
- if (m_EnabledPlaybackStreams.contains(oldID)) {
+ if (m_EnabledPlaybackStreams.tqcontains(oldID)) {
m_EnabledPlaybackStreams.insert(newID, m_EnabledPlaybackStreams[oldID]);
m_EnabledPlaybackStreams.remove(oldID);
found = true;
}
- if (m_AllCaptureStreams.contains(oldID)) {
+ if (m_AllCaptureStreams.tqcontains(oldID)) {
m_AllCaptureStreams.insert(newID, m_AllCaptureStreams[oldID]);
m_AllCaptureStreams.remove(oldID);
found = true;
}
- if (m_EnabledCaptureStreams.contains(oldID)) {
+ if (m_EnabledCaptureStreams.tqcontains(oldID)) {
m_EnabledCaptureStreams.insert(newID, m_EnabledCaptureStreams[oldID]);
m_EnabledCaptureStreams.remove(oldID);
found = true;
@@ -370,8 +370,8 @@ bool StreamingDevice::noticeSoundStreamData(SoundStreamID id,
const SoundMetaData &/*md*/
)
{
- if (id.isValid() && m_EnabledPlaybackStreams.contains(id)) {
- StreamingJob &x = *m_CaptureChannels.find(m_AllCaptureStreams[id]);
+ if (id.isValid() && m_EnabledPlaybackStreams.tqcontains(id)) {
+ StreamingJob &x = *m_CaptureChannels.tqfind(m_AllCaptureStreams[id]);
x.playData(data, size, consumed_size);
return true;
}
@@ -382,15 +382,15 @@ bool StreamingDevice::noticeSoundStreamData(SoundStreamID id,
bool StreamingDevice::noticeReadyForPlaybackData(SoundStreamID id, size_t free_size)
{
- if (!id.isValid() || !m_AllCaptureStreams.contains(id))
+ if (!id.isValid() || !m_AllCaptureStreams.tqcontains(id))
return false;
- StreamingJob &x = *m_CaptureChannels.find(m_AllCaptureStreams[id]);
+ StreamingJob &x = *m_CaptureChannels.tqfind(m_AllCaptureStreams[id]);
while (x.hasRecordedData() && free_size > 0) {
const char *buffer = NULL;
size_t size = SIZE_T_DONT_CARE;
size_t consumed_size = SIZE_T_DONT_CARE;
- SoundMetaData meta_data(0,0,0, i18n("internal stream, not stored (%1)").arg(m_AllCaptureStreams[id]));
+ SoundMetaData meta_data(0,0,0, i18n("internal stream, not stored (%1)").tqarg(m_AllCaptureStreams[id]));
x.lockData(buffer, size, meta_data); // get pointer to data and meta-data content
if (size > free_size)
size = free_size;
@@ -400,7 +400,7 @@ bool StreamingDevice::noticeReadyForPlaybackData(SoundStreamID id, size_t free_s
x.removeData(consumed_size);
free_size -= consumed_size;
if (consumed_size < size) {
- logWarning(i18n("StreamingDevice %1::notifySoundStreamData: Playback Clients skipped %2 bytes").arg(name()).arg(size-consumed_size));
+ logWarning(i18n("StreamingDevice %1::notifySoundStreamData: Playback Clients skipped %2 bytes").tqarg(name()).tqarg(size-consumed_size));
break;
}
}
@@ -409,38 +409,38 @@ bool StreamingDevice::noticeReadyForPlaybackData(SoundStreamID id, size_t free_s
-const QStringList &StreamingDevice::getPlaybackChannels() const
+const TQStringList &StreamingDevice::getPlaybackChannels() const
{
return m_PlaybackChannelList;
}
-const QStringList &StreamingDevice::getCaptureChannels() const
+const TQStringList &StreamingDevice::getCaptureChannels() const
{
return m_CaptureChannelList;
}
-QString StreamingDevice::getSoundStreamClientDescription() const
+TQString StreamingDevice::getSoundStreamClientDescription() const
{
- return i18n("Streaming Device %1").arg(PluginBase::name());
+ return i18n("Streaming Device %1").tqarg(PluginBase::name());
}
-void StreamingDevice::logStreamError(const KURL &url, const QString &s)
+void StreamingDevice::logStreamError(const KURL &url, const TQString &s)
{
- logError(i18n("Streaming Device %1, %2: %3").arg(name()).arg(url.url()).arg(s));
+ logError(i18n("Streaming Device %1, %2: %3").tqarg(name()).tqarg(url.url()).tqarg(s));
}
-void StreamingDevice::logStreamWarning(const KURL &url, const QString &s)
+void StreamingDevice::logStreamWarning(const KURL &url, const TQString &s)
{
- logWarning(i18n("Streaming Device %1, %2: %3").arg(name()).arg(url.url()).arg(s));
+ logWarning(i18n("Streaming Device %1, %2: %3").tqarg(name()).tqarg(url.url()).tqarg(s));
}
-bool StreamingDevice::getPlaybackStreamOptions(const QString &channel, QString &url, SoundFormat &sf, size_t &buffer_size) const
+bool StreamingDevice::getPlaybackStreamOptions(const TQString &channel, TQString &url, SoundFormat &sf, size_t &buffer_size) const
{
- if (m_PlaybackChannels.find(channel)) {
+ if (m_PlaybackChannels.tqfind(channel)) {
const StreamingJob *j = m_PlaybackChannels[channel];
url = j->getURL();
sf = j->getSoundFormat();
@@ -451,9 +451,9 @@ bool StreamingDevice::getPlaybackStreamOptions(const QString &channel, QString &
}
-bool StreamingDevice::getCaptureStreamOptions(const QString &channel, QString &url, SoundFormat &sf, size_t &buffer_size) const
+bool StreamingDevice::getCaptureStreamOptions(const TQString &channel, TQString &url, SoundFormat &sf, size_t &buffer_size) const
{
- if (m_CaptureChannels.find(channel)) {
+ if (m_CaptureChannels.tqfind(channel)) {
const StreamingJob *j = m_CaptureChannels[channel];
url = j->getURL();
sf = j->getSoundFormat();
@@ -495,11 +495,11 @@ void StreamingDevice::resetCaptureStreams(bool notification_enabled)
}
-void StreamingDevice::addPlaybackStream(const QString &url, const SoundFormat &sf, size_t buffer_size, bool notification_enabled)
+void StreamingDevice::addPlaybackStream(const TQString &url, const SoundFormat &sf, size_t buffer_size, bool notification_enabled)
{
StreamingJob *x = new StreamingJob(url, sf, buffer_size);
- connect(x, SIGNAL(logStreamError(const KURL &, const QString &)),
- this, SLOT (logStreamError(const KURL &, const QString &)));
+ connect(x, TQT_SIGNAL(logStreamError(const KURL &, const TQString &)),
+ this, TQT_SLOT (logStreamError(const KURL &, const TQString &)));
m_PlaybackChannelList.append(url);
m_PlaybackChannels.insert(url, x);
@@ -509,11 +509,11 @@ void StreamingDevice::addPlaybackStream(const QString &url, const SoundFormat &s
}
-void StreamingDevice::addCaptureStream (const QString &url, const SoundFormat &sf, size_t buffer_size, bool notification_enabled)
+void StreamingDevice::addCaptureStream (const TQString &url, const SoundFormat &sf, size_t buffer_size, bool notification_enabled)
{
StreamingJob *x = new StreamingJob(url, sf, buffer_size);
- connect(x, SIGNAL(logStreamError(const KURL &, const QString &)),
- this, SLOT (logStreamError(const KURL &, const QString &)));
+ connect(x, TQT_SIGNAL(logStreamError(const KURL &, const TQString &)),
+ this, TQT_SLOT (logStreamError(const KURL &, const TQString &)));
m_CaptureChannelList.append(url);
m_CaptureChannels.insert(url, x);
diff --git a/kradio3/plugins/streaming/streaming.h b/kradio3/plugins/streaming/streaming.h
index 430ab7b..63bde4b 100644
--- a/kradio3/plugins/streaming/streaming.h
+++ b/kradio3/plugins/streaming/streaming.h
@@ -26,31 +26,32 @@
#include "../../src/include/soundformat.h"
#include "../../src/include/soundstreamclient_interfaces.h"
-#include <qobject.h>
-#include <qdict.h>
+#include <tqobject.h>
+#include <tqdict.h>
class StreamingJob;
-class StreamingDevice : public QObject,
+class StreamingDevice : public TQObject,
public PluginBase,
public ISoundStreamClient
{
Q_OBJECT
+ TQ_OBJECT
public:
- StreamingDevice (const QString &name);
+ StreamingDevice (const TQString &name);
virtual ~StreamingDevice ();
virtual bool connectI(Interface *i);
virtual bool disconnectI(Interface *i);
- bool getPlaybackStreamOptions(const QString &channel, QString &url, SoundFormat &sf, size_t &buffer_size) const;
- bool getCaptureStreamOptions (const QString &channel, QString &url, SoundFormat &sf, size_t &buffer_size) const;
+ bool getPlaybackStreamOptions(const TQString &channel, TQString &url, SoundFormat &sf, size_t &buffer_size) const;
+ bool getCaptureStreamOptions (const TQString &channel, TQString &url, SoundFormat &sf, size_t &buffer_size) const;
void resetPlaybackStreams(bool notification_enabled = true);
void resetCaptureStreams(bool notification_enabled = true);
- void addPlaybackStream(const QString &url, const SoundFormat &sf, size_t buffer_size, bool notification_enabled = true);
- void addCaptureStream (const QString &url, const SoundFormat &sf, size_t buffer_size, bool notification_enabled = true);
+ void addPlaybackStream(const TQString &url, const SoundFormat &sf, size_t buffer_size, bool notification_enabled = true);
+ void addCaptureStream (const TQString &url, const SoundFormat &sf, size_t buffer_size, bool notification_enabled = true);
// PluginBase
@@ -58,10 +59,10 @@ public:
virtual void saveState (KConfig *) const;
virtual void restoreState (KConfig *);
- virtual QString pluginClassName() const { return "StreamingDevice"; }
+ virtual TQString pluginClassName() const { return "StreamingDevice"; }
- 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 ConfigPageInfo createConfigurationPage();
virtual AboutPageInfo createAboutPage();
@@ -70,8 +71,8 @@ public:
RECEIVERS:
void noticeConnectedI (ISoundStreamServer *s, bool pointer_valid);
- bool preparePlayback(SoundStreamID id, const QString &channel, bool active_mode, bool start_immediately);
- bool prepareCapture(SoundStreamID id, const QString &channel);
+ bool preparePlayback(SoundStreamID id, const TQString &channel, bool active_mode, bool start_immediately);
+ bool prepareCapture(SoundStreamID id, const TQString &channel);
bool releasePlayback(SoundStreamID id);
bool releaseCapture(SoundStreamID id);
@@ -79,15 +80,15 @@ ANSWERS:
bool supportsPlayback() const;
bool supportsCapture() const;
- QString getSoundStreamClientDescription() const;
+ TQString getSoundStreamClientDescription() const;
// ISoundStreamClient: mixer access
protected:
ANSWERS:
- const QStringList &getPlaybackChannels() const;
- const QStringList &getCaptureChannels() const;
+ const TQStringList &getPlaybackChannels() const;
+ const TQStringList &getCaptureChannels() const;
// ISoundStreamClient: generic broadcasts
@@ -117,8 +118,8 @@ RECEIVERS:
public slots:
- void logStreamError(const KURL &url, const QString &s);
- void logStreamWarning(const KURL &url, const QString &s);
+ void logStreamError(const KURL &url, const TQString &s);
+ void logStreamWarning(const KURL &url, const TQString &s);
signals:
@@ -126,14 +127,14 @@ signals:
protected:
- QStringList m_PlaybackChannelList,
+ TQStringList m_PlaybackChannelList,
m_CaptureChannelList;
- QDict<StreamingJob>
+ TQDict<StreamingJob>
m_PlaybackChannels,
m_CaptureChannels;
- QMap<SoundStreamID, QString>
+ TQMap<SoundStreamID, TQString>
m_AllPlaybackStreams,
m_AllCaptureStreams,
m_EnabledPlaybackStreams,