summaryrefslogtreecommitdiffstats
path: root/kradio3/plugins/alsa-sound/alsa-mixer-element.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/alsa-sound/alsa-mixer-element.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/alsa-sound/alsa-mixer-element.cpp')
-rw-r--r--kradio3/plugins/alsa-sound/alsa-mixer-element.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/kradio3/plugins/alsa-sound/alsa-mixer-element.cpp b/kradio3/plugins/alsa-sound/alsa-mixer-element.cpp
index 1fbc75a..0843961 100644
--- a/kradio3/plugins/alsa-sound/alsa-mixer-element.cpp
+++ b/kradio3/plugins/alsa-sound/alsa-mixer-element.cpp
@@ -18,14 +18,14 @@
#include "alsa-mixer-element.h"
#include <knuminput.h>
-#include <qslider.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
+#include <tqslider.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
#include <math.h>
-QAlsaMixerElement::QAlsaMixerElement(QWidget *parent, const QString &label, bool has_switch, bool has_volume)
- : AlsaMixerElementUI(parent),
+TQAlsaMixerElement::TQAlsaMixerElement(TQWidget *tqparent, const TQString &label, bool has_switch, bool has_volume)
+ : AlsaMixerElementUI(tqparent),
m_HasVolume(has_volume),
m_HasSwitch(has_switch),
m_dirty(false),
@@ -34,75 +34,75 @@ QAlsaMixerElement::QAlsaMixerElement(QWidget *parent, const QString &label, bool
setLabel(label);
setVolume(0);
- QObject::connect(m_spinboxVolume, SIGNAL(valueChanged(int)),
- this, SLOT (slotSpinboxValueChanged(int)));
- QObject::connect(m_sliderVolume, SIGNAL(valueChanged(int)),
- this, SLOT (slotSliderValueChanged(int)));
+ TQObject::connect(m_spinboxVolume, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT (slotSpinboxValueChanged(int)));
+ TQObject::connect(m_sliderVolume, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT (slotSliderValueChanged(int)));
if (m_HasVolume) {
- QObject::connect(m_checkboxOverride, SIGNAL(toggled(bool)),
- m_spinboxVolume, SLOT (setEnabled(bool)));
- QObject::connect(m_checkboxOverride, SIGNAL(toggled(bool)),
- m_sliderVolume, SLOT (setEnabled(bool)));
+ TQObject::connect(m_checkboxOverride, TQT_SIGNAL(toggled(bool)),
+ m_spinboxVolume, TQT_SLOT (setEnabled(bool)));
+ TQObject::connect(m_checkboxOverride, TQT_SIGNAL(toggled(bool)),
+ m_sliderVolume, TQT_SLOT (setEnabled(bool)));
} else {
m_spinboxVolume->hide();
m_sliderVolume->hide();
}
if (m_HasSwitch) {
- QObject::connect(m_checkboxOverride, SIGNAL(toggled(bool)),
- m_checkboxActive, SLOT (setEnabled(bool)));
+ TQObject::connect(m_checkboxOverride, TQT_SIGNAL(toggled(bool)),
+ m_checkboxActive, TQT_SLOT (setEnabled(bool)));
} else {
//m_checkboxActive->hide();
m_checkboxActive->setEnabled(false);
m_checkboxActive->setChecked(true);
}
- connect(m_checkboxOverride, SIGNAL(toggled(bool)), this, SLOT(slotSetDirty()));
- connect(m_checkboxActive, SIGNAL(toggled(bool)), this, SLOT(slotSetDirty()));
- connect(m_spinboxVolume, SIGNAL(valueChanged(int)), this, SLOT(slotSetDirty()));
- connect(m_sliderVolume, SIGNAL(valueChanged(int)), this, SLOT(slotSetDirty()));
+ connect(m_checkboxOverride, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetDirty()));
+ connect(m_checkboxActive, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetDirty()));
+ connect(m_spinboxVolume, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSetDirty()));
+ connect(m_sliderVolume, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSetDirty()));
}
-QAlsaMixerElement::~QAlsaMixerElement()
+TQAlsaMixerElement::~TQAlsaMixerElement()
{
}
-float QAlsaMixerElement::getVolume() const
+float TQAlsaMixerElement::getVolume() const
{
return ((float)m_spinboxVolume->value())/100.0;
}
-bool QAlsaMixerElement::getActive() const
+bool TQAlsaMixerElement::getActive() const
{
return m_checkboxActive->isChecked();
}
-bool QAlsaMixerElement::getOverride() const
+bool TQAlsaMixerElement::getOverride() const
{
return m_checkboxOverride->isChecked();
}
-void QAlsaMixerElement::setLabel(const QString &label)
+void TQAlsaMixerElement::setLabel(const TQString &label)
{
m_labelMixerElementName->setText(label);
}
-void QAlsaMixerElement::setOverride(bool ov)
+void TQAlsaMixerElement::setOverride(bool ov)
{
m_ignore_updates = true;
m_checkboxOverride->setChecked(ov);
m_ignore_updates = false;
}
-void QAlsaMixerElement::setActive(bool active)
+void TQAlsaMixerElement::setActive(bool active)
{
m_ignore_updates = true;
m_checkboxActive->setChecked(active);
m_ignore_updates = false;
}
-void QAlsaMixerElement::setVolume(float vol)
+void TQAlsaMixerElement::setVolume(float vol)
{
m_ignore_updates = true;
int v = (int)rint(vol*100 + 0.5);
@@ -111,18 +111,18 @@ void QAlsaMixerElement::setVolume(float vol)
m_ignore_updates = false;
}
-void QAlsaMixerElement::slotSpinboxValueChanged(int v)
+void TQAlsaMixerElement::slotSpinboxValueChanged(int v)
{
m_sliderVolume->setValue(100-v);
}
-void QAlsaMixerElement::slotSliderValueChanged(int v)
+void TQAlsaMixerElement::slotSliderValueChanged(int v)
{
m_spinboxVolume->setValue(100-v);
}
-void QAlsaMixerElement::slotSetDirty()
+void TQAlsaMixerElement::slotSetDirty()
{
if (!m_dirty && !m_ignore_updates) {
m_dirty = true;
@@ -131,7 +131,7 @@ void QAlsaMixerElement::slotSetDirty()
}
-void QAlsaMixerElement::slotResetDirty()
+void TQAlsaMixerElement::slotResetDirty()
{
m_dirty = false;
}