summaryrefslogtreecommitdiffstats
path: root/kradio3/plugins
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
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')
-rw-r--r--kradio3/plugins/alsa-sound/alsa-config-mixer-setting.cpp14
-rw-r--r--kradio3/plugins/alsa-sound/alsa-config-mixer-setting.h14
-rw-r--r--kradio3/plugins/alsa-sound/alsa-mixer-element-ui.ui46
-rw-r--r--kradio3/plugins/alsa-sound/alsa-mixer-element.cpp62
-rw-r--r--kradio3/plugins/alsa-sound/alsa-mixer-element.h9
-rw-r--r--kradio3/plugins/alsa-sound/alsa-sound-configuration-ui.ui38
-rw-r--r--kradio3/plugins/alsa-sound/alsa-sound-configuration.cpp110
-rw-r--r--kradio3/plugins/alsa-sound/alsa-sound-configuration.h35
-rw-r--r--kradio3/plugins/alsa-sound/alsa-sound.cpp252
-rw-r--r--kradio3/plugins/alsa-sound/alsa-sound.h77
-rw-r--r--kradio3/plugins/gui-docking-menu/docking-configuration.cpp42
-rw-r--r--kradio3/plugins/gui-docking-menu/docking-configuration.h11
-rw-r--r--kradio3/plugins/gui-docking-menu/docking.cpp150
-rw-r--r--kradio3/plugins/gui-docking-menu/docking.h45
-rw-r--r--kradio3/plugins/gui-error-log/errorlog.cpp76
-rw-r--r--kradio3/plugins/gui-error-log/errorlog.h29
-rw-r--r--kradio3/plugins/gui-quickbar/buttonflowlayout.cpp122
-rw-r--r--kradio3/plugins/gui-quickbar/buttonflowlayout.h36
-rw-r--r--kradio3/plugins/gui-quickbar/quickbar-configuration.cpp4
-rw-r--r--kradio3/plugins/gui-quickbar/quickbar-configuration.h7
-rw-r--r--kradio3/plugins/gui-quickbar/quickbar.cpp112
-rw-r--r--kradio3/plugins/gui-quickbar/quickbar.h49
-rw-r--r--kradio3/plugins/gui-standard-display/displaycfg.cpp78
-rw-r--r--kradio3/plugins/gui-standard-display/displaycfg.h11
-rw-r--r--kradio3/plugins/gui-standard-display/displaycfg_interfaces.cpp24
-rw-r--r--kradio3/plugins/gui-standard-display/displaycfg_interfaces.h40
-rw-r--r--kradio3/plugins/gui-standard-display/radioview-configuration.cpp74
-rw-r--r--kradio3/plugins/gui-standard-display/radioview-configuration.h21
-rw-r--r--kradio3/plugins/gui-standard-display/radioview.cpp228
-rw-r--r--kradio3/plugins/gui-standard-display/radioview.h81
-rw-r--r--kradio3/plugins/gui-standard-display/radioview_element.cpp2
-rw-r--r--kradio3/plugins/gui-standard-display/radioview_element.h7
-rw-r--r--kradio3/plugins/gui-standard-display/radioview_frequencyradio.cpp136
-rw-r--r--kradio3/plugins/gui-standard-display/radioview_frequencyradio.h27
-rw-r--r--kradio3/plugins/gui-standard-display/radioview_frequencyseeker.cpp62
-rw-r--r--kradio3/plugins/gui-standard-display/radioview_frequencyseeker.h13
-rw-r--r--kradio3/plugins/gui-standard-display/radioview_seekinterface.ui14
-rw-r--r--kradio3/plugins/gui-standard-display/radioview_seekinterface.ui.h8
-rw-r--r--kradio3/plugins/gui-standard-display/radioview_volume.cpp30
-rw-r--r--kradio3/plugins/gui-standard-display/radioview_volume.h11
-rw-r--r--kradio3/plugins/lirc/lirc-configuration-ui.ui6
-rw-r--r--kradio3/plugins/lirc/lirc-configuration.cpp46
-rw-r--r--kradio3/plugins/lirc/lirc-configuration.h11
-rw-r--r--kradio3/plugins/lirc/lircsupport.cpp58
-rw-r--r--kradio3/plugins/lirc/lircsupport.h45
-rw-r--r--kradio3/plugins/lirc/listviewitem_lirc.cpp4
-rw-r--r--kradio3/plugins/lirc/listviewitem_lirc.h5
-rw-r--r--kradio3/plugins/oss-sound/oss-sound-configuration-ui.ui18
-rw-r--r--kradio3/plugins/oss-sound/oss-sound-configuration.cpp20
-rw-r--r--kradio3/plugins/oss-sound/oss-sound-configuration.h3
-rw-r--r--kradio3/plugins/oss-sound/oss-sound.cpp148
-rw-r--r--kradio3/plugins/oss-sound/oss-sound.h49
-rw-r--r--kradio3/plugins/radio/radio-configuration-ui.ui164
-rw-r--r--kradio3/plugins/radio/radio-configuration.cpp200
-rw-r--r--kradio3/plugins/radio/radio-configuration.h27
-rw-r--r--kradio3/plugins/radio/radio.cpp30
-rw-r--r--kradio3/plugins/radio/radio.h34
-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
-rw-r--r--kradio3/plugins/soundserver/soundserver.cpp2
-rw-r--r--kradio3/plugins/soundserver/soundserver.h8
-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
-rw-r--r--kradio3/plugins/timecontrol/timecontrol-configuration-ui.ui88
-rw-r--r--kradio3/plugins/timecontrol/timecontrol-configuration.cpp84
-rw-r--r--kradio3/plugins/timecontrol/timecontrol-configuration.h15
-rw-r--r--kradio3/plugins/timecontrol/timecontrol.cpp46
-rw-r--r--kradio3/plugins/timecontrol/timecontrol.h35
-rw-r--r--kradio3/plugins/timeshifter/timeshifter-configuration-ui.ui38
-rw-r--r--kradio3/plugins/timeshifter/timeshifter-configuration.cpp56
-rw-r--r--kradio3/plugins/timeshifter/timeshifter-configuration.h13
-rw-r--r--kradio3/plugins/timeshifter/timeshifter.cpp46
-rw-r--r--kradio3/plugins/timeshifter/timeshifter.h33
-rw-r--r--kradio3/plugins/v4lradio/linux/videodev.h4
-rw-r--r--kradio3/plugins/v4lradio/linux/videodev2.h24
-rw-r--r--kradio3/plugins/v4lradio/v4lcfg_interfaces.cpp44
-rw-r--r--kradio3/plugins/v4lradio/v4lcfg_interfaces.h60
-rw-r--r--kradio3/plugins/v4lradio/v4lradio-configuration-ui.ui150
-rw-r--r--kradio3/plugins/v4lradio/v4lradio-configuration.cpp132
-rw-r--r--kradio3/plugins/v4lradio/v4lradio-configuration.h23
-rw-r--r--kradio3/plugins/v4lradio/v4lradio.cpp122
-rw-r--r--kradio3/plugins/v4lradio/v4lradio.h51
107 files changed, 2737 insertions, 2663 deletions
diff --git a/kradio3/plugins/alsa-sound/alsa-config-mixer-setting.cpp b/kradio3/plugins/alsa-sound/alsa-config-mixer-setting.cpp
index 873b29e..2377337 100644
--- a/kradio3/plugins/alsa-sound/alsa-config-mixer-setting.cpp
+++ b/kradio3/plugins/alsa-sound/alsa-config-mixer-setting.cpp
@@ -21,23 +21,23 @@
AlsaConfigMixerSetting::AlsaConfigMixerSetting()
: m_card(-1),
- m_name(QString::null),
+ m_name(TQString()),
m_use(false),
m_active(false),
m_volume(-1)
{
}
-AlsaConfigMixerSetting::AlsaConfigMixerSetting(KConfig *c, const QString &prefix)
+AlsaConfigMixerSetting::AlsaConfigMixerSetting(KConfig *c, const TQString &prefix)
{
m_card = c->readNumEntry (prefix+"card", -1);
- m_name = c->readEntry (prefix+"name", QString::null);
+ m_name = c->readEntry (prefix+"name", TQString());
m_use = c->readBoolEntry (prefix+"use", false);
m_active = c->readBoolEntry (prefix+"active", false);
m_volume = c->readDoubleNumEntry(prefix+"volume", 0);
}
-AlsaConfigMixerSetting::AlsaConfigMixerSetting(int card, const QString &name, bool use, bool active, float volume)
+AlsaConfigMixerSetting::AlsaConfigMixerSetting(int card, const TQString &name, bool use, bool active, float volume)
: m_card(card),
m_name(name),
m_use(use),
@@ -50,12 +50,12 @@ AlsaConfigMixerSetting::~AlsaConfigMixerSetting()
{
}
-QString AlsaConfigMixerSetting::getIDString(int card, const QString &name)
+TQString AlsaConfigMixerSetting::getIDString(int card, const TQString &name)
{
- return QString::number(card) + "-" + name;
+ return TQString::number(card) + "-" + name;
}
-void AlsaConfigMixerSetting::saveState(KConfig *c, const QString &prefix) const
+void AlsaConfigMixerSetting::saveState(KConfig *c, const TQString &prefix) const
{
c->writeEntry(prefix+"card", m_card);
c->writeEntry(prefix+"name", m_name);
diff --git a/kradio3/plugins/alsa-sound/alsa-config-mixer-setting.h b/kradio3/plugins/alsa-sound/alsa-config-mixer-setting.h
index a9f5d88..88140e8 100644
--- a/kradio3/plugins/alsa-sound/alsa-config-mixer-setting.h
+++ b/kradio3/plugins/alsa-sound/alsa-config-mixer-setting.h
@@ -18,7 +18,7 @@
#ifndef __KRADIO_ALSA_CONFIG_MIXER_SETTING_H
#define __KRADIO_ALSA_CONFIG_MIXER_SETTING_H
-#include <qstring.h>
+#include <tqstring.h>
class KConfig;
@@ -26,17 +26,17 @@ class AlsaConfigMixerSetting
{
public:
AlsaConfigMixerSetting();
- AlsaConfigMixerSetting(KConfig *c, const QString &prefix);
- AlsaConfigMixerSetting(int card, const QString &name, bool use, bool active, float volume);
+ AlsaConfigMixerSetting(KConfig *c, const TQString &prefix);
+ AlsaConfigMixerSetting(int card, const TQString &name, bool use, bool active, float volume);
~AlsaConfigMixerSetting();
- QString getIDString() const { return getIDString(m_card, m_name); }
- static QString getIDString(int card, const QString &m_name);
+ TQString getIDString() const { return getIDString(m_card, m_name); }
+ static TQString getIDString(int card, const TQString &m_name);
- void saveState(KConfig *c, const QString &prefix) const;
+ void saveState(KConfig *c, const TQString &prefix) const;
int m_card;
- QString m_name;
+ TQString m_name;
bool m_use;
bool m_active;
float m_volume;
diff --git a/kradio3/plugins/alsa-sound/alsa-mixer-element-ui.ui b/kradio3/plugins/alsa-sound/alsa-mixer-element-ui.ui
index e2c170d..7faf941 100644
--- a/kradio3/plugins/alsa-sound/alsa-mixer-element-ui.ui
+++ b/kradio3/plugins/alsa-sound/alsa-mixer-element-ui.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>AlsaMixerElementUI</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>AlsaMixerElementUI</cstring>
</property>
@@ -19,9 +19,9 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout16</cstring>
+ <cstring>tqlayout16</cstring>
</property>
<hbox>
<property name="name">
@@ -37,7 +37,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>16</width>
<height>20</height>
@@ -54,14 +54,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>1</width>
<height>40</height>
</size>
</property>
</spacer>
- <widget class="QSlider">
+ <widget class="TQSlider">
<property name="name">
<cstring>m_sliderVolume</cstring>
</property>
@@ -85,7 +85,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>1</width>
<height>40</height>
@@ -102,7 +102,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -111,9 +111,9 @@
</spacer>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout7</cstring>
+ <cstring>tqlayout7</cstring>
</property>
<hbox>
<property name="name">
@@ -129,7 +129,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>11</width>
<height>20</height>
@@ -157,7 +157,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>11</width>
<height>20</height>
@@ -166,9 +166,9 @@
</spacer>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<hbox>
<property name="name">
@@ -184,22 +184,22 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>16</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout4</cstring>
+ <cstring>tqlayout4</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_checkboxActive</cstring>
</property>
@@ -213,7 +213,7 @@
<string>Alt+N</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_checkboxOverride</cstring>
</property>
@@ -236,7 +236,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>16</width>
<height>20</height>
@@ -245,7 +245,7 @@
</spacer>
</hbox>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>m_labelMixerElementName</cstring>
</property>
@@ -255,7 +255,7 @@
<property name="text">
<string>MixerName</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignCenter</set>
</property>
</widget>
@@ -263,7 +263,7 @@
</widget>
<customwidgets>
</customwidgets>
-<layoutdefaults spacing="6" margin="2"/>
+<tqlayoutdefaults spacing="6" margin="2"/>
<includehints>
<includehint>knuminput.h</includehint>
</includehints>
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;
}
diff --git a/kradio3/plugins/alsa-sound/alsa-mixer-element.h b/kradio3/plugins/alsa-sound/alsa-mixer-element.h
index 149e0b9..3dd7849 100644
--- a/kradio3/plugins/alsa-sound/alsa-mixer-element.h
+++ b/kradio3/plugins/alsa-sound/alsa-mixer-element.h
@@ -20,12 +20,13 @@
#include "alsa-mixer-element-ui.h"
-class QAlsaMixerElement : public AlsaMixerElementUI
+class TQAlsaMixerElement : public AlsaMixerElementUI
{
Q_OBJECT
+ TQ_OBJECT
public:
- QAlsaMixerElement(QWidget *parent, const QString &label, bool has_switch, bool has_volume);
- ~QAlsaMixerElement();
+ TQAlsaMixerElement(TQWidget *tqparent, const TQString &label, bool has_switch, bool has_volume);
+ ~TQAlsaMixerElement();
float getVolume() const;
@@ -36,7 +37,7 @@ public:
public slots:
- void setLabel(const QString &label);
+ void setLabel(const TQString &label);
void setOverride(bool ov);
void setActive(bool active);
void setVolume(float vol);
diff --git a/kradio3/plugins/alsa-sound/alsa-sound-configuration-ui.ui b/kradio3/plugins/alsa-sound/alsa-sound-configuration-ui.ui
index d1d2105..f0f9535 100644
--- a/kradio3/plugins/alsa-sound/alsa-sound-configuration-ui.ui
+++ b/kradio3/plugins/alsa-sound/alsa-sound-configuration-ui.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>AlsaSoundConfigurationUI</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>AlsaSoundConfigurationUI</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>kTabWidget8</cstring>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>TabPage</cstring>
</property>
@@ -50,22 +50,22 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>5</height>
</size>
</property>
</spacer>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout58</cstring>
+ <cstring>tqlayout58</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -86,7 +86,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>textLabel2_2_2</cstring>
</property>
@@ -164,7 +164,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QLabel" row="5" column="0">
+ <widget class="TQLabel" row="5" column="0">
<property name="name">
<cstring>textLabel2_2_2_2</cstring>
</property>
@@ -185,7 +185,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel2_3</cstring>
</property>
@@ -193,7 +193,7 @@
<string>PCM Playback Device</string>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>textLabel2_4</cstring>
</property>
@@ -201,7 +201,7 @@
<string>PCM Capture Device</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -213,7 +213,7 @@
</widget>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>TabPage</cstring>
</property>
@@ -227,7 +227,7 @@
<property name="margin">
<number>11</number>
</property>
- <widget class="QCheckBox" row="0" column="0">
+ <widget class="TQCheckBox" row="0" column="0">
<property name="name">
<cstring>chkDisablePlayback</cstring>
</property>
@@ -238,7 +238,7 @@
<string>Alt+Y</string>
</property>
</widget>
- <widget class="QCheckBox" row="1" column="0">
+ <widget class="TQCheckBox" row="1" column="0">
<property name="name">
<cstring>chkDisableCapture</cstring>
</property>
@@ -259,7 +259,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>40</height>
@@ -268,7 +268,7 @@
</spacer>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>TabPage</cstring>
</property>
@@ -282,7 +282,7 @@
<property name="margin">
<number>11</number>
</property>
- <widget class="QGroupBox" row="0" column="0">
+ <widget class="TQGroupBox" row="0" column="0">
<property name="name">
<cstring>m_groupMixer</cstring>
</property>
@@ -311,7 +311,7 @@
</widget>
<customwidgets>
</customwidgets>
-<layoutdefaults spacing="6" margin="0"/>
+<tqlayoutdefaults spacing="6" margin="0"/>
<includehints>
<includehint>kcombobox.h</includehint>
<includehint>kcombobox.h</includehint>
diff --git a/kradio3/plugins/alsa-sound/alsa-sound-configuration.cpp b/kradio3/plugins/alsa-sound/alsa-sound-configuration.cpp
index f4914f2..f7d3bf4 100644
--- a/kradio3/plugins/alsa-sound/alsa-sound-configuration.cpp
+++ b/kradio3/plugins/alsa-sound/alsa-sound-configuration.cpp
@@ -15,10 +15,10 @@
* *
***************************************************************************/
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qlayout.h>
-#include <qscrollview.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
+#include <tqscrollview.h>
#include <kurlrequester.h>
#include <knuminput.h>
@@ -32,8 +32,8 @@
#include "alsa-sound.h"
-AlsaSoundConfiguration::AlsaSoundConfiguration (QWidget *parent, AlsaSoundDevice *dev)
- : AlsaSoundConfigurationUI(parent),
+AlsaSoundConfiguration::AlsaSoundConfiguration (TQWidget *tqparent, AlsaSoundDevice *dev)
+ : AlsaSoundConfigurationUI(tqparent),
m_SoundDevice (dev),
m_groupMixerLayout(NULL),
m_groupMixerScrollView(NULL),
@@ -41,30 +41,30 @@ AlsaSoundConfiguration::AlsaSoundConfiguration (QWidget *parent, AlsaSoundDevice
m_dirty(true),
m_ignore_updates(false)
{
- QObject::connect(m_comboPlaybackCard, SIGNAL(activated(int)), this, SLOT(slotSetDirty()));
- QObject::connect(m_comboCaptureCard, SIGNAL(activated(int)), this, SLOT(slotSetDirty()));
- QObject::connect(m_comboPlaybackDevice, SIGNAL(activated(int)), this, SLOT(slotSetDirty()));
- QObject::connect(m_comboCaptureDevice, SIGNAL(activated(int)), this, SLOT(slotSetDirty()));
- QObject::connect(editHWBufferSize, SIGNAL(valueChanged(int)), this, SLOT(slotSetDirty()));
- QObject::connect(editBufferSize, SIGNAL(valueChanged(int)), this, SLOT(slotSetDirty()));
- QObject::connect(chkDisablePlayback, SIGNAL(toggled(bool)), this, SLOT(slotSetDirty()));
- QObject::connect(chkDisableCapture, SIGNAL(toggled(bool)), this, SLOT(slotSetDirty()));
-
- QObject::connect(m_comboPlaybackCard, SIGNAL(activated(const QString &)),
- this, SLOT(slotPlaybackCardSelected(const QString &)));
- QObject::connect(m_comboCaptureCard, SIGNAL(activated(const QString &)),
- this, SLOT(slotCaptureCardSelected(const QString &)));
+ TQObject::connect(m_comboPlaybackCard, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSetDirty()));
+ TQObject::connect(m_comboCaptureCard, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSetDirty()));
+ TQObject::connect(m_comboPlaybackDevice, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSetDirty()));
+ TQObject::connect(m_comboCaptureDevice, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSetDirty()));
+ TQObject::connect(editHWBufferSize, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSetDirty()));
+ TQObject::connect(editBufferSize, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSetDirty()));
+ TQObject::connect(chkDisablePlayback, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetDirty()));
+ TQObject::connect(chkDisableCapture, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetDirty()));
+
+ TQObject::connect(m_comboPlaybackCard, TQT_SIGNAL(activated(const TQString &)),
+ this, TQT_SLOT(slotPlaybackCardSelected(const TQString &)));
+ TQObject::connect(m_comboCaptureCard, TQT_SIGNAL(activated(const TQString &)),
+ this, TQT_SLOT(slotCaptureCardSelected(const TQString &)));
m_groupMixer->setColumnLayout(0, Qt::Horizontal );
- QHBoxLayout *tmp_layout = new QHBoxLayout( m_groupMixer->layout() );
+ TQHBoxLayout *tmp_layout = new TQHBoxLayout( m_groupMixer->tqlayout() );
- m_groupMixerScrollView = new QScrollView (m_groupMixer);
- m_groupMixerScrollView->setFrameShape(QFrame::NoFrame);
- m_groupMixerScrollView->setFrameShadow(QFrame::Plain);
+ m_groupMixerScrollView = new TQScrollView (m_groupMixer);
+ m_groupMixerScrollView->setFrameShape(TQFrame::NoFrame);
+ m_groupMixerScrollView->setFrameShadow(TQFrame::Plain);
m_groupMixerScrollView->enableClipper(true);
- m_groupMixerScrollView->setResizePolicy(QScrollView::AutoOneFit);
- //m_groupMixerScrollView->setHScrollBarMode(QScrollView::AlwaysOn);
+ m_groupMixerScrollView->setResizePolicy(TQScrollView::AutoOneFit);
+ //m_groupMixerScrollView->setHScrollBarMode(TQScrollView::AlwaysOn);
tmp_layout->addWidget(m_groupMixerScrollView);
@@ -102,18 +102,18 @@ AlsaSoundConfiguration::~AlsaSoundConfiguration ()
}
-void AlsaSoundConfiguration::slotPlaybackCardSelected(const QString &cardname)
+void AlsaSoundConfiguration::slotPlaybackCardSelected(const TQString &cardname)
{
- if (!m_name2card.contains(cardname))
+ if (!m_name2card.tqcontains(cardname))
return;
listSoundDevices(m_comboPlaybackDevice, &m_playbackDeviceName2dev, &m_dev2playbackDeviceName, &m_playbackDevice2idx, m_name2card[cardname], SND_PCM_STREAM_PLAYBACK);
}
-void AlsaSoundConfiguration::slotCaptureCardSelected(const QString &cardname)
+void AlsaSoundConfiguration::slotCaptureCardSelected(const TQString &cardname)
{
- if (!m_name2card.contains(cardname))
+ if (!m_name2card.tqcontains(cardname))
return;
saveCaptureMixerSettings();
@@ -122,11 +122,11 @@ void AlsaSoundConfiguration::slotCaptureCardSelected(const QString &cardname)
m_currentCaptureCard = m_name2card[cardname];
- QStringList vol_list, sw_list, all_list;
- QMap<QString, AlsaMixerElement> vol_ch2id, sw_ch2id;
+ TQStringList vol_list, sw_list, all_list;
+ TQMap<TQString, AlsaMixerElement> vol_ch2id, sw_ch2id;
AlsaSoundDevice::getCaptureMixerChannels(m_name2card[cardname], NULL, vol_list, vol_ch2id, sw_list, sw_ch2id, &all_list);
- for (QMapIterator<QString, QAlsaMixerElement*> it = m_MixerElements.begin(); it != m_MixerElements.end(); ++it) {
+ for (TQMapIterator<TQString, TQAlsaMixerElement*> it = m_MixerElements.begin(); it != m_MixerElements.end(); ++it) {
delete *it;
}
m_MixerElements.clear();
@@ -134,20 +134,20 @@ void AlsaSoundConfiguration::slotCaptureCardSelected(const QString &cardname)
if (m_groupMixerSubFrame)
delete m_groupMixerSubFrame;
- m_groupMixerSubFrame = new QFrame(m_groupMixerScrollView->viewport());
- m_groupMixerSubFrame->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
+ m_groupMixerSubFrame = new TQFrame(m_groupMixerScrollView->viewport());
+ m_groupMixerSubFrame->tqsetSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Maximum);
m_groupMixerScrollView->addChild(m_groupMixerSubFrame);
int rows = 1;
int cols = (all_list.count()+rows-1)/rows;
- m_groupMixerLayout = new QGridLayout( m_groupMixerSubFrame, rows, cols, 0, 0 );
- m_groupMixerLayout->setAlignment( Qt::AlignBottom );
+ m_groupMixerLayout = new TQGridLayout( m_groupMixerSubFrame, rows, cols, 0, 0 );
+ m_groupMixerLayout->tqsetAlignment( TQt::AlignBottom );
int idx = 0;
- for (QValueListConstIterator<QString> it = all_list.begin(); it != all_list.end(); ++it, ++idx) {
- QAlsaMixerElement *e = new QAlsaMixerElement(m_groupMixerSubFrame, *it,
- sw_list.contains(*it), vol_list.contains(*it));
- QObject::connect(e, SIGNAL(sigDirty()), this, SLOT(slotSetDirty()));
+ for (TQValueListConstIterator<TQString> it = all_list.begin(); it != all_list.end(); ++it, ++idx) {
+ TQAlsaMixerElement *e = new TQAlsaMixerElement(m_groupMixerSubFrame, *it,
+ sw_list.tqcontains(*it), vol_list.tqcontains(*it));
+ TQObject::connect(e, TQT_SIGNAL(sigDirty()), this, TQT_SLOT(slotSetDirty()));
m_groupMixerLayout->addWidget(e, idx > cols, idx % cols);
e->show();
m_MixerElements.insert(*it, e);
@@ -158,11 +158,11 @@ void AlsaSoundConfiguration::slotCaptureCardSelected(const QString &cardname)
void AlsaSoundConfiguration::saveCaptureMixerSettings()
{
- for (QMapIterator<QString, QAlsaMixerElement*> it = m_MixerElements.begin(); it != m_MixerElements.end(); ++it) {
- const QString &name = it.key();
+ for (TQMapIterator<TQString, TQAlsaMixerElement*> it = m_MixerElements.begin(); it != m_MixerElements.end(); ++it) {
+ const TQString &name = it.key();
int card = m_currentCaptureCard;
- QString id = AlsaConfigMixerSetting::getIDString(card, name);
- QAlsaMixerElement *e = *it;
+ TQString id = AlsaConfigMixerSetting::getIDString(card, name);
+ TQAlsaMixerElement *e = *it;
float vol = e->getVolume();
bool use = e->getOverride();
bool active = e->getActive();
@@ -173,13 +173,13 @@ void AlsaSoundConfiguration::saveCaptureMixerSettings()
void AlsaSoundConfiguration::restoreCaptureMixerSettings()
{
- for (QMapIterator<QString, QAlsaMixerElement*> it = m_MixerElements.begin(); it != m_MixerElements.end(); ++it) {
- const QString &name = it.key();
+ for (TQMapIterator<TQString, TQAlsaMixerElement*> it = m_MixerElements.begin(); it != m_MixerElements.end(); ++it) {
+ const TQString &name = it.key();
int card = m_currentCaptureCard;
- QString id = AlsaConfigMixerSetting::getIDString(card, name);
- QAlsaMixerElement *e = *it;
+ TQString id = AlsaConfigMixerSetting::getIDString(card, name);
+ TQAlsaMixerElement *e = *it;
- if (m_MixerSettings.contains(id)) {
+ if (m_MixerSettings.tqcontains(id)) {
const AlsaConfigMixerSetting &s = m_MixerSettings[id];
e->setVolume(s.m_volume);
e->setOverride(s.m_use);
@@ -211,7 +211,7 @@ void AlsaSoundConfiguration::restoreCaptureMixerSettings()
}
}
-int AlsaSoundConfiguration::listSoundDevices(KComboBox *combobox, QMap<QString, int> *devname2dev, QMap<int, QString> *dev2devname, QMap<int, int> *dev2idx, int card, snd_pcm_stream_t stream)
+int AlsaSoundConfiguration::listSoundDevices(KComboBox *combobox, TQMap<TQString, int> *devname2dev, TQMap<int, TQString> *dev2devname, TQMap<int, int> *dev2idx, int card, snd_pcm_stream_t stream)
{
snd_ctl_t *handle = NULL;
int dev = -1;
@@ -221,7 +221,7 @@ int AlsaSoundConfiguration::listSoundDevices(KComboBox *combobox, QMap<QString,
snd_ctl_card_info_alloca(&info);
snd_pcm_info_alloca (&pcminfo);
- QString ctlname = "hw:"+QString::number(card);
+ TQString ctlname = "hw:"+TQString::number(card);
if (combobox)
combobox->clear();
@@ -250,12 +250,12 @@ int AlsaSoundConfiguration::listSoundDevices(KComboBox *combobox, QMap<QString,
int err = 0;
if ((err = snd_ctl_pcm_info(handle, pcminfo)) < 0) {
if (err != -ENOENT) {
- //logError(QString("control digital audio info (%1): %2").arg(card).arg(snd_strerror(err)));
+ //logError(TQString("control digital audio info (%1): %2").tqarg(card).tqarg(snd_strerror(err)));
}
continue;
}
const char *dev_name = snd_pcm_info_get_name(pcminfo);
- QString devname = i18n("context-card-plus-device-number", "%1 device %2").arg(dev_name).arg(dev);
+ TQString devname = i18n("context-card-plus-device-number", "%1 device %2").tqarg(dev_name).tqarg(dev);
if (combobox)
combobox->insertItem(devname);
if (devname2dev)
@@ -315,14 +315,14 @@ void AlsaSoundConfiguration::slotCancel()
slotCaptureCardSelected(m_comboCaptureCard->currentText());
m_comboCaptureDevice->setCurrentItem(m_captureDevice2idx[dev]);
- //IErrorLogClient::staticLogDebug(QString("capture: card = %1(%2), dev = %3").arg(card).arg(m_captureCard2idx[card]).arg(dev));
+ //IErrorLogClient::staticLogDebug(TQString("capture: card = %1(%2), dev = %3").tqarg(card).tqarg(m_captureCard2idx[card]).tqarg(dev));
editHWBufferSize ->setValue (m_SoundDevice ? m_SoundDevice->getHWBufferSize()/1024 : 4);
editBufferSize ->setValue (m_SoundDevice ? m_SoundDevice->getBufferSize()/1024 : 4);
chkDisablePlayback->setChecked(m_SoundDevice ? !m_SoundDevice->isPlaybackEnabled() : false);
chkDisableCapture ->setChecked(m_SoundDevice ? !m_SoundDevice->isCaptureEnabled() : false);
- //IErrorLogClient::staticLogDebug(QString("capture: card = %1").arg(m_comboCaptureCard->currentText()));
+ //IErrorLogClient::staticLogDebug(TQString("capture: card = %1").tqarg(m_comboCaptureCard->currentText()));
if (m_SoundDevice)
diff --git a/kradio3/plugins/alsa-sound/alsa-sound-configuration.h b/kradio3/plugins/alsa-sound/alsa-sound-configuration.h
index 0dd361a..39eda64 100644
--- a/kradio3/plugins/alsa-sound/alsa-sound-configuration.h
+++ b/kradio3/plugins/alsa-sound/alsa-sound-configuration.h
@@ -26,17 +26,18 @@
#include "alsa-sound.h"
#include "alsa-config-mixer-setting.h"
-class QHBoxLayout;
-class QGridLayout;
-class QAlsaMixerElement;
-class QScrollView;
-class QFrame;
+class TQHBoxLayout;
+class TQGridLayout;
+class TQAlsaMixerElement;
+class TQScrollView;
+class TQFrame;
class AlsaSoundConfiguration : public AlsaSoundConfigurationUI
{
Q_OBJECT
+ TQ_OBJECT
public :
- AlsaSoundConfiguration (QWidget *parent, AlsaSoundDevice *);
+ AlsaSoundConfiguration (TQWidget *tqparent, AlsaSoundDevice *);
~AlsaSoundConfiguration ();
protected slots:
@@ -48,33 +49,33 @@ protected slots:
void slotUpdateConfig();
- void slotPlaybackCardSelected(const QString &cardname);
- void slotCaptureCardSelected(const QString &cardname);
+ void slotPlaybackCardSelected(const TQString &cardname);
+ void slotCaptureCardSelected(const TQString &cardname);
protected:
- int listSoundDevices(KComboBox *combobox, QMap<QString, int> *devname2dev, QMap<int, QString> *dev2devname, QMap<int, int> *dev2idx, int card, snd_pcm_stream_t stream);
+ int listSoundDevices(KComboBox *combobox, TQMap<TQString, int> *devname2dev, TQMap<int, TQString> *dev2devname, TQMap<int, int> *dev2idx, int card, snd_pcm_stream_t stream);
void saveCaptureMixerSettings();
void restoreCaptureMixerSettings();
AlsaSoundDevice *m_SoundDevice;
int m_currentCaptureCard;
- QMap<QString, int> m_name2card,
+ TQMap<TQString, int> m_name2card,
m_name2capturedevice,
m_playbackDeviceName2dev,
m_captureDeviceName2dev;
- QMap<int, QString> m_card2name,
+ TQMap<int, TQString> m_card2name,
m_dev2playbackDeviceName,
m_dev2captureDeviceName;
- QMap<int, int> m_captureCard2idx,
+ TQMap<int, int> m_captureCard2idx,
m_captureDevice2idx,
m_playbackCard2idx,
m_playbackDevice2idx;
- QGridLayout *m_groupMixerLayout;
- QScrollView *m_groupMixerScrollView;
- QFrame *m_groupMixerSubFrame;
- QMap<QString, QAlsaMixerElement*> m_MixerElements;
+ TQGridLayout *m_groupMixerLayout;
+ TQScrollView *m_groupMixerScrollView;
+ TQFrame *m_groupMixerSubFrame;
+ TQMap<TQString, TQAlsaMixerElement*> m_MixerElements;
- QMap<QString, AlsaConfigMixerSetting> m_MixerSettings;
+ TQMap<TQString, AlsaConfigMixerSetting> m_MixerSettings;
bool m_dirty;
bool m_ignore_updates;
diff --git a/kradio3/plugins/alsa-sound/alsa-sound.cpp b/kradio3/plugins/alsa-sound/alsa-sound.cpp
index d67d5c8..1b4625e 100644
--- a/kradio3/plugins/alsa-sound/alsa-sound.cpp
+++ b/kradio3/plugins/alsa-sound/alsa-sound.cpp
@@ -43,8 +43,8 @@ PLUGIN_LIBRARY_FUNCTIONS(AlsaSoundDevice, "kradio-alsa-sound", i18n("Advanced Li
struct _lrvol { unsigned char l, r; short dummy; };
-AlsaSoundDevice::AlsaSoundDevice(const QString &name)
- : QObject(NULL, NULL),
+AlsaSoundDevice::AlsaSoundDevice(const TQString &name)
+ : TQObject(NULL, NULL),
PluginBase(name, i18n("KRadio ALSA Sound Plugin")),
m_hPlayback(NULL),
m_hCapture(NULL),
@@ -74,8 +74,8 @@ AlsaSoundDevice::AlsaSoundDevice(const QString &name)
m_EnableCapture(true)//,
// m_captureThread(NULL)
{
- QObject::connect(&m_PlaybackPollingTimer, SIGNAL(timeout()), this, SLOT(slotPollPlayback()));
- QObject::connect(&m_CapturePollingTimer, SIGNAL(timeout()), this, SLOT(slotPollCapture()));
+ TQObject::connect(&m_PlaybackPollingTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotPollPlayback()));
+ TQObject::connect(&m_CapturePollingTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotPollCapture()));
}
@@ -134,7 +134,7 @@ void AlsaSoundDevice::noticeConnectedI (ISoundStreamServer *s, bool pointer_vali
void AlsaSoundDevice::saveState (KConfig *c) const
{
- c->setGroup(QString("alsa-sound-") + PluginBase::name());
+ c->setGroup(TQString("alsa-sound-") + PluginBase::name());
c->writeEntry("playback-card", m_PlaybackCard);
c->writeEntry("playback-device", m_PlaybackDevice);
@@ -148,9 +148,9 @@ void AlsaSoundDevice::saveState (KConfig *c) const
c->writeEntry("mixer-settings", m_CaptureMixerSettings.count());
int i = 0;
- for (QMapConstIterator<QString, AlsaConfigMixerSetting> it = m_CaptureMixerSettings.begin(); it != m_CaptureMixerSettings.end(); ++it, ++i) {
+ for (TQMapConstIterator<TQString, AlsaConfigMixerSetting> it = m_CaptureMixerSettings.begin(); it != m_CaptureMixerSettings.end(); ++it, ++i) {
- QString prefix = QString("mixer-setting-%1-").arg(i);
+ TQString prefix = TQString("mixer-setting-%1-").tqarg(i);
(*it).saveState(c, prefix);
}
@@ -159,7 +159,7 @@ void AlsaSoundDevice::saveState (KConfig *c) const
void AlsaSoundDevice::restoreState (KConfig *c)
{
- c->setGroup(QString("alsa-sound-") + PluginBase::name());
+ c->setGroup(TQString("alsa-sound-") + PluginBase::name());
m_EnablePlayback = c->readBoolEntry("enable-playback", true);
m_EnableCapture = c->readBoolEntry("enable-capture", true);
@@ -179,7 +179,7 @@ void AlsaSoundDevice::restoreState (KConfig *c)
int n = c->readNumEntry("mixer-settings", 0);
for (int i = 0; i < n; ++i) {
- QString prefix = QString("mixer-setting-%1-").arg(i);
+ TQString prefix = TQString("mixer-setting-%1-").tqarg(i);
AlsaConfigMixerSetting s(c, prefix);
m_CaptureMixerSettings.insert(s.getIDString(), s);
}
@@ -191,7 +191,7 @@ void AlsaSoundDevice::restoreState (KConfig *c)
ConfigPageInfo AlsaSoundDevice::createConfigurationPage()
{
AlsaSoundConfiguration *conf = new AlsaSoundConfiguration(NULL, this);
- QObject::connect(this, SIGNAL(sigUpdateConfig()), conf, SLOT(slotUpdateConfig()));
+ TQObject::connect(this, TQT_SIGNAL(sigUpdateConfig()), conf, TQT_SLOT(slotUpdateConfig()));
return ConfigPageInfo (conf,
i18n("ALSA Sound"),
i18n("ALSA Sound Device Options"),
@@ -224,7 +224,7 @@ AboutPageInfo AlsaSoundDevice::createAboutPage()
-bool AlsaSoundDevice::preparePlayback(SoundStreamID id, const QString &channel, bool active_mode, bool start_immediately)
+bool AlsaSoundDevice::preparePlayback(SoundStreamID id, const TQString &channel, bool active_mode, bool start_immediately)
{
if (id.isValid()) {
m_PlaybackStreams.insert(id, SoundStreamConfig(channel, active_mode));
@@ -236,7 +236,7 @@ bool AlsaSoundDevice::preparePlayback(SoundStreamID id, const QString &channel,
return false;
}
-bool AlsaSoundDevice::prepareCapture(SoundStreamID id, const QString &channel)
+bool AlsaSoundDevice::prepareCapture(SoundStreamID id, const TQString &channel)
{
if (id.isValid()) {
m_CaptureStreams.insert(id, SoundStreamConfig(channel));
@@ -248,8 +248,8 @@ bool AlsaSoundDevice::prepareCapture(SoundStreamID id, const QString &channel)
bool AlsaSoundDevice::releasePlayback(SoundStreamID id)
{
- if (id.isValid() && m_PlaybackStreams.contains(id)) {
- if (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id)) {
+ if (id.isValid() && m_PlaybackStreams.tqcontains(id)) {
+ if (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id)) {
stopPlayback(id);
}
m_PlaybackStreams.remove(id);
@@ -260,7 +260,7 @@ bool AlsaSoundDevice::releasePlayback(SoundStreamID id)
bool AlsaSoundDevice::releaseCapture(SoundStreamID id)
{
- if (id.isValid() && m_CaptureStreams.contains(id)) {
+ if (id.isValid() && m_CaptureStreams.tqcontains(id)) {
if (m_CaptureStreamID == id) {
stopCapture(id);
}
@@ -284,7 +284,7 @@ bool AlsaSoundDevice::supportsCapture() const
bool AlsaSoundDevice::startPlayback(SoundStreamID id)
{
- if (id.isValid() && m_PlaybackStreams.contains(id) && m_EnablePlayback) {
+ if (id.isValid() && m_PlaybackStreams.tqcontains(id) && m_EnablePlayback) {
SoundStreamConfig &cfg = m_PlaybackStreams[id];
@@ -295,7 +295,7 @@ bool AlsaSoundDevice::startPlayback(SoundStreamID id)
ok = true;
}
} else {
- if (!m_PassivePlaybackStreams.contains(id))
+ if (!m_PassivePlaybackStreams.tqcontains(id))
m_PassivePlaybackStreams.append(id);
ok = true;
}
@@ -326,12 +326,12 @@ bool AlsaSoundDevice::pausePlayback(SoundStreamID /*id*/)
bool AlsaSoundDevice::stopPlayback(SoundStreamID id)
{
- if (id.isValid() && m_PlaybackStreams.contains(id)) {
+ if (id.isValid() && m_PlaybackStreams.tqcontains(id)) {
SoundStreamConfig &cfg = m_PlaybackStreams[id];
if (!cfg.m_ActiveMode) {
- if (m_PassivePlaybackStreams.contains(id)) {
+ if (m_PassivePlaybackStreams.tqcontains(id)) {
/* float tmp = 0;
writePlaybackMixerVolume(cfg.m_Channel, tmp, true);*/
m_PassivePlaybackStreams.remove(id);
@@ -351,7 +351,7 @@ bool AlsaSoundDevice::stopPlayback(SoundStreamID id)
bool AlsaSoundDevice::isPlaybackRunning(SoundStreamID id, bool &b) const
{
- if (id.isValid() && m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id)) {
+ if (id.isValid() && m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id)) {
b = true;
return true;
} else {
@@ -364,7 +364,7 @@ bool AlsaSoundDevice::startCaptureWithFormat(SoundStreamID id,
SoundFormat &real_format,
bool force_format)
{
- if (m_CaptureStreams.contains(id) && m_EnableCapture) {
+ if (m_CaptureStreams.tqcontains(id) && m_EnableCapture) {
if (m_CaptureStreamID != id) {
m_CapturePos = 0;
@@ -418,9 +418,9 @@ bool AlsaSoundDevice::stopCapture(SoundStreamID id)
slotPollCapture();
// if (m_captureThread->error()) {
-// logError(i18n("ALSA Plugin, device plughw:%1,%2: %3").arg(m_CaptureCard)
-// .arg(m_CaptureDevice)
-// .arg(i18n("unknown error")));
+// logError(i18n("ALSA Plugin, device plughw:%1,%2: %3").tqarg(m_CaptureCard)
+// .tqarg(m_CaptureDevice)
+// .tqarg(i18n("unknown error")));
// }
//
// delete m_captureThread;
@@ -454,7 +454,7 @@ bool AlsaSoundDevice::isCaptureRunning(SoundStreamID id, bool &b, SoundFormat &s
bool AlsaSoundDevice::noticeSoundStreamClosed(SoundStreamID id)
{
bool found = false;
- if (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id)) {
+ if (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id)) {
stopPlayback(id);
found = true;
}
@@ -471,13 +471,13 @@ bool AlsaSoundDevice::noticeSoundStreamClosed(SoundStreamID id)
bool AlsaSoundDevice::noticeSoundStreamRedirected(SoundStreamID oldID, SoundStreamID newID)
{
bool found = false;
- if (m_PlaybackStreams.contains(oldID)) {
+ if (m_PlaybackStreams.tqcontains(oldID)) {
m_PlaybackStreams.insert(newID, m_PlaybackStreams[oldID]);
if (newID != oldID)
m_PlaybackStreams.remove(oldID);
found = true;
}
- if (m_CaptureStreams.contains(oldID)) {
+ if (m_CaptureStreams.tqcontains(oldID)) {
m_CaptureStreams.insert(newID, m_CaptureStreams[oldID]);
if (newID != oldID)
m_CaptureStreams.remove(oldID);
@@ -488,7 +488,7 @@ bool AlsaSoundDevice::noticeSoundStreamRedirected(SoundStreamID oldID, SoundStre
m_PlaybackStreamID = newID;
if (m_CaptureStreamID == oldID)
m_CaptureStreamID = newID;
- if (m_PassivePlaybackStreams.contains(oldID)) {
+ if (m_PassivePlaybackStreams.tqcontains(oldID)) {
m_PassivePlaybackStreams.remove(oldID);
m_PassivePlaybackStreams.append(newID);
}
@@ -526,7 +526,7 @@ bool AlsaSoundDevice::noticeSoundStreamData(SoundStreamID id,
/* if (n < size) {
m_PlaybackSkipCount += size - n;
} else if (m_PlaybackSkipCount > 0) {
- logWarning(i18n("plughw:%1,%2: Playback buffer overflow. Skipped %3 bytes").arg(m_PlaybackCard).arg(m_PlaybackDevice).arg(QString::number(m_PlaybackSkipCount)));
+ logWarning(i18n("plughw:%1,%2: Playback buffer overflow. Skipped %3 bytes").tqarg(m_PlaybackCard).tqarg(m_PlaybackDevice).tqarg(TQString::number(m_PlaybackSkipCount)));
m_PlaybackSkipCount = 0;
}
return m_PlaybackSkipCount == 0;*/
@@ -550,12 +550,12 @@ void AlsaSoundDevice::slotPollPlayback()
if (framesWritten > 0) {
m_PlaybackBuffer.removeData(bytesWritten);
} else if (framesWritten == 0) {
- logError(i18n("ALSA Plugin: cannot write data for device plughw:%1,%2").arg(m_PlaybackCard).arg(m_PlaybackDevice));
+ logError(i18n("ALSA Plugin: cannot write data for device plughw:%1,%2").tqarg(m_PlaybackCard).tqarg(m_PlaybackDevice));
} else if (framesWritten == -EAGAIN) {
// do nothing
} else {
snd_pcm_prepare(m_hPlayback);
- logWarning(i18n("ALSA Plugin: buffer underrun for device plughw:%1,%2").arg(m_PlaybackCard).arg(m_PlaybackDevice));
+ logWarning(i18n("ALSA Plugin: buffer underrun for device plughw:%1,%2").tqarg(m_PlaybackCard).tqarg(m_PlaybackDevice));
}
}
@@ -566,8 +566,8 @@ void AlsaSoundDevice::slotPollPlayback()
checkMixerVolume(m_PlaybackStreamID);
}
- QValueListConstIterator<SoundStreamID> end = m_PassivePlaybackStreams.end();
- for (QValueListConstIterator<SoundStreamID> it = m_PassivePlaybackStreams.begin(); it != end; ++it)
+ TQValueListConstIterator<SoundStreamID> end = m_PassivePlaybackStreams.end();
+ for (TQValueListConstIterator<SoundStreamID> it = m_PassivePlaybackStreams.begin(); it != end; ++it)
checkMixerVolume(*it);
}
@@ -577,7 +577,7 @@ void AlsaSoundDevice::slotPollCapture()
if (m_CaptureStreamID.isValid() && m_hCapture) {
// while (m_captureThread && m_captureThread->getAvailableReadBuffers()) {
-// QString dev = QString("alsa://plughw:%1,%2").arg(m_CaptureCard).arg(m_CaptureDevice);
+// TQString dev = TQString("alsa://plughw:%1,%2").tqarg(m_CaptureCard).tqarg(m_CaptureDevice);
// size_t size = 0;
// char *buffer = m_captureThread->getReadBuffer(size);
// time_t cur_time = time(NULL);
@@ -608,22 +608,22 @@ void AlsaSoundDevice::slotPollCapture()
m_CaptureBuffer.removeFreeSpace(bytesRead);
} else if (framesRead == 0) {
snd_pcm_prepare(m_hCapture);
- logError(i18n("ALSA Plugin: cannot read data from device plughw:%1,%2").arg(m_CaptureCard).arg(m_CaptureDevice));
+ logError(i18n("ALSA Plugin: cannot read data from device plughw:%1,%2").tqarg(m_CaptureCard).tqarg(m_CaptureDevice));
} else if (framesRead == -EAGAIN) {
// do nothing
} else {
snd_pcm_prepare(m_hCapture);
- logWarning(i18n("ALSA Plugin: buffer overrun for device plughw:%1,%2 (buffersize=%3, buffer=%4)").arg(m_CaptureCard).arg(m_CaptureDevice).arg(bufferSize).arg((long long unsigned)buffer));
+ logWarning(i18n("ALSA Plugin: buffer overrun for device plughw:%1,%2 (buffersize=%3, buffer=%4)").tqarg(m_CaptureCard).tqarg(m_CaptureDevice).tqarg(bufferSize).tqarg((long long unsigned)buffer));
}
- QString dev = QString("alsa://plughw:%1,%2").arg(m_CaptureCard).arg(m_CaptureDevice);
+ TQString dev = TQString("alsa://plughw:%1,%2").tqarg(m_CaptureCard).tqarg(m_CaptureDevice);
while (m_CaptureBuffer.getFillSize() > m_CaptureBuffer.getSize() / 3) {
size_t size = 0;
buffer = m_CaptureBuffer.getData(size);
time_t cur_time = time(NULL);
size_t consumed_size = SIZE_T_DONT_CARE;
- notifySoundStreamData(m_CaptureStreamID, m_CaptureFormat, buffer, size, consumed_size, SoundMetaData(m_CapturePos, cur_time - m_CaptureStartTime, cur_time, i18n("internal stream, not stored (%1)").arg(dev)));
+ notifySoundStreamData(m_CaptureStreamID, m_CaptureFormat, buffer, size, consumed_size, SoundMetaData(m_CapturePos, cur_time - m_CaptureStartTime, cur_time, i18n("internal stream, not stored (%1)").tqarg(dev)));
if (consumed_size == SIZE_T_DONT_CARE)
consumed_size = size;
@@ -664,7 +664,7 @@ bool AlsaSoundDevice::openPlaybackDevice(const SoundFormat &format, bool reopen)
m_PlaybackFormat = format;
- QString dev = QString("plughw:%1,%2").arg(m_PlaybackCard).arg(m_PlaybackDevice);
+ TQString dev = TQString("plughw:%1,%2").tqarg(m_PlaybackCard).tqarg(m_PlaybackDevice);
bool error = !openAlsaDevice(m_hPlayback, m_PlaybackFormat, dev.ascii(), SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK, m_PlaybackLatency);
if (!error) {
@@ -704,7 +704,7 @@ bool AlsaSoundDevice::openCaptureDevice(const SoundFormat &format, bool reopen)
m_CaptureFormat = format;
- QString dev = QString("plughw:%1,%2").arg(m_CaptureCard).arg(m_CaptureDevice);
+ TQString dev = TQString("plughw:%1,%2").tqarg(m_CaptureCard).tqarg(m_CaptureDevice);
// bool error = !openAlsaDevice(m_hCapture, m_CaptureFormat, dev.ascii(), SND_PCM_STREAM_CAPTURE, /*flags = block*/0, m_CaptureLatency);
bool error = !openAlsaDevice(m_hCapture, m_CaptureFormat, dev.ascii(), SND_PCM_STREAM_CAPTURE, SND_PCM_NONBLOCK, m_CaptureLatency);
@@ -733,19 +733,19 @@ bool AlsaSoundDevice::openAlsaDevice(snd_pcm_t *&alsa_handle, SoundFormat &forma
/* OPEN */
if (!error && snd_pcm_open(&alsa_handle, pcm_name, stream, flags) < 0) {
- logError(i18n("ALSA Plugin: Error opening PCM device %1").arg(pcm_name));
+ logError(i18n("ALSA Plugin: Error opening PCM device %1").tqarg(pcm_name));
error = true;
}
if (!error && snd_pcm_hw_params_any(alsa_handle, hwparams) < 0) {
- logError(i18n("ALSA Plugin: Can not configure PCM device %1").arg(pcm_name));
+ logError(i18n("ALSA Plugin: Can not configure PCM device %1").tqarg(pcm_name));
error = true;
}
/* interleaved access type */
if (!error && snd_pcm_hw_params_set_access(alsa_handle, hwparams, SND_PCM_ACCESS_RW_INTERLEAVED) < 0) {
- logError(i18n("ALSA Plugin: Error setting access for %1").arg(pcm_name));
+ logError(i18n("ALSA Plugin: Error setting access for %1").tqarg(pcm_name));
error = true;
}
@@ -755,30 +755,30 @@ bool AlsaSoundDevice::openAlsaDevice(snd_pcm_t *&alsa_handle, SoundFormat &forma
!format.m_IsSigned,
format.m_Endianess == BIG_ENDIAN);
if (!error && snd_pcm_hw_params_set_format(alsa_handle, hwparams, sample_format) < 0) {
- logError(i18n("ALSA Plugin: Error setting sample format for %1").arg(pcm_name));
+ logError(i18n("ALSA Plugin: Error setting sample format for %1").tqarg(pcm_name));
error = true;
}
/* channels */
if (!error && snd_pcm_hw_params_set_channels(alsa_handle, hwparams, format.m_Channels) < 0) {
- logError(i18n("ALSA Plugin: Error setting channels for %1").arg(pcm_name));
+ logError(i18n("ALSA Plugin: Error setting channels for %1").tqarg(pcm_name));
error = true;
}
/* sample rate */
int rate = format.m_SampleRate;
if (!error && snd_pcm_hw_params_set_rate_near(alsa_handle, hwparams, &format.m_SampleRate, &dir) < 0) {
- logError(i18n("ALSA Plugin: Error setting rate for %1").arg(pcm_name));
+ logError(i18n("ALSA Plugin: Error setting rate for %1").tqarg(pcm_name));
error = true;
}
if (!error && format.m_SampleRate != format.m_SampleRate) {
- logWarning(i18n("ALSA Plugin: The rate %1 Hz is not supported by your hardware %2. Using %3 Hz instead").arg(rate).arg(pcm_name).arg(format.m_SampleRate));
+ logWarning(i18n("ALSA Plugin: The rate %1 Hz is not supported by your hardware %2. Using %3 Hz instead").tqarg(rate).tqarg(pcm_name).tqarg(format.m_SampleRate));
}
snd_pcm_uframes_t period_size = m_HWBufferSize / format.frameSize();
if (!error && snd_pcm_hw_params_set_period_size_near(alsa_handle, hwparams, &period_size, &dir) < 0) {
- logError(i18n("ALSA Plugin: Error setting period size for %1").arg(pcm_name));
+ logError(i18n("ALSA Plugin: Error setting period size for %1").tqarg(pcm_name));
error = true;
}
@@ -788,7 +788,7 @@ bool AlsaSoundDevice::openAlsaDevice(snd_pcm_t *&alsa_handle, SoundFormat &forma
//
// /* fragments */
// if (!error && snd_pcm_hw_params_set_periods(alsa_handle, hwparams, periods, 0) < 0) {
-// logError(i18n("ALSA Plugin: Error setting periods for %1").arg(pcm_name));
+// logError(i18n("ALSA Plugin: Error setting periods for %1").tqarg(pcm_name));
// error = true;
// }
@@ -798,17 +798,17 @@ bool AlsaSoundDevice::openAlsaDevice(snd_pcm_t *&alsa_handle, SoundFormat &forma
// if (!error && snd_pcm_hw_params_set_buffer_size_near(alsa_handle, hwparams, &exact_buffersize_frames) < 0) {
// exact_buffersize_frames = 4096;
// if (!error && snd_pcm_hw_params_set_buffer_size_near(alsa_handle, hwparams, &exact_buffersize_frames) < 0) {
-// logError(i18n("ALSA Plugin: Error setting buffersize for %1").arg(pcm_name));
+// logError(i18n("ALSA Plugin: Error setting buffersize for %1").tqarg(pcm_name));
// error = true;
// }
// }
// size_t exact_buffersize = exact_buffersize_frames * format.frameSize();
// if (!error && m_HWBufferSize != exact_buffersize) {
-// logWarning(i18n("ALSA Plugin: Hardware %1 does not support buffer size of %2. Using buffer size of %3 instead.").arg(pcm_name).arg(m_HWBufferSize).arg(exact_buffersize));
+// logWarning(i18n("ALSA Plugin: Hardware %1 does not support buffer size of %2. Using buffer size of %3 instead.").tqarg(pcm_name).tqarg(m_HWBufferSize).tqarg(exact_buffersize));
// size_t tmp = (((m_HWBufferSize - 1) / exact_buffersize) + 1) * exact_buffersize;
// setHWBufferSize(tmp);
-// logInfo(i18n("ALSA Plugin: adjusted buffer size for %1 to %2 bytes").arg(pcm_name).arg(QString::number(tmp)));
+// logInfo(i18n("ALSA Plugin: adjusted buffer size for %1 to %2 bytes").tqarg(pcm_name).tqarg(TQString::number(tmp)));
// }
/* set all params */
@@ -819,7 +819,7 @@ bool AlsaSoundDevice::openAlsaDevice(snd_pcm_t *&alsa_handle, SoundFormat &forma
}
if (!error && snd_pcm_hw_params_get_period_size(hwparams, &period_size, &dir) < 0) {
- logError(i18n("ALSA Plugin: Error getting period size for %1").arg(pcm_name));
+ logError(i18n("ALSA Plugin: Error getting period size for %1").tqarg(pcm_name));
error = true;
}
@@ -884,7 +884,7 @@ bool AlsaSoundDevice::openPlaybackMixerDevice(bool reopen)
bool AlsaSoundDevice::openCaptureMixerDevice(bool reopen)
{
-// logDebug("AlsaSoundDevice::openCaptureMixerDevice: card == " + QString::number(m_CaptureCard));
+// logDebug("AlsaSoundDevice::openCaptureMixerDevice: card == " + TQString::number(m_CaptureCard));
return openMixerDevice(m_hCaptureMixer, m_CaptureCard, reopen, &m_CapturePollingTimer, m_CaptureLatency);
}
@@ -900,12 +900,12 @@ bool AlsaSoundDevice::closeCaptureMixerDevice(bool force)
}
-static int mixer_dummy_callback(snd_mixer_t *, unsigned int /*mask*/, snd_mixer_elem_t */*elem*/)
+static int mixer_dummy_callback(snd_mixer_t *, unsigned int /*tqmask*/, snd_mixer_elem_t */*elem*/)
{
return 0;
}
-bool AlsaSoundDevice::openMixerDevice(snd_mixer_t *&mixer_handle, int card, bool reopen, QTimer *timer, int timer_latency)
+bool AlsaSoundDevice::openMixerDevice(snd_mixer_t *&mixer_handle, int card, bool reopen, TQTimer *timer, int timer_latency)
{
if (reopen) {
if (mixer_handle >= 0)
@@ -920,22 +920,22 @@ bool AlsaSoundDevice::openMixerDevice(snd_mixer_t *&mixer_handle, int card, bool
staticLogError(i18n("ALSA Plugin: Error opening mixer"));
error = true;
}
- QString cardid = "hw:" + QString::number(card);
+ TQString cardid = "hw:" + TQString::number(card);
bool attached = false;
if (!error) {
if (snd_mixer_attach (mixer_handle, cardid.ascii()) < 0) {
- staticLogError(i18n("ALSA Plugin: ERROR: snd_mixer_attach for card %1").arg(card));
+ staticLogError(i18n("ALSA Plugin: ERROR: snd_mixer_attach for card %1").tqarg(card));
error = true;
} else {
attached = true;
}
}
if (!error && snd_mixer_selem_register(mixer_handle, NULL, NULL) < 0) {
- staticLogError(i18n("ALSA Plugin: Error: snd_mixer_selem_register for card %1").arg(card));
+ staticLogError(i18n("ALSA Plugin: Error: snd_mixer_selem_register for card %1").tqarg(card));
error = true;
}
if (!error && snd_mixer_load (mixer_handle) < 0) {
- staticLogError(i18n("ALSA Plugin: Error: snd_mixer_load for card %1").arg(card));
+ staticLogError(i18n("ALSA Plugin: Error: snd_mixer_load for card %1").tqarg(card));
error = true;
}
if (mixer_handle) {
@@ -958,7 +958,7 @@ bool AlsaSoundDevice::openMixerDevice(snd_mixer_t *&mixer_handle, int card, bool
}
-bool AlsaSoundDevice::closeMixerDevice(snd_mixer_t *&mixer_handle, int card, SoundStreamID id, snd_pcm_t *pcm_handle, bool force, QTimer *timer)
+bool AlsaSoundDevice::closeMixerDevice(snd_mixer_t *&mixer_handle, int card, SoundStreamID id, snd_pcm_t *pcm_handle, bool force, TQTimer *timer)
{
if (!id.isValid() || force) {
@@ -966,7 +966,7 @@ bool AlsaSoundDevice::closeMixerDevice(snd_mixer_t *&mixer_handle, int card, Sou
timer->stop();
if (mixer_handle) {
- QString cardid = "hw:" + QString::number(card);
+ TQString cardid = "hw:" + TQString::number(card);
snd_mixer_free(mixer_handle);
snd_mixer_detach(mixer_handle, cardid.ascii());
snd_mixer_close (mixer_handle);
@@ -979,7 +979,7 @@ bool AlsaSoundDevice::closeMixerDevice(snd_mixer_t *&mixer_handle, int card, Sou
void AlsaSoundDevice::getPlaybackMixerChannels(
int card,
snd_mixer_t *__mixer_handle,
- QStringList &retval, QMap<QString, AlsaMixerElement> &ch2id)
+ TQStringList &retval, TQMap<TQString, AlsaMixerElement> &ch2id)
{
retval.clear();
ch2id.clear();
@@ -1000,10 +1000,10 @@ void AlsaSoundDevice::getPlaybackMixerChannels(
if (!snd_mixer_selem_is_active(elem))
continue;
snd_mixer_selem_get_id(elem, sid);
- QString name = snd_mixer_selem_id_get_name(sid);
+ TQString name = snd_mixer_selem_id_get_name(sid);
int idx = snd_mixer_selem_id_get_index(sid);
if (idx)
- name = i18n("context-mixername-number", "%1 %2").arg(name).arg(idx);
+ name = i18n("context-mixername-number", "%1 %2").tqarg(name).tqarg(idx);
if (snd_mixer_selem_has_playback_volume(elem)) {
ch2id[name] = sid;
retval.append(name);
@@ -1019,9 +1019,9 @@ void AlsaSoundDevice::getPlaybackMixerChannels(
void AlsaSoundDevice::getCaptureMixerChannels(
int card,
snd_mixer_t *__mixer_handle,
- QStringList &vol_list, QMap<QString, AlsaMixerElement> &vol_ch2id,
- QStringList &sw_list, QMap<QString, AlsaMixerElement> &sw_ch2id,
- QStringList *all_list
+ TQStringList &vol_list, TQMap<TQString, AlsaMixerElement> &vol_ch2id,
+ TQStringList &sw_list, TQMap<TQString, AlsaMixerElement> &sw_ch2id,
+ TQStringList *all_list
)
{
vol_list.clear();
@@ -1034,7 +1034,7 @@ void AlsaSoundDevice::getCaptureMixerChannels(
bool use_tmp_handle = false;
if (!mixer_handle) {
-// staticLogDebug("AlsaSoundDevice::getCaptureMixerChannels: card == " + QString::number(card/*m_CaptureCard*/));
+// staticLogDebug("AlsaSoundDevice::getCaptureMixerChannels: card == " + TQString::number(card/*m_CaptureCard*/));
openMixerDevice(mixer_handle, card /*m_CaptureCard*/, false, NULL, 0);
use_tmp_handle = true;
}
@@ -1047,10 +1047,10 @@ void AlsaSoundDevice::getCaptureMixerChannels(
if (!snd_mixer_selem_is_active(elem))
continue;
snd_mixer_selem_get_id(elem, sid);
- QString name = snd_mixer_selem_id_get_name(sid);
+ TQString name = snd_mixer_selem_id_get_name(sid);
int idx = snd_mixer_selem_id_get_index(sid);
if (idx)
- name = i18n("context-mixerelement-name-number", "%1 %2").arg(name).arg(idx);
+ name = i18n("context-mixerelement-name-number", "%1 %2").tqarg(name).tqarg(idx);
bool add2all = false;
if (snd_mixer_selem_has_capture_switch(elem)) {
@@ -1074,13 +1074,13 @@ void AlsaSoundDevice::getCaptureMixerChannels(
}
}
-const QStringList &AlsaSoundDevice::getPlaybackChannels() const
+const TQStringList &AlsaSoundDevice::getPlaybackChannels() const
{
return m_PlaybackChannels;
}
-const QStringList &AlsaSoundDevice::getCaptureChannels() const
+const TQStringList &AlsaSoundDevice::getCaptureChannels() const
{
return m_CaptureChannelsSwitch;
}
@@ -1088,7 +1088,7 @@ const QStringList &AlsaSoundDevice::getCaptureChannels() const
bool AlsaSoundDevice::setPlaybackVolume(SoundStreamID id, float volume)
{
- if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id))) {
+ if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id))) {
SoundStreamConfig &cfg = m_PlaybackStreams[id];
if (rint(100*volume) != rint(100*cfg.m_Volume)) {
@@ -1120,7 +1120,7 @@ bool AlsaSoundDevice::setCaptureVolume(SoundStreamID id, float volume)
bool AlsaSoundDevice::getPlaybackVolume(SoundStreamID id, float &volume) const
{
- if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id))) {
+ if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id))) {
const SoundStreamConfig &cfg = m_PlaybackStreams[id];
volume = cfg.m_Volume;
return true;
@@ -1144,7 +1144,7 @@ void AlsaSoundDevice::checkMixerVolume(SoundStreamID id)
{
if (id.isValid()) {
- if (m_hPlaybackMixer && m_PassivePlaybackStreams.contains(id) || m_PlaybackStreamID == id) {
+ if (m_hPlaybackMixer && m_PassivePlaybackStreams.tqcontains(id) || m_PlaybackStreamID == id) {
snd_mixer_handle_events(m_hPlaybackMixer);
SoundStreamConfig &cfg = m_PlaybackStreams[id];
@@ -1164,7 +1164,7 @@ void AlsaSoundDevice::checkMixerVolume(SoundStreamID id)
snd_mixer_handle_events(m_hCaptureMixer);
SoundStreamConfig &cfg = m_CaptureStreams[id];
- if (m_CaptureChannels2ID.contains(cfg.m_Channel)) {
+ if (m_CaptureChannels2ID.tqcontains(cfg.m_Channel)) {
float v = readCaptureMixerVolume(cfg.m_Channel);
if (rint(100*cfg.m_Volume) != rint(100*v)) {
cfg.m_Volume = v;
@@ -1176,12 +1176,12 @@ void AlsaSoundDevice::checkMixerVolume(SoundStreamID id)
}
-float AlsaSoundDevice::readPlaybackMixerVolume(const QString &channel, bool &muted) const
+float AlsaSoundDevice::readPlaybackMixerVolume(const TQString &channel, bool &muted) const
{
if (!m_hPlaybackMixer)
return 0; // without error
- if (m_PlaybackChannels2ID.contains(channel) && m_hPlaybackMixer) {
+ if (m_PlaybackChannels2ID.tqcontains(channel) && m_hPlaybackMixer) {
AlsaMixerElement sid = m_PlaybackChannels2ID[channel];
snd_mixer_elem_t *elem = snd_mixer_find_selem(m_hPlaybackMixer, sid);
if (elem) {
@@ -1204,18 +1204,18 @@ float AlsaSoundDevice::readPlaybackMixerVolume(const QString &channel, bool &mut
}
logError("AlsaSound::readPlaybackMixerVolume: " +
i18n("error while reading volume from hwplug:%1,%2")
- .arg(m_PlaybackCard)
- .arg(m_PlaybackDevice));
+ .tqarg(m_PlaybackCard)
+ .tqarg(m_PlaybackDevice));
return 0;
}
-float AlsaSoundDevice::readCaptureMixerVolume(const QString &channel) const
+float AlsaSoundDevice::readCaptureMixerVolume(const TQString &channel) const
{
if (!m_hCaptureMixer)
return 0; // without error
- if (m_CaptureChannels2ID.contains(channel) && m_hCaptureMixer) {
+ if (m_CaptureChannels2ID.tqcontains(channel) && m_hCaptureMixer) {
AlsaMixerElement sid = m_CaptureChannels2ID[channel];
snd_mixer_elem_t *elem = snd_mixer_find_selem(m_hCaptureMixer, sid);
if (elem) {
@@ -1234,13 +1234,13 @@ float AlsaSoundDevice::readCaptureMixerVolume(const QString &channel) const
}
logError("AlsaSound::readCaptureMixerVolume: " +
i18n("error while reading volume from hwplug:%1,%2")
- .arg(m_CaptureCard)
- .arg(m_CaptureDevice));
+ .tqarg(m_CaptureCard)
+ .tqarg(m_CaptureDevice));
return 0;
}
-bool AlsaSoundDevice::writePlaybackMixerVolume (const QString &channel, float &vol, bool muted)
+bool AlsaSoundDevice::writePlaybackMixerVolume (const TQString &channel, float &vol, bool muted)
{
if (vol > 1.0) vol = 1.0;
if (vol < 0) vol = 0.0;
@@ -1248,7 +1248,7 @@ bool AlsaSoundDevice::writePlaybackMixerVolume (const QString &channel, float &v
if (!m_hPlaybackMixer)
return false;
- if (m_PlaybackChannels2ID.contains(channel) && m_hPlaybackMixer) {
+ if (m_PlaybackChannels2ID.tqcontains(channel) && m_hPlaybackMixer) {
AlsaMixerElement sid = m_PlaybackChannels2ID[channel];
snd_mixer_elem_t *elem = snd_mixer_find_selem(m_hPlaybackMixer, sid);
if (elem) {
@@ -1267,16 +1267,16 @@ bool AlsaSoundDevice::writePlaybackMixerVolume (const QString &channel, float &v
}
logError("AlsaSound::writePlaybackMixerVolume: " +
i18n("error while writing volume %1 to hwplug:%2,%3")
- .arg(vol)
- .arg(m_PlaybackCard)
- .arg(m_PlaybackDevice));
+ .tqarg(vol)
+ .tqarg(m_PlaybackCard)
+ .tqarg(m_PlaybackDevice));
return false;
}
-bool AlsaSoundDevice::writeCaptureMixerVolume (const QString &channel, float &vol)
+bool AlsaSoundDevice::writeCaptureMixerVolume (const TQString &channel, float &vol)
{
if (vol > 1.0) vol = 1.0;
if (vol < 0) vol = 0.0;
@@ -1284,7 +1284,7 @@ bool AlsaSoundDevice::writeCaptureMixerVolume (const QString &channel, float &vo
if (!m_hCaptureMixer)
return false;
- if (m_CaptureChannels2ID.contains(channel) && m_hCaptureMixer) {
+ if (m_CaptureChannels2ID.tqcontains(channel) && m_hCaptureMixer) {
AlsaMixerElement sid = m_CaptureChannels2ID[channel];
snd_mixer_elem_t *elem = snd_mixer_find_selem(m_hCaptureMixer, sid);
if (elem) {
@@ -1302,19 +1302,19 @@ bool AlsaSoundDevice::writeCaptureMixerVolume (const QString &channel, float &vo
}
logError("AlsaSound::writeCaptureMixerVolume: " +
i18n("error while writing volume %1 to hwplug:%2,%3")
- .arg(vol)
- .arg(m_CaptureCard)
- .arg(m_CaptureDevice));
+ .tqarg(vol)
+ .tqarg(m_CaptureCard)
+ .tqarg(m_CaptureDevice));
return false;
}
-bool AlsaSoundDevice::writeCaptureMixerSwitch (const QString &channel, bool capture)
+bool AlsaSoundDevice::writeCaptureMixerSwitch (const TQString &channel, bool capture)
{
if (!m_hCaptureMixer)
return false;
- if (m_CaptureChannelsSwitch2ID.contains(channel) && m_hCaptureMixer) {
+ if (m_CaptureChannelsSwitch2ID.tqcontains(channel) && m_hCaptureMixer) {
AlsaMixerElement sid = m_CaptureChannelsSwitch2ID[channel];
snd_mixer_elem_t *elem = snd_mixer_find_selem(m_hCaptureMixer, sid);
if (elem) {
@@ -1325,50 +1325,50 @@ bool AlsaSoundDevice::writeCaptureMixerSwitch (const QString &channel, bool capt
}
logError("AlsaSound::writeCaptureMixerSwitch: " +
i18n("error while setting capture switch %1 for hwplug:%2,%3")
- .arg(channel)
- .arg(m_CaptureCard)
- .arg(m_CaptureDevice));
+ .tqarg(channel)
+ .tqarg(m_CaptureCard)
+ .tqarg(m_CaptureDevice));
return false;
}
-void AlsaSoundDevice::selectCaptureChannel (const QString &channel)
+void AlsaSoundDevice::selectCaptureChannel (const TQString &channel)
{
writeCaptureMixerSwitch(channel, true);
- const QString ADC = "ADC";
- if (m_CaptureChannels2ID.contains(ADC)) {
+ const TQString ADC = "ADC";
+ if (m_CaptureChannels2ID.tqcontains(ADC)) {
float v = readCaptureMixerVolume(ADC);
if (rint(v*100) == 0) {
float tmp_vol = 1.0;
writeCaptureMixerVolume(ADC, tmp_vol);
}
}
- const QString Digital = "Digital";
- if (m_CaptureChannels2ID.contains(Digital)) {
+ const TQString Digital = "Digital";
+ if (m_CaptureChannels2ID.tqcontains(Digital)) {
float v = readCaptureMixerVolume(Digital);
if (rint(v*100) == 0) {
float tmp_vol = 1.0;
writeCaptureMixerVolume(Digital, tmp_vol);
}
}
- const QString WAVE = "Wave";
- if (m_CaptureChannels2ID.contains(WAVE)) {
+ const TQString WAVE = "Wave";
+ if (m_CaptureChannels2ID.tqcontains(WAVE)) {
float x = 0;
writeCaptureMixerVolume(WAVE, x);
}
- const QString Capture = "Capture";
- if (m_CaptureChannelsSwitch2ID.contains(Capture)) {
+ const TQString Capture = "Capture";
+ if (m_CaptureChannelsSwitch2ID.tqcontains(Capture)) {
writeCaptureMixerSwitch(Capture, true);
}
- for (QMapConstIterator<QString, AlsaConfigMixerSetting> it = m_CaptureMixerSettings.begin(); it != m_CaptureMixerSettings.end(); ++it) {
+ for (TQMapConstIterator<TQString, AlsaConfigMixerSetting> it = m_CaptureMixerSettings.begin(); it != m_CaptureMixerSettings.end(); ++it) {
const AlsaConfigMixerSetting &s = *it;
if (s.m_card == m_CaptureCard && s.m_use) {
float vol = s.m_volume;
- if (m_CaptureChannels2ID.contains(s.m_name))
+ if (m_CaptureChannels2ID.tqcontains(s.m_name))
writeCaptureMixerVolume(s.m_name, vol);
- if (m_CaptureChannelsSwitch2ID.contains(s.m_name))
+ if (m_CaptureChannelsSwitch2ID.tqcontains(s.m_name))
writeCaptureMixerSwitch(s.m_name, s.m_active);
}
}
@@ -1423,10 +1423,10 @@ void AlsaSoundDevice::setPlaybackDevice(int card, int dev)
void AlsaSoundDevice::setCaptureDevice(int card, int dev)
{
-// logDebug("AlsaSoundDevice::setCaptureDevice-1: m_CaptureCard == " + QString::number(m_CaptureCard) + ", card == " + QString::number(card));
+// logDebug("AlsaSoundDevice::setCaptureDevice-1: m_CaptureCard == " + TQString::number(m_CaptureCard) + ", card == " + TQString::number(card));
if (m_CaptureCard == card && m_CaptureDevice == dev)
return;
-// logDebug("AlsaSoundDevice::setCaptureDevice-2: m_CaptureCard == " + QString::number(m_CaptureCard) + ", card == " + QString::number(card));
+// logDebug("AlsaSoundDevice::setCaptureDevice-2: m_CaptureCard == " + TQString::number(m_CaptureCard) + ", card == " + TQString::number(card));
m_CaptureCard = card;
m_CaptureDevice = dev;
@@ -1443,15 +1443,15 @@ void AlsaSoundDevice::setCaptureDevice(int card, int dev)
}
-QString AlsaSoundDevice::getSoundStreamClientDescription() const
+TQString AlsaSoundDevice::getSoundStreamClientDescription() const
{
- return i18n("ALSA Sound Device %1").arg(PluginBase::name());
+ return i18n("ALSA Sound Device %1").tqarg(PluginBase::name());
}
bool AlsaSoundDevice::mute (SoundStreamID id, bool mute)
{
- if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id))) {
+ if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id))) {
SoundStreamConfig &cfg = m_PlaybackStreams[id];
if (mute != cfg.m_Muted) {
if (writePlaybackMixerVolume(cfg.m_Channel, cfg.m_Volume, cfg.m_Muted = mute)) {
@@ -1465,7 +1465,7 @@ bool AlsaSoundDevice::mute (SoundStreamID id, bool mute)
bool AlsaSoundDevice::unmute (SoundStreamID id, bool unmute)
{
- if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id))) {
+ if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id))) {
SoundStreamConfig &cfg = m_PlaybackStreams[id];
bool mute = !unmute;
if (mute != cfg.m_Muted) {
@@ -1480,7 +1480,7 @@ bool AlsaSoundDevice::unmute (SoundStreamID id, bool unmute)
bool AlsaSoundDevice::isMuted(SoundStreamID id, bool &m) const
{
- if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id))) {
+ if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id))) {
const SoundStreamConfig &cfg = m_PlaybackStreams[id];
m = cfg.m_Muted;
return true;
@@ -1489,14 +1489,14 @@ bool AlsaSoundDevice::isMuted(SoundStreamID id, bool &m) const
}
-void AlsaSoundDevice::setCaptureMixerSettings(const QMap<QString, AlsaConfigMixerSetting> &map)
+void AlsaSoundDevice::setCaptureMixerSettings(const TQMap<TQString, AlsaConfigMixerSetting> &map)
{
m_CaptureMixerSettings = map;
}
-// bool AlsaSoundDevice::event(QEvent *_e)
+// bool AlsaSoundDevice::event(TQEvent *_e)
// {
// bool retval = false;
//
@@ -1519,10 +1519,10 @@ void AlsaSoundDevice::setCaptureMixerSettings(const QMap<QString, AlsaConfigMixe
// case CaptureDebug :
// if (m_captureThread) {
// AlsaCaptureEvent *e = static_cast<AlsaCaptureEvent*>(_e);
-// QString msg = i18n("ALSA Plugin, device plughw:%1,%2: %3")
-// .arg(m_CaptureCard)
-// .arg(m_CaptureDevice)
-// .arg(e->message());
+// TQString msg = i18n("ALSA Plugin, device plughw:%1,%2: %3")
+// .tqarg(m_CaptureCard)
+// .tqarg(m_CaptureDevice)
+// .tqarg(e->message());
// switch (_e->type()) {
// case CaptureError :
// logError(msg);
@@ -1545,7 +1545,7 @@ void AlsaSoundDevice::setCaptureMixerSettings(const QMap<QString, AlsaConfigMixe
// break;
//
// default:
-// retval = QObject::event(_e);
+// retval = TQObject::event(_e);
// break;
// }
//
diff --git a/kradio3/plugins/alsa-sound/alsa-sound.h b/kradio3/plugins/alsa-sound/alsa-sound.h
index 93a9fc8..0e4b83a 100644
--- a/kradio3/plugins/alsa-sound/alsa-sound.h
+++ b/kradio3/plugins/alsa-sound/alsa-sound.h
@@ -28,8 +28,8 @@
#include "alsa-config-mixer-setting.h"
-#include <qobject.h>
-#include <qtimer.h>
+#include <tqobject.h>
+#include <tqtimer.h>
#include <alsa/asoundlib.h>
enum DUPLEX_MODE { DUPLEX_UNKNOWN, DUPLEX_FULL, DUPLEX_HALF };
@@ -39,12 +39,12 @@ struct SoundStreamConfig
{
SoundStreamConfig()
: m_ActiveMode(false),
- m_Channel(QString::null),
+ m_Channel(TQString()),
m_Volume(-1),
m_Muted(false)
{}
- SoundStreamConfig(const QString &_channel, bool active_mode = true)
+ SoundStreamConfig(const TQString &_channel, bool active_mode = true)
: m_ActiveMode(active_mode),
m_Channel(_channel),
m_Volume(-1),
@@ -59,7 +59,7 @@ struct SoundStreamConfig
{}
bool m_ActiveMode;
- QString m_Channel;
+ TQString m_Channel;
float m_Volume;
bool m_Muted;
};
@@ -84,14 +84,15 @@ protected:
};
-class AlsaSoundDevice : public QObject,
+class AlsaSoundDevice : public TQObject,
public PluginBase,
public ISoundStreamClient
{
Q_OBJECT
+ TQ_OBJECT
public:
- AlsaSoundDevice (const QString &name);
+ AlsaSoundDevice (const TQString &name);
virtual ~AlsaSoundDevice ();
virtual bool connectI(Interface *i);
@@ -103,10 +104,10 @@ public:
virtual void saveState (KConfig *) const;
virtual void restoreState (KConfig *);
- virtual QString pluginClassName() const { return "AlsaSoundDevice"; }
+ virtual TQString pluginClassName() const { return "AlsaSoundDevice"; }
- 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();
@@ -115,8 +116,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);
@@ -124,23 +125,23 @@ ANSWERS:
bool supportsPlayback() const;
bool supportsCapture() const;
- QString getSoundStreamClientDescription() const;
+ TQString getSoundStreamClientDescription() const;
// ISoundStreamClient: mixer access
public:
static
void getPlaybackMixerChannels(int card, snd_mixer_t *mixer_handle,
- QStringList &retval, QMap<QString, AlsaMixerElement> &int2id);
+ TQStringList &retval, TQMap<TQString, AlsaMixerElement> &int2id);
static
void getCaptureMixerChannels (int card, snd_mixer_t *mixer_handle,
- QStringList &vol_list, QMap<QString, AlsaMixerElement> &vol_ch2id,
- QStringList &sw_list, QMap<QString, AlsaMixerElement> &sw_ch2id,
- QStringList *all_list = NULL);
+ TQStringList &vol_list, TQMap<TQString, AlsaMixerElement> &vol_ch2id,
+ TQStringList &sw_list, TQMap<TQString, AlsaMixerElement> &sw_ch2id,
+ TQStringList *all_list = NULL);
ANSWERS:
- const QStringList &getPlaybackChannels() const;
- const QStringList &getCaptureChannels() const;
+ const TQStringList &getPlaybackChannels() const;
+ const TQStringList &getCaptureChannels() const;
RECEIVERS:
bool setPlaybackVolume(SoundStreamID id, float volume);
@@ -188,7 +189,7 @@ RECEIVERS:
int getPlaybackDevice() const { return m_PlaybackDevice; }
int getCaptureCard() const { return m_CaptureCard; }
int getCaptureDevice() const { return m_CaptureDevice; }
- const QMap<QString, AlsaConfigMixerSetting> &
+ const TQMap<TQString, AlsaConfigMixerSetting> &
getCaptureMixerSettings() const { return m_CaptureMixerSettings; }
void setHWBufferSize(int s);
@@ -197,7 +198,7 @@ RECEIVERS:
void enableCapture(bool on);
void setPlaybackDevice(int card, int device);
void setCaptureDevice(int card, int device);
- void setCaptureMixerSettings(const QMap<QString, AlsaConfigMixerSetting> &map);
+ void setCaptureMixerSettings(const TQMap<TQString, AlsaConfigMixerSetting> &map);
protected slots:
@@ -209,7 +210,7 @@ signals:
void sigUpdateConfig();
protected:
-// bool event(QEvent *_e);
+// bool event(TQEvent *_e);
bool openAlsaDevice(snd_pcm_t *&alsa_handle, SoundFormat &format, const char *pcm_name, snd_pcm_stream_t stream, int flags, unsigned &latency);
@@ -220,19 +221,19 @@ protected:
bool openPlaybackMixerDevice (bool reopen = false);
bool openCaptureMixerDevice (bool reopen = false);
- static bool openMixerDevice(snd_mixer_t *&mixer_handle, int card, bool reopen, QTimer *timer, int timer_latency);
+ static bool openMixerDevice(snd_mixer_t *&mixer_handle, int card, bool reopen, TQTimer *timer, int timer_latency);
bool closeCaptureMixerDevice (bool force = false);
bool closePlaybackMixerDevice(bool force = false);
- static bool closeMixerDevice(snd_mixer_t *&mixer_handle, int card, SoundStreamID id, snd_pcm_t *pcm_handle, bool force, QTimer *timer);
+ static bool closeMixerDevice(snd_mixer_t *&mixer_handle, int card, SoundStreamID id, snd_pcm_t *pcm_handle, bool force, TQTimer *timer);
void checkMixerVolume(SoundStreamID id);
- float readPlaybackMixerVolume(const QString &channel, bool &muted) const;
- float readCaptureMixerVolume(const QString &channel) const;
- bool writePlaybackMixerVolume(const QString &channel, float &vol, bool muted);
- bool writeCaptureMixerVolume(const QString &channel, float &vol);
- bool writeCaptureMixerSwitch(const QString &channel, bool capture);
+ float readPlaybackMixerVolume(const TQString &channel, bool &muted) const;
+ float readCaptureMixerVolume(const TQString &channel) const;
+ bool writePlaybackMixerVolume(const TQString &channel, float &vol, bool muted);
+ bool writeCaptureMixerVolume(const TQString &channel, float &vol);
+ bool writeCaptureMixerSwitch(const TQString &channel, bool capture);
- void selectCaptureChannel (const QString &channel);
+ void selectCaptureChannel (const TQString &channel);
/* ALSA HANDLES */
snd_pcm_t *m_hPlayback;
@@ -250,19 +251,19 @@ protected:
unsigned m_PlaybackLatency;
unsigned m_CaptureLatency;
- QStringList m_PlaybackChannels,
+ TQStringList m_PlaybackChannels,
m_CaptureChannels,
m_CaptureChannelsSwitch;
- QMap<QString, AlsaMixerElement> m_PlaybackChannels2ID,
+ TQMap<TQString, AlsaMixerElement> m_PlaybackChannels2ID,
m_CaptureChannels2ID,
m_CaptureChannelsSwitch2ID;
- QMap<SoundStreamID, SoundStreamConfig>
+ TQMap<SoundStreamID, SoundStreamConfig>
m_PlaybackStreams,
m_CaptureStreams;
- QValueList<SoundStreamID>
+ TQValueList<SoundStreamID>
m_PassivePlaybackStreams;
SoundStreamID m_PlaybackStreamID,
m_CaptureStreamID;
@@ -273,7 +274,7 @@ protected:
m_CaptureBuffer;
unsigned m_CaptureRequestCounter;
- Q_UINT64 m_CapturePos;
+ TQ_UINT64 m_CapturePos;
time_t m_CaptureStartTime;
size_t //m_PlaybackSkipCount,
@@ -282,12 +283,12 @@ protected:
bool m_EnablePlayback,
m_EnableCapture;
- QTimer m_PlaybackPollingTimer;
- QTimer m_CapturePollingTimer;
+ TQTimer m_PlaybackPollingTimer;
+ TQTimer m_CapturePollingTimer;
// AlsaCaptureThread *m_captureThread;
- QMap<QString, AlsaConfigMixerSetting> m_CaptureMixerSettings;
+ TQMap<TQString, AlsaConfigMixerSetting> m_CaptureMixerSettings;
};
diff --git a/kradio3/plugins/gui-docking-menu/docking-configuration.cpp b/kradio3/plugins/gui-docking-menu/docking-configuration.cpp
index 3e32c64..7fbd591 100644
--- a/kradio3/plugins/gui-docking-menu/docking-configuration.cpp
+++ b/kradio3/plugins/gui-docking-menu/docking-configuration.cpp
@@ -17,42 +17,42 @@
#include "docking-configuration.h"
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qframe.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqframe.h>
#include <klocale.h>
using namespace std;
-DockingConfiguration::DockingConfiguration (RadioDocking *docking, QWidget *parent)
- : StationSelector(parent),
+DockingConfiguration::DockingConfiguration (RadioDocking *docking, TQWidget *tqparent)
+ : StationSelector(tqparent),
m_docking(docking),
m_disableGUIUpdates(false)
{
- QHBoxLayout *layout = new QHBoxLayout();
- QHBoxLayout *layout2 = new QHBoxLayout();
+ TQHBoxLayout *tqlayout = new TQHBoxLayout();
+ TQHBoxLayout *tqlayout2 = new TQHBoxLayout();
- m_labelClickMode = new QLabel(this);
- layout->addWidget(m_labelClickMode);
+ m_labelClickMode = new TQLabel(this);
+ tqlayout->addWidget(m_labelClickMode);
- m_comboClickMode = new QComboBox(this);
- layout->addWidget(m_comboClickMode);
+ m_comboClickMode = new TQComboBox(this);
+ tqlayout->addWidget(m_comboClickMode);
- QSpacerItem *spacer = new QSpacerItem( 20, 2, QSizePolicy::Expanding, QSizePolicy::Minimum);
- layout->addItem(spacer);
+ TQSpacerItem *spacer = new TQSpacerItem( 20, 2, TQSizePolicy::Expanding, TQSizePolicy::Minimum);
+ tqlayout->addItem(spacer);
- QFrame *line = new QFrame(this);
- line->setFrameShape ( QFrame::HLine );
- line->setFrameShadow( QFrame::Sunken );
- layout2->addWidget(line);
+ TQFrame *line = new TQFrame(this);
+ line->setFrameShape ( TQFrame::HLine );
+ line->setFrameShadow( TQFrame::Sunken );
+ tqlayout2->addWidget(line);
StationSelectorUILayout->expand(2,0);
- StationSelectorUILayout->addMultiCellLayout(layout2, 2, 2, 0, 2);
- StationSelectorUILayout->addMultiCellLayout(layout, 3, 3, 0, 2);
+ StationSelectorUILayout->addMultiCellLayout(tqlayout2, 2, 2, 0, 2);
+ StationSelectorUILayout->addMultiCellLayout(tqlayout, 3, 3, 0, 2);
- connect(m_comboClickMode, SIGNAL(activated( int )), this, SLOT(slotSetDirty()));
+ connect(m_comboClickMode, TQT_SIGNAL(activated( int )), this, TQT_SLOT(slotSetDirty()));
languageChange();
slotCancel();
diff --git a/kradio3/plugins/gui-docking-menu/docking-configuration.h b/kradio3/plugins/gui-docking-menu/docking-configuration.h
index 77b17cf..13d7849 100644
--- a/kradio3/plugins/gui-docking-menu/docking-configuration.h
+++ b/kradio3/plugins/gui-docking-menu/docking-configuration.h
@@ -25,14 +25,15 @@
#include "../../src/include/stationselector.h"
#include "docking.h"
-class QComboBox;
-class QLabel;
+class TQComboBox;
+class TQLabel;
class DockingConfiguration : public StationSelector
{
Q_OBJECT
+ TQ_OBJECT
public :
- DockingConfiguration (RadioDocking *docking, QWidget *parent);
+ DockingConfiguration (RadioDocking *docking, TQWidget *tqparent);
~DockingConfiguration ();
protected slots:
@@ -46,8 +47,8 @@ protected slots:
protected:
RadioDocking *m_docking;
- QComboBox *m_comboClickMode;
- QLabel *m_labelClickMode;
+ TQComboBox *m_comboClickMode;
+ TQLabel *m_labelClickMode;
bool m_disableGUIUpdates;
};
diff --git a/kradio3/plugins/gui-docking-menu/docking.cpp b/kradio3/plugins/gui-docking-menu/docking.cpp
index e39ae32..2c07b3f 100644
--- a/kradio3/plugins/gui-docking-menu/docking.cpp
+++ b/kradio3/plugins/gui-docking-menu/docking.cpp
@@ -1,7 +1,7 @@
/***************************************************************************
docking.cpp - description
-------------------
- begin : Don Mär 8 21:57:17 CET 2001
+ begin : Don M�r 8 21:57:17 CET 2001
copyright : (C) 2002 by Ernst Martin Witte
email : witte@kawo1.rwth-aachen.de
***************************************************************************/
@@ -16,7 +16,7 @@
***************************************************************************/
#include <kiconloader.h>
-#include <qtooltip.h>
+#include <tqtooltip.h>
#include <kpopupmenu.h>
#include <kapplication.h>
#include <kaction.h>
@@ -45,7 +45,7 @@ PLUGIN_LIBRARY_FUNCTIONS(RadioDocking, "kradio-gui-docking-menu", i18n("Tray Men
/////////////////////////////////////////////////////////////////////////////
-RadioDocking::RadioDocking(const QString &name)
+RadioDocking::RadioDocking(const TQString &name)
: KSystemTray (NULL, name.ascii()),
PluginBase(name, i18n("Docking Plugin")),
m_pluginMenu(NULL),
@@ -56,8 +56,8 @@ RadioDocking::RadioDocking(const QString &name)
setPixmap(BarIcon("kradio"));
m_menu = contextMenu();
- QObject::connect(m_menu, SIGNAL(activated(int)),
- this, SLOT(slotMenuItemActivated(int)));
+ TQObject::connect(m_menu, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotMenuItemActivated(int)));
buildContextMenu ();
show();
@@ -105,7 +105,7 @@ void RadioDocking::noticeConnectedI (ISoundStreamServer *s, bool pointer_valid)
-bool RadioDocking::setStationSelection(const QStringList &sl)
+bool RadioDocking::setStationSelection(const TQStringList &sl)
{
if (m_stationIDs != sl) {
m_stationIDs = sl;
@@ -120,12 +120,12 @@ bool RadioDocking::setStationSelection(const QStringList &sl)
void RadioDocking::restoreState (KConfig *config)
{
- config->setGroup(QString("radiodocking-") + name());
+ config->setGroup(TQString("radiodocking-") + name());
m_stationIDs.clear();
int nStations = config->readNumEntry("nStations", 0);
for (int i = 1; i <= nStations; ++i) {
- QString s = config->readEntry(QString("stationID-") + QString().setNum(i), QString::null);
+ TQString s = config->readEntry(TQString("stationID-") + TQString().setNum(i), TQString());
if (s.length())
m_stationIDs += s;
}
@@ -137,8 +137,8 @@ void RadioDocking::restoreState (KConfig *config)
int n = config->readNumEntry("show_hide_cache_entries", 0);
for (int i = 1; i <= n; ++i) {
- QString s = config->readEntry(QString("show_hide_cache_id_%1").arg(i), QString::null);
- bool b = config->readBoolEntry(QString("show_hide_cache_value_%1").arg(i), false);
+ TQString s = config->readEntry(TQString("show_hide_cache_id_%1").tqarg(i), TQString());
+ bool b = config->readBoolEntry(TQString("show_hide_cache_value_%1").tqarg(i), false);
if (!s.isNull()) {
m_widgetsShownCache.insert(s,b);
}
@@ -148,21 +148,21 @@ void RadioDocking::restoreState (KConfig *config)
void RadioDocking::saveState (KConfig *config) const
{
- config->setGroup(QString("radiodocking-") + name());
+ config->setGroup(TQString("radiodocking-") + name());
config->writeEntry("nStations", m_stationIDs.size());
int i = 1;
- QStringList::const_iterator end = m_stationIDs.end();
- for (QStringList::const_iterator it = m_stationIDs.begin(); it != end; ++it, ++i) {
- config->writeEntry(QString("stationID-") + QString().setNum(i), *it);
+ TQStringList::const_iterator end = m_stationIDs.end();
+ for (TQStringList::const_iterator it = m_stationIDs.begin(); it != end; ++it, ++i) {
+ config->writeEntry(TQString("stationID-") + TQString().setNum(i), *it);
}
config->writeEntry("left_click_action", (int)m_leftClickAction);
config->writeEntry("show_hide_cache_entries", m_widgetsShownCache.count());
i = 1;
- for (QMapConstIterator<QString, bool> it = m_widgetsShownCache.begin(); it != m_widgetsShownCache.end(); ++it, ++i) {
- config->writeEntry(QString("show_hide_cache_id_%1").arg(i), it.key());
- config->writeEntry(QString("show_hide_cache_value_%1").arg(i), *it);
+ for (TQMapConstIterator<TQString, bool> it = m_widgetsShownCache.begin(); it != m_widgetsShownCache.end(); ++it, ++i) {
+ config->writeEntry(TQString("show_hide_cache_id_%1").tqarg(i), it.key());
+ config->writeEntry(TQString("show_hide_cache_value_%1").tqarg(i), *it);
}
}
@@ -172,8 +172,8 @@ ConfigPageInfo RadioDocking::createConfigurationPage()
DockingConfiguration *conf = new DockingConfiguration(this, NULL);
connectI (conf);
- QObject::connect(this, SIGNAL(sigLeftClickActionChanged(LeftClickAction)),
- conf, SLOT(slotLeftClickActionChanged(LeftClickAction)));
+ TQObject::connect(this, TQT_SIGNAL(sigLeftClickActionChanged(LeftClickAction)),
+ conf, TQT_SLOT(slotLeftClickActionChanged(LeftClickAction)));
return ConfigPageInfo(
conf,
@@ -222,13 +222,13 @@ void RadioDocking::buildContextMenu()
noticeNextAlarmChanged(queryNextAlarm());
m_sleepID = m_menu->insertItem(SmallIcon("kradio_zzz"), "sleep-dummy",
- this, SLOT(slotSleepCountdown()));
+ this, TQT_SLOT(slotSleepCountdown()));
noticeCountdownStarted(queryCountdownEnd());
m_seekfwID = m_menu->insertItem(SmallIcon("forward"), i18n("Search Next Station"),
- this, SLOT(slotSeekFwd()));
+ this, TQT_SLOT(slotSeekFwd()));
m_seekbwID = m_menu->insertItem(SmallIcon("back"), i18n("Search Previous Station"),
- this, SLOT(slotSeekBkwd()));
+ this, TQT_SLOT(slotSeekBkwd()));
// recording menu
buildRecordingMenu();
@@ -236,14 +236,14 @@ void RadioDocking::buildContextMenu()
m_powerID = m_menu->insertItem(SmallIcon("kradio_muteoff"), "power-dummy",
- this, SLOT(slotPower()));
+ this, TQT_SLOT(slotPower()));
m_pauseID = m_menu->insertItem(SmallIcon("kradio_pause"), i18n("Pause Radio"),
- this, SLOT(slotPause()));
+ this, TQT_SLOT(slotPause()));
noticePowerChanged(queryIsPowerOn());
m_menu->insertSeparator();
- m_menu->insertItem(SmallIcon("kradio"), i18n("&About"), this, SLOT(slotShowAbout()));
+ m_menu->insertItem(SmallIcon("kradio"), i18n("&About"), this, TQT_SLOT(slotShowAbout()));
// build list of widgets for hide/show items
m_pluginMenu = new KPopupMenu(m_menu);
@@ -253,7 +253,7 @@ void RadioDocking::buildContextMenu()
}
m_menu->insertSeparator();
- m_menu->insertItem( SmallIcon("exit"), i18n("&Quit" ), kapp, SLOT(quit()) );
+ m_menu->insertItem( SmallIcon("exit"), i18n("&Quit" ), kapp, TQT_SLOT(quit()) );
noticeStationChanged(queryCurrentStation(), -1);
@@ -269,16 +269,16 @@ void RadioDocking::buildStationList()
const RadioStation &crs = queryCurrentStation();
int k = 0;
- QStringList::iterator end = m_stationIDs.end();
- for (QStringList::iterator it = m_stationIDs.begin(); it != end; ++it) {
+ TQStringList::iterator end = m_stationIDs.end();
+ for (TQStringList::iterator it = m_stationIDs.begin(); it != end; ++it) {
const RadioStation &rs = sl.stationWithID(*it);
if (rs.isValid()) {
++k;
- QString shortcut = k < 10 ? "&"+QString().setNum(k) : k == 10 ? "1&0" : QString().setNum(k);
- QString name = rs.longName().replace("&", "&&");
- QString item = shortcut + " " + name;
+ TQString shortcut = k < 10 ? "&"+TQString().setNum(k) : k == 10 ? "1&0" : TQString().setNum(k);
+ TQString name = rs.longName().tqreplace("&", "&&");
+ TQString item = shortcut + " " + name;
int id = m_menu->insertItem(item);
m_stationMenuIDs.push_back(id);
@@ -347,21 +347,21 @@ void RadioDocking::slotSleepCountdown()
bool RadioDocking::noticeNextAlarmChanged(const Alarm *a)
{
- QDateTime d;
+ TQDateTime d;
if (a) d = a->nextAlarm();
if (d.isValid())
- m_menu->changeTitle (m_alarmID, i18n("next alarm: %1").arg(d.toString()));
+ m_menu->changeTitle (m_alarmID, i18n("next alarm: %1").tqarg(d.toString()));
else
m_menu->changeTitle (m_alarmID, i18n("<no alarm pending>"));
return true;
}
-bool RadioDocking::noticeCountdownStarted(const QDateTime &end)
+bool RadioDocking::noticeCountdownStarted(const TQDateTime &end)
{
if (end.isValid())
- m_menu->changeItem (m_sleepID, SmallIcon("kradio_zzz"), i18n("Stop Sleep Countdown (running until %1)").arg(end.toString()));
+ m_menu->changeItem (m_sleepID, SmallIcon("kradio_zzz"), i18n("Stop Sleep Countdown (running until %1)").tqarg(end.toString()));
else
m_menu->changeItem (m_sleepID, SmallIcon("kradio_zzz"), i18n("Start Sleep Countdown"));
return true;
@@ -399,17 +399,17 @@ bool RadioDocking::noticeCountdownSecondsChanged(int /*n*/)
bool RadioDocking::noticeStationChanged (const RadioStation &rs, int /*idx*/)
{
- QString s = i18n("invalid station");
+ TQString s = i18n("invalid station");
if (rs.isValid())
s = rs.longName();
- QToolTip::add(this, s);
- m_menu->changeTitle (m_titleID, i18n("KRadio: %1").arg(s));
+ TQToolTip::add(this, s);
+ m_menu->changeTitle (m_titleID, i18n("KRadio: %1").tqarg(s));
// FIXME: title does not change in opened popupmenu
- QValueList<int>::iterator iit = m_stationMenuIDs.begin();
- QValueList<int>::iterator end = m_stationMenuIDs.end();
- QStringList::iterator sit = m_stationIDs.begin();
+ TQValueList<int>::iterator iit = m_stationMenuIDs.begin();
+ TQValueList<int>::iterator end = m_stationMenuIDs.end();
+ TQStringList::iterator sit = m_stationIDs.begin();
for (; iit != end; ++iit, ++sit) {
if (*iit != -1) {
bool on = rs.stationID() == *sit;
@@ -432,12 +432,12 @@ bool RadioDocking::noticeStationsChanged(const StationList &/*sl*/)
}
-void RadioDocking::mousePressEvent( QMouseEvent *e )
+void RadioDocking::mousePressEvent( TQMouseEvent *e )
{
KSystemTray::mousePressEvent(e);
switch ( e->button() ) {
- case LeftButton:
+ case Qt::LeftButton:
switch (m_leftClickAction) {
case lcaShowHide :
ShowHideWidgetPlugins();
@@ -467,24 +467,24 @@ void RadioDocking::ShowHideWidgetPlugins()
{
// nothing in cache => hide everything
if (!m_widgetsShownCache.count()) {
- for (QMapIterator<WidgetPluginBase*, int> it = m_widgetPluginIDs.begin(); it != m_widgetPluginIDs.end(); ++it) {
+ for (TQMapIterator<WidgetPluginBase*, int> it = m_widgetPluginIDs.begin(); it != m_widgetPluginIDs.end(); ++it) {
WidgetPluginBase *p = it.key();
if (p) {
bool visible = p->isAnywhereVisible();
- QString name = p->name();
- logDebug(QString("visibility of %1: %2").arg(name).arg(visible));
+ TQString name = p->name();
+ logDebug(TQString("visibility of %1: %2").tqarg(name).tqarg(visible));
m_widgetsShownCache.insert(name, visible);
p->getWidget()->hide();
}
}
}
else {
- QMap<QString, bool> tmpCache = m_widgetsShownCache;
+ TQMap<TQString, bool> tmpCache = m_widgetsShownCache;
int d = KWin::currentDesktop();
- for (QMapIterator<WidgetPluginBase*, int> it = m_widgetPluginIDs.begin(); it != m_widgetPluginIDs.end(); ++it) {
+ for (TQMapIterator<WidgetPluginBase*, int> it = m_widgetPluginIDs.begin(); it != m_widgetPluginIDs.end(); ++it) {
WidgetPluginBase *p = it.key();
- QString name = p ? p->name() : QString::null;
- if (p && tmpCache.contains(name) && tmpCache[name]) {
+ TQString name = p ? p->name() : TQString();
+ if (p && tmpCache.tqcontains(name) && tmpCache[name]) {
p->showOnOrgDesktop();
}
}
@@ -496,9 +496,9 @@ void RadioDocking::ShowHideWidgetPlugins()
void RadioDocking::slotMenuItemActivated(int id)
{
const StationList &sl = queryStations();
- QValueList<int>::iterator iit = m_stationMenuIDs.begin();
- QValueList<int>::iterator end = m_stationMenuIDs.end();
- QStringList::iterator sit = m_stationIDs.begin();
+ TQValueList<int>::iterator iit = m_stationMenuIDs.begin();
+ TQValueList<int>::iterator end = m_stationMenuIDs.end();
+ TQStringList::iterator sit = m_stationIDs.begin();
for (; iit != end; ++iit, ++sit) {
if (*iit == id) {
const RadioStation &rs = sl.stationWithID(*sit);
@@ -511,7 +511,7 @@ void RadioDocking::slotMenuItemActivated(int id)
void RadioDocking::noticeWidgetPluginShown(WidgetPluginBase *b, bool shown)
{
- if (!m_manager || !b || !m_widgetPluginIDs.contains(b))
+ if (!m_manager || !b || !m_widgetPluginIDs.tqcontains(b))
return;
m_manager->updateWidgetPluginMenuItem(b, m_pluginMenu, m_widgetPluginIDs, shown);
@@ -533,14 +533,14 @@ bool RadioDocking::startRecordingWithFormat(
const SoundFormat &/*proposed_format*/,
SoundFormat &/*real_format*/)
{
- if (!id.isValid() || id != queryCurrentSoundStreamID() || m_StreamID2MenuID.contains(id))
+ if (!id.isValid() || id != queryCurrentSoundStreamID() || m_StreamID2MenuID.tqcontains(id))
return false;
- QString descr;
+ TQString descr;
querySoundStreamDescription(id, descr);
int menu_id = m_NextRecordingMenuID++;
m_recordingMenu->insertItem(SmallIcon("kradio_record"),
- i18n("Stop Recording of %1").arg(descr),
+ i18n("Stop Recording of %1").tqarg(descr),
menu_id);
m_MenuID2StreamID.insert(menu_id, id);
m_StreamID2MenuID.insert(id, menu_id);
@@ -555,7 +555,7 @@ bool RadioDocking::startRecordingWithFormat(
bool RadioDocking::stopRecording (SoundStreamID id)
{
- if (!id.isValid() || !m_StreamID2MenuID.contains(id))
+ if (!id.isValid() || !m_StreamID2MenuID.tqcontains(id))
return false;
int menu_id = m_StreamID2MenuID[id];
@@ -584,36 +584,36 @@ void RadioDocking::slotRecordingMenu(int i)
sendPowerOn();
sendStartRecording(id);
}
- } else if (m_MenuID2StreamID.contains(i)) {
+ } else if (m_MenuID2StreamID.tqcontains(i)) {
sendStopRecording(m_MenuID2StreamID[i]);
}
}
void RadioDocking::buildRecordingMenu()
{
- QMap<QString, SoundStreamID> streams;
+ TQMap<TQString, SoundStreamID> streams;
queryEnumerateSoundStreams(streams);
KPopupMenu *m = new KPopupMenu(m_menu);
m_recordingID = m->insertItem(SmallIcon("kradio_record"), i18n("Start Recording"),
POPUP_ID_START_RECORDING_DEFAULT);
- QObject::connect(m, SIGNAL(activated(int)),
- this, SLOT(slotRecordingMenu(int)));
+ TQObject::connect(m, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotRecordingMenu(int)));
SoundStreamID currentID = queryCurrentSoundStreamID();
- QMapIterator<QString, SoundStreamID> end = streams.end();
- for (QMapIterator<QString, SoundStreamID> it = streams.begin(); it != end; ++it) {
+ TQMapIterator<TQString, SoundStreamID> end = streams.end();
+ for (TQMapIterator<TQString, SoundStreamID> it = streams.begin(); it != end; ++it) {
SoundStreamID id = *it;
- QString descr = it.key();
+ TQString descr = it.key();
bool r = false;
SoundFormat sf;
queryIsRecordingRunning(id, r, sf);
if (r) {
int menu_id = m_NextRecordingMenuID++;
m->insertItem(SmallIcon("kradio_record"),
- i18n("Stop Recording of %1").arg(descr),
+ i18n("Stop Recording of %1").tqarg(descr),
menu_id);
m_MenuID2StreamID.insert(menu_id, id);
m_StreamID2MenuID.insert(id, menu_id);
@@ -628,12 +628,12 @@ void RadioDocking::buildRecordingMenu()
bool RadioDocking::noticeSoundStreamChanged(SoundStreamID id)
{
- if (m_StreamID2MenuID.contains(id)) {
- QString descr;
+ if (m_StreamID2MenuID.tqcontains(id)) {
+ TQString descr;
querySoundStreamDescription(id, descr);
m_recordingMenu->changeItem(m_StreamID2MenuID[id],
SmallIcon("kradio_record"),
- i18n("Stop Recording of %1").arg(descr));
+ i18n("Stop Recording of %1").tqarg(descr));
return true;
}
return false;
@@ -648,7 +648,7 @@ void RadioDocking::setLeftClickAction(LeftClickAction action)
}
}
-void RadioDocking::dragEnterEvent(QDragEnterEvent* event)
+void RadioDocking::dragEnterEvent(TQDragEnterEvent* event)
{
bool a = StationDragObject::canDecode(event);
if (a)
@@ -658,14 +658,14 @@ void RadioDocking::dragEnterEvent(QDragEnterEvent* event)
event->accept(a);
}
-void RadioDocking::dropEvent(QDropEvent* event)
+void RadioDocking::dropEvent(TQDropEvent* event)
{
- QStringList list;
+ TQStringList list;
if ( StationDragObject::decode(event, list) ) {
- QStringList l = getStationSelection();
- for (QValueListConstIterator<QString> it = list.begin(); it != list.end(); ++it)
- if (!l.contains(*it))
+ TQStringList l = getStationSelection();
+ for (TQValueListConstIterator<TQString> it = list.begin(); it != list.end(); ++it)
+ if (!l.tqcontains(*it))
l.append(*it);
setStationSelection(l);
}
diff --git a/kradio3/plugins/gui-docking-menu/docking.h b/kradio3/plugins/gui-docking-menu/docking.h
index d9fbfde..64bbc59 100644
--- a/kradio3/plugins/gui-docking-menu/docking.h
+++ b/kradio3/plugins/gui-docking-menu/docking.h
@@ -23,8 +23,8 @@
#endif
#include <ksystemtray.h>
-#include <qpixmap.h>
-#include <qptrdict.h>
+#include <tqpixmap.h>
+#include <tqptrdict.h>
#include "../../src/include/timecontrol_interfaces.h"
#include "../../src/include/radio_interfaces.h"
@@ -44,17 +44,18 @@ class RadioDocking : public KSystemTray,
public ISoundStreamClient
{
Q_OBJECT
+ TQ_OBJECT
public:
- RadioDocking (const QString &name);
+ RadioDocking (const TQString &name);
virtual ~RadioDocking();
virtual bool connectI (Interface *);
virtual bool disconnectI (Interface *);
- virtual QString pluginClassName() const { return "RadioDocking"; }
+ virtual TQString pluginClassName() const { return "RadioDocking"; }
- 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(); }
// PluginBase
@@ -70,18 +71,18 @@ public:
// IStationSelection
RECEIVERS:
- bool setStationSelection(const QStringList &sl);
+ bool setStationSelection(const TQStringList &sl);
ANSWERS:
- const QStringList & getStationSelection () const { return m_stationIDs; }
+ const TQStringList & getStationSelection () const { return m_stationIDs; }
// IRadioDevicePoolClient
RECEIVERS:
bool noticeActiveDeviceChanged(IRadioDevice *) { return false; }
- bool noticeDevicesChanged(const QPtrList<IRadioDevice> &) { return false; }
- bool noticeDeviceDescriptionChanged(const QString &) { return false; }
+ bool noticeDevicesChanged(const TQPtrList<IRadioDevice> &) { return false; }
+ bool noticeDeviceDescriptionChanged(const TQString &) { return false; }
// ITimeControlClient
@@ -89,7 +90,7 @@ RECEIVERS:
bool noticeAlarmsChanged(const AlarmVector &) { return false; }
bool noticeAlarm(const Alarm &) { return false; }
bool noticeNextAlarmChanged(const Alarm *);
- bool noticeCountdownStarted(const QDateTime &/*end*/);
+ bool noticeCountdownStarted(const TQDateTime &/*end*/);
bool noticeCountdownStopped();
bool noticeCountdownZero();
bool noticeCountdownSecondsChanged(int n);
@@ -101,7 +102,7 @@ RECEIVERS:
bool noticePowerChanged(bool on);
bool noticeStationChanged (const RadioStation &, int idx);
bool noticeStationsChanged(const StationList &sl);
- bool noticePresetFileChanged(const QString &/*f*/) { return false; }
+ bool noticePresetFileChanged(const TQString &/*f*/) { return false; }
bool noticeCurrentSoundStreamIDChanged(SoundStreamID /*id*/) { return false; }
@@ -132,7 +133,7 @@ protected slots:
void slotRecordingMenu(int i);
protected:
- void mousePressEvent( QMouseEvent *e );
+ void mousePressEvent( TQMouseEvent *e );
void buildContextMenu();
void buildRecordingMenu();
@@ -141,12 +142,12 @@ protected:
void noticeWidgetPluginShown(WidgetPluginBase *, bool shown);
void noticePluginsChanged(const PluginList &);
- void showEvent(QShowEvent *) {} // do nothing, original implementation adds "Quit" menu item
+ void showEvent(TQShowEvent *) {} // do nothing, original implementation adds "Quit" menu item
void ShowHideWidgetPlugins();
- void dragEnterEvent(QDragEnterEvent* event);
- void dropEvent(QDropEvent* event);
+ void dragEnterEvent(TQDragEnterEvent* event);
+ void dropEvent(TQDropEvent* event);
public:
@@ -161,7 +162,7 @@ protected:
KPopupMenu *m_menu;
KPopupMenu *m_pluginMenu;
KPopupMenu *m_recordingMenu;
- QStringList m_stationIDs;
+ TQStringList m_stationIDs;
// menu Item IDs
int m_titleID;
@@ -172,17 +173,17 @@ protected:
int m_sleepID;
int m_seekfwID;
int m_seekbwID;
- QValueList<int> m_stationMenuIDs;
+ TQValueList<int> m_stationMenuIDs;
- QMap<WidgetPluginBase *, int> m_widgetPluginIDs;
+ TQMap<WidgetPluginBase *, int> m_widgetPluginIDs;
int m_NextRecordingMenuID;
- QMap<int, SoundStreamID> m_MenuID2StreamID;
- QMap<SoundStreamID, int> m_StreamID2MenuID;
+ TQMap<int, SoundStreamID> m_MenuID2StreamID;
+ TQMap<SoundStreamID, int> m_StreamID2MenuID;
LeftClickAction m_leftClickAction;
- QMap<QString, bool> m_widgetsShownCache;
+ TQMap<TQString, bool> m_widgetsShownCache;
};
diff --git a/kradio3/plugins/gui-error-log/errorlog.cpp b/kradio3/plugins/gui-error-log/errorlog.cpp
index 2eb58ad..82498ce 100644
--- a/kradio3/plugins/gui-error-log/errorlog.cpp
+++ b/kradio3/plugins/gui-error-log/errorlog.cpp
@@ -17,13 +17,13 @@
#include "errorlog.h"
-#include <qframe.h>
-#include <qdatetime.h>
-#include <qlayout.h>
+#include <tqframe.h>
+#include <tqdatetime.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kiconloader.h>
-#include <qtextedit.h>
+#include <tqtextedit.h>
#include <kfiledialog.h>
#include <kurl.h>
#include <ktempfile.h>
@@ -40,7 +40,7 @@ PLUGIN_LIBRARY_FUNCTIONS(ErrorLog, "kradio-gui-error-log", i18n("Error Logging W
/////////////////////////////////////////////////////////////////////////////
-ErrorLog::ErrorLog(const QString &name)
+ErrorLog::ErrorLog(const TQString &name)
: KDialogBase(KDialogBase::IconList,
"",
KDialogBase::Close|KDialogBase::User1,
@@ -54,60 +54,60 @@ ErrorLog::ErrorLog(const QString &name)
WidgetPluginBase(name, i18n("Error Logger")),
init_done(false)
{
- QWidget::setCaption(i18n("KRadio Logger"));
- QFrame *info = addPage(i18n("Information"), i18n("Information"),
+ TQWidget::setCaption(i18n("KRadio Logger"));
+ TQFrame *info = addPage(i18n("Information"), i18n("Information"),
KGlobal::instance()->iconLoader()->loadIcon(
"messagebox_info", KIcon::NoGroup, KIcon::SizeMedium
)
);
- QGridLayout *linfo = new QGridLayout(info);
+ TQGridLayout *linfo = new TQGridLayout(info);
linfo->setSpacing( 5 );
linfo->setMargin ( 0 );
- m_teInfos = new QTextEdit(info);
+ m_teInfos = new TQTextEdit(info);
linfo->addWidget(m_teInfos, 0, 0);
m_teInfos->setReadOnly(true);
logInfo(i18n("logging started"));
- QFrame *warn = addPage(i18n("Warnings"), i18n("Warnings"),
+ TQFrame *warn = addPage(i18n("Warnings"), i18n("Warnings"),
KGlobal::instance()->iconLoader()->loadIcon(
"messagebox_warning", KIcon::NoGroup, KIcon::SizeMedium
)
);
- QGridLayout *lwarn = new QGridLayout(warn);
+ TQGridLayout *lwarn = new TQGridLayout(warn);
lwarn->setSpacing( 5 );
lwarn->setMargin ( 0 );
- m_teWarnings = new QTextEdit(warn);
+ m_teWarnings = new TQTextEdit(warn);
lwarn->addWidget(m_teWarnings, 0, 0);
m_teWarnings->setReadOnly(true);
logWarning(i18n("logging started"));
- QFrame *err = addPage(i18n("Errors"), i18n("Errors"),
+ TQFrame *err = addPage(i18n("Errors"), i18n("Errors"),
KGlobal::instance()->iconLoader()->loadIcon(
"messagebox_critical", KIcon::NoGroup, KIcon::SizeMedium
)
);
- QGridLayout *lerr = new QGridLayout(err);
+ TQGridLayout *lerr = new TQGridLayout(err);
lerr->setSpacing( 5 );
lerr->setMargin ( 0 );
- m_teErrors = new QTextEdit(err);
+ m_teErrors = new TQTextEdit(err);
lerr->addWidget(m_teErrors, 0, 0);
m_teErrors->setReadOnly(true);
logError(i18n("logging started"));
- QFrame *debug = addPage(i18n("Debugging"), i18n("Debugging"),
+ TQFrame *debug = addPage(i18n("Debugging"), i18n("Debugging"),
KGlobal::instance()->iconLoader()->loadIcon(
- "find", KIcon::NoGroup, KIcon::SizeMedium
+ "tqfind", KIcon::NoGroup, KIcon::SizeMedium
)
);
- QGridLayout *ldebug = new QGridLayout(debug);
+ TQGridLayout *ldebug = new TQGridLayout(debug);
ldebug->setSpacing( 5 );
ldebug->setMargin ( 0 );
- m_teDebug = new QTextEdit(debug);
+ m_teDebug = new TQTextEdit(debug);
ldebug->addWidget(m_teDebug, 0, 0);
m_teDebug->setReadOnly(true);
logDebug(i18n("logging started"));
@@ -136,14 +136,14 @@ bool ErrorLog::disconnectI (Interface *i)
void ErrorLog::restoreState (KConfig *config)
{
- config->setGroup(QString("errorlog-") + WidgetPluginBase::name());
+ config->setGroup(TQString("errorlog-") + WidgetPluginBase::name());
WidgetPluginBase::restoreState(config, false);
}
void ErrorLog::saveState (KConfig *config) const
{
- config->setGroup(QString("errorlog-") + WidgetPluginBase::name());
+ config->setGroup(TQString("errorlog-") + WidgetPluginBase::name());
WidgetPluginBase::saveState(config);
}
@@ -162,18 +162,18 @@ void ErrorLog::showOnOrgDesktop()
void ErrorLog::hide()
{
- logDebug(QString("%1, ErrorLog::hide: all: %2, desktop: %3, visible:%4, anywherevisible:%5, cachevalid: %6").arg(name()).arg(m_saveSticky).arg(m_saveDesktop).arg(isReallyVisible()).arg(isAnywhereVisible()).arg(m_geoCacheValid));
+ logDebug(TQString("%1, ErrorLog::hide: all: %2, desktop: %3, visible:%4, anywherevisible:%5, cachevalid: %6").tqarg(name()).tqarg(m_saveSticky).tqarg(m_saveDesktop).tqarg(isReallyVisible()).tqarg(isAnywhereVisible()).tqarg(m_geoCacheValid));
WidgetPluginBase::pHide();
KDialogBase::hide();
}
-void ErrorLog::showEvent(QShowEvent *e)
+void ErrorLog::showEvent(TQShowEvent *e)
{
KDialogBase::showEvent(e);
WidgetPluginBase::pShowEvent(e);
}
-void ErrorLog::hideEvent(QHideEvent *e)
+void ErrorLog::hideEvent(TQHideEvent *e)
{
KDialogBase::hideEvent(e);
WidgetPluginBase::pHideEvent(e);
@@ -181,9 +181,9 @@ void ErrorLog::hideEvent(QHideEvent *e)
// IErrorLog
-bool ErrorLog::logError (const QString &s)
+bool ErrorLog::logError (const TQString &s)
{
- m_teErrors->append("<i>" + QDateTime::currentDateTime().toString(Qt::ISODate) + "</i> " + s + "\n");
+ m_teErrors->append("<i>" + TQDateTime::tqcurrentDateTime().toString(Qt::ISODate) + "</i> " + s + "\n");
if (init_done) {
showPage(PAGE_ID_ERROR);
show();
@@ -191,21 +191,21 @@ bool ErrorLog::logError (const QString &s)
return true;
}
-bool ErrorLog::logWarning(const QString &s)
+bool ErrorLog::logWarning(const TQString &s)
{
- m_teWarnings->append("<i>" + QDateTime::currentDateTime().toString(Qt::ISODate) + "</i> " + s + "\n");
+ m_teWarnings->append("<i>" + TQDateTime::tqcurrentDateTime().toString(Qt::ISODate) + "</i> " + s + "\n");
return true;
}
-bool ErrorLog::logInfo (const QString &s)
+bool ErrorLog::logInfo (const TQString &s)
{
- m_teInfos->append("<i>" + QDateTime::currentDateTime().toString(Qt::ISODate) + "</i> " + s + "\n");
+ m_teInfos->append("<i>" + TQDateTime::tqcurrentDateTime().toString(Qt::ISODate) + "</i> " + s + "\n");
return true;
}
-bool ErrorLog::logDebug (const QString &s)
+bool ErrorLog::logDebug (const TQString &s)
{
- m_teDebug->append("<i>" + QDateTime::currentDateTime().toString(Qt::ISODate) + "</i> " + s + "\n");
+ m_teDebug->append("<i>" + TQDateTime::tqcurrentDateTime().toString(Qt::ISODate) + "</i> " + s + "\n");
return true;
}
@@ -224,15 +224,15 @@ void ErrorLog::slotUser1()
fd.setOperationMode(KFileDialog::Saving);
fd.setCaption (i18n("Save KRadio Logging Data as ..."));
- if (fd.exec() == QDialog::Accepted) {
+ if (fd.exec() == TQDialog::Accepted) {
KURL url = fd.selectedURL();
KTempFile tmpFile;
tmpFile.setAutoDelete(true);
- QFile *outf = tmpFile.file();
+ TQFile *outf = tmpFile.file();
- QTextStream outs(outf);
- outs.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream outs(outf);
+ outs.setEncoding(TQTextStream::UnicodeUTF8);
switch (activePageIndex()) {
case PAGE_ID_INFO: outs << m_teInfos->text(); break;
@@ -244,7 +244,7 @@ void ErrorLog::slotUser1()
if (outf->status() != IO_Ok) {
logError("ErrorLogger: " +
- i18n("error writing to tempfile %1").arg(tmpFile.name()));
+ i18n("error writing to tempfile %1").tqarg(tmpFile.name()));
return;
}
@@ -253,7 +253,7 @@ void ErrorLog::slotUser1()
if (!KIO::NetAccess::upload(tmpFile.name(), url, this)) {
logError("ErrorLogger: " +
- i18n("error uploading preset file %1").arg(url.url()));
+ i18n("error uploading preset file %1").tqarg(url.url()));
}
}
setIconListAllVisible(true);
diff --git a/kradio3/plugins/gui-error-log/errorlog.h b/kradio3/plugins/gui-error-log/errorlog.h
index d558037..8b1c4e1 100644
--- a/kradio3/plugins/gui-error-log/errorlog.h
+++ b/kradio3/plugins/gui-error-log/errorlog.h
@@ -24,19 +24,20 @@
#include "../../src/include/widgetplugins.h"
-class QTextEdit;
+class TQTextEdit;
class ErrorLog : public KDialogBase,
public WidgetPluginBase,
public IErrorLog
{
Q_OBJECT
+ TQ_OBJECT
public:
- ErrorLog(const QString &name = QString::null);
+ ErrorLog(const TQString &name = TQString());
~ErrorLog();
- virtual QString pluginClassName() const { return "ErrorLog"; }
- virtual const QString &name() const { return PluginBase::name(); }
- virtual QString &name() { return PluginBase::name(); }
+ virtual TQString pluginClassName() const { return "ErrorLog"; }
+ virtual const TQString &name() const { return PluginBase::name(); }
+ virtual TQString &name() { return PluginBase::name(); }
virtual bool connectI (Interface *);
virtual bool disconnectI (Interface *);
@@ -53,11 +54,11 @@ public slots:
virtual void toggleShown () { WidgetPluginBase::pToggleShown(); }
protected:
- QWidget *getWidget() { return this; }
- const QWidget *getWidget() const { return this; }
+ TQWidget *getWidget() { return this; }
+ const TQWidget *getWidget() const { return this; }
- virtual void showEvent(QShowEvent *);
- virtual void hideEvent(QHideEvent *);
+ virtual void showEvent(TQShowEvent *);
+ virtual void hideEvent(TQHideEvent *);
virtual ConfigPageInfo createConfigurationPage () { return ConfigPageInfo(); }
virtual AboutPageInfo createAboutPage () { return AboutPageInfo(); }
@@ -65,10 +66,10 @@ protected:
// IErrorLog
RECEIVERS:
- bool logError (const QString &);
- bool logWarning(const QString &);
- bool logInfo (const QString &);
- bool logDebug (const QString &);
+ bool logError (const TQString &);
+ bool logWarning(const TQString &);
+ bool logInfo (const TQString &);
+ bool logDebug (const TQString &);
// KDialogBase
@@ -78,7 +79,7 @@ protected slots:
protected:
- QTextEdit *m_teDebug,
+ TQTextEdit *m_teDebug,
*m_teInfos,
*m_teWarnings,
*m_teErrors;
diff --git a/kradio3/plugins/gui-quickbar/buttonflowlayout.cpp b/kradio3/plugins/gui-quickbar/buttonflowlayout.cpp
index 40d7da4..419fd10 100644
--- a/kradio3/plugins/gui-quickbar/buttonflowlayout.cpp
+++ b/kradio3/plugins/gui-quickbar/buttonflowlayout.cpp
@@ -1,11 +1,11 @@
/****************************************************************************
-** $Id: buttonflowlayout.cpp 272 2005-05-18 08:12:51Z emw $
+** $Id: buttonflowtqlayout.cpp 272 2005-05-18 08:12:51Z emw $
**
-** Implementing your own layout: flow example
+** Implementing your own tqlayout: flow example
**
** Copyright (C) 1996 by Trolltech AS. All rights reserved.
**
-** This file is part of an example program for Qt. This example
+** This file is part of an example program for TQt. This example
** program may be used, distributed and modified without limitation.
**
*****************************************************************************/
@@ -19,18 +19,18 @@
/*********************************************/
/* Iterator */
-class ButtonFlowLayoutIterator :public QGLayoutIterator
+class ButtonFlowLayoutIterator :public TQGLayoutIterator
{
public:
- ButtonFlowLayoutIterator( QPtrList<QLayoutItem> *l ) :idx(0), list(l) {}
+ ButtonFlowLayoutIterator( TQPtrList<TQLayoutItem> *l ) :idx(0), list(l) {}
uint count() const;
- QLayoutItem *current();
- QLayoutItem *next();
- QLayoutItem *takeCurrent();
+ TQLayoutItem *current();
+ TQLayoutItem *next();
+ TQLayoutItem *takeCurrent();
private:
int idx;
- QPtrList<QLayoutItem> *list;
+ TQPtrList<TQLayoutItem> *list;
};
@@ -39,38 +39,38 @@ uint ButtonFlowLayoutIterator::count() const
return list->count();
}
-QLayoutItem *ButtonFlowLayoutIterator::current()
+TQLayoutItem *ButtonFlowLayoutIterator::current()
{
return idx < int(count()) ? list->at(idx) : 0;
}
-QLayoutItem *ButtonFlowLayoutIterator::next()
+TQLayoutItem *ButtonFlowLayoutIterator::next()
{
idx++; return current();
}
-QLayoutItem *ButtonFlowLayoutIterator::takeCurrent()
+TQLayoutItem *ButtonFlowLayoutIterator::takeCurrent()
{
return idx < int(count()) ? list->take( idx ) : 0;
}
/**************************************************************/
-ButtonFlowLayout::ButtonFlowLayout( QWidget *parent, int margin, int spacing,
+ButtonFlowLayout::ButtonFlowLayout( TQWidget *tqparent, int margin, int spacing,
const char *name )
- : QLayout( parent, margin, spacing, name ),
+ : TQLayout( tqparent, margin, spacing, name ),
cached_width(0)
{
}
-ButtonFlowLayout::ButtonFlowLayout( QLayout* parentLayout, int spacing, const char *name )
- : QLayout( parentLayout, spacing, name ),
+ButtonFlowLayout::ButtonFlowLayout( TQLayout* tqparentLayout, int spacing, const char *name )
+ : TQLayout( tqparentLayout, spacing, name ),
cached_width(0)
{
}
ButtonFlowLayout::ButtonFlowLayout( int spacing, const char *name )
- : QLayout( spacing, name ),
+ : TQLayout( spacing, name ),
cached_width(0)
{
}
@@ -86,7 +86,7 @@ int ButtonFlowLayout::heightForWidth( int w ) const
if ( cached_width != w ) {
//Not all C++ compilers support "mutable" yet:
ButtonFlowLayout * mthis = (ButtonFlowLayout*)this;
- int h = mthis->doLayout( QRect(0,0,w,0), TRUE );
+ int h = mthis->doLayout( TQRect(0,0,w,0), TRUE );
mthis->cached_hfw = h;
mthis->cached_width = w;
return h;
@@ -96,7 +96,7 @@ int ButtonFlowLayout::heightForWidth( int w ) const
void ButtonFlowLayout::addItem( QLayoutItem *item)
{
- list.append( item );
+ list.append( TQT_TQLAYOUTITEM(item) );
}
bool ButtonFlowLayout::hasHeightForWidth() const
@@ -104,30 +104,36 @@ bool ButtonFlowLayout::hasHeightForWidth() const
return TRUE;
}
-QSize ButtonFlowLayout::sizeHint() const
+TQSize ButtonFlowLayout::tqsizeHint() const
{
- return minimumSize();
+ return tqminimumSize();
}
-QSizePolicy::ExpandData ButtonFlowLayout::expanding() const
+TQSizePolicy::ExpandData ButtonFlowLayout::expanding() const
{
- return QSizePolicy::NoDirection;
+ return TQ_SPNoDirection;
}
-QLayoutIterator ButtonFlowLayout::iterator()
+TQLayoutIterator ButtonFlowLayout::iterator()
{
- return QLayoutIterator( new ButtonFlowLayoutIterator( &list ) );
+ // [FIXME]
+#ifdef USE_QT4
+ #warning [FIXME] ContainerAreaLayout iterators may not function correctly under Qt4
+ return TQLayoutIterator( this ); // [FIXME]
+#else // USE_QT4
+ return TQLayoutIterator( new ButtonFlowLayoutIterator( &list ) );
+#endif // USE_QT4
}
-void ButtonFlowLayout::setGeometry( const QRect &r )
+void ButtonFlowLayout::setGeometry( const TQRect &r )
{
- QLayout::setGeometry( r );
+ TQLayout::setGeometry( r );
doLayout( r );
}
-int ButtonFlowLayout::doLayout( const QRect &r, bool testonly )
+int ButtonFlowLayout::doLayout( const TQRect &r, bool testonly )
{
-/* kdDebug() << "buttonflowlayout::doLayout ("
+/* kdDebug() << "buttonflowtqlayout::doLayout ("
<< r.x() << "," << r.y() << ","
<< r.width() << "," << r.height() << ", " << testonly << ")\n";
*/
@@ -140,16 +146,16 @@ int ButtonFlowLayout::doLayout( const QRect &r, bool testonly )
int totalWidth = r.width();
int totalHeight = r.height();
- QPtrListIterator<QLayoutItem> it(list);
- QLayoutItem *o;
+ TQPtrListIterator<TQLayoutItem> it(list);
+ TQLayoutItem *o;
// get the width of the biggest Button
it.toFirst();
while ( (o=it.current()) != 0 ) {
++it;
- buttonWidth = QMAX( buttonWidth, o->sizeHint().width() );
- buttonHeight = QMAX( buttonHeight, o->sizeHint().height() );
+ buttonWidth = TQMAX( buttonWidth, o->tqsizeHint().width() );
+ buttonHeight = TQMAX( buttonHeight, o->tqsizeHint().height() );
}
// calculate the optimal width
@@ -195,13 +201,13 @@ int ButtonFlowLayout::doLayout( const QRect &r, bool testonly )
linecount++;
}
if (!testonly)
- o->setGeometry( QRect( QPoint( btnLeft, (int)rint(y) ),
- QSize( btnRight - btnLeft + 1,
+ o->setGeometry( TQRect( TQPoint( btnLeft, (int)rint(y) ),
+ TQSize( btnRight - btnLeft + 1,
buttonHeight) )
);
x += buttonWidth + spacing();
- h = QMAX( h, buttonHeight );
+ h = TQMAX( h, buttonHeight );
}
int ret = (int)rint(y + h + deltaH) - r.y();
@@ -211,22 +217,52 @@ int ButtonFlowLayout::doLayout( const QRect &r, bool testonly )
}
-QSize ButtonFlowLayout::minimumSize() const
+TQSize ButtonFlowLayout::tqminimumSize() const
{
- return minimumSize(geometry().size());
+ return tqminimumSize(tqgeometry().size());
}
-QSize ButtonFlowLayout::minimumSize(const QSize &r) const
+TQSize ButtonFlowLayout::tqminimumSize(const TQSize &r) const
{
- QSize s(0, 0);
+ TQSize s(0, 0);
- for (QPtrListIterator<QLayoutItem> it(list); it.current(); ++it) {
- QLayoutItem *o = it.current();
- s = s.expandedTo( o->sizeHint()); //minimumSize() );
+ for (TQPtrListIterator<TQLayoutItem> it(list); it.current(); ++it) {
+ TQLayoutItem *o = it.current();
+ s = s.expandedTo( o->tqsizeHint()); //tqminimumSize() );
}
s.setHeight(heightForWidth(r.width()));
return s;
}
+
+#ifdef USE_QT4
+/*!
+ \reimp
+*/
+int ButtonFlowLayout::count() const {
+ return list.count();
+}
+
+/*!
+ \reimp
+*/
+TQLayoutItem* ButtonFlowLayout::itemAt(int index) const {
+ return index >= 0 && index < list.count() ? (const_cast<TQPtrList<TQLayoutItem>&>(list).tqat(index)) : 0;
+}
+
+/*!
+ \reimp
+*/
+TQLayoutItem* ButtonFlowLayout::takeAt(int index) {
+ if (index < 0 || index >= list.count())
+ return 0;
+ TQLayoutItem *item = list.tqat(index);
+ list.remove(list.tqat(index));
+ delete item;
+
+ invalidate();
+ return item;
+}
+#endif // USE_QT4 \ No newline at end of file
diff --git a/kradio3/plugins/gui-quickbar/buttonflowlayout.h b/kradio3/plugins/gui-quickbar/buttonflowlayout.h
index 337a850..624688e 100644
--- a/kradio3/plugins/gui-quickbar/buttonflowlayout.h
+++ b/kradio3/plugins/gui-quickbar/buttonflowlayout.h
@@ -1,13 +1,13 @@
/****************************************************************************
-** $Id: buttonflowlayout.h 471 2006-11-11 17:04:51Z emw $
+** $Id: buttonflowtqlayout.h 471 2006-11-11 17:04:51Z emw $
**
-** Definition of simple flow layout for custom layout example
+** Definition of simple flow tqlayout for custom tqlayout example
**
** Created : 979899
**
** Copyright (C) 1997 by Trolltech AS. All rights reserved.
**
-** This file is part of an example program for Qt. This example
+** This file is part of an example program for TQt. This example
** program may be used, distributed and modified without limitation.
**
*****************************************************************************/
@@ -23,16 +23,16 @@
#include "../../src/include/utils.h"
-#include <qlayout.h>
-#include <qptrlist.h>
+#include <tqlayout.h>
+#include <tqptrlist.h>
-class ButtonFlowLayout : public QLayout
+class ButtonFlowLayout : public TQLayout
{
public:
- ButtonFlowLayout( QWidget *parent, int margin = 0, int spacing=-1,
+ ButtonFlowLayout( TQWidget *tqparent, int margin = 0, int spacing=-1,
const char *name=0 );
- ButtonFlowLayout( QLayout* parentLayout, int spacing=-1, const char *name=0 );
+ ButtonFlowLayout( TQLayout* tqparentLayout, int spacing=-1, const char *name=0 );
ButtonFlowLayout( int spacing=-1, const char *name=0 );
@@ -41,18 +41,22 @@ public:
void addItem( QLayoutItem *item);
bool hasHeightForWidth() const;
int heightForWidth( int ) const;
- QSize sizeHint() const;
- QSize minimumSize() const;
- QSize minimumSize(const QSize &r) const; // minimumSize is dependent from width
- QLayoutIterator iterator();
- QSizePolicy::ExpandData expanding() const;
+ TQSize tqsizeHint() const;
+ TQSize tqminimumSize() const;
+ TQSize tqminimumSize(const TQSize &r) const; // tqminimumSize is dependent from width
+ TQLayoutIterator iterator();
+ TQSizePolicy::ExpandData expanding() const;
+
+#ifdef USE_QT4
+ QLAYOUT_REQUIRED_METHOD_DECLARATIONS
+#endif // USE_QT4
protected:
- void setGeometry( const QRect& );
+ void setGeometry( const TQRect& );
private:
- int doLayout( const QRect&, bool testonly = FALSE );
- QPtrList<QLayoutItem> list;
+ int doLayout( const TQRect&, bool testonly = FALSE );
+ TQPtrList<TQLayoutItem> list;
int cached_width;
int cached_hfw;
};
diff --git a/kradio3/plugins/gui-quickbar/quickbar-configuration.cpp b/kradio3/plugins/gui-quickbar/quickbar-configuration.cpp
index bb8b0f6..e9c784e 100644
--- a/kradio3/plugins/gui-quickbar/quickbar-configuration.cpp
+++ b/kradio3/plugins/gui-quickbar/quickbar-configuration.cpp
@@ -19,8 +19,8 @@
using namespace std;
-QuickbarConfiguration::QuickbarConfiguration (QWidget *parent)
- : StationSelector(parent)
+QuickbarConfiguration::QuickbarConfiguration (TQWidget *tqparent)
+ : StationSelector(tqparent)
{
}
diff --git a/kradio3/plugins/gui-quickbar/quickbar-configuration.h b/kradio3/plugins/gui-quickbar/quickbar-configuration.h
index e2e1c08..c2ba4f8 100644
--- a/kradio3/plugins/gui-quickbar/quickbar-configuration.h
+++ b/kradio3/plugins/gui-quickbar/quickbar-configuration.h
@@ -15,8 +15,8 @@
* *
***************************************************************************/
-#ifndef KRADIO_QUICKBAR_CONFIGURATION_H
-#define KRADIO_QUICKBAR_CONFIGURATION_H
+#ifndef KRADIO_TQUICKBAR_CONFIGURATION_H
+#define KRADIO_TQUICKBAR_CONFIGURATION_H
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -27,8 +27,9 @@
class QuickbarConfiguration : public StationSelector
{
Q_OBJECT
+ TQ_OBJECT
public :
- QuickbarConfiguration (QWidget *parent);
+ QuickbarConfiguration (TQWidget *tqparent);
~QuickbarConfiguration ();
};
diff --git a/kradio3/plugins/gui-quickbar/quickbar.cpp b/kradio3/plugins/gui-quickbar/quickbar.cpp
index 628a1bf..1ae3623 100644
--- a/kradio3/plugins/gui-quickbar/quickbar.cpp
+++ b/kradio3/plugins/gui-quickbar/quickbar.cpp
@@ -15,10 +15,10 @@
* *
***************************************************************************/
-#include <qtooltip.h>
-#include <qnamespace.h>
-#include <qhbuttongroup.h>
-#include <qvbuttongroup.h>
+#include <tqtooltip.h>
+#include <tqnamespace.h>
+#include <tqhbuttongroup.h>
+#include <tqvbuttongroup.h>
#include <ktoolbarbutton.h>
#include <kwin.h>
@@ -43,8 +43,8 @@ PLUGIN_LIBRARY_FUNCTIONS(QuickBar, "kradio-gui-quickbar", i18n("Radio Station Qu
/////////////////////////////////////////////////////////////////////////////
-QuickBar::QuickBar(const QString &name)
- : QWidget(NULL, name.ascii()),
+QuickBar::QuickBar(const TQString &name)
+ : TQWidget(NULL, name.ascii()),
WidgetPluginBase(name, i18n("Quickbar Plugin")),
m_layout(NULL),
m_buttonGroup(NULL),
@@ -83,7 +83,7 @@ bool QuickBar::disconnectI(Interface *i)
// IStationSelection
-bool QuickBar::setStationSelection(const QStringList &sl)
+bool QuickBar::setStationSelection(const TQStringList &sl)
{
if (m_stationIDs != sl) {
m_stationIDs = sl;
@@ -98,14 +98,14 @@ bool QuickBar::setStationSelection(const QStringList &sl)
void QuickBar::restoreState (KConfig *config)
{
- config->setGroup(QString("quickBar-") + name());
+ config->setGroup(TQString("quickBar-") + name());
WidgetPluginBase::restoreState(config, false);
int nStations = config->readNumEntry("nStations", 0);
m_stationIDs.clear();
for (int i = 1; i <= nStations; ++i) {
- QString s = config->readEntry(QString("stationID-") + QString().setNum(i), QString::null);
+ TQString s = config->readEntry(TQString("stationID-") + TQString().setNum(i), TQString());
if (s.length())
m_stationIDs += s;
}
@@ -117,15 +117,15 @@ void QuickBar::restoreState (KConfig *config)
void QuickBar::saveState (KConfig *config) const
{
- config->setGroup(QString("quickBar-") + name());
+ config->setGroup(TQString("quickBar-") + name());
WidgetPluginBase::saveState(config);
config->writeEntry("nStations", m_stationIDs.size());
int i = 1;
- QStringList::const_iterator end = m_stationIDs.end();
- for (QStringList::const_iterator it = m_stationIDs.begin(); it != end; ++it, ++i) {
- config->writeEntry(QString("stationID-") + QString().setNum(i), *it);
+ TQStringList::const_iterator end = m_stationIDs.end();
+ for (TQStringList::const_iterator it = m_stationIDs.begin(); it != end; ++it, ++i) {
+ config->writeEntry(TQString("stationID-") + TQString().setNum(i), *it);
}
}
@@ -200,14 +200,14 @@ bool QuickBar::noticeStationsChanged(const StationList &/*sl*/)
void QuickBar::buttonClicked(int id)
{
- // ouch, but we are still using QStringList :(
+ // ouch, but we are still using TQStringList :(
if (queryIsPowerOn() && id == getButtonID(queryCurrentStation())) {
sendPowerOff();
} else {
int k = 0;
- QStringList::iterator end = m_stationIDs.end();
- for (QStringList::iterator it = m_stationIDs.begin(); it != end; ++it, ++k) {
+ TQStringList::iterator end = m_stationIDs.end();
+ for (TQStringList::iterator it = m_stationIDs.begin(); it != end; ++it, ++k) {
if (k == id) {
const RawStationList &sl = queryStations().all();
const RadioStation &rs = sl.stationWithID(*it);
@@ -229,10 +229,10 @@ void QuickBar::buttonClicked(int id)
int QuickBar::getButtonID(const RadioStation &rs) const
{
- QString stationID = rs.stationID();
+ TQString stationID = rs.stationID();
int k = 0;
- QStringList::const_iterator end = m_stationIDs.end();
- for (QStringList::const_iterator it = m_stationIDs.begin(); it != end; ++it, ++k) {
+ TQStringList::const_iterator end = m_stationIDs.end();
+ for (TQStringList::const_iterator it = m_stationIDs.begin(); it != end; ++it, ++k) {
if (*it == stationID)
return k;
}
@@ -254,7 +254,7 @@ void QuickBar::activateButton(const RadioStation &rs)
if (pwr && buttonID >= 0) {
m_buttonGroup->setButton(buttonID);
} else {
- for (QToolButton *b = m_buttons.first(); b; b = m_buttons.next()) {
+ for (TQToolButton *b = m_buttons.first(); b; b = m_buttons.next()) {
b->setOn(false);
}
}
@@ -263,7 +263,7 @@ void QuickBar::activateButton(const RadioStation &rs)
-// KDE/Qt gui
+// KDE/TQt gui
void QuickBar::rebuildGUI()
@@ -271,7 +271,7 @@ void QuickBar::rebuildGUI()
if (m_layout) delete m_layout;
if (m_buttonGroup) delete m_buttonGroup;
- for (QPtrListIterator<QToolButton> it(m_buttons); it.current(); ++it)
+ for (TQPtrListIterator<TQToolButton> it(m_buttons); it.current(); ++it)
delete it.current();
m_buttons.clear();
@@ -279,33 +279,33 @@ void QuickBar::rebuildGUI()
m_layout->setMargin(1);
m_layout->setSpacing(2);
- m_buttonGroup = new QButtonGroup(this);
- QObject::connect (m_buttonGroup, SIGNAL(clicked(int)), this, SLOT(buttonClicked(int)));
+ m_buttonGroup = new TQButtonGroup(this);
+ TQObject::connect (m_buttonGroup, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(buttonClicked(int)));
// we use buttonGroup to enable automatic toggle/untoggle
m_buttonGroup->setExclusive(true);
- m_buttonGroup->setFrameStyle(QFrame::NoFrame);
+ m_buttonGroup->setFrameStyle(TQFrame::NoFrame);
m_buttonGroup->show();
int buttonID = 0;
const RawStationList &stations = queryStations().all();
- QStringList::iterator end = m_stationIDs.end();
- for (QStringList::iterator it = m_stationIDs.begin(); it != end; ++it, ++buttonID) {
+ TQStringList::iterator end = m_stationIDs.end();
+ for (TQStringList::iterator it = m_stationIDs.begin(); it != end; ++it, ++buttonID) {
const RadioStation &rs = stations.stationWithID(*it);
if (! rs.isValid()) continue;
- QToolButton *b = new QToolButton(this);
+ TQToolButton *b = new TQToolButton(this);
m_buttons.append(b);
b->setToggleButton(true);
if (rs.iconName().length())
- b->setIconSet(QPixmap(rs.iconName()));
+ b->setIconSet(TQPixmap(rs.iconName()));
else
b->setText(m_showShortName ? rs.shortName() : rs.name());
- b->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred));
+ b->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Preferred));
- QToolTip::add(b, rs.longName());
+ TQToolTip::add(b, rs.longName());
if (isVisible()) b->show();
@@ -316,9 +316,9 @@ void QuickBar::rebuildGUI()
// activate correct button
activateCurrentButton();
- // calculate geometry
+ // calculate tqgeometry
if (m_layout) {
- QRect r = geometry();
+ TQRect r = tqgeometry();
int h = m_layout->heightForWidth( r.width());
if (h > r.height())
@@ -333,32 +333,32 @@ void QuickBar::show()
{
// KWin::setType(winId(), NET::Toolbar);
WidgetPluginBase::pShow();
- QWidget::show();
+ TQWidget::show();
}
void QuickBar::showOnOrgDesktop()
{
WidgetPluginBase::pShowOnOrgDesktop();
- //QWidget::show();
+ //TQWidget::show();
}
void QuickBar::hide()
{
WidgetPluginBase::pHide();
- QWidget::hide();
+ TQWidget::hide();
}
-void QuickBar::showEvent(QShowEvent *e)
+void QuickBar::showEvent(TQShowEvent *e)
{
- QWidget::showEvent(e);
+ TQWidget::showEvent(e);
WidgetPluginBase::pShowEvent(e);
}
-void QuickBar::hideEvent(QHideEvent *e)
+void QuickBar::hideEvent(TQHideEvent *e)
{
- QWidget::hideEvent(e);
+ TQWidget::hideEvent(e);
WidgetPluginBase::pHideEvent(e);
}
@@ -366,38 +366,38 @@ void QuickBar::hideEvent(QHideEvent *e)
void QuickBar::setGeometry (int x, int y, int w, int h)
{
if (m_layout) {
- QSize marginSize(m_layout->margin()*2, m_layout->margin()*2);
- setMinimumSize(m_layout->minimumSize(QSize(w, h) - marginSize) + marginSize);
+ TQSize marginSize(m_layout->margin()*2, m_layout->margin()*2);
+ setMinimumSize(m_layout->tqminimumSize(TQSize(w, h) - marginSize) + marginSize);
}
- QWidget::setGeometry (x, y, w, h);
+ TQWidget::setGeometry (x, y, w, h);
}
-void QuickBar::setGeometry (const QRect &r)
+void QuickBar::setGeometry (const TQRect &r)
{
setGeometry (r.x(), r.y(), r.width(), r.height());
}
-void QuickBar::resizeEvent (QResizeEvent *e)
+void QuickBar::resizeEvent (TQResizeEvent *e)
{
- // minimumSize might change because of the flow layout
+ // tqminimumSize might change because of the flow tqlayout
if (m_layout) {
- QSize marginSize(m_layout->margin()*2, m_layout->margin()*2);
- setMinimumSize(m_layout->minimumSize(e->size() - marginSize) + marginSize);
+ TQSize marginSize(m_layout->margin()*2, m_layout->margin()*2);
+ setMinimumSize(m_layout->tqminimumSize(e->size() - marginSize) + marginSize);
}
- QWidget::resizeEvent (e);
+ TQWidget::resizeEvent (e);
}
void QuickBar::autoSetCaption()
{
const RadioStation &rs = queryCurrentStation();
- setCaption((queryIsPowerOn() && rs.isValid()) ? rs.longName() : QString("KRadio"));
+ setCaption((queryIsPowerOn() && rs.isValid()) ? rs.longName() : TQString("KRadio"));
}
-void QuickBar::dragEnterEvent(QDragEnterEvent* event)
+void QuickBar::dragEnterEvent(TQDragEnterEvent* event)
{
bool a = StationDragObject::canDecode(event);
if (a)
@@ -407,14 +407,14 @@ void QuickBar::dragEnterEvent(QDragEnterEvent* event)
event->accept(a);
}
-void QuickBar::dropEvent(QDropEvent* event)
+void QuickBar::dropEvent(TQDropEvent* event)
{
- QStringList list;
+ TQStringList list;
if ( StationDragObject::decode(event, list) ) {
- QStringList l = getStationSelection();
- for (QValueListConstIterator<QString> it = list.begin(); it != list.end(); ++it)
- if (!l.contains(*it))
+ TQStringList l = getStationSelection();
+ for (TQValueListConstIterator<TQString> it = list.begin(); it != list.end(); ++it)
+ if (!l.tqcontains(*it))
l.append(*it);
setStationSelection(l);
}
diff --git a/kradio3/plugins/gui-quickbar/quickbar.h b/kradio3/plugins/gui-quickbar/quickbar.h
index 7bf5193..1f5443a 100644
--- a/kradio3/plugins/gui-quickbar/quickbar.h
+++ b/kradio3/plugins/gui-quickbar/quickbar.h
@@ -15,42 +15,43 @@
* *
***************************************************************************/
-#ifndef KRADIO_QUICKBAR_H
-#define KRADIO_QUICKBAR_H
+#ifndef KRADIO_TQUICKBAR_H
+#define KRADIO_TQUICKBAR_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-#include <qwidget.h>
+#include <tqwidget.h>
#include "../../src/include/radio_interfaces.h"
#include "../../src/include/widgetplugins.h"
#include "../../src/include/stationselection_interfaces.h"
class ButtonFlowLayout;
-class QButtonGroup;
+class TQButtonGroup;
class KConfig;
-class QToolButton;
+class TQToolButton;
/**
*@author Martin Witte / Klas Kalass
*/
-class QuickBar : public QWidget,
+class QuickBar : public TQWidget,
public WidgetPluginBase,
public IRadioClient,
public IStationSelection
{
Q_OBJECT
+ TQ_OBJECT
public:
- QuickBar(const QString &name = QString::null);
+ QuickBar(const TQString &name = TQString());
~QuickBar();
- virtual QString pluginClassName() const { return "QuickBar"; }
+ virtual TQString pluginClassName() const { return "QuickBar"; }
- 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 bool connectI(Interface *i);
virtual bool disconnectI(Interface *i);
@@ -58,10 +59,10 @@ public:
// IStationSelection
RECEIVERS:
- bool setStationSelection(const QStringList &sl);
+ bool setStationSelection(const TQStringList &sl);
ANSWERS:
- const QStringList & getStationSelection () const { return m_stationIDs; }
+ const TQStringList & getStationSelection () const { return m_stationIDs; }
// PluginBase
@@ -79,7 +80,7 @@ RECEIVERS:
bool noticePowerChanged(bool on);
bool noticeStationChanged (const RadioStation &, int idx);
bool noticeStationsChanged(const StationList &sl);
- bool noticePresetFileChanged(const QString &/*f*/) { return false; }
+ bool noticePresetFileChanged(const TQString &/*f*/) { return false; }
bool noticeCurrentSoundStreamIDChanged(SoundStreamID /*id*/) { return false; }
@@ -99,8 +100,8 @@ protected:
void autoSetCaption();
- void dragEnterEvent(QDragEnterEvent* event);
- void dropEvent(QDropEvent* event);
+ void dragEnterEvent(TQDragEnterEvent* event);
+ void dropEvent(TQDropEvent* event);
// KDE/QT
@@ -110,28 +111,28 @@ public slots:
void show();
void hide();
void showOnOrgDesktop();
- void setGeometry (const QRect &r);
+ void setGeometry (const TQRect &r);
void setGeometry (int x, int y, int w, int h);
protected:
void rebuildGUI();
- void showEvent(QShowEvent *);
- void hideEvent(QHideEvent *);
- void resizeEvent(QResizeEvent *);
+ void showEvent(TQShowEvent *);
+ void hideEvent(TQHideEvent *);
+ void resizeEvent(TQResizeEvent *);
- const QWidget *getWidget() const { return this; }
- QWidget *getWidget() { return this; }
+ const TQWidget *getWidget() const { return this; }
+ TQWidget *getWidget() { return this; }
protected :
ButtonFlowLayout *m_layout;
- QButtonGroup *m_buttonGroup;
+ TQButtonGroup *m_buttonGroup;
- QPtrList<QToolButton> m_buttons;
+ TQPtrList<TQToolButton> m_buttons;
// config
bool m_showShortName;
- QStringList m_stationIDs;
+ TQStringList m_stationIDs;
bool m_ignoreNoticeActivation;
};
diff --git a/kradio3/plugins/gui-standard-display/displaycfg.cpp b/kradio3/plugins/gui-standard-display/displaycfg.cpp
index 8e26e72..d194751 100644
--- a/kradio3/plugins/gui-standard-display/displaycfg.cpp
+++ b/kradio3/plugins/gui-standard-display/displaycfg.cpp
@@ -20,68 +20,68 @@
#include <kcolordialog.h>
#include <kfontdialog.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
-#include <qlabel.h>
-#include <qbuttongroup.h>
+#include <tqlabel.h>
+#include <tqbuttongroup.h>
-DisplayConfiguration::DisplayConfiguration(QWidget *parent)
- : QWidget (parent),
+DisplayConfiguration::DisplayConfiguration(TQWidget *tqparent)
+ : TQWidget (tqparent),
m_dirty(true),
m_ignore_gui_updates(false)
{
- QGroupBox *bg = new QGroupBox(i18n("Display Colors"), this);
+ TQGroupBox *bg = new TQGroupBox(i18n("Display Colors"), this);
bg->setColumnLayout(0, Qt::Vertical );
- bg->layout()->setSpacing( 8 );
- bg->layout()->setMargin( 12 );
- QGridLayout *gl = new QGridLayout (bg->layout());
+ bg->tqlayout()->setSpacing( 8 );
+ bg->tqlayout()->setMargin( 12 );
+ TQGridLayout *gl = new TQGridLayout (bg->tqlayout());
m_btnActive = new KColorButton(queryDisplayActiveColor(), bg);
m_btnInactive = new KColorButton(queryDisplayInactiveColor(), bg);
m_btnBkgnd = new KColorButton(queryDisplayBkgndColor(), bg);
- connect(m_btnActive, SIGNAL(changed(const QColor &)), this, SLOT(slotSetDirty()));
- connect(m_btnInactive, SIGNAL(changed(const QColor &)), this, SLOT(slotSetDirty()));
- connect(m_btnBkgnd, SIGNAL(changed(const QColor &)), this, SLOT(slotSetDirty()));
+ connect(m_btnActive, TQT_SIGNAL(changed(const TQColor &)), this, TQT_SLOT(slotSetDirty()));
+ connect(m_btnInactive, TQT_SIGNAL(changed(const TQColor &)), this, TQT_SLOT(slotSetDirty()));
+ connect(m_btnBkgnd, TQT_SIGNAL(changed(const TQColor &)), this, TQT_SLOT(slotSetDirty()));
- QLabel *l1 = new QLabel(i18n("Active Text"), bg);
- QLabel *l2 = new QLabel(i18n("Inactive Text"), bg);
- QLabel *l3 = new QLabel(i18n("Background Color"), bg);
+ TQLabel *l1 = new TQLabel(i18n("Active Text"), bg);
+ TQLabel *l2 = new TQLabel(i18n("Inactive Text"), bg);
+ TQLabel *l3 = new TQLabel(i18n("Background Color"), bg);
- l1->setAlignment(QLabel::AlignCenter);
- l2->setAlignment(QLabel::AlignCenter);
- l3->setAlignment(QLabel::AlignCenter);
+ l1->tqsetAlignment(TQLabel::AlignCenter);
+ l2->tqsetAlignment(TQLabel::AlignCenter);
+ l3->tqsetAlignment(TQLabel::AlignCenter);
- l1->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
- l2->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
- l3->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
- m_btnActive ->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
- m_btnInactive->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
- m_btnBkgnd ->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
+ l1->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed));
+ l2->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed));
+ l3->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed));
+ m_btnActive ->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding));
+ m_btnInactive->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding));
+ m_btnBkgnd ->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding));
- m_btnActive ->setMinimumSize(QSize(40, 40));
- m_btnInactive->setMinimumSize(QSize(40, 40));
- m_btnBkgnd ->setMinimumSize(QSize(40, 40));
+ m_btnActive ->setMinimumSize(TQSize(40, 40));
+ m_btnInactive->setMinimumSize(TQSize(40, 40));
+ m_btnBkgnd ->setMinimumSize(TQSize(40, 40));
- gl->addWidget (l1, 0, 0, Qt::AlignCenter);
- gl->addWidget (l2, 0, 1, Qt::AlignCenter);
- gl->addWidget (l3, 0, 2, Qt::AlignCenter);
+ gl->addWidget (l1, 0, 0, TQt::AlignCenter);
+ gl->addWidget (l2, 0, 1, TQt::AlignCenter);
+ gl->addWidget (l3, 0, 2, TQt::AlignCenter);
gl->addWidget (m_btnActive, 1, 0);
gl->addWidget (m_btnInactive, 1, 1);
gl->addWidget (m_btnBkgnd, 1, 2);
- m_fontChooser = new KFontChooser(this, NULL, false, QStringList(), true, 4);
+ m_fontChooser = new KFontChooser(this, NULL, false, TQStringList(), true, 4);
m_fontChooser->setFont(queryDisplayFont());
- m_fontChooser->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
+ m_fontChooser->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding));
- QVBoxLayout *l = new QVBoxLayout(this, 10);
+ TQVBoxLayout *l = new TQVBoxLayout(this, 10);
l->addWidget(bg);
l->addWidget(m_fontChooser);
- connect(m_btnActive, SIGNAL(changed(const QColor &)), this, SLOT(slotSetDirty()));
- connect(m_btnInactive, SIGNAL(changed(const QColor &)), this, SLOT(slotSetDirty()));
- connect(m_btnBkgnd, SIGNAL(changed(const QColor &)), this, SLOT(slotSetDirty()));
- connect(m_fontChooser, SIGNAL(fontSelected(const QFont &)), this, SLOT(slotSetDirty()));
+ connect(m_btnActive, TQT_SIGNAL(changed(const TQColor &)), this, TQT_SLOT(slotSetDirty()));
+ connect(m_btnInactive, TQT_SIGNAL(changed(const TQColor &)), this, TQT_SLOT(slotSetDirty()));
+ connect(m_btnBkgnd, TQT_SIGNAL(changed(const TQColor &)), this, TQT_SLOT(slotSetDirty()));
+ connect(m_fontChooser, TQT_SIGNAL(fontSelected(const TQFont &)), this, TQT_SLOT(slotSetDirty()));
}
@@ -91,7 +91,7 @@ DisplayConfiguration::~DisplayConfiguration()
}
-bool DisplayConfiguration::noticeDisplayColorsChanged(const QColor &activeColor, const QColor &inactiveColor, const QColor &bkgnd)
+bool DisplayConfiguration::noticeDisplayColorsChanged(const TQColor &activeColor, const TQColor &inactiveColor, const TQColor &bkgnd)
{
m_ignore_gui_updates = true;
m_btnActive->setColor(activeColor);
@@ -102,7 +102,7 @@ bool DisplayConfiguration::noticeDisplayColorsChanged(const QColor &activeColor,
}
-bool DisplayConfiguration::noticeDisplayFontChanged(const QFont &f)
+bool DisplayConfiguration::noticeDisplayFontChanged(const TQFont &f)
{
m_ignore_gui_updates = true;
m_fontChooser->setFont(f);
diff --git a/kradio3/plugins/gui-standard-display/displaycfg.h b/kradio3/plugins/gui-standard-display/displaycfg.h
index fcd6079..94101c1 100644
--- a/kradio3/plugins/gui-standard-display/displaycfg.h
+++ b/kradio3/plugins/gui-standard-display/displaycfg.h
@@ -23,17 +23,18 @@
#endif
#include "displaycfg_interfaces.h"
-#include <qwidget.h>
+#include <tqwidget.h>
class KColorButton;
class KFontChooser;
-class DisplayConfiguration : public QWidget,
+class DisplayConfiguration : public TQWidget,
public IDisplayCfgClient
{
Q_OBJECT
+ TQ_OBJECT
public:
- DisplayConfiguration(QWidget *parent);
+ DisplayConfiguration(TQWidget *tqparent);
~DisplayConfiguration();
// Interface
@@ -44,8 +45,8 @@ public:
// IDisplayCfgClient
RECEIVERS:
- bool noticeDisplayColorsChanged(const QColor &activeColor, const QColor &inactiveColor, const QColor &bkgnd);
- bool noticeDisplayFontChanged(const QFont &f);
+ bool noticeDisplayColorsChanged(const TQColor &activeColor, const TQColor &inactiveColor, const TQColor &bkgnd);
+ bool noticeDisplayFontChanged(const TQFont &f);
public slots:
diff --git a/kradio3/plugins/gui-standard-display/displaycfg_interfaces.cpp b/kradio3/plugins/gui-standard-display/displaycfg_interfaces.cpp
index a7bbf01..0e3864e 100644
--- a/kradio3/plugins/gui-standard-display/displaycfg_interfaces.cpp
+++ b/kradio3/plugins/gui-standard-display/displaycfg_interfaces.cpp
@@ -19,37 +19,37 @@
// IDisplayCfg
-IF_IMPL_SENDER ( IDisplayCfg::notifyDisplayColorsChanged(const QColor &a, const QColor &b, const QColor &c),
+IF_IMPL_SENDER ( IDisplayCfg::notifyDisplayColorsChanged(const TQColor &a, const TQColor &b, const TQColor &c),
noticeDisplayColorsChanged(a,b, c) )
-IF_IMPL_SENDER ( IDisplayCfg::notifyDisplayFontChanged(const QFont &f),
+IF_IMPL_SENDER ( IDisplayCfg::notifyDisplayFontChanged(const TQFont &f),
noticeDisplayFontChanged(f) )
// IDisplayCfgClient
-IF_IMPL_SENDER ( IDisplayCfgClient::sendDisplayColors(const QColor &a, const QColor &b, const QColor &c),
+IF_IMPL_SENDER ( IDisplayCfgClient::sendDisplayColors(const TQColor &a, const TQColor &b, const TQColor &c),
setDisplayColors(a,b, c) )
-IF_IMPL_SENDER ( IDisplayCfgClient::sendDisplayFont(const QFont &f),
+IF_IMPL_SENDER ( IDisplayCfgClient::sendDisplayFont(const TQFont &f),
setDisplayFont(f) )
-const QColor default_display_active_color = QColor(20, 244, 20);
-IF_IMPL_QUERY ( const QColor &IDisplayCfgClient::queryDisplayActiveColor(),
+const TQColor default_display_active_color = TQColor(20, 244, 20);
+IF_IMPL_TQUERY ( const TQColor &IDisplayCfgClient::queryDisplayActiveColor(),
getDisplayActiveColor(),
default_display_active_color )
-const QColor default_display_inactive_color = QColor(10, 117, 10).light(75);
-IF_IMPL_QUERY ( const QColor &IDisplayCfgClient::queryDisplayInactiveColor(),
+const TQColor default_display_inactive_color = TQColor(10, 117, 10).light(75);
+IF_IMPL_TQUERY ( const TQColor &IDisplayCfgClient::queryDisplayInactiveColor(),
getDisplayInactiveColor(),
default_display_inactive_color )
-const QColor default_display_bkgnd_color = QColor(10, 117, 10);
-IF_IMPL_QUERY ( const QColor &IDisplayCfgClient::queryDisplayBkgndColor(),
+const TQColor default_display_bkgnd_color = TQColor(10, 117, 10);
+IF_IMPL_TQUERY ( const TQColor &IDisplayCfgClient::queryDisplayBkgndColor(),
getDisplayBkgndColor(),
default_display_bkgnd_color )
-const QFont default_display_font = QFont("Helvetica");
-IF_IMPL_QUERY ( const QFont &IDisplayCfgClient::queryDisplayFont(),
+const TQFont default_display_font = TQFont("Helvetica");
+IF_IMPL_TQUERY ( const TQFont &IDisplayCfgClient::queryDisplayFont(),
getDisplayFont(),
default_display_font )
diff --git a/kradio3/plugins/gui-standard-display/displaycfg_interfaces.h b/kradio3/plugins/gui-standard-display/displaycfg_interfaces.h
index ac2ef5d..49514d5 100644
--- a/kradio3/plugins/gui-standard-display/displaycfg_interfaces.h
+++ b/kradio3/plugins/gui-standard-display/displaycfg_interfaces.h
@@ -24,8 +24,8 @@
#include "../../src/include/interfaces.h"
-#include <qfont.h>
-#include <qcolor.h>
+#include <tqfont.h>
+#include <tqcolor.h>
///////////////////////////////////////////////////////////////////////
@@ -36,18 +36,18 @@ public :
IF_CON_DESTRUCTOR(IDisplayCfg, -1)
RECEIVERS:
- IF_RECEIVER( setDisplayColors(const QColor &activeColor, const QColor &inactiveColor, const QColor &bkgnd) )
- IF_RECEIVER( setDisplayFont (const QFont &f) )
+ IF_RECEIVER( setDisplayColors(const TQColor &activeColor, const TQColor &inactiveColor, const TQColor &bkgnd) )
+ IF_RECEIVER( setDisplayFont (const TQFont &f) )
SENDERS:
- IF_SENDER ( notifyDisplayColorsChanged(const QColor &activeColor, const QColor &inactiveColor, const QColor &bkgnd) )
- IF_SENDER ( notifyDisplayFontChanged(const QFont &f) )
+ IF_SENDER ( notifyDisplayColorsChanged(const TQColor &activeColor, const TQColor &inactiveColor, const TQColor &bkgnd) )
+ IF_SENDER ( notifyDisplayFontChanged(const TQFont &f) )
ANSWERS:
- IF_ANSWER ( const QColor &getDisplayActiveColor() const )
- IF_ANSWER ( const QColor &getDisplayInactiveColor() const )
- IF_ANSWER ( const QColor &getDisplayBkgndColor() const )
- IF_ANSWER ( const QFont &getDisplayFont() const )
+ IF_ANSWER ( const TQColor &getDisplayActiveColor() const )
+ IF_ANSWER ( const TQColor &getDisplayInactiveColor() const )
+ IF_ANSWER ( const TQColor &getDisplayBkgndColor() const )
+ IF_ANSWER ( const TQFont &getDisplayFont() const )
};
@@ -60,18 +60,18 @@ public :
IF_CON_DESTRUCTOR(IDisplayCfgClient, 1)
SENDERS:
- IF_SENDER ( sendDisplayColors(const QColor &activeColor, const QColor &inactiveColor, const QColor &bkgnd) )
- IF_SENDER ( sendDisplayFont (const QFont &f) )
+ IF_SENDER ( sendDisplayColors(const TQColor &activeColor, const TQColor &inactiveColor, const TQColor &bkgnd) )
+ IF_SENDER ( sendDisplayFont (const TQFont &f) )
RECEIVERS:
- IF_RECEIVER( noticeDisplayColorsChanged(const QColor &activeColor, const QColor &inactiveColor, const QColor &bkgnd) )
- IF_RECEIVER( noticeDisplayFontChanged(const QFont &f) )
-
-QUERIES:
- IF_QUERY ( const QColor &queryDisplayActiveColor() )
- IF_QUERY ( const QColor &queryDisplayInactiveColor() )
- IF_QUERY ( const QColor &queryDisplayBkgndColor() )
- IF_QUERY ( const QFont &queryDisplayFont() )
+ IF_RECEIVER( noticeDisplayColorsChanged(const TQColor &activeColor, const TQColor &inactiveColor, const TQColor &bkgnd) )
+ IF_RECEIVER( noticeDisplayFontChanged(const TQFont &f) )
+
+TQUERIES:
+ IF_TQUERY ( const TQColor &queryDisplayActiveColor() )
+ IF_TQUERY ( const TQColor &queryDisplayInactiveColor() )
+ IF_TQUERY ( const TQColor &queryDisplayBkgndColor() )
+ IF_TQUERY ( const TQFont &queryDisplayFont() )
RECEIVERS:
virtual void noticeConnectedI (cmplInterface *, bool pointer_valid);
diff --git a/kradio3/plugins/gui-standard-display/radioview-configuration.cpp b/kradio3/plugins/gui-standard-display/radioview-configuration.cpp
index 9a22313..f8349c3 100644
--- a/kradio3/plugins/gui-standard-display/radioview-configuration.cpp
+++ b/kradio3/plugins/gui-standard-display/radioview-configuration.cpp
@@ -17,8 +17,8 @@
#include "radioview-configuration.h"
-RadioViewConfiguration::RadioViewConfiguration(QWidget *parent)
- : QTabWidget (parent),
+RadioViewConfiguration::RadioViewConfiguration(TQWidget *tqparent)
+ : TQTabWidget (tqparent),
m_dirty(true)
{
}
@@ -28,66 +28,66 @@ RadioViewConfiguration::~RadioViewConfiguration()
}
-void RadioViewConfiguration::addTab (QWidget *child, const QString &label)
+void RadioViewConfiguration::addTab (TQWidget *child, const TQString &label)
{
- QTabWidget::addTab(child, label);
- QObject::connect(this, SIGNAL(sigOK()), child, SLOT(slotOK()));
- QObject::connect(this, SIGNAL(sigCancel()), child, SLOT(slotCancel()));
- QObject::connect(child, SIGNAL(sigDirty()), this, SLOT(slotSetDirty()));
+ TQTabWidget::addTab(child, label);
+ TQObject::connect(this, TQT_SIGNAL(sigOK()), child, TQT_SLOT(slotOK()));
+ TQObject::connect(this, TQT_SIGNAL(sigCancel()), child, TQT_SLOT(slotCancel()));
+ TQObject::connect(child, TQT_SIGNAL(sigDirty()), this, TQT_SLOT(slotSetDirty()));
}
-void RadioViewConfiguration::addTab (QWidget *child, const QIconSet &iconset, const QString &label)
+void RadioViewConfiguration::addTab (TQWidget *child, const TQIconSet &iconset, const TQString &label)
{
- QTabWidget::addTab(child, iconset, label);
- QObject::connect(this, SIGNAL(sigOK()), child, SLOT(slotOK()));
- QObject::connect(this, SIGNAL(sigCancel()), child, SLOT(slotCancel()));
- QObject::connect(child, SIGNAL(sigDirty()), this, SLOT(slotSetDirty()));
+ TQTabWidget::addTab(child, iconset, label);
+ TQObject::connect(this, TQT_SIGNAL(sigOK()), child, TQT_SLOT(slotOK()));
+ TQObject::connect(this, TQT_SIGNAL(sigCancel()), child, TQT_SLOT(slotCancel()));
+ TQObject::connect(child, TQT_SIGNAL(sigDirty()), this, TQT_SLOT(slotSetDirty()));
}
-void RadioViewConfiguration::addTab (QWidget *child, QTab *tab)
+void RadioViewConfiguration::addTab (TQWidget *child, TQTab *tab)
{
- QTabWidget::addTab(child, tab);
- QObject::connect(this, SIGNAL(sigOK()), child, SLOT(slotOK()));
- QObject::connect(this, SIGNAL(sigCancel()), child, SLOT(slotCancel()));
- QObject::connect(child, SIGNAL(sigDirty()), this, SLOT(slotSetDirty()));
+ TQTabWidget::addTab(child, tab);
+ TQObject::connect(this, TQT_SIGNAL(sigOK()), child, TQT_SLOT(slotOK()));
+ TQObject::connect(this, TQT_SIGNAL(sigCancel()), child, TQT_SLOT(slotCancel()));
+ TQObject::connect(child, TQT_SIGNAL(sigDirty()), this, TQT_SLOT(slotSetDirty()));
}
-void RadioViewConfiguration::insertTab (QWidget *child, const QString &label, int index)
+void RadioViewConfiguration::insertTab (TQWidget *child, const TQString &label, int index)
{
- QTabWidget::insertTab(child, label, index);
- QObject::connect(this, SIGNAL(sigOK()), child, SLOT(slotOK()));
- QObject::connect(this, SIGNAL(sigCancel()), child, SLOT(slotCancel()));
- QObject::connect(child, SIGNAL(sigDirty()), this, SLOT(slotSetDirty()));
+ TQTabWidget::insertTab(child, label, index);
+ TQObject::connect(this, TQT_SIGNAL(sigOK()), child, TQT_SLOT(slotOK()));
+ TQObject::connect(this, TQT_SIGNAL(sigCancel()), child, TQT_SLOT(slotCancel()));
+ TQObject::connect(child, TQT_SIGNAL(sigDirty()), this, TQT_SLOT(slotSetDirty()));
}
-void RadioViewConfiguration::insertTab (QWidget *child, const QIconSet &iconset, const QString &label, int index)
+void RadioViewConfiguration::insertTab (TQWidget *child, const TQIconSet &iconset, const TQString &label, int index)
{
- QTabWidget::insertTab(child, iconset, label, index);
- QObject::connect(this, SIGNAL(sigOK()), child, SLOT(slotOK()));
- QObject::connect(this, SIGNAL(sigCancel()), child, SLOT(slotCancel()));
- QObject::connect(child, SIGNAL(sigDirty()), this, SLOT(slotSetDirty()));
+ TQTabWidget::insertTab(child, iconset, label, index);
+ TQObject::connect(this, TQT_SIGNAL(sigOK()), child, TQT_SLOT(slotOK()));
+ TQObject::connect(this, TQT_SIGNAL(sigCancel()), child, TQT_SLOT(slotCancel()));
+ TQObject::connect(child, TQT_SIGNAL(sigDirty()), this, TQT_SLOT(slotSetDirty()));
}
-void RadioViewConfiguration::insertTab (QWidget *child, QTab *tab, int index)
+void RadioViewConfiguration::insertTab (TQWidget *child, TQTab *tab, int index)
{
- QTabWidget::insertTab(child, tab, index);
- QObject::connect(this, SIGNAL(sigOK()), child, SLOT(slotOK()));
- QObject::connect(this, SIGNAL(sigCancel()), child, SLOT(slotCancel()));
- QObject::connect(child, SIGNAL(sigDirty()), this, SLOT(slotSetDirty()));
+ TQTabWidget::insertTab(child, tab, index);
+ TQObject::connect(this, TQT_SIGNAL(sigOK()), child, TQT_SLOT(slotOK()));
+ TQObject::connect(this, TQT_SIGNAL(sigCancel()), child, TQT_SLOT(slotCancel()));
+ TQObject::connect(child, TQT_SIGNAL(sigDirty()), this, TQT_SLOT(slotSetDirty()));
}
-void RadioViewConfiguration::removePage(QWidget *w)
+void RadioViewConfiguration::removePage(TQWidget *w)
{
- QObject::disconnect(this, SIGNAL(sigOK()), w, SLOT(slotOK()));
- QObject::disconnect(this, SIGNAL(sigCancel()), w, SLOT(slotCancel()));
- QObject::disconnect(w, SIGNAL(sigDirty()), this, SLOT(slotSetDirty()));
- QTabWidget::removePage(w);
+ TQObject::disconnect(this, TQT_SIGNAL(sigOK()), w, TQT_SLOT(slotOK()));
+ TQObject::disconnect(this, TQT_SIGNAL(sigCancel()), w, TQT_SLOT(slotCancel()));
+ TQObject::disconnect(w, TQT_SIGNAL(sigDirty()), this, TQT_SLOT(slotSetDirty()));
+ TQTabWidget::removePage(w);
}
diff --git a/kradio3/plugins/gui-standard-display/radioview-configuration.h b/kradio3/plugins/gui-standard-display/radioview-configuration.h
index a85d4d9..e368b08 100644
--- a/kradio3/plugins/gui-standard-display/radioview-configuration.h
+++ b/kradio3/plugins/gui-standard-display/radioview-configuration.h
@@ -24,22 +24,23 @@
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
-class RadioViewConfiguration : public QTabWidget
+class RadioViewConfiguration : public TQTabWidget
{
Q_OBJECT
+ TQ_OBJECT
public :
- RadioViewConfiguration(QWidget *parent = NULL);
+ RadioViewConfiguration(TQWidget *tqparent = NULL);
~RadioViewConfiguration();
- void addTab (QWidget *child, const QString &label);
- void addTab (QWidget *child, const QIconSet &iconset, const QString &label);
- void addTab (QWidget *child, QTab *tab);
- void insertTab (QWidget *child, const QString &label, int index = -1);
- void insertTab (QWidget *child, const QIconSet &iconset, const QString &label, int index = -1);
- void insertTab (QWidget *child, QTab *tab, int index = -1);
- void removePage(QWidget *w);
+ void addTab (TQWidget *child, const TQString &label);
+ void addTab (TQWidget *child, const TQIconSet &iconset, const TQString &label);
+ void addTab (TQWidget *child, TQTab *tab);
+ void insertTab (TQWidget *child, const TQString &label, int index = -1);
+ void insertTab (TQWidget *child, const TQIconSet &iconset, const TQString &label, int index = -1);
+ void insertTab (TQWidget *child, TQTab *tab, int index = -1);
+ void removePage(TQWidget *w);
public slots:
diff --git a/kradio3/plugins/gui-standard-display/radioview.cpp b/kradio3/plugins/gui-standard-display/radioview.cpp
index e1fd8e4..0a8e31f 100644
--- a/kradio3/plugins/gui-standard-display/radioview.cpp
+++ b/kradio3/plugins/gui-standard-display/radioview.cpp
@@ -15,14 +15,14 @@
* *
***************************************************************************/
-#include <qwidgetstack.h>
-#include <qlayout.h>
-#include <qtoolbutton.h>
-#include <qslider.h>
-#include <qfile.h>
-#include <qtooltip.h>
-#include <qcheckbox.h>
-#include <qimage.h>
+#include <tqwidgetstack.h>
+#include <tqlayout.h>
+#include <tqtoolbutton.h>
+#include <tqslider.h>
+#include <tqfile.h>
+#include <tqtooltip.h>
+#include <tqcheckbox.h>
+#include <tqimage.h>
#include <kcombobox.h>
#include <kiconloader.h>
@@ -67,8 +67,8 @@ bool RadioView::ElementCfg::operator == (const ElementCfg &x) const
///////////////////////////////////////////////////////////////////////
-RadioView::RadioView(const QString &name)
- : QWidget(NULL, name.ascii()),
+RadioView::RadioView(const TQString &name)
+ : TQWidget(NULL, name.ascii()),
WidgetPluginBase(name, i18n("Radio Display")),
enableToolbarFlag(false),
btnPower(NULL),
@@ -86,34 +86,34 @@ RadioView::RadioView(const QString &name)
for (int i = 0; i < clsClassMAX; ++i)
maxUsability[i] = 0;
- QBoxLayout *l01 = new QBoxLayout(this, QBoxLayout::LeftToRight, /*spacing=*/3);
+ TQBoxLayout *l01 = new TQBoxLayout(this, TQBoxLayout::LeftToRight, /*spacing=*/3);
l01->setMargin(1);
l01->setSpacing(2);
- widgetStacks[clsRadioSound] = new QWidgetStack (this);
+ widgetStacks[clsRadioSound] = new TQWidgetStack (this);
l01->addWidget(widgetStacks[clsRadioSound]);
- QBoxLayout *l02 = new QBoxLayout(l01, QBoxLayout::Down);
- QBoxLayout *l03 = new QBoxLayout(l02, QBoxLayout::LeftToRight);
+ TQBoxLayout *l02 = new TQBoxLayout(l01, TQBoxLayout::Down);
+ TQBoxLayout *l03 = new TQBoxLayout(l02, TQBoxLayout::LeftToRight);
comboStations = new KComboBox (this);
l02->addWidget (comboStations);
- QBoxLayout *l05 = new QBoxLayout(l03, QBoxLayout::Down);
- widgetStacks[clsRadioDisplay] = new QWidgetStack (this);
+ TQBoxLayout *l05 = new TQBoxLayout(l03, TQBoxLayout::Down);
+ widgetStacks[clsRadioDisplay] = new TQWidgetStack (this);
l05->addWidget(widgetStacks[clsRadioDisplay]);
- widgetStacks[clsRadioSeek] = new QWidgetStack (this);
+ widgetStacks[clsRadioSeek] = new TQWidgetStack (this);
l05->addWidget(widgetStacks[clsRadioSeek]);
- QGridLayout *l04 = new QGridLayout (l03, /*rows=*/ 3, /*cols=*/ 2);
- btnPower = new QToolButton(this);
+ TQGridLayout *l04 = new TQGridLayout (l03, /*rows=*/ 3, /*cols=*/ 2);
+ btnPower = new TQToolButton(this);
btnPower->setToggleButton(true);
- btnRecording = new QToolButton(this);
+ btnRecording = new TQToolButton(this);
btnRecording->setToggleButton(true);
- btnConfigure = new QToolButton(this);
+ btnConfigure = new TQToolButton(this);
btnConfigure->setToggleButton(true);
- btnQuit = new QToolButton(this);
- btnSnooze = new QToolButton(this);
+ btnQuit = new TQToolButton(this);
+ btnSnooze = new TQToolButton(this);
btnSnooze->setToggleButton(true);
- btnPlugins = new QToolButton(this);
+ btnPlugins = new TQToolButton(this);
btnPlugins->setPopupDelay(1);
l04->addWidget (btnPower, 0, 0);
l04->addWidget (btnRecording, 0, 1);
@@ -125,24 +125,24 @@ RadioView::RadioView(const QString &name)
m_pauseMenu = new KPopupMenu(btnPower);
m_pauseMenu->insertItem(SmallIcon("kradio_pause"),
i18n("Pause KRadio"),
- this, SLOT(slotPause()));
+ this, TQT_SLOT(slotPause()));
btnPower->setPopupDelay(200);
m_RecordingMenu = new KPopupMenu(btnRecording);
m_RecordingMenu->insertItem(SmallIcon("kradio_record"),
i18n("Start Recording"),
POPUP_ID_START_RECORDING_DEFAULT);
- QObject::connect(m_RecordingMenu, SIGNAL(activated(int)),
- this, SLOT(slotRecordingMenu(int)));
+ TQObject::connect(m_RecordingMenu, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotRecordingMenu(int)));
btnRecording->setPopup(m_RecordingMenu);
m_SnoozeMenu = new KPopupMenu(btnSnooze);
- m_SnoozeMenu->insertItem(i18n("5 min"), this, SLOT(slotSnooze(int)), 0, 5);
- m_SnoozeMenu->insertItem(i18n("10 min"), this, SLOT(slotSnooze(int)), 0, 10);
- m_SnoozeMenu->insertItem(i18n("15 min"), this, SLOT(slotSnooze(int)), 0, 15);
- m_SnoozeMenu->insertItem(i18n("30 min"), this, SLOT(slotSnooze(int)), 0, 30);
- m_SnoozeMenu->insertItem(i18n("60 min"), this, SLOT(slotSnooze(int)), 0, 60);
+ m_SnoozeMenu->insertItem(i18n("5 min"), this, TQT_SLOT(slotSnooze(int)), 0, 5);
+ m_SnoozeMenu->insertItem(i18n("10 min"), this, TQT_SLOT(slotSnooze(int)), 0, 10);
+ m_SnoozeMenu->insertItem(i18n("15 min"), this, TQT_SLOT(slotSnooze(int)), 0, 15);
+ m_SnoozeMenu->insertItem(i18n("30 min"), this, TQT_SLOT(slotSnooze(int)), 0, 30);
+ m_SnoozeMenu->insertItem(i18n("60 min"), this, TQT_SLOT(slotSnooze(int)), 0, 60);
btnSnooze->setPopup(m_SnoozeMenu);
btnSnooze->setPopupDelay(200);
@@ -162,42 +162,42 @@ RadioView::RadioView(const QString &name)
btnSnooze->setIconSet(SmallIconSet("kradio_zzz"));
btnPlugins->setIconSet(SmallIconSet("kradio_plugins"));
- widgetStacks[clsRadioSound] ->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred));
- widgetStacks[clsRadioDisplay]->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred));
- widgetStacks[clsRadioSeek] ->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
- comboStations ->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
+ widgetStacks[clsRadioSound] ->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Preferred));
+ widgetStacks[clsRadioDisplay]->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Preferred));
+ widgetStacks[clsRadioSeek] ->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed));
+ comboStations ->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed));
comboStations->setMinimumHeight(28);
- QObject::connect(btnPower, SIGNAL(toggled(bool)),
- this, SLOT(slotPower(bool)));
- QObject::connect(btnQuit, SIGNAL(clicked()),
- kapp, SLOT(quit()));
- QObject::connect(btnConfigure, SIGNAL(toggled(bool)),
- this, SLOT(slotConfigure(bool)));
- QObject::connect(btnRecording, SIGNAL(clicked()),
- this, SLOT(slotRecord()));
- QObject::connect(btnSnooze, SIGNAL(toggled(bool)),
- this, SLOT(slotSnooze(bool)));
- QObject::connect(comboStations, SIGNAL(activated(int)),
- this, SLOT(slotComboStationSelected(int)));
- QObject::connect(btnPlugins, SIGNAL(clicked()),
- this, SLOT(slotBtnPluginsClicked()));
+ TQObject::connect(btnPower, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotPower(bool)));
+ TQObject::connect(btnQuit, TQT_SIGNAL(clicked()),
+ kapp, TQT_SLOT(quit()));
+ TQObject::connect(btnConfigure, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotConfigure(bool)));
+ TQObject::connect(btnRecording, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotRecord()));
+ TQObject::connect(btnSnooze, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotSnooze(bool)));
+ TQObject::connect(comboStations, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotComboStationSelected(int)));
+ TQObject::connect(btnPlugins, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotBtnPluginsClicked()));
// tooltips
- QToolTip::add(btnConfigure, i18n("Configure KRadio"));
- QToolTip::add(btnPower, i18n("Power On/Off"));
- QToolTip::add(btnQuit, i18n("Quit KRadio Application"));
- QToolTip::add(btnRecording, i18n("Start/Stop Recording"));
- QToolTip::add(btnSnooze, i18n("Start/Stop Sleep Countdown"));
- QToolTip::add(btnPlugins, i18n("Show/Hide Plugins"));
- QToolTip::add(comboStations, i18n("Select a Radio Station"));
+ TQToolTip::add(btnConfigure, i18n("Configure KRadio"));
+ TQToolTip::add(btnPower, i18n("Power On/Off"));
+ TQToolTip::add(btnQuit, i18n("Quit KRadio Application"));
+ TQToolTip::add(btnRecording, i18n("Start/Stop Recording"));
+ TQToolTip::add(btnSnooze, i18n("Start/Stop Sleep Countdown"));
+ TQToolTip::add(btnPlugins, i18n("Show/Hide Plugins"));
+ TQToolTip::add(comboStations, i18n("Select a Radio Station"));
// testing
- addElement (new RadioViewFrequencyRadio (this, QString::null));
- addElement (new RadioViewVolume(this, QString::null));
- addElement (new RadioViewFrequencySeeker(this, QString::null));
+ addElement (new RadioViewFrequencyRadio (this, TQString()));
+ addElement (new RadioViewVolume(this, TQString()));
+ addElement (new RadioViewFrequencySeeker(this, TQString()));
autoSetCaption();
}
@@ -205,7 +205,7 @@ RadioView::RadioView(const QString &name)
RadioView::~RadioView ()
{
- QPtrListIterator<QObject> it(configPages);
+ TQPtrListIterator<TQObject> it(configPages);
while (configPages.first()) {
delete configPages.first();
}
@@ -223,9 +223,9 @@ bool RadioView::addElement (RadioViewElement *e)
return false;
- e->reparent(this, QPoint(0, 0), true);
- QObject::connect(e, SIGNAL(destroyed(QObject*)),
- this, SLOT(removeElement(QObject*)));
+ e->reparent(this, TQPoint(0, 0), true);
+ TQObject::connect(e, TQT_SIGNAL(destroyed(TQObject*)),
+ this, TQT_SLOT(removeElement(TQObject*)));
elements.append(e);
widgetStacks[cls]->addWidget(e);
@@ -236,9 +236,9 @@ bool RadioView::addElement (RadioViewElement *e)
e->connectI(getSoundStreamServer());
- QPtrListIterator<QObject> it(configPages);
+ TQPtrListIterator<TQObject> it(configPages);
for (; it.current(); ++it) {
- addConfigurationTabFor(e, (QTabWidget *)it.current());
+ addConfigurationTabFor(e, (TQTabWidget *)it.current());
}
selectTopWidgets();
@@ -247,14 +247,14 @@ bool RadioView::addElement (RadioViewElement *e)
}
-bool RadioView::removeElement (QObject *_e)
+bool RadioView::removeElement (TQObject *_e)
{
RadioViewElement *e = dynamic_cast<RadioViewElement*>(_e);
if (!e)
return false;
ElementCfgListIterator it;
- while ((it = elementConfigPages.find(e)) != elementConfigPages.end()) {
+ while ((it = elementConfigPages.tqfind(e)) != elementConfigPages.end()) {
delete (*it).cfg;
// it must not used behind, the element will be deleted automatically
// by slotElementConfigPageDeleted
@@ -266,8 +266,8 @@ bool RadioView::removeElement (QObject *_e)
e->disconnectI(currentDevice);
RadioViewClass cls = e->getClass();
- QObject::disconnect(e, SIGNAL(destroyed(QObject*)),
- this, SLOT(removeElement(QObject*)));
+ TQObject::disconnect(e, TQT_SIGNAL(destroyed(TQObject*)),
+ this, TQT_SLOT(removeElement(TQObject*)));
widgetStacks[cls]->removeWidget(e);
elements.remove(e);
@@ -333,9 +333,9 @@ bool RadioView::noticeStationsChanged(const StationList &sl)
for (RawStationList::Iterator i(list); i.current(); ++i) {
RadioStation *stn = i.current();
- QString icon = stn->iconName();
- if (icon.length() && QFile(icon).exists()) {
- QImage img(icon);
+ TQString icon = stn->iconName();
+ if (icon.length() && TQFile(icon).exists()) {
+ TQImage img(icon);
int h = img.height();
float f = (float)(comboStations->height() - 4) / (h ? (float)h : 1.0);
comboStations->insertItem(img.smoothScale((int)(img.width()*f), (int)(h * f)), stn->name());
@@ -432,14 +432,14 @@ bool RadioView::startRecordingWithFormat(
const SoundFormat &/*proposed_format*/,
SoundFormat &/*real_format*/)
{
- if (!id.isValid() || id != queryCurrentSoundStreamID() || m_StreamID2MenuID.contains(id))
+ if (!id.isValid() || id != queryCurrentSoundStreamID() || m_StreamID2MenuID.tqcontains(id))
return false;
- QString descr;
+ TQString descr;
querySoundStreamDescription(id, descr);
int menu_id = m_NextRecordingMenuID++;
m_RecordingMenu->insertItem(SmallIcon("kradio_record"),
- i18n("Stop Recording of %1").arg(descr),
+ i18n("Stop Recording of %1").tqarg(descr),
menu_id);
m_MenuID2StreamID.insert(menu_id, id);
m_StreamID2MenuID.insert(id, menu_id);
@@ -454,7 +454,7 @@ bool RadioView::startRecordingWithFormat(
bool RadioView::stopRecording (SoundStreamID id)
{
- if (!id.isValid() || !m_StreamID2MenuID.contains(id))
+ if (!id.isValid() || !m_StreamID2MenuID.tqcontains(id))
return false;
int menu_id = m_StreamID2MenuID[id];
@@ -472,12 +472,12 @@ bool RadioView::stopRecording (SoundStreamID id)
bool RadioView::noticeSoundStreamChanged(SoundStreamID id)
{
- if (m_StreamID2MenuID.contains(id)) {
- QString descr;
+ if (m_StreamID2MenuID.tqcontains(id)) {
+ TQString descr;
querySoundStreamDescription(id, descr);
m_RecordingMenu->changeItem(m_StreamID2MenuID[id],
SmallIcon("kradio_record"),
- i18n("Stop Recording of %1").arg(descr));
+ i18n("Stop Recording of %1").tqarg(descr));
return true;
}
return false;
@@ -486,7 +486,7 @@ bool RadioView::noticeSoundStreamChanged(SoundStreamID id)
// ITimeControl
-bool RadioView::noticeCountdownStarted(const QDateTime &)
+bool RadioView::noticeCountdownStarted(const TQDateTime &)
{
btnSnooze->setOn(true);
return true;
@@ -508,7 +508,7 @@ bool RadioView::noticeCountdownZero()
void RadioView::saveState (KConfig *config) const
{
- config->setGroup(QString("radioview-") + name());
+ config->setGroup(TQString("radioview-") + name());
config->writeEntry("enableToobarFlag", enableToolbarFlag);
WidgetPluginBase::saveState(config);
@@ -522,7 +522,7 @@ void RadioView::saveState (KConfig *config) const
void RadioView::restoreState (KConfig *config)
{
- config->setGroup(QString("radioview-") + name());
+ config->setGroup(TQString("radioview-") + name());
enableToolbarFlag = config->readBoolEntry("enableToolbarFlag", false);
WidgetPluginBase::restoreState(config);
@@ -544,9 +544,9 @@ ConfigPageInfo RadioView::createConfigurationPage()
addConfigurationTabFor(i.current(), c);
}
- configPages.append(c);
- QObject::connect(c, SIGNAL(destroyed(QObject *)),
- this, SLOT(slotConfigPageDeleted(QObject *)));
+ configPages.append(TQT_TQOBJECT(c));
+ TQObject::connect(c, TQT_SIGNAL(destroyed(TQObject *)),
+ this, TQT_SLOT(slotConfigPageDeleted(TQObject *)));
return ConfigPageInfo(
c,
@@ -557,7 +557,7 @@ ConfigPageInfo RadioView::createConfigurationPage()
}
-void RadioView::addConfigurationTabFor(RadioViewElement *e, QTabWidget *c)
+void RadioView::addConfigurationTabFor(RadioViewElement *e, TQTabWidget *c)
{
if (!e || !c)
return;
@@ -567,34 +567,34 @@ void RadioView::addConfigurationTabFor(RadioViewElement *e, QTabWidget *c)
if (inf.page) {
if (inf.iconName.length()) {
- c->addTab(inf.page, QIconSet(SmallIconSet(inf.iconName)), inf.itemName);
+ c->addTab(inf.page, TQIconSet(SmallIconSet(inf.iconName)), inf.itemName);
} else {
c->addTab(inf.page, inf.itemName);
}
- elementConfigPages.push_back(ElementCfg(e, inf.page));
- QObject::connect(inf.page, SIGNAL(destroyed(QObject *)),
- this, SLOT(slotElementConfigPageDeleted(QObject *)));
+ elementConfigPages.push_back(ElementCfg(e, TQT_TQOBJECT(inf.page)));
+ TQObject::connect(inf.page, TQT_SIGNAL(destroyed(TQObject *)),
+ this, TQT_SLOT(slotElementConfigPageDeleted(TQObject *)));
}
}
-void RadioView::addCommonConfigurationTab(QTabWidget *c)
+void RadioView::addCommonConfigurationTab(TQTabWidget *c)
{
if (!c)
return;
- QFrame *f = new QFrame(c);
- QVBoxLayout *l = new QVBoxLayout(f, 10);
+ TQFrame *f = new TQFrame(c);
+ TQVBoxLayout *l = new TQVBoxLayout(f, 10);
- l->addWidget(new QCheckBox(i18n("set Toolbar-Flag for Display"), f));
- l->addItem(new QSpacerItem(1, 3, QSizePolicy::Fixed, QSizePolicy::Expanding));
+ l->addWidget(new TQCheckBox(i18n("set Toolbar-Flag for Display"), f));
+ l->addItem(new TQSpacerItem(1, 3, TQSizePolicy::Fixed, TQSizePolicy::Expanding));
c->addTab(f, i18n("Common"));
- elementConfigPages.push_back(ElementCfg(f));
- QObject::connect(f, SIGNAL(destroyed(QObject *)),
- this, SLOT(slotElementConfigPageDeleted(QObject *)));
+ elementConfigPages.push_back(ElementCfg(TQT_TQOBJECT(f)));
+ TQObject::connect(f, TQT_SIGNAL(destroyed(TQObject *)),
+ this, TQT_SLOT(slotElementConfigPageDeleted(TQObject *)));
}
@@ -632,7 +632,7 @@ void RadioView::noticeWidgetPluginShown(WidgetPluginBase *p, bool shown)
btnConfigure->blockSignals(false);
}
- if (m_Plugins2MenuID.contains(p)) {
+ if (m_Plugins2MenuID.tqcontains(p)) {
m_manager->updateWidgetPluginMenuItem(p, m_PluginMenu, m_Plugins2MenuID, shown);
}
}
@@ -666,7 +666,7 @@ void RadioView::slotPause()
void RadioView::slotConfigure(bool b)
{
- QWidget *w = m_manager ? m_manager->getConfigDialog() : NULL;
+ TQWidget *w = m_manager ? m_manager->getConfigDialog() : NULL;
if (w) b ? w->show() : w->hide();
if (!w)
btnConfigure->setOn(false);
@@ -682,7 +682,7 @@ void RadioView::slotRecord()
SoundFormat sf;
queryIsRecordingRunning(id, r, sf);
- if (!r && b /*!m_StreamID2MenuID.contains(id)*/) {
+ if (!r && b /*!m_StreamID2MenuID.tqcontains(id)*/) {
if (!queryIsPowerOn())
sendPowerOn();
sendStartRecording(id);
@@ -704,7 +704,7 @@ void RadioView::slotRecordingMenu(int i)
sendPowerOn();
sendStartRecording(id);
}
- } else if (m_MenuID2StreamID.contains(i)) {
+ } else if (m_MenuID2StreamID.tqcontains(i)) {
sendStopRecording(m_MenuID2StreamID[i]);
}
}
@@ -740,16 +740,16 @@ void RadioView::slotBtnPluginsClicked()
btnPlugins->openPopup();
}
-void RadioView::slotConfigPageDeleted(QObject *o)
+void RadioView::slotConfigPageDeleted(TQObject *o)
{
configPages.remove(o);
}
-void RadioView::slotElementConfigPageDeleted(QObject *o)
+void RadioView::slotElementConfigPageDeleted(TQObject *o)
{
ElementCfgListIterator it;
- while ((it = elementConfigPages.find(o)) != elementConfigPages.end()) {
+ while ((it = elementConfigPages.tqfind(o)) != elementConfigPages.end()) {
elementConfigPages.remove(it);
}
}
@@ -762,14 +762,14 @@ void RadioView::show()
else
KWin::setType(winId(), NET::Normal);
WidgetPluginBase::pShow();
- QWidget::show();
+ TQWidget::show();
}
void RadioView::showOnOrgDesktop()
{
WidgetPluginBase::pShowOnOrgDesktop();
- //QWidget::show();
+ //TQWidget::show();
}
@@ -777,20 +777,20 @@ void RadioView::showOnOrgDesktop()
void RadioView::hide()
{
WidgetPluginBase::pHide();
- QWidget::hide();
+ TQWidget::hide();
}
-void RadioView::showEvent(QShowEvent *e)
+void RadioView::showEvent(TQShowEvent *e)
{
- QWidget::showEvent(e);
+ TQWidget::showEvent(e);
WidgetPluginBase::pShowEvent(e);
}
-void RadioView::hideEvent(QHideEvent *e)
+void RadioView::hideEvent(TQHideEvent *e)
{
- QWidget::hideEvent(e);
+ TQWidget::hideEvent(e);
WidgetPluginBase::pHideEvent(e);
}
@@ -798,7 +798,7 @@ void RadioView::hideEvent(QHideEvent *e)
void RadioView::autoSetCaption()
{
const RadioStation &rs = queryCurrentStation();
- setCaption((queryIsPowerOn() && rs.isValid()) ? rs.longName() : QString("KRadio"));
+ setCaption((queryIsPowerOn() && rs.isValid()) ? rs.longName() : TQString("KRadio"));
}
diff --git a/kradio3/plugins/gui-standard-display/radioview.h b/kradio3/plugins/gui-standard-display/radioview.h
index 6cddc26..c884099 100644
--- a/kradio3/plugins/gui-standard-display/radioview.h
+++ b/kradio3/plugins/gui-standard-display/radioview.h
@@ -22,7 +22,7 @@
#include <config.h>
#endif
-#include <qobjectlist.h>
+#include <tqobjectlist.h>
#include "../../src/include/radio_interfaces.h"
#include "../../src/include/radiodevicepool_interfaces.h"
@@ -31,15 +31,15 @@
#include "../../src/include/widgetplugins.h"
#include "radioview_element.h"
-class QWidgetStack;
-class QToolButton;
+class TQWidgetStack;
+class TQToolButton;
class KComboBox;
-class QTabWidget;
+class TQTabWidget;
class KPopupMenu;
-class RadioView : public QWidget,
+class RadioView : public TQWidget,
public WidgetPluginBase,
public IRadioClient,
public IRadioDevicePoolClient,
@@ -47,15 +47,16 @@ class RadioView : public QWidget,
public ITimeControlClient
{
Q_OBJECT
+ TQ_OBJECT
public:
- RadioView(const QString &name);
+ RadioView(const TQString &name);
virtual ~RadioView();
- virtual QString pluginClassName() const { return "RadioView"; }
+ virtual TQString pluginClassName() const { return "RadioView"; }
- const QString &name() const { return PluginBase::name(); }
- QString &name() { return PluginBase::name(); }
+ const TQString &name() const { return PluginBase::name(); }
+ TQString &name() { return PluginBase::name(); }
// WidgetPluginBase
@@ -75,7 +76,7 @@ public:
public slots:
// connects destroy-msg with remove-function
bool addElement (RadioViewElement *);
- bool removeElement (QObject *);
+ bool removeElement (TQObject *);
protected:
void selectTopWidgets();
@@ -87,7 +88,7 @@ RECEIVERS:
bool noticePowerChanged(bool on);
bool noticeStationChanged (const RadioStation &, int idx);
bool noticeStationsChanged(const StationList &sl);
- bool noticePresetFileChanged(const QString &/*f*/) { return false; }
+ bool noticePresetFileChanged(const TQString &/*f*/) { return false; }
bool noticeCurrentSoundStreamIDChanged(SoundStreamID id);
@@ -95,8 +96,8 @@ RECEIVERS:
RECEIVERS:
bool noticeActiveDeviceChanged(IRadioDevice *rd);
- bool noticeDevicesChanged(const QPtrList<IRadioDevice> &) { return false; }
- bool noticeDeviceDescriptionChanged(const QString &) { return false; }
+ bool noticeDevicesChanged(const TQPtrList<IRadioDevice> &) { return false; }
+ bool noticeDeviceDescriptionChanged(const TQString &) { return false; }
// ISoundStreamClient
@@ -116,7 +117,7 @@ RECEIVERS:
bool noticeAlarmsChanged(const AlarmVector &) { return false; }
bool noticeAlarm(const Alarm &) { return false; }
bool noticeNextAlarmChanged(const Alarm *) { return false; }
- bool noticeCountdownStarted(const QDateTime &end);
+ bool noticeCountdownStarted(const TQDateTime &end);
bool noticeCountdownStopped();
bool noticeCountdownZero();
bool noticeCountdownSecondsChanged(int) { return false; }
@@ -133,8 +134,8 @@ protected slots:
void slotBtnPluginsClicked();
void slotComboStationSelected(int);
- void slotConfigPageDeleted(QObject*);
- void slotElementConfigPageDeleted(QObject*);
+ void slotConfigPageDeleted(TQObject*);
+ void slotElementConfigPageDeleted(TQObject*);
public slots:
@@ -144,48 +145,48 @@ public slots:
void hide();
protected:
- virtual void showEvent(QShowEvent *);
- virtual void hideEvent(QHideEvent *);
+ virtual void showEvent(TQShowEvent *);
+ virtual void hideEvent(TQHideEvent *);
virtual void autoSetCaption();
- const QWidget *getWidget() const { return this; }
- QWidget *getWidget() { return this; }
+ const TQWidget *getWidget() const { return this; }
+ TQWidget *getWidget() { return this; }
- void addConfigurationTabFor(RadioViewElement *, QTabWidget *);
- void addCommonConfigurationTab(QTabWidget *);
+ void addConfigurationTabFor(RadioViewElement *, TQTabWidget *);
+ void addCommonConfigurationTab(TQTabWidget *);
protected:
bool enableToolbarFlag;
- QToolButton *btnPower;
- QToolButton *btnConfigure;
- QToolButton *btnQuit;
- QToolButton *btnRecording;
- QToolButton *btnSnooze;
- QToolButton *btnPlugins;
+ TQToolButton *btnPower;
+ TQToolButton *btnConfigure;
+ TQToolButton *btnQuit;
+ TQToolButton *btnRecording;
+ TQToolButton *btnSnooze;
+ TQToolButton *btnPlugins;
KComboBox *comboStations;
struct ElementCfg
{
RadioViewElement *element;
- QObject *cfg;
+ TQObject *cfg;
ElementCfg() : element(NULL), cfg(NULL) {}
- ElementCfg(RadioViewElement *e, QObject *w) : element(e), cfg(w) {}
+ ElementCfg(RadioViewElement *e, TQObject *w) : element(e), cfg(w) {}
ElementCfg(RadioViewElement *e) : element(e), cfg(NULL) {}
- ElementCfg(QObject *w) : element(NULL), cfg(w) {}
+ ElementCfg(TQObject *w) : element(NULL), cfg(w) {}
bool operator == (const ElementCfg &x) const;
};
- typedef QPtrList<RadioViewElement> ElementList;
- typedef QPtrListIterator<RadioViewElement> ElementListIterator;
- typedef QValueList<ElementCfg> ElementCfgList;
- typedef QValueListIterator<ElementCfg> ElementCfgListIterator;
+ typedef TQPtrList<RadioViewElement> ElementList;
+ typedef TQPtrListIterator<RadioViewElement> ElementListIterator;
+ typedef TQValueList<ElementCfg> ElementCfgList;
+ typedef TQValueListIterator<ElementCfg> ElementCfgListIterator;
ElementList elements;
ElementCfgList elementConfigPages;
- QObjectList configPages;
- QWidgetStack * widgetStacks[clsClassMAX];
+ TQObjectList configPages;
+ TQWidgetStack * widgetStacks[clsClassMAX];
float maxUsability[clsClassMAX];
IRadioDevice *currentDevice;
@@ -194,11 +195,11 @@ protected:
KPopupMenu *m_pauseMenu;
KPopupMenu *m_SnoozeMenu;
int m_NextRecordingMenuID;
- QMap<int, SoundStreamID> m_MenuID2StreamID;
- QMap<SoundStreamID, int> m_StreamID2MenuID;
+ TQMap<int, SoundStreamID> m_MenuID2StreamID;
+ TQMap<SoundStreamID, int> m_StreamID2MenuID;
KPopupMenu *m_PluginMenu;
- QMap<WidgetPluginBase *, int> m_Plugins2MenuID;
+ TQMap<WidgetPluginBase *, int> m_Plugins2MenuID;
};
diff --git a/kradio3/plugins/gui-standard-display/radioview_element.cpp b/kradio3/plugins/gui-standard-display/radioview_element.cpp
index 9c3396f..0ba5ba7 100644
--- a/kradio3/plugins/gui-standard-display/radioview_element.cpp
+++ b/kradio3/plugins/gui-standard-display/radioview_element.cpp
@@ -17,7 +17,7 @@
#include "radioview_element.h"
-RadioViewElement::RadioViewElement (QWidget * /*parent*/, const QString & /*name*/,
+RadioViewElement::RadioViewElement (TQWidget * /*tqparent*/, const TQString & /*name*/,
RadioViewClass cls)
: myClass(cls)
{
diff --git a/kradio3/plugins/gui-standard-display/radioview_element.h b/kradio3/plugins/gui-standard-display/radioview_element.h
index 11c77ac..a354b82 100644
--- a/kradio3/plugins/gui-standard-display/radioview_element.h
+++ b/kradio3/plugins/gui-standard-display/radioview_element.h
@@ -22,7 +22,7 @@
#include <config.h>
#endif
-#include <qframe.h>
+#include <tqframe.h>
#include "../../src/include/interfaces.h"
#include "../../src/include/plugins.h"
@@ -34,12 +34,13 @@ enum RadioViewClass { clsRadioSound = 0,
// Defaults to an empty element
-class RadioViewElement : public QFrame,
+class RadioViewElement : public TQFrame,
public virtual Interface
{
Q_OBJECT
+ TQ_OBJECT
public:
- RadioViewElement (QWidget *parent, const QString &name, RadioViewClass myClass);
+ RadioViewElement (TQWidget *tqparent, const TQString &name, RadioViewClass myClass);
virtual ~RadioViewElement();
bool connectI (Interface *) { return false; } // default behaviour, please overwrite in derived class
diff --git a/kradio3/plugins/gui-standard-display/radioview_frequencyradio.cpp b/kradio3/plugins/gui-standard-display/radioview_frequencyradio.cpp
index 8c6d15d..53f3a37 100644
--- a/kradio3/plugins/gui-standard-display/radioview_frequencyradio.cpp
+++ b/kradio3/plugins/gui-standard-display/radioview_frequencyradio.cpp
@@ -17,16 +17,16 @@
#include "../../src/include/utils.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 "radioview_frequencyradio.h"
#include "displaycfg.h"
-RadioViewFrequencyRadio::RadioViewFrequencyRadio(QWidget *parent, const QString &name )
- : RadioViewElement(parent, name, clsRadioDisplay),
+RadioViewFrequencyRadio::RadioViewFrequencyRadio(TQWidget *tqparent, const TQString &name )
+ : RadioViewElement(tqparent, name, clsRadioDisplay),
m_power(false),
m_valid(false),
m_frequency(0),
@@ -40,10 +40,10 @@ RadioViewFrequencyRadio::RadioViewFrequencyRadio(QWidget *parent, const QString
// set some sensless default colors
// real values are read in restoreState
- setDisplayColors(QColor(20, 244, 20),
- QColor(10, 117, 10).light(75),
- QColor(10, 117, 10));
- setDisplayFont(QFont("Helvetica"));
+ setDisplayColors(TQColor(20, 244, 20),
+ TQColor(10, 117, 10).light(75),
+ TQColor(10, 117, 10));
+ setDisplayFont(TQFont("Helvetica"));
}
@@ -72,12 +72,12 @@ void RadioViewFrequencyRadio::saveState (KConfig *config) const
void RadioViewFrequencyRadio::restoreState (KConfig *config)
{
- QColor defaultActive (20, 244, 20),
- defaultInactive(QColor(10, 117, 10).light(75)),
+ TQColor defaultActive (20, 244, 20),
+ defaultInactive(TQColor(10, 117, 10).light(75)),
defaultButton (10, 117, 10);
- QFont defaultFont ("Helvetica");
- QColor a, b, c;
- QFont f;
+ TQFont defaultFont ("Helvetica");
+ TQColor a, b, c;
+ TQFont f;
a = config->readColorEntry ("frequency-view-colorActiveText",
&defaultActive);
b = config->readColorEntry ("frequency-view-colorInactiveText",
@@ -98,7 +98,7 @@ ConfigPageInfo RadioViewFrequencyRadio::createConfigurationPage()
return ConfigPageInfo (a,
i18n("Frequency Display"),
i18n("Frequency Display"),
- QString::null
+ TQString()
);
}
@@ -144,9 +144,9 @@ void RadioViewFrequencyRadio::noticeConnectedI (ISoundStreamServer *s, bool poin
// IDisplayCfg
-bool RadioViewFrequencyRadio::setDisplayColors(const QColor &activeText,
- const QColor &inactiveText,
- const QColor &button)
+bool RadioViewFrequencyRadio::setDisplayColors(const TQColor &activeText,
+ const TQColor &inactiveText,
+ const TQColor &button)
{
bool change = (activeText != m_colorActiveText || inactiveText != m_colorInactiveText || button != m_colorButton);
@@ -154,18 +154,18 @@ bool RadioViewFrequencyRadio::setDisplayColors(const QColor &activeText,
m_colorInactiveText = inactiveText;
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);
@@ -177,19 +177,19 @@ bool RadioViewFrequencyRadio::setDisplayColors(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));
}
if (change)
@@ -197,7 +197,7 @@ bool RadioViewFrequencyRadio::setDisplayColors(const QColor &activeText,
return true;
}
-bool RadioViewFrequencyRadio::setDisplayFont (const QFont &f)
+bool RadioViewFrequencyRadio::setDisplayFont (const TQFont &f)
{
if (m_font != f) {
m_font = f;
@@ -222,7 +222,7 @@ bool RadioViewFrequencyRadio::noticePowerChanged (bool on, const IRadioDevice */
queryIsStereo(ssid, s);
noticeStereoChanged(ssid, s);
- repaint();
+ tqrepaint();
return true;
}
@@ -233,7 +233,7 @@ bool RadioViewFrequencyRadio::noticeStationChanged (const RadioStation &, const
}
-bool RadioViewFrequencyRadio::noticeDescriptionChanged (const QString &, const IRadioDevice */*sender*/)
+bool RadioViewFrequencyRadio::noticeDescriptionChanged (const TQString &, const IRadioDevice */*sender*/)
{
return false; // we don't care
}
@@ -246,7 +246,7 @@ bool RadioViewFrequencyRadio::noticeSignalQualityChanged(SoundStreamID id, float
if (queryCurrentSoundStreamID() != id)
return false;
m_quality = q;
- repaint ();
+ tqrepaint ();
return true;
}
@@ -256,7 +256,7 @@ bool RadioViewFrequencyRadio::noticeStereoChanged(SoundStreamID id, bool s)
if (queryCurrentSoundStreamID() != id)
return false;
m_stereo = s;
- repaint ();
+ tqrepaint ();
return true;
}
@@ -269,7 +269,7 @@ bool RadioViewFrequencyRadio::noticeStereoChanged(SoundStreamID id, bool s)
bool RadioViewFrequencyRadio::noticeFrequencyChanged(float f, const RadioStation *)
{
m_frequency = f;
- repaint ();
+ tqrepaint ();
return true;
}
@@ -293,17 +293,17 @@ bool RadioViewFrequencyRadio::noticeScanStepChanged(float /*s*/)
-void RadioViewFrequencyRadio::drawContents(QPainter *paint)
+void RadioViewFrequencyRadio::drawContents(TQPainter *paint)
{
if (!paint) return;
- QRect r = contentsRect();
+ TQRect r = contentsRect();
- int margin = QMAX(4, QMIN(r.width() / 50, r.height() / 50)),
- tmp = QMIN(r.height(), (r.width() - 2*margin) / 4),
- xd_st = QMIN((r.height() - margin * 2) / 3, tmp/3),
- xw = QMIN(tmp / 2, xd_st * 3 / 2),
- penw = QMAX(1, xw / 25),
+ int margin = TQMAX(4, TQMIN(r.width() / 50, r.height() / 50)),
+ tmp = TQMIN(r.height(), (r.width() - 2*margin) / 4),
+ xd_st = TQMIN((r.height() - margin * 2) / 3, tmp/3),
+ xw = TQMIN(tmp / 2, xd_st * 3 / 2),
+ penw = TQMAX(1, xw / 25),
xh_st = xd_st,
xx_st = r.x() + margin + xw + 2 * margin + penw/2,
xy_st = r.y() + margin + penw/2,
@@ -320,10 +320,10 @@ void RadioViewFrequencyRadio::drawContents(QPainter *paint)
xx_sg = r.x() + margin,
xy_sg = r.y() + margin;
- QPen activePen (colorGroup().color(QColorGroup::Text), penw);
- QPen inactivePen (colorGroup().color(QColorGroup::Mid), penw);
- QBrush activeBrush = colorGroup().brush(QColorGroup::Text);
- QBrush inactiveBrush = colorGroup().brush(QColorGroup::Mid);
+ TQPen activePen (tqcolorGroup().color(TQColorGroup::Text), penw);
+ TQPen inactivePen (tqcolorGroup().color(TQColorGroup::Mid), penw);
+ TQBrush activeBrush = tqcolorGroup().brush(TQColorGroup::Text);
+ TQBrush inactiveBrush = tqcolorGroup().brush(TQColorGroup::Mid);
// draw stereo symbol
paint->setPen( (m_stereo && m_power) ? activePen : inactivePen);
@@ -367,11 +367,11 @@ void RadioViewFrequencyRadio::drawContents(QPainter *paint)
);
// triangle
- QPen tmppen = (m_quality > 0.1 && m_power) ? activePen : inactivePen;
+ TQPen tmppen = (m_quality > 0.1 && m_power) ? activePen : inactivePen;
tmppen.setWidth(1);
paint->setPen(tmppen);
paint->setBrush( (m_quality > 0.1 && m_power) ? activeBrush : inactiveBrush);
- QPointArray pts(3);
+ TQPointArray pts(3);
pts.setPoint(0, (int)(xx_sg + xw / 4), (int)(xy_sg + xh_sg - penw/2));
pts.setPoint(1, (int)(xx_sg + xw *3/4), (int)(xy_sg + xh_sg - penw/2));
pts.setPoint(2, (int)(xx_sg + xw / 2), (int)(xy_sg + xw/2 + penw));
@@ -381,31 +381,31 @@ void RadioViewFrequencyRadio::drawContents(QPainter *paint)
// AM/FM display
- QFont f = m_font;
+ TQFont f = m_font;
paint->setPen ( (m_frequency <= 10 && m_power) ? activePen : inactivePen);
f.setPixelSize(xh_am);
paint->setFont(f);
paint->drawText(xx_am, xy_am + xh_am - 1, i18n("AM"));
- int xw_am = QFontMetrics(f).width(i18n("AM"));
+ int xw_am = TQFontMetrics(f).width(i18n("AM"));
paint->setPen ( (m_frequency > 10 && m_power) ? activePen : inactivePen);
f.setPixelSize(xh_fm);
paint->setFont(f);
paint->drawText(xx_fm, xy_fm + xh_fm - 1, i18n("FM"));
- int xw_fm = QFontMetrics(f).width(i18n("FM"));
+ int xw_fm = TQFontMetrics(f).width(i18n("FM"));
- int xx_f = QMAX(xx_fm + xw_fm, QMAX(xw_am + xx_am, QMAX(xx_st + xw, xw + xx_sg))) + margin,
+ int xx_f = TQMAX(xx_fm + xw_fm, TQMAX(xw_am + xx_am, TQMAX(xx_st + xw, xw + xx_sg))) + margin,
xy_f = r.y() + margin,
xw_f = r.right() - margin - xx_f + 1,
xh_f = r.bottom() - margin - xy_f + 1;
// Frequency Display
- QString s;
+ TQString s;
if (m_frequency < 10) {
- s = i18n("%1 kHz").arg(KGlobal::locale()->formatNumber((int)(m_frequency * 1000), 0));
+ s = i18n("%1 kHz").tqarg(KGlobal::locale()->formatNumber((int)(m_frequency * 1000), 0));
} else {
- s = i18n("%1 MHz").arg(KGlobal::locale()->formatNumber(m_frequency, 2));
+ s = i18n("%1 MHz").tqarg(KGlobal::locale()->formatNumber(m_frequency, 2));
}
float pxs = xh_f;
@@ -413,16 +413,16 @@ void RadioViewFrequencyRadio::drawContents(QPainter *paint)
f.setPixelSize((int)pxs);
int n = 30;
while (1) {
- QFontMetrics fm(f);
- int sw = fm.boundingRect(xx_f, xy_f, xw_f, xh_f, Qt::AlignRight | Qt::AlignVCenter, s).width();
+ TQFontMetrics fm(f);
+ int sw = fm.boundingRect(xx_f, xy_f, xw_f, xh_f, TQt::AlignRight | TQt::AlignVCenter, s).width();
if (sw <= xw_f || --n <= 0) break;
float fact = (float)xw_f / (float)sw;
- pxs = QMIN(pxs - 1, pxs * fact);
- f.setPixelSize(QMAX(1,(int)pxs));
+ pxs = TQMIN(pxs - 1, pxs * fact);
+ f.setPixelSize(TQMAX(1,(int)pxs));
}
paint->setFont(f);
- paint->drawText(xx_f, xy_f, xw_f, xh_f, Qt::AlignRight | Qt::AlignVCenter, s);
+ paint->drawText(xx_f, xy_f, xw_f, xh_f, TQt::AlignRight | TQt::AlignVCenter, s);
}
@@ -430,9 +430,9 @@ void RadioViewFrequencyRadio::drawContents(QPainter *paint)
-void RadioViewFrequencyRadio::reparent (QWidget *prnt,
+void RadioViewFrequencyRadio::reparent (TQWidget *prnt,
WFlags f,
- const QPoint &p,
+ const TQPoint &p,
bool showIt)
{
RadioViewElement::reparent(prnt, f, p, showIt);
diff --git a/kradio3/plugins/gui-standard-display/radioview_frequencyradio.h b/kradio3/plugins/gui-standard-display/radioview_frequencyradio.h
index 795eae1..d89ce44 100644
--- a/kradio3/plugins/gui-standard-display/radioview_frequencyradio.h
+++ b/kradio3/plugins/gui-standard-display/radioview_frequencyradio.h
@@ -27,15 +27,16 @@
*@author Martin Witte
*/
-class RadioViewFrequencyRadio : public RadioViewElement, // is a QObject, must be first
+class RadioViewFrequencyRadio : public RadioViewElement, // is a TQObject, must be first
public IRadioDeviceClient,
public IFrequencyRadioClient,
public ISoundStreamClient,
public IDisplayCfg
{
Q_OBJECT
+ TQ_OBJECT
public:
- RadioViewFrequencyRadio(QWidget *parent, const QString &name);
+ RadioViewFrequencyRadio(TQWidget *tqparent, const TQString &name);
~RadioViewFrequencyRadio();
float getUsability (Interface *) const;
@@ -53,20 +54,20 @@ public:
// IDisplayCfg
RECEIVERS:
- bool setDisplayColors(const QColor &activeColor, const QColor &inactiveColor, const QColor &bkgnd);
- bool setDisplayFont (const QFont &f);
+ bool setDisplayColors(const TQColor &activeColor, const TQColor &inactiveColor, const TQColor &bkgnd);
+ bool setDisplayFont (const TQFont &f);
ANSWERS:
- const QColor &getDisplayActiveColor() const { return m_colorActiveText; }
- const QColor &getDisplayInactiveColor() const { return m_colorInactiveText; }
- const QColor &getDisplayBkgndColor() const { return m_colorButton; }
- const QFont &getDisplayFont() const { return m_font; }
+ const TQColor &getDisplayActiveColor() const { return m_colorActiveText; }
+ const TQColor &getDisplayInactiveColor() const { return m_colorInactiveText; }
+ const TQColor &getDisplayBkgndColor() const { return m_colorButton; }
+ const TQFont &getDisplayFont() const { return m_font; }
// IRadioDeviceClient
RECEIVERS:
bool noticePowerChanged (bool on, const IRadioDevice *sender = NULL);
bool noticeStationChanged (const RadioStation &, const IRadioDevice *sender = NULL);
- bool noticeDescriptionChanged (const QString &, const IRadioDevice *sender = NULL);
+ bool noticeDescriptionChanged (const TQString &, const IRadioDevice *sender = NULL);
bool noticeCurrentSoundStreamIDChanged(SoundStreamID /*id*/, const IRadioDevice */*sender*/) { return false; }
// ISoundStreamClient
@@ -87,16 +88,16 @@ RECEIVERS:
public:
- void reparent (QWidget *parent, WFlags f, const QPoint &p, bool showIt = FALSE);
+ void reparent (TQWidget *tqparent, WFlags f, const TQPoint &p, bool showIt = FALSE);
protected:
- void drawContents(QPainter *p);
+ void drawContents(TQPainter *p);
protected:
- QColor m_colorActiveText, m_colorInactiveText, m_colorButton;
- QFont m_font;
+ TQColor m_colorActiveText, m_colorInactiveText, m_colorButton;
+ TQFont m_font;
bool m_power;
bool m_valid;
diff --git a/kradio3/plugins/gui-standard-display/radioview_frequencyseeker.cpp b/kradio3/plugins/gui-standard-display/radioview_frequencyseeker.cpp
index 938939a..f29f1dd 100644
--- a/kradio3/plugins/gui-standard-display/radioview_frequencyseeker.cpp
+++ b/kradio3/plugins/gui-standard-display/radioview_frequencyseeker.cpp
@@ -16,19 +16,19 @@
***************************************************************************/
#include <math.h>
-#include <qlayout.h>
-#include <qslider.h>
-#include <qtoolbutton.h>
-#include <qaccel.h>
-#include <qtooltip.h>
+#include <tqlayout.h>
+#include <tqslider.h>
+#include <tqtoolbutton.h>
+#include <tqaccel.h>
+#include <tqtooltip.h>
#include <kiconloader.h>
#include <klocale.h>
#include "radioview_frequencyseeker.h"
-RadioViewFrequencySeeker::RadioViewFrequencySeeker(QWidget *parent, const QString &name)
- : RadioViewElement(parent, name, clsRadioSeek),
+RadioViewFrequencySeeker::RadioViewFrequencySeeker(TQWidget *tqparent, const TQString &name)
+ : RadioViewElement(tqparent, name, clsRadioSeek),
m_btnSearchLeft(NULL),
m_btnStepLeft(NULL),
m_btnStepRight(NULL),
@@ -36,14 +36,14 @@ RadioViewFrequencySeeker::RadioViewFrequencySeeker(QWidget *parent, const QStrin
m_sldFrequency(NULL),
m_ignoreChanges(false)
{
- QBoxLayout *l = new QBoxLayout(this, QBoxLayout::LeftToRight, /*spacing=*/ 3);
+ TQBoxLayout *l = new TQBoxLayout(this, TQBoxLayout::LeftToRight, /*spacing=*/ 3);
l->setMargin(0);
- m_sldFrequency = new QSlider(Qt::Horizontal, this);
- m_btnSearchLeft = new QToolButton(this);
- m_btnSearchRight = new QToolButton(this);
- m_btnStepLeft = new QToolButton(this);
- m_btnStepRight = new QToolButton(this);
+ m_sldFrequency = new TQSlider(Qt::Horizontal, this);
+ m_btnSearchLeft = new TQToolButton(this);
+ m_btnSearchRight = new TQToolButton(this);
+ m_btnStepLeft = new TQToolButton(this);
+ m_btnStepRight = new TQToolButton(this);
m_btnSearchLeft ->setToggleButton(true);
m_btnSearchRight->setToggleButton(true);
@@ -60,32 +60,32 @@ RadioViewFrequencySeeker::RadioViewFrequencySeeker(QWidget *parent, const QStrin
l->addWidget (m_btnStepRight);
l->addWidget (m_btnSearchRight);
- QObject::connect(m_sldFrequency, SIGNAL(valueChanged(int)),
- this, SLOT(slotSliderChanged(int)));
- QObject::connect(m_btnSearchLeft, SIGNAL(toggled(bool)),
- this, SLOT(slotSearchLeft(bool)));
- QObject::connect(m_btnSearchRight, SIGNAL(toggled(bool)),
- this, SLOT(slotSearchRight(bool)));
- QObject::connect(m_btnStepLeft, SIGNAL(clicked()),
- m_sldFrequency, SLOT(subtractStep()));
- QObject::connect(m_btnStepRight, SIGNAL(clicked()),
- m_sldFrequency, SLOT(addStep()));
+ TQObject::connect(m_sldFrequency, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(slotSliderChanged(int)));
+ TQObject::connect(m_btnSearchLeft, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotSearchLeft(bool)));
+ TQObject::connect(m_btnSearchRight, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotSearchRight(bool)));
+ TQObject::connect(m_btnStepLeft, TQT_SIGNAL(clicked()),
+ m_sldFrequency, TQT_SLOT(subtractStep()));
+ TQObject::connect(m_btnStepRight, TQT_SIGNAL(clicked()),
+ m_sldFrequency, TQT_SLOT(addStep()));
// Tooltips
- QToolTip::add(m_btnSearchLeft, i18n("Search for previous Radio Station"));
- QToolTip::add(m_btnSearchRight, i18n("Search for next Radio Station"));
- QToolTip::add(m_btnStepLeft, i18n("Decrement Frequency"));
- QToolTip::add(m_btnStepRight, i18n("Increment Frequency"));
- QToolTip::add(m_sldFrequency, i18n("Change Frequency"));
+ TQToolTip::add(m_btnSearchLeft, i18n("Search for previous Radio Station"));
+ TQToolTip::add(m_btnSearchRight, i18n("Search for next Radio Station"));
+ TQToolTip::add(m_btnStepLeft, i18n("Decrement Frequency"));
+ TQToolTip::add(m_btnStepRight, i18n("Increment Frequency"));
+ TQToolTip::add(m_sldFrequency, i18n("Change Frequency"));
// Accelerators
- QAccel *Accel = new QAccel (this);
+ TQAccel *Accel = new TQAccel (this);
Accel->insertItem (Key_Left, 100);
Accel->insertItem (Key_Right, 101);
- Accel->connectItem (100, m_sldFrequency, SLOT(subtractStep()));
- Accel->connectItem (101, m_sldFrequency, SLOT(addStep()));
+ Accel->connectItem (100, m_sldFrequency, TQT_SLOT(subtractStep()));
+ Accel->connectItem (101, m_sldFrequency, TQT_SLOT(addStep()));
}
diff --git a/kradio3/plugins/gui-standard-display/radioview_frequencyseeker.h b/kradio3/plugins/gui-standard-display/radioview_frequencyseeker.h
index 12ca7d4..1580464 100644
--- a/kradio3/plugins/gui-standard-display/radioview_frequencyseeker.h
+++ b/kradio3/plugins/gui-standard-display/radioview_frequencyseeker.h
@@ -21,16 +21,17 @@
#include "../../src/include/radiodevice_interfaces.h"
#include "radioview_element.h"
-class QToolButton;
-class QSlider;
+class TQToolButton;
+class TQSlider;
-class RadioViewFrequencySeeker : public RadioViewElement, // is a QObject, must be first
+class RadioViewFrequencySeeker : public RadioViewElement, // is a TQObject, must be first
public ISeekRadioClient,
public IFrequencyRadioClient
{
Q_OBJECT
+ TQ_OBJECT
public:
- RadioViewFrequencySeeker(QWidget *parent, const QString &name);
+ RadioViewFrequencySeeker(TQWidget *tqparent, const TQString &name);
~RadioViewFrequencySeeker();
float getUsability(Interface *) const;
@@ -64,11 +65,11 @@ protected slots:
protected:
- QToolButton *m_btnSearchLeft,
+ TQToolButton *m_btnSearchLeft,
*m_btnStepLeft,
*m_btnStepRight,
*m_btnSearchRight;
- QSlider *m_sldFrequency;
+ TQSlider *m_sldFrequency;
bool m_ignoreChanges;
};
diff --git a/kradio3/plugins/gui-standard-display/radioview_seekinterface.ui b/kradio3/plugins/gui-standard-display/radioview_seekinterface.ui
index f4fc98c..0b15331 100644
--- a/kradio3/plugins/gui-standard-display/radioview_seekinterface.ui
+++ b/kradio3/plugins/gui-standard-display/radioview_seekinterface.ui
@@ -1,7 +1,7 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>RadioView_SeekerUI</class>
<author>Ernst Martin Witte</author>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>RadioView_SeekerUI</cstring>
</property>
@@ -20,7 +20,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QToolButton" row="0" column="0">
+ <widget class="TQToolButton" row="0" column="0">
<property name="name">
<cstring>btnSearchDown</cstring>
</property>
@@ -45,7 +45,7 @@
<string>search previous station</string>
</property>
</widget>
- <widget class="QToolButton" row="0" column="1">
+ <widget class="TQToolButton" row="0" column="1">
<property name="name">
<cstring>btnStepDown</cstring>
</property>
@@ -73,7 +73,7 @@
<string>decrease freq. by 0.05 MHz</string>
</property>
</widget>
- <widget class="QSlider" row="0" column="2">
+ <widget class="TQSlider" row="0" column="2">
<property name="name">
<cstring>sldRange</cstring>
</property>
@@ -109,7 +109,7 @@
<comment>Frequency</comment>
</property>
</widget>
- <widget class="QToolButton" row="0" column="3">
+ <widget class="TQToolButton" row="0" column="3">
<property name="name">
<cstring>btnStepUp</cstring>
</property>
@@ -129,7 +129,7 @@
<string>increase freq. by 0.05 MHz</string>
</property>
</widget>
- <widget class="QToolButton" row="0" column="4">
+ <widget class="TQToolButton" row="0" column="4">
<property name="name">
<cstring>btnSearchUp</cstring>
</property>
@@ -163,5 +163,5 @@
<function>destroy()</function>
</functions>
<pixmapfunction>SmallIconSet</pixmapfunction>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kradio3/plugins/gui-standard-display/radioview_seekinterface.ui.h b/kradio3/plugins/gui-standard-display/radioview_seekinterface.ui.h
index 1f75180..c13c945 100644
--- a/kradio3/plugins/gui-standard-display/radioview_seekinterface.ui.h
+++ b/kradio3/plugins/gui-standard-display/radioview_seekinterface.ui.h
@@ -2,18 +2,18 @@
** ui.h extension file, included from the uic-generated form implementation.
**
** If you wish to add, delete or rename functions or slots use
-** Qt Designer which will update this file, preserving your code. Create an
+** TQt Designer which will update this file, preserving your code. Create an
** init() function in place of a constructor, and a destroy() function in
** place of a destructor.
*****************************************************************************/
void RadioView_SeekerUI::init()
{
- Accel = new QAccel (this);
+ Accel = new TQAccel (this);
Accel->insertItem (Key_Left, 100);
Accel->insertItem (Key_Right, 101);
- Accel->connectItem (100, sldRange, SLOT(subtractStep()));
- Accel->connectItem (101, sldRange, SLOT(addStep()));
+ Accel->connectItem (100, sldRange, TQT_SLOT(subtractStep()));
+ Accel->connectItem (101, sldRange, TQT_SLOT(addStep()));
}
void RadioView_SeekerUI::destroy()
diff --git a/kradio3/plugins/gui-standard-display/radioview_volume.cpp b/kradio3/plugins/gui-standard-display/radioview_volume.cpp
index d642aa4..3f25d5e 100644
--- a/kradio3/plugins/gui-standard-display/radioview_volume.cpp
+++ b/kradio3/plugins/gui-standard-display/radioview_volume.cpp
@@ -16,10 +16,10 @@
***************************************************************************/
#include <math.h>
-#include <qslider.h>
-#include <qlayout.h>
-#include <qaccel.h>
-#include <qtooltip.h>
+#include <tqslider.h>
+#include <tqlayout.h>
+#include <tqaccel.h>
+#include <tqtooltip.h>
#include <klocale.h>
@@ -30,37 +30,37 @@
#define SLIDER_MAXVAL 32768
#define SLIDER_RANGE (SLIDER_MAXVAL - SLIDER_MINVAL)
-RadioViewVolume::RadioViewVolume(QWidget *parent, const QString &name)
- : RadioViewElement (parent, name, clsRadioSound),
+RadioViewVolume::RadioViewVolume(TQWidget *tqparent, const TQString &name)
+ : RadioViewElement (tqparent, name, clsRadioSound),
m_slider(NULL),
m_handlingSlot(false)
{
float v = 0;
SoundStreamID ssid = queryCurrentSoundStreamID();
- sendLogDebug (QString ("RadioViewVolume: ssid=%1").arg(ssid.getID()));
+ sendLogDebug (TQString ("RadioViewVolume: ssid=%1").tqarg(ssid.getID()));
queryPlaybackVolume(ssid, v);
- m_slider = new QSlider(SLIDER_MINVAL,
+ m_slider = new TQSlider(SLIDER_MINVAL,
SLIDER_MAXVAL,
SLIDER_RANGE/10,
getSlider4Volume(v),
Qt::Vertical, this);
- QObject::connect(m_slider, SIGNAL(valueChanged(int)),
- this, SLOT(slotVolumeChanged(int)));
+ TQObject::connect(m_slider, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(slotVolumeChanged(int)));
- QBoxLayout *l = new QBoxLayout(this, QBoxLayout::LeftToRight);
+ TQBoxLayout *l = new TQBoxLayout(this, TQBoxLayout::LeftToRight);
l->addWidget(m_slider);
// Tooltips
- QToolTip::add(m_slider, i18n("Change Volume"));
+ TQToolTip::add(m_slider, i18n("Change Volume"));
// Accelerators
- QAccel *Accel = new QAccel (this);
+ TQAccel *Accel = new TQAccel (this);
Accel->insertItem (Key_Up, 100);
Accel->insertItem (Key_Down, 101);
- Accel->connectItem (100, m_slider, SLOT(subtractStep()));
- Accel->connectItem (101, m_slider, SLOT(addStep()));
+ Accel->connectItem (100, m_slider, TQT_SLOT(subtractStep()));
+ Accel->connectItem (101, m_slider, TQT_SLOT(addStep()));
}
diff --git a/kradio3/plugins/gui-standard-display/radioview_volume.h b/kradio3/plugins/gui-standard-display/radioview_volume.h
index a48c16d..b88f8b4 100644
--- a/kradio3/plugins/gui-standard-display/radioview_volume.h
+++ b/kradio3/plugins/gui-standard-display/radioview_volume.h
@@ -26,16 +26,17 @@
*@author Martin Witte
*/
-class QSlider;
+class TQSlider;
-class RadioViewVolume : public RadioViewElement, // is a QObject, must be first
+class RadioViewVolume : public RadioViewElement, // is a TQObject, must be first
public IRadioDeviceClient,
public ISoundStreamClient,
public IErrorLogClient
{
Q_OBJECT
+ TQ_OBJECT
public:
- RadioViewVolume(QWidget *parent, const QString &name);
+ RadioViewVolume(TQWidget *tqparent, const TQString &name);
~RadioViewVolume();
float getUsability(Interface *) const;
@@ -49,7 +50,7 @@ public:
RECEIVERS:
bool noticePowerChanged (bool /*on*/, const IRadioDevice */*sender*/) { return false; }
bool noticeStationChanged (const RadioStation &, const IRadioDevice */*sender*/) { return false; }
- bool noticeDescriptionChanged (const QString &, const IRadioDevice */*sender*/) { return false; }
+ bool noticeDescriptionChanged (const TQString &, const IRadioDevice */*sender*/) { return false; }
bool noticeCurrentSoundStreamIDChanged(SoundStreamID /*id*/, const IRadioDevice */*sender*/) { return false; }
// ISoundStreamClient
@@ -67,7 +68,7 @@ protected:
int getSlider4Volume(float volume);
float getVolume4Slider(int sl);
- QSlider *m_slider;
+ TQSlider *m_slider;
bool m_handlingSlot;
};
diff --git a/kradio3/plugins/lirc/lirc-configuration-ui.ui b/kradio3/plugins/lirc/lirc-configuration-ui.ui
index 8fadc85..468f4dc 100644
--- a/kradio3/plugins/lirc/lirc-configuration-ui.ui
+++ b/kradio3/plugins/lirc/lirc-configuration-ui.ui
@@ -1,7 +1,7 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>LIRCConfigurationUI</class>
<author>Ernst Martin Witte</author>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>LIRCConfigurationUI</cstring>
</property>
@@ -90,7 +90,7 @@
<enum>Horizontal</enum>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>m_LabelHints</cstring>
</property>
@@ -103,7 +103,7 @@
<customwidgets>
</customwidgets>
<pixmapfunction>SmallIconSet</pixmapfunction>
-<layoutdefaults spacing="6" margin="0"/>
+<tqlayoutdefaults spacing="6" margin="0"/>
<includehints>
<includehint>klistview.h</includehint>
</includehints>
diff --git a/kradio3/plugins/lirc/lirc-configuration.cpp b/kradio3/plugins/lirc/lirc-configuration.cpp
index 9b98a44..f8bbfb1 100644
--- a/kradio3/plugins/lirc/lirc-configuration.cpp
+++ b/kradio3/plugins/lirc/lirc-configuration.cpp
@@ -18,15 +18,15 @@
#include <klistview.h>
#include <klocale.h>
-#include <qlistview.h>
-#include <qlabel.h>
+#include <tqlistview.h>
+#include <tqlabel.h>
#include "lirc-configuration.h"
#include "lircsupport.h"
#include "listviewitem_lirc.h"
-LIRCConfiguration::LIRCConfiguration (QWidget *parent, LircSupport *dev)
- : LIRCConfigurationUI(parent),
+LIRCConfiguration::LIRCConfiguration (TQWidget *tqparent, LircSupport *dev)
+ : LIRCConfigurationUI(tqparent),
m_LIRC (dev),
m_dirty(true),
m_ignore_gui_updates(false)
@@ -53,7 +53,7 @@ LIRCConfiguration::LIRCConfiguration (QWidget *parent, LircSupport *dev)
m_descriptions[LIRC_SEARCH_NEXT] = i18n("Search Next Channel");
m_descriptions[LIRC_SEARCH_PREV] = i18n("Search Previous Channel");
m_descriptions[LIRC_SLEEP] = i18n("Enable Sleep Countdown");
- m_descriptions[LIRC_APPLICATION_QUIT] = i18n("Quit KRadio");
+ m_descriptions[LIRC_APPLICATION_TQUIT] = i18n("Quit KRadio");
int k = 0;
m_order[k++] = LIRC_DIGIT_0;
@@ -78,14 +78,14 @@ LIRCConfiguration::LIRCConfiguration (QWidget *parent, LircSupport *dev)
m_order[k++] = LIRC_SEARCH_NEXT;
m_order[k++] = LIRC_SEARCH_PREV;
m_order[k++] = LIRC_SLEEP;
- m_order[k++] = LIRC_APPLICATION_QUIT;
+ m_order[k++] = LIRC_APPLICATION_TQUIT;
m_ActionList->setSorting(-1);
- m_ActionList->setColumnWidthMode(0, QListView::Maximum);
- m_ActionList->setColumnWidthMode(1, QListView::Maximum);
- m_ActionList->setColumnWidthMode(2, QListView::Maximum);
+ m_ActionList->setColumnWidthMode(0, TQListView::Maximum);
+ m_ActionList->setColumnWidthMode(1, TQListView::Maximum);
+ m_ActionList->setColumnWidthMode(2, TQListView::Maximum);
- connect(m_ActionList, SIGNAL(itemRenamed(QListViewItem*, int)), this, SLOT(slotSetDirty()));
+ connect(m_ActionList, TQT_SIGNAL(itemRenamed(TQListViewItem*, int)), this, TQT_SLOT(slotSetDirty()));
slotCancel();
}
@@ -98,10 +98,10 @@ LIRCConfiguration::~LIRCConfiguration ()
void LIRCConfiguration::slotOK()
{
if (m_dirty && m_LIRC) {
- QListViewItem *item = m_ActionList->firstChild();
+ TQListViewItem *item = m_ActionList->firstChild();
- QMap<LIRC_Actions, QString> actions;
- QMap<LIRC_Actions, QString> alt_actions;
+ TQMap<LIRC_Actions, TQString> actions;
+ TQMap<LIRC_Actions, TQString> alt_actions;
for (int i = 0; item; ++i, item = item->nextSibling()) {
LIRC_Actions action = m_order[i];
@@ -120,10 +120,10 @@ void LIRCConfiguration::slotCancel()
m_ignore_gui_updates = true;
m_ActionList->clear();
if (m_LIRC) {
- const QMap<LIRC_Actions, QString> &actions = m_LIRC->getActions();
- const QMap<LIRC_Actions, QString> &alt_actions = m_LIRC->getAlternativeActions();
+ const TQMap<LIRC_Actions, TQString> &actions = m_LIRC->getActions();
+ const TQMap<LIRC_Actions, TQString> &alt_actions = m_LIRC->getAlternativeActions();
- for (unsigned i = 0; m_order.contains(i) && i < m_order.count(); ++i) {
+ for (unsigned i = 0; m_order.tqcontains(i) && i < m_order.count(); ++i) {
LIRC_Actions action = m_order[i];
addKey(m_descriptions[action], actions[action], alt_actions[action]);
}
@@ -136,14 +136,14 @@ void LIRCConfiguration::slotCancel()
}
-void LIRCConfiguration::addKey(const QString &descr, const QString &key, const QString &alt_key)
+void LIRCConfiguration::addKey(const TQString &descr, const TQString &key, const TQString &alt_key)
{
ListViewItemLirc *item = new ListViewItemLirc(m_ActionList, m_ActionList->lastChild());
if (item) {
- QObject::connect(item, SIGNAL(sigRenamingStarted (ListViewItemLirc *, int)),
- this, SLOT (slotRenamingStarted(ListViewItemLirc *, int)));
- QObject::connect(item, SIGNAL(sigRenamingStopped (ListViewItemLirc *, int)),
- this, SLOT (slotRenamingStopped(ListViewItemLirc *, int)));
+ TQObject::connect(item, TQT_SIGNAL(sigRenamingStarted (ListViewItemLirc *, int)),
+ this, TQT_SLOT (slotRenamingStarted(ListViewItemLirc *, int)));
+ TQObject::connect(item, TQT_SIGNAL(sigRenamingStopped (ListViewItemLirc *, int)),
+ this, TQT_SLOT (slotRenamingStopped(ListViewItemLirc *, int)));
item->setText(0, descr);
item->setText(1, key);
item->setText(2, alt_key);
@@ -158,9 +158,9 @@ void LIRCConfiguration::slotUpdateConfig()
slotCancel();
}
-void LIRCConfiguration::slotRawLIRCSignal(const QString &val, int /*repeat_counter*/, bool &consumed)
+void LIRCConfiguration::slotRawLIRCSignal(const TQString &val, int /*repeat_counter*/, bool &consumed)
{
- QListViewItem *_it = m_ActionList->currentItem();
+ TQListViewItem *_it = m_ActionList->currentItem();
ListViewItemLirc *it = static_cast<ListViewItemLirc*>(_it);
if (it->isRenamingInProcess()) {
int col = it->getRenamingColumn();
diff --git a/kradio3/plugins/lirc/lirc-configuration.h b/kradio3/plugins/lirc/lirc-configuration.h
index 13bcda4..4e1af19 100644
--- a/kradio3/plugins/lirc/lirc-configuration.h
+++ b/kradio3/plugins/lirc/lirc-configuration.h
@@ -29,8 +29,9 @@
class LIRCConfiguration : public LIRCConfigurationUI
{
Q_OBJECT
+ TQ_OBJECT
public :
- LIRCConfiguration (QWidget *parent, LircSupport *);
+ LIRCConfiguration (TQWidget *tqparent, LircSupport *);
~LIRCConfiguration ();
protected slots:
@@ -40,18 +41,18 @@ protected slots:
void slotSetDirty();
void slotUpdateConfig();
- void slotRawLIRCSignal(const QString &val, int repeat_counter, bool &consumed);
+ void slotRawLIRCSignal(const TQString &val, int repeat_counter, bool &consumed);
void slotRenamingStarted(ListViewItemLirc *, int);
void slotRenamingStopped(ListViewItemLirc *, int);
protected:
- void addKey(const QString &descr, const QString &key, const QString &alt_key);
+ void addKey(const TQString &descr, const TQString &key, const TQString &alt_key);
LircSupport *m_LIRC;
- QMap<int, LIRC_Actions> m_order;
- QMap<LIRC_Actions, QString> m_descriptions;
+ TQMap<int, LIRC_Actions> m_order;
+ TQMap<LIRC_Actions, TQString> m_descriptions;
bool m_dirty;
bool m_ignore_gui_updates;
diff --git a/kradio3/plugins/lirc/lircsupport.cpp b/kradio3/plugins/lirc/lircsupport.cpp
index 3b64580..68bcb6a 100644
--- a/kradio3/plugins/lirc/lircsupport.cpp
+++ b/kradio3/plugins/lirc/lircsupport.cpp
@@ -21,9 +21,9 @@
#include <lirc/lirc_client.h>
#endif
-#include <qsocketnotifier.h>
-#include <qtimer.h>
-#include <qfile.h>
+#include <tqsocketnotifier.h>
+#include <tqtimer.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kaboutdata.h>
@@ -49,7 +49,7 @@ PLUGIN_LIBRARY_FUNCTIONS(LircSupport, "kradio-lirc", i18n("Linux Infrared Contro
/////////////////////////////////////////////////////////////////////////////
-LircSupport::LircSupport(const QString &name)
+LircSupport::LircSupport(const TQString &name)
: PluginBase(name, i18n("LIRC Plugin")),
m_TakeRawLIRC(false)
{
@@ -59,13 +59,13 @@ LircSupport::LircSupport(const QString &name)
fprintf (stderr, "%s\n", (const char*)i18n("initializing kradio lirc plugin").utf8());
char *prg = (char*)"kradio";
- QString slircrc = getenv("HOME");
+ TQString slircrc = getenv("HOME");
slircrc += "/" LIRCRC;
- QFile lircrc(slircrc);
+ TQFile lircrc(slircrc);
if (!lircrc.exists()) {
- logWarning(i18n("%1 does not exist. File was created with KRadio's default .lircrc proposal").arg(LIRCRC));
- QFile default_lircrc(locate("data", "kradio/default-dot-lircrc"));
+ logWarning(i18n("%1 does not exist. File was created with KRadio's default .lircrc proposal").tqarg(LIRCRC));
+ TQFile default_lircrc(locate("data", "kradio/default-dot-lircrc"));
lircrc.open(IO_WriteOnly);
default_lircrc.open(IO_ReadOnly);
char *buf = new char [default_lircrc.size() + 1];
@@ -82,14 +82,14 @@ LircSupport::LircSupport(const QString &name)
if (m_fd_lirc != -1) {
if (lirc_readconfig (NULL, &m_lircConfig, NULL) == 0) {
- m_lirc_notify = new QSocketNotifier(m_fd_lirc, QSocketNotifier::Read, this, "lirc_notifier");
+ m_lirc_notify = new TQSocketNotifier(m_fd_lirc, TQSocketNotifier::Read, this, "lirc_notifier");
if (m_lirc_notify)
- QObject::connect(m_lirc_notify, SIGNAL(activated(int)), this, SLOT(slotLIRC(int)));
+ TQObject::connect(m_lirc_notify, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotLIRC(int)));
// check config
lirc_config_entry *found = NULL;
for (lirc_config_entry *e = m_lircConfig->first; e; e = e->next) {
- if (QString(e->prog) == prg)
+ if (TQString(e->prog) == prg)
found = e;
}
if (!found) {
@@ -113,8 +113,8 @@ LircSupport::LircSupport(const QString &name)
}
#endif
- m_kbdTimer = new QTimer (this);
- QObject::connect (m_kbdTimer, SIGNAL(timeout()), this, SLOT(slotKbdTimedOut()));
+ m_kbdTimer = new TQTimer (this);
+ TQObject::connect (m_kbdTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotKbdTimedOut()));
m_addIndex = 0;
}
@@ -143,10 +143,10 @@ void LircSupport::slotLIRC(int /*socket*/ )
if (lirc_nextcode(&code) == 0) {
while(m_TakeRawLIRC || (lirc_code2char (m_lircConfig, code, &c) == 0 && c != NULL)) {
- QString x = c;
+ TQString x = c;
int repeat_counter = 1;
- if (m_TakeRawLIRC || (QString(c) == "eventmap")) {
- QStringList l = QStringList::split(" ", code);
+ if (m_TakeRawLIRC || (TQString(c) == "eventmap")) {
+ TQStringList l = TQStringList::split(" ", code);
if (l.count() >=4) {
x = l[2];
repeat_counter = l[1].toInt(NULL, 16);
@@ -154,7 +154,7 @@ void LircSupport::slotLIRC(int /*socket*/ )
}
bool consumed = false;
- logDebug(QString("LIRC: ") + x);
+ logDebug(TQString("LIRC: ") + x);
emit sigRawLIRCSignal(x, repeat_counter, consumed);
@@ -238,7 +238,7 @@ void LircSupport::saveState (KConfig *c) const
c->writeEntry("LIRC_SEARCH_NEXT", m_Actions[LIRC_SEARCH_NEXT]);
c->writeEntry("LIRC_SEARCH_PREV", m_Actions[LIRC_SEARCH_PREV]);
c->writeEntry("LIRC_SLEEP", m_Actions[LIRC_SLEEP]);
- c->writeEntry("LIRC_APPLICATION_QUIT", m_Actions[LIRC_APPLICATION_QUIT]);
+ c->writeEntry("LIRC_APPLICATION_TQUIT", m_Actions[LIRC_APPLICATION_TQUIT]);
c->writeEntry("ALT_LIRC_DIGIT_0", m_AlternativeActions[LIRC_DIGIT_0]);
@@ -263,7 +263,7 @@ void LircSupport::saveState (KConfig *c) const
c->writeEntry("ALT_LIRC_SEARCH_NEXT", m_AlternativeActions[LIRC_SEARCH_NEXT]);
c->writeEntry("ALT_LIRC_SEARCH_PREV", m_AlternativeActions[LIRC_SEARCH_PREV]);
c->writeEntry("ALT_LIRC_SLEEP", m_AlternativeActions[LIRC_SLEEP]);
- c->writeEntry("ALT_LIRC_APPLICATION_QUIT", m_AlternativeActions[LIRC_APPLICATION_QUIT]);
+ c->writeEntry("ALT_LIRC_APPLICATION_TQUIT", m_AlternativeActions[LIRC_APPLICATION_TQUIT]);
}
void LircSupport::restoreState (KConfig *c)
@@ -290,7 +290,7 @@ void LircSupport::restoreState (KConfig *c)
m_Actions[LIRC_SEARCH_NEXT] = c->readEntry("LIRC_SEARCH_NEXT", "SOURCE");
m_Actions[LIRC_SEARCH_PREV] = c->readEntry("LIRC_SEARCH_PREV", "MUTE");
m_Actions[LIRC_SLEEP] = c->readEntry("LIRC_SLEEP", "MINIMIZE");
- m_Actions[LIRC_APPLICATION_QUIT] = c->readEntry("LIRC_APPLICATION_QUIT", "");
+ m_Actions[LIRC_APPLICATION_TQUIT] = c->readEntry("LIRC_APPLICATION_TQUIT", "");
m_AlternativeActions[LIRC_DIGIT_0] = c->readEntry("ALT_LIRC_DIGIT_0", "");
@@ -315,7 +315,7 @@ void LircSupport::restoreState (KConfig *c)
m_AlternativeActions[LIRC_SEARCH_NEXT] = c->readEntry("ALT_LIRC_SEARCH_NEXT", "");
m_AlternativeActions[LIRC_SEARCH_PREV] = c->readEntry("ALT_LIRC_SEARCH_PREV", "");
m_AlternativeActions[LIRC_SLEEP] = c->readEntry("ALT_LIRC_SLEEP", "");
- m_AlternativeActions[LIRC_APPLICATION_QUIT] = c->readEntry("ALT_LIRC_APPLICATION_QUIT", "");
+ m_AlternativeActions[LIRC_APPLICATION_TQUIT] = c->readEntry("ALT_LIRC_APPLICATION_TQUIT", "");
emit sigUpdateConfig();
}
@@ -324,9 +324,9 @@ void LircSupport::restoreState (KConfig *c)
ConfigPageInfo LircSupport::createConfigurationPage()
{
LIRCConfiguration *conf = new LIRCConfiguration(NULL, this);
- QObject::connect(this, SIGNAL(sigUpdateConfig()), conf, SLOT(slotUpdateConfig()));
- QObject::connect(this, SIGNAL(sigRawLIRCSignal(const QString &, int, bool &)),
- conf, SLOT (slotRawLIRCSignal(const QString &, int, bool &)));
+ TQObject::connect(this, TQT_SIGNAL(sigUpdateConfig()), conf, TQT_SLOT(slotUpdateConfig()));
+ TQObject::connect(this, TQT_SIGNAL(sigRawLIRCSignal(const TQString &, int, bool &)),
+ conf, TQT_SLOT (slotRawLIRCSignal(const TQString &, int, bool &)));
return ConfigPageInfo (conf,
i18n("LIRC Support"),
i18n("LIRC Plugin"),
@@ -357,7 +357,7 @@ AboutPageInfo LircSupport::createAboutPage()
}
-bool LircSupport::checkActions(const QString &lirc_string, int repeat_counter, const QMap<LIRC_Actions, QString> &map)
+bool LircSupport::checkActions(const TQString &lirc_string, int repeat_counter, const TQMap<LIRC_Actions, TQString> &map)
{
SoundStreamID streamID = queryCurrentSoundStreamID();
@@ -366,8 +366,8 @@ bool LircSupport::checkActions(const QString &lirc_string, int repeat_counter, c
SoundFormat sf;
ISeekRadio *seeker = NULL;
- QMapConstIterator<LIRC_Actions, QString> it = map.begin();
- QMapConstIterator<LIRC_Actions, QString> end = map.end();
+ TQMapConstIterator<LIRC_Actions, TQString> it = map.begin();
+ TQMapConstIterator<LIRC_Actions, TQString> end = map.end();
for (; !retval && it != end; ++it) {
if ((*it).length() && lirc_string == *it) {
LIRC_Actions action = it.key();
@@ -519,7 +519,7 @@ bool LircSupport::checkActions(const QString &lirc_string, int repeat_counter, c
sendStartCountdown();
}
break;
- case LIRC_APPLICATION_QUIT :
+ case LIRC_APPLICATION_TQUIT :
retval = true;
kapp->quit();
break;
@@ -543,7 +543,7 @@ bool LircSupport::checkActions(const QString &lirc_string, int repeat_counter, c
}
-void LircSupport::setActions(const QMap<LIRC_Actions, QString> &actions, const QMap<LIRC_Actions, QString> &alt_actions)
+void LircSupport::setActions(const TQMap<LIRC_Actions, TQString> &actions, const TQMap<LIRC_Actions, TQString> &alt_actions)
{
m_Actions = actions;
m_AlternativeActions = alt_actions;
diff --git a/kradio3/plugins/lirc/lircsupport.h b/kradio3/plugins/lirc/lircsupport.h
index 47a113f..f809dc6 100644
--- a/kradio3/plugins/lirc/lircsupport.h
+++ b/kradio3/plugins/lirc/lircsupport.h
@@ -22,7 +22,7 @@
#include <config.h>
#endif
-#include <qobject.h>
+#include <tqobject.h>
#include "../../src/include/timecontrol_interfaces.h"
#include "../../src/include/radio_interfaces.h"
#include "../../src/include/radiodevicepool_interfaces.h"
@@ -53,15 +53,15 @@ enum LIRC_Actions {
LIRC_SEARCH_NEXT,
LIRC_SEARCH_PREV,
LIRC_SLEEP,
- LIRC_APPLICATION_QUIT
+ LIRC_APPLICATION_TQUIT
};
struct lirc_config;
-class QSocketNotifier;
-class QTimer;
+class TQSocketNotifier;
+class TQTimer;
-class LircSupport : public QObject,
+class LircSupport : public TQObject,
public PluginBase,
public IRadioClient,
public ITimeControlClient,
@@ -69,22 +69,23 @@ class LircSupport : public QObject,
public IRadioDevicePoolClient
{
Q_OBJECT
+ TQ_OBJECT
public:
- LircSupport(const QString &name);
+ LircSupport(const TQString &name);
~LircSupport();
virtual bool connectI (Interface *);
virtual bool disconnectI (Interface *);
- virtual QString pluginClassName() const { return "LircSupport"; }
+ virtual TQString pluginClassName() const { return "LircSupport"; }
- 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 void setActions(const QMap<LIRC_Actions, QString> &actions, const QMap<LIRC_Actions, QString> &alt_actions);
- virtual const QMap<LIRC_Actions, QString> &getActions() const { return m_Actions; }
- virtual const QMap<LIRC_Actions, QString> &getAlternativeActions() const { return m_AlternativeActions; }
+ virtual void setActions(const TQMap<LIRC_Actions, TQString> &actions, const TQMap<LIRC_Actions, TQString> &alt_actions);
+ virtual const TQMap<LIRC_Actions, TQString> &getActions() const { return m_Actions; }
+ virtual const TQMap<LIRC_Actions, TQString> &getAlternativeActions() const { return m_AlternativeActions; }
// PluginBase
@@ -101,7 +102,7 @@ RECEIVERS:
bool noticePowerChanged(bool /*on*/) { return false; }
bool noticeStationChanged (const RadioStation &, int /*idx*/) { return false; }
bool noticeStationsChanged(const StationList &/*sl*/) { return false; }
- bool noticePresetFileChanged(const QString &/*f*/) { return false; }
+ bool noticePresetFileChanged(const TQString &/*f*/) { return false; }
bool noticeCurrentSoundStreamIDChanged(SoundStreamID /*id*/) { return false; }
@@ -111,7 +112,7 @@ RECEIVERS:
bool noticeAlarmsChanged(const AlarmVector &) { return false; }
bool noticeAlarm(const Alarm &) { return false; }
bool noticeNextAlarmChanged(const Alarm *) { return false; }
- bool noticeCountdownStarted(const QDateTime &/*end*/) { return false; }
+ bool noticeCountdownStarted(const TQDateTime &/*end*/) { return false; }
bool noticeCountdownStopped() { return false; }
bool noticeCountdownZero() { return false; }
bool noticeCountdownSecondsChanged(int /*n*/) { return false; }
@@ -120,13 +121,13 @@ RECEIVERS:
RECEIVERS:
bool noticeActiveDeviceChanged(IRadioDevice *) { return false; }
- bool noticeDevicesChanged(const QPtrList<IRadioDevice> &) { return false; }
- bool noticeDeviceDescriptionChanged(const QString &) { return false; }
+ bool noticeDevicesChanged(const TQPtrList<IRadioDevice> &) { return false; }
+ bool noticeDeviceDescriptionChanged(const TQString &) { return false; }
protected:
void activateStation(int i);
- bool checkActions(const QString &string, int repeat_counter, const QMap<LIRC_Actions, QString> &map);
+ bool checkActions(const TQString &string, int repeat_counter, const TQMap<LIRC_Actions, TQString> &map);
protected slots:
void slotLIRC(int socket);
@@ -136,22 +137,22 @@ signals:
void sigUpdateConfig();
- void sigRawLIRCSignal(const QString &what, int repeat_counter, bool &consumed);
+ void sigRawLIRCSignal(const TQString &what, int repeat_counter, bool &consumed);
protected:
#ifdef HAVE_LIRC
- QSocketNotifier *m_lirc_notify;
+ TQSocketNotifier *m_lirc_notify;
int m_fd_lirc;
struct lirc_config *m_lircConfig;
#endif
- QTimer *m_kbdTimer;
+ TQTimer *m_kbdTimer;
int m_addIndex;
bool m_TakeRawLIRC;
- QMap<LIRC_Actions, QString> m_Actions;
- QMap<LIRC_Actions, QString> m_AlternativeActions;
+ TQMap<LIRC_Actions, TQString> m_Actions;
+ TQMap<LIRC_Actions, TQString> m_AlternativeActions;
};
diff --git a/kradio3/plugins/lirc/listviewitem_lirc.cpp b/kradio3/plugins/lirc/listviewitem_lirc.cpp
index 4f7d0ce..326bba3 100644
--- a/kradio3/plugins/lirc/listviewitem_lirc.cpp
+++ b/kradio3/plugins/lirc/listviewitem_lirc.cpp
@@ -17,8 +17,8 @@
#include "listviewitem_lirc.h"
-ListViewItemLirc::ListViewItemLirc(QListView *parent, QListViewItem *after)
- : KListViewItem(parent, after),
+ListViewItemLirc::ListViewItemLirc(TQListView *tqparent, TQListViewItem *after)
+ : KListViewItem(tqparent, after),
m_renamingInProcess(-1)
{
}
diff --git a/kradio3/plugins/lirc/listviewitem_lirc.h b/kradio3/plugins/lirc/listviewitem_lirc.h
index 051ff76..12a821c 100644
--- a/kradio3/plugins/lirc/listviewitem_lirc.h
+++ b/kradio3/plugins/lirc/listviewitem_lirc.h
@@ -24,11 +24,12 @@
#include <klistview.h>
-class ListViewItemLirc : public QObject, public KListViewItem
+class ListViewItemLirc : public TQObject, public KListViewItem
{
Q_OBJECT
+ TQ_OBJECT
public:
- ListViewItemLirc(QListView *parent, QListViewItem *after);
+ ListViewItemLirc(TQListView *tqparent, TQListViewItem *after);
~ListViewItemLirc();
bool isRenamingInProcess() const { return m_renamingInProcess >= 0; }
diff --git a/kradio3/plugins/oss-sound/oss-sound-configuration-ui.ui b/kradio3/plugins/oss-sound/oss-sound-configuration-ui.ui
index 7cf3483..12f3051 100644
--- a/kradio3/plugins/oss-sound/oss-sound-configuration-ui.ui
+++ b/kradio3/plugins/oss-sound/oss-sound-configuration-ui.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>OSSSoundConfigurationUI</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>OSSSoundConfigurationUI</cstring>
</property>
@@ -19,7 +19,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QGroupBox" row="0" column="0">
+ <widget class="TQGroupBox" row="0" column="0">
<property name="name">
<cstring>groupBox20</cstring>
</property>
@@ -43,7 +43,7 @@
<cstring>editDSPDevice</cstring>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -51,7 +51,7 @@
<string>PCM Device</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel2_2</cstring>
</property>
@@ -59,7 +59,7 @@
<string>Mixer Device</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel2_2_2</cstring>
</property>
@@ -83,7 +83,7 @@
</widget>
</grid>
</widget>
- <widget class="QGroupBox" row="1" column="0">
+ <widget class="TQGroupBox" row="1" column="0">
<property name="name">
<cstring>groupBox21</cstring>
</property>
@@ -97,7 +97,7 @@
<property name="margin">
<number>11</number>
</property>
- <widget class="QCheckBox" row="0" column="0">
+ <widget class="TQCheckBox" row="0" column="0">
<property name="name">
<cstring>chkDisablePlayback</cstring>
</property>
@@ -105,7 +105,7 @@
<string>Disable Playback</string>
</property>
</widget>
- <widget class="QCheckBox" row="1" column="0">
+ <widget class="TQCheckBox" row="1" column="0">
<property name="name">
<cstring>chkDisableCapture</cstring>
</property>
@@ -119,7 +119,7 @@
</widget>
<customwidgets>
</customwidgets>
-<layoutdefaults spacing="6" margin="0"/>
+<tqlayoutdefaults spacing="6" margin="0"/>
<includehints>
<includehint>kurlrequester.h</includehint>
<includehint>klineedit.h</includehint>
diff --git a/kradio3/plugins/oss-sound/oss-sound-configuration.cpp b/kradio3/plugins/oss-sound/oss-sound-configuration.cpp
index 5665114..1aca790 100644
--- a/kradio3/plugins/oss-sound/oss-sound-configuration.cpp
+++ b/kradio3/plugins/oss-sound/oss-sound-configuration.cpp
@@ -15,7 +15,7 @@
* *
***************************************************************************/
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kurlrequester.h>
#include <knuminput.h>
@@ -23,17 +23,17 @@
#include "oss-sound-configuration.h"
#include "oss-sound.h"
-OSSSoundConfiguration::OSSSoundConfiguration (QWidget *parent, OSSSoundDevice *dev)
- : OSSSoundConfigurationUI(parent),
+OSSSoundConfiguration::OSSSoundConfiguration (TQWidget *tqparent, OSSSoundDevice *dev)
+ : OSSSoundConfigurationUI(tqparent),
m_SoundDevice (dev),
m_dirty(true),
m_ignore_gui_updates(false)
{
- connect(editDSPDevice, SIGNAL(textChanged(const QString &)), this, SLOT(slotSetDirty()));
- connect(editMixerDevice, SIGNAL(textChanged(const QString &)), this, SLOT(slotSetDirty()));
- connect(editBufferSize, SIGNAL(valueChanged(int)), this, SLOT(slotSetDirty()));
- connect(chkDisablePlayback, SIGNAL(toggled(bool)), this, SLOT(slotSetDirty()));
- connect(chkDisableCapture, SIGNAL(toggled(bool)), this, SLOT(slotSetDirty()));
+ connect(editDSPDevice, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotSetDirty()));
+ connect(editMixerDevice, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotSetDirty()));
+ connect(editBufferSize, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSetDirty()));
+ connect(chkDisablePlayback, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetDirty()));
+ connect(chkDisableCapture, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetDirty()));
slotCancel();
}
@@ -60,8 +60,8 @@ void OSSSoundConfiguration::slotCancel()
{
if (m_dirty) {
m_ignore_gui_updates = true;
- editDSPDevice ->setURL (m_SoundDevice ? m_SoundDevice->getDSPDeviceName() : QString::null);
- editMixerDevice ->setURL (m_SoundDevice ? m_SoundDevice->getMixerDeviceName() : QString::null);
+ editDSPDevice ->setURL (m_SoundDevice ? m_SoundDevice->getDSPDeviceName() : TQString());
+ editMixerDevice ->setURL (m_SoundDevice ? m_SoundDevice->getMixerDeviceName() : TQString());
editBufferSize ->setValue (m_SoundDevice ? m_SoundDevice->getBufferSize()/1024 : 4);
chkDisablePlayback->setChecked(m_SoundDevice ? !m_SoundDevice->isPlaybackEnabled() : false);
chkDisableCapture ->setChecked(m_SoundDevice ? !m_SoundDevice->isCaptureEnabled() : false);
diff --git a/kradio3/plugins/oss-sound/oss-sound-configuration.h b/kradio3/plugins/oss-sound/oss-sound-configuration.h
index 9106821..fdbcd26 100644
--- a/kradio3/plugins/oss-sound/oss-sound-configuration.h
+++ b/kradio3/plugins/oss-sound/oss-sound-configuration.h
@@ -28,8 +28,9 @@
class OSSSoundConfiguration : public OSSSoundConfigurationUI
{
Q_OBJECT
+ TQ_OBJECT
public :
- OSSSoundConfiguration (QWidget *parent, OSSSoundDevice *);
+ OSSSoundConfiguration (TQWidget *tqparent, OSSSoundDevice *);
~OSSSoundConfiguration ();
protected slots:
diff --git a/kradio3/plugins/oss-sound/oss-sound.cpp b/kradio3/plugins/oss-sound/oss-sound.cpp
index 760399e..e640191 100644
--- a/kradio3/plugins/oss-sound/oss-sound.cpp
+++ b/kradio3/plugins/oss-sound/oss-sound.cpp
@@ -41,8 +41,8 @@ PLUGIN_LIBRARY_FUNCTIONS(OSSSoundDevice, "kradio-oss-sound", i18n("Open Sound Sy
struct _lrvol { unsigned char l, r; short dummy; };
-OSSSoundDevice::OSSSoundDevice(const QString &name)
- : QObject(NULL, NULL),
+OSSSoundDevice::OSSSoundDevice(const TQString &name)
+ : TQObject(NULL, NULL),
PluginBase(name, i18n("KRadio OSS Sound Plugin")),
m_DSPDeviceName(""),
m_MixerDeviceName(""),
@@ -64,7 +64,7 @@ OSSSoundDevice::OSSSoundDevice(const QString &name)
m_EnablePlayback(true),
m_EnableCapture(true)
{
- QObject::connect(&m_PollingTimer, SIGNAL(timeout()), this, SLOT(slotPoll()));
+ TQObject::connect(&m_PollingTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotPoll()));
}
@@ -119,7 +119,7 @@ void OSSSoundDevice::noticeConnectedI (ISoundStreamServer *s, bool pointer_valid
void OSSSoundDevice::saveState (KConfig *c) const
{
- c->setGroup(QString("oss-sound-") + PluginBase::name());
+ c->setGroup(TQString("oss-sound-") + PluginBase::name());
c->writeEntry("dsp-device", m_DSPDeviceName);
c->writeEntry("mixer-device", m_MixerDeviceName);
@@ -132,7 +132,7 @@ void OSSSoundDevice::saveState (KConfig *c) const
void OSSSoundDevice::restoreState (KConfig *c)
{
- c->setGroup(QString("oss-sound-") + PluginBase::name());
+ c->setGroup(TQString("oss-sound-") + PluginBase::name());
m_EnablePlayback = c->readBoolEntry("enable-playback", true);
m_EnableCapture = c->readBoolEntry("enable-capture", true);
@@ -150,7 +150,7 @@ void OSSSoundDevice::restoreState (KConfig *c)
}
-void OSSSoundDevice::setMixerDeviceName(const QString &dev_name)
+void OSSSoundDevice::setMixerDeviceName(const TQString &dev_name)
{
if (m_MixerDeviceName != dev_name) {
m_MixerDeviceName = dev_name;
@@ -167,7 +167,7 @@ void OSSSoundDevice::setMixerDeviceName(const QString &dev_name)
ConfigPageInfo OSSSoundDevice::createConfigurationPage()
{
OSSSoundConfiguration *conf = new OSSSoundConfiguration(NULL, this);
- QObject::connect(this, SIGNAL(sigUpdateConfig()), conf, SLOT(slotUpdateConfig()));
+ TQObject::connect(this, TQT_SIGNAL(sigUpdateConfig()), conf, TQT_SLOT(slotUpdateConfig()));
return ConfigPageInfo (conf,
i18n("OSS Sound"),
i18n("OSS Sound Device Options"),
@@ -200,9 +200,9 @@ AboutPageInfo OSSSoundDevice::createAboutPage()
-bool OSSSoundDevice::preparePlayback(SoundStreamID id, const QString &channel, bool active_mode, bool start_immediately)
+bool OSSSoundDevice::preparePlayback(SoundStreamID id, const TQString &channel, bool active_mode, bool start_immediately)
{
- if (id.isValid() && m_revPlaybackChannels.contains(channel)) {
+ if (id.isValid() && m_revPlaybackChannels.tqcontains(channel)) {
m_PlaybackStreams.insert(id, SoundStreamConfig(m_revPlaybackChannels[channel], active_mode));
if (start_immediately)
startPlayback(id);
@@ -213,9 +213,9 @@ bool OSSSoundDevice::preparePlayback(SoundStreamID id, const QString &channel, b
}
-bool OSSSoundDevice::prepareCapture(SoundStreamID id, const QString &channel)
+bool OSSSoundDevice::prepareCapture(SoundStreamID id, const TQString &channel)
{
- if (id.isValid() && m_revCaptureChannels.contains(channel)) {
+ if (id.isValid() && m_revCaptureChannels.tqcontains(channel)) {
m_CaptureStreams.insert(id, SoundStreamConfig(m_revCaptureChannels[channel]));
return true;
// FIXME: what to do if stream is already playing?
@@ -225,8 +225,8 @@ bool OSSSoundDevice::prepareCapture(SoundStreamID id, const QString &channel)
bool OSSSoundDevice::releasePlayback(SoundStreamID id)
{
- if (id.isValid() && m_PlaybackStreams.contains(id)) {
- if (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id)) {
+ if (id.isValid() && m_PlaybackStreams.tqcontains(id)) {
+ if (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id)) {
stopPlayback(id);
}
m_PlaybackStreams.remove(id);
@@ -237,7 +237,7 @@ bool OSSSoundDevice::releasePlayback(SoundStreamID id)
bool OSSSoundDevice::releaseCapture(SoundStreamID id)
{
- if (id.isValid() && m_CaptureStreams.contains(id)) {
+ if (id.isValid() && m_CaptureStreams.tqcontains(id)) {
if (m_CaptureStreamID == id) {
stopCapture(id);
}
@@ -261,7 +261,7 @@ bool OSSSoundDevice::supportsCapture() const
bool OSSSoundDevice::startPlayback(SoundStreamID id)
{
- if (id.isValid() && m_PlaybackStreams.contains(id) && m_EnablePlayback) {
+ if (id.isValid() && m_PlaybackStreams.tqcontains(id) && m_EnablePlayback) {
SoundStreamConfig &cfg = m_PlaybackStreams[id];
@@ -272,7 +272,7 @@ bool OSSSoundDevice::startPlayback(SoundStreamID id)
ok = true;
}
} else {
- if (!m_PassivePlaybackStreams.contains(id))
+ if (!m_PassivePlaybackStreams.tqcontains(id))
m_PassivePlaybackStreams.append(id);
ok = true;
}
@@ -300,12 +300,12 @@ bool OSSSoundDevice::pausePlayback(SoundStreamID /*id*/)
bool OSSSoundDevice::stopPlayback(SoundStreamID id)
{
- if (id.isValid() && m_PlaybackStreams.contains(id)) {
+ if (id.isValid() && m_PlaybackStreams.tqcontains(id)) {
SoundStreamConfig &cfg = m_PlaybackStreams[id];
if (!cfg.m_ActiveMode) {
- if (m_PassivePlaybackStreams.contains(id)) {
+ if (m_PassivePlaybackStreams.tqcontains(id)) {
// writeMixerVolume(cfg.m_Channel, 0);
m_PassivePlaybackStreams.remove(id);
}
@@ -324,7 +324,7 @@ bool OSSSoundDevice::stopPlayback(SoundStreamID id)
bool OSSSoundDevice::isPlaybackRunning(SoundStreamID id, bool &b) const
{
- if (id.isValid() && m_PlaybackStreams.contains(id)) {
+ if (id.isValid() && m_PlaybackStreams.tqcontains(id)) {
b = true;
return true;
} else {
@@ -337,7 +337,7 @@ bool OSSSoundDevice::startCaptureWithFormat(SoundStreamID id,
SoundFormat &real_format,
bool force_format)
{
- if (m_CaptureStreams.contains(id) && m_EnableCapture) {
+ if (m_CaptureStreams.tqcontains(id) && m_EnableCapture) {
if (m_CaptureStreamID != id) {
m_CapturePos = 0;
@@ -402,7 +402,7 @@ bool OSSSoundDevice::isCaptureRunning(SoundStreamID id, bool &b, SoundFormat &sf
bool OSSSoundDevice::noticeSoundStreamClosed(SoundStreamID id)
{
bool found = false;
- if (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id)) {
+ if (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id)) {
stopPlayback(id);
found = true;
}
@@ -419,13 +419,13 @@ bool OSSSoundDevice::noticeSoundStreamClosed(SoundStreamID id)
bool OSSSoundDevice::noticeSoundStreamRedirected(SoundStreamID oldID, SoundStreamID newID)
{
bool found = false;
- if (m_PlaybackStreams.contains(oldID)) {
+ if (m_PlaybackStreams.tqcontains(oldID)) {
m_PlaybackStreams.insert(newID, m_PlaybackStreams[oldID]);
if (newID != oldID)
m_PlaybackStreams.remove(oldID);
found = true;
}
- if (m_CaptureStreams.contains(oldID)) {
+ if (m_CaptureStreams.tqcontains(oldID)) {
m_CaptureStreams.insert(newID, m_CaptureStreams[oldID]);
if (newID != oldID)
m_CaptureStreams.remove(oldID);
@@ -436,7 +436,7 @@ bool OSSSoundDevice::noticeSoundStreamRedirected(SoundStreamID oldID, SoundStrea
m_PlaybackStreamID = newID;
if (m_CaptureStreamID == oldID)
m_CaptureStreamID = newID;
- if (m_PassivePlaybackStreams.contains(oldID)) {
+ if (m_PassivePlaybackStreams.tqcontains(oldID)) {
m_PassivePlaybackStreams.remove(oldID);
m_PassivePlaybackStreams.append(newID);
}
@@ -478,7 +478,7 @@ bool OSSSoundDevice::noticeSoundStreamData(SoundStreamID id,
// if (n < size) {
// m_PlaybackSkipCount += size - n;
// } else if (m_PlaybackSkipCount > 0) {
-// logWarning(i18n("%1: Playback buffer overflow. Skipped %1 bytes").arg(m_DSPDeviceName).arg(QString::number(m_PlaybackSkipCount)));
+// logWarning(i18n("%1: Playback buffer overflow. Skipped %1 bytes").tqarg(m_DSPDeviceName).tqarg(TQString::number(m_PlaybackSkipCount)));
// m_PlaybackSkipCount = 0;
// }
@@ -504,7 +504,7 @@ void OSSSoundDevice::slotPoll()
bytesRead = 0;
} else if (bytesRead == 0) {
err = -1;
- logError(i18n("OSS device %1: No data to record").arg(m_DSPDeviceName));
+ logError(i18n("OSS device %1: No data to record").tqarg(m_DSPDeviceName));
} else {
err = errno;
}
@@ -514,7 +514,7 @@ void OSSSoundDevice::slotPoll()
buffer = m_CaptureBuffer.getData(size);
time_t cur_time = time(NULL);
size_t consumed_size = SIZE_T_DONT_CARE;
- notifySoundStreamData(m_CaptureStreamID, m_DSPFormat, buffer, size, consumed_size, SoundMetaData(m_CapturePos, cur_time - m_CaptureStartTime, cur_time, i18n("internal stream, not stored (%1)").arg(m_DSPDeviceName)));
+ notifySoundStreamData(m_CaptureStreamID, m_DSPFormat, buffer, size, consumed_size, SoundMetaData(m_CapturePos, cur_time - m_CaptureStartTime, cur_time, i18n("internal stream, not stored (%1)").tqarg(m_DSPDeviceName)));
if (consumed_size == SIZE_T_DONT_CARE)
consumed_size = size;
m_CaptureBuffer.removeData(consumed_size);
@@ -546,7 +546,7 @@ void OSSSoundDevice::slotPoll()
}
if (err) {
- logError(i18n("Error %1 while handling OSS device %2").arg(QString().setNum(err)).arg(m_DSPDeviceName));
+ logError(i18n("Error %1 while handling OSS device %2").tqarg(TQString().setNum(err)).tqarg(m_DSPDeviceName));
}
if (m_PlaybackStreamID.isValid())
@@ -554,8 +554,8 @@ void OSSSoundDevice::slotPoll()
if (m_CaptureStreamID.isValid())
checkMixerVolume(m_CaptureStreamID);
- QValueListConstIterator<SoundStreamID> end = m_PassivePlaybackStreams.end();
- for (QValueListConstIterator<SoundStreamID> it = m_PassivePlaybackStreams.begin(); it != end; ++it)
+ TQValueListConstIterator<SoundStreamID> end = m_PassivePlaybackStreams.end();
+ for (TQValueListConstIterator<SoundStreamID> it = m_PassivePlaybackStreams.begin(); it != end; ++it)
checkMixerVolume(*it);
}
@@ -590,13 +590,13 @@ bool OSSSoundDevice::openDSPDevice(const SoundFormat &format, bool reopen)
m_DSP_fd = open(m_DSPDeviceName.ascii(), O_NONBLOCK | O_RDONLY);
bool err = m_DSP_fd < 0;
if (err) {
- logError(i18n("Cannot open DSP device %1").arg(m_DSPDeviceName));
+ logError(i18n("Cannot open DSP device %1").tqarg(m_DSPDeviceName));
return false;
}
int caps = 0;
err |= (ioctl (m_DSP_fd, SNDCTL_DSP_GETCAPS, &caps) != 0);
if (err)
- logError(i18n("Cannot read DSP capabilities for %1").arg(m_DSPDeviceName));
+ logError(i18n("Cannot read DSP capabilities for %1").tqarg(m_DSPDeviceName));
m_DuplexMode = (caps & DSP_CAP_DUPLEX) ? DUPLEX_FULL : DUPLEX_HALF;
close (m_DSP_fd);
@@ -616,60 +616,60 @@ bool OSSSoundDevice::openDSPDevice(const SoundFormat &format, bool reopen)
err = m_DSP_fd < 0;
if (err) {
- logError(i18n("Cannot open DSP device %1").arg(m_DSPDeviceName));
+ logError(i18n("Cannot open DSP device %1").tqarg(m_DSPDeviceName));
return false;
}
int oss_format = getOSSFormat(m_DSPFormat);
err |= (ioctl(m_DSP_fd, SNDCTL_DSP_SETFMT, &oss_format) != 0);
if (err)
- logError(i18n("Cannot set DSP sample format for %1").arg(m_DSPDeviceName));
+ logError(i18n("Cannot set DSP sample format for %1").tqarg(m_DSPDeviceName));
int channels = m_DSPFormat.m_Channels;
err |= (ioctl(m_DSP_fd, SNDCTL_DSP_CHANNELS, &channels) != 0);
if (err)
- logError(i18n("Cannot set number of channels for %1").arg(m_DSPDeviceName));
+ logError(i18n("Cannot set number of channels for %1").tqarg(m_DSPDeviceName));
int rate = m_DSPFormat.m_SampleRate;
err |= (ioctl(m_DSP_fd, SNDCTL_DSP_SPEED, &rate) != 0);
if (err)
- logError(i18n("Cannot set sampling rate for %1").arg(m_DSPDeviceName));
+ logError(i18n("Cannot set sampling rate for %1").tqarg(m_DSPDeviceName));
if (rate != (int)m_DSPFormat.m_SampleRate) {
logWarning(i18n("Asking for %1 Hz but %2 uses %3 Hz").
- arg(QString::number(m_DSPFormat.m_SampleRate)).
+ arg(TQString::number(m_DSPFormat.m_SampleRate)).
arg(m_DSPDeviceName).
- arg(QString::number(rate)));
+ arg(TQString::number(rate)));
m_DSPFormat.m_SampleRate = rate;
}
int stereo = m_DSPFormat.m_Channels == 2;
err |= (ioctl(m_DSP_fd, SNDCTL_DSP_STEREO, &stereo) != 0);
if (err)
- logError(i18n("Cannot set stereo mode for %1").arg(m_DSPDeviceName));
+ logError(i18n("Cannot set stereo mode for %1").tqarg(m_DSPDeviceName));
unsigned sampleSize = m_DSPFormat.m_SampleBits;
err |= (ioctl(m_DSP_fd, SNDCTL_DSP_SAMPLESIZE, &sampleSize) != 0);
if (err || sampleSize != m_DSPFormat.m_SampleBits)
- logError(i18n("Cannot set sample size for %1").arg(m_DSPDeviceName));
+ logError(i18n("Cannot set sample size for %1").tqarg(m_DSPDeviceName));
// setup buffer, ask for 40ms latency
int tmp = (400 * m_DSPFormat.frameSize() * m_DSPFormat.m_SampleRate) / 1000;
- int mask = -1; for (; tmp; tmp >>= 1) ++mask;
- if (mask < 8) mask = 12; // default 4kB
- mask |= 0x7FFF0000;
- err |= ioctl (m_DSP_fd, SNDCTL_DSP_SETFRAGMENT, &mask);
+ int tqmask = -1; for (; tmp; tmp >>= 1) ++tqmask;
+ if (tqmask < 8) tqmask = 12; // default 4kB
+ tqmask |= 0x7FFF0000;
+ err |= ioctl (m_DSP_fd, SNDCTL_DSP_SETFRAGMENT, &tqmask);
if (err)
- logError(i18n("Cannot set buffers for %1").arg(m_DSPDeviceName));
+ logError(i18n("Cannot set buffers for %1").tqarg(m_DSPDeviceName));
int bufferBlockSize = 0;
err |= ioctl (m_DSP_fd, SNDCTL_DSP_GETBLKSIZE, &bufferBlockSize);
if (err) {
- logError(i18n("Cannot read buffer size for %1").arg(m_DSPDeviceName));
+ logError(i18n("Cannot read buffer size for %1").tqarg(m_DSPDeviceName));
} else {
- logInfo(i18n("%1 uses buffer blocks of %2 bytes").arg(m_DSPDeviceName).arg(QString::number(bufferBlockSize)));
+ logInfo(i18n("%1 uses buffer blocks of %2 bytes").tqarg(m_DSPDeviceName).tqarg(TQString::number(bufferBlockSize)));
size_t tmp = (((m_BufferSize - 1) / bufferBlockSize) + 1) * bufferBlockSize;
setBufferSize(tmp);
- logInfo(i18n("adjusted own buffer size to %1 bytes").arg(QString::number(tmp)));
+ logInfo(i18n("adjusted own buffer size to %1 bytes").tqarg(TQString::number(tmp)));
}
int trigger = ~PCM_ENABLE_INPUT & ~PCM_ENABLE_OUTPUT;
@@ -721,7 +721,7 @@ bool OSSSoundDevice::openMixerDevice(bool reopen)
m_Mixer_fd = open(m_MixerDeviceName.ascii(), O_RDONLY);
if (m_Mixer_fd < 0) {
- logError(i18n("Cannot open mixer device %1").arg(m_MixerDeviceName));
+ logError(i18n("Cannot open mixer device %1").tqarg(m_MixerDeviceName));
} else {
m_PollingTimer.start(40);
}
@@ -744,7 +744,7 @@ bool OSSSoundDevice::closeMixerDevice(bool force)
}
-void OSSSoundDevice::getMixerChannels(int query, QStringList &retval, QMap<QString, int> &revmap) const
+void OSSSoundDevice::getMixerChannels(int query, TQStringList &retval, TQMap<TQString, int> &revmap) const
{
retval.clear();
revmap.clear();
@@ -754,21 +754,21 @@ void OSSSoundDevice::getMixerChannels(int query, QStringList &retval, QMap<QStri
fd = open(m_MixerDeviceName.ascii(), O_RDONLY);
if (fd < 0) {
- logError(i18n("OSSSoundDevice::getMixerChannels: Cannot open mixer device %1").arg(m_MixerDeviceName));
+ logError(i18n("OSSSoundDevice::getMixerChannels: Cannot open mixer device %1").tqarg(m_MixerDeviceName));
}
if (fd >= 0) {
- int mask = 0;
- if ( ioctl(fd, MIXER_READ(query), &mask) == 0 ) {
+ int tqmask = 0;
+ if ( ioctl(fd, MIXER_READ(query), &tqmask) == 0 ) {
for (int i = 0; i < SOUND_MIXER_NRDEVICES; ++i) {
- if (mask & (1 << i)) {
+ if (tqmask & (1 << i)) {
static const char *labels[] = SOUND_DEVICE_LABELS;
retval.append(i18n(labels[i]));
revmap.insert(i18n(labels[i]), i);
}
}
} else {
- logError(i18n("OSSSoundDevice::getMixerChannels: Cannot read mixer device mask on device %1").arg(m_MixerDeviceName));
+ logError(i18n("OSSSoundDevice::getMixerChannels: Cannot read mixer device tqmask on device %1").tqarg(m_MixerDeviceName));
}
}
if (fd != m_Mixer_fd)
@@ -776,13 +776,13 @@ void OSSSoundDevice::getMixerChannels(int query, QStringList &retval, QMap<QStri
}
-const QStringList &OSSSoundDevice::getPlaybackChannels() const
+const TQStringList &OSSSoundDevice::getPlaybackChannels() const
{
return m_PlaybackChannels;
}
-const QStringList &OSSSoundDevice::getCaptureChannels() const
+const TQStringList &OSSSoundDevice::getCaptureChannels() const
{
return m_CaptureChannels;
}
@@ -790,7 +790,7 @@ const QStringList &OSSSoundDevice::getCaptureChannels() const
bool OSSSoundDevice::setPlaybackVolume(SoundStreamID id, float volume)
{
- if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id))) {
+ if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id))) {
SoundStreamConfig &cfg = m_PlaybackStreams[id];
if (rint(100*volume) != rint(100*cfg.m_Volume)) {
@@ -820,7 +820,7 @@ bool OSSSoundDevice::setCaptureVolume(SoundStreamID id, float volume)
bool OSSSoundDevice::getPlaybackVolume(SoundStreamID id, float &volume) const
{
- if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id))) {
+ if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id))) {
const SoundStreamConfig &cfg = m_PlaybackStreams[id];
volume = cfg.m_Volume;
return true;
@@ -844,7 +844,7 @@ void OSSSoundDevice::checkMixerVolume(SoundStreamID id)
{
if (m_Mixer_fd >= 0 && id.isValid()) {
- if (m_PassivePlaybackStreams.contains(id) || m_PlaybackStreamID == id) {
+ if (m_PassivePlaybackStreams.tqcontains(id) || m_PlaybackStreamID == id) {
SoundStreamConfig &cfg = m_PlaybackStreams[id];
float v = readMixerVolume(cfg.m_Channel);
@@ -874,8 +874,8 @@ float OSSSoundDevice::readMixerVolume(int channel) const
if (err) {
logError("OSSSound::readMixerVolume: " +
i18n("error %1 while reading volume from %2")
- .arg(QString().setNum(err))
- .arg(m_MixerDeviceName));
+ .tqarg(TQString().setNum(err))
+ .tqarg(m_MixerDeviceName));
tmpvol.l = tmpvol.r = 0;
}
return float(tmpvol.l) / 100.0;
@@ -897,9 +897,9 @@ float OSSSoundDevice::writeMixerVolume (int channel, float vol)
if (err != 0) {
logError("OSSSoundDevice::writeMixerVolume: " +
i18n("error %1 while setting volume to %2 on device %3")
- .arg(QString().setNum(err))
- .arg(QString().setNum(vol))
- .arg(m_MixerDeviceName));
+ .tqarg(TQString().setNum(err))
+ .tqarg(TQString().setNum(vol))
+ .tqarg(m_MixerDeviceName));
return -1;
}
}
@@ -913,21 +913,21 @@ void OSSSoundDevice::selectCaptureChannel (int channel)
int err = ioctl(m_Mixer_fd, SOUND_MIXER_WRITE_RECSRC, &x);
if (err)
logError(i18n("Selecting recording source on device %1 failed with error code %2")
- .arg(m_MixerDeviceName)
- .arg(QString::number(err)));
+ .tqarg(m_MixerDeviceName)
+ .tqarg(TQString::number(err)));
_lrvol tmpvol;
err = ioctl(m_Mixer_fd, MIXER_READ(SOUND_MIXER_IGAIN), &tmpvol);
if (err)
logError(i18n("Reading igain volume on device %1 failed with error code %2")
- .arg(m_MixerDeviceName)
- .arg(QString::number(err)));
+ .tqarg(m_MixerDeviceName)
+ .tqarg(TQString::number(err)));
if (tmpvol.r == 0 && tmpvol.l == 0) {
tmpvol.r = tmpvol.l = 1;
err = ioctl(m_Mixer_fd, MIXER_WRITE(SOUND_MIXER_IGAIN), &tmpvol);
if (err)
logError(i18n("Setting igain volume on device %1 failed with error code %2")
- .arg(m_MixerDeviceName)
- .arg(QString::number(err)));
+ .tqarg(m_MixerDeviceName)
+ .tqarg(TQString::number(err)));
}
}
@@ -972,7 +972,7 @@ void OSSSoundDevice::enableCapture(bool on)
}
-void OSSSoundDevice::setDSPDeviceName(const QString &s)
+void OSSSoundDevice::setDSPDeviceName(const TQString &s)
{
m_DSPDeviceName = s;
SoundFormat f = m_DSPFormat;
@@ -981,9 +981,9 @@ void OSSSoundDevice::setDSPDeviceName(const QString &s)
}
-QString OSSSoundDevice::getSoundStreamClientDescription() const
+TQString OSSSoundDevice::getSoundStreamClientDescription() const
{
- return i18n("OSS Sound Device %1").arg(PluginBase::name());
+ return i18n("OSS Sound Device %1").tqarg(PluginBase::name());
}
diff --git a/kradio3/plugins/oss-sound/oss-sound.h b/kradio3/plugins/oss-sound/oss-sound.h
index 139ee64..c8dadfd 100644
--- a/kradio3/plugins/oss-sound/oss-sound.h
+++ b/kradio3/plugins/oss-sound/oss-sound.h
@@ -26,8 +26,8 @@
#include "../../src/include/plugins.h"
#include "../../src/include/soundstreamclient_interfaces.h"
-#include <qobject.h>
-#include <qtimer.h>
+#include <tqobject.h>
+#include <tqtimer.h>
enum DUPLEX_MODE { DUPLEX_UNKNOWN, DUPLEX_FULL, DUPLEX_HALF };
@@ -58,14 +58,15 @@ struct SoundStreamConfig
};
-class OSSSoundDevice : public QObject,
+class OSSSoundDevice : public TQObject,
public PluginBase,
public ISoundStreamClient
{
Q_OBJECT
+ TQ_OBJECT
public:
- OSSSoundDevice (const QString &name);
+ OSSSoundDevice (const TQString &name);
virtual ~OSSSoundDevice ();
virtual bool connectI(Interface *i);
@@ -77,10 +78,10 @@ public:
virtual void saveState (KConfig *) const;
virtual void restoreState (KConfig *);
- virtual QString pluginClassName() const { return "OSSSoundDevice"; }
+ virtual TQString pluginClassName() const { return "OSSSoundDevice"; }
- 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();
@@ -89,8 +90,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);
@@ -98,16 +99,16 @@ ANSWERS:
bool supportsPlayback() const;
bool supportsCapture() const;
- QString getSoundStreamClientDescription() const;
+ TQString getSoundStreamClientDescription() const;
// ISoundStreamClient: mixer access
protected:
- void getMixerChannels(int query_playback_or_rec_mask, QStringList &retval, QMap<QString, int> &revmap) const;
+ void getMixerChannels(int query_playback_or_rec_tqmask, TQStringList &retval, TQMap<TQString, int> &revmap) const;
ANSWERS:
- const QStringList &getPlaybackChannels() const;
- const QStringList &getCaptureChannels() const;
+ const TQStringList &getPlaybackChannels() const;
+ const TQStringList &getCaptureChannels() const;
RECEIVERS:
bool setPlaybackVolume(SoundStreamID id, float volume);
@@ -145,14 +146,14 @@ RECEIVERS:
int getBufferSize() const { return m_BufferSize; }
bool isPlaybackEnabled() const { return m_EnablePlayback; }
bool isCaptureEnabled() const { return m_EnableCapture; }
- const QString &getDSPDeviceName() const { return m_DSPDeviceName; }
- const QString &getMixerDeviceName() const { return m_MixerDeviceName; }
+ const TQString &getDSPDeviceName() const { return m_DSPDeviceName; }
+ const TQString &getMixerDeviceName() const { return m_MixerDeviceName; }
void setBufferSize(int s);
void enablePlayback(bool on);
void enableCapture(bool on);
- void setDSPDeviceName(const QString &s);
- void setMixerDeviceName(const QString &dev_name);
+ void setDSPDeviceName(const TQString &s);
+ void setMixerDeviceName(const TQString &dev_name);
// own functions
@@ -180,23 +181,23 @@ protected:
void selectCaptureChannel (int channel);
- QString m_DSPDeviceName,
+ TQString m_DSPDeviceName,
m_MixerDeviceName;
int m_DSP_fd,
m_Mixer_fd;
DUPLEX_MODE m_DuplexMode;
SoundFormat m_DSPFormat;
- QStringList m_PlaybackChannels,
+ TQStringList m_PlaybackChannels,
m_CaptureChannels;
- QMap<QString, int> m_revPlaybackChannels,
+ TQMap<TQString, int> m_revPlaybackChannels,
m_revCaptureChannels;
- QMap<SoundStreamID, SoundStreamConfig>
+ TQMap<SoundStreamID, SoundStreamConfig>
m_PlaybackStreams,
m_CaptureStreams;
- QValueList<SoundStreamID>
+ TQValueList<SoundStreamID>
m_PassivePlaybackStreams;
SoundStreamID m_PlaybackStreamID,
m_CaptureStreamID;
@@ -206,7 +207,7 @@ protected:
m_CaptureBuffer;
unsigned m_CaptureRequestCounter;
- Q_UINT64 m_CapturePos;
+ TQ_UINT64 m_CapturePos;
time_t m_CaptureStartTime;
@@ -216,7 +217,7 @@ protected:
bool m_EnablePlayback,
m_EnableCapture;
- QTimer m_PollingTimer;
+ TQTimer m_PollingTimer;
};
diff --git a/kradio3/plugins/radio/radio-configuration-ui.ui b/kradio3/plugins/radio/radio-configuration-ui.ui
index eee95e9..e56fc37 100644
--- a/kradio3/plugins/radio/radio-configuration-ui.ui
+++ b/kradio3/plugins/radio/radio-configuration-ui.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>RadioConfigurationUI</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>RadioConfigurationUI</cstring>
</property>
@@ -16,11 +16,11 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QTabWidget" row="0" column="0">
+ <widget class="TQTabWidget" row="0" column="0">
<property name="name">
<cstring>tabWidget3</cstring>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>stations</cstring>
</property>
@@ -34,9 +34,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>layout32</cstring>
+ <cstring>tqlayout32</cstring>
</property>
<property name="margin" stdset="0">
<number>6</number>
@@ -45,7 +45,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>labelStationList</cstring>
</property>
@@ -53,17 +53,17 @@
<string>Stations</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout22</cstring>
+ <cstring>tqlayout22</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout9</cstring>
+ <cstring>tqlayout9</cstring>
</property>
<hbox>
<property name="name">
@@ -82,15 +82,15 @@
</sizepolicy>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonNewStation</cstring>
</property>
@@ -101,7 +101,7 @@
<iconset>"filenew2"</iconset>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonDeleteStation</cstring>
</property>
@@ -122,14 +122,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonStationUp</cstring>
</property>
@@ -140,7 +140,7 @@
<iconset>"1uparrow"</iconset>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonStationDown</cstring>
</property>
@@ -155,15 +155,15 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout21</cstring>
+ <cstring>tqlayout21</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonSearchStations</cstring>
</property>
@@ -179,10 +179,10 @@
<string>&amp;Search Stations</string>
</property>
<property name="iconSet">
- <iconset>"find"</iconset>
+ <iconset>"tqfind"</iconset>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonLoadPresets</cstring>
</property>
@@ -201,7 +201,7 @@
<iconset>"fileopen"</iconset>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonStorePresets</cstring>
</property>
@@ -226,19 +226,19 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget" row="0" column="1">
+ <widget class="TQLayoutWidget" row="0" column="1">
<property name="name">
- <cstring>layout18</cstring>
+ <cstring>tqlayout18</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QWidgetStack">
+ <widget class="TQWidgetStack">
<property name="name">
<cstring>stackStationEdit</cstring>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>page</cstring>
</property>
@@ -247,15 +247,15 @@
</attribute>
</widget>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout7</cstring>
+ <cstring>tqlayout7</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>labelStationName</cstring>
</property>
@@ -263,7 +263,7 @@
<string>Name</string>
</property>
</widget>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>editStationName</cstring>
</property>
@@ -278,15 +278,15 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout32</cstring>
+ <cstring>tqlayout32</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>labelStationShortName</cstring>
</property>
@@ -294,7 +294,7 @@
<string>Short Name</string>
</property>
</widget>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>editStationShortName</cstring>
</property>
@@ -309,15 +309,15 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout6</cstring>
+ <cstring>tqlayout6</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>labelPixmapFile</cstring>
</property>
@@ -325,15 +325,15 @@
<string>Pixmap File</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>editPixmapFile</cstring>
</property>
@@ -346,7 +346,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonSelectPixmapFile</cstring>
</property>
@@ -358,7 +358,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
@@ -375,15 +375,15 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout19</cstring>
+ <cstring>tqlayout19</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>pixmapStation</cstring>
</property>
@@ -395,7 +395,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>20</width>
<height>20</height>
@@ -415,7 +415,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>10</width>
<height>5</height>
@@ -434,22 +434,22 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout20</cstring>
+ <cstring>tqlayout20</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>editVolumePreset</cstring>
</property>
@@ -463,7 +463,7 @@
<number>-1</number>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>labelVolumePreset</cstring>
</property>
@@ -481,7 +481,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>21</width>
<height>20</height>
@@ -492,15 +492,15 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="2">
+ <widget class="TQLayoutWidget" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
- <cstring>layout25</cstring>
+ <cstring>tqlayout25</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>editLabelPresetFile</cstring>
</property>
@@ -517,7 +517,7 @@
</widget>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>About</cstring>
</property>
@@ -541,22 +541,22 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>21</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLayoutWidget" row="0" column="0" rowspan="1" colspan="3">
+ <widget class="TQLayoutWidget" row="0" column="0" rowspan="1" colspan="3">
<property name="name">
- <cstring>layout21</cstring>
+ <cstring>tqlayout21</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>labelCity</cstring>
</property>
@@ -564,12 +564,12 @@
<string>City</string>
</property>
</widget>
- <widget class="QLineEdit" row="2" column="1">
+ <widget class="TQLineEdit" row="2" column="1">
<property name="name">
<cstring>editCountry</cstring>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>labelCountry</cstring>
</property>
@@ -577,15 +577,15 @@
<string>Country</string>
</property>
</widget>
- <widget class="QLayoutWidget" row="1" column="1">
+ <widget class="TQLayoutWidget" row="1" column="1">
<property name="name">
- <cstring>layout19</cstring>
+ <cstring>tqlayout19</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QDateTimeEdit">
+ <widget class="TQDateTimeEdit">
<property name="name">
<cstring>editLastChange</cstring>
</property>
@@ -601,7 +601,7 @@
<enum>StrongFocus</enum>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonLastChangeNow</cstring>
</property>
@@ -619,7 +619,7 @@
</widget>
</hbox>
</widget>
- <widget class="QLabel" row="5" column="0">
+ <widget class="TQLabel" row="5" column="0">
<property name="name">
<cstring>labelComment</cstring>
</property>
@@ -627,12 +627,12 @@
<string>Comment</string>
</property>
</widget>
- <widget class="QLineEdit" row="5" column="1">
+ <widget class="TQLineEdit" row="5" column="1">
<property name="name">
<cstring>editComment</cstring>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>labelMedia</cstring>
</property>
@@ -640,7 +640,7 @@
<string>Media</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>labelMaintainer</cstring>
</property>
@@ -648,12 +648,12 @@
<string>Maintainer</string>
</property>
</widget>
- <widget class="QLineEdit" row="3" column="1">
+ <widget class="TQLineEdit" row="3" column="1">
<property name="name">
<cstring>editCity</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>labelLastChange</cstring>
</property>
@@ -661,12 +661,12 @@
<string>Last Change</string>
</property>
</widget>
- <widget class="QLineEdit" row="0" column="1">
+ <widget class="TQLineEdit" row="0" column="1">
<property name="name">
<cstring>editMaintainer</cstring>
</property>
</widget>
- <widget class="QLineEdit" row="4" column="1">
+ <widget class="TQLineEdit" row="4" column="1">
<property name="name">
<cstring>editMedia</cstring>
</property>
@@ -683,21 +683,21 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLabel" row="2" column="0" rowspan="1" colspan="3">
+ <widget class="TQLabel" row="2" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>textLabel1</cstring>
</property>
<property name="text">
<string>&lt;p align="center"&gt;Click on the link below to contribute this station preset file to the kradio project.&lt;/p&gt;</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignCenter</set>
</property>
</widget>
@@ -705,7 +705,7 @@
<property name="name">
<cstring>mailLabel</cstring>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignCenter</set>
</property>
</widget>
@@ -760,11 +760,11 @@
</tabstops>
<includes>
<include location="global" impldecl="in implementation">kiconloader.h</include>
- <include location="global" impldecl="in implementation">qwidgetstack.h</include>
+ <include location="global" impldecl="in implementation">tqwidgetstack.h</include>
<include location="global" impldecl="in implementation">src/include/radiostation-listview.h</include>
</includes>
<pixmapfunction>SmallIconSet</pixmapfunction>
-<layoutdefaults spacing="6" margin="0"/>
+<tqlayoutdefaults spacing="6" margin="0"/>
<includehints>
<includehint>src/include/radiostation-listview.h</includehint>
<includehint>kurlrequester.h</includehint>
diff --git a/kradio3/plugins/radio/radio-configuration.cpp b/kradio3/plugins/radio/radio-configuration.cpp
index 321d17c..f28b933 100644
--- a/kradio3/plugins/radio/radio-configuration.cpp
+++ b/kradio3/plugins/radio/radio-configuration.cpp
@@ -28,82 +28,82 @@
#include <math.h>
-#include <qlistbox.h>
+#include <tqlistbox.h>
#include <klistbox.h>
-#include <qdatetimeedit.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qspinbox.h>
-#include <qpushbutton.h>
-#include <qpopupmenu.h>
-#include <qtoolbutton.h>
-#include <qwidgetstack.h>
-#include <qimage.h>
+#include <tqdatetimeedit.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqspinbox.h>
+#include <tqpushbutton.h>
+#include <tqpopupmenu.h>
+#include <tqtoolbutton.h>
+#include <tqwidgetstack.h>
+#include <tqimage.h>
#include <kfiledialog.h>
#include <kstandarddirs.h>
#include <kurllabel.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <krun.h>
#include <kurlrequester.h>
#include <klocale.h>
-RadioConfiguration::RadioConfiguration (QWidget *parent, const IErrorLogClient &logger)
- : RadioConfigurationUI(parent),
+RadioConfiguration::RadioConfiguration (TQWidget *tqparent, const IErrorLogClient &logger)
+ : RadioConfigurationUI(tqparent),
ignoreChanges(false),
devicePopup(NULL),
m_logger(logger),
m_dirty(true)
{
- QObject::connect(listStations, SIGNAL(sigCurrentStationChanged(int)),
- this, SLOT(slotStationSelectionChanged(int)));
- QObject::connect(buttonSelectPixmapFile, SIGNAL(clicked()),
- this, SLOT(slotSelectPixmap()));
- QObject::connect(buttonNewStation, SIGNAL(clicked()),
- this, SLOT(slotNewStation()));
- QObject::connect(buttonDeleteStation, SIGNAL(clicked()),
- this, SLOT(slotDeleteStation()));
- QObject::connect(editPixmapFile, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotPixmapChanged(const QString &)));
- QObject::connect(editStationName, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotStationNameChanged(const QString &)));
- QObject::connect(editStationShortName, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotStationShortNameChanged(const QString &)));
- QObject::connect(editVolumePreset, SIGNAL(valueChanged(int)),
- this, SLOT(slotVolumePresetChanged(int)));
- QObject::connect(buttonStationUp, SIGNAL(clicked()),
- this, SLOT(slotStationUp()));
- QObject::connect(buttonStationDown, SIGNAL(clicked()),
- this, SLOT(slotStationDown()));
- QObject::connect(listStations, SIGNAL(sigStationActivated(int)),
- this, SLOT(slotActivateStation( int )));
- QObject::connect(buttonLoadPresets, SIGNAL(clicked()),
- this, SLOT(slotLoadPresets()));
- QObject::connect(buttonStorePresets, SIGNAL(clicked()),
- this, SLOT(slotStorePresets()));
- QObject::connect(buttonLastChangeNow, SIGNAL(clicked()),
- this, SLOT(slotLastChangeNow()));
-
- connect(editMaintainer, SIGNAL(textChanged(const QString &)), SLOT(slotSetDirty()));
- connect(editLastChange, SIGNAL(valueChanged(const QDateTime &)), SLOT(slotSetDirty()));
- connect(editCountry, SIGNAL(textChanged(const QString &)), SLOT(slotSetDirty()));
- connect(editCity, SIGNAL(textChanged(const QString &)), SLOT(slotSetDirty()));
- connect(editMedia, SIGNAL(textChanged(const QString &)), SLOT(slotSetDirty()));
- connect(editComment, SIGNAL(textChanged(const QString &)), SLOT(slotSetDirty()));
- connect(editPresetFile, SIGNAL(textChanged(const QString &)), SLOT(slotSetDirty()));
+ TQObject::connect(listStations, TQT_SIGNAL(sigCurrentStationChanged(int)),
+ this, TQT_SLOT(slotStationSelectionChanged(int)));
+ TQObject::connect(buttonSelectPixmapFile, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotSelectPixmap()));
+ TQObject::connect(buttonNewStation, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotNewStation()));
+ TQObject::connect(buttonDeleteStation, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotDeleteStation()));
+ TQObject::connect(editPixmapFile, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(slotPixmapChanged(const TQString &)));
+ TQObject::connect(editStationName, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(slotStationNameChanged(const TQString &)));
+ TQObject::connect(editStationShortName, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(slotStationShortNameChanged(const TQString &)));
+ TQObject::connect(editVolumePreset, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(slotVolumePresetChanged(int)));
+ TQObject::connect(buttonStationUp, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotStationUp()));
+ TQObject::connect(buttonStationDown, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotStationDown()));
+ TQObject::connect(listStations, TQT_SIGNAL(sigStationActivated(int)),
+ this, TQT_SLOT(slotActivateStation( int )));
+ TQObject::connect(buttonLoadPresets, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotLoadPresets()));
+ TQObject::connect(buttonStorePresets, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotStorePresets()));
+ TQObject::connect(buttonLastChangeNow, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotLastChangeNow()));
+
+ connect(editMaintainer, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(slotSetDirty()));
+ connect(editLastChange, TQT_SIGNAL(valueChanged(const TQDateTime &)), TQT_SLOT(slotSetDirty()));
+ connect(editCountry, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(slotSetDirty()));
+ connect(editCity, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(slotSetDirty()));
+ connect(editMedia, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(slotSetDirty()));
+ connect(editComment, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(slotSetDirty()));
+ connect(editPresetFile, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(slotSetDirty()));
mailLabel->setText("mailto:witte-presets@kawo1.rwth-aachen.de");
mailLabel->setURL ("mailto:witte-presets@kawo1.rwth-aachen.de");
- QObject::connect(mailLabel, SIGNAL(leftClickedURL(const QString &)),
- this, SLOT(slotSendPresetsByMail(const QString &)));
+ TQObject::connect(mailLabel, TQT_SIGNAL(leftClickedURL(const TQString &)),
+ this, TQT_SLOT(slotSendPresetsByMail(const TQString &)));
- QObject::connect(buttonSearchStations, SIGNAL(clicked()),
- this, SLOT(slotSearchStations0()));
+ TQObject::connect(buttonSearchStations, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotSearchStations0()));
- devicePopup = new QPopupMenu(buttonSearchStations);
+ devicePopup = new TQPopupMenu(buttonSearchStations);
buttonSearchStations->setPopup(devicePopup);
- QObject::connect(devicePopup, SIGNAL(activated(int)),
- this, SLOT(slotSearchStations(int)));
+ TQObject::connect(devicePopup, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotSearchStations(int)));
}
@@ -130,9 +130,9 @@ bool RadioConfiguration::disconnectI (Interface *i)
// IRadioDevicePoolClient
-bool RadioConfiguration::noticeDevicesChanged(const QPtrList<IRadioDevice> &l)
+bool RadioConfiguration::noticeDevicesChanged(const TQPtrList<IRadioDevice> &l)
{
- QPtrListIterator<IRadioDevice> it(l);
+ TQPtrListIterator<IRadioDevice> it(l);
devices.clear();
devicePopup->clear();
int id = 0;
@@ -147,7 +147,7 @@ bool RadioConfiguration::noticeDevicesChanged(const QPtrList<IRadioDevice> &l)
}
-bool RadioConfiguration::noticeDeviceDescriptionChanged(const QString &)
+bool RadioConfiguration::noticeDeviceDescriptionChanged(const TQString &)
{
noticeDevicesChanged(queryDevices());
return true;
@@ -181,7 +181,7 @@ bool RadioConfiguration::noticeStationsChanged(const StationList &sl)
}
-bool RadioConfiguration::noticePresetFileChanged(const QString &f)
+bool RadioConfiguration::noticePresetFileChanged(const TQString &f)
{
ignoreChanges = true;
editPresetFile->setURL(f);
@@ -215,12 +215,12 @@ void RadioConfiguration::slotStationSelectionChanged(int idx)
if (ignoreChanges) return;
ignoreChanges = true;
- editStationName ->setText (s ? s->name() : QString::null);
- editStationShortName ->setText (s ? s->shortName() : QString::null);
- editPixmapFile ->setText (s ? s->iconName() : QString::null);
+ editStationName ->setText (s ? s->name() : TQString());
+ editStationShortName ->setText (s ? s->shortName() : TQString());
+ editPixmapFile ->setText (s ? s->iconName() : TQString());
editVolumePreset ->setValue (s ? (int)rint(s->initialVolume()*100) : -1);
- QPixmap pixmap(s ? s->iconName() : QString::null);
+ TQPixmap pixmap(s ? s->iconName() : TQString());
if (!pixmap.isNull()) {
pixmapStation->setPixmap(pixmap);
} else {
@@ -230,13 +230,13 @@ void RadioConfiguration::slotStationSelectionChanged(int idx)
stackStationEdit->setDisabled(!s);
if (s) {
- RadioStationConfig *c = stationEditors.find(s->getClassName());
+ RadioStationConfig *c = stationEditors.tqfind(s->getClassName());
if (!c) {
c = s->createEditor();
if (c) {
- c->reparent(this, QPoint(0,0), true);
- QObject::connect(c, SIGNAL(changed(RadioStationConfig*)),
- this, SLOT(slotStationEditorChanged(RadioStationConfig*)));
+ c->reparent(this, TQPoint(0,0), true);
+ TQObject::connect(c, TQT_SIGNAL(changed(RadioStationConfig*)),
+ this, TQT_SLOT(slotStationEditorChanged(RadioStationConfig*)));
stationEditors.insert(s->getClassName(), c);
stackStationEdit->addWidget(c);
}
@@ -306,7 +306,7 @@ void RadioConfiguration::slotStationEditorChanged(RadioStationConfig *c)
}
-void RadioConfiguration::slotStationNameChanged( const QString & s)
+void RadioConfiguration::slotStationNameChanged( const TQString & s)
{
if (ignoreChanges) return;
@@ -325,7 +325,7 @@ void RadioConfiguration::slotStationNameChanged( const QString & s)
}
-void RadioConfiguration::slotStationShortNameChanged( const QString & sn)
+void RadioConfiguration::slotStationShortNameChanged( const TQString & sn)
{
if (ignoreChanges) return;
@@ -346,7 +346,7 @@ void RadioConfiguration::slotStationShortNameChanged( const QString & sn)
void RadioConfiguration::slotSelectPixmap()
{
- KURL url = KFileDialog::getImageOpenURL(QString::null, this,
+ KURL url = KFileDialog::getImageOpenURL(TQString(), this,
i18n("Image Selection"));
if (!url.isEmpty()) {
if (url.isLocalFile()) {
@@ -358,7 +358,7 @@ void RadioConfiguration::slotSelectPixmap()
}
-void RadioConfiguration::slotPixmapChanged( const QString &s )
+void RadioConfiguration::slotPixmapChanged( const TQString &s )
{
if (ignoreChanges) return;
@@ -368,7 +368,7 @@ void RadioConfiguration::slotPixmapChanged( const QString &s )
RadioStation &st = m_stations.at(idx);
st.setIconName(s);
ignoreChanges = true;
- pixmapStation->setPixmap(QPixmap(s));
+ pixmapStation->setPixmap(TQPixmap(s));
bool o = listStations->signalsBlocked();
listStations->blockSignals(true);
listStations->setStation(idx, st);
@@ -454,7 +454,7 @@ void RadioConfiguration::slotLoadPresets()
fd.setMode(KFile::File | KFile::ExistingOnly);
fd.setCaption (i18n("Select Preset File"));
- if (fd.exec() == QDialog::Accepted) {
+ if (fd.exec() == TQDialog::Accepted) {
slotSetDirty();
StationList sl;
if (sl.readXML(fd.selectedURL(), m_logger)) {
@@ -474,7 +474,7 @@ void RadioConfiguration::slotStorePresets()
fd.setMode(KFile::File);
fd.setCaption (i18n("Store Preset File"));
- if (fd.exec() == QDialog::Accepted) {
+ if (fd.exec() == TQDialog::Accepted) {
editPresetFile->setURL(fd.selectedURL().url());
m_stations.writeXML(fd.selectedURL(), m_logger);
}
@@ -484,46 +484,46 @@ void RadioConfiguration::slotStorePresets()
void RadioConfiguration::slotLastChangeNow()
{
slotSetDirty();
- editLastChange->setDateTime(QDateTime::currentDateTime());
+ editLastChange->setDateTime(TQDateTime::tqcurrentDateTime());
}
-static QString &urlEscapes(QString &s)
+static TQString &urlEscapes(TQString &s)
{
- s.replace(QRegExp("%"), "%25");
- s.replace(QRegExp("\t"), "%09");
- s.replace(QRegExp("\n"), "%0A");
- s.replace(QRegExp("\n"), "%0D");
- s.replace(QRegExp(" "), "%20");
- s.replace(QRegExp("\\!"), "%21");
- s.replace(QRegExp("\""), "%22");
- s.replace(QRegExp("#"), "%23");
- s.replace(QRegExp("\\$"), "%24");
- s.replace(QRegExp("\\&"), "%26");
- s.replace(QRegExp("'"), "%27");
- s.replace(QRegExp(","), "%2C");
- s.replace(QRegExp(":"), "%3A");
- s.replace(QRegExp(";"), "%3B");
- s.replace(QRegExp("="), "%3D");
- s.replace(QRegExp("\\?"), "%3F");
+ s.tqreplace(TQRegExp("%"), "%25");
+ s.tqreplace(TQRegExp("\t"), "%09");
+ s.tqreplace(TQRegExp("\n"), "%0A");
+ s.tqreplace(TQRegExp("\n"), "%0D");
+ s.tqreplace(TQRegExp(" "), "%20");
+ s.tqreplace(TQRegExp("\\!"), "%21");
+ s.tqreplace(TQRegExp("\""), "%22");
+ s.tqreplace(TQRegExp("#"), "%23");
+ s.tqreplace(TQRegExp("\\$"), "%24");
+ s.tqreplace(TQRegExp("\\&"), "%26");
+ s.tqreplace(TQRegExp("'"), "%27");
+ s.tqreplace(TQRegExp(","), "%2C");
+ s.tqreplace(TQRegExp(":"), "%3A");
+ s.tqreplace(TQRegExp(";"), "%3B");
+ s.tqreplace(TQRegExp("="), "%3D");
+ s.tqreplace(TQRegExp("\\?"), "%3F");
return s;
}
-void RadioConfiguration::slotSendPresetsByMail( const QString &url )
+void RadioConfiguration::slotSendPresetsByMail( const TQString &url )
{
- QString presets = m_stations.writeXML(m_logger);
+ TQString presets = m_stations.writeXML(m_logger);
urlEscapes(presets);
// documentation says, krun object deletes itself,
// so we do not need to store the pointer
- QString country = m_stations.metaData().country;
- QString city = m_stations.metaData().city;
- QString location = city + "/" + country;
+ TQString country = m_stations.metaData().country;
+ TQString city = m_stations.metaData().city;
+ TQString location = city + "/" + country;
urlEscapes(location);
- QString cmd = url + "?subject=station preset file for " + location + "&body=";
+ TQString cmd = url + "?subject=station preset file for " + location + "&body=";
cmd += presets;
new KRun (cmd);
@@ -541,7 +541,7 @@ void RadioConfiguration::slotSearchStations(int idev)
sendActiveDevice(dev);
x->show();
x->start();
- if (x->exec() == QDialog::Accepted) {
+ if (x->exec() == TQDialog::Accepted) {
slotSetDirty();
m_stations.merge(x->getStations());
noticeStationsChanged(m_stations);
diff --git a/kradio3/plugins/radio/radio-configuration.h b/kradio3/plugins/radio/radio-configuration.h
index 31b29c8..b9c52b0 100644
--- a/kradio3/plugins/radio/radio-configuration.h
+++ b/kradio3/plugins/radio/radio-configuration.h
@@ -22,14 +22,14 @@
#include <config.h>
#endif
-#include <qdict.h>
+#include <tqdict.h>
#include "../../src/include/radio_interfaces.h"
#include "../../src/include/stationlist.h"
#include "../../src/include/radiodevicepool_interfaces.h"
#include "radio-configuration-ui.h"
-class QPopupMenu;
+class TQPopupMenu;
class RadioStationConfig;
class RadioConfiguration : public RadioConfigurationUI,
@@ -37,8 +37,9 @@ class RadioConfiguration : public RadioConfigurationUI,
public IRadioDevicePoolClient
{
Q_OBJECT
+ TQ_OBJECT
public :
- RadioConfiguration (QWidget *parent, const IErrorLogClient &m_logger);
+ RadioConfiguration (TQWidget *tqparent, const IErrorLogClient &m_logger);
~RadioConfiguration ();
bool connectI (Interface *i);
@@ -48,8 +49,8 @@ public :
RECEIVERS:
bool noticeActiveDeviceChanged(IRadioDevice *) { return false; }
- bool noticeDevicesChanged(const QPtrList<IRadioDevice> &);
- bool noticeDeviceDescriptionChanged(const QString &);
+ bool noticeDevicesChanged(const TQPtrList<IRadioDevice> &);
+ bool noticeDeviceDescriptionChanged(const TQString &);
// IRadioClient
@@ -57,7 +58,7 @@ RECEIVERS:
bool noticePowerChanged(bool /*on*/) { return false; } // don't care
bool noticeStationChanged (const RadioStation &, int /*idx*/) { return false; } // don't care
bool noticeStationsChanged(const StationList &sl);
- bool noticePresetFileChanged(const QString &f);
+ bool noticePresetFileChanged(const TQString &f);
bool noticeCurrentSoundStreamIDChanged(SoundStreamID /*id*/) { return false; }
@@ -67,9 +68,9 @@ protected slots:
void slotNewStation();
void slotDeleteStation();
void slotStationEditorChanged(RadioStationConfig *c);
- void slotStationNameChanged( const QString & s);
- void slotStationShortNameChanged( const QString & sn);
- void slotPixmapChanged( const QString &s );
+ void slotStationNameChanged( const TQString & s);
+ void slotStationShortNameChanged( const TQString & sn);
+ void slotPixmapChanged( const TQString &s );
void slotSelectPixmap();
void slotVolumePresetChanged(int v);
void slotStationUp();
@@ -78,7 +79,7 @@ protected slots:
void slotLoadPresets();
void slotStorePresets();
void slotLastChangeNow();
- void slotSendPresetsByMail( const QString &url );
+ void slotSendPresetsByMail( const TQString &url );
void slotSearchStations(int i);
void slotSearchStations0() { slotSearchStations(0); }
@@ -93,10 +94,10 @@ protected:
StationList m_stations;
bool ignoreChanges;
- QPopupMenu *devicePopup;
- QPtrList<IRadioDevice> devices;
+ TQPopupMenu *devicePopup;
+ TQPtrList<IRadioDevice> devices;
- QDict<RadioStationConfig> stationEditors;
+ TQDict<RadioStationConfig> stationEditors;
const IErrorLogClient &m_logger;
bool m_dirty;
diff --git a/kradio3/plugins/radio/radio.cpp b/kradio3/plugins/radio/radio.cpp
index 2320f56..af14e66 100644
--- a/kradio3/plugins/radio/radio.cpp
+++ b/kradio3/plugins/radio/radio.cpp
@@ -35,7 +35,7 @@ PLUGIN_LIBRARY_FUNCTIONS(Radio, "kradio-radio", i18n("Central Radio Device Multi
/////////////////////////////////////////////////////////////////////////////
-Radio::Radio(const QString &name)
+Radio::Radio(const TQString &name)
: PluginBase(name, i18n("Radio Multiplexer Plugin")),
IRadioDeviceClient(-1),
m_presetFile(locateLocal("data", "kradio/stations.krp")),
@@ -79,7 +79,7 @@ bool Radio::disconnectI (Interface *i)
void Radio::saveState (KConfig *config) const
{
- config->setGroup(QString("radio-") + name());
+ config->setGroup(TQString("radio-") + name());
config->writeEntry("presetfile", m_presetFile);
@@ -89,10 +89,10 @@ void Radio::saveState (KConfig *config) const
void Radio::restoreState (KConfig *config)
{
- config->setGroup(QString("radio-") + name());
+ config->setGroup(TQString("radio-") + name());
m_presetFile = config->readEntry("presetfile",
- QString::null);
+ TQString());
bool first_restore = false;
if (m_presetFile.isNull() || m_presetFile.length() == 0) {
m_presetFile = locateLocal("data", "kradio/stations.krp");
@@ -205,7 +205,7 @@ bool Radio::setStations(const StationList &sl)
return true;
}
-bool Radio::setPresetFile(const QString &presetFile)
+bool Radio::setPresetFile(const TQString &presetFile)
{
if (m_presetFile != presetFile) {
m_presetFile = presetFile;
@@ -217,7 +217,7 @@ bool Radio::setPresetFile(const QString &presetFile)
int Radio::getStationIdx(const RadioStation &rs) const
{
RawStationList &sl = const_cast<RawStationList&>(m_stationList.all());
- return sl.find(&rs);
+ return sl.tqfind(&rs);
}
int Radio::getCurrentStationIdx() const
@@ -245,7 +245,7 @@ bool Radio::setActiveDevice(IRadioDevice *rd, bool keepPower)
// check if new station is in "connections"
// special case: rd == NULL: power off active device, new active device = NULL
- if (!rd || IRadioDeviceClient::iConnections.containsRef(rd)) { // new device is ok
+ if (!rd || IRadioDeviceClient::iConnections.tqcontainsRef(rd)) { // new device is ok
// save old power state and power off old device
bool oldPowerOn = false;
@@ -280,13 +280,13 @@ IRadioDevice *Radio::getActiveDevice() const
}
-const QPtrList<IRadioDevice> &Radio::getDevices() const
+const TQPtrList<IRadioDevice> &Radio::getDevices() const
{
return IRadioDeviceClient::iConnections;
}
-const QString &Radio::getDeviceDescription() const
+const TQString &Radio::getDeviceDescription() const
{
return queryDescription();
}
@@ -348,9 +348,9 @@ const RadioStation & Radio::queryCurrentStation() const
}
-static QString qstrUnknown(I18N_NOOP("unknown"));
-static QString i18nqstrUnknown;
-const QString &Radio::queryDescription() const
+static TQString qstrUnknown(I18N_NOOP("unknown"));
+static TQString i18nqstrUnknown;
+const TQString &Radio::queryDescription() const
{
return m_activeDevice ? m_activeDevice->getDescription() : (i18nqstrUnknown = i18n(qstrUnknown.ascii()));
}
@@ -392,7 +392,7 @@ bool Radio::noticeStationChanged (const RadioStation &_rs, const IRadioDevice *s
}
-bool Radio::noticeDescriptionChanged (const QString &s, const IRadioDevice *sender)
+bool Radio::noticeDescriptionChanged (const TQString &s, const IRadioDevice *sender)
{
if (sender == m_activeDevice)
notifyDeviceDescriptionChanged(s);
@@ -433,13 +433,13 @@ void Radio::noticeDisconnectI(IRadioDeviceClient::cmplInterface *rd, bool pointe
if (rd == m_activeDevice) {
// search a new active device
- if (IRadioDeviceClient::iConnections.findRef(rd) >= 0) {
+ if (IRadioDeviceClient::iConnections.tqfindRef(rd) >= 0) {
IRadioDevice *new_rd = NULL;
new_rd = IRadioDeviceClient::iConnections.next(); // choose next device as active device if next exists
if (!new_rd) {
- IRadioDeviceClient::iConnections.findRef(rd);
+ IRadioDeviceClient::iConnections.tqfindRef(rd);
new_rd = IRadioDeviceClient::iConnections.prev(); // otherwise try prev then, may be NULL (no connections)
}
setActiveDevice(new_rd);
diff --git a/kradio3/plugins/radio/radio.h b/kradio3/plugins/radio/radio.h
index 7913c16..d125eee 100644
--- a/kradio3/plugins/radio/radio.h
+++ b/kradio3/plugins/radio/radio.h
@@ -56,7 +56,7 @@ class Radio : public PluginBase,
public ISoundStreamClient
{
public:
- Radio(const QString &name);
+ Radio(const TQString &name);
~Radio();
@@ -66,10 +66,10 @@ public:
virtual void saveState (KConfig *) const;
virtual void restoreState (KConfig *);
- virtual QString pluginClassName() const { return "Radio"; }
+ virtual TQString pluginClassName() const { return "Radio"; }
- 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();
@@ -84,7 +84,7 @@ RECEIVERS:
bool activateStation(const RadioStation &rs);
bool activateStation(int index);
bool setStations(const StationList &sl);
- bool setPresetFile(const QString &presetFile);
+ bool setPresetFile(const TQString &presetFile);
ANSWERS:
bool isPowerOn() const { return queryIsPowerOn(); }
@@ -93,7 +93,7 @@ ANSWERS:
int getStationIdx(const RadioStation &) const;
int getCurrentStationIdx() const;
const StationList & getStations() const { return m_stationList; }
- const QString & getPresetFile() const { return m_presetFile; }
+ const TQString & getPresetFile() const { return m_presetFile; }
SoundStreamID getCurrentSoundStreamID() const;
@@ -112,8 +112,8 @@ RECEIVERS:
ANSWERS:
IRadioDevice * getActiveDevice() const;
- const QPtrList<IRadioDevice> & getDevices() const;
- const QString & getDeviceDescription() const;
+ const TQPtrList<IRadioDevice> & getDevices() const;
+ const TQString & getDeviceDescription() const;
@@ -125,17 +125,17 @@ SENDERS:
IF_SENDER ( sendPowerOff() )
IF_SENDER ( sendActivateStation (const RadioStation &rs) )
-QUERIES:
- IF_QUERY ( bool queryIsPowerOn() )
- IF_QUERY ( bool queryIsPowerOff() )
- IF_QUERY ( const RadioStation & queryCurrentStation() )
- IF_QUERY ( const QString & queryDescription() )
- IF_QUERY ( SoundStreamID queryCurrentSoundStreamID() )
+TQUERIES:
+ IF_TQUERY ( bool queryIsPowerOn() )
+ IF_TQUERY ( bool queryIsPowerOff() )
+ IF_TQUERY ( const RadioStation & queryCurrentStation() )
+ IF_TQUERY ( const TQString & queryDescription() )
+ IF_TQUERY ( SoundStreamID queryCurrentSoundStreamID() )
RECEIVERS:
virtual bool noticePowerChanged (bool on, const IRadioDevice *sender = NULL);
virtual bool noticeStationChanged (const RadioStation &rs, const IRadioDevice *sender = NULL);
- virtual bool noticeDescriptionChanged (const QString &, const IRadioDevice *sender = NULL);
+ virtual bool noticeDescriptionChanged (const TQString &, const IRadioDevice *sender = NULL);
virtual bool noticeCurrentSoundStreamIDChanged(SoundStreamID id, const IRadioDevice *sender = NULL);
@@ -145,7 +145,7 @@ RECEIVERS:
bool noticeAlarmsChanged(const AlarmVector &) { return false; } // ignore
bool noticeAlarm(const Alarm &);
bool noticeNextAlarmChanged(const Alarm *) { return false; } // ignore
- bool noticeCountdownStarted(const QDateTime &/*end*/){ return false; } // ignore
+ bool noticeCountdownStarted(const TQDateTime &/*end*/){ return false; } // ignore
bool noticeCountdownStopped() { return false; } // ignore
bool noticeCountdownZero();
bool noticeCountdownSecondsChanged(int /*n*/) { return false; } // ignore
@@ -158,7 +158,7 @@ RECEIVERS:
protected:
- QString m_presetFile;
+ TQString m_presetFile;
StationList m_stationList;
IRadioDevice *m_activeDevice;
};
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;
diff --git a/kradio3/plugins/soundserver/soundserver.cpp b/kradio3/plugins/soundserver/soundserver.cpp
index 448bf14..c1cd014 100644
--- a/kradio3/plugins/soundserver/soundserver.cpp
+++ b/kradio3/plugins/soundserver/soundserver.cpp
@@ -28,7 +28,7 @@ PLUGIN_LIBRARY_FUNCTIONS(SoundServer, "kradio-soundserver", i18n("SoundServer"))
/////////////////////////////////////////////////////////////////////////////
-SoundServer::SoundServer(const QString &name)
+SoundServer::SoundServer(const TQString &name)
: PluginBase(name, i18n("SoundServer Plugin"))
{
logDebug(i18n("initializing kradio soundserver"));
diff --git a/kradio3/plugins/soundserver/soundserver.h b/kradio3/plugins/soundserver/soundserver.h
index 01f2377..23f5fb3 100644
--- a/kradio3/plugins/soundserver/soundserver.h
+++ b/kradio3/plugins/soundserver/soundserver.h
@@ -30,16 +30,16 @@ class SoundServer : public PluginBase,
public ISoundStreamServer
{
public:
- SoundServer(const QString &name);
+ SoundServer(const TQString &name);
~SoundServer();
virtual bool connectI (Interface *);
virtual bool disconnectI (Interface *);
- virtual QString pluginClassName() const { return "SoundServer"; }
+ virtual TQString pluginClassName() const { return "SoundServer"; }
- 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(); }
// PluginBase
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,
diff --git a/kradio3/plugins/timecontrol/timecontrol-configuration-ui.ui b/kradio3/plugins/timecontrol/timecontrol-configuration-ui.ui
index 8b2b768..c020ed4 100644
--- a/kradio3/plugins/timecontrol/timecontrol-configuration-ui.ui
+++ b/kradio3/plugins/timecontrol/timecontrol-configuration-ui.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>TimeControlConfigurationUI</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>TimeControlConfigurationUI</cstring>
</property>
@@ -16,15 +16,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="2">
+ <widget class="TQLayoutWidget" row="2" column="0" rowspan="1" colspan="2">
<property name="name">
- <cstring>layout13</cstring>
+ <cstring>tqlayout13</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>labelSleep</cstring>
</property>
@@ -32,7 +32,7 @@
<string>sleep countdown</string>
</property>
</widget>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>editSleep</cstring>
</property>
@@ -62,7 +62,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>40</width>
<height>20</height>
@@ -85,23 +85,23 @@
<enum>Horizontal</enum>
</property>
</widget>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout15</cstring>
+ <cstring>tqlayout15</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout14</cstring>
+ <cstring>tqlayout14</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>labelAlarmList</cstring>
</property>
@@ -117,7 +117,7 @@
<string>Alarms</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonAlarmNew</cstring>
</property>
@@ -128,7 +128,7 @@
<iconset>"filenew2"</iconset>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonDeleteAlarm</cstring>
</property>
@@ -141,38 +141,38 @@
</widget>
</hbox>
</widget>
- <widget class="QListBox">
+ <widget class="TQListBox">
<property name="name">
<cstring>listAlarms</cstring>
</property>
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget" row="0" column="1">
+ <widget class="TQLayoutWidget" row="0" column="1">
<property name="name">
- <cstring>layout17</cstring>
+ <cstring>tqlayout17</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout28</cstring>
+ <cstring>tqlayout28</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout27</cstring>
+ <cstring>tqlayout27</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>labelAlarmDate</cstring>
</property>
@@ -180,22 +180,22 @@
<string>Date</string>
</property>
</widget>
- <widget class="QDateEdit">
+ <widget class="TQDateEdit">
<property name="name">
<cstring>editAlarmDate</cstring>
</property>
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout28</cstring>
+ <cstring>tqlayout28</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>labelAlarmTime</cstring>
</property>
@@ -203,22 +203,22 @@
<string>Time</string>
</property>
</widget>
- <widget class="QTimeEdit">
+ <widget class="TQTimeEdit">
<property name="name">
<cstring>editAlarmTime</cstring>
</property>
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout29</cstring>
+ <cstring>tqlayout29</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>labelAlarmVolume</cstring>
</property>
@@ -226,7 +226,7 @@
<string>Volume</string>
</property>
</widget>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>editAlarmVolume</cstring>
</property>
@@ -247,15 +247,15 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout16</cstring>
+ <cstring>tqlayout16</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="0" column="0">
+ <widget class="TQCheckBox" row="0" column="0">
<property name="name">
<cstring>checkboxAlarmEnable</cstring>
</property>
@@ -273,7 +273,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>100</height>
@@ -323,7 +323,7 @@
<enum>Multi</enum>
</property>
</widget>
- <widget class="QCheckBox" row="1" column="0">
+ <widget class="TQCheckBox" row="1" column="0">
<property name="name">
<cstring>checkboxAlarmDaily</cstring>
</property>
@@ -333,7 +333,7 @@
</widget>
</grid>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>labelStationSelection</cstring>
</property>
@@ -341,24 +341,24 @@
<string>Radio Station</string>
</property>
</widget>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<property name="name">
<cstring>comboStationSelection</cstring>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout20</cstring>
+ <cstring>tqlayout20</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>pixmapAlarmStation</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>20</width>
<height>20</height>
@@ -378,7 +378,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>150</width>
<height>20</height>
@@ -387,7 +387,7 @@
</spacer>
</hbox>
</widget>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<item>
<property name="text">
<string>Start Playing</string>
@@ -445,7 +445,7 @@
<include location="global" impldecl="in implementation">kiconloader.h</include>
</includes>
<pixmapfunction>SmallIcon</pixmapfunction>
-<layoutdefaults spacing="6" margin="0"/>
+<tqlayoutdefaults spacing="6" margin="0"/>
<includehints>
<includehint>klistbox.h</includehint>
</includehints>
diff --git a/kradio3/plugins/timecontrol/timecontrol-configuration.cpp b/kradio3/plugins/timecontrol/timecontrol-configuration.cpp
index 4ea6bce..c49906d 100644
--- a/kradio3/plugins/timecontrol/timecontrol-configuration.cpp
+++ b/kradio3/plugins/timecontrol/timecontrol-configuration.cpp
@@ -19,14 +19,14 @@
#include <algorithm>
using std::sort;
-#include <qdatetime.h>
-#include <qlistbox.h>
-#include <qcombobox.h>
-#include <qdatetimeedit.h>
-#include <qlabel.h>
-#include <qspinbox.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
+#include <tqdatetime.h>
+#include <tqlistbox.h>
+#include <tqcombobox.h>
+#include <tqdatetimeedit.h>
+#include <tqlabel.h>
+#include <tqspinbox.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
#include <klistbox.h>
#include <klocale.h>
@@ -47,37 +47,37 @@ public:
};
-TimeControlConfiguration::TimeControlConfiguration (QWidget *parent)
- : TimeControlConfigurationUI(parent),
+TimeControlConfiguration::TimeControlConfiguration (TQWidget *tqparent)
+ : TimeControlConfigurationUI(tqparent),
ITimeControlClient(),
IRadioClient(),
ignoreChanges(false),
m_dirty(false)
{
- QObject::connect(checkboxAlarmDaily, SIGNAL(toggled(bool)), this, SLOT(slotDailyChanged(bool)));
- QObject::connect(listWeekdays, SIGNAL(highlighted(int)), this, SLOT(slotWeekdaysChanged()));
- QObject::connect(checkboxAlarmEnable, SIGNAL(toggled(bool)), this, SLOT(slotEnabledChanged(bool)));
- QObject::connect(comboStationSelection, SIGNAL(highlighted(int)), this, SLOT(slotStationChanged(int)));
- QObject::connect(listAlarms, SIGNAL(highlighted(int)), this, SLOT(slotAlarmSelectChanged(int)));
- QObject::connect(editAlarmDate, SIGNAL(valueChanged(const QDate &)), this, SLOT(slotDateChanged(const QDate &)));
- QObject::connect(editAlarmTime, SIGNAL(valueChanged(const QTime &)), this, SLOT(slotTimeChanged(const QTime &)));
- QObject::connect(editAlarmVolume, SIGNAL(valueChanged(int)), this, SLOT(slotVolumeChanged(int)));
- QObject::connect(buttonAlarmNew, SIGNAL(clicked()), this, SLOT(slotNewAlarm()));
- QObject::connect(buttonDeleteAlarm, SIGNAL(clicked()), this, SLOT(slotDeleteAlarm()));
- QObject::connect(comboAlarmType, SIGNAL(highlighted(int)), this, SLOT(slotAlarmTypeChanged(int)));
-
- QObject::connect(checkboxAlarmDaily, SIGNAL(toggled(bool)), this, SLOT(slotSetDirty()));
- QObject::connect(listWeekdays, SIGNAL(selectionChanged()), this, SLOT(slotSetDirty()));
- QObject::connect(checkboxAlarmEnable, SIGNAL(toggled(bool)), this, SLOT(slotSetDirty()));
- QObject::connect(comboStationSelection, SIGNAL(activated(int)), this, SLOT(slotSetDirty()));
- QObject::connect(editAlarmDate, SIGNAL(valueChanged(const QDate &)), this, SLOT(slotSetDirty()));
- QObject::connect(editAlarmTime, SIGNAL(valueChanged(const QTime &)), this, SLOT(slotSetDirty()));
- QObject::connect(editAlarmVolume, SIGNAL(valueChanged(int)), this, SLOT(slotSetDirty()));
- QObject::connect(buttonAlarmNew, SIGNAL(clicked()), this, SLOT(slotSetDirty()));
- QObject::connect(buttonDeleteAlarm, SIGNAL(clicked()), this, SLOT(slotSetDirty()));
- QObject::connect(comboAlarmType, SIGNAL(activated(int)), this, SLOT(slotSetDirty()));
- QObject::connect(editSleep, SIGNAL(valueChanged(int)), this, SLOT(slotSetDirty()));
+ TQObject::connect(checkboxAlarmDaily, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotDailyChanged(bool)));
+ TQObject::connect(listWeekdays, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(slotWeekdaysChanged()));
+ TQObject::connect(checkboxAlarmEnable, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotEnabledChanged(bool)));
+ TQObject::connect(comboStationSelection, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(slotStationChanged(int)));
+ TQObject::connect(listAlarms, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(slotAlarmSelectChanged(int)));
+ TQObject::connect(editAlarmDate, TQT_SIGNAL(valueChanged(const TQDate &)), this, TQT_SLOT(slotDateChanged(const TQDate &)));
+ TQObject::connect(editAlarmTime, TQT_SIGNAL(valueChanged(const TQTime &)), this, TQT_SLOT(slotTimeChanged(const TQTime &)));
+ TQObject::connect(editAlarmVolume, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotVolumeChanged(int)));
+ TQObject::connect(buttonAlarmNew, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNewAlarm()));
+ TQObject::connect(buttonDeleteAlarm, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDeleteAlarm()));
+ TQObject::connect(comboAlarmType, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(slotAlarmTypeChanged(int)));
+
+ TQObject::connect(checkboxAlarmDaily, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetDirty()));
+ TQObject::connect(listWeekdays, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSetDirty()));
+ TQObject::connect(checkboxAlarmEnable, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetDirty()));
+ TQObject::connect(comboStationSelection, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSetDirty()));
+ TQObject::connect(editAlarmDate, TQT_SIGNAL(valueChanged(const TQDate &)), this, TQT_SLOT(slotSetDirty()));
+ TQObject::connect(editAlarmTime, TQT_SIGNAL(valueChanged(const TQTime &)), this, TQT_SLOT(slotSetDirty()));
+ TQObject::connect(editAlarmVolume, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSetDirty()));
+ TQObject::connect(buttonAlarmNew, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSetDirty()));
+ TQObject::connect(buttonDeleteAlarm, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSetDirty()));
+ TQObject::connect(comboAlarmType, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSetDirty()));
+ TQObject::connect(editSleep, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSetDirty()));
}
TimeControlConfiguration::~TimeControlConfiguration ()
@@ -140,7 +140,7 @@ bool TimeControlConfiguration::noticeNextAlarmChanged(const Alarm *)
return true;
}
-bool TimeControlConfiguration::noticeCountdownStarted(const QDateTime &/*end*/)
+bool TimeControlConfiguration::noticeCountdownStarted(const TQDateTime &/*end*/)
{
return false;
}
@@ -179,7 +179,7 @@ bool TimeControlConfiguration::noticeStationsChanged(const StationList &sl)
comboStationSelection->clear();
stationIDs.clear();
comboStationSelection->insertItem(i18n("<don't change>"));
- stationIDs.push_back(QString::null);
+ stationIDs.push_back(TQString());
for (RawStationList::Iterator i(sl.all()); i.current(); ++i) {
comboStationSelection->insertItem(i.current()->iconName(),
@@ -193,7 +193,7 @@ bool TimeControlConfiguration::noticeStationsChanged(const StationList &sl)
// Slots
-void TimeControlConfiguration::slotDateChanged( const QDate &d )
+void TimeControlConfiguration::slotDateChanged( const TQDate &d )
{
if (ignoreChanges) return;
@@ -212,7 +212,7 @@ void TimeControlConfiguration::slotDateChanged( const QDate &d )
}
-void TimeControlConfiguration::slotTimeChanged(const QTime &t)
+void TimeControlConfiguration::slotTimeChanged(const TQTime &t)
{
if (ignoreChanges) return;
@@ -258,17 +258,17 @@ void TimeControlConfiguration::slotWeekdaysChanged ()
{
if (ignoreChanges) return;
- int mask = 0;
+ int tqmask = 0;
for (int i = 0; i < 7; ++i) {
if (listWeekdays->isSelected(i)) {
- mask |= (1 << i);
+ tqmask |= (1 << i);
}
}
int idx = listAlarms->currentItem();
if (idx >= 0 && (unsigned)idx < alarms.size()) {
Alarm &a = alarms[idx];
- a.setWeekdayMask(mask);
+ a.setWeekdayMask(tqmask);
ignoreChanges = true;
bool oldBlock = listAlarms->signalsBlocked();
@@ -355,7 +355,7 @@ void TimeControlConfiguration::slotAlarmSelectChanged(int idx)
comboAlarmType ->setCurrentItem(a.alarmType());
int k = 0;
- const QString &sID = a.stationID();
+ const TQString &sID = a.stationID();
for (int i = 0; !k && i < (int)stationIDs.size(); ++i)
if (stationIDs[i] == sID) k = i;
comboStationSelection->setCurrentItem(k);
@@ -371,7 +371,7 @@ void TimeControlConfiguration::slotAlarmSelectChanged(int idx)
void TimeControlConfiguration::slotNewAlarm()
{
- QDateTime dt(QDateTime::currentDateTime());
+ TQDateTime dt(TQDateTime::tqcurrentDateTime());
Alarm a(dt, false, false);
alarms.push_back(a);
listAlarms->insertItem(a.alarmTime().toString());
diff --git a/kradio3/plugins/timecontrol/timecontrol-configuration.h b/kradio3/plugins/timecontrol/timecontrol-configuration.h
index ac4570f..64d5cb6 100644
--- a/kradio3/plugins/timecontrol/timecontrol-configuration.h
+++ b/kradio3/plugins/timecontrol/timecontrol-configuration.h
@@ -26,15 +26,16 @@
#include "timecontrol-configuration-ui.h"
class TimeControl;
-class QWidget;
+class TQWidget;
class TimeControlConfiguration : public TimeControlConfigurationUI,
public ITimeControlClient,
public IRadioClient
{
Q_OBJECT
+ TQ_OBJECT
public :
- TimeControlConfiguration (QWidget *parent);
+ TimeControlConfiguration (TQWidget *tqparent);
~TimeControlConfiguration ();
bool connectI (Interface *i);
@@ -45,7 +46,7 @@ public :
bool noticeAlarmsChanged(const AlarmVector &sl);
bool noticeAlarm(const Alarm &);
bool noticeNextAlarmChanged(const Alarm *);
- bool noticeCountdownStarted(const QDateTime &end);
+ bool noticeCountdownStarted(const TQDateTime &end);
bool noticeCountdownStopped();
bool noticeCountdownZero();
bool noticeCountdownSecondsChanged(int n);
@@ -55,7 +56,7 @@ public :
bool noticePowerChanged(bool on);
bool noticeStationChanged (const RadioStation &, int idx);
bool noticeStationsChanged(const StationList &sl);
- bool noticePresetFileChanged(const QString &/*f*/) { return false; }
+ bool noticePresetFileChanged(const TQString &/*f*/) { return false; }
bool noticeCurrentSoundStreamIDChanged(SoundStreamID /*id*/) { return false; }
@@ -66,8 +67,8 @@ protected slots:
void slotEnabledChanged (bool enable);
void slotStationChanged (int idx);
void slotAlarmSelectChanged(int idx);
- void slotDateChanged(const QDate &d);
- void slotTimeChanged(const QTime &d);
+ void slotDateChanged(const TQDate &d);
+ void slotTimeChanged(const TQTime &d);
void slotVolumeChanged(int v);
void slotAlarmTypeChanged(int idx);
@@ -81,7 +82,7 @@ protected slots:
protected:
AlarmVector alarms;
- vector<QString> stationIDs;
+ vector<TQString> stationIDs;
bool ignoreChanges;
bool m_dirty;
diff --git a/kradio3/plugins/timecontrol/timecontrol.cpp b/kradio3/plugins/timecontrol/timecontrol.cpp
index 42441ac..f6525b4 100644
--- a/kradio3/plugins/timecontrol/timecontrol.cpp
+++ b/kradio3/plugins/timecontrol/timecontrol.cpp
@@ -44,15 +44,15 @@ PLUGIN_LIBRARY_FUNCTIONS(TimeControl, "kradio-timecontrol", i18n("Time Control a
///////////////////////////////////////////////////////////////////////
-TimeControl::TimeControl (const QString &n)
+TimeControl::TimeControl (const TQString &n)
: PluginBase(n, i18n("TimeControl Plugin")),
m_waitingFor(NULL),
m_countdownSeconds(0),
m_alarmTimer(this),
m_countdownTimer(this)
{
- QObject::connect(&m_alarmTimer, SIGNAL(timeout()), this, SLOT(slotQTimerAlarmTimeout()));
- QObject::connect(&m_countdownTimer, SIGNAL(timeout()), this, SLOT(slotQTimerCountdownTimeout()));
+ TQObject::connect(&m_alarmTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTQTimerAlarmTimeout()));
+ TQObject::connect(&m_countdownTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTQTimerCountdownTimeout()));
}
@@ -82,7 +82,7 @@ bool TimeControl::setAlarms (const AlarmVector &al)
m_alarms = al;
- slotQTimerAlarmTimeout();
+ slotTQTimerAlarmTimeout();
notifyAlarmsChanged(m_alarms);
}
@@ -102,7 +102,7 @@ bool TimeControl::setCountdownSeconds(int n)
bool TimeControl::startCountdown()
{
- m_countdownEnd = QDateTime::currentDateTime().addSecs(m_countdownSeconds);
+ m_countdownEnd = TQDateTime::tqcurrentDateTime().addSecs(m_countdownSeconds);
m_countdownTimer.start(m_countdownSeconds * 1000, true);
notifyCountdownStarted(getCountdownEnd());
@@ -114,7 +114,7 @@ bool TimeControl::startCountdown()
bool TimeControl::stopCountdown()
{
m_countdownTimer.stop();
- m_countdownEnd = QDateTime();
+ m_countdownEnd = TQDateTime();
notifyCountdownStopped();
@@ -122,32 +122,32 @@ bool TimeControl::stopCountdown()
}
-QDateTime TimeControl::getNextAlarmTime() const
+TQDateTime TimeControl::getNextAlarmTime() const
{
const Alarm *a = getNextAlarm();
if (a)
return a->nextAlarm();
else
- return QDateTime();
+ return TQDateTime();
}
const Alarm *TimeControl::getNextAlarm () const
{
- QDateTime now = QDateTime::currentDateTime(),
+ TQDateTime now = TQDateTime::tqcurrentDateTime(),
next;
const Alarm *retval = NULL;
for (ciAlarmVector i = m_alarms.begin(); i != m_alarms.end(); ++i) {
- QDateTime n = i->nextAlarm();
+ TQDateTime n = i->nextAlarm();
if (n.isValid() && n > now && ( ! next.isValid() || n < next)) {
next = n;
retval = &(*i);
}
}
- QDateTime old = m_nextAlarm_tmp;
+ TQDateTime old = m_nextAlarm_tmp;
m_nextAlarm_tmp = next;
if (old != m_nextAlarm_tmp) {
notifyNextAlarmChanged(retval);
@@ -157,16 +157,16 @@ const Alarm *TimeControl::getNextAlarm () const
}
-QDateTime TimeControl::getCountdownEnd () const
+TQDateTime TimeControl::getCountdownEnd () const
{
if (m_countdownTimer.isActive())
return m_countdownEnd;
else
- return QDateTime();
+ return TQDateTime();
}
-void TimeControl::slotQTimerCountdownTimeout()
+void TimeControl::slotTQTimerCountdownTimeout()
{
stopCountdown();
@@ -174,15 +174,15 @@ void TimeControl::slotQTimerCountdownTimeout()
}
-void TimeControl::slotQTimerAlarmTimeout()
+void TimeControl::slotTQTimerAlarmTimeout()
{
if (m_waitingFor) {
notifyAlarm(*m_waitingFor);
}
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::tqcurrentDateTime();
Alarm const *n = getNextAlarm();
- QDateTime na = getNextAlarmTime();
+ TQDateTime na = getNextAlarmTime();
m_waitingFor = NULL;
@@ -212,18 +212,18 @@ void TimeControl::restoreState (KConfig *config)
{
AlarmVector al;
- config->setGroup(QString("timecontrol-") + name());
+ config->setGroup(TQString("timecontrol-") + name());
int nAlarms = config->readNumEntry ("nAlarms", 0);
for (int idx = 1; idx <= nAlarms; ++idx) {
- QString num = QString().setNum(idx);
- QDateTime d = config->readDateTimeEntry(AlarmTimeElement + num);
+ TQString num = TQString().setNum(idx);
+ TQDateTime d = config->readDateTimeEntry(AlarmTimeElement + num);
bool enable = config->readBoolEntry(AlarmEnabledElement + num, false);
bool daily = config->readBoolEntry(AlarmDailyElement + num, false);
int weekdayMask = config->readNumEntry(AlarmWeekdayMaskElement + num, 0x7F);
float vol = config->readDoubleNumEntry(AlarmVolumeElement + num, 1);
- QString sid = config->readEntry(AlarmStationIDElement + num, QString::null);
+ TQString sid = config->readEntry(AlarmStationIDElement + num, TQString());
int type = config->readNumEntry(AlarmTypeElement + num, 0);
enable &= d.isValid();
@@ -243,13 +243,13 @@ void TimeControl::restoreState (KConfig *config)
void TimeControl::saveState (KConfig *config) const
{
- config->setGroup(QString("timecontrol-") + name());
+ config->setGroup(TQString("timecontrol-") + name());
config->writeEntry("nAlarms", m_alarms.size());
int idx = 1;
ciAlarmVector end = m_alarms.end();
for (ciAlarmVector i = m_alarms.begin(); i != end; ++i, ++idx) {
- QString num = QString().setNum(idx);
+ TQString num = TQString().setNum(idx);
config->writeEntry (AlarmTimeElement + num, i->alarmTime());
config->writeEntry (AlarmEnabledElement + num, i->isEnabled());
config->writeEntry (AlarmDailyElement + num, i->isDaily());
diff --git a/kradio3/plugins/timecontrol/timecontrol.h b/kradio3/plugins/timecontrol/timecontrol.h
index f38bae9..7d9b946 100644
--- a/kradio3/plugins/timecontrol/timecontrol.h
+++ b/kradio3/plugins/timecontrol/timecontrol.h
@@ -18,41 +18,42 @@
#ifndef KRADIO_TIMECONTROL_H
#define KRADIO_TIMECONTROL_H
-#include <qobject.h>
-#include <qtimer.h>
+#include <tqobject.h>
+#include <tqtimer.h>
#include "../../src/include/alarm.h"
#include "../../src/include/plugins.h"
#include "../../src/include/timecontrol_interfaces.h"
-// well, it has to be a QObject :( , but only for
-// receiving QTimer - timeouts
+// well, it has to be a TQObject :( , but only for
+// receiving TQTimer - timeouts
-class TimeControl : public QObject,
+class TimeControl : public TQObject,
public PluginBase,
public ITimeControl
{
Q_OBJECT
+ TQ_OBJECT
protected:
AlarmVector m_alarms;
Alarm const * m_waitingFor; // m_alarmTimer is exactly for this date/time
int m_countdownSeconds; // in seconds
- QDateTime m_countdownEnd;
+ TQDateTime m_countdownEnd;
- QTimer m_alarmTimer;
- QTimer m_countdownTimer;
+ TQTimer m_alarmTimer;
+ TQTimer m_countdownTimer;
- mutable QDateTime m_nextAlarm_tmp; // used to recognize nextAlarm changes
+ mutable TQDateTime m_nextAlarm_tmp; // used to recognize nextAlarm changes
public:
- TimeControl (const QString &name);
+ TimeControl (const TQString &name);
~TimeControl();
- virtual QString pluginClassName() const { return "TimeControl"; }
+ virtual TQString pluginClassName() const { return "TimeControl"; }
- 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);
@@ -76,18 +77,18 @@ RECEIVERS:
bool stopCountdown();
ANSWERS:
- QDateTime getNextAlarmTime () const;
+ TQDateTime getNextAlarmTime () const;
const Alarm* getNextAlarm () const;
const AlarmVector & getAlarms () const { return m_alarms; }
int getCountdownSeconds () const { return m_countdownSeconds; }
- QDateTime getCountdownEnd () const;
+ TQDateTime getCountdownEnd () const;
// slots for receiving timeout messages of timers
protected slots:
- virtual void slotQTimerAlarmTimeout();
- virtual void slotQTimerCountdownTimeout();
+ virtual void slotTQTimerAlarmTimeout();
+ virtual void slotTQTimerCountdownTimeout();
};
diff --git a/kradio3/plugins/timeshifter/timeshifter-configuration-ui.ui b/kradio3/plugins/timeshifter/timeshifter-configuration-ui.ui
index 3e3f4e4..8647873 100644
--- a/kradio3/plugins/timeshifter/timeshifter-configuration-ui.ui
+++ b/kradio3/plugins/timeshifter/timeshifter-configuration-ui.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>TimeShifterConfigurationUI</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>TimeShifterConfigurationUI</cstring>
</property>
@@ -22,9 +22,9 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout10</cstring>
+ <cstring>tqlayout10</cstring>
</property>
<grid>
<property name="name">
@@ -40,7 +40,7 @@
<property name="sizeType">
<enum>Preferred</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>30</width>
<height>21</height>
@@ -57,14 +57,14 @@
<property name="sizeType">
<enum>Preferred</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>104</width>
<height>21</height>
</size>
</property>
</spacer>
- <widget class="QSpinBox" row="1" column="2">
+ <widget class="TQSpinBox" row="1" column="2">
<property name="name">
<cstring>editTempFileSize</cstring>
</property>
@@ -84,7 +84,7 @@
<number>100</number>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>labelTempFileSize</cstring>
</property>
@@ -92,7 +92,7 @@
<string>Maximum File Size</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>labelPlaybackMixerDevice</cstring>
</property>
@@ -100,7 +100,7 @@
<string>Playback Mixer Device</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>labelTempFile</cstring>
</property>
@@ -108,12 +108,12 @@
<string>Temporary File</string>
</property>
</widget>
- <widget class="QLineEdit" row="0" column="1" rowspan="1" colspan="2">
+ <widget class="TQLineEdit" row="0" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>editTempFile</cstring>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>labelPlaybackMixerChannel</cstring>
</property>
@@ -121,7 +121,7 @@
<string>Playback Mixer Channel</string>
</property>
</widget>
- <widget class="QPushButton" row="0" column="3">
+ <widget class="TQPushButton" row="0" column="3">
<property name="name">
<cstring>buttonSelectTempFile</cstring>
</property>
@@ -133,7 +133,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>26</width>
<height>26</height>
@@ -146,12 +146,12 @@
<iconset>"fileopen"</iconset>
</property>
</widget>
- <widget class="QComboBox" row="2" column="1" rowspan="1" colspan="2">
+ <widget class="TQComboBox" row="2" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>comboPlaybackMixerDevice</cstring>
</property>
</widget>
- <widget class="QComboBox" row="3" column="1" rowspan="1" colspan="2">
+ <widget class="TQComboBox" row="3" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>comboPlaybackMixerChannel</cstring>
</property>
@@ -166,7 +166,7 @@
<property name="sizeType">
<enum>Preferred</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>30</width>
<height>21</height>
@@ -183,7 +183,7 @@
<property name="sizeType">
<enum>Preferred</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>30</width>
<height>21</height>
@@ -202,7 +202,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>61</height>
@@ -221,5 +221,5 @@
<include location="global" impldecl="in implementation">knuminput.h</include>
</includes>
<pixmapfunction>SmallIconSet</pixmapfunction>
-<layoutdefaults spacing="6" margin="0"/>
+<tqlayoutdefaults spacing="6" margin="0"/>
</UI>
diff --git a/kradio3/plugins/timeshifter/timeshifter-configuration.cpp b/kradio3/plugins/timeshifter/timeshifter-configuration.cpp
index 828cc33..2f68d68 100644
--- a/kradio3/plugins/timeshifter/timeshifter-configuration.cpp
+++ b/kradio3/plugins/timeshifter/timeshifter-configuration.cpp
@@ -20,12 +20,12 @@
#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 <tqspinbox.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqfile.h>
+#include <tqpushbutton.h>
#include <kfiledialog.h>
#include <knuminput.h>
@@ -36,8 +36,8 @@
#include "timeshifter-configuration.h"
#include "timeshifter.h"
-TimeShifterConfiguration::TimeShifterConfiguration (QWidget *parent, TimeShifter *shifter)
- : TimeShifterConfigurationUI(parent),
+TimeShifterConfiguration::TimeShifterConfiguration (TQWidget *tqparent, TimeShifter *shifter)
+ : TimeShifterConfigurationUI(tqparent),
m_ignoreGUIChanges(false),
m_myControlChange(0),
m_PlaybackMixerHelper(comboPlaybackMixerDevice, StringListHelper::SORT_BY_DESCR),
@@ -45,15 +45,15 @@ TimeShifterConfiguration::TimeShifterConfiguration (QWidget *parent, TimeShifter
m_Shifter(shifter),
m_dirty(true)
{
- QObject::connect(buttonSelectTempFile, SIGNAL(clicked()),
- this, SLOT(selectTempFile()));
- QObject::connect(comboPlaybackMixerDevice, SIGNAL(activated(int)),
- this, SLOT(slotComboPlaybackMixerSelected(int)));
-
- connect(editTempFile, SIGNAL(textChanged(const QString&)), this, SLOT(slotSetDirty()));
- connect(editTempFileSize, SIGNAL(valueChanged(int)), this, SLOT(slotSetDirty()));
- connect(comboPlaybackMixerChannel, SIGNAL(activated( int )), this, SLOT(slotSetDirty()));
- connect(comboPlaybackMixerDevice, SIGNAL(activated( int )), this, SLOT(slotSetDirty()));
+ TQObject::connect(buttonSelectTempFile, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(selectTempFile()));
+ TQObject::connect(comboPlaybackMixerDevice, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotComboPlaybackMixerSelected(int)));
+
+ connect(editTempFile, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotSetDirty()));
+ connect(editTempFileSize, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSetDirty()));
+ connect(comboPlaybackMixerChannel, TQT_SIGNAL(activated( int )), this, TQT_SLOT(slotSetDirty()));
+ connect(comboPlaybackMixerDevice, TQT_SIGNAL(activated( int )), this, TQT_SLOT(slotSetDirty()));
slotCancel();
}
@@ -87,11 +87,11 @@ void TimeShifterConfiguration::noticeConnectedI (ISoundStreamServer *s, bool poi
void TimeShifterConfiguration::noticeConnectedSoundClient(ISoundStreamClient::thisInterface *i, bool pointer_valid)
{
if (i && pointer_valid && i->supportsPlayback() && m_Shifter) {
- const QString &org_mid = m_Shifter->getPlaybackMixer();
- bool org_present = m_PlaybackMixerHelper.contains(org_mid);
- const QString &mid = org_present ? m_PlaybackMixerHelper.getCurrentItem() : org_mid;
- const QString &org_ch = m_Shifter->getPlaybackMixerChannel();
- const QString &ch = org_present ? m_PlaybackChannelHelper.getCurrentText() : org_ch;
+ const TQString &org_mid = m_Shifter->getPlaybackMixer();
+ bool org_present = m_PlaybackMixerHelper.tqcontains(org_mid);
+ const TQString &mid = org_present ? m_PlaybackMixerHelper.getCurrentItem() : org_mid;
+ const TQString &org_ch = m_Shifter->getPlaybackMixerChannel();
+ const TQString &ch = org_present ? m_PlaybackChannelHelper.getCurrentText() : org_ch;
setPlaybackMixer(mid, ch);
}
}
@@ -106,9 +106,9 @@ void TimeShifterConfiguration::noticeDisconnectedSoundClient(ISoundStreamClient:
-bool TimeShifterConfiguration::setPlaybackMixer(const QString &_mixer_id, const QString &Channel)
+bool TimeShifterConfiguration::setPlaybackMixer(const TQString &_mixer_id, const TQString &Channel)
{
- QString mixer_id = _mixer_id;
+ TQString mixer_id = _mixer_id;
bool old = m_ignoreGUIChanges;
m_ignoreGUIChanges = true;
@@ -119,7 +119,7 @@ bool TimeShifterConfiguration::setPlaybackMixer(const QString &_mixer_id, const
ISoundStreamClient *mixer = getSoundStreamClientWithID(mixer_id);
if (mixer) {
m_PlaybackChannelHelper.setData(mixer->getPlaybackChannels());
- m_PlaybackChannelHelper.setCurrentText(m_PlaybackChannelHelper.contains(Channel) ? Channel : m_Shifter->getPlaybackMixerChannel());
+ m_PlaybackChannelHelper.setCurrentText(m_PlaybackChannelHelper.tqcontains(Channel) ? Channel : m_Shifter->getPlaybackMixerChannel());
}
labelPlaybackMixerChannel->setEnabled(mixer != NULL);
comboPlaybackMixerChannel->setEnabled(mixer != NULL);
@@ -142,7 +142,7 @@ void TimeShifterConfiguration::selectTempFile()
fd.setMode(KFile::File);
fd.setCaption (i18n("Select TimeShifter Temporary File"));
- if (fd.exec() == QDialog::Accepted) {
+ if (fd.exec() == TQDialog::Accepted) {
editTempFile->setText(fd.selectedFile());
}
}
@@ -158,7 +158,7 @@ void TimeShifterConfiguration::slotComboPlaybackMixerSelected(int /*idx*/)
void TimeShifterConfiguration::slotOK()
{
if (m_Shifter && m_dirty) {
- m_Shifter->setTempFile(editTempFile->text(), editTempFileSize->value() * (Q_UINT64)(1024 * 1024));
+ m_Shifter->setTempFile(editTempFile->text(), editTempFileSize->value() * (TQ_UINT64)(1024 * 1024));
m_Shifter->setPlaybackMixer(m_PlaybackMixerHelper.getCurrentItem(),
m_PlaybackChannelHelper.getCurrentText());
m_dirty = false;
@@ -178,7 +178,7 @@ void TimeShifterConfiguration::slotCancel()
}
-bool TimeShifterConfiguration::noticePlaybackChannelsChanged(const QString & client_id, const QStringList &/*channels*/)
+bool TimeShifterConfiguration::noticePlaybackChannelsChanged(const TQString & client_id, const TQStringList &/*channels*/)
{
if (m_PlaybackMixerHelper.getCurrentItem() == client_id) {
setPlaybackMixer(client_id, m_PlaybackChannelHelper.getCurrentText());
diff --git a/kradio3/plugins/timeshifter/timeshifter-configuration.h b/kradio3/plugins/timeshifter/timeshifter-configuration.h
index 7d34c3d..6c0b722 100644
--- a/kradio3/plugins/timeshifter/timeshifter-configuration.h
+++ b/kradio3/plugins/timeshifter/timeshifter-configuration.h
@@ -27,15 +27,16 @@
#include "timeshifter-configuration-ui.h"
-class QWidget;
+class TQWidget;
class TimeShifter;
class TimeShifterConfiguration : public TimeShifterConfigurationUI,
public ISoundStreamClient
{
Q_OBJECT
+ TQ_OBJECT
public :
- TimeShifterConfiguration (QWidget *parent, TimeShifter *shifter);
+ TimeShifterConfiguration (TQWidget *tqparent, TimeShifter *shifter);
~TimeShifterConfiguration ();
bool connectI (Interface *i);
@@ -48,11 +49,11 @@ public :
RECEIVERS:
void noticeConnectedI (ISoundStreamServer *s, bool pointer_valid);
- bool noticePlaybackChannelsChanged(const QString & /*client_id*/, const QStringList &/*channels*/);
+ bool noticePlaybackChannelsChanged(const TQString & /*client_id*/, const TQStringList &/*channels*/);
protected:
- bool setPlaybackMixer(const QString &_mixer_id, const QString &Channel);
+ bool setPlaybackMixer(const TQString &_mixer_id, const TQString &Channel);
protected slots:
@@ -70,8 +71,8 @@ protected:
bool m_ignoreGUIChanges;
int m_myControlChange;
- typedef GUIListHelper<QComboBox, QString> StringListHelper;
- typedef GUISimpleListHelper<QComboBox> ChannelListHelper;
+ typedef GUIListHelper<TQComboBox, TQString> StringListHelper;
+ typedef GUISimpleListHelper<TQComboBox> ChannelListHelper;
StringListHelper m_PlaybackMixerHelper;
ChannelListHelper m_PlaybackChannelHelper;
diff --git a/kradio3/plugins/timeshifter/timeshifter.cpp b/kradio3/plugins/timeshifter/timeshifter.cpp
index bff1851..52d3448 100644
--- a/kradio3/plugins/timeshifter/timeshifter.cpp
+++ b/kradio3/plugins/timeshifter/timeshifter.cpp
@@ -32,11 +32,11 @@ PLUGIN_LIBRARY_FUNCTIONS(TimeShifter, "kradio-timeshifter", i18n("TimeShift Supp
///////////////////////////////////////////////////////////////////////
-TimeShifter::TimeShifter (const QString &name)
+TimeShifter::TimeShifter (const TQString &name)
: PluginBase(name, i18n("TimeShifter Plugin")),
m_TempFileName("/tmp/kradio-timeshifter-tempfile"),
m_TempFileMaxSize(256*1024*1024),
- m_PlaybackMixerID(QString::null),
+ m_PlaybackMixerID(TQString()),
m_PlaybackMixerChannel("PCM"),
m_orgVolume(0.0),
m_PlaybackMetaData(0,0,0),
@@ -86,7 +86,7 @@ void TimeShifter::noticeConnectedI (ISoundStreamServer *s, bool pointer_valid)
void TimeShifter::saveState (KConfig *config) const
{
- config->setGroup(QString("timeshifter-") + name());
+ config->setGroup(TQString("timeshifter-") + name());
config->writeEntry("temp-file-name", m_TempFileName);
config->writeEntry("max-file-size", m_TempFileMaxSize / 1024 / 1024);
@@ -98,13 +98,13 @@ void TimeShifter::saveState (KConfig *config) const
void TimeShifter::restoreState (KConfig *config)
{
- config->setGroup(QString("timeshifter-") + name());
+ config->setGroup(TQString("timeshifter-") + name());
- QString fname = config->readEntry("temp-file-name", "/tmp/kradio-timeshifter-tempfile");
- Q_UINT64 fsize = 1024 * 1024 * config->readNumEntry("max-file-size", 256);
+ TQString fname = config->readEntry("temp-file-name", "/tmp/kradio-timeshifter-tempfile");
+ TQ_UINT64 fsize = 1024 * 1024 * config->readNumEntry("max-file-size", 256);
- QString mixerID = config->readEntry ("PlaybackMixerID", QString::null);
- QString channel = config->readEntry ("PlaybackMixerChannel", "PCM");
+ TQString mixerID = config->readEntry ("PlaybackMixerID", TQString());
+ TQString channel = config->readEntry ("PlaybackMixerChannel", "PCM");
setPlaybackMixer(mixerID, channel);
setTempFile(fname, fsize);
@@ -116,7 +116,7 @@ void TimeShifter::restoreState (KConfig *config)
ConfigPageInfo TimeShifter::createConfigurationPage()
{
TimeShifterConfiguration *conf = new TimeShifterConfiguration(NULL, this);
- QObject::connect(this, SIGNAL(sigUpdateConfig()), conf, SLOT(slotUpdateConfig()));
+ TQObject::connect(this, TQT_SIGNAL(sigUpdateConfig()), conf, TQT_SLOT(slotUpdateConfig()));
return ConfigPageInfo (conf,
i18n("Timeshifter"),
i18n("Timeshifter Options"),
@@ -154,8 +154,8 @@ bool TimeShifter::stopPlayback(SoundStreamID id)
SoundStreamID tmp_newID = m_NewStreamID;
SoundStreamID tmp_orgID = m_OrgStreamID;
- m_OrgStreamID.invalidate();
- m_NewStreamID.invalidate();
+ m_OrgStreamID.tqinvalidate();
+ m_NewStreamID.tqinvalidate();
sendStopCapture(tmp_newID);
closeSoundStream(tmp_newID);
@@ -182,7 +182,7 @@ bool TimeShifter::pausePlayback(SoundStreamID id)
sendMute(newid);
sendPlaybackVolume(newid, 0);
- m_NewStreamID.invalidate();
+ m_NewStreamID.tqinvalidate();
sendStopPlayback(newid);
m_NewStreamID = newid;
@@ -219,7 +219,7 @@ bool TimeShifter::pausePlayback(SoundStreamID id)
size_t TimeShifter::writeMetaDataToBuffer(const SoundMetaData &md, char *buffer, size_t buffer_size)
{
- Q_UINT64 pos = md.position();
+ TQ_UINT64 pos = md.position();
time_t abs = md.absoluteTimestamp();
time_t rel = md.relativeTimestamp();
size_t url_len = md.url().url().length() + 1;
@@ -227,7 +227,7 @@ size_t TimeShifter::writeMetaDataToBuffer(const SoundMetaData &md, char *buffer,
if (req_size <= buffer_size) {
*(size_t*)buffer = req_size;
buffer += sizeof(req_size);
- *(Q_UINT64*)buffer = pos;
+ *(TQ_UINT64*)buffer = pos;
buffer += sizeof(pos);
*(time_t*)buffer = abs;
buffer += sizeof(abs);
@@ -249,7 +249,7 @@ size_t TimeShifter::writeMetaDataToBuffer(const SoundMetaData &md, char *buffer,
size_t TimeShifter::readMetaDataFromBuffer(SoundMetaData &md, const char *buffer, size_t buffer_size)
{
size_t req_size = 0;
- Q_UINT64 pos = 0;
+ TQ_UINT64 pos = 0;
time_t abs = 0;
time_t rel = 0;
size_t url_len = 0;
@@ -258,8 +258,8 @@ size_t TimeShifter::readMetaDataFromBuffer(SoundMetaData &md, const char *buffer
req_size = *(size_t*)buffer;
buffer += sizeof(req_size);
if (req_size > sizeof(req_size)) {
- pos = *(Q_UINT64*)buffer;
- buffer += sizeof(Q_UINT64);
+ pos = *(TQ_UINT64*)buffer;
+ buffer += sizeof(TQ_UINT64);
abs = *(time_t*)buffer;
buffer += sizeof(abs);
rel = *(time_t*)buffer;
@@ -283,7 +283,7 @@ bool TimeShifter::noticeSoundStreamData(SoundStreamID id, const SoundFormat &/*s
size_t packet_size = meta_buffer_size + sizeof(size) + size;
if (packet_size > m_RingBuffer.getMaxSize())
return false;
- Q_INT64 diff = m_RingBuffer.getFreeSize() - packet_size;
+ TQ_INT64 diff = m_RingBuffer.getFreeSize() - packet_size;
while (diff < 0) {
skipPacketInRingBuffer();
diff = m_RingBuffer.getFreeSize() - packet_size;
@@ -352,7 +352,7 @@ bool TimeShifter::noticeReadyForPlaybackData(SoundStreamID id, size_t free_size)
free_size -= consumed_size;
m_PlaybackDataLeftInBuffer -= consumed_size;
if (consumed_size < s) {
- logError(i18n("TimeShifter::notifySoundStreamData: clients skipped %1 bytes. Data Lost").arg(s - consumed_size));
+ logError(i18n("TimeShifter::notifySoundStreamData: clients skipped %1 bytes. Data Lost").tqarg(s - consumed_size));
free_size = 0; // break condition for outer loop
break;
}
@@ -371,7 +371,7 @@ ISoundStreamClient *TimeShifter::searchPlaybackMixer()
// some simple sort of autodetection if one mixer isn't present any more
if (!playback_mixer) {
- QPtrList<ISoundStreamClient> playback_mixers = queryPlaybackMixers();
+ TQPtrList<ISoundStreamClient> playback_mixers = queryPlaybackMixers();
if (!playback_mixers.isEmpty())
playback_mixer = playback_mixers.first();
}
@@ -379,7 +379,7 @@ ISoundStreamClient *TimeShifter::searchPlaybackMixer()
}
-bool TimeShifter::setPlaybackMixer(const QString &soundStreamClientID, const QString &ch)
+bool TimeShifter::setPlaybackMixer(const TQString &soundStreamClientID, const TQString &ch)
{
m_PlaybackMixerID = soundStreamClientID;
m_PlaybackMixerChannel = ch;
@@ -405,7 +405,7 @@ bool TimeShifter::setPlaybackMixer(const QString &soundStreamClientID, const QS
}
-void TimeShifter::setTempFile(const QString &filename, Q_UINT64 s)
+void TimeShifter::setTempFile(const TQString &filename, TQ_UINT64 s)
{
m_RingBuffer.clear();
m_RingBuffer.resize(m_TempFileName = filename, m_TempFileMaxSize = s);
@@ -413,7 +413,7 @@ void TimeShifter::setTempFile(const QString &filename, Q_UINT64 s)
m_PlaybackDataLeftInBuffer = 0;
}
-bool TimeShifter::getSoundStreamDescription(SoundStreamID id, QString &descr) const
+bool TimeShifter::getSoundStreamDescription(SoundStreamID id, TQString &descr) const
{
if (id == m_NewStreamID) {
descr = name();
diff --git a/kradio3/plugins/timeshifter/timeshifter.h b/kradio3/plugins/timeshifter/timeshifter.h
index 32c3837..4385e85 100644
--- a/kradio3/plugins/timeshifter/timeshifter.h
+++ b/kradio3/plugins/timeshifter/timeshifter.h
@@ -27,32 +27,33 @@
#include "../../src/include/fileringbuffer.h"
-class TimeShifter : public QObject,
+class TimeShifter : public TQObject,
public PluginBase,
public ISoundStreamClient
{
Q_OBJECT
+ TQ_OBJECT
public:
- TimeShifter (const QString &name);
+ TimeShifter (const TQString &name);
virtual ~TimeShifter ();
virtual bool connectI (Interface *);
virtual bool disconnectI (Interface *);
- virtual QString pluginClassName() const { return "TimeShifter"; }
+ virtual TQString pluginClassName() const { return "TimeShifter"; }
- 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(); }
// config
- const QString &getPlaybackMixer() const { return m_PlaybackMixerID; }
- const QString &getPlaybackMixerChannel() const { return m_PlaybackMixerChannel; }
- const QString &getTempFileName() const { return m_TempFileName; }
- Q_UINT64 getTempFileMaxSize() const { return m_TempFileMaxSize; }
+ const TQString &getPlaybackMixer() const { return m_PlaybackMixerID; }
+ const TQString &getPlaybackMixerChannel() const { return m_PlaybackMixerChannel; }
+ const TQString &getTempFileName() const { return m_TempFileName; }
+ TQ_UINT64 getTempFileMaxSize() const { return m_TempFileMaxSize; }
- void setTempFile(const QString &filename, Q_UINT64 s);
- bool setPlaybackMixer(const QString &soundStreamClientID, const QString &ch);
+ void setTempFile(const TQString &filename, TQ_UINT64 s);
+ bool setPlaybackMixer(const TQString &soundStreamClientID, const TQString &ch);
// PluginBase
@@ -86,7 +87,7 @@ protected:
bool noticeSoundStreamData(SoundStreamID id, const SoundFormat &sf, const char *data, size_t size, size_t &consumed_size, const SoundMetaData &md);
bool noticeReadyForPlaybackData(SoundStreamID id, size_t size);
- bool getSoundStreamDescription(SoundStreamID id, QString &descr) const;
+ bool getSoundStreamDescription(SoundStreamID id, TQString &descr) const;
// FIXME: react on redirect request
@@ -96,15 +97,15 @@ signals:
protected:
- QString m_TempFileName;
+ TQString m_TempFileName;
size_t m_TempFileMaxSize;
SoundFormat m_SoundFormat;
SoundFormat m_realSoundFormat;
- QString m_PlaybackMixerID;
- QString m_PlaybackMixerChannel;
+ TQString m_PlaybackMixerID;
+ TQString m_PlaybackMixerChannel;
- QString m_StreamFile;
+ TQString m_StreamFile;
bool m_StreamPaused;
SoundStreamID m_OrgStreamID;
SoundStreamID m_NewStreamID;
diff --git a/kradio3/plugins/v4lradio/linux/videodev.h b/kradio3/plugins/v4lradio/linux/videodev.h
index e16a8a8..0d7a5c0 100644
--- a/kradio3/plugins/v4lradio/linux/videodev.h
+++ b/kradio3/plugins/v4lradio/linux/videodev.h
@@ -389,9 +389,9 @@ struct video_code
#define VID_HARDWARE_BT848 1
-#define VID_HARDWARE_QCAM_BW 2
+#define VID_HARDWARE_TQCAM_BW 2
#define VID_HARDWARE_PMS 3
-#define VID_HARDWARE_QCAM_C 4
+#define VID_HARDWARE_TQCAM_C 4
#define VID_HARDWARE_PSEUDO 5
#define VID_HARDWARE_SAA5249 6
#define VID_HARDWARE_AZTECH 7
diff --git a/kradio3/plugins/v4lradio/linux/videodev2.h b/kradio3/plugins/v4lradio/linux/videodev2.h
index c41831a..5977820 100644
--- a/kradio3/plugins/v4lradio/linux/videodev2.h
+++ b/kradio3/plugins/v4lradio/linux/videodev2.h
@@ -391,7 +391,7 @@ struct v4l2_buffer
/* Flags for 'flags' field */
#define V4L2_BUF_FLAG_MAPPED 0x0001 /* Buffer is mapped (flag) */
-#define V4L2_BUF_FLAG_QUEUED 0x0002 /* Buffer is queued for processing */
+#define V4L2_BUF_FLAG_TQUEUED 0x0002 /* Buffer is queued for processing */
#define V4L2_BUF_FLAG_DONE 0x0004 /* Buffer is ready */
#define V4L2_BUF_FLAG_KEYFRAME 0x0008 /* Image is a keyframe (I-frame) */
#define V4L2_BUF_FLAG_PFRAME 0x0010 /* Image is a P-frame */
@@ -450,7 +450,7 @@ struct v4l2_captureparm
__u32 reserved[4];
};
/* Flags for 'capability' and 'capturemode' fields */
-#define V4L2_MODE_HIGHQUALITY 0x0001 /* High quality imaging mode */
+#define V4L2_MODE_HIGHTQUALITY 0x0001 /* High quality imaging mode */
#define V4L2_CAP_TIMEPERFRAME 0x1000 /* timeperframe field is supported */
struct v4l2_outputparm
@@ -623,7 +623,7 @@ struct v4l2_control
__s32 value;
};
-/* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */
+/* Used in the VIDIOC_TQUERYCTRL ioctl for querying controls */
struct v4l2_queryctrl
{
__u32 id;
@@ -637,7 +637,7 @@ struct v4l2_queryctrl
__u32 reserved[2];
};
-/* Used in the VIDIOC_QUERYMENU ioctl for querying menu items */
+/* Used in the VIDIOC_TQUERYMENU ioctl for querying menu items */
struct v4l2_querymenu
{
__u32 id;
@@ -828,7 +828,7 @@ struct v4l2_streamparm
* I O C T L C O D E S F O R V I D E O D E V I C E S
*
*/
-#define VIDIOC_QUERYCAP _IOR ('V', 0, struct v4l2_capability)
+#define VIDIOC_TQUERYCAP _IOR ('V', 0, struct v4l2_capability)
#define VIDIOC_RESERVED _IO ('V', 1)
#define VIDIOC_ENUM_FMT _IOWR ('V', 2, struct v4l2_fmtdesc)
#define VIDIOC_G_FMT _IOWR ('V', 4, struct v4l2_format)
@@ -837,13 +837,13 @@ struct v4l2_streamparm
#define VIDIOC_G_COMP _IOR ('V', 6, struct v4l2_compression)
#define VIDIOC_S_COMP _IOW ('V', 7, struct v4l2_compression)
#endif
-#define VIDIOC_REQBUFS _IOWR ('V', 8, struct v4l2_requestbuffers)
-#define VIDIOC_QUERYBUF _IOWR ('V', 9, struct v4l2_buffer)
+#define VIDIOC_RETQBUFS _IOWR ('V', 8, struct v4l2_requestbuffers)
+#define VIDIOC_TQUERYBUF _IOWR ('V', 9, struct v4l2_buffer)
#define VIDIOC_G_FBUF _IOR ('V', 10, struct v4l2_framebuffer)
#define VIDIOC_S_FBUF _IOW ('V', 11, struct v4l2_framebuffer)
#define VIDIOC_OVERLAY _IOW ('V', 14, int)
-#define VIDIOC_QBUF _IOWR ('V', 15, struct v4l2_buffer)
-#define VIDIOC_DQBUF _IOWR ('V', 17, struct v4l2_buffer)
+#define VIDIOC_TQBUF _IOWR ('V', 15, struct v4l2_buffer)
+#define VIDIOC_DTQBUF _IOWR ('V', 17, struct v4l2_buffer)
#define VIDIOC_STREAMON _IOW ('V', 18, int)
#define VIDIOC_STREAMOFF _IOW ('V', 19, int)
#define VIDIOC_G_PARM _IOWR ('V', 21, struct v4l2_streamparm)
@@ -858,8 +858,8 @@ struct v4l2_streamparm
#define VIDIOC_S_TUNER _IOW ('V', 30, struct v4l2_tuner)
#define VIDIOC_G_AUDIO _IOR ('V', 33, struct v4l2_audio)
#define VIDIOC_S_AUDIO _IOW ('V', 34, struct v4l2_audio)
-#define VIDIOC_QUERYCTRL _IOWR ('V', 36, struct v4l2_queryctrl)
-#define VIDIOC_QUERYMENU _IOWR ('V', 37, struct v4l2_querymenu)
+#define VIDIOC_TQUERYCTRL _IOWR ('V', 36, struct v4l2_queryctrl)
+#define VIDIOC_TQUERYMENU _IOWR ('V', 37, struct v4l2_querymenu)
#define VIDIOC_G_INPUT _IOR ('V', 38, int)
#define VIDIOC_S_INPUT _IOWR ('V', 39, int)
#define VIDIOC_G_OUTPUT _IOR ('V', 46, int)
@@ -876,7 +876,7 @@ struct v4l2_streamparm
#define VIDIOC_S_CROP _IOW ('V', 60, struct v4l2_crop)
#define VIDIOC_G_JPEGCOMP _IOR ('V', 61, struct v4l2_jpegcompression)
#define VIDIOC_S_JPEGCOMP _IOW ('V', 62, struct v4l2_jpegcompression)
-#define VIDIOC_QUERYSTD _IOR ('V', 63, v4l2_std_id)
+#define VIDIOC_TQUERYSTD _IOR ('V', 63, v4l2_std_id)
#define VIDIOC_TRY_FMT _IOWR ('V', 64, struct v4l2_format)
#define VIDIOC_ENUMAUDIO _IOWR ('V', 65, struct v4l2_audio)
#define VIDIOC_ENUMAUDOUT _IOWR ('V', 66, struct v4l2_audioout)
diff --git a/kradio3/plugins/v4lradio/v4lcfg_interfaces.cpp b/kradio3/plugins/v4lradio/v4lcfg_interfaces.cpp
index c679c76..ea0d110 100644
--- a/kradio3/plugins/v4lradio/v4lcfg_interfaces.cpp
+++ b/kradio3/plugins/v4lradio/v4lcfg_interfaces.cpp
@@ -22,7 +22,7 @@
V4LCaps::V4LCaps()
: version(0),
- description(QString::null),
+ description(TQString()),
hasMute(false),
hasVolume(false),
minVolume(0),
@@ -62,13 +62,13 @@ V4LCaps::V4LCaps(const V4LCaps &c)
// IV4LCfg
-IF_IMPL_SENDER ( IV4LCfg::notifyRadioDeviceChanged(const QString &s),
+IF_IMPL_SENDER ( IV4LCfg::notifyRadioDeviceChanged(const TQString &s),
noticeRadioDeviceChanged(s)
)
-IF_IMPL_SENDER ( IV4LCfg::notifyPlaybackMixerChanged(const QString &s, const QString &Channel),
+IF_IMPL_SENDER ( IV4LCfg::notifyPlaybackMixerChanged(const TQString &s, const TQString &Channel),
noticePlaybackMixerChanged(s, Channel)
)
-IF_IMPL_SENDER ( IV4LCfg::notifyCaptureMixerChanged(const QString &s, const QString &Channel),
+IF_IMPL_SENDER ( IV4LCfg::notifyCaptureMixerChanged(const TQString &s, const TQString &Channel),
noticeCaptureMixerChanged(s, Channel)
)
IF_IMPL_SENDER ( IV4LCfg::notifyDeviceVolumeChanged(float v),
@@ -91,13 +91,13 @@ IF_IMPL_SENDER ( IV4LCfg::notifyVolumeZeroOnPowerOffChanged(bool a),
)
// IV4LCfgClient
-IF_IMPL_SENDER ( IV4LCfgClient::sendRadioDevice (const QString &s),
+IF_IMPL_SENDER ( IV4LCfgClient::sendRadioDevice (const TQString &s),
setRadioDevice(s)
)
-IF_IMPL_SENDER ( IV4LCfgClient::sendPlaybackMixer(const QString &s, const QString &ch),
+IF_IMPL_SENDER ( IV4LCfgClient::sendPlaybackMixer(const TQString &s, const TQString &ch),
setPlaybackMixer(s, ch)
)
-IF_IMPL_SENDER ( IV4LCfgClient::sendCaptureMixer(const QString &s, const QString &ch),
+IF_IMPL_SENDER ( IV4LCfgClient::sendCaptureMixer(const TQString &s, const TQString &ch),
setCaptureMixer(s, ch)
)
IF_IMPL_SENDER ( IV4LCfgClient::sendDeviceVolume(float v),
@@ -116,51 +116,51 @@ IF_IMPL_SENDER ( IV4LCfgClient::sendVolumeZeroOnPowerOff(bool a),
setVolumeZeroOnPowerOff(a)
)
-static QString defaultRDev("/dev/radio");
-// static QString defaultMDev("/dev/mixer");
+static TQString defaultRDev("/dev/radio");
+// static TQString defaultMDev("/dev/mixer");
-IF_IMPL_QUERY ( const QString &IV4LCfgClient::queryRadioDevice (),
+IF_IMPL_TQUERY ( const TQString &IV4LCfgClient::queryRadioDevice (),
getRadioDevice(),
defaultRDev
)
-IF_IMPL_QUERY ( const QString &IV4LCfgClient::queryPlaybackMixerID (),
+IF_IMPL_TQUERY ( const TQString &IV4LCfgClient::queryPlaybackMixerID (),
getPlaybackMixerID(),
- QString::null
+ TQString()
)
-IF_IMPL_QUERY ( const QString &IV4LCfgClient::queryCaptureMixerID (),
+IF_IMPL_TQUERY ( const TQString &IV4LCfgClient::queryCaptureMixerID (),
getCaptureMixerID(),
- QString::null
+ TQString()
)
-static const QString channel_line("Line");
-IF_IMPL_QUERY ( const QString &IV4LCfgClient::queryPlaybackMixerChannel(),
+static const TQString channel_line("Line");
+IF_IMPL_TQUERY ( const TQString &IV4LCfgClient::queryPlaybackMixerChannel(),
getPlaybackMixerChannel(),
channel_line
)
-IF_IMPL_QUERY ( const QString &IV4LCfgClient::queryCaptureMixerChannel(),
+IF_IMPL_TQUERY ( const TQString &IV4LCfgClient::queryCaptureMixerChannel(),
getCaptureMixerChannel(),
channel_line
)
-IF_IMPL_QUERY ( float IV4LCfgClient::queryDeviceVolume (),
+IF_IMPL_TQUERY ( float IV4LCfgClient::queryDeviceVolume (),
getDeviceVolume(),
0.0
)
-IF_IMPL_QUERY ( V4LCaps IV4LCfgClient::queryCapabilities(QString dev),
+IF_IMPL_TQUERY ( V4LCaps IV4LCfgClient::queryCapabilities(TQString dev),
getCapabilities(dev),
V4LCaps()
)
-IF_IMPL_QUERY ( bool IV4LCfgClient::queryActivePlayback(),
+IF_IMPL_TQUERY ( bool IV4LCfgClient::queryActivePlayback(),
getActivePlayback(),
false
)
-IF_IMPL_QUERY ( bool IV4LCfgClient::queryMuteOnPowerOff(),
+IF_IMPL_TQUERY ( bool IV4LCfgClient::queryMuteOnPowerOff(),
getMuteOnPowerOff(),
false
)
-IF_IMPL_QUERY ( bool IV4LCfgClient::queryVolumeZeroOnPowerOff(),
+IF_IMPL_TQUERY ( bool IV4LCfgClient::queryVolumeZeroOnPowerOff(),
getVolumeZeroOnPowerOff(),
false
)
diff --git a/kradio3/plugins/v4lradio/v4lcfg_interfaces.h b/kradio3/plugins/v4lradio/v4lcfg_interfaces.h
index f2e1032..2a099e1 100644
--- a/kradio3/plugins/v4lradio/v4lcfg_interfaces.h
+++ b/kradio3/plugins/v4lradio/v4lcfg_interfaces.h
@@ -24,7 +24,7 @@
struct V4LCaps
{
int version;
- QString description;
+ TQString description;
bool hasMute;
@@ -74,18 +74,18 @@ public:
IF_CON_DESTRUCTOR(IV4LCfg, -1)
RECEIVERS:
- IF_RECEIVER( setRadioDevice (const QString &s) )
- IF_RECEIVER( setPlaybackMixer(const QString &soundStreamClientID, const QString &ch) )
- IF_RECEIVER( setCaptureMixer (const QString &soundStreamClientID, const QString &ch) )
+ IF_RECEIVER( setRadioDevice (const TQString &s) )
+ IF_RECEIVER( setPlaybackMixer(const TQString &soundStreamClientID, const TQString &ch) )
+ IF_RECEIVER( setCaptureMixer (const TQString &soundStreamClientID, const TQString &ch) )
IF_RECEIVER( setDeviceVolume(float v) )
IF_RECEIVER( setActivePlayback(bool a) )
IF_RECEIVER( setMuteOnPowerOff(bool m) )
IF_RECEIVER( setVolumeZeroOnPowerOff(bool m) )
SENDERS:
- IF_SENDER ( notifyRadioDeviceChanged (const QString &s) )
- IF_SENDER ( notifyPlaybackMixerChanged(const QString &soundStreamClientID, const QString &Channel) )
- IF_SENDER ( notifyCaptureMixerChanged (const QString &soundStreamClientID, const QString &Channel) )
+ IF_SENDER ( notifyRadioDeviceChanged (const TQString &s) )
+ IF_SENDER ( notifyPlaybackMixerChanged(const TQString &soundStreamClientID, const TQString &Channel) )
+ IF_SENDER ( notifyCaptureMixerChanged (const TQString &soundStreamClientID, const TQString &Channel) )
IF_SENDER ( notifyDeviceVolumeChanged (float v) )
IF_SENDER ( notifyCapabilitiesChanged (const V4LCaps &) )
IF_SENDER ( notifyActivePlaybackChanged (bool a) )
@@ -93,13 +93,13 @@ SENDERS:
IF_SENDER ( notifyVolumeZeroOnPowerOffChanged (bool a) )
ANSWERS:
- IF_ANSWER ( const QString &getRadioDevice () const )
- IF_ANSWER ( const QString &getPlaybackMixerID () const )
- IF_ANSWER ( const QString &getCaptureMixerID () const )
- IF_ANSWER ( const QString &getPlaybackMixerChannel() const )
- IF_ANSWER ( const QString &getCaptureMixerChannel() const )
+ IF_ANSWER ( const TQString &getRadioDevice () const )
+ IF_ANSWER ( const TQString &getPlaybackMixerID () const )
+ IF_ANSWER ( const TQString &getCaptureMixerID () const )
+ IF_ANSWER ( const TQString &getPlaybackMixerChannel() const )
+ IF_ANSWER ( const TQString &getCaptureMixerChannel() const )
IF_ANSWER ( float getDeviceVolume() const )
- IF_ANSWER ( V4LCaps getCapabilities(QString dev = QString::null) const )
+ IF_ANSWER ( V4LCaps getCapabilities(TQString dev = TQString()) const )
IF_ANSWER ( bool getActivePlayback() const )
IF_ANSWER ( bool getMuteOnPowerOff() const )
IF_ANSWER ( bool getVolumeZeroOnPowerOff() const )
@@ -113,35 +113,35 @@ public:
IF_CON_DESTRUCTOR(IV4LCfgClient, 1)
SENDERS:
- IF_SENDER ( sendRadioDevice (const QString &s) )
- IF_SENDER ( sendPlaybackMixer(const QString &soundStreamClientID, const QString &ch) )
- IF_SENDER ( sendCaptureMixer (const QString &soundStreamClientID, const QString &ch) )
+ IF_SENDER ( sendRadioDevice (const TQString &s) )
+ IF_SENDER ( sendPlaybackMixer(const TQString &soundStreamClientID, const TQString &ch) )
+ IF_SENDER ( sendCaptureMixer (const TQString &soundStreamClientID, const TQString &ch) )
IF_SENDER ( sendDeviceVolume(float v) )
IF_SENDER ( sendActivePlayback(bool a) )
IF_SENDER ( sendMuteOnPowerOff(bool a) )
IF_SENDER ( sendVolumeZeroOnPowerOff(bool a) )
RECEIVERS:
- IF_RECEIVER( noticeRadioDeviceChanged(const QString &s) )
- IF_RECEIVER( noticePlaybackMixerChanged(const QString &soundStreamClientID, const QString &Channel) )
- IF_RECEIVER( noticeCaptureMixerChanged (const QString &soundStreamClientID, const QString &Channel) )
+ IF_RECEIVER( noticeRadioDeviceChanged(const TQString &s) )
+ IF_RECEIVER( noticePlaybackMixerChanged(const TQString &soundStreamClientID, const TQString &Channel) )
+ IF_RECEIVER( noticeCaptureMixerChanged (const TQString &soundStreamClientID, const TQString &Channel) )
IF_RECEIVER( noticeDeviceVolumeChanged(float v) )
IF_RECEIVER( noticeCapabilitiesChanged(const V4LCaps &) )
IF_RECEIVER( noticeActivePlaybackChanged(bool a) )
IF_RECEIVER( noticeMuteOnPowerOffChanged(bool a) )
IF_RECEIVER( noticeVolumeZeroOnPowerOffChanged(bool a) )
-QUERIES:
- IF_QUERY ( const QString &queryRadioDevice () )
- IF_QUERY ( const QString &queryPlaybackMixerID () )
- IF_QUERY ( const QString &queryCaptureMixerID () )
- IF_QUERY ( const QString &queryPlaybackMixerChannel() )
- IF_QUERY ( const QString &queryCaptureMixerChannel() )
- IF_QUERY ( float queryDeviceVolume() )
- IF_QUERY ( V4LCaps queryCapabilities(QString dev = QString::null) )
- IF_QUERY ( bool queryActivePlayback() )
- IF_QUERY ( bool queryMuteOnPowerOff() )
- IF_QUERY ( bool queryVolumeZeroOnPowerOff() )
+TQUERIES:
+ IF_TQUERY ( const TQString &queryRadioDevice () )
+ IF_TQUERY ( const TQString &queryPlaybackMixerID () )
+ IF_TQUERY ( const TQString &queryCaptureMixerID () )
+ IF_TQUERY ( const TQString &queryPlaybackMixerChannel() )
+ IF_TQUERY ( const TQString &queryCaptureMixerChannel() )
+ IF_TQUERY ( float queryDeviceVolume() )
+ IF_TQUERY ( V4LCaps queryCapabilities(TQString dev = TQString()) )
+ IF_TQUERY ( bool queryActivePlayback() )
+ IF_TQUERY ( bool queryMuteOnPowerOff() )
+ IF_TQUERY ( bool queryVolumeZeroOnPowerOff() )
RECEIVERS:
virtual void noticeConnectedI (cmplInterface *, bool /*pointer_valid*/);
diff --git a/kradio3/plugins/v4lradio/v4lradio-configuration-ui.ui b/kradio3/plugins/v4lradio/v4lradio-configuration-ui.ui
index 2cc4cfd..165ebfa 100644
--- a/kradio3/plugins/v4lradio/v4lradio-configuration-ui.ui
+++ b/kradio3/plugins/v4lradio/v4lradio-configuration-ui.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>V4LRadioConfigurationUI</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>V4LRadioConfigurationUI</cstring>
</property>
@@ -22,14 +22,14 @@
<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>kTabWidget1</cstring>
</property>
<property name="currentPage">
<number>0</number>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>TabPage</cstring>
</property>
@@ -53,14 +53,14 @@
<property name="sizeType">
<enum>Preferred</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>40</width>
<height>21</height>
</size>
</property>
</spacer>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>labelPlaybackMixerDevice</cstring>
</property>
@@ -68,7 +68,7 @@
<string>Playback Mixer Device</string>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>labelPlaybackMixerChannel</cstring>
</property>
@@ -86,7 +86,7 @@
<property name="sizeType">
<enum>Preferred</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>40</width>
<height>21</height>
@@ -103,7 +103,7 @@
<property name="sizeType">
<enum>Preferred</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>40</width>
<height>21</height>
@@ -120,7 +120,7 @@
<property name="sizeType">
<enum>Preferred</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>40</width>
<height>21</height>
@@ -137,7 +137,7 @@
<property name="sizeType">
<enum>Preferred</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>40</width>
<height>21</height>
@@ -154,14 +154,14 @@
<property name="sizeType">
<enum>Preferred</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>152</width>
<height>21</height>
</size>
</property>
</spacer>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>labelRadioDevice</cstring>
</property>
@@ -169,7 +169,7 @@
<string>Radio Device</string>
</property>
</widget>
- <widget class="QPushButton" row="0" column="2">
+ <widget class="TQPushButton" row="0" column="2">
<property name="name">
<cstring>buttonSelectRadioDevice</cstring>
</property>
@@ -188,7 +188,7 @@
<iconset>"fileopen"</iconset>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>labelCaptureMixerDevice</cstring>
</property>
@@ -196,7 +196,7 @@
<string>Capture Mixer Device</string>
</property>
</widget>
- <widget class="QComboBox" row="5" column="1">
+ <widget class="TQComboBox" row="5" column="1">
<property name="name">
<cstring>comboCaptureMixerChannel</cstring>
</property>
@@ -209,7 +209,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QLabel" row="5" column="0">
+ <widget class="TQLabel" row="5" column="0">
<property name="name">
<cstring>labelCaptureMixerChannel</cstring>
</property>
@@ -217,7 +217,7 @@
<string>Capture Mixer Channel</string>
</property>
</widget>
- <widget class="QComboBox" row="4" column="1">
+ <widget class="TQComboBox" row="4" column="1">
<property name="name">
<cstring>comboCaptureMixerDevice</cstring>
</property>
@@ -230,7 +230,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QComboBox" row="3" column="1">
+ <widget class="TQComboBox" row="3" column="1">
<property name="name">
<cstring>comboPlaybackMixerChannel</cstring>
</property>
@@ -243,7 +243,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QComboBox" row="2" column="1">
+ <widget class="TQComboBox" row="2" column="1">
<item>
<property name="text">
<string>test</string>
@@ -261,7 +261,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QLabel" row="1" column="1">
+ <widget class="TQLabel" row="1" column="1">
<property name="name">
<cstring>labelDescription</cstring>
</property>
@@ -269,7 +269,7 @@
<string>unknown v4l device</string>
</property>
</widget>
- <widget class="QLineEdit" row="0" column="1">
+ <widget class="TQLineEdit" row="0" column="1">
<property name="name">
<cstring>editRadioDevice</cstring>
</property>
@@ -292,14 +292,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>5</width>
<height>5</height>
</size>
</property>
</spacer>
- <widget class="QCheckBox" row="6" column="0" rowspan="1" colspan="3">
+ <widget class="TQCheckBox" row="6" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>m_checkboxActivePlayback</cstring>
</property>
@@ -318,7 +318,7 @@
<string>Alt+Y</string>
</property>
</widget>
- <widget class="QCheckBox" row="7" column="0" rowspan="1" colspan="3">
+ <widget class="TQCheckBox" row="7" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>m_checkboxMuteOnPowerOff</cstring>
</property>
@@ -337,7 +337,7 @@
<string>Alt+B</string>
</property>
</widget>
- <widget class="QCheckBox" row="8" column="0" rowspan="1" colspan="3">
+ <widget class="TQCheckBox" row="8" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>m_checkboxVolumeZeroOnPowerOff</cstring>
</property>
@@ -358,7 +358,7 @@
</widget>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>TabPage</cstring>
</property>
@@ -372,9 +372,9 @@
<property name="margin">
<number>11</number>
</property>
- <widget class="QLayoutWidget" row="0" column="2">
+ <widget class="TQLayoutWidget" row="0" column="2">
<property name="name">
- <cstring>layout37</cstring>
+ <cstring>tqlayout37</cstring>
</property>
<hbox>
<property name="name">
@@ -383,7 +383,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>labelFrequencyRange</cstring>
</property>
@@ -394,7 +394,7 @@
<string>to</string>
</property>
</widget>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>editMaxFrequency</cstring>
</property>
@@ -427,7 +427,7 @@
</widget>
</hbox>
</widget>
- <widget class="QSpinBox" row="1" column="1">
+ <widget class="TQSpinBox" row="1" column="1">
<property name="name">
<cstring>editScanStep</cstring>
</property>
@@ -452,7 +452,7 @@
<number>50</number>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>labelSignalMinQuality</cstring>
</property>
@@ -460,7 +460,7 @@
<string>minimum signal quality</string>
</property>
</widget>
- <widget class="QSpinBox" row="0" column="1">
+ <widget class="TQSpinBox" row="0" column="1">
<property name="name">
<cstring>editMinFrequency</cstring>
</property>
@@ -491,7 +491,7 @@
<number>0</number>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>labelScanStep</cstring>
</property>
@@ -499,7 +499,7 @@
<string>station scan step</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>labelMinMaxFrequency</cstring>
</property>
@@ -507,7 +507,7 @@
<string>allowed frequency range</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="2">
+ <widget class="TQLabel" row="1" column="2">
<property name="name">
<cstring>textLabel1_3</cstring>
</property>
@@ -515,7 +515,7 @@
<string></string>
</property>
</widget>
- <widget class="QSpinBox" row="2" column="1">
+ <widget class="TQSpinBox" row="2" column="1">
<property name="name">
<cstring>editSignalMinQuality</cstring>
</property>
@@ -531,7 +531,7 @@
<number>75</number>
</property>
</widget>
- <widget class="QLabel" row="2" column="2">
+ <widget class="TQLabel" row="2" column="2">
<property name="name">
<cstring>textLabel1_4_2</cstring>
</property>
@@ -549,7 +549,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>5</height>
@@ -558,7 +558,7 @@
</spacer>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>TabPage</cstring>
</property>
@@ -572,9 +572,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>layout35</cstring>
+ <cstring>tqlayout35</cstring>
</property>
<vbox>
<property name="name">
@@ -586,20 +586,20 @@
<property name="spacing">
<number>3</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>labelDeviceVolume</cstring>
</property>
<property name="text">
<string>volume</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignCenter</set>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout34</cstring>
+ <cstring>tqlayout34</cstring>
</property>
<hbox>
<property name="name">
@@ -615,14 +615,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QSlider">
+ <widget class="TQSlider">
<property name="name">
<cstring>sliderDeviceVolume</cstring>
</property>
@@ -643,7 +643,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>16</width>
<height>20</height>
@@ -662,9 +662,9 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget" row="0" column="1">
+ <widget class="TQLayoutWidget" row="0" column="1">
<property name="name">
- <cstring>layout35_2</cstring>
+ <cstring>tqlayout35_2</cstring>
</property>
<vbox>
<property name="name">
@@ -676,20 +676,20 @@
<property name="spacing">
<number>3</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>labelTreble</cstring>
</property>
<property name="text">
<string>treble</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignCenter</set>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout34_2</cstring>
+ <cstring>tqlayout34_2</cstring>
</property>
<hbox>
<property name="name">
@@ -705,14 +705,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QSlider">
+ <widget class="TQSlider">
<property name="name">
<cstring>sliderTreble</cstring>
</property>
@@ -733,7 +733,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>16</width>
<height>20</height>
@@ -752,9 +752,9 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget" row="0" column="2">
+ <widget class="TQLayoutWidget" row="0" column="2">
<property name="name">
- <cstring>layout35_2_2</cstring>
+ <cstring>tqlayout35_2_2</cstring>
</property>
<vbox>
<property name="name">
@@ -766,20 +766,20 @@
<property name="spacing">
<number>3</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>labelBass</cstring>
</property>
<property name="text">
<string>bass</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignCenter</set>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout34_2_3</cstring>
+ <cstring>tqlayout34_2_3</cstring>
</property>
<hbox>
<property name="name">
@@ -795,14 +795,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QSlider">
+ <widget class="TQSlider">
<property name="name">
<cstring>sliderBass</cstring>
</property>
@@ -823,7 +823,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>16</width>
<height>20</height>
@@ -842,9 +842,9 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget" row="0" column="3">
+ <widget class="TQLayoutWidget" row="0" column="3">
<property name="name">
- <cstring>layout51</cstring>
+ <cstring>tqlayout51</cstring>
</property>
<vbox>
<property name="name">
@@ -853,14 +853,14 @@
<property name="spacing">
<number>3</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>labelBalance</cstring>
</property>
<property name="text">
<string>balance</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignCenter</set>
</property>
</widget>
@@ -874,14 +874,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>33</height>
</size>
</property>
</spacer>
- <widget class="QSlider">
+ <widget class="TQSlider">
<property name="name">
<cstring>sliderBalance</cstring>
</property>
@@ -911,7 +911,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>33</height>
@@ -951,7 +951,7 @@
<include location="global" impldecl="in implementation">knuminput.h</include>
</includes>
<pixmapfunction>SmallIconSet</pixmapfunction>
-<layoutdefaults spacing="6" margin="0"/>
+<tqlayoutdefaults spacing="6" margin="0"/>
<includehints>
<includehint>ktabwidget.h</includehint>
<includehint>knuminput.h</includehint>
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());
diff --git a/kradio3/plugins/v4lradio/v4lradio-configuration.h b/kradio3/plugins/v4lradio/v4lradio-configuration.h
index bf41b54..e6cf60b 100644
--- a/kradio3/plugins/v4lradio/v4lradio-configuration.h
+++ b/kradio3/plugins/v4lradio/v4lradio-configuration.h
@@ -30,7 +30,7 @@
#include "v4lcfg_interfaces.h"
class V4LRadio;
-class QWidget;
+class TQWidget;
class V4LRadioConfiguration : public V4LRadioConfigurationUI,
public IV4LCfgClient,
@@ -39,8 +39,9 @@ class V4LRadioConfiguration : public V4LRadioConfigurationUI,
public IRadioDeviceClient
{
Q_OBJECT
+ TQ_OBJECT
public :
- V4LRadioConfiguration (QWidget *parent, SoundStreamID id);
+ V4LRadioConfiguration (TQWidget *tqparent, SoundStreamID id);
~V4LRadioConfiguration ();
bool connectI (Interface *i);
@@ -52,9 +53,9 @@ public :
// IV4LCfgClient
RECEIVERS:
- bool noticeRadioDeviceChanged(const QString &s);
- bool noticePlaybackMixerChanged(const QString &soundStreamClientID, const QString &Channel);
- bool noticeCaptureMixerChanged (const QString &soundStreamClientID, const QString &Channel);
+ bool noticeRadioDeviceChanged(const TQString &s);
+ bool noticePlaybackMixerChanged(const TQString &soundStreamClientID, const TQString &Channel);
+ bool noticeCaptureMixerChanged (const TQString &soundStreamClientID, const TQString &Channel);
bool noticeDeviceVolumeChanged(float v);
bool noticeCapabilitiesChanged(const V4LCaps &c);
bool noticeActivePlaybackChanged(bool a);
@@ -66,7 +67,7 @@ RECEIVERS:
RECEIVERS:
bool noticePowerChanged (bool /*on*/, const IRadioDevice */*sender = NULL*/) { return false; }
bool noticeStationChanged (const RadioStation &, const IRadioDevice */*sender = NULL*/) { return false; }
- bool noticeDescriptionChanged (const QString &, const IRadioDevice *sender = NULL);
+ bool noticeDescriptionChanged (const TQString &, const IRadioDevice *sender = NULL);
bool noticeCurrentSoundStreamIDChanged(SoundStreamID /*id*/, const IRadioDevice */*sender*/) { return false; }
@@ -88,14 +89,14 @@ RECEIVERS:
bool noticeBalanceChanged(SoundStreamID id, float b);
bool noticeSignalMinQualityChanged(SoundStreamID id, float q);
- bool noticePlaybackChannelsChanged(const QString & /*client_id*/, const QStringList &/*channels*/);
- bool noticeCaptureChannelsChanged (const QString & /*client_id*/, const QStringList &/*channels*/);
+ bool noticePlaybackChannelsChanged(const TQString & /*client_id*/, const TQStringList &/*channels*/);
+ bool noticeCaptureChannelsChanged (const TQString & /*client_id*/, const TQStringList &/*channels*/);
bool noticeSoundStreamCreated(SoundStreamID /*id*/);
protected:
- bool eventFilter(QObject *o, QEvent *e);
+ bool eventFilter(TQObject *o, TQEvent *e);
protected slots:
@@ -135,8 +136,8 @@ protected:
V4LCaps m_caps;
- typedef GUIListHelper<QComboBox, QString> StringListHelper;
- typedef GUISimpleListHelper<QComboBox> ChannelListHelper;
+ typedef GUIListHelper<TQComboBox, TQString> StringListHelper;
+ typedef GUISimpleListHelper<TQComboBox> ChannelListHelper;
StringListHelper m_PlaybackMixerHelper,
m_CaptureMixerHelper;
diff --git a/kradio3/plugins/v4lradio/v4lradio.cpp b/kradio3/plugins/v4lradio/v4lradio.cpp
index fb1ee9f..dbfec2a 100644
--- a/kradio3/plugins/v4lradio/v4lradio.cpp
+++ b/kradio3/plugins/v4lradio/v4lradio.cpp
@@ -1,7 +1,7 @@
/***************************************************************************
v4lradio.cpp - description
-------------------
- begin : Don Mär 8 21:57:17 CET 2001
+ begin : Don M�r 8 21:57:17 CET 2001
copyright : (C) 2002-2005 by Ernst Martin Witte
email : witte@kawo1.rwth-aachen.de
***************************************************************************/
@@ -31,10 +31,10 @@
#include <string.h> // memcpy needed
-#include <qlayout.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qvaluelist.h>
+#include <tqlayout.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqvaluelist.h>
#include <kconfig.h>
#include <kiconloader.h>
@@ -57,7 +57,7 @@ PLUGIN_LIBRARY_FUNCTIONS(V4LRadio, "kradio-v4lradio", i18n("Support for V4L(2) R
///////////////////////////////////////////////////////////////////////
-V4LRadio::V4LRadio(const QString &name)
+V4LRadio::V4LRadio(const TQString &name)
: PluginBase(name, i18n("Video For Linux Plugin")),
m_treble(0.5),
m_bass(0.5),
@@ -85,16 +85,16 @@ V4LRadio::V4LRadio(const QString &name)
m_blockReadAudio(false),
m_SoundStreamID(createNewSoundStream(false)),
- m_PlaybackMixerID(QString::null),
- m_CaptureMixerID(QString::null),
- m_PlaybackMixerChannel(QString::null),
- m_CaptureMixerChannel(QString::null),
+ m_PlaybackMixerID(TQString()),
+ m_CaptureMixerID(TQString()),
+ m_PlaybackMixerChannel(TQString()),
+ m_CaptureMixerChannel(TQString()),
m_ActivePlayback(false),
m_MuteOnPowerOff(false),
m_VolumeZeroOnPowerOff(false),
m_restorePowerOn(false)
{
- QObject::connect (&m_pollTimer, SIGNAL(timeout()), this, SLOT(poll()));
+ TQObject::connect (&m_pollTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(poll()));
m_pollTimer.start(333);
m_audio = new video_audio;
@@ -212,7 +212,7 @@ void V4LRadio::searchMixers(ISoundStreamClient **playback_mixer, ISoundStreamCli
if (playback_mixer) {
*playback_mixer = getSoundStreamClientWithID(m_PlaybackMixerID);
if (!*playback_mixer) {
- QPtrList<ISoundStreamClient> playback_mixers = queryPlaybackMixers();
+ TQPtrList<ISoundStreamClient> playback_mixers = queryPlaybackMixers();
if (!playback_mixers.isEmpty())
*playback_mixer = playback_mixers.first();
}
@@ -220,7 +220,7 @@ void V4LRadio::searchMixers(ISoundStreamClient **playback_mixer, ISoundStreamCli
if (capture_mixer) {
*capture_mixer = getSoundStreamClientWithID(m_CaptureMixerID);
if (!*capture_mixer) {
- QPtrList<ISoundStreamClient> capture_mixers = queryCaptureMixers();
+ TQPtrList<ISoundStreamClient> capture_mixers = queryCaptureMixers();
if (!capture_mixers.isEmpty())
*capture_mixer = capture_mixers.first();
}
@@ -336,7 +336,7 @@ const RadioStation &V4LRadio::getCurrentStation() const
}
-const QString &V4LRadio::getDescription() const
+const TQString &V4LRadio::getDescription() const
{
return m_caps.description;
}
@@ -656,7 +656,7 @@ bool V4LRadio::setFrequency(float freq)
if (freq > maxf || freq < minf) {
logError("V4LRadio::setFrequency: " +
- i18n("invalid frequency %1").arg(QString().setNum(freq)));
+ i18n("invalid frequency %1").tqarg(TQString().setNum(freq)));
if (!oldMute && !m_ActivePlayback)
unmute(m_SoundStreamID);
return false;
@@ -678,14 +678,14 @@ bool V4LRadio::setFrequency(float freq)
else {
logError("V4LRadio::setFrequency: " +
i18n("don't known how to handle V4L-version %1")
- .arg(m_caps.version));
+ .tqarg(m_caps.version));
}
if (r) {
logError("V4LRadio::setFrequency: " +
i18n("error setting frequency to %1 (%2)")
- .arg(QString().setNum(freq))
- .arg(QString().setNum(r)));
+ .tqarg(TQString().setNum(freq))
+ .tqarg(TQString().setNum(r)));
// unmute the old radio with the old radio station
if (!oldMute && !m_ActivePlayback)
unmute(m_SoundStreamID);
@@ -788,7 +788,7 @@ float V4LRadio::getScanStep() const
// IV4LCfg methods
-bool V4LRadio::setRadioDevice(const QString &s)
+bool V4LRadio::setRadioDevice(const TQString &s)
{
if (m_radioDev != s) {
bool p = isPowerOn();
@@ -805,7 +805,7 @@ bool V4LRadio::setRadioDevice(const QString &s)
}
-bool V4LRadio::setPlaybackMixer(const QString &soundStreamClientID, const QString &ch)
+bool V4LRadio::setPlaybackMixer(const TQString &soundStreamClientID, const TQString &ch)
{
bool change = m_PlaybackMixerID != soundStreamClientID || m_PlaybackMixerChannel != ch;
m_PlaybackMixerID = soundStreamClientID;
@@ -839,7 +839,7 @@ bool V4LRadio::setPlaybackMixer(const QString &soundStreamClientID, const QStri
}
-bool V4LRadio::setCaptureMixer(const QString &soundStreamClientID, const QString &ch)
+bool V4LRadio::setCaptureMixer(const TQString &soundStreamClientID, const TQString &ch)
{
bool change = m_PlaybackMixerID != soundStreamClientID || m_PlaybackMixerChannel != ch;
m_CaptureMixerID = soundStreamClientID;
@@ -873,7 +873,7 @@ bool V4LRadio::setCaptureMixer(const QString &soundStreamClientID, const QStrin
}
-V4LCaps V4LRadio::getCapabilities(QString dev) const
+V4LCaps V4LRadio::getCapabilities(TQString dev) const
{
if (dev.isNull()) {
return m_caps;
@@ -942,7 +942,7 @@ bool V4LRadio::setVolumeZeroOnPowerOff(bool a)
void V4LRadio::saveState (KConfig *config) const
{
- config->setGroup(QString("v4lradio-") + name());
+ config->setGroup(TQString("v4lradio-") + name());
config->writeEntry("RadioDev", m_radioDev);
@@ -981,19 +981,19 @@ void V4LRadio::restoreState (KConfig *config)
{
BlockProfiler p("V4LRadio::restoreState");
- config->setGroup(QString("v4lradio-") + name());
+ config->setGroup(TQString("v4lradio-") + name());
- QString base_devname = "/dev/radio";
+ TQString base_devname = "/dev/radio";
- QStringList testlist (base_devname );
+ TQStringList testlist (base_devname );
for (int i = 0; i < 9; ++i)
- testlist.append(base_devname + QString::number(i));
+ testlist.append(base_devname + TQString::number(i));
- QString found_devname(QString::null);
- for (QValueListConstIterator<QString> it = testlist.begin(); it != testlist.end(); ++it) {
- QFile f(*it);
+ TQString found_devname(TQString::null);
+ for (TQValueListConstIterator<TQString> it = testlist.begin(); it != testlist.end(); ++it) {
+ TQFile f(*it);
if (f.exists()) {
- QFileInfo info(f);
+ TQFileInfo info(f);
if (info.isReadable() && info.isWritable()) {
found_devname = *it;
break;
@@ -1001,14 +1001,14 @@ void V4LRadio::restoreState (KConfig *config)
else {
if (found_devname.isNull())
found_devname = *it;
- logWarning(i18n("Device %1 does exist but is not readable/writable. Please check device permissions.").arg(*it));
+ logWarning(i18n("Device %1 does exist but is not readable/writable. Please check device permissions.").tqarg(*it));
}
}
}
- QString default_devname = found_devname.isNull() ? base_devname : found_devname;
+ TQString default_devname = found_devname.isNull() ? base_devname : found_devname;
- QString devname = config->readEntry ("RadioDev", default_devname);
+ TQString devname = config->readEntry ("RadioDev", default_devname);
if (found_devname.isNull() && devname == default_devname) {
logError(i18n("Could not find an accessible v4l(2) radio device."));
@@ -1016,11 +1016,11 @@ void V4LRadio::restoreState (KConfig *config)
setRadioDevice(devname);
- QString PlaybackMixerID = config->readEntry ("PlaybackMixerID", QString::null);
- QString PlaybackMixerChannel = config->readEntry ("PlaybackMixerChannel", "Line");
+ TQString PlaybackMixerID = config->readEntry ("PlaybackMixerID", TQString());
+ TQString PlaybackMixerChannel = config->readEntry ("PlaybackMixerChannel", "Line");
- QString CaptureMixerID = config->readEntry ("CaptureMixerID", QString::null);
- QString CaptureMixerChannel = config->readEntry ("CaptureMixerChannel", "Line");
+ TQString CaptureMixerID = config->readEntry ("CaptureMixerID", TQString());
+ TQString CaptureMixerChannel = config->readEntry ("CaptureMixerChannel", "Line");
m_ActivePlayback = config->readBoolEntry("ActivePlayback", false);
m_MuteOnPowerOff = config->readBoolEntry("MuteOnPowerOff", false);
@@ -1123,7 +1123,7 @@ void V4LRadio::radio_init()
radio_done();
logError("V4LRadio::radio_init: " +
- i18n("Cannot open mixer device %1").arg(m_mixerDev));
+ i18n("Cannot open mixer device %1").tqarg(m_mixerDev));
return;
}
*/
@@ -1132,7 +1132,7 @@ void V4LRadio::radio_init()
radio_done();
logError("V4LRadio::radio_init: " +
- i18n("Cannot open radio device %1").arg(m_radioDev));
+ i18n("Cannot open radio device %1").tqarg(m_radioDev));
return;
}
@@ -1170,7 +1170,7 @@ void V4LRadio::radio_done()
#define CAPS_NAME_LEN 127
-V4LCaps V4LRadio::readV4LCaps(const QString &device) const
+V4LCaps V4LRadio::readV4LCaps(const TQString &device) const
{
char buffer[CAPS_NAME_LEN+1];
int r;
@@ -1183,7 +1183,7 @@ V4LCaps V4LRadio::readV4LCaps(const QString &device) const
if (fd < 0) {
logError("V4LRadio::readV4LCaps: " +
- i18n("cannot open %1").arg(device));
+ i18n("cannot open %1").tqarg(device));
return c;
}
@@ -1207,7 +1207,7 @@ V4LCaps V4LRadio::readV4LCaps(const QString &device) const
video_audio audiocaps;
if (0 == ioctl(fd, VIDIOCGAUDIO, &audiocaps)) {
logDebug("V4LRadio::readV4LCaps: " +
- i18n("audio caps = %1").arg(QString().setNum(audiocaps.flags)));
+ i18n("audio caps = %1").tqarg(TQString().setNum(audiocaps.flags)));
if ((audiocaps.flags & VIDEO_AUDIO_MUTABLE) != 0)
c.hasMute = true;
if ((audiocaps.flags & VIDEO_AUDIO_VOLUME) != 0)
@@ -1226,11 +1226,11 @@ V4LCaps V4LRadio::readV4LCaps(const QString &device) const
#ifdef HAVE_V4L2
v4l2_capability caps2;
- r = ioctl(fd, VIDIOC_QUERYCAP, &caps2);
+ r = ioctl(fd, VIDIOC_TQUERYCAP, &caps2);
if (r == 0) {
c.version = 2;
- logDebug(i18n("V4L2 - Version: %1").arg(QString().sprintf("%08X", caps2.version)));
+ logDebug(i18n("V4L2 - Version: %1").tqarg(TQString().sprintf("%08X", caps2.version)));
size_t l = sizeof(caps.name);
l = l < CAPS_NAME_LEN ? l : CAPS_NAME_LEN;
@@ -1247,13 +1247,13 @@ V4LCaps V4LRadio::readV4LCaps(const QString &device) const
c.unsetBalance();
ctrl.id = V4L2_CID_AUDIO_MUTE;
- if (0 == ioctl(fd, VIDIOC_QUERYCTRL, &ctrl))
+ if (0 == ioctl(fd, VIDIOC_TQUERYCTRL, &ctrl))
c.hasMute = !(ctrl.flags & V4L2_CTRL_FLAG_DISABLED);
else
logError(i18n("V4L2: Querying mute control failed"));
ctrl.id = V4L2_CID_AUDIO_VOLUME;
- if (0 == ioctl(fd, VIDIOC_QUERYCTRL, &ctrl)) {
+ if (0 == ioctl(fd, VIDIOC_TQUERYCTRL, &ctrl)) {
if (!(ctrl.flags & V4L2_CTRL_FLAG_DISABLED))
c.setVolume(ctrl.minimum, ctrl.maximum);
} else {
@@ -1261,7 +1261,7 @@ V4LCaps V4LRadio::readV4LCaps(const QString &device) const
}
ctrl.id = V4L2_CID_AUDIO_TREBLE;
- if (0 == ioctl(fd, VIDIOC_QUERYCTRL, &ctrl)) {
+ if (0 == ioctl(fd, VIDIOC_TQUERYCTRL, &ctrl)) {
if (!(ctrl.flags & V4L2_CTRL_FLAG_DISABLED))
c.setTreble(ctrl.minimum, ctrl.maximum);
} else {
@@ -1269,7 +1269,7 @@ V4LCaps V4LRadio::readV4LCaps(const QString &device) const
}
ctrl.id = V4L2_CID_AUDIO_BASS;
- if (0 == ioctl(fd, VIDIOC_QUERYCTRL, &ctrl)) {
+ if (0 == ioctl(fd, VIDIOC_TQUERYCTRL, &ctrl)) {
if (!(ctrl.flags & V4L2_CTRL_FLAG_DISABLED))
c.setBass(ctrl.minimum, c.maxBass = ctrl.maximum);
} else {
@@ -1277,7 +1277,7 @@ V4LCaps V4LRadio::readV4LCaps(const QString &device) const
}
ctrl.id = V4L2_CID_AUDIO_BALANCE;
- if (0 == ioctl(fd, VIDIOC_QUERYCTRL, &ctrl)) {
+ if (0 == ioctl(fd, VIDIOC_TQUERYCTRL, &ctrl)) {
if (!(ctrl.flags & V4L2_CTRL_FLAG_DISABLED))
c.setBalance(ctrl.minimum, ctrl.maximum);
} else {
@@ -1289,7 +1289,7 @@ V4LCaps V4LRadio::readV4LCaps(const QString &device) const
}
#endif
if (c.version > 0) {
- logInfo(i18n("V4L %1 detected").arg(c.version));
+ logInfo(i18n("V4L %1 detected").tqarg(c.version));
} else {
logError(i18n("V4L not detected"));
}
@@ -1356,13 +1356,13 @@ bool V4LRadio::readTunerInfo() const
else {
logError("V4LRadio::readTunerInfo: " +
i18n("don't known how to handle V4L-version %1")
- .arg(QString().setNum(m_caps.version)));
+ .tqarg(TQString().setNum(m_caps.version)));
}
if (r != 0) {
m_signalQuality = 0;
logError("V4LRadio::readTunerInfo: " +
- i18n("cannot get tuner info (error %1)").arg(QString().setNum(r)));
+ i18n("cannot get tuner info (error %1)").tqarg(TQString().setNum(r)));
}
} else {
m_signalQuality = 0;
@@ -1406,7 +1406,7 @@ bool V4LRadio::readTunerInfo() const
} \
x = x ? x : r; \
if (r) \
- logError(i18n("error setting %1: %2").arg(#what).arg(QString().setNum(r))); \
+ logError(i18n("error setting %1: %2").tqarg(#what).tqarg(TQString().setNum(r))); \
}
#define V4L2_G_CTRL(what) \
@@ -1414,7 +1414,7 @@ bool V4LRadio::readTunerInfo() const
r = ioctl (m_radio_fd, VIDIOC_G_CTRL, &ctl); \
x = x ? x : r; \
if (r) \
- logError(i18n("error reading %1: %2").arg(#what).arg(QString().setNum(r))); \
+ logError(i18n("error reading %1: %2").tqarg(#what).tqarg(TQString().setNum(r))); \
}
@@ -1505,14 +1505,14 @@ bool V4LRadio::updateAudioInfo(bool write) const
else {
logError("V4LRadio::updateAudioInfo: " +
i18n("don't known how to handle V4L-version %1")
- .arg(QString().setNum(m_caps.version)));
+ .tqarg(TQString().setNum(m_caps.version)));
}
if (r) {
logError("V4LRadio::updateAudioInfo: " +
i18n("error updating radio audio info (%1): %2")
- .arg(write ? i18n("write") : i18n("read"))
- .arg(QString().setNum(r)));
+ .tqarg(write ? i18n("write") : i18n("read"))
+ .tqarg(TQString().setNum(r)));
return false;
}
}
@@ -1573,7 +1573,7 @@ bool V4LRadio::getPlaybackVolume(SoundStreamID id, float &volume) const
-bool V4LRadio::getSoundStreamDescription(SoundStreamID id, QString &descr) const
+bool V4LRadio::getSoundStreamDescription(SoundStreamID id, TQString &descr) const
{
if (id == m_SoundStreamID) {
descr = name() + " - " + m_currentStation.name();
@@ -1597,10 +1597,10 @@ bool V4LRadio::getSoundStreamRadioStation(SoundStreamID id, const RadioStation *
}
-bool V4LRadio::enumerateSoundStreams(QMap<QString, SoundStreamID> &list) const
+bool V4LRadio::enumerateSoundStreams(TQMap<TQString, SoundStreamID> &list) const
{
if (m_SoundStreamID.isValid()) {
- QString tmp = QString::null;
+ TQString tmp = TQString();
getSoundStreamDescription(m_SoundStreamID, tmp);
list[tmp] = m_SoundStreamID;
return true;
diff --git a/kradio3/plugins/v4lradio/v4lradio.h b/kradio3/plugins/v4lradio/v4lradio.h
index 4b86cb5..e02f976 100644
--- a/kradio3/plugins/v4lradio/v4lradio.h
+++ b/kradio3/plugins/v4lradio/v4lradio.h
@@ -22,7 +22,7 @@
#include <config.h>
#endif
-#include <qtimer.h>
+#include <tqtimer.h>
#include "../../src/include/radiodevice_interfaces.h"
#include "../../src/include/plugins.h"
@@ -38,7 +38,7 @@ struct video_audio;
struct v4l2_tuner;
#endif
-class V4LRadio : public QObject,
+class V4LRadio : public TQObject,
public PluginBase,
public IRadioDevice,
// public IRadioSound,
@@ -48,17 +48,18 @@ class V4LRadio : public QObject,
public IV4LCfg
{
Q_OBJECT
+ TQ_OBJECT
public:
- V4LRadio (const QString &name);
+ V4LRadio (const TQString &name);
virtual ~V4LRadio ();
virtual bool connectI (Interface *);
virtual bool disconnectI (Interface *);
- virtual QString pluginClassName() const { return "V4LRadio"; }
+ virtual TQString pluginClassName() const { return "V4LRadio"; }
- 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(); }
// PluginBase
@@ -83,7 +84,7 @@ ANSWERS:
virtual bool isPowerOff() const;
virtual SoundStreamID getSoundStreamID() const;
virtual const RadioStation & getCurrentStation() const;
- virtual const QString & getDescription() const;
+ virtual const TQString & getDescription() const;
virtual SoundStreamID getCurrentSoundStreamID() const;
@@ -149,18 +150,18 @@ RECEIVERS:
RECEIVERS:
- bool getSoundStreamDescription(SoundStreamID id, QString &descr) const;
+ bool getSoundStreamDescription(SoundStreamID id, TQString &descr) const;
bool getSoundStreamRadioStation(SoundStreamID id, const RadioStation *&rs) const;
- bool enumerateSoundStreams(QMap<QString, SoundStreamID> &list) const;
+ bool enumerateSoundStreams(TQMap<TQString, SoundStreamID> &list) const;
// bool stopCapture(SoundStreamID id); // if active playback also call stopPlayback
// IV4LCfg
RECEIVERS:
- bool setRadioDevice (const QString &s);
- bool setPlaybackMixer(const QString &soundStreamClientID, const QString &ch);
- bool setCaptureMixer (const QString &soundStreamClientID, const QString &ch);
+ bool setRadioDevice (const TQString &s);
+ bool setPlaybackMixer(const TQString &soundStreamClientID, const TQString &ch);
+ bool setCaptureMixer (const TQString &soundStreamClientID, const TQString &ch);
bool setDeviceVolume (float v);
bool setActivePlayback(bool a);
bool setMuteOnPowerOff(bool a);
@@ -171,13 +172,13 @@ RECEIVERS:
bool getPlaybackVolume(SoundStreamID id, float &volume) const;
ANSWERS:
- const QString &getRadioDevice () const { return m_radioDev; }
- const QString &getPlaybackMixerID () const { return m_PlaybackMixerID; }
- const QString &getCaptureMixerID () const { return m_CaptureMixerID; }
- const QString &getPlaybackMixerChannel() const { return m_PlaybackMixerChannel; }
- const QString &getCaptureMixerChannel () const { return m_CaptureMixerChannel; }
+ const TQString &getRadioDevice () const { return m_radioDev; }
+ const TQString &getPlaybackMixerID () const { return m_PlaybackMixerID; }
+ const TQString &getCaptureMixerID () const { return m_CaptureMixerID; }
+ const TQString &getPlaybackMixerChannel() const { return m_PlaybackMixerChannel; }
+ const TQString &getCaptureMixerChannel () const { return m_CaptureMixerChannel; }
float getDeviceVolume () const;
- V4LCaps getCapabilities(QString dev = QString::null) const;
+ V4LCaps getCapabilities(TQString dev = TQString()) const;
bool getActivePlayback() const { return m_ActivePlayback; }
bool getMuteOnPowerOff() const { return m_MuteOnPowerOff; }
@@ -189,7 +190,7 @@ protected slots:
void poll();
protected:
- V4LCaps readV4LCaps(const QString &device) const;
+ V4LCaps readV4LCaps(const TQString &device) const;
void radio_init();
void radio_done();
@@ -223,7 +224,7 @@ protected:
float m_scanStep;
V4LCaps m_caps;
- QString m_radioDev;
+ TQString m_radioDev;
int m_radio_fd;
mutable bool m_useOldV4L2Calls;
@@ -235,7 +236,7 @@ protected:
mutable struct v4l2_tuner *m_tuner2;
#endif
- QTimer m_pollTimer;
+ TQTimer m_pollTimer;
struct TunerCache {
bool valid;
@@ -250,10 +251,10 @@ protected:
m_blockReadAudio;
SoundStreamID m_SoundStreamID;
- QString m_PlaybackMixerID;
- QString m_CaptureMixerID;
- QString m_PlaybackMixerChannel;
- QString m_CaptureMixerChannel;
+ TQString m_PlaybackMixerID;
+ TQString m_CaptureMixerID;
+ TQString m_PlaybackMixerChannel;
+ TQString m_CaptureMixerChannel;
bool m_ActivePlayback;
bool m_MuteOnPowerOff;