summaryrefslogtreecommitdiffstats
path: root/kradio3/plugins/v4lradio/v4lradio-configuration.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-01 03:43:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-01 03:43:07 +0000
commit70b9eea2ba01c3691497f49e4c45cb070c16193c (patch)
tree9a6df61aa247a27275aad9c5245e419e89c2c640 /kradio3/plugins/v4lradio/v4lradio-configuration.cpp
parent998c1384ace4ae4655997c181fa33242148cd0a4 (diff)
downloadtderadio-70b9eea2ba01c3691497f49e4c45cb070c16193c.tar.gz
tderadio-70b9eea2ba01c3691497f49e4c45cb070c16193c.zip
TQt4 port kradio
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kradio@1238952 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kradio3/plugins/v4lradio/v4lradio-configuration.cpp')
-rw-r--r--kradio3/plugins/v4lradio/v4lradio-configuration.cpp132
1 files changed, 66 insertions, 66 deletions
diff --git a/kradio3/plugins/v4lradio/v4lradio-configuration.cpp b/kradio3/plugins/v4lradio/v4lradio-configuration.cpp
index f7472fc..ed8c61d 100644
--- a/kradio3/plugins/v4lradio/v4lradio-configuration.cpp
+++ b/kradio3/plugins/v4lradio/v4lradio-configuration.cpp
@@ -20,14 +20,14 @@
#include <unistd.h>
#include <linux/soundcard.h>
-#include <qspinbox.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qfile.h>
-#include <qpushbutton.h>
-#include <qslider.h>
-#include <qcheckbox.h>
+#include <tqspinbox.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqfile.h>
+#include <tqpushbutton.h>
+#include <tqslider.h>
+#include <tqcheckbox.h>
#include <kfiledialog.h>
#include <knuminput.h>
@@ -39,8 +39,8 @@
#include "v4lradio-configuration.h"
#include "v4lradio.h"
-V4LRadioConfiguration::V4LRadioConfiguration (QWidget *parent, SoundStreamID ssid)
- : V4LRadioConfigurationUI(parent),
+V4LRadioConfiguration::V4LRadioConfiguration (TQWidget *tqparent, SoundStreamID ssid)
+ : V4LRadioConfigurationUI(tqparent),
m_SoundStreamID(ssid),
m_ignoreGUIChanges(false),
m_myControlChange(0),
@@ -53,36 +53,36 @@ V4LRadioConfiguration::V4LRadioConfiguration (QWidget *parent, SoundStreamID ssi
m_PlaybackChannelHelper(comboPlaybackMixerChannel),
m_CaptureChannelHelper (comboCaptureMixerChannel)
{
- QObject::connect(buttonSelectRadioDevice, SIGNAL(clicked()),
- this, SLOT(selectRadioDevice()));
+ TQObject::connect(buttonSelectRadioDevice, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(selectRadioDevice()));
editRadioDevice->installEventFilter(this);
- QObject::connect(editMinFrequency, SIGNAL(valueChanged(int)),
- this, SLOT(guiMinFrequencyChanged(int)));
- QObject::connect(editMaxFrequency, SIGNAL(valueChanged(int)),
- this, SLOT(guiMaxFrequencyChanged(int)));
-
- QObject::connect(editDeviceVolume, SIGNAL(valueChanged(double)),
- this, SLOT(slotDeviceVolumeChanged(double)));
- QObject::connect(editTreble, SIGNAL(valueChanged(double)),
- this, SLOT(slotTrebleChanged(double)));
- QObject::connect(editBass, SIGNAL(valueChanged(double)),
- this, SLOT(slotBassChanged(double)));
- QObject::connect(editBalance, SIGNAL(valueChanged(double)),
- this, SLOT(slotBalanceChanged(double)));
-
- QObject::connect(sliderDeviceVolume, SIGNAL(valueChanged(int)),
- this, SLOT(slotDeviceVolumeChanged(int)));
- QObject::connect(sliderTreble, SIGNAL(valueChanged(int)),
- this, SLOT(slotTrebleChanged(int)));
- QObject::connect(sliderBass, SIGNAL(valueChanged(int)),
- this, SLOT(slotBassChanged(int)));
- QObject::connect(sliderBalance, SIGNAL(valueChanged(int)),
- this, SLOT(slotBalanceChanged(int)));
-
- QObject::connect(comboPlaybackMixerDevice, SIGNAL(activated(int)),
- this, SLOT(slotComboPlaybackMixerSelected(int)));
- QObject::connect(comboCaptureMixerDevice, SIGNAL(activated(int)),
- this, SLOT(slotComboCaptureMixerSelected(int)));
+ TQObject::connect(editMinFrequency, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(guiMinFrequencyChanged(int)));
+ TQObject::connect(editMaxFrequency, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(guiMaxFrequencyChanged(int)));
+
+ TQObject::connect(editDeviceVolume, TQT_SIGNAL(valueChanged(double)),
+ this, TQT_SLOT(slotDeviceVolumeChanged(double)));
+ TQObject::connect(editTreble, TQT_SIGNAL(valueChanged(double)),
+ this, TQT_SLOT(slotTrebleChanged(double)));
+ TQObject::connect(editBass, TQT_SIGNAL(valueChanged(double)),
+ this, TQT_SLOT(slotBassChanged(double)));
+ TQObject::connect(editBalance, TQT_SIGNAL(valueChanged(double)),
+ this, TQT_SLOT(slotBalanceChanged(double)));
+
+ TQObject::connect(sliderDeviceVolume, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(slotDeviceVolumeChanged(int)));
+ TQObject::connect(sliderTreble, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(slotTrebleChanged(int)));
+ TQObject::connect(sliderBass, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(slotBassChanged(int)));
+ TQObject::connect(sliderBalance, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(slotBalanceChanged(int)));
+
+ TQObject::connect(comboPlaybackMixerDevice, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotComboPlaybackMixerSelected(int)));
+ TQObject::connect(comboCaptureMixerDevice, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotComboCaptureMixerSelected(int)));
sliderBalance->installEventFilter(this);
}
@@ -130,19 +130,19 @@ void V4LRadioConfiguration::noticeConnectedI (ISoundStreamServer *s, bool pointe
void V4LRadioConfiguration::noticeConnectedSoundClient(ISoundStreamClient::thisInterface *i, bool pointer_valid)
{
if (i && pointer_valid && i->supportsPlayback()) {
- const QString &org_mid = queryPlaybackMixerID();
- bool org_present = m_PlaybackMixerHelper.contains(org_mid);
- const QString &mid = org_present ? m_PlaybackMixerHelper.getCurrentItem() : org_mid;
- const QString &org_ch = queryPlaybackMixerChannel();
- const QString &ch = org_present ? m_PlaybackChannelHelper.getCurrentText() : org_ch;
+ const TQString &org_mid = queryPlaybackMixerID();
+ bool org_present = m_PlaybackMixerHelper.tqcontains(org_mid);
+ const TQString &mid = org_present ? m_PlaybackMixerHelper.getCurrentItem() : org_mid;
+ const TQString &org_ch = queryPlaybackMixerChannel();
+ const TQString &ch = org_present ? m_PlaybackChannelHelper.getCurrentText() : org_ch;
noticePlaybackMixerChanged(mid, ch);
}
if (i && pointer_valid && i->supportsCapture()) {
- const QString &org_mid = queryCaptureMixerID();
- bool org_present = m_CaptureMixerHelper.contains(org_mid);
- const QString &mid = org_present ? m_CaptureMixerHelper.getCurrentItem() : org_mid;
- const QString &org_ch = queryCaptureMixerChannel();
- const QString &ch = org_present ? m_CaptureChannelHelper.getCurrentText() : org_ch;
+ const TQString &org_mid = queryCaptureMixerID();
+ bool org_present = m_CaptureMixerHelper.tqcontains(org_mid);
+ const TQString &mid = org_present ? m_CaptureMixerHelper.getCurrentItem() : org_mid;
+ const TQString &org_ch = queryCaptureMixerChannel();
+ const TQString &ch = org_present ? m_CaptureChannelHelper.getCurrentText() : org_ch;
noticeCaptureMixerChanged(mid, ch);
}
}
@@ -160,7 +160,7 @@ void V4LRadioConfiguration::noticeDisconnectedSoundClient(ISoundStreamClient::th
// IV4LCfgClient
-bool V4LRadioConfiguration::noticeRadioDeviceChanged(const QString &s)
+bool V4LRadioConfiguration::noticeRadioDeviceChanged(const TQString &s)
{
bool old = m_ignoreGUIChanges;
m_ignoreGUIChanges = true;
@@ -172,9 +172,9 @@ bool V4LRadioConfiguration::noticeRadioDeviceChanged(const QString &s)
}
-bool V4LRadioConfiguration::noticePlaybackMixerChanged(const QString &_mixer_id, const QString &Channel)
+bool V4LRadioConfiguration::noticePlaybackMixerChanged(const TQString &_mixer_id, const TQString &Channel)
{
- QString mixer_id = _mixer_id;
+ TQString mixer_id = _mixer_id;
bool old = m_ignoreGUIChanges;
m_ignoreGUIChanges = true;
@@ -185,7 +185,7 @@ bool V4LRadioConfiguration::noticePlaybackMixerChanged(const QString &_mixer_id,
ISoundStreamClient *mixer = getSoundStreamClientWithID(mixer_id);
if (mixer) {
m_PlaybackChannelHelper.setData(mixer->getPlaybackChannels());
- m_PlaybackChannelHelper.setCurrentText(m_PlaybackChannelHelper.contains(Channel) ? Channel : queryPlaybackMixerChannel());
+ m_PlaybackChannelHelper.setCurrentText(m_PlaybackChannelHelper.tqcontains(Channel) ? Channel : queryPlaybackMixerChannel());
}
labelPlaybackMixerChannel->setEnabled(mixer != NULL);
comboPlaybackMixerChannel->setEnabled(mixer != NULL);
@@ -195,9 +195,9 @@ bool V4LRadioConfiguration::noticePlaybackMixerChanged(const QString &_mixer_id,
}
-bool V4LRadioConfiguration::noticeCaptureMixerChanged(const QString &_mixer_id, const QString &Channel)
+bool V4LRadioConfiguration::noticeCaptureMixerChanged(const TQString &_mixer_id, const TQString &Channel)
{
- QString mixer_id = _mixer_id;
+ TQString mixer_id = _mixer_id;
bool old = m_ignoreGUIChanges;
m_ignoreGUIChanges = true;
@@ -208,7 +208,7 @@ bool V4LRadioConfiguration::noticeCaptureMixerChanged(const QString &_mixer_id,
ISoundStreamClient *mixer = getSoundStreamClientWithID(mixer_id);
if (mixer) {
m_CaptureChannelHelper.setData(mixer->getCaptureChannels());
- m_CaptureChannelHelper.setCurrentText(m_CaptureChannelHelper.contains(Channel) ? Channel : queryCaptureMixerChannel());
+ m_CaptureChannelHelper.setCurrentText(m_CaptureChannelHelper.tqcontains(Channel) ? Channel : queryCaptureMixerChannel());
}
labelCaptureMixerChannel->setEnabled(mixer != NULL);
comboCaptureMixerChannel->setEnabled(mixer != NULL);
@@ -315,7 +315,7 @@ bool V4LRadioConfiguration::noticeVolumeZeroOnPowerOffChanged(bool a)
// IRadioDeviceClient
-bool V4LRadioConfiguration::noticeDescriptionChanged (const QString &s, const IRadioDevice */*sender*/)
+bool V4LRadioConfiguration::noticeDescriptionChanged (const TQString &s, const IRadioDevice */*sender*/)
{
labelDescription->setText(s);
return true;
@@ -447,18 +447,18 @@ void V4LRadioConfiguration::selectRadioDevice()
fd.setMode(KFile::File | KFile::ExistingOnly);
fd.setCaption (i18n("Select Radio Device"));
- if (fd.exec() == QDialog::Accepted) {
+ if (fd.exec() == TQDialog::Accepted) {
editRadioDevice->setText(fd.selectedFile());
}
}
-bool V4LRadioConfiguration::eventFilter(QObject *o, QEvent *e)
+bool V4LRadioConfiguration::eventFilter(TQObject *o, TQEvent *e)
{
- if (e->type() == QEvent::FocusOut && o == editRadioDevice) {
+ if (e->type() == TQEvent::FocusOut && TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(editRadioDevice)) {
slotEditRadioDeviceChanged();
}
- if (e->type() == QEvent::MouseButtonDblClick && o == sliderBalance) {
+ if (e->type() == TQEvent::MouseButtonDblClick && TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(sliderBalance)) {
slotBalanceCenter();
}
return false;
@@ -468,7 +468,7 @@ bool V4LRadioConfiguration::eventFilter(QObject *o, QEvent *e)
void V4LRadioConfiguration::slotEditRadioDeviceChanged()
{
if (m_ignoreGUIChanges) return;
- const QString &s = editRadioDevice->text();
+ const TQString &s = editRadioDevice->text();
if (s != queryRadioDevice() || !queryIsPowerOn()) {
V4LCaps c = queryCapabilities(s);
noticeDescriptionChanged(c.description);
@@ -481,7 +481,7 @@ void V4LRadioConfiguration::slotEditRadioDeviceChanged()
void V4LRadioConfiguration::slotComboPlaybackMixerSelected(int /*idx*/)
{
if (m_ignoreGUIChanges) return;
- QString id = m_PlaybackMixerHelper.getCurrentItem();
+ TQString id = m_PlaybackMixerHelper.getCurrentItem();
noticePlaybackMixerChanged(id, queryPlaybackMixerChannel());
}
@@ -489,7 +489,7 @@ void V4LRadioConfiguration::slotComboPlaybackMixerSelected(int /*idx*/)
void V4LRadioConfiguration::slotComboCaptureMixerSelected(int /*idx*/)
{
if (m_ignoreGUIChanges) return;
- QString id = m_CaptureMixerHelper.getCurrentItem();
+ TQString id = m_CaptureMixerHelper.getCurrentItem();
noticeCaptureMixerChanged(id, queryCaptureMixerChannel());
}
@@ -626,7 +626,7 @@ void V4LRadioConfiguration::slotBalanceCenter()
}
-bool V4LRadioConfiguration::noticePlaybackChannelsChanged(const QString & client_id, const QStringList &/*channels*/)
+bool V4LRadioConfiguration::noticePlaybackChannelsChanged(const TQString & client_id, const TQStringList &/*channels*/)
{
if (m_PlaybackMixerHelper.getCurrentItem() == client_id) {
noticePlaybackMixerChanged(client_id, m_PlaybackChannelHelper.getCurrentText());
@@ -635,7 +635,7 @@ bool V4LRadioConfiguration::noticePlaybackChannelsChanged(const QString & client
}
-bool V4LRadioConfiguration::noticeCaptureChannelsChanged (const QString & client_id, const QStringList &/*channels*/)
+bool V4LRadioConfiguration::noticeCaptureChannelsChanged (const TQString & client_id, const TQStringList &/*channels*/)
{
if (m_CaptureMixerHelper.getCurrentItem() == client_id) {
noticeCaptureMixerChanged(client_id, m_CaptureChannelHelper.getCurrentText());