diff options
Diffstat (limited to 'kradio3/plugins/streaming/streaming-configuration.cpp')
-rw-r--r-- | kradio3/plugins/streaming/streaming-configuration.cpp | 142 |
1 files changed, 71 insertions, 71 deletions
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; } |