diff options
Diffstat (limited to 'kradio3')
181 files changed, 4114 insertions, 4027 deletions
diff --git a/kradio3/convert-presets/convert-presets.cpp b/kradio3/convert-presets/convert-presets.cpp index 3ba733c..93e99ea 100644 --- a/kradio3/convert-presets/convert-presets.cpp +++ b/kradio3/convert-presets/convert-presets.cpp @@ -3,33 +3,33 @@ #endif #include <kapplication.h> -#include <qstring.h> -#include <qtextstream.h> -#include <qfile.h> +#include <tqstring.h> +#include <tqtextstream.h> +#include <tqfile.h> #include <klocale.h> #include <kdebug.h> #include <kaboutdata.h> #include <kcmdlineargs.h> -#include <qregexp.h> +#include <tqregexp.h> #include <time.h> #include <sys/fcntl.h> #include <unistd.h> #define dev_urandom "/dev/urandom" -QString createStationID() +TQString createStationID() { const int buffersize = 32; unsigned char buffer[buffersize]; - QString stime, srandom = ""; + TQString stime, srandom = ""; stime.setNum(time(NULL)); int fd = open (dev_urandom, O_RDONLY); read(fd, buffer, buffersize); close(fd); for (int i = 0; i < buffersize; ++i) - srandom += QString().sprintf("%02X", (unsigned int)buffer[i]); + srandom += TQString().sprintf("%02X", (unsigned int)buffer[i]); // kdDebug() << i18n("generated StationID: ") << stime << srandom << endl; @@ -39,13 +39,13 @@ QString createStationID() -bool convertFile(const QString &file) +bool convertFile(const TQString &file) { //////////////////////////////////////////////////////////////////////// // read input //////////////////////////////////////////////////////////////////////// - QFile presetFile (file); + TQFile presetFile (file); if (! presetFile.open(IO_ReadOnly)) { kdDebug() << "convertFile: " @@ -55,27 +55,27 @@ bool convertFile(const QString &file) return false; } - QString xmlData; + TQString xmlData; // make sure that qtextstream is gone when we close presetFile { - QTextStream ins(&presetFile); - ins.setEncoding(QTextStream::Locale); + TQTextStream ins(&presetFile); + ins.setEncoding(TQTextStream::Locale); xmlData = ins.read(); } - if (xmlData.find("<format>", 0, false) >= 0) { + if (xmlData.tqfind("<format>", 0, false) >= 0) { kdDebug() << "file " << file << " already in new format" << endl; // but add <?xml line at beginning if missing { presetFile.reset(); - QTextStream ins(&presetFile); - ins.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream ins(&presetFile); + ins.setEncoding(TQTextStream::UnicodeUTF8); xmlData = ins.read(); } - if (xmlData.find("<?xml", 0, false) < 0) { + if (xmlData.tqfind("<?xml", 0, false) < 0) { xmlData = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + xmlData; } @@ -85,11 +85,11 @@ bool convertFile(const QString &file) // convert file //////////////////////////////////////////////////////////////////////// - QRegExp qselect("<quickselect>.*</quickselect>"); - QRegExp docking("<dockingmenu>.*</dockingmenu>"); - QRegExp station("<station>(.*)</station>"); - QRegExp stationlist("<stationlist>"); - QRegExp emptyLines("\\n\\s*\\n"); + TQRegExp qselect("<quickselect>.*</quickselect>"); + TQRegExp docking("<dockingmenu>.*</dockingmenu>"); + TQRegExp station("<station>(.*)</station>"); + TQRegExp stationlist("<stationlist>"); + TQRegExp emptyLines("\\n\\s*\\n"); #define stationIDElement "stationID" @@ -98,21 +98,21 @@ bool convertFile(const QString &file) station.setMinimal(true); xmlData = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + xmlData; - xmlData.replace(stationlist, "<stationlist>\n\t\t<format>kradio-1.0</format>"); - xmlData.replace(qselect, ""); - xmlData.replace(docking, ""); - xmlData.replace(station, "<FrequencyRadioStation>\n" + xmlData.tqreplace(stationlist, "<stationlist>\n\t\t<format>kradio-1.0</format>"); + xmlData.tqreplace(qselect, ""); + xmlData.tqreplace(docking, ""); + xmlData.tqreplace(station, "<FrequencyRadioStation>\n" "\t\t\t<" stationIDElement "></" stationIDElement ">" "\\1</FrequencyRadioStation>" ); int p = 0; int f = 0; - while ( (f = xmlData.find("<" stationIDElement "></" stationIDElement ">", p) ) >= 0) { - xmlData.insert(f + 2 + QString(stationIDElement).length(), createStationID()); + while ( (f = xmlData.tqfind("<" stationIDElement "></" stationIDElement ">", p) ) >= 0) { + xmlData.insert(f + 2 + TQString(stationIDElement).length(), createStationID()); } - xmlData.replace(emptyLines, "\n"); + xmlData.tqreplace(emptyLines, "\n"); } presetFile.close(); @@ -130,8 +130,8 @@ bool convertFile(const QString &file) return false; } - QTextStream outs(&presetFile); - outs.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream outs(&presetFile); + outs.setEncoding(TQTextStream::UnicodeUTF8); outs << xmlData; 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>&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><p align="center">Click on the link below to contribute this station preset file to the kradio project.</p></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; diff --git a/kradio3/src/aboutwidget.cpp b/kradio3/src/aboutwidget.cpp index 5039c2d..3fbba1c 100644 --- a/kradio3/src/aboutwidget.cpp +++ b/kradio3/src/aboutwidget.cpp @@ -22,16 +22,16 @@ #include "include/kradioversion.h" #include "include/aboutwidget.h" -#include <qframe.h> +#include <tqframe.h> #include <kaboutdialog.h> -#include <qtabwidget.h> -#include <qlayout.h> -#include <qtabbar.h> -#include <qimage.h> +#include <tqtabwidget.h> +#include <tqlayout.h> +#include <tqtabbar.h> +#include <tqimage.h> #include <kglobalsettings.h> #include <ktextbrowser.h> -#include <qtextedit.h> +#include <tqtextedit.h> #include <kdebug.h> #include <kapplication.h> #include <klocale.h> @@ -41,12 +41,12 @@ // copied (and renamed) from kaboutdialog.cpp // original: KAboutTabWidget -class KRadioAboutTabWidget : public QTabWidget +class KRadioAboutTabWidget : public TQTabWidget { public: - KRadioAboutTabWidget( QWidget* parent ) : QTabWidget( parent ) {} - QSize sizeHint() const { - return QTabWidget::sizeHint().expandedTo( tabBar()->sizeHint() + QSize(4,4) ); + KRadioAboutTabWidget( TQWidget* tqparent ) : TQTabWidget( tqparent ) {} + TQSize tqsizeHint() const { + return TQTabWidget::tqsizeHint().expandedTo( tabBar()->tqsizeHint() + TQSize(4,4) ); } }; @@ -54,49 +54,49 @@ public: // copied (renamed and extended) from kaboutdialog.cpp // original: KAboutContainerBase -KRadioAboutWidget::KRadioAboutWidget(const KAboutData &aboutData, int layoutType, QWidget *_parent, +KRadioAboutWidget::KRadioAboutWidget(const KAboutData &aboutData, int tqlayoutType, TQWidget *_parent, char *_name ) - : QWidget( _parent, _name ), + : TQWidget( _parent, _name ), mImageLabel(0), mTitleLabel(0), mIconLabel(0),mVersionLabel(0), mAuthorLabel(0), mImageFrame(0),mPageTab(0),mPlainSpace(0) { - mTopLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() ); + mTopLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint() ); if( mTopLayout == 0 ) { return; } - if( layoutType & AbtImageOnly ) + if( tqlayoutType & AbtImageOnly ) { - layoutType &= ~(AbtImageLeft|AbtImageRight|AbtTabbed|AbtPlain); + tqlayoutType &= ~(AbtImageLeft|AbtImageRight|AbtTabbed|AbtPlain); } - if( layoutType & AbtImageLeft ) + if( tqlayoutType & AbtImageLeft ) { - layoutType &= ~AbtImageRight; + tqlayoutType &= ~AbtImageRight; } - if( layoutType & AbtTitle ) + if( tqlayoutType & AbtTitle ) { - mTitleLabel = new QLabel( this, "title" ); - mTitleLabel->setAlignment(AlignCenter); + mTitleLabel = new TQLabel( this, "title" ); + mTitleLabel->tqsetAlignment(AlignCenter); mTopLayout->addWidget( mTitleLabel ); mTopLayout->addSpacing( KDialog::spacingHint() ); } - if( layoutType & AbtProduct ) + if( tqlayoutType & AbtProduct ) { - QWidget *productArea = new QWidget( this, "area" ); + TQWidget *productArea = new TQWidget( this, "area" ); mTopLayout->addWidget( productArea, 0, AlignLeft ); - QHBoxLayout *hbox = new QHBoxLayout(productArea,0,KDialog::spacingHint()); + TQHBoxLayout *hbox = new TQHBoxLayout(productArea,0,KDialog::spacingHint()); if( hbox == 0 ) { return; } - mIconLabel = new QLabel( productArea ); + mIconLabel = new TQLabel( productArea ); hbox->addWidget( mIconLabel, 0, AlignLeft|AlignHCenter ); - QVBoxLayout *vbox = new QVBoxLayout(); + TQVBoxLayout *vbox = new TQVBoxLayout(); if( vbox == 0 ) { return; } hbox->addLayout( vbox ); - mVersionLabel = new QLabel( productArea, "version" ); - mAuthorLabel = new QLabel( productArea, "author" ); + mVersionLabel = new TQLabel( productArea, "version" ); + mAuthorLabel = new TQLabel( productArea, "author" ); vbox->addWidget( mVersionLabel ); vbox->addWidget( mAuthorLabel ); hbox->activate(); @@ -104,75 +104,75 @@ KRadioAboutWidget::KRadioAboutWidget(const KAboutData &aboutData, int layoutType mTopLayout->addSpacing( KDialog::spacingHint() ); } - QHBoxLayout *hbox = new QHBoxLayout(); + TQHBoxLayout *hbox = new TQHBoxLayout(); if( hbox == 0 ) { return; } mTopLayout->addLayout( hbox, 10 ); - if( layoutType & AbtImageLeft ) + if( tqlayoutType & AbtImageLeft ) { - QVBoxLayout *vbox = new QVBoxLayout(); + TQVBoxLayout *vbox = new TQVBoxLayout(); hbox->addLayout(vbox); vbox->addSpacing(1); - mImageFrame = new QFrame( this ); + mImageFrame = new TQFrame( this ); setImageFrame( true ); vbox->addWidget( mImageFrame ); vbox->addSpacing(1); - vbox = new QVBoxLayout( mImageFrame, 1 ); + vbox = new TQVBoxLayout( mImageFrame, 1 ); mImageLabel = new KRadioImageTrackLabel( mImageFrame ); - connect( mImageLabel, SIGNAL(mouseTrack( int, const QMouseEvent * )), - SLOT( slotMouseTrack( int, const QMouseEvent * )) ); + connect( mImageLabel, TQT_SIGNAL(mouseTrack( int, const TQMouseEvent * )), + TQT_SLOT( slotMouseTrack( int, const TQMouseEvent * )) ); vbox->addStretch(10); vbox->addWidget( mImageLabel ); vbox->addStretch(10); vbox->activate(); } - if( layoutType & AbtTabbed ) + if( tqlayoutType & AbtTabbed ) { mPageTab = new KRadioAboutTabWidget( this ); if( mPageTab == 0 ) { return; } hbox->addWidget( mPageTab, 10 ); } - else if( layoutType & AbtImageOnly ) + else if( tqlayoutType & AbtImageOnly ) { - mImageFrame = new QFrame( this ); + mImageFrame = new TQFrame( this ); setImageFrame( true ); hbox->addWidget( mImageFrame, 10 ); - QGridLayout *gbox = new QGridLayout(mImageFrame, 3, 3, 1, 0 ); + TQGridLayout *gbox = new TQGridLayout(mImageFrame, 3, 3, 1, 0 ); gbox->setRowStretch( 0, 10 ); gbox->setRowStretch( 2, 10 ); gbox->setColStretch( 0, 10 ); gbox->setColStretch( 2, 10 ); mImageLabel = new KRadioImageTrackLabel( mImageFrame ); - connect( mImageLabel, SIGNAL(mouseTrack( int, const QMouseEvent * )), - SLOT( slotMouseTrack( int, const QMouseEvent * )) ); + connect( mImageLabel, TQT_SIGNAL(mouseTrack( int, const TQMouseEvent * )), + TQT_SLOT( slotMouseTrack( int, const TQMouseEvent * )) ); gbox->addWidget( mImageLabel, 1, 1 ); gbox->activate(); } else { - mPlainSpace = new QFrame( this ); + mPlainSpace = new TQFrame( this ); if( mPlainSpace == 0 ) { return; } hbox->addWidget( mPlainSpace, 10 ); } - if( layoutType & AbtImageRight ) + if( tqlayoutType & AbtImageRight ) { - QVBoxLayout *vbox = new QVBoxLayout(); + TQVBoxLayout *vbox = new TQVBoxLayout(); hbox->addLayout(vbox); vbox->addSpacing(1); - mImageFrame = new QFrame( this ); + mImageFrame = new TQFrame( this ); setImageFrame( true ); vbox->addWidget( mImageFrame ); vbox->addSpacing(1); - vbox = new QVBoxLayout( mImageFrame, 1 ); + vbox = new TQVBoxLayout( mImageFrame, 1 ); mImageLabel = new KRadioImageTrackLabel( mImageFrame ); - connect( mImageLabel, SIGNAL(mouseTrack( int, const QMouseEvent * )), - SLOT( slotMouseTrack( int, const QMouseEvent * )) ); + connect( mImageLabel, TQT_SIGNAL(mouseTrack( int, const TQMouseEvent * )), + TQT_SLOT( slotMouseTrack( int, const TQMouseEvent * )) ); vbox->addStretch(10); vbox->addWidget( mImageLabel ); vbox->addStretch(10); @@ -187,19 +187,19 @@ KRadioAboutWidget::KRadioAboutWidget(const KAboutData &aboutData, int layoutType void KRadioAboutWidget::show( void ) { - QWidget::show(); + TQWidget::show(); } -QSize KRadioAboutWidget::sizeHint( void ) const +TQSize KRadioAboutWidget::tqsizeHint( void ) const { - return minimumSize().expandedTo( QSize( QWidget::sizeHint().width(), 0 ) ); + return tqminimumSize().expandedTo( TQSize( TQWidget::tqsizeHint().width(), 0 ) ); } -void KRadioAboutWidget::fontChange( const QFont &/*oldFont*/ ) +void KRadioAboutWidget::fontChange( const TQFont &/*oldFont*/ ) { if( mTitleLabel != 0 ) { - QFont f( KGlobalSettings::generalFont() ); + TQFont f( KGlobalSettings::generalFont() ); f.setBold( true ); f.setPointSize( 14 ); // Perhaps changeable ? mTitleLabel->setFont(f); @@ -207,64 +207,64 @@ void KRadioAboutWidget::fontChange( const QFont &/*oldFont*/ ) if( mVersionLabel != 0 ) { - QFont f( KGlobalSettings::generalFont() ); + TQFont f( KGlobalSettings::generalFont() ); f.setBold( true ); mVersionLabel->setFont(f); mAuthorLabel->setFont(f); - mVersionLabel->parentWidget()->layout()->activate(); + mVersionLabel->tqparentWidget()->tqlayout()->activate(); } update(); } -QFrame *KRadioAboutWidget::addTextPage( const QString &title, - const QString &text, +TQFrame *KRadioAboutWidget::addTextPage( const TQString &title, + const TQString &text, bool richText, int numLines ) { - QFrame *page = addEmptyPage( title ); + TQFrame *page = addEmptyPage( title ); if( page == 0 ) { return 0; } if( numLines <= 0 ) { numLines = 10; } - QVBoxLayout *vbox = new QVBoxLayout( page, KDialog::spacingHint() ); + TQVBoxLayout *vbox = new TQVBoxLayout( page, KDialog::spacingHint() ); if( richText == true ) { KTextBrowser *browser = new KTextBrowser( page, "browser" ); - browser->setHScrollBarMode( QScrollView::AlwaysOff ); + browser->setHScrollBarMode( TQScrollView::AlwaysOff ); browser->setText( text ); browser->setMinimumHeight( fontMetrics().lineSpacing()*numLines ); vbox->addWidget(browser); - connect(browser, SIGNAL(urlClick(const QString &)), - SLOT(slotUrlClick(const QString &))); - connect(browser, SIGNAL(mailClick(const QString &,const QString &)), - SLOT(slotMailClick(const QString &,const QString &))); + connect(browser, TQT_SIGNAL(urlClick(const TQString &)), + TQT_SLOT(slotUrlClick(const TQString &))); + connect(browser, TQT_SIGNAL(mailClick(const TQString &,const TQString &)), + TQT_SLOT(slotMailClick(const TQString &,const TQString &))); } else { - QTextEdit *textEdit = new QTextEdit( page, "text" ); + TQTextEdit *textEdit = new TQTextEdit( page, "text" ); textEdit->setReadOnly( true ); textEdit->setMinimumHeight( fontMetrics().lineSpacing()*numLines ); - textEdit->setWordWrap( QTextEdit::NoWrap ); + textEdit->setWordWrap( TQTextEdit::NoWrap ); vbox->addWidget( textEdit ); } return page; } -QFrame *KRadioAboutWidget::addLicensePage( const QString &title, - const QString &text, int numLines) +TQFrame *KRadioAboutWidget::addLicensePage( const TQString &title, + const TQString &text, int numLines) { - QFrame *page = addEmptyPage( title ); + TQFrame *page = addEmptyPage( title ); if( page == 0 ) { return 0; } if( numLines <= 0 ) { numLines = 10; } - QVBoxLayout *vbox = new QVBoxLayout( page, KDialog::spacingHint() ); + TQVBoxLayout *vbox = new TQVBoxLayout( page, KDialog::spacingHint() ); - QTextEdit *textEdit = new QTextEdit( page, "license" ); + TQTextEdit *textEdit = new TQTextEdit( page, "license" ); textEdit->setFont( KGlobalSettings::fixedFont() ); textEdit->setReadOnly( true ); - textEdit->setWordWrap( QTextEdit::NoWrap ); + textEdit->setWordWrap( TQTextEdit::NoWrap ); textEdit->setText( text ); textEdit->setMinimumHeight( fontMetrics().lineSpacing()*numLines ); vbox->addWidget( textEdit ); @@ -273,13 +273,13 @@ QFrame *KRadioAboutWidget::addLicensePage( const QString &title, } -KAboutContainer *KRadioAboutWidget::addContainerPage( const QString &title, +KAboutContainer *KRadioAboutWidget::addContainerPage( const TQString &title, int childAlignment, int innerAlignment ) { if( mPageTab == 0 ) { - kdDebug(291) << "addPage: " << i18n("Invalid layout") << endl; + kdDebug(291) << "addPage: " << i18n("Invalid tqlayout") << endl; return 0; } @@ -293,29 +293,29 @@ KAboutContainer *KRadioAboutWidget::addContainerPage( const QString &title, mContainerList[ mContainerList.size()-1 ]=container; } - connect(container, SIGNAL(urlClick(const QString &)), - SLOT(slotUrlClick(const QString &))); - connect(container, SIGNAL(mailClick(const QString &,const QString &)), - SLOT(slotMailClick(const QString &,const QString &))); + connect(container, TQT_SIGNAL(urlClick(const TQString &)), + TQT_SLOT(slotUrlClick(const TQString &))); + connect(container, TQT_SIGNAL(mailClick(const TQString &,const TQString &)), + TQT_SLOT(slotMailClick(const TQString &,const TQString &))); return container; } KAboutContainer *KRadioAboutWidget::addScrolledContainerPage( - const QString &title, + const TQString &title, int childAlignment, int innerAlignment ) { if( mPageTab == 0 ) { - kdDebug(291) << "addPage: " << "Invalid layout" << endl; + kdDebug(291) << "addPage: " << "Invalid tqlayout" << endl; return 0; } - QFrame *page = addEmptyPage( title ); - QVBoxLayout *vbox = new QVBoxLayout( page, KDialog::spacingHint() ); - QScrollView *scrollView = new QScrollView( page ); + TQFrame *page = addEmptyPage( title ); + TQVBoxLayout *vbox = new TQVBoxLayout( page, KDialog::spacingHint() ); + TQScrollView *scrollView = new TQScrollView( page ); scrollView->viewport()->setBackgroundMode( PaletteBackground ); vbox->addWidget( scrollView ); @@ -325,25 +325,25 @@ KAboutContainer *KRadioAboutWidget::addScrolledContainerPage( scrollView->addChild( container ); - connect(container, SIGNAL(urlClick(const QString &)), - SLOT(slotUrlClick(const QString &))); - connect(container, SIGNAL(mailClick(const QString &,const QString &)), - SLOT(slotMailClick(const QString &,const QString &))); + connect(container, TQT_SIGNAL(urlClick(const TQString &)), + TQT_SLOT(slotUrlClick(const TQString &))); + connect(container, TQT_SIGNAL(mailClick(const TQString &,const TQString &)), + TQT_SLOT(slotMailClick(const TQString &,const TQString &))); return container; } -QFrame *KRadioAboutWidget::addEmptyPage( const QString &title ) +TQFrame *KRadioAboutWidget::addEmptyPage( const TQString &title ) { if( mPageTab == 0 ) { - kdDebug(291) << "addPage: " << "Invalid layout" << endl; + kdDebug(291) << "addPage: " << "Invalid tqlayout" << endl; return 0; } - QFrame *page = new QFrame( mPageTab, title.latin1() ); - page->setFrameStyle( QFrame::NoFrame ); + TQFrame *page = new TQFrame( mPageTab, title.latin1() ); + page->setFrameStyle( TQFrame::NoFrame ); mPageTab->addTab( page, title ); return page; @@ -362,32 +362,32 @@ KAboutContainer *KRadioAboutWidget::addContainer( int childAlignment, mContainerList[ mContainerList.size()-1 ]=container; } - connect(container, SIGNAL(urlClick(const QString &)), - SLOT(slotUrlClick(const QString &))); - connect(container, SIGNAL(mailClick(const QString &,const QString &)), - SLOT(slotMailClick(const QString &,const QString &))); + connect(container, TQT_SIGNAL(urlClick(const TQString &)), + TQT_SLOT(slotUrlClick(const TQString &))); + connect(container, TQT_SIGNAL(mailClick(const TQString &,const TQString &)), + TQT_SLOT(slotMailClick(const TQString &,const TQString &))); return container; } -void KRadioAboutWidget::setTitle( const QString &title ) +void KRadioAboutWidget::setTitle( const TQString &title ) { if( mTitleLabel == 0 ) { - kdDebug(291) << "setTitle: " << "Invalid layout" << endl; + kdDebug(291) << "setTitle: " << "Invalid tqlayout" << endl; return; } mTitleLabel->setText(title); } -void KRadioAboutWidget::setImage( const QString &fileName ) +void KRadioAboutWidget::setImage( const TQString &fileName ) { if( mImageLabel == 0 ) { - kdDebug(291) << "setImage: " << "Invalid layout" << endl; + kdDebug(291) << "setImage: " << "Invalid tqlayout" << endl; return; } if( fileName.isNull() ) @@ -395,19 +395,19 @@ void KRadioAboutWidget::setImage( const QString &fileName ) return; } - QImage logo( fileName ); + TQImage logo( fileName ); if( logo.isNull() == false ) { - QPixmap pix; + TQPixmap pix; pix = logo; mImageLabel->setPixmap( pix ); } - mImageFrame->layout()->activate(); + mImageFrame->tqlayout()->activate(); } -void KRadioAboutWidget::setImageBackgroundColor( const QColor &color ) +void KRadioAboutWidget::setImageBackgroundColor( const TQColor &color ) { if( mImageFrame != 0 ) { @@ -422,37 +422,37 @@ void KRadioAboutWidget::setImageFrame( bool state ) { if( state == true ) { - mImageFrame->setFrameStyle( QFrame::Panel | QFrame::Sunken ); + mImageFrame->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); mImageFrame->setLineWidth(1); } else { - mImageFrame->setFrameStyle( QFrame::NoFrame ); + mImageFrame->setFrameStyle( TQFrame::NoFrame ); mImageFrame->setLineWidth(0); } } } -void KRadioAboutWidget::setProduct( const QString &appName, - const QString &/*version*/, - const QString &author, - const QString &year ) +void KRadioAboutWidget::setProduct( const TQString &appName, + const TQString &/*version*/, + const TQString &author, + const TQString &year ) { if( mIconLabel == 0 ) { - kdDebug(291) << "setProduct: " << "Invalid layout" << endl; + kdDebug(291) << "setProduct: " << "Invalid tqlayout" << endl; return; } if ( kapp ) mIconLabel->setPixmap( kapp->icon() ); - QString msg1 = i18n("%1 %2 (Using KDE %3)").arg(appName). - arg(QString::fromLatin1(KRADIO_VERSION)). - arg(QString::fromLatin1(KDE_VERSION_STRING)); - QString msg2 = !year.isEmpty() ? i18n("%1 %2, %3").arg('©').arg(year). - arg(author) : QString::fromLatin1(""); + TQString msg1 = i18n("%1 %2 (Using KDE %3)").tqarg(appName). + arg(TQString::tqfromLatin1(KRADIO_VERSION)). + arg(TQString::tqfromLatin1(KDE_VERSION_STRING)); + TQString msg2 = !year.isEmpty() ? i18n("%1 %2, %3").tqarg('©').tqarg(year). + arg(author) : TQString::tqfromLatin1(""); mVersionLabel->setText( msg1 ); mAuthorLabel->setText( msg2 ); @@ -461,28 +461,28 @@ void KRadioAboutWidget::setProduct( const QString &appName, mAuthorLabel->hide(); } - mIconLabel->parentWidget()->layout()->activate(); + mIconLabel->tqparentWidget()->tqlayout()->activate(); } -void KRadioAboutWidget::slotMouseTrack( int mode, const QMouseEvent *e ) +void KRadioAboutWidget::slotMouseTrack( int mode, const TQMouseEvent *e ) { emit mouseTrack( mode, e ); } -void KRadioAboutWidget::slotUrlClick( const QString &url ) +void KRadioAboutWidget::slotUrlClick( const TQString &url ) { if ( kapp ) kapp->invokeBrowser( url ); } -void KRadioAboutWidget::slotMailClick( const QString &/*_name*/, - const QString &_address ) +void KRadioAboutWidget::slotMailClick( const TQString &/*_name*/, + const TQString &_address ) { if ( kapp ) - kapp->invokeMailer( _address, QString::null ); + kapp->invokeMailer( _address, TQString() ); } @@ -494,10 +494,10 @@ void KRadioAboutWidget::setAboutData(const KAboutData &_aboutData) const KAboutData *aboutData = &_aboutData; if (aboutData->programName().length()) { setProduct( aboutData->programName(), aboutData->version(), - QString::null, QString::null ); + TQString(), TQString() ); } - QString appPageText = aboutData->shortDescription() + "\n"; + TQString appPageText = aboutData->shortDescription() + "\n"; if (!aboutData->otherText().isEmpty()) appPageText += "\n" + aboutData->otherText()+"\n"; @@ -507,7 +507,7 @@ void KRadioAboutWidget::setAboutData(const KAboutData &_aboutData) KAboutContainer *appPage = addContainerPage( i18n("&About")); - QLabel *appPageLabel = new QLabel( appPageText, 0 ); + TQLabel *appPageLabel = new TQLabel( appPageText, 0 ); appPage->addWidget( appPageLabel ); if (!aboutData->homepage().isEmpty()) { @@ -516,18 +516,18 @@ void KRadioAboutWidget::setAboutData(const KAboutData &_aboutData) url->setURL(aboutData->homepage()); appPage->addWidget( url ); // FIXME - connect( url, SIGNAL(leftClickedURL(const QString &)), - this, SLOT(slotUrlClick(const QString &))); + connect( url, TQT_SIGNAL(leftClickedURL(const TQString &)), + this, TQT_SLOT(slotUrlClick(const TQString &))); } int authorCount = aboutData->authors().count(); if (authorCount) { - QString authorPageTitle = authorCount == 1 ? + TQString authorPageTitle = authorCount == 1 ? i18n("A&uthor") : i18n("A&uthors"); KAboutContainer *authorPage = addScrolledContainerPage( authorPageTitle ); - QValueList<KAboutPerson>::ConstIterator it = aboutData->authors().begin(); - QValueList<KAboutPerson>::ConstIterator end = aboutData->authors().end(); + TQValueList<KAboutPerson>::ConstIterator it = aboutData->authors().begin(); + TQValueList<KAboutPerson>::ConstIterator end = aboutData->authors().end(); for (; it != end; ++it) { authorPage->addPerson( (*it).name(), (*it).emailAddress(), (*it).webAddress(), (*it).task() ); @@ -539,31 +539,31 @@ void KRadioAboutWidget::setAboutData(const KAboutData &_aboutData) if (creditsCount) { KAboutContainer *creditsPage = addScrolledContainerPage( i18n("&Thanks To") ); - QValueList<KAboutPerson>::ConstIterator it = aboutData->credits().begin(); - QValueList<KAboutPerson>::ConstIterator end = aboutData->credits().end(); + TQValueList<KAboutPerson>::ConstIterator it = aboutData->credits().begin(); + TQValueList<KAboutPerson>::ConstIterator end = aboutData->credits().end(); for (; it != end; ++it) { creditsPage->addPerson( (*it).name(), (*it).emailAddress(), (*it).webAddress(), (*it).task() ); } } - const QValueList<KAboutTranslator> translatorList = aboutData->translators(); + const TQValueList<KAboutTranslator> translatorList = aboutData->translators(); if(translatorList.count() > 0) { KAboutContainer *translatorPage = addScrolledContainerPage( i18n("T&ranslation") ); - QValueList<KAboutTranslator>::ConstIterator it = translatorList.begin(); - QValueList<KAboutTranslator>::ConstIterator end = translatorList.end(); + TQValueList<KAboutTranslator>::ConstIterator it = translatorList.begin(); + TQValueList<KAboutTranslator>::ConstIterator end = translatorList.end(); for(; it != end; ++it) { translatorPage->addPerson((*it).name(), (*it).emailAddress(), 0,0); } - QLabel *label = new QLabel(KAboutData::aboutTranslationTeam(), + TQLabel *label = new TQLabel(KAboutData::aboutTranslationTeam(), translatorPage); label->adjustSize(); - label->setMinimumSize(label->sizeHint()); + label->setMinimumSize(label->tqsizeHint()); translatorPage->addWidget(label); } @@ -579,28 +579,28 @@ void KRadioAboutWidget::setAboutData(const KAboutData &_aboutData) // copied (and renamed) from kaboutdialog.cpp // original: KImageTrackLabel -KRadioImageTrackLabel::KRadioImageTrackLabel( QWidget *_parent, const char *_name, WFlags f ) - : QLabel( _parent, _name, f ) +KRadioImageTrackLabel::KRadioImageTrackLabel( TQWidget *_parent, const char *_name, WFlags f ) + : TQLabel( _parent, _name, f ) { setText( i18n("Image missing")); } -void KRadioImageTrackLabel::mousePressEvent( QMouseEvent *e ) +void KRadioImageTrackLabel::mousePressEvent( TQMouseEvent *e ) { emit mouseTrack( MousePress, e ); } -void KRadioImageTrackLabel::mouseReleaseEvent( QMouseEvent *e ) +void KRadioImageTrackLabel::mouseReleaseEvent( TQMouseEvent *e ) { emit mouseTrack( MouseRelease, e ); } -void KRadioImageTrackLabel::mouseDoubleClickEvent( QMouseEvent *e ) +void KRadioImageTrackLabel::mouseDoubleClickEvent( TQMouseEvent *e ) { emit mouseTrack( MouseDoubleClick, e ); } -void KRadioImageTrackLabel::mouseMoveEvent ( QMouseEvent *e ) +void KRadioImageTrackLabel::mouseMoveEvent ( TQMouseEvent *e ) { emit mouseTrack( MouseDoubleClick, e ); } diff --git a/kradio3/src/alarm.cpp b/kradio3/src/alarm.cpp index 3c6784e..a7335d7 100644 --- a/kradio3/src/alarm.cpp +++ b/kradio3/src/alarm.cpp @@ -18,12 +18,12 @@ int Alarm::m_LastID = 0; -Alarm::Alarm(const QDateTime &time, bool daily, bool enabled) +Alarm::Alarm(const TQDateTime &time, bool daily, bool enabled) : m_time (time), m_daily (daily), m_weekdayMask (0x7F), m_enabled (enabled), - m_stationID (QString::null), + m_stationID (TQString()), m_volumePreset (-1), m_type (StartPlaying), m_ID (++m_LastID) @@ -32,11 +32,11 @@ Alarm::Alarm(const QDateTime &time, bool daily, bool enabled) Alarm::Alarm () - : m_time (QDateTime (QDate(1800, 1,1), QTime(0,0,0))), + : m_time (TQDateTime (TQDate(1800, 1,1), TQTime(0,0,0))), m_daily (false), m_weekdayMask (0x7F), m_enabled (false), - m_stationID (QString::null), + m_stationID (TQString()), m_volumePreset(-1), m_type (StartPlaying), m_ID (++m_LastID) @@ -62,9 +62,9 @@ Alarm::~Alarm() } -QDateTime Alarm::nextAlarm(bool ignoreEnable) const +TQDateTime Alarm::nextAlarm(bool ignoreEnable) const { - QDateTime now = QDateTime::currentDateTime(), + TQDateTime now = TQDateTime::tqcurrentDateTime(), alarm = m_time; if (m_daily) { alarm.setDate (now.date()); @@ -76,7 +76,7 @@ QDateTime Alarm::nextAlarm(bool ignoreEnable) const alarm = alarm.addDays(1); } } - return (m_enabled || ignoreEnable) && (!m_daily || m_weekdayMask) ? alarm : QDateTime(); + return (m_enabled || ignoreEnable) && (!m_daily || m_weekdayMask) ? alarm : TQDateTime(); } diff --git a/kradio3/src/debug-profiler.cpp b/kradio3/src/debug-profiler.cpp index 8c5a9ab..ac2f372 100644 --- a/kradio3/src/debug-profiler.cpp +++ b/kradio3/src/debug-profiler.cpp @@ -17,7 +17,7 @@ #include "include/debug-profiler.h" -#include <qstringlist.h> +#include <tqstringlist.h> #include <sys/resource.h> @@ -45,11 +45,11 @@ void Profiler::startInternalCounter() { m_tmpStartVal = getCounter(); } -void Profiler::startProfile(const QString &descr) +void Profiler::startProfile(const TQString &descr) { stopInternalCounter(); - if (m_ProfileData.contains(descr)) { + if (m_ProfileData.tqcontains(descr)) { profile_data &d = m_ProfileData[descr]; d.startCounter = m_internalCounter; } else { @@ -60,11 +60,11 @@ void Profiler::startProfile(const QString &descr) } -void Profiler::stopProfile (const QString &descr) +void Profiler::stopProfile (const TQString &descr) { stopInternalCounter(); - if (!descr.isNull() && m_ProfileData.contains(descr)) { + if (!descr.isNull() && m_ProfileData.tqcontains(descr)) { profile_data &d = m_ProfileData[descr]; long long diff = m_internalCounter - d.startCounter; d.accumulatedCounter += diff; @@ -83,16 +83,16 @@ void Profiler::printData () { stopInternalCounter(); - QStringList keys=m_ProfileData.keys(); + TQStringList keys=m_ProfileData.keys(); keys.sort(); - QValueListIterator<QString> it = keys.begin(); - QValueListIterator<QString> end = keys.end(); + TQValueListIterator<TQString> it = keys.begin(); + TQValueListIterator<TQString> end = keys.end(); for (; it != end; ++it) { int l = (*it).length(); l = (((l-1) / 25) + 1) * 25; if (l < 50) l = 50; const profile_data &d = m_ProfileData[*it]; - printf(("%-"+QString::number(l)+"s: total: %3.8f (%9lli) avg: %3.8f min: %3.8f max: %3.8f\n").ascii(), + printf(("%-"+TQString::number(l)+"s: total: %3.8f (%9lli) avg: %3.8f min: %3.8f max: %3.8f\n").ascii(), (*it).ascii(), (double)d.accumulatedCounter / 1.666e9, d.callCounter, @@ -116,7 +116,7 @@ long long MemProfiler::getCounter() const } -BlockProfiler::BlockProfiler(const QString &descr) +BlockProfiler::BlockProfiler(const TQString &descr) : m_Description(descr) { global_mem_profiler.startProfile(m_Description); @@ -133,6 +133,6 @@ void BlockProfiler::stop() { global_time_profiler.stopProfile(m_Description); global_mem_profiler.stopProfile(m_Description); - m_Description = QString::null; + m_Description = TQString(); } diff --git a/kradio3/src/errorlog-interfaces.cpp b/kradio3/src/errorlog-interfaces.cpp index 025c0be..65e2e43 100644 --- a/kradio3/src/errorlog-interfaces.cpp +++ b/kradio3/src/errorlog-interfaces.cpp @@ -19,7 +19,7 @@ #include <kdebug.h> #include <klocale.h> -#include <qdatetime.h> +#include <tqdatetime.h> IErrorLog *staticLogger = NULL; @@ -38,73 +38,73 @@ IErrorLog::~IErrorLog() } -int IErrorLogClient::sendLogError(const QString &s) const +int IErrorLogClient::sendLogError(const TQString &s) const { - kdDebug() << QString(i18n("%1 Error: %2\n")) - .arg(QDateTime::currentDateTime().toString(Qt::ISODate)) - .arg(s); + kdDebug() << TQString(i18n("%1 Error: %2\n")) + .tqarg(TQDateTime::tqcurrentDateTime().toString(Qt::ISODate)) + .tqarg(s); IF_SEND_MESSAGE(logError(s)); } -int IErrorLogClient::sendLogWarning(const QString &s) const +int IErrorLogClient::sendLogWarning(const TQString &s) const { - kdDebug() << QString(i18n("%1 Warning: %2\n")) - .arg(QDateTime::currentDateTime().toString(Qt::ISODate)) - .arg(s); + kdDebug() << TQString(i18n("%1 Warning: %2\n")) + .tqarg(TQDateTime::tqcurrentDateTime().toString(Qt::ISODate)) + .tqarg(s); IF_SEND_MESSAGE(logWarning(s)); } -int IErrorLogClient::sendLogInfo(const QString &s) const +int IErrorLogClient::sendLogInfo(const TQString &s) const { - kdDebug() << QString(i18n("%1 Information: %2\n")) - .arg(QDateTime::currentDateTime().toString(Qt::ISODate)) - .arg(s); + kdDebug() << TQString(i18n("%1 Information: %2\n")) + .tqarg(TQDateTime::tqcurrentDateTime().toString(Qt::ISODate)) + .tqarg(s); IF_SEND_MESSAGE(logInfo(s)); } -int IErrorLogClient::sendLogDebug(const QString &s) const +int IErrorLogClient::sendLogDebug(const TQString &s) const { - kdDebug() << QString(i18n("%1 Debug: %2\n")) - .arg(QDateTime::currentDateTime().toString(Qt::ISODate)) - .arg(s); + kdDebug() << TQString(i18n("%1 Debug: %2\n")) + .tqarg(TQDateTime::tqcurrentDateTime().toString(Qt::ISODate)) + .tqarg(s); IF_SEND_MESSAGE(logDebug(s)); } -void IErrorLogClient::staticLogError (const QString &s) +void IErrorLogClient::staticLogError (const TQString &s) { - kdDebug() << QString(i18n("%1 Error: %2\n")) - .arg(QDateTime::currentDateTime().toString(Qt::ISODate)) - .arg(s); + kdDebug() << TQString(i18n("%1 Error: %2\n")) + .tqarg(TQDateTime::tqcurrentDateTime().toString(Qt::ISODate)) + .tqarg(s); if (staticLogger) staticLogger->logError(s); } -void IErrorLogClient::staticLogWarning(const QString &s) +void IErrorLogClient::staticLogWarning(const TQString &s) { - kdDebug() << QString(i18n("%1 Warning: %2\n")) - .arg(QDateTime::currentDateTime().toString(Qt::ISODate)) - .arg(s); + kdDebug() << TQString(i18n("%1 Warning: %2\n")) + .tqarg(TQDateTime::tqcurrentDateTime().toString(Qt::ISODate)) + .tqarg(s); if (staticLogger) staticLogger->logWarning(s); } -void IErrorLogClient::staticLogInfo (const QString &s) +void IErrorLogClient::staticLogInfo (const TQString &s) { - kdDebug() << QString(i18n("%1 Information: %2\n")) - .arg(QDateTime::currentDateTime().toString(Qt::ISODate)) - .arg(s); + kdDebug() << TQString(i18n("%1 Information: %2\n")) + .tqarg(TQDateTime::tqcurrentDateTime().toString(Qt::ISODate)) + .tqarg(s); if (staticLogger) staticLogger->logInfo(s); } -void IErrorLogClient::staticLogDebug (const QString &s) +void IErrorLogClient::staticLogDebug (const TQString &s) { - kdDebug() << QString(i18n("%1 Debug: %2\n")) - .arg(QDateTime::currentDateTime().toString(Qt::ISODate)) - .arg(s); + kdDebug() << TQString(i18n("%1 Debug: %2\n")) + .tqarg(TQDateTime::tqcurrentDateTime().toString(Qt::ISODate)) + .tqarg(s); if (staticLogger) staticLogger->logDebug(s); } diff --git a/kradio3/src/fileringbuffer.cpp b/kradio3/src/fileringbuffer.cpp index beea2b4..584b8c2 100644 --- a/kradio3/src/fileringbuffer.cpp +++ b/kradio3/src/fileringbuffer.cpp @@ -17,22 +17,22 @@ #include "include/fileringbuffer.h" -#include <qstring.h> +#include <tqstring.h> #include <unistd.h> #include <klocale.h> -FileRingBuffer::FileRingBuffer(const QString &filename, Q_UINT64 max_size) +FileRingBuffer::FileRingBuffer(const TQString &filename, TQ_UINT64 max_size) { m_BaseFileName = filename; m_FileIdx = 0; - m_FileName = m_BaseFileName + "_" + QString::number(++m_FileIdx); + m_FileName = m_BaseFileName + "_" + TQString::number(++m_FileIdx); m_File = fopen(m_FileName.ascii(), "w+"); m_MaxSize = max_size; m_RealSize = 0; m_FillSize = 0; m_Start = 0; m_error = m_File == NULL; - m_errorString = m_File ? QString::null : i18n("cannot open buffer file %1").arg(filename); + m_errorString = m_File ? TQString() : i18n("cannot open buffer file %1").tqarg(filename); } @@ -43,17 +43,17 @@ FileRingBuffer::~FileRingBuffer() unlink (m_FileName.ascii()); } m_File = NULL; - m_FileName = QString::null; + m_FileName = TQString(); m_MaxSize = 0; m_RealSize = 0; m_FillSize = 0; m_Start = 0; m_error = false; - m_errorString = QString::null; + m_errorString = TQString(); } -bool FileRingBuffer::resize(const QString &filename, Q_UINT64 new_max_size) +bool FileRingBuffer::resize(const TQString &filename, TQ_UINT64 new_max_size) { if (filename != m_BaseFileName) { clear(); @@ -62,10 +62,10 @@ bool FileRingBuffer::resize(const QString &filename, Q_UINT64 new_max_size) unlink (m_FileName.ascii()); } m_BaseFileName = filename; - m_FileName = m_BaseFileName + "_" + QString::number(++m_FileIdx); + m_FileName = m_BaseFileName + "_" + TQString::number(++m_FileIdx); m_File = fopen(m_FileName.ascii(), "w+"); m_error = m_File == NULL; - m_errorString = m_File ? QString::null : i18n("cannot open buffer file %1").arg(filename); + m_errorString = m_File ? TQString() : i18n("cannot open buffer file %1").tqarg(filename); } if (new_max_size >= m_RealSize) { @@ -79,9 +79,9 @@ bool FileRingBuffer::resize(const QString &filename, Q_UINT64 new_max_size) const size_t buffer_size = 65536; char buffer[buffer_size]; - QString tmp_file_name = m_BaseFileName + "_" + QString::number(++m_FileIdx); + TQString tmp_file_name = m_BaseFileName + "_" + TQString::number(++m_FileIdx); FILE *tmp_file = fopen (tmp_file_name.ascii(), "w+"); - Q_UINT64 newFill = 0; + TQ_UINT64 newFill = 0; if (tmp_file) { while (!m_error && m_FillSize > 0) { int tmp_size = takeData(buffer, buffer_size); @@ -90,13 +90,13 @@ bool FileRingBuffer::resize(const QString &filename, Q_UINT64 new_max_size) newFill += tmp_size; } else { m_error = true; - m_errorString += i18n("FileRingbuffer::resize: Writing to tmpfile %1 failed. ").arg(tmp_file_name); + m_errorString += i18n("FileRingbuffer::resize: Writing to tmpfile %1 failed. ").tqarg(tmp_file_name); } } } } else { m_error = true; - m_errorString += i18n("FileRingbuffer::resize: Opening tmpfile %1 failed. ").arg(tmp_file_name); + m_errorString += i18n("FileRingbuffer::resize: Opening tmpfile %1 failed. ").tqarg(tmp_file_name); } if (!m_error) { @@ -118,13 +118,13 @@ size_t FileRingBuffer::addData (const char *src, size_t size) { size_t written = 0; if (m_Start + m_FillSize <= m_RealSize) { - Q_UINT64 rest = m_MaxSize - (m_Start + m_FillSize); + TQ_UINT64 rest = m_MaxSize - (m_Start + m_FillSize); if (rest > size) rest = size; fseek(m_File, m_Start + m_FillSize, SEEK_SET); if (rest > 0 && fwrite(src, rest, 1, m_File) <= 0) { m_error = true; - m_errorString += i18n("FileRingBuffer::addData: failed writing data to file %1.").arg(m_FileName); + m_errorString += i18n("FileRingBuffer::addData: failed writing data to file %1.").tqarg(m_FileName); } else { m_FillSize += rest; if (m_Start + m_FillSize > m_RealSize) @@ -142,7 +142,7 @@ size_t FileRingBuffer::addData (const char *src, size_t size) fseek(m_File, m_Start + m_FillSize - m_RealSize, SEEK_SET); if (fwrite(src, rest, 1, m_File) <= 0) { m_error = true; - m_errorString += i18n("FileRingBuffer::addData: failed writing data to file %1.").arg(m_FileName); + m_errorString += i18n("FileRingBuffer::addData: failed writing data to file %1.").tqarg(m_FileName); } else { m_FillSize += rest; written += rest; @@ -165,7 +165,7 @@ size_t FileRingBuffer::takeData(char *dst, size_t size) fseek(m_File, m_Start, SEEK_SET); if (fread(dst+read, n, 1, m_File) <= 0) { m_error = true; - m_errorString += i18n("FileRingBuffer::takeData: failed reading data to file %1.").arg(m_FileName); + m_errorString += i18n("FileRingBuffer::takeData: failed reading data to file %1.").tqarg(m_FileName); } else { m_FillSize -= n; m_Start += n; @@ -180,7 +180,7 @@ size_t FileRingBuffer::takeData(char *dst, size_t size) } -Q_UINT64 FileRingBuffer::getFreeSpace(Q_UINT64 &size) +TQ_UINT64 FileRingBuffer::getFreeSpace(TQ_UINT64 &size) { if (m_FillSize == m_RealSize) { size = 0; @@ -197,7 +197,7 @@ Q_UINT64 FileRingBuffer::getFreeSpace(Q_UINT64 &size) } -Q_UINT64 FileRingBuffer::removeFreeSpace(Q_UINT64 size) +TQ_UINT64 FileRingBuffer::removeFreeSpace(TQ_UINT64 size) { if (m_FillSize == m_RealSize) return 0; @@ -216,7 +216,7 @@ Q_UINT64 FileRingBuffer::removeFreeSpace(Q_UINT64 size) } -Q_UINT64 FileRingBuffer::getData(Q_UINT64 &size) +TQ_UINT64 FileRingBuffer::getData(TQ_UINT64 &size) { if (m_Start + m_FillSize >= m_RealSize) { size = m_RealSize - m_Start; @@ -227,7 +227,7 @@ Q_UINT64 FileRingBuffer::getData(Q_UINT64 &size) } -Q_UINT64 FileRingBuffer::removeData(Q_UINT64 size) +TQ_UINT64 FileRingBuffer::removeData(TQ_UINT64 size) { if (size > m_FillSize) size = m_FillSize; diff --git a/kradio3/src/frequencyradiostation.cpp b/kradio3/src/frequencyradiostation.cpp index a2833ec..d2c9eb3 100644 --- a/kradio3/src/frequencyradiostation.cpp +++ b/kradio3/src/frequencyradiostation.cpp @@ -29,7 +29,7 @@ static FrequencyRadioStation emptyFrequencyRadioStation(registerStationClass); ///////////////////////////////////////////////////////////////////////////// -FrequencyRadioStation::FrequencyRadioStation (RegisterStationClass, const QString &classname) +FrequencyRadioStation::FrequencyRadioStation (RegisterStationClass, const TQString &classname) : RadioStation(registerStationClass, !classname.isNull() ? classname : getClassName()), m_frequency(0) { @@ -47,8 +47,8 @@ FrequencyRadioStation::FrequencyRadioStation(float frequency) { } -FrequencyRadioStation::FrequencyRadioStation(const QString &name, - const QString &shortName, +FrequencyRadioStation::FrequencyRadioStation(const TQString &name, + const TQString &shortName, float frequency) : RadioStation(name, shortName), m_frequency(frequency) @@ -113,11 +113,11 @@ int FrequencyRadioStation::compare(const RadioStation &_s) const } -QString FrequencyRadioStation::longName() const +TQString FrequencyRadioStation::longName() const { - QString longN = name(); + TQString longN = name(); if (!longN.isEmpty()) { - longN = i18n("%1, %2").arg(longN).arg(description()); + longN = i18n("%1, %2").tqarg(longN).tqarg(description()); } else { longN = description(); } @@ -126,14 +126,14 @@ QString FrequencyRadioStation::longName() const } -QString FrequencyRadioStation::description() const +TQString FrequencyRadioStation::description() const { float cf = frequency(); - QString f; + TQString f; if (cf >= 10) - f = i18n("%1 MHz").arg(KGlobal::locale()->formatNumber(cf, 2)); + f = i18n("%1 MHz").tqarg(KGlobal::locale()->formatNumber(cf, 2)); else - f = i18n("%1 kHz").arg(KGlobal::locale()->formatNumber(cf * 1000, 0)); + f = i18n("%1 kHz").tqarg(KGlobal::locale()->formatNumber(cf * 1000, 0)); return f; } @@ -146,7 +146,7 @@ bool FrequencyRadioStation::isValid() const -bool FrequencyRadioStation::setProperty(const QString &pn, const QString &val) +bool FrequencyRadioStation::setProperty(const TQString &pn, const TQString &val) { bool retval = false; if (pn == StationFrequencyElement) { @@ -160,19 +160,19 @@ bool FrequencyRadioStation::setProperty(const QString &pn, const QString &val) } -QString FrequencyRadioStation::getProperty(const QString &pn) const +TQString FrequencyRadioStation::getProperty(const TQString &pn) const { if (pn == StationFrequencyElement) { - return QString().setNum(m_frequency); + return TQString().setNum(m_frequency); } else { return RadioStation::getProperty(pn); } } -QStringList FrequencyRadioStation::getPropertyNames() const +TQStringList FrequencyRadioStation::getPropertyNames() const { - QStringList l = RadioStation::getPropertyNames(); + TQStringList l = RadioStation::getPropertyNames(); l.push_back(StationFrequencyElement); return l; } diff --git a/kradio3/src/frequencyseekhelper.cpp b/kradio3/src/frequencyseekhelper.cpp index 670c300..84a2bc9 100644 --- a/kradio3/src/frequencyseekhelper.cpp +++ b/kradio3/src/frequencyseekhelper.cpp @@ -16,13 +16,13 @@ ***************************************************************************/ #include "include/frequencyseekhelper.h" -#include <qtimer.h> +#include <tqtimer.h> -FrequencySeekHelper::FrequencySeekHelper(ISeekRadio &parent) - : SeekHelper(parent) +FrequencySeekHelper::FrequencySeekHelper(ISeekRadio &tqparent) + : SeekHelper(tqparent) { - m_timer = new QTimer(this); - QObject::connect (m_timer, SIGNAL(timeout()), this, SLOT(step())); + m_timer = new TQTimer(this); + TQObject::connect (m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(step())); } diff --git a/kradio3/src/include/aboutwidget.h b/kradio3/src/include/aboutwidget.h index c2a8562..3ba3573 100644 --- a/kradio3/src/include/aboutwidget.h +++ b/kradio3/src/include/aboutwidget.h @@ -23,27 +23,28 @@ #endif -#include <qwidget.h> +#include <tqwidget.h> /* Unfortunately KDE doesn't provide the class KAboutContainerBase to public programming, so we have to copy most of that code into an own class :( */ -class QFrame; +class TQFrame; class KAboutContainer; -class QTabWidget; -class QVBoxLayout; +class TQTabWidget; +class TQVBoxLayout; class KAboutData; -#include <qlabel.h> +#include <tqlabel.h> // copied (and renamed) from kaboutdialog_private.h // original: KImageTrackLabel -class KRadioImageTrackLabel : public QLabel +class KRadioImageTrackLabel : public TQLabel { Q_OBJECT + TQ_OBJECT public: enum MouseMode @@ -55,24 +56,25 @@ class KRadioImageTrackLabel : public QLabel }; public: - KRadioImageTrackLabel( QWidget * parent, const char * name=0, WFlags f=0 ); + KRadioImageTrackLabel( TQWidget * tqparent, const char * name=0, WFlags f=0 ); signals: - void mouseTrack( int mode, const QMouseEvent *e ); + void mouseTrack( int mode, const TQMouseEvent *e ); protected: - virtual void mousePressEvent( QMouseEvent *e ); - virtual void mouseReleaseEvent( QMouseEvent *e ); - virtual void mouseDoubleClickEvent( QMouseEvent *e ); - virtual void mouseMoveEvent ( QMouseEvent *e ); + virtual void mousePressEvent( TQMouseEvent *e ); + virtual void mouseReleaseEvent( TQMouseEvent *e ); + virtual void mouseDoubleClickEvent( TQMouseEvent *e ); + virtual void mouseMoveEvent ( TQMouseEvent *e ); }; // copied (and renamed) from kaboutdialog_private.h // original: KAboutContainerBase -class KRadioAboutWidget : public QWidget +class KRadioAboutWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: enum LayoutType @@ -90,57 +92,57 @@ class KRadioAboutWidget : public QWidget }; public: - KRadioAboutWidget(const KAboutData &abtData, int layoutType, QWidget *parent = 0, char *name = 0); + KRadioAboutWidget(const KAboutData &abtData, int tqlayoutType, TQWidget *tqparent = 0, char *name = 0); virtual void show( void ); - virtual QSize sizeHint( void ) const; + virtual TQSize tqsizeHint( void ) const; void setAboutData(const KAboutData &abtData); - void setTitle( const QString &title ); - void setImage( const QString &fileName ); - void setImageBackgroundColor( const QColor &color ); + void setTitle( const TQString &title ); + void setImage( const TQString &fileName ); + void setImageBackgroundColor( const TQColor &color ); void setImageFrame( bool state ); - void setProduct( const QString &appName, const QString &version, - const QString &author, const QString &year ); + void setProduct( const TQString &appName, const TQString &version, + const TQString &author, const TQString &year ); - QFrame *addTextPage( const QString &title, const QString &text, + TQFrame *addTextPage( const TQString &title, const TQString &text, bool richText=false, int numLines=10 ); - QFrame *addLicensePage( const QString &title, const QString &text, + TQFrame *addLicensePage( const TQString &title, const TQString &text, int numLines=10 ); - KAboutContainer *addContainerPage( const QString &title, + KAboutContainer *addContainerPage( const TQString &title, int childAlignment = AlignCenter, int innerAlignment = AlignCenter ); - KAboutContainer *addScrolledContainerPage( const QString &title, + KAboutContainer *addScrolledContainerPage( const TQString &title, int childAlignment = AlignCenter, int innerAlignment = AlignCenter ); - QFrame *addEmptyPage( const QString &title ); + TQFrame *addEmptyPage( const TQString &title ); KAboutContainer *addContainer( int childAlignment, int innerAlignment ); public slots: - virtual void slotMouseTrack( int mode, const QMouseEvent *e ); - virtual void slotUrlClick( const QString &url ); - virtual void slotMailClick( const QString &name, const QString &address ); + virtual void slotMouseTrack( int mode, const TQMouseEvent *e ); + virtual void slotUrlClick( const TQString &url ); + virtual void slotMailClick( const TQString &name, const TQString &address ); protected: - virtual void fontChange( const QFont &oldFont ); + virtual void fontChange( const TQFont &oldFont ); signals: - void mouseTrack( int mode, const QMouseEvent *e ); - void urlClick( const QString &url ); - void mailClick( const QString &name, const QString &address ); + void mouseTrack( int mode, const TQMouseEvent *e ); + void urlClick( const TQString &url ); + void mailClick( const TQString &name, const TQString &address ); private: - QMemArray<QWidget*> mContainerList; + TQMemArray<TQWidget*> mContainerList; - QVBoxLayout *mTopLayout; + TQVBoxLayout *mTopLayout; KRadioImageTrackLabel *mImageLabel; - QLabel *mTitleLabel; - QLabel *mIconLabel; - QLabel *mVersionLabel; - QLabel *mAuthorLabel; - QFrame *mImageFrame; - QTabWidget *mPageTab; - QFrame *mPlainSpace; + TQLabel *mTitleLabel; + TQLabel *mIconLabel; + TQLabel *mVersionLabel; + TQLabel *mAuthorLabel; + TQFrame *mImageFrame; + TQTabWidget *mPageTab; + TQFrame *mPlainSpace; }; diff --git a/kradio3/src/include/alarm.h b/kradio3/src/include/alarm.h index 45cb397..14b4abc 100644 --- a/kradio3/src/include/alarm.h +++ b/kradio3/src/include/alarm.h @@ -22,7 +22,7 @@ #include <config.h> #endif -#include <qdatetime.h> +#include <tqdatetime.h> #include <vector> /** @@ -36,13 +36,13 @@ public: enum AlarmType { StartPlaying, StopPlaying, StartRecording, StopRecording }; protected: - QDateTime m_time; + TQDateTime m_time; bool m_daily; int m_weekdayMask; bool m_enabled; - QString m_stationID; + TQString m_stationID; float m_volumePreset; // < 0: disabled AlarmType m_type; @@ -53,16 +53,16 @@ protected: public: Alarm(); - Alarm(const QDateTime &time, bool daily, bool enabled); + Alarm(const TQDateTime &time, bool daily, bool enabled); Alarm(const Alarm &); ~Alarm(); bool isEnabled() const { return m_enabled; } bool isDaily() const { return m_daily; } int weekdayMask() const { return m_weekdayMask; } - QDateTime alarmTime () const { return m_time; } - QDateTime nextAlarm (bool ignoreEnable = false) const; - const QString &stationID () const { return m_stationID; } + TQDateTime alarmTime () const { return m_time; } + TQDateTime nextAlarm (bool ignoreEnable = false) const; + const TQString &stationID () const { return m_stationID; } float volumePreset () const { return m_volumePreset; } AlarmType alarmType() const { return m_type; } @@ -71,10 +71,10 @@ public: void setEnabled (bool enable = true) { m_enabled = enable; } void setDaily (bool d = true) { m_daily = d; } void setWeekdayMask(int m = 0x7F) { m_weekdayMask = m; } - void setDate (const QDate &d) { m_time.setDate(d); } - void setTime (const QTime &d) { m_time.setTime(d); } + void setDate (const TQDate &d) { m_time.setDate(d); } + void setTime (const TQTime &d) { m_time.setTime(d); } void setVolumePreset(float v) { m_volumePreset = v; } - void setStationID(const QString &id) { m_stationID = id;} + void setStationID(const TQString &id) { m_stationID = id;} void setAlarmType(AlarmType t) { m_type = t; } diff --git a/kradio3/src/include/debug-profiler.h b/kradio3/src/include/debug-profiler.h index 969008a..7ceb50d 100644 --- a/kradio3/src/include/debug-profiler.h +++ b/kradio3/src/include/debug-profiler.h @@ -22,8 +22,8 @@ #include <config.h> #endif -#include <qstring.h> -#include <qmap.h> +#include <tqstring.h> +#include <tqmap.h> #if (defined __i386__) || (defined __x86_64__) static __inline__ unsigned long long int rdtsc() @@ -45,8 +45,8 @@ public: Profiler(); virtual ~Profiler(); - void startProfile(const QString &descr); - void stopProfile (const QString &descr); + void startProfile(const TQString &descr); + void stopProfile (const TQString &descr); void printData(); @@ -72,7 +72,7 @@ protected: long long maxCounter; }; - QMap<QString, profile_data> m_ProfileData; + TQMap<TQString, profile_data> m_ProfileData; }; @@ -98,13 +98,13 @@ extern MemProfiler global_mem_profiler; class BlockProfiler { public: - BlockProfiler(const QString &descr); + BlockProfiler(const TQString &descr); ~BlockProfiler(); void stop(); protected: - QString m_Description; + TQString m_Description; }; diff --git a/kradio3/src/include/errorlog-interfaces.h b/kradio3/src/include/errorlog-interfaces.h index a480927..85d5926 100644 --- a/kradio3/src/include/errorlog-interfaces.h +++ b/kradio3/src/include/errorlog-interfaces.h @@ -31,10 +31,10 @@ public : virtual ~IErrorLog(); RECEIVERS: - IF_RECEIVER( logError (const QString &) ) - IF_RECEIVER( logWarning(const QString &) ) - IF_RECEIVER( logInfo (const QString &) ) - IF_RECEIVER( logDebug (const QString &) ) + IF_RECEIVER( logError (const TQString &) ) + IF_RECEIVER( logWarning(const TQString &) ) + IF_RECEIVER( logInfo (const TQString &) ) + IF_RECEIVER( logDebug (const TQString &) ) }; @@ -44,20 +44,20 @@ public : IF_CON_DESTRUCTOR(IErrorLogClient, -1) public: - IF_SENDER ( sendLogError (const QString &) ) - IF_SENDER ( sendLogWarning(const QString &) ) - IF_SENDER ( sendLogInfo (const QString &) ) - IF_SENDER ( sendLogDebug (const QString &) ) + IF_SENDER ( sendLogError (const TQString &) ) + IF_SENDER ( sendLogWarning(const TQString &) ) + IF_SENDER ( sendLogInfo (const TQString &) ) + IF_SENDER ( sendLogDebug (const TQString &) ) - void logError (const QString &s) const { sendLogError(s); } - void logWarning(const QString &s) const { sendLogWarning(s); } - void logInfo (const QString &s) const { sendLogInfo(s); } - void logDebug (const QString &s) const { sendLogDebug(s); } + void logError (const TQString &s) const { sendLogError(s); } + void logWarning(const TQString &s) const { sendLogWarning(s); } + void logInfo (const TQString &s) const { sendLogInfo(s); } + void logDebug (const TQString &s) const { sendLogDebug(s); } - static void staticLogError (const QString &s); - static void staticLogWarning(const QString &s); - static void staticLogInfo (const QString &s); - static void staticLogDebug (const QString &s); + static void staticLogError (const TQString &s); + static void staticLogWarning(const TQString &s); + static void staticLogInfo (const TQString &s); + static void staticLogDebug (const TQString &s); }; diff --git a/kradio3/src/include/fileringbuffer.h b/kradio3/src/include/fileringbuffer.h index 3447277..2978bec 100644 --- a/kradio3/src/include/fileringbuffer.h +++ b/kradio3/src/include/fileringbuffer.h @@ -22,49 +22,49 @@ #include <config.h> #endif -#include <qstring.h> +#include <tqstring.h> #include <stdio.h> class FileRingBuffer { public: - FileRingBuffer(const QString &filename, Q_UINT64 max_size); + FileRingBuffer(const TQString &filename, TQ_UINT64 max_size); ~FileRingBuffer(); - bool resize(const QString &filename, Q_UINT64 new_max_size); + bool resize(const TQString &filename, TQ_UINT64 new_max_size); size_t addData (const char *src, size_t size); size_t takeData(char *dst, size_t size); - Q_UINT64 removeData(Q_UINT64 size); + TQ_UINT64 removeData(TQ_UINT64 size); - const QString &getFileName () const { return m_FileName; } - Q_UINT64 getMaxSize() const { return m_MaxSize; } - Q_UINT64 getRealSize() const { return m_RealSize; } - Q_UINT64 getFillSize() const { return m_FillSize; } - Q_UINT64 getFreeSize() const { return (m_Start + m_FillSize > m_RealSize) ? m_RealSize - m_FillSize : m_MaxSize - m_FillSize; } + const TQString &getFileName () const { return m_FileName; } + TQ_UINT64 getMaxSize() const { return m_MaxSize; } + TQ_UINT64 getRealSize() const { return m_RealSize; } + TQ_UINT64 getFillSize() const { return m_FillSize; } + TQ_UINT64 getFreeSize() const { return (m_Start + m_FillSize > m_RealSize) ? m_RealSize - m_FillSize : m_MaxSize - m_FillSize; } void clear(); bool error() const { return m_error; } - const QString &errorString() const { return m_errorString; } + const TQString &errorString() const { return m_errorString; } protected: - Q_UINT64 getFreeSpace(Q_UINT64 &size); // returns position in file + size - Q_UINT64 removeFreeSpace(Q_UINT64 size); + TQ_UINT64 getFreeSpace(TQ_UINT64 &size); // returns position in file + size + TQ_UINT64 removeFreeSpace(TQ_UINT64 size); - Q_UINT64 getData(Q_UINT64 &size); // returns position in file + size + TQ_UINT64 getData(TQ_UINT64 &size); // returns position in file + size int m_FileIdx; - QString m_BaseFileName; - QString m_FileName; + TQString m_BaseFileName; + TQString m_FileName; FILE *m_File; - Q_UINT64 m_Start; - Q_UINT64 m_MaxSize; - Q_UINT64 m_RealSize; - Q_UINT64 m_FillSize; + TQ_UINT64 m_Start; + TQ_UINT64 m_MaxSize; + TQ_UINT64 m_RealSize; + TQ_UINT64 m_FillSize; - QString m_errorString; + TQString m_errorString; bool m_error; }; diff --git a/kradio3/src/include/frequencyradiostation.h b/kradio3/src/include/frequencyradiostation.h index 87e4125..75c6ecd 100644 --- a/kradio3/src/include/frequencyradiostation.h +++ b/kradio3/src/include/frequencyradiostation.h @@ -39,16 +39,16 @@ class FrequencyRadioStation : public RadioStation { public: FrequencyRadioStation (); FrequencyRadioStation (float frequency); - FrequencyRadioStation (const QString &name, const QString &shortName, float frequency); + FrequencyRadioStation (const TQString &name, const TQString &shortName, float frequency); FrequencyRadioStation (const FrequencyRadioStation &); - FrequencyRadioStation (RegisterStationClass, const QString &classname = QString::null); + FrequencyRadioStation (RegisterStationClass, const TQString &classname = TQString()); ~FrequencyRadioStation(); float frequency() const { return m_frequency; } void setFrequency (float frequency) { m_frequency = frequency; } - virtual QString longName() const; - virtual QString description() const; + virtual TQString longName() const; + virtual TQString description() const; virtual bool isValid () const; /* = 0 : "this" is same as "s", i.e. approximately same frequency @@ -65,10 +65,10 @@ public: virtual RadioStationConfig *createEditor() const; // for XML-Parsing/Export - virtual bool setProperty(const QString &property_name, const QString &val); - virtual QString getProperty(const QString &property_name) const; - virtual QStringList getPropertyNames() const; - virtual QString getClassName() const { return "FrequencyRadioStation"; } + virtual bool setProperty(const TQString &property_name, const TQString &val); + virtual TQString getProperty(const TQString &property_name) const; + virtual TQStringList getPropertyNames() const; + virtual TQString getClassName() const { return "FrequencyRadioStation"; } virtual bool operator == (const RadioStation &x) const; diff --git a/kradio3/src/include/frequencyseekhelper.h b/kradio3/src/include/frequencyseekhelper.h index 4dc529f..3401b95 100644 --- a/kradio3/src/include/frequencyseekhelper.h +++ b/kradio3/src/include/frequencyseekhelper.h @@ -22,18 +22,19 @@ #include <config.h> #endif -#include <qobject.h> +#include <tqobject.h> #include "radiodevice_interfaces.h" #include "seekhelper.h" -class FrequencySeekHelper : public QObject, +class FrequencySeekHelper : public TQObject, public SeekHelper, public IFrequencyRadioClient { Q_OBJECT + TQ_OBJECT public: - FrequencySeekHelper(ISeekRadio &parent); + FrequencySeekHelper(ISeekRadio &tqparent); virtual ~FrequencySeekHelper(); // IFrequencyRadioClient @@ -66,7 +67,7 @@ protected: virtual void applyBest(); protected: - QTimer *m_timer; + TQTimer *m_timer; float m_currentSignal, m_oldSignal; bool m_goodSignal; diff --git a/kradio3/src/include/gui_list_helper.h b/kradio3/src/include/gui_list_helper.h index 6524043..3cf2d25 100644 --- a/kradio3/src/include/gui_list_helper.h +++ b/kradio3/src/include/gui_list_helper.h @@ -18,8 +18,8 @@ #ifndef _KRADIO_LIBKRADIO_GUI_GUI_LIST_HELPER_H_ #define _KRADIO_LIBKRADIO_GUI_GUI_LIST_HELPER_H_ -#include <qmap.h> -#include <qvaluelist.h> +#include <tqmap.h> +#include <tqvaluelist.h> template <class TLIST> class GUISimpleListHelper @@ -28,27 +28,27 @@ public: GUISimpleListHelper(TLIST *list) : m_List(list) {} ~GUISimpleListHelper() {} - void setData(const QValueList<QString> &data); - QString getCurrentText() const { return m_List->currentText(); } - void setCurrentText(const QString &s) { m_List->setCurrentItem(m_revData.contains(s) ? m_revData[s] : 0); } + void setData(const TQValueList<TQString> &data); + TQString getCurrentText() const { return m_List->currentText(); } + void setCurrentText(const TQString &s) { m_List->setCurrentItem(m_revData.tqcontains(s) ? m_revData[s] : 0); } int count() const { return m_revData.count(); } - bool contains(const QString &id) const { return m_revData.contains(id); } + bool tqcontains(const TQString &id) const { return m_revData.tqcontains(id); } protected: TLIST *m_List; - QMap<QString, int> m_revData; + TQMap<TQString, int> m_revData; }; template <class TLIST> -void GUISimpleListHelper<TLIST>::setData(const QValueList<QString> &data) +void GUISimpleListHelper<TLIST>::setData(const TQValueList<TQString> &data) { m_List->clear(); m_revData.clear(); - QValueListConstIterator<QString> it = data.begin(); - QValueListConstIterator<QString> end = data.end(); + TQValueListConstIterator<TQString> it = data.begin(); + TQValueListConstIterator<TQString> end = data.end(); for (int i = 0; it != end; ++it, ++i) { m_revData[*it] = i; m_List->insertItem(*it); @@ -69,32 +69,32 @@ public: enum SORT_KEY { SORT_BY_ID, SORT_BY_DESCR }; GUIListHelper(TLIST *list, SORT_KEY skey); - GUIListHelper(TLIST *list, const QMap<TID, QString> &data, SORT_KEY skey); + GUIListHelper(TLIST *list, const TQMap<TID, TQString> &data, SORT_KEY skey); ~GUIListHelper(); - void setData(const QMap<TID, QString> &data); + void setData(const TQMap<TID, TQString> &data); void setCurrentItem(const TID &) const; const TID &getCurrentItem() const; int count() const { return m_Index2ID.count(); } - bool contains(const TID &id) const { return m_ID2Index.contains(id); } + bool tqcontains(const TID &id) const { return m_ID2Index.tqcontains(id); } protected: SORT_KEY m_skey; TLIST *m_List; - QMap<int, TID> m_Index2ID; - QMap<TID, int> m_ID2Index; - QMap<TID, QString> m_ID2Description; + TQMap<int, TID> m_Index2ID; + TQMap<TID, int> m_ID2Index; + TQMap<TID, TQString> m_ID2Description; struct THelpData { TID id; - QString descr; + TQString descr; SORT_KEY skey; THelpData() : id(), descr(), skey(SORT_BY_ID) {} - THelpData(TID _id, const QString &_descr, SORT_KEY _skey) + THelpData(TID _id, const TQString &_descr, SORT_KEY _skey) : id(_id), descr(_descr), skey(_skey) @@ -115,7 +115,7 @@ GUIListHelper<TLIST, TID>::GUIListHelper(TLIST *list, SORT_KEY skey) template <class TLIST, class TID> -GUIListHelper<TLIST, TID>::GUIListHelper(TLIST *list, const QMap<TID, QString> &data, SORT_KEY skey) +GUIListHelper<TLIST, TID>::GUIListHelper(TLIST *list, const TQMap<TID, TQString> &data, SORT_KEY skey) : m_skey(skey), m_List(list) { @@ -130,14 +130,14 @@ GUIListHelper<TLIST, TID>::~GUIListHelper() template <class TLIST, class TID> -void GUIListHelper<TLIST, TID>::setData (const QMap<TID, QString> &data) +void GUIListHelper<TLIST, TID>::setData (const TQMap<TID, TQString> &data) { m_List->clear(); m_ID2Description = data; - QValueList<THelpData> help_list; - QMapConstIterator<TID, QString> end = data.end(); - for (QMapConstIterator<TID, QString> it = data.begin(); it != end; ++it) { + TQValueList<THelpData> help_list; + TQMapConstIterator<TID, TQString> end = data.end(); + for (TQMapConstIterator<TID, TQString> it = data.begin(); it != end; ++it) { help_list.push_back(THelpData(it.key(), *it, m_skey)); } qHeapSort(help_list); @@ -146,8 +146,8 @@ void GUIListHelper<TLIST, TID>::setData (const QMap<TID, QString> &data) m_ID2Index.clear(); int idx = 0; - QValueListIterator<THelpData> end_hlp = help_list.end(); - for (QValueListIterator<THelpData> it = help_list.begin(); it != end_hlp; ++it, ++idx) { + TQValueListIterator<THelpData> end_hlp = help_list.end(); + for (TQValueListIterator<THelpData> it = help_list.begin(); it != end_hlp; ++it, ++idx) { m_Index2ID.insert(idx, (*it).id); m_ID2Index.insert((*it).id, idx); m_List->insertItem((*it).descr); @@ -158,7 +158,7 @@ void GUIListHelper<TLIST, TID>::setData (const QMap<TID, QString> &data) template <class TLIST, class TID> void GUIListHelper<TLIST, TID>::setCurrentItem(const TID &id) const { - if (m_ID2Index.contains(id)) + if (m_ID2Index.tqcontains(id)) m_List->setCurrentItem(m_ID2Index[id]); else m_List->setCurrentItem(0); diff --git a/kradio3/src/include/interfaces.h b/kradio3/src/include/interfaces.h index dced1d7..1719315 100644 --- a/kradio3/src/include/interfaces.h +++ b/kradio3/src/include/interfaces.h @@ -22,8 +22,8 @@ #include <config.h> #endif -#include <qptrlist.h> -#include <qmap.h> +#include <tqptrlist.h> +#include <tqmap.h> #include <kdebug.h> #include <typeinfo> @@ -65,20 +65,20 @@ To provide queries or a delivery feedback for messages, wrapper functions would have been necessary. - - Qt does not support multiple inheritance of QObjects. Thus even signals + - TQt does not support multiple inheritance of TQObjects. Thus even signals have to be declared abstract by the interface though the (later) implementation is already known. Those functions have to be declared as signals in the interface - implementation (derived from QObject) though the implementation does not + implementation (derived from TQObject) though the implementation does not want to worry about these signals. - - Qt does connect functions (signals/slots) and not interfaces. These + - TQt does connect functions (signals/slots) and not interfaces. These functions have to be connected separately. By that it is possible to forget to connect signals/slots of that interfaces. - - Aggregation of multiple interface implementations (each one is an QObject) - is not possible because qt does not allow multiple inheritance of QObjects + - Aggregation of multiple interface implementations (each one is an TQObject) + is not possible because qt does not allow multiple inheritance of TQObjects ///////////////////////////////////////////////////////////////////////////// @@ -87,7 +87,7 @@ Well, it eliminates at least the qt-problems explained above. But first we need a common mechanism to manage interface connections. This functionality can be provided by a common base class "InterfaceBase". It stores all - connected interfaces in a list of InterfaceBase pointers, e.g. QPtrList. + connected interfaces in a list of InterfaceBase pointers, e.g. TQPtrList. With this approach we would have some problems: @@ -145,7 +145,7 @@ - sending Messages Declare a virtual constant method with return value "int" and the desired - parameters. The return value will indicate how many receivers have handled + parameters. The return value will indicate how many tqreceivers have handled the message: virtual bool SendingMessages(int any_or_non_param) const; @@ -168,7 +168,7 @@ The method has to be implemented by a derived class. The current item of the - receivers conntions list is set to the sender. + tqreceivers conntions list is set to the sender. - querying queries @@ -180,7 +180,7 @@ Abbreviation by macros: - IF_QUERY( int QueryingQueries(int another_param) ) + IF_TQUERY( int QueryingQueries(int another_param) ) - answering queries @@ -195,7 +195,7 @@ IF_ANSWER( AnsweringQueries(int another_param) ) The method has to be implemented by a derived class. The current item of the - receivers conntions list is set to the sender. + tqreceivers conntions list is set to the sender. At last a note on maxConnections. This member is set on initialization by @@ -207,7 +207,7 @@ How do I use it ? - Implementations - Because we do not have a MOC as Qt does, we have to implement our sending + Because we do not have a TQMOC as TQt does, we have to implement our sending or querying methods by hand. But this minor disadvantage should be considered as less important than the fact, that this implementation is done where it belongs to. Especially because there are easy to use macros @@ -216,12 +216,12 @@ int ComplementaryInterface::SendingMessages(int any_or_non_param) const { IF_SEND_MESSAGE( ReceivingMessages(any_or_non_param) ) - // macro includes "return #receivers" + // macro includes "return #tqreceivers" } int ComplementaryInterface::QueryingQueries(int another_param) const { - IF_SEND_QUERY( AnsweringQuery(another_param), (int)"default return value" ) + IF_SEND_TQUERY( AnsweringQuery(another_param), (int)"default return value" ) } @@ -231,7 +231,7 @@ AnsweringQueries(param) ) - IF_IMPL_QUERY( int ComplementaryInterface::SendingMessages(int param), + IF_IMPL_TQUERY( int ComplementaryInterface::SendingMessages(int param), ReceivingMessages(param), (int)"default return value" ) @@ -337,8 +337,8 @@ public: typedef thisIF thisInterface; typedef cmplIF cmplInterface; - typedef QPtrList<cmplIF> IFList; - typedef QPtrListIterator<cmplIF> IFIterator; + typedef TQPtrList<cmplIF> IFList; + typedef TQPtrListIterator<cmplIF> IFIterator; typedef thisClass BaseClass; @@ -373,7 +373,7 @@ public: thisIF *initThisInterfacePointer(); thisIF *getThisInterfacePointer() const { return me; } bool isThisInterfacePointerValid() const { return me_valid; } - bool hasConnectionTo(cmplInterface *other) const { return iConnections.containsRef(other); } + bool hasConnectionTo(cmplInterface *other) const { return iConnections.tqcontainsRef(other); } void appendConnectionTo(cmplInterface *other) { iConnections.append(other); } void removeConnectionTo(cmplInterface *other) { iConnections.removeRef(other); } @@ -384,11 +384,11 @@ protected : // functions for individually selectable callbacks protected: - bool addListener (const cmplInterface *i, QPtrList<cmplInterface> &list); - void removeListener(const cmplInterface *i, QPtrList<cmplInterface> &list); + bool addListener (const cmplInterface *i, TQPtrList<cmplInterface> &list); + void removeListener(const cmplInterface *i, TQPtrList<cmplInterface> &list); void removeListener(const cmplInterface *i); - QMap<const cmplInterface *, QPtrList<QPtrList<cmplInterface> > > m_FineListeners; + TQMap<const cmplInterface *, TQPtrList<TQPtrList<cmplInterface> > > m_FineListeners; private: thisInterface *me; @@ -414,12 +414,12 @@ private: #ifdef DEBUG #include <iostream> using namespace std; - #define IF_QUERY_DEBUG \ + #define IF_TQUERY_DEBUG \ if (iConnections.count() > 1) { \ - kdDebug() << "class " << typeid(this).name() << ": using IF_QUERY with #connections > 1\n"; \ + kdDebug() << "class " << typeid(this).name() << ": using IF_TQUERY with #connections > 1\n"; \ } #else - #define IF_QUERY_DEBUG + #define IF_TQUERY_DEBUG #endif @@ -454,23 +454,23 @@ private: // queries #define ANSWERS public -#define QUERIES protected +#define TQUERIES protected -#define IF_QUERY(decl) \ +#define IF_TQUERY(decl) \ virtual decl const; -#define IF_SEND_QUERY(call, default) \ +#define IF_SEND_TQUERY(call, default) \ cmplInterface *o = IFIterator(iConnections).current(); \ if (o) { \ - IF_QUERY_DEBUG \ + IF_TQUERY_DEBUG \ return o->call; \ } else { \ return default; \ } \ -#define IF_IMPL_QUERY(decl, call, default) \ +#define IF_IMPL_TQUERY(decl, call, default) \ decl const { \ - IF_SEND_QUERY(call, default) \ + IF_SEND_TQUERY(call, default) \ } #define IF_ANSWER(decl) \ @@ -491,12 +491,12 @@ public: \ bool register4_##name (cmplInterface *); \ void unregister4_##name(cmplInterface *); \ private: \ - QPtrList<cmplInterface> m_Listeners_##name;\ + TQPtrList<cmplInterface> m_Listeners_##name;\ #define IF_SEND_MESSAGE_FINE(name, params, call) \ int ____n = 0; \ - for (QPtrListIterator<cmplInterface> ____it(m_Listeners_##name); ____it.current(); ++____it) { \ + for (TQPtrListIterator<cmplInterface> ____it(m_Listeners_##name); ____it.current(); ++____it) { \ if (____it.current()->call ) ++____n; \ } \ return ____n; @@ -576,7 +576,7 @@ bool InterfaceBase<thisIF, cmplIF>::connectI (Interface *__i) cmplIF *i = _i->initThisInterfacePointer(); if (i && me) { - bool i_connected = iConnections.containsRef(i); + bool i_connected = iConnections.tqcontainsRef(i); bool me_connected = i->hasConnectionTo(me); if (i_connected || me_connected) { @@ -671,9 +671,9 @@ void InterfaceBase<thisIF, cmplIF>::disconnectAllI() template <class thisIF, class cmplIF> -bool InterfaceBase<thisIF, cmplIF>::addListener(const cmplInterface *i, QPtrList<cmplInterface> &list) +bool InterfaceBase<thisIF, cmplIF>::addListener(const cmplInterface *i, TQPtrList<cmplInterface> &list) { - if (iConnections.containsRef(i) && !list.contains(i)) { + if (iConnections.tqcontainsRef(i) && !list.tqcontains(i)) { list.append(i); m_FineListeners[i].append(&list); return true; @@ -684,10 +684,10 @@ bool InterfaceBase<thisIF, cmplIF>::addListener(const cmplInterface *i, QPtrList template <class thisIF, class cmplIF> -void InterfaceBase<thisIF, cmplIF>::removeListener(const cmplInterface *i, QPtrList<cmplInterface> &list) +void InterfaceBase<thisIF, cmplIF>::removeListener(const cmplInterface *i, TQPtrList<cmplInterface> &list) { list.remove(i); - if (m_FineListeners.contains(i)) + if (m_FineListeners.tqcontains(i)) m_FineListeners[i].remove(&list); } @@ -695,9 +695,9 @@ void InterfaceBase<thisIF, cmplIF>::removeListener(const cmplInterface *i, QPtrL template <class thisIF, class cmplIF> void InterfaceBase<thisIF, cmplIF>::removeListener(const cmplInterface *i) { - if (m_FineListeners.contains(i)) { - QPtrList<QPtrList<cmplInterface> > &list = m_FineListeners[i]; - QPtrListIterator<QPtrList<cmplInterface> > it(list); + if (m_FineListeners.tqcontains(i)) { + TQPtrList<TQPtrList<cmplInterface> > &list = m_FineListeners[i]; + TQPtrListIterator<TQPtrList<cmplInterface> > it(list); for (; it.current(); ++it) { (*it)->remove(i); } diff --git a/kradio3/src/include/internetradiostation.h b/kradio3/src/include/internetradiostation.h index fa25159..716dba2 100644 --- a/kradio3/src/include/internetradiostation.h +++ b/kradio3/src/include/internetradiostation.h @@ -35,16 +35,16 @@ class InternetRadioStation : public RadioStation { public: InternetRadioStation(); InternetRadioStation(KURL const &url); - InternetRadioStation(const QString &name, const QString &shortName, KURL const &url); + InternetRadioStation(const TQString &name, const TQString &shortName, KURL const &url); InternetRadioStation(const InternetRadioStation &); - InternetRadioStation(RegisterStationClass, const QString &classname = QString::null); + InternetRadioStation(RegisterStationClass, const TQString &classname = TQString()); ~InternetRadioStation(); const KURL & url() const { return m_url; } void setUrl(KURL const &url) { m_url = url; } - virtual QString longName() const; - virtual QString description() const; + virtual TQString longName() const; + virtual TQString description() const; virtual bool isValid () const; /* = 0 : this.url == s.url @@ -61,10 +61,10 @@ public: virtual RadioStationConfig *createEditor() const; // for XML-Parsing/Export - virtual bool setProperty(const QString &property_name, const QString &val); - virtual QString getProperty(const QString &property_name) const; - virtual QStringList getPropertyNames() const; - virtual QString getClassName() const { return "InternetRadioStation"; } + virtual bool setProperty(const TQString &property_name, const TQString &val); + virtual TQString getProperty(const TQString &property_name) const; + virtual TQStringList getPropertyNames() const; + virtual TQString getClassName() const { return "InternetRadioStation"; } virtual bool operator == (const RadioStation &x) const; diff --git a/kradio3/src/include/kradioapp.h b/kradio3/src/include/kradioapp.h index f5fb950..8dba108 100644 --- a/kradio3/src/include/kradioapp.h +++ b/kradio3/src/include/kradioapp.h @@ -22,7 +22,7 @@ #include <config.h> #endif -#include <qdict.h> +#include <tqdict.h> #include <kapplication.h> #include <kaboutapplication.h> @@ -34,9 +34,9 @@ class KLibrary; class KRadioAbout : public PluginBase { public: - KRadioAbout(const QString &name) : PluginBase(name, "KRadio Application") {} + KRadioAbout(const TQString &name) : PluginBase(name, "KRadio Application") {} - virtual QString pluginClassName() const { return "KRadioAbout"; } + virtual TQString pluginClassName() const { return "KRadioAbout"; } virtual ConfigPageInfo createConfigurationPage () { return ConfigPageInfo(); } virtual AboutPageInfo createAboutPage (); @@ -48,41 +48,42 @@ public: -typedef PluginBase *(*t_kradio_plugin_init_func)(const QString & cls, const QString &obj); -typedef void (*t_kradio_plugin_info_func)(QMap<QString, QString> &); +typedef PluginBase *(*t_kradio_plugin_init_func)(const TQString & cls, const TQString &obj); +typedef void (*t_kradio_plugin_info_func)(TQMap<TQString, TQString> &); typedef void (*t_kradio_plugin_libload_func)(); typedef void (*t_kradio_plugin_libunload_func)(); struct PluginLibraryInfo { KLibrary *library; - QMap<QString,QString> plugins; + TQMap<TQString,TQString> plugins; t_kradio_plugin_init_func init_func; t_kradio_plugin_info_func info_func; t_kradio_plugin_libload_func libload_func; t_kradio_plugin_libunload_func libunload_func; PluginLibraryInfo() : library(NULL), init_func(NULL), info_func(NULL), libload_func(NULL), libunload_func(NULL) {} - PluginLibraryInfo(const QString &libname); + PluginLibraryInfo(const TQString &libname); bool valid() { return init_func && info_func && library && libload_func && libunload_func; } }; struct PluginClassInfo { - QString class_name; - QString description; + TQString class_name; + TQString description; t_kradio_plugin_init_func create_function; PluginClassInfo() : create_function(NULL) {} - PluginClassInfo(const QString &_name, const QString &descr, t_kradio_plugin_init_func init_func) + PluginClassInfo(const TQString &_name, const TQString &descr, t_kradio_plugin_init_func init_func) : class_name(_name), description(descr), create_function(init_func) {} - PluginBase *CreateInstance(const QString &obj_name) { return create_function ? create_function(class_name, obj_name) : NULL; } + PluginBase *CreateInstance(const TQString &obj_name) { return create_function ? create_function(class_name, obj_name) : NULL; } }; class KRadioApp : public KApplication { Q_OBJECT + TQ_OBJECT public: KRadioApp(); virtual ~KRadioApp(); @@ -90,14 +91,14 @@ public: virtual void saveState (KConfig *c); virtual void restoreState (KConfig *c); - virtual PluginManager *createNewInstance(const QString &name); + virtual PluginManager *createNewInstance(const TQString &name); - virtual KLibrary *LoadLibrary (const QString &library); - virtual void UnloadLibrary (const QString &library); - virtual PluginBase *CreatePlugin (PluginManager *manager, const QString &name, const QString &object_name); + virtual KLibrary *LoadLibrary (const TQString &library); + virtual void UnloadLibrary (const TQString &library); + virtual PluginBase *CreatePlugin (PluginManager *manager, const TQString &name, const TQString &object_name); - virtual const QMap<QString, PluginLibraryInfo> &getPluginLibraries() const { return m_PluginLibraries; } - virtual const QMap<QString, PluginClassInfo> &getPluginClasses() const { return m_PluginInfos; } + virtual const TQMap<TQString, PluginLibraryInfo> &getPluginLibraries() const { return m_PluginLibraries; } + virtual const TQMap<TQString, PluginClassInfo> &getPluginClasses() const { return m_PluginInfos; } virtual void startPlugins(); @@ -108,10 +109,10 @@ protected slots: protected: - QDict<PluginManager> m_Instances; + TQDict<PluginManager> m_Instances; - QMap<QString, PluginLibraryInfo> m_PluginLibraries; - QMap<QString, PluginClassInfo> m_PluginInfos; + TQMap<TQString, PluginLibraryInfo> m_PluginLibraries; + TQMap<TQString, PluginClassInfo> m_PluginInfos; bool m_quitting; }; diff --git a/kradio3/src/include/multibuffer.h b/kradio3/src/include/multibuffer.h index e835465..e0ed05c 100644 --- a/kradio3/src/include/multibuffer.h +++ b/kradio3/src/include/multibuffer.h @@ -22,8 +22,8 @@ #include <config.h> #endif -#include <qsemaphore.h> -#include <qstring.h> +#include <tqsemaphore.h> +#include <tqstring.h> class MultiBuffer { @@ -37,7 +37,7 @@ public: char *wait4ReadBuffer (size_t &buffer_fill); char *getCurrentReadBuffer(size_t &buffer_fill) const; - const QString &getErrorString() const { return m_errorString; } + const TQString &getErrorString() const { return m_errorString; } bool hasError() const { return m_error; } void resetError(); @@ -56,9 +56,9 @@ protected: size_t *m_buffersFill; size_t m_currentReadBuffer; size_t m_currentWriteBuffer; - QSemaphore m_readLock; + TQSemaphore m_readLock; - QString m_errorString; + TQString m_errorString; bool m_error; }; diff --git a/kradio3/src/include/plugin_configuration_dialog.h b/kradio3/src/include/plugin_configuration_dialog.h index d315a88..87e4d35 100644 --- a/kradio3/src/include/plugin_configuration_dialog.h +++ b/kradio3/src/include/plugin_configuration_dialog.h @@ -29,17 +29,18 @@ class PluginConfigurationDialog : public KDialogBase, { Q_OBJECT + TQ_OBJECT public: PluginConfigurationDialog( - int dialogFace, const QString &caption, + int dialogFace, const TQString &caption, int buttonMask, ButtonCode defaultButton, - QWidget *parent=0, const char *name=0, + TQWidget *tqparent=0, const char *name=0, bool modal=true, bool separator=false); // PluginBase - virtual QString pluginClassName() const { return "PluginConfigurationDialog"; } + virtual TQString pluginClassName() const { return "PluginConfigurationDialog"; } virtual void saveState (KConfig *) const; virtual void restoreState (KConfig *); @@ -58,16 +59,16 @@ public slots: virtual void hide(); virtual void cancel() { slotCancel(); } - // QWidget overrides + // TQWidget overrides protected: - virtual void showEvent(QShowEvent *); - virtual void hideEvent(QHideEvent *); + virtual void showEvent(TQShowEvent *); + virtual void hideEvent(TQHideEvent *); - virtual QWidget *getWidget() { return this; } - virtual const QWidget *getWidget() const { return this; } + virtual TQWidget *getWidget() { return this; } + virtual const TQWidget *getWidget() const { return this; } - QString m_Caption; + TQString m_Caption; }; diff --git a/kradio3/src/include/pluginmanager-configuration.h b/kradio3/src/include/pluginmanager-configuration.h index 5cd8d5f..77c28dd 100644 --- a/kradio3/src/include/pluginmanager-configuration.h +++ b/kradio3/src/include/pluginmanager-configuration.h @@ -24,15 +24,16 @@ #include <pluginmanager-configuration-ui.h> -class QWidget; +class TQWidget; class KRadioApp; class PluginManager; class PluginManagerConfiguration : public PluginManagerConfigurationUI { Q_OBJECT + TQ_OBJECT public : - PluginManagerConfiguration (QWidget *parent, KRadioApp *app, PluginManager *pm); + PluginManagerConfiguration (TQWidget *tqparent, KRadioApp *app, PluginManager *pm); ~PluginManagerConfiguration (); void noticePluginLibrariesChanged(); diff --git a/kradio3/src/include/pluginmanager.h b/kradio3/src/include/pluginmanager.h index b52c8f2..d857c6e 100644 --- a/kradio3/src/include/pluginmanager.h +++ b/kradio3/src/include/pluginmanager.h @@ -22,8 +22,8 @@ #include <config.h> #endif -#include <qstring.h> -#include <qptrdict.h> +#include <tqstring.h> +#include <tqptrdict.h> #include "plugins.h" @@ -31,50 +31,51 @@ class PluginBase; class WidgetPluginBase; class PluginConfigurationDialog; class PluginManagerConfiguration; -class QWidget; +class TQWidget; class KConfig; -class QFrame; +class TQFrame; class KAboutDialog; class KDialogBase; struct ConfigPageInfo; -class QMenuData; +class TQMenuData; class KRadioApp; -class PluginManager : public QObject +class PluginManager : public TQObject { Q_OBJECT + TQ_OBJECT public : - PluginManager(const QString &name, + PluginManager(const TQString &name, KRadioApp *app, - const QString &configDialogTitle, - const QString &aboutTitle); + const TQString &configDialogTitle, + const TQString &aboutTitle); virtual ~PluginManager(); // Library Functions void noticeLibrariesChanged(); - void unloadPlugins(const QString &class_name); + void unloadPlugins(const TQString &class_name); // managing plugins const PluginList &plugins() const { return m_plugins; } - void addWidgetPluginMenuItems(QMenuData *menu, QMap<WidgetPluginBase *,int> &map) const; - void updateWidgetPluginMenuItem(WidgetPluginBase *p, QMenuData *menu, QMap<WidgetPluginBase *,int> &map, bool shown) const; + void addWidgetPluginMenuItems(TQMenuData *menu, TQMap<WidgetPluginBase *,int> &map) const; + void updateWidgetPluginMenuItem(WidgetPluginBase *p, TQMenuData *menu, TQMap<WidgetPluginBase *,int> &map, bool shown) const; - PluginBase *getPluginByName(const QString &name) const; + PluginBase *getPluginByName(const TQString &name) const; // after insert, pluginManager is responsible for deletion void insertPlugin(PluginBase *); // remove and delete plugin void deletePlugin(PluginBase *); - void deletePluginByName(const QString &name) { deletePlugin(getPluginByName(name)); } + void deletePluginByName(const TQString &name) { deletePlugin(getPluginByName(name)); } // remove plugin, afterwards pluginManager is no longer responsible for deletion void removePlugin(PluginBase *); - void removePluginByName(const QString &name) { removePlugin(getPluginByName(name)); } + void removePluginByName(const TQString &name) { removePlugin(getPluginByName(name)); } // operations on all plugins @@ -92,8 +93,8 @@ public : virtual void noticeWidgetPluginShown(WidgetPluginBase *p, bool shown); protected : - virtual void createConfigDialog(const QString &title = QString::null); - virtual void createAboutDialog (const QString &title = QString::null); + virtual void createConfigDialog(const TQString &title = TQString()); + virtual void createAboutDialog (const TQString &title = TQString()); virtual void addConfigurationPage (PluginBase *forWhom, const ConfigPageInfo &info); @@ -112,33 +113,33 @@ signals: virtual void sigConfigOK(); private: - virtual QFrame *addConfigurationPage (const ConfigPageInfo &info); + virtual TQFrame *addConfigurationPage (const ConfigPageInfo &info); ConfigPageInfo createOwnConfigurationPage(); // PluginManager's data & types ;) protected: - typedef QPtrDict<QFrame> QFrameDict; - typedef QPtrDictIterator<QFrame> QFrameDictIterator; - typedef QPtrDict<QWidget> QWidgetDict; - typedef QPtrDictIterator<QWidget> QWidgetDictIterator; + typedef TQPtrDict<TQFrame> TQFrameDict; + typedef TQPtrDictIterator<TQFrame> TQFrameDictIterator; + typedef TQPtrDict<TQWidget> TQWidgetDict; + typedef TQPtrDictIterator<TQWidget> TQWidgetDictIterator; - QString m_Name; + TQString m_Name; KRadioApp *m_Application; PluginList m_plugins; bool m_showProgressBar; - QFrameDict m_configPageFrames; - QWidgetDict m_configPages; + TQFrameDict m_configPageFrames; + TQWidgetDict m_configPages; - QFrameDict m_aboutPageFrames; - QWidgetDict m_aboutPages; + TQFrameDict m_aboutPageFrames; + TQWidgetDict m_aboutPages; PluginConfigurationDialog *m_configDialog; PluginManagerConfiguration*m_pluginManagerConfiguration; KDialogBase *m_aboutDialog; - QString m_configDialogTitle; - QString m_aboutDialogTitle; + TQString m_configDialogTitle; + TQString m_aboutDialogTitle; }; diff --git a/kradio3/src/include/plugins.h b/kradio3/src/include/plugins.h index 8040437..6fd6d70 100644 --- a/kradio3/src/include/plugins.h +++ b/kradio3/src/include/plugins.h @@ -27,23 +27,23 @@ #include <kglobal.h> #include "errorlog-interfaces.h" -#include <qstring.h> -#include <qobject.h> -#include <qptrlist.h> +#include <tqstring.h> +#include <tqobject.h> +#include <tqptrlist.h> class PluginManager; class PluginBase; -class QWidget; +class TQWidget; class KConfig; -typedef QPtrList<PluginBase> PluginList; -typedef QPtrListIterator<PluginBase> PluginIterator; +typedef TQPtrList<PluginBase> PluginList; +typedef TQPtrListIterator<PluginBase> PluginIterator; /* PluginBase must be inherited from Interface so that a plugin can be used in Interface::connect functions. - PluginBase must not be inherited from QObject, because derived classes may - be inherited e.g. from QWidget (multiple inheritance is not possible with + PluginBase must not be inherited from TQObject, because derived classes may + be inherited e.g. from TQWidget (multiple inheritance is not possible with OBjects). But we must be able to receive destroy messages e.g. from configuration pages. Thus we need the special callback member m_destroyNotifier. @@ -61,18 +61,18 @@ class WidgetPluginBase; struct ConfigPageInfo { ConfigPageInfo () : page(NULL) {} - ConfigPageInfo (QWidget *p, - const QString &in, - const QString &ph, - const QString &icon) + ConfigPageInfo (TQWidget *p, + const TQString &in, + const TQString &ph, + const TQString &icon) : page (p), itemName(in), pageHeader(ph), iconName(icon) {} - QWidget *page; - QString itemName, + TQWidget *page; + TQString itemName, pageHeader, iconName; }; @@ -84,15 +84,15 @@ class PluginBase : public IErrorLogClient { friend class PluginManager; public : - PluginBase(const QString &name, const QString &description); + PluginBase(const TQString &name, const TQString &description); virtual ~PluginBase(); - virtual QString pluginClassName() const = 0; + virtual TQString pluginClassName() const = 0; - const QString &name() const { return m_name; } - QString &name() { return m_name; } + const TQString &name() const { return m_name; } + TQString &name() { return m_name; } - const QString &description() const { return m_description; } + const TQString &description() const { return m_description; } // workaround for compiler bugs bool destructorCalled() const { return m_destructorCalled; } @@ -127,8 +127,8 @@ public: virtual void noticePluginsChanged(const PluginList &) {} protected : - QString m_name; - QString m_description; + TQString m_name; + TQString m_description; PluginManager *m_manager; bool m_destructorCalled; }; @@ -145,12 +145,12 @@ extern "C" void KRadioPlugin_UnloadLibrary() \ KGlobal::locale()->removeCatalogue(i18nName); \ } \ \ -extern "C" void KRadioPlugin_GetAvailablePlugins(QMap<QString, QString> &info) \ +extern "C" void KRadioPlugin_GetAvailablePlugins(TQMap<TQString, TQString> &info) \ { \ info.insert(#class_name, (description)); \ } \ \ -extern "C" PluginBase *KRadioPlugin_CreatePlugin(const QString &type, const QString &object_name) \ +extern "C" PluginBase *KRadioPlugin_CreatePlugin(const TQString &type, const TQString &object_name) \ { \ if (type == #class_name) { \ return new class_name(object_name); \ @@ -171,13 +171,13 @@ extern "C" void KRadioPlugin_UnloadLibrary() \ KGlobal::locale()->removeCatalogue(i18nName); \ } \ \ -extern "C" void KRadioPlugin_GetAvailablePlugins(QMap<QString, QString> &info) \ +extern "C" void KRadioPlugin_GetAvailablePlugins(TQMap<TQString, TQString> &info) \ { \ info.insert(#class_name1, (description1)); \ info.insert(#class_name2, (description2)); \ } \ \ -extern "C" PluginBase *KRadioPlugin_CreatePlugin(const QString &type, const QString &object_name) \ +extern "C" PluginBase *KRadioPlugin_CreatePlugin(const TQString &type, const TQString &object_name) \ { \ if (type == #class_name1) { \ return new class_name1(object_name); \ diff --git a/kradio3/src/include/radio_interfaces.h b/kradio3/src/include/radio_interfaces.h index 12a9037..dbba88d 100644 --- a/kradio3/src/include/radio_interfaces.h +++ b/kradio3/src/include/radio_interfaces.h @@ -51,13 +51,13 @@ RECEIVERS: IF_RECEIVER( activateStation(const RadioStation &rs) ) IF_RECEIVER( activateStation(int index) ) IF_RECEIVER( setStations(const StationList &sl) ) - IF_RECEIVER( setPresetFile(const QString &f) ) + IF_RECEIVER( setPresetFile(const TQString &f) ) SENDERS: IF_SENDER ( notifyPowerChanged(bool on) ) IF_SENDER ( notifyStationChanged (const RadioStation &, int idx) ) IF_SENDER ( notifyStationsChanged(const StationList &sl) ) - IF_SENDER ( notifyPresetFileChanged(const QString &sl) ) + IF_SENDER ( notifyPresetFileChanged(const TQString &sl) ) IF_SENDER ( notifyCurrentSoundStreamIDChanged(SoundStreamID id) ) ANSWERS: @@ -67,7 +67,7 @@ ANSWERS: IF_ANSWER ( int getStationIdx(const RadioStation &rs) const ) IF_ANSWER ( int getCurrentStationIdx() const ) IF_ANSWER ( const StationList & getStations() const ) - IF_ANSWER ( const QString & getPresetFile() const ); + IF_ANSWER ( const TQString & getPresetFile() const ); IF_ANSWER ( SoundStreamID getCurrentSoundStreamID() const ); @@ -87,25 +87,25 @@ SENDERS: IF_SENDER ( sendActivateStation(const RadioStation &rs) ) IF_SENDER ( sendActivateStation(int index) ) IF_SENDER ( sendStations(const StationList &sl) ) - IF_SENDER ( sendPresetFile(const QString &f) ) + IF_SENDER ( sendPresetFile(const TQString &f) ) RECEIVERS: IF_RECEIVER( noticePowerChanged(bool on) ) IF_RECEIVER( noticeStationChanged (const RadioStation &, int idx) ) IF_RECEIVER( noticeStationsChanged(const StationList &sl) ) - IF_RECEIVER( noticePresetFileChanged(const QString &f) ) + IF_RECEIVER( noticePresetFileChanged(const TQString &f) ) IF_RECEIVER( noticeCurrentSoundStreamIDChanged(SoundStreamID id)) -QUERIES: - IF_QUERY ( bool queryIsPowerOn() ) - IF_QUERY ( bool queryIsPowerOff() ) - IF_QUERY ( const RadioStation & queryCurrentStation() ) - IF_QUERY ( int queryStationIdx(const RadioStation &rs) ) - IF_QUERY ( int queryCurrentStationIdx() ) - IF_QUERY ( const StationList & queryStations() ) - IF_QUERY ( const QString & queryPresetFile() ) +TQUERIES: + IF_TQUERY ( bool queryIsPowerOn() ) + IF_TQUERY ( bool queryIsPowerOff() ) + IF_TQUERY ( const RadioStation & queryCurrentStation() ) + IF_TQUERY ( int queryStationIdx(const RadioStation &rs) ) + IF_TQUERY ( int queryCurrentStationIdx() ) + IF_TQUERY ( const StationList & queryStations() ) + IF_TQUERY ( const TQString & queryPresetFile() ) - IF_QUERY ( SoundStreamID queryCurrentSoundStreamID() ); + IF_TQUERY ( SoundStreamID queryCurrentSoundStreamID() ); RECEIVERS: virtual void noticeConnectedI (cmplInterface *, bool pointer_valid); diff --git a/kradio3/src/include/radiodevice_interfaces.h b/kradio3/src/include/radiodevice_interfaces.h index 53b975e..262663e 100644 --- a/kradio3/src/include/radiodevice_interfaces.h +++ b/kradio3/src/include/radiodevice_interfaces.h @@ -54,14 +54,14 @@ RECEIVERS: SENDERS: IF_SENDER ( notifyPowerChanged(bool on) ) IF_SENDER ( notifyStationChanged (const RadioStation &) ) - IF_SENDER ( notifyDescriptionChanged (const QString &) ) + IF_SENDER ( notifyDescriptionChanged (const TQString &) ) IF_SENDER ( notifyCurrentSoundStreamIDChanged(SoundStreamID id)) ANSWERS: IF_ANSWER ( bool isPowerOn() const ); IF_ANSWER ( bool isPowerOff() const ); IF_ANSWER ( const RadioStation & getCurrentStation() const ); - IF_ANSWER ( const QString & getDescription() const ); + IF_ANSWER ( const TQString & getDescription() const ); IF_ANSWER ( SoundStreamID getCurrentSoundStreamID() const ); }; @@ -83,16 +83,16 @@ SENDERS: RECEIVERS: IF_RECEIVER( noticePowerChanged (bool on, const IRadioDevice *sender = NULL) ) IF_RECEIVER( noticeStationChanged (const RadioStation &, const IRadioDevice *sender = NULL) ) - IF_RECEIVER( noticeDescriptionChanged (const QString &, const IRadioDevice *sender = NULL) ) + IF_RECEIVER( noticeDescriptionChanged (const TQString &, const IRadioDevice *sender = NULL) ) IF_RECEIVER( noticeCurrentSoundStreamIDChanged(SoundStreamID id, const IRadioDevice *sender = NULL)) -QUERIES: - IF_QUERY ( bool queryIsPowerOn() ) - IF_QUERY ( bool queryIsPowerOff() ) - IF_QUERY ( const RadioStation & queryCurrentStation() ) - IF_QUERY ( const QString & queryDescription() ) +TQUERIES: + IF_TQUERY ( bool queryIsPowerOn() ) + IF_TQUERY ( bool queryIsPowerOff() ) + IF_TQUERY ( const RadioStation & queryCurrentStation() ) + IF_TQUERY ( const TQString & queryDescription() ) - IF_QUERY ( SoundStreamID queryCurrentSoundStreamID() ) + IF_TQUERY ( SoundStreamID queryCurrentSoundStreamID() ) RECEIVERS: virtual void noticeConnectedI (cmplInterface *, bool pointer_valid); @@ -168,16 +168,16 @@ RECEIVERS: IF_RECEIVER( noticeStereoChanged(bool s) ) IF_RECEIVER( noticeMuted(bool m) ) -QUERIES: - IF_QUERY ( float queryVolume() ) - IF_QUERY ( float queryTreble() ) - IF_QUERY ( float queryBass() ) - IF_QUERY ( float queryBalance () ) - IF_QUERY ( float querySignalQuality() ) - IF_QUERY ( float querySignalMinQuality() ) - IF_QUERY ( bool queryHasGoodQuality() ) - IF_QUERY ( bool queryIsStereo() ) - IF_QUERY ( bool queryIsMuted() ) +TQUERIES: + IF_TQUERY ( float queryVolume() ) + IF_TQUERY ( float queryTreble() ) + IF_TQUERY ( float queryBass() ) + IF_TQUERY ( float queryBalance () ) + IF_TQUERY ( float querySignalQuality() ) + IF_TQUERY ( float querySignalMinQuality() ) + IF_TQUERY ( bool queryHasGoodQuality() ) + IF_TQUERY ( bool queryIsStereo() ) + IF_TQUERY ( bool queryIsMuted() ) RECEIVERS: virtual void noticeConnectedI (cmplInterface *, bool pointer_valid); @@ -234,11 +234,11 @@ RECEIVERS: IF_RECEIVER( noticeSeekFinished (const RadioStation &s, bool goodQuality) ) IF_RECEIVER( noticeProgress (float f) ) -QUERIES: - IF_QUERY ( bool queryIsSeekRunning() ) - IF_QUERY ( bool queryIsSeekUpRunning() ) - IF_QUERY ( bool queryIsSeekDownRunning() ) - IF_QUERY ( float queryProgress () ) +TQUERIES: + IF_TQUERY ( bool queryIsSeekRunning() ) + IF_TQUERY ( bool queryIsSeekUpRunning() ) + IF_TQUERY ( bool queryIsSeekDownRunning() ) + IF_TQUERY ( float queryProgress () ) RECEIVERS: virtual void noticeConnectedI (cmplInterface *, bool pointer_valid); @@ -293,13 +293,13 @@ RECEIVERS: IF_RECEIVER( noticeDeviceMinMaxFrequencyChanged(float min, float max) ) IF_RECEIVER( noticeScanStepChanged(float s) ) -QUERIES: - IF_QUERY ( float queryFrequency() ) - IF_QUERY ( float queryMinFrequency() ) - IF_QUERY ( float queryMinDeviceFrequency() ) - IF_QUERY ( float queryMaxFrequency() ) - IF_QUERY ( float queryMaxDeviceFrequency() ) - IF_QUERY ( float queryScanStep() ) +TQUERIES: + IF_TQUERY ( float queryFrequency() ) + IF_TQUERY ( float queryMinFrequency() ) + IF_TQUERY ( float queryMinDeviceFrequency() ) + IF_TQUERY ( float queryMaxFrequency() ) + IF_TQUERY ( float queryMaxDeviceFrequency() ) + IF_TQUERY ( float queryScanStep() ) RECEIVERS: virtual void noticeConnectedI (cmplInterface *, bool pointer_valid); @@ -339,8 +339,8 @@ SENDERS: RECEIVERS: IF_RECEIVER( noticeURLChanged(const KURL &url) ) -QUERIES: - IF_QUERY ( const KURL &queryURL() ) +TQUERIES: + IF_TQUERY ( const KURL &queryURL() ) RECEIVERS: virtual void noticeConnectedI (cmplInterface *, bool pointer_valid); diff --git a/kradio3/src/include/radiodevicepool_interfaces.h b/kradio3/src/include/radiodevicepool_interfaces.h index 6c562a8..dadc400 100644 --- a/kradio3/src/include/radiodevicepool_interfaces.h +++ b/kradio3/src/include/radiodevicepool_interfaces.h @@ -38,13 +38,13 @@ RECEIVERS: SENDERS: IF_SENDER ( notifyActiveDeviceChanged(IRadioDevice *rd) ) - IF_SENDER ( notifyDevicesChanged(const QPtrList<IRadioDevice> &) ) - IF_SENDER ( notifyDeviceDescriptionChanged(const QString &) ) + IF_SENDER ( notifyDevicesChanged(const TQPtrList<IRadioDevice> &) ) + IF_SENDER ( notifyDeviceDescriptionChanged(const TQString &) ) ANSWERS: IF_ANSWER ( IRadioDevice * getActiveDevice() const ) - IF_ANSWER ( const QPtrList<IRadioDevice> & getDevices() const ) - IF_ANSWER ( const QString & getDeviceDescription() const ) + IF_ANSWER ( const TQPtrList<IRadioDevice> & getDevices() const ) + IF_ANSWER ( const TQString & getDeviceDescription() const ) }; @@ -58,13 +58,13 @@ SENDERS: RECEIVERS: IF_RECEIVER( noticeActiveDeviceChanged(IRadioDevice *rd) ) - IF_RECEIVER( noticeDevicesChanged(const QPtrList<IRadioDevice> &) ) - IF_RECEIVER( noticeDeviceDescriptionChanged(const QString &) ) + IF_RECEIVER( noticeDevicesChanged(const TQPtrList<IRadioDevice> &) ) + IF_RECEIVER( noticeDeviceDescriptionChanged(const TQString &) ) -QUERIES: - IF_QUERY ( IRadioDevice *queryActiveDevice() ) - IF_QUERY ( const QPtrList<IRadioDevice> &queryDevices() ) - IF_QUERY ( const QString &queryDeviceDescription() ) +TQUERIES: + IF_TQUERY ( IRadioDevice *queryActiveDevice() ) + IF_TQUERY ( const TQPtrList<IRadioDevice> &queryDevices() ) + IF_TQUERY ( const TQString &queryDeviceDescription() ) RECEIVERS: virtual void noticeConnectedI (cmplInterface *, bool /*pointer_valid*/); diff --git a/kradio3/src/include/radiostation-config.h b/kradio3/src/include/radiostation-config.h index b0b31cf..17ee824 100644 --- a/kradio3/src/include/radiostation-config.h +++ b/kradio3/src/include/radiostation-config.h @@ -22,15 +22,16 @@ #include <config.h> #endif -#include <qwidget.h> +#include <tqwidget.h> class RadioStation; -class RadioStationConfig : public QWidget +class RadioStationConfig : public TQWidget { Q_OBJECT + TQ_OBJECT public: - RadioStationConfig(QWidget *parent); + RadioStationConfig(TQWidget *tqparent); ~RadioStationConfig(); virtual void setStationData (const RadioStation &rs) = 0; @@ -44,8 +45,9 @@ signals: class UndefinedRadioStationConfig : public RadioStationConfig { Q_OBJECT + TQ_OBJECT public: - UndefinedRadioStationConfig (QWidget *parent); + UndefinedRadioStationConfig (TQWidget *tqparent); ~UndefinedRadioStationConfig(); virtual void setStationData (const RadioStation &rs); @@ -54,13 +56,14 @@ public: -class QSpinBox; +class TQSpinBox; class FrequencyRadioStationConfig : public RadioStationConfig { Q_OBJECT + TQ_OBJECT public: - FrequencyRadioStationConfig (QWidget *parent); + FrequencyRadioStationConfig (TQWidget *tqparent); ~FrequencyRadioStationConfig(); virtual void setStationData (const RadioStation &rs); @@ -71,7 +74,7 @@ protected slots: protected: - QSpinBox *m_editFrequency; + TQSpinBox *m_editFrequency; }; diff --git a/kradio3/src/include/radiostation-listview.h b/kradio3/src/include/radiostation-listview.h index 1f3fb6a..43bf535 100644 --- a/kradio3/src/include/radiostation-listview.h +++ b/kradio3/src/include/radiostation-listview.h @@ -31,20 +31,21 @@ class StationList; class RadioStationListView : public KListView { Q_OBJECT + TQ_OBJECT public: - RadioStationListView(QWidget *parent=0, const char *name=0); + RadioStationListView(TQWidget *tqparent=0, const char *name=0); virtual ~RadioStationListView(); - QListViewItem *getItemForIndex(int idx) const; - int getIndexForItem(QListViewItem *) const; + TQListViewItem *getItemForIndex(int idx) const; + int getIndexForItem(TQListViewItem *) const; void setStation(int idx, const RadioStation &, int nr = -1); void appendStation(const RadioStation &, int nr = -1); void setStations(const StationList &); void removeStation(int idx); - void takeItem(QListViewItem *item, int idx); - void insertItem(QListViewItem *item, const QString &stationid, int idx); + void takeItem(TQListViewItem *item, int idx); + void insertItem(TQListViewItem *item, const TQString &stationid, int idx); void setCurrentStation(int idx); int currentStationIndex() const; @@ -57,26 +58,26 @@ public: protected: - QDragObject *dragObject(); - void dragEnterEvent(QDragEnterEvent* event); - void dropEvent(QDropEvent* event); - void contentsDragEnterEvent(QDragEnterEvent* event); - void contentsDragMoveEvent(QDragMoveEvent* event); - void contentsDropEvent(QDropEvent* event); + TQDragObject *dragObject(); + void dragEnterEvent(TQDragEnterEvent* event); + void dropEvent(TQDropEvent* event); + void contentsDragEnterEvent(TQDragEnterEvent* event); + void contentsDragMoveEvent(TQDragMoveEvent* event); + void contentsDropEvent(TQDropEvent* event); protected slots: - void slotStationActivation(QListViewItem *); - void slotCurrentStationChanged(QListViewItem *); + void slotStationActivation(TQListViewItem *); + void slotCurrentStationChanged(TQListViewItem *); signals: void sigStationActivated(int idx); void sigCurrentStationChanged(int idx); - void sigStationsReceived(const QStringList &stationIDs); + void sigStationsReceived(const TQStringList &stationIDs); protected: - QStringList m_StationIDs; + TQStringList m_StationIDs; }; diff --git a/kradio3/src/include/radiostation.h b/kradio3/src/include/radiostation.h index 5c63874..8098d3d 100644 --- a/kradio3/src/include/radiostation.h +++ b/kradio3/src/include/radiostation.h @@ -23,9 +23,9 @@ #endif //#include "utils.h" -#include <qstring.h> -#include <qstringlist.h> -#include <qdict.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqdict.h> #include <klocale.h> @@ -70,38 +70,38 @@ class RadioStationConfig; class RadioStation { protected: - RadioStation (RegisterStationClass, const QString &classname); + RadioStation (RegisterStationClass, const TQString &classname); public: RadioStation (); - RadioStation (const QString &name, const QString &shortName); + RadioStation (const TQString &name, const TQString &shortName); RadioStation (const RadioStation &); virtual ~RadioStation(); - const QString &stationID() const { return m_stationID; } + const TQString &stationID() const { return m_stationID; } - virtual QString longName() const = 0; - virtual QString description() const = 0; + virtual TQString longName() const = 0; + virtual TQString description() const = 0; - const QString &name() const { return m_name; } - const QString &shortName() const { return m_shortName; } - const QString &iconName() const { return m_iconName; } + const TQString &name() const { return m_name; } + const TQString &shortName() const { return m_shortName; } + const TQString &iconName() const { return m_iconName; } float initialVolume() const { return m_initialVolume; } - void setName (const QString &name) { m_name = name; } - void setShortName (const QString &shortName) { m_shortName = shortName; } - void setIconName (const QString &iconName) { m_iconName = iconName; } + void setName (const TQString &name) { m_name = name; } + void setShortName (const TQString &shortName) { m_shortName = shortName; } + void setIconName (const TQString &iconName) { m_iconName = iconName; } void setInitialVolume(float initialVolume) { m_initialVolume = initialVolume; } void copyDescriptionFrom(const RadioStation &rs); // for XML-Parsing/Export - virtual bool setProperty(const QString &property_name, const QString &val); - virtual QString getProperty(const QString &property_name) const; - virtual QStringList getPropertyNames() const; - virtual QString getClassName() const = 0; + virtual bool setProperty(const TQString &property_name, const TQString &val); + virtual TQString getProperty(const TQString &property_name) const; + virtual TQStringList getPropertyNames() const; + virtual TQString getClassName() const = 0; // get empty derived stations by classname from registry - static RadioStation const *getStationClass(const QString &classname); + static RadioStation const *getStationClass(const TQString &classname); RadioStation const *getStationClass() const { return getStationClass(getClassName()); } // = 0 : "this" is same as "s", e.g. approximately same frequency, same url, ... @@ -125,15 +125,15 @@ public: virtual bool operator != (const RadioStation &x) const { return !operator==(x); } protected : - QString m_stationID; + TQString m_stationID; - QString m_name; - QString m_shortName; + TQString m_name; + TQString m_shortName; float m_initialVolume; // <0: => Don't use - QString m_iconName; + TQString m_iconName; private: - static QDict<RadioStation> *stationClassRegistry; + static TQDict<RadioStation> *stationClassRegistry; }; @@ -147,14 +147,14 @@ class UndefinedRadioStation : public RadioStation public: UndefinedRadioStation (RegisterStationClass) : RadioStation (registerStationClass, getClassName()) {} - virtual QString longName() const { return i18n("unknown"); } - virtual QString description() const { return i18n("unknown"); } + virtual TQString longName() const { return i18n("unknown"); } + virtual TQString description() const { return i18n("unknown"); } virtual bool isValid() const { return false; } virtual RadioStation *copy() const { return new UndefinedRadioStation(*this); } virtual RadioStation *copyNewID() const { RadioStation *x = new UndefinedRadioStation(*this); x->generateNewStationID(); return x; } virtual int compare(const RadioStation &s) const; - virtual QString getClassName() const { return "UndefinedRadioStation"; } + virtual TQString getClassName() const { return "UndefinedRadioStation"; } virtual RadioStationConfig *createEditor() const; }; diff --git a/kradio3/src/include/seekhelper.h b/kradio3/src/include/seekhelper.h index 01d8d86..8baa9a0 100644 --- a/kradio3/src/include/seekhelper.h +++ b/kradio3/src/include/seekhelper.h @@ -33,7 +33,7 @@ public: typedef enum { off, searchWorse, searchBest } state_t; typedef enum { up, down } direction_t; - SeekHelper(ISeekRadio &parent); + SeekHelper(ISeekRadio &tqparent); virtual ~SeekHelper(); virtual bool connectI (Interface *i); @@ -52,7 +52,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; } diff --git a/kradio3/src/include/sound_metadata.h b/kradio3/src/include/sound_metadata.h index ceecb9c..a8d2fb2 100644 --- a/kradio3/src/include/sound_metadata.h +++ b/kradio3/src/include/sound_metadata.h @@ -24,23 +24,23 @@ #include <time.h> #include <endian.h> -#include <qstring.h> +#include <tqstring.h> #include <kconfig.h> #include <kurl.h> class SoundMetaData { public: - SoundMetaData (Q_UINT64 pos, time_t rel_ts, time_t abs_ts, const KURL &url = KURL()) + SoundMetaData (TQ_UINT64 pos, time_t rel_ts, time_t abs_ts, const KURL &url = KURL()) : m_DataPosition(pos), m_relativeTimestamp(rel_ts), m_absoluteTimestamp(abs_ts), m_URL(url) {} - Q_UINT64 position() const { return m_DataPosition; } + TQ_UINT64 position() const { return m_DataPosition; } KURL url() const { return m_URL; } time_t relativeTimestamp() const { return m_relativeTimestamp; } time_t absoluteTimestamp() const { return m_absoluteTimestamp; } protected: - Q_UINT64 m_DataPosition; + TQ_UINT64 m_DataPosition; time_t m_relativeTimestamp; time_t m_absoluteTimestamp; KURL m_URL; diff --git a/kradio3/src/include/soundformat.h b/kradio3/src/include/soundformat.h index 0c7a384..ea11f09 100644 --- a/kradio3/src/include/soundformat.h +++ b/kradio3/src/include/soundformat.h @@ -23,7 +23,7 @@ #endif #include <endian.h> -#include <qstring.h> +#include <tqstring.h> #include <kconfig.h> struct SoundFormat { @@ -32,9 +32,9 @@ struct SoundFormat { unsigned m_SampleBits; bool m_IsSigned; unsigned m_Endianess; - QString m_Encoding; // "raw", "mp3", ... (no "wav", because it's only header + raw data) + TQString m_Encoding; // "raw", "mp3", ... (no "wav", because it's only header + raw data) - SoundFormat(unsigned sample_rate, unsigned channels, unsigned sample_bits, bool is_signed, unsigned endianess, const QString &enc) + SoundFormat(unsigned sample_rate, unsigned channels, unsigned sample_bits, bool is_signed, unsigned endianess, const TQString &enc) : m_SampleRate(sample_rate), m_Channels(channels), m_SampleBits(sample_bits), m_IsSigned(is_signed), m_Endianess(endianess), m_Encoding(enc) {} SoundFormat(unsigned sample_rate, unsigned channels, unsigned sample_bits, bool is_signed, unsigned endianess) : m_SampleRate(sample_rate), m_Channels(channels), m_SampleBits(sample_bits), m_IsSigned(is_signed), m_Endianess(endianess), m_Encoding("raw") {} @@ -60,8 +60,8 @@ struct SoundFormat { int minValue() const; int maxValue() const; - void restoreConfig(const QString &prefix, KConfig *c); - void saveConfig(const QString &prefix, KConfig *c) const; + void restoreConfig(const TQString &prefix, KConfig *c); + void saveConfig(const TQString &prefix, KConfig *c) const; int convertSampleToInt(const char *sample, bool do_scale) const; void convertIntToSample(int src, char *dst, bool is_scaled) const; diff --git a/kradio3/src/include/soundstreamclient_interfaces.h b/kradio3/src/include/soundstreamclient_interfaces.h index a3de4ca..310d42a 100644 --- a/kradio3/src/include/soundstreamclient_interfaces.h +++ b/kradio3/src/include/soundstreamclient_interfaces.h @@ -31,7 +31,7 @@ #endif #include <kconfig.h> -#include <qmap.h> +#include <tqmap.h> #include "interfaces.h" #include "soundformat.h" @@ -58,20 +58,20 @@ public: virtual void noticeConnectedI(cmplInterface *i, bool valid); virtual void noticeDisconnectedI(cmplInterface *i, bool valid); - virtual QMap<QString, ISoundStreamClient *> getPlaybackClients() const; - virtual QMap<QString, QString> getPlaybackClientDescriptions() const; - virtual QMap<QString, ISoundStreamClient *> getCaptureClients() const; - virtual QMap<QString, QString> getCaptureClientDescriptions() const; - virtual ISoundStreamClient *getSoundStreamClientWithID(const QString &id) const; + virtual TQMap<TQString, ISoundStreamClient *> getPlaybackClients() const; + virtual TQMap<TQString, TQString> getPlaybackClientDescriptions() const; + virtual TQMap<TQString, ISoundStreamClient *> getCaptureClients() const; + virtual TQMap<TQString, TQString> getCaptureClientDescriptions() const; + virtual ISoundStreamClient *getSoundStreamClientWithID(const TQString &id) const; ANSWERS: - virtual QPtrList<ISoundStreamClient> getPlaybackMixers() const; - virtual QPtrList<ISoundStreamClient> getCaptureMixers() const; + virtual TQPtrList<ISoundStreamClient> getPlaybackMixers() const; + virtual TQPtrList<ISoundStreamClient> getCaptureMixers() const; SENDERS: - IF_SENDER_FINE ( notifyPlaybackChannelsChanged, (const QString &/*client_id*/, const QStringList &) ) - IF_SENDER_FINE ( notifyCaptureChannelsChanged, (const QString &/*client_id*/, const QStringList &) ) + IF_SENDER_FINE ( notifyPlaybackChannelsChanged, (const TQString &/*client_id*/, const TQStringList &) ) + IF_SENDER_FINE ( notifyCaptureChannelsChanged, (const TQString &/*client_id*/, const TQStringList &) ) IF_SENDER_FINE ( sendPlaybackVolume, (SoundStreamID /*id*/, float /*volume*/) ) IF_SENDER_FINE ( sendCaptureVolume, (SoundStreamID /*id*/, float /*volume*/) ) @@ -107,7 +107,7 @@ SENDERS: IF_SENDER_FINE ( queryIsMuted, (SoundStreamID /*id*/, bool &) ) - // sendPreparePlayback/sendPrepareCapture don't make sense for multiple receivers + // sendPreparePlayback/sendPrepareCapture don't make sense for multiple tqreceivers IF_SENDER_FINE ( sendReleasePlayback, (SoundStreamID id) ) IF_SENDER_FINE ( sendReleaseCapture, (SoundStreamID id) ) @@ -133,9 +133,9 @@ SENDERS: IF_SENDER_FINE ( sendStopRecording, (SoundStreamID id) ) IF_SENDER_FINE ( queryIsRecordingRunning, (SoundStreamID id, bool &running, SoundFormat &sf)) - IF_SENDER_FINE ( querySoundStreamDescription, (SoundStreamID id, QString &descr) ) + IF_SENDER_FINE ( querySoundStreamDescription, (SoundStreamID id, TQString &descr) ) IF_SENDER_FINE ( querySoundStreamRadioStation, (SoundStreamID id, const RadioStation *&rs)) - IF_SENDER_FINE ( queryEnumerateSoundStreams, (QMap<QString, SoundStreamID> &) ) + IF_SENDER_FINE ( queryEnumerateSoundStreams, (TQMap<TQString, SoundStreamID> &) ) IF_SENDER_FINE ( notifySoundStreamCreated, (SoundStreamID id) ) IF_SENDER_FINE ( notifySoundStreamClosed, (SoundStreamID id) ) @@ -171,8 +171,8 @@ public: // direct playback / capture device functions RECEIVERS: - IF_RECEIVER_EMPTY( preparePlayback(SoundStreamID /*id*/, const QString &/*channel*/, bool /*active_mode*/, bool /*start_immediately = false*/) ) - IF_RECEIVER_EMPTY( prepareCapture(SoundStreamID /*id*/, const QString &/*channel*/) ) + IF_RECEIVER_EMPTY( preparePlayback(SoundStreamID /*id*/, const TQString &/*channel*/, bool /*active_mode*/, bool /*start_immediately = false*/) ) + IF_RECEIVER_EMPTY( prepareCapture(SoundStreamID /*id*/, const TQString &/*channel*/) ) IF_RECEIVER_EMPTY( releasePlayback(SoundStreamID /*id*/) ) IF_RECEIVER_EMPTY( releaseCapture(SoundStreamID /*id*/) ) @@ -180,29 +180,29 @@ ANSWERS: virtual bool supportsPlayback() const { return false; } virtual bool supportsCapture() const { return false; } - virtual const QString &getSoundStreamClientID() const; - virtual QString getSoundStreamClientDescription() const { return QString::null; } + virtual const TQString &getSoundStreamClientID() const; + virtual TQString getSoundStreamClientDescription() const { return TQString(); } - virtual QMap<QString, ISoundStreamClient *> getPlaybackClients() const; - virtual QMap<QString, QString> getPlaybackClientDescriptions() const; - virtual QMap<QString, ISoundStreamClient *> getCaptureClients() const; - virtual QMap<QString, QString> getCaptureClientDescriptions() const; - virtual ISoundStreamClient *getSoundStreamClientWithID(const QString &id) const; + virtual TQMap<TQString, ISoundStreamClient *> getPlaybackClients() const; + virtual TQMap<TQString, TQString> getPlaybackClientDescriptions() const; + virtual TQMap<TQString, ISoundStreamClient *> getCaptureClients() const; + virtual TQMap<TQString, TQString> getCaptureClientDescriptions() const; + virtual ISoundStreamClient *getSoundStreamClientWithID(const TQString &id) const; // device mixer functions -QUERIES: - IF_QUERY ( QPtrList<ISoundStreamClient> queryPlaybackMixers() ); - IF_QUERY ( QPtrList<ISoundStreamClient> queryCaptureMixers() ); +TQUERIES: + IF_TQUERY ( TQPtrList<ISoundStreamClient> queryPlaybackMixers() ); + IF_TQUERY ( TQPtrList<ISoundStreamClient> queryCaptureMixers() ); ANSWERS: - virtual const QStringList &getPlaybackChannels() const; - virtual const QStringList &getCaptureChannels() const; + virtual const TQStringList &getPlaybackChannels() const; + virtual const TQStringList &getCaptureChannels() const; RECEIVERS: - IF_RECEIVER_EMPTY( noticePlaybackChannelsChanged(const QString & /*client_id*/, const QStringList &/*channels*/) ); - IF_RECEIVER_EMPTY( noticeCaptureChannelsChanged (const QString & /*client_id*/, const QStringList &/*channels*/) ); + IF_RECEIVER_EMPTY( noticePlaybackChannelsChanged(const TQString & /*client_id*/, const TQStringList &/*channels*/) ); + IF_RECEIVER_EMPTY( noticeCaptureChannelsChanged (const TQString & /*client_id*/, const TQStringList &/*channels*/) ); RECEIVERS: @@ -262,10 +262,10 @@ RECEIVERS: IF_RECEIVER_EMPTY( stopRecording(SoundStreamID /*id*/) ) IF_RECEIVER_EMPTY( isRecordingRunning(SoundStreamID /*id*/, bool &/*running*/, SoundFormat &/*sf*/) const ) - IF_RECEIVER_EMPTY( getSoundStreamDescription(SoundStreamID /*id*/, QString &/*descr*/) const ) + IF_RECEIVER_EMPTY( getSoundStreamDescription(SoundStreamID /*id*/, TQString &/*descr*/) const ) IF_RECEIVER_EMPTY( getSoundStreamRadioStation(SoundStreamID /*id*/, const RadioStation *&/*rs*/) const ) - IF_RECEIVER_EMPTY( enumerateSoundStreams(QMap<QString, SoundStreamID> &/*list*/) const ) + IF_RECEIVER_EMPTY( enumerateSoundStreams(TQMap<TQString, SoundStreamID> &/*list*/) const ) IF_RECEIVER_EMPTY( noticeSoundStreamCreated(SoundStreamID /*id*/) ) IF_RECEIVER_EMPTY( noticeSoundStreamClosed(SoundStreamID /*id*/) ) @@ -278,8 +278,8 @@ RECEIVERS: IF_RECEIVER_EMPTY( noticeReadyForPlaybackData(SoundStreamID /*id*/, size_t /*size*/) ) SENDERS: - CALL_SNDSTR_SERVER ( notifyPlaybackChannelsChanged, (const QString &client_id, const QStringList &map), (client_id, map) ) - CALL_SNDSTR_SERVER ( notifyCaptureChannelsChanged, (const QString &client_id, const QStringList &map), (client_id, map) ) + CALL_SNDSTR_SERVER ( notifyPlaybackChannelsChanged, (const TQString &client_id, const TQStringList &map), (client_id, map) ) + CALL_SNDSTR_SERVER ( notifyCaptureChannelsChanged, (const TQString &client_id, const TQStringList &map), (client_id, map) ) CALL_SNDSTR_SERVER ( sendPlaybackVolume, (SoundStreamID id, float volume), (id, volume) ) CALL_SNDSTR_SERVER ( sendCaptureVolume, (SoundStreamID id, float volume), (id, volume) ) @@ -315,7 +315,7 @@ SENDERS: CALL_SNDSTR_SERVER ( queryIsMuted, (SoundStreamID id, bool &v), (id, v) ) - // sendPreparePlayback/sendPrepareCapture don't make sense for multiple receivers + // sendPreparePlayback/sendPrepareCapture don't make sense for multiple tqreceivers CALL_SNDSTR_SERVER ( sendReleasePlayback, (SoundStreamID id), (id) ) CALL_SNDSTR_SERVER ( sendReleaseCapture, (SoundStreamID id), (id) ) @@ -339,10 +339,10 @@ SENDERS: CALL_SNDSTR_SERVER ( sendStopRecording, (SoundStreamID id), (id) ) CALL_SNDSTR_SERVER ( queryIsRecordingRunning, (SoundStreamID id, bool &b, SoundFormat &sf), (id, b, sf) ) - CALL_SNDSTR_SERVER ( querySoundStreamDescription, (SoundStreamID id, QString &descr), (id, descr) ) + CALL_SNDSTR_SERVER ( querySoundStreamDescription, (SoundStreamID id, TQString &descr), (id, descr) ) CALL_SNDSTR_SERVER ( querySoundStreamRadioStation,(SoundStreamID id, const RadioStation *&rs), (id, rs) ) - CALL_SNDSTR_SERVER ( queryEnumerateSoundStreams, (QMap<QString, SoundStreamID> &list), (list) ) + CALL_SNDSTR_SERVER ( queryEnumerateSoundStreams, (TQMap<TQString, SoundStreamID> &list), (list) ) CALL_SNDSTR_SERVER ( notifySoundStreamCreated, (SoundStreamID id), (id) ) CALL_SNDSTR_SERVER ( notifySoundStreamClosed, (SoundStreamID id), (id) ) @@ -360,10 +360,10 @@ protected: SoundStreamID createNewSoundStream(SoundStreamID old_id, bool notify = true) const; void closeSoundStream(SoundStreamID id, bool notify = true); - static QString createNewSoundStreamClientID(); - void setSoundStreamClientID(const QString &s); + static TQString createNewSoundStreamClientID(); + void setSoundStreamClientID(const TQString &s); - QString m_SoundStreamClientID; + TQString m_SoundStreamClientID; cmplInterface *m_Server; }; diff --git a/kradio3/src/include/soundstreamid.h b/kradio3/src/include/soundstreamid.h index e7aa4d5..4133103 100644 --- a/kradio3/src/include/soundstreamid.h +++ b/kradio3/src/include/soundstreamid.h @@ -44,7 +44,7 @@ public: bool HasSamePhysicalID(const SoundStreamID &x) const { return m_PhysicalID == x.m_PhysicalID; } bool isValid() const { return m_ID != 0; } // m_PhysicalID is not checked! - void invalidate(); + void tqinvalidate(); static const SoundStreamID InvalidID; diff --git a/kradio3/src/include/standardscandialog.h b/kradio3/src/include/standardscandialog.h index 475457b..bab8bf1 100644 --- a/kradio3/src/include/standardscandialog.h +++ b/kradio3/src/include/standardscandialog.h @@ -27,8 +27,8 @@ #include "radio_interfaces.h" #include "stationlist.h" -#include <qtimer.h> -#include <qdatetime.h> +#include <tqtimer.h> +#include <tqdatetime.h> class StandardScanDialog : public StandardScanDialogUI, public ISeekRadioClient, @@ -36,8 +36,9 @@ class StandardScanDialog : public StandardScanDialogUI, public IRadioClient { Q_OBJECT + TQ_OBJECT public: - StandardScanDialog(QWidget *parent); + StandardScanDialog(TQWidget *tqparent); ~StandardScanDialog(); bool connectI (Interface *i); @@ -75,7 +76,7 @@ RECEIVERS: bool noticePowerChanged(bool on); 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; } @@ -89,7 +90,7 @@ protected: bool m_running; bool m_oldPowerOn; RadioStation *m_oldStation; - QDateTime m_startTime; + TQDateTime m_startTime; StationList m_stations; diff --git a/kradio3/src/include/station-drag-object.h b/kradio3/src/include/station-drag-object.h index d65e7a6..5796dd0 100644 --- a/kradio3/src/include/station-drag-object.h +++ b/kradio3/src/include/station-drag-object.h @@ -18,21 +18,21 @@ #ifndef KRADIO_STATION_DRAG_OBJECT_H #define KRADIO_STATION_DRAG_OBJECT_H -#include <qdragobject.h> +#include <tqdragobject.h> -class StationDragObject : public QStoredDrag +class StationDragObject : public TQStoredDrag { public: - StationDragObject(const QStringList &stationIDs, QWidget *dragSource = NULL, const char * name = NULL); - StationDragObject(QWidget *dragSource = NULL, const char * name = NULL); + StationDragObject(const TQStringList &stationIDs, TQWidget *dragSource = NULL, const char * name = NULL); + StationDragObject(TQWidget *dragSource = NULL, const char * name = NULL); virtual ~StationDragObject(); const char *format(int i = 0) const; - void setStations(const QStringList &stationIDs); + void setStations(const TQStringList &stationIDs); - static bool canDecode (const QMimeSource *e); - static bool decode (const QMimeSource *e, QStringList &stationIDs); + static bool canDecode (const TQMimeSource *e); + static bool decode (const TQMimeSource *e, TQStringList &stationIDs); }; #endif diff --git a/kradio3/src/include/stationlist.h b/kradio3/src/include/stationlist.h index 70fbd32..5e259e7 100644 --- a/kradio3/src/include/stationlist.h +++ b/kradio3/src/include/stationlist.h @@ -25,7 +25,7 @@ #include "stationlistmetadata.h" #include "errorlog-interfaces.h" -#include <qptrlist.h> +#include <tqptrlist.h> class RadioStation; class KURL; @@ -42,7 +42,7 @@ class KURL; take place very often and thus are not critical. - Why don't we use QValueList then? + Why don't we use TQValueList then? We are using polymorphic radio stations, thus we cannot use a template using instances of a base class and copying them with a copy constructor. @@ -52,12 +52,12 @@ class KURL; */ -class RawStationList : public QPtrList<RadioStation> +class RawStationList : public TQPtrList<RadioStation> { public: - typedef QPtrListIterator<RadioStation> Iterator; - typedef QPtrList<RadioStation> BaseClass; + typedef TQPtrListIterator<RadioStation> Iterator; + typedef TQPtrList<RadioStation> BaseClass; public: RawStationList (); @@ -72,24 +72,24 @@ public: void inSort (const RadioStation *item); void prepend (const RadioStation *item); void append (const RadioStation *item); - bool replace (uint index, const RadioStation *item); + bool tqreplace (uint index, const RadioStation *item); // simplify stationIDSearch - const RadioStation & stationWithID(const QString &sid) const; - RadioStation & stationWithID(const QString &sid); + const RadioStation & stationWithID(const TQString &sid) const; + RadioStation & stationWithID(const TQString &sid); - int idxWithID(const QString &sid) const; + int idxWithID(const TQString &sid) const; bool operator == (const RawStationList &l) const; bool operator != (const RawStationList &l) const { return !operator==(l); } protected: - QPtrCollection::Item newItem (QPtrCollection::Item s); - void deleteItem (QPtrCollection::Item s); + TQPtrCollection::Item newItem (TQPtrCollection::Item s); + void deleteItem (TQPtrCollection::Item s); - int compareItems (QPtrCollection::Item a, QPtrCollection::Item b); + int compareItems (TQPtrCollection::Item a, TQPtrCollection::Item b); }; @@ -112,8 +112,8 @@ public: const RadioStation & at(int idx) const; RadioStation & at(int idx); - const RadioStation & stationWithID(const QString &sid) const; - RadioStation & stationWithID(const QString &sid); + const RadioStation & stationWithID(const TQString &sid) const; + RadioStation & stationWithID(const TQString &sid); // all stations, with full access RawStationList & all() { return m_all; } @@ -123,7 +123,7 @@ public: StationListMetaData & metaData() { return m_metaData; } StationListMetaData const & metaData() const { return m_metaData; } - // we do not need a special matchingStation/find/... method because + // we do not need a special matchingStation/tqfind/... method because // it is already implemented in RawStationList /** @@ -138,10 +138,10 @@ public: // xml in/out - bool readXML (const QString &dat, const IErrorLogClient &logger, bool enableMessageBox = true); + bool readXML (const TQString &dat, const IErrorLogClient &logger, bool enableMessageBox = true); bool readXML (const KURL &url, const IErrorLogClient &logger, bool enableMessageBox = true); - QString writeXML (const IErrorLogClient &logger) const; + TQString writeXML (const IErrorLogClient &logger) const; bool writeXML (const KURL &url, const IErrorLogClient &logger, bool enableMessageBox = true) const; diff --git a/kradio3/src/include/stationlistmetadata.h b/kradio3/src/include/stationlistmetadata.h index 36adb29..00f54f3 100644 --- a/kradio3/src/include/stationlistmetadata.h +++ b/kradio3/src/include/stationlistmetadata.h @@ -24,8 +24,8 @@ #include <config.h> #endif -#include <qstring.h> -#include <qdatetime.h> +#include <tqstring.h> +#include <tqdatetime.h> /** * Meta Data about a stationlist @@ -34,12 +34,12 @@ class StationListMetaData { public: - QString maintainer; - QDateTime lastChange; - QString country; - QString city; - QString media; - QString comment; + TQString maintainer; + TQDateTime lastChange; + TQString country; + TQString city; + TQString media; + TQString comment; bool operator != (const StationListMetaData &x) const { return !operator ==(x); } bool operator == (const StationListMetaData &x) const { diff --git a/kradio3/src/include/stationlistxmlhandler.h b/kradio3/src/include/stationlistxmlhandler.h index 7386933..dccd697 100644 --- a/kradio3/src/include/stationlistxmlhandler.h +++ b/kradio3/src/include/stationlistxmlhandler.h @@ -21,16 +21,16 @@ #include <config.h> #endif -#include <qxml.h> -#include <qobject.h> +#include <tqxml.h> +#include <tqobject.h> #include "radiostation.h" #include "stationlist.h" -class StationListXmlHandler : public QXmlDefaultHandler +class StationListXmlHandler : public TQXmlDefaultHandler { protected: - QStringList m_status; + TQStringList m_status; const IErrorLogClient&m_logger; RawStationList m_stations; @@ -44,11 +44,11 @@ public : StationListXmlHandler (const IErrorLogClient &logger); virtual ~StationListXmlHandler (); bool startDocument (); - bool startElement (const QString &ns, const QString &localname, - const QString& qname, const QXmlAttributes &); - bool endElement (const QString &ns, const QString &localname, - const QString &qname); - bool characters (const QString &ch); + bool startElement (const TQString &ns, const TQString &localname, + const TQString& qname, const TQXmlAttributes &); + bool endElement (const TQString &ns, const TQString &localname, + const TQString &qname); + bool characters (const TQString &ch); const RawStationList &getStations() const { return m_stations; } const StationListMetaData &getMetaData() const { return m_metaData; } diff --git a/kradio3/src/include/stationselection_interfaces.h b/kradio3/src/include/stationselection_interfaces.h index a571147..3d24eee 100644 --- a/kradio3/src/include/stationselection_interfaces.h +++ b/kradio3/src/include/stationselection_interfaces.h @@ -24,7 +24,7 @@ #include "interfaces.h" -class QStringList; +class TQStringList; INTERFACE(IStationSelection, IStationSelectionClient) { @@ -32,13 +32,13 @@ public : IF_CON_DESTRUCTOR(IStationSelection, -1) RECEIVERS: - IF_RECEIVER( setStationSelection(const QStringList &sl) ) + IF_RECEIVER( setStationSelection(const TQStringList &sl) ) SENDERS: - IF_SENDER ( notifyStationSelectionChanged(const QStringList &sl) ) + IF_SENDER ( notifyStationSelectionChanged(const TQStringList &sl) ) ANSWERS: - IF_ANSWER ( const QStringList & getStationSelection () const ) + IF_ANSWER ( const TQStringList & getStationSelection () const ) }; @@ -49,13 +49,13 @@ public : IF_CON_DESTRUCTOR(IStationSelectionClient, 1) SENDERS: - IF_SENDER ( sendStationSelection(const QStringList &sl) ) + IF_SENDER ( sendStationSelection(const TQStringList &sl) ) RECEIVERS: - IF_RECEIVER( noticeStationSelectionChanged(const QStringList &sl) ) + IF_RECEIVER( noticeStationSelectionChanged(const TQStringList &sl) ) -QUERIES: - IF_QUERY ( const QStringList & queryStationSelection () ) +TQUERIES: + IF_TQUERY ( const TQStringList & queryStationSelection () ) RECEIVERS: diff --git a/kradio3/src/include/stationselector.h b/kradio3/src/include/stationselector.h index 6842877..432b870 100644 --- a/kradio3/src/include/stationselector.h +++ b/kradio3/src/include/stationselector.h @@ -22,7 +22,7 @@ #include <config.h> #endif -#include <qstringlist.h> +#include <tqstringlist.h> #include "radio_interfaces.h" #include "stationselection_interfaces.h" @@ -39,8 +39,9 @@ class StationSelector : public StationSelectorUI, public IStationSelectionClient { Q_OBJECT + TQ_OBJECT public : - StationSelector (QWidget *parent); + StationSelector (TQWidget *tqparent); ~StationSelector (); bool connectI (Interface *i); @@ -48,14 +49,14 @@ public : // IStationSelectionClient - bool noticeStationSelectionChanged(const QStringList &sl); + bool noticeStationSelectionChanged(const TQStringList &sl); // IRadioClient bool noticePowerChanged(bool /*on*/) { return false; } bool noticeStationChanged (const RadioStation &, int /*idx*/) { return false; } bool noticeStationsChanged(const StationList &sl); - bool noticePresetFileChanged(const QString &/*f*/) { return false; } + bool noticePresetFileChanged(const TQString &/*f*/) { return false; } bool noticeCurrentSoundStreamIDChanged(SoundStreamID) { return false; } @@ -68,8 +69,8 @@ protected slots: void slotButtonToLeft(); void slotButtonToRight(); - void slotMoveToRight(const QStringList &list); - void slotMoveToLeft(const QStringList &list); + void slotMoveToRight(const TQStringList &list); + void slotMoveToLeft(const TQStringList &list); void slotOK(); void slotCancel(); @@ -81,14 +82,14 @@ signals: protected: - void moveItem (RadioStationListView *fromListView, QStringList &fromIDList, - QListViewItem *item, int fromIdx, - RadioStationListView *toListView, QStringList &toIDList); + void moveItem (RadioStationListView *fromListView, TQStringList &fromIDList, + TQListViewItem *item, int fromIdx, + RadioStationListView *toListView, TQStringList &toIDList); void updateListViews(); // station ids - QStringList m_stationIDsAvailable, + TQStringList m_stationIDsAvailable, m_stationIDsSelected, m_stationIDsNotDisplayed, m_stationIDsAll; diff --git a/kradio3/src/include/timecontrol_interfaces.h b/kradio3/src/include/timecontrol_interfaces.h index ad743a4..10b114c 100644 --- a/kradio3/src/include/timecontrol_interfaces.h +++ b/kradio3/src/include/timecontrol_interfaces.h @@ -50,18 +50,18 @@ SENDERS: IF_SENDER ( notifyAlarmsChanged(const AlarmVector &sl) ) IF_SENDER ( notifyAlarm(const Alarm &) ) IF_SENDER ( notifyNextAlarmChanged(const Alarm *) ) - IF_SENDER ( notifyCountdownStarted(const QDateTime &end) ) + IF_SENDER ( notifyCountdownStarted(const TQDateTime &end) ) IF_SENDER ( notifyCountdownStopped() ) IF_SENDER ( notifyCountdownZero() ) IF_SENDER ( notifyCountdownSecondsChanged(int n) ) ANSWERS: - IF_ANSWER ( QDateTime getNextAlarmTime () const ) + IF_ANSWER ( TQDateTime getNextAlarmTime () const ) IF_ANSWER ( const Alarm* getNextAlarm () const ) IF_ANSWER ( const AlarmVector & getAlarms () const ) IF_ANSWER ( int getCountdownSeconds () const ) - IF_ANSWER ( QDateTime getCountdownEnd () const ) + IF_ANSWER ( TQDateTime getCountdownEnd () const ) }; @@ -82,18 +82,18 @@ RECEIVERS: IF_RECEIVER( noticeAlarmsChanged(const AlarmVector &sl) ) IF_RECEIVER( noticeAlarm(const Alarm &) ) IF_RECEIVER( noticeNextAlarmChanged(const Alarm *) ) - IF_RECEIVER( noticeCountdownStarted(const QDateTime &end) ) + IF_RECEIVER( noticeCountdownStarted(const TQDateTime &end) ) IF_RECEIVER( noticeCountdownStopped() ) IF_RECEIVER( noticeCountdownZero() ) IF_RECEIVER( noticeCountdownSecondsChanged(int n) ) -QUERIES: - IF_QUERY ( QDateTime queryNextAlarmTime() ) - IF_QUERY ( const Alarm* queryNextAlarm () ) - IF_QUERY ( const AlarmVector & queryAlarms () ) - IF_QUERY ( int queryCountdownSeconds () ) - IF_QUERY ( QDateTime queryCountdownEnd () ) +TQUERIES: + IF_TQUERY ( TQDateTime queryNextAlarmTime() ) + IF_TQUERY ( const Alarm* queryNextAlarm () ) + IF_TQUERY ( const AlarmVector & queryAlarms () ) + IF_TQUERY ( int queryCountdownSeconds () ) + IF_TQUERY ( TQDateTime queryCountdownEnd () ) RECEIVERS: virtual void noticeConnectedI (cmplInterface *, bool /*pointer_valid*/); diff --git a/kradio3/src/include/utils.h b/kradio3/src/include/utils.h index 4e93293..037a2e3 100644 --- a/kradio3/src/include/utils.h +++ b/kradio3/src/include/utils.h @@ -27,19 +27,19 @@ using namespace std; #include <kconfig.h> #include <klocale.h> #include <kdebug.h> -#include <qstring.h> +#include <tqstring.h> #define __USE_ISOC99 1 #include <math.h> //extern const char *mixerChannelLabels[]; //extern const char *mixerChannelNames[]; -extern QString XMLEscape (const QString &s); -QString xmlOpenTag (const QString &tag, bool newline = true); -QString xmlTag (const QString &tag, const QString &s, bool newline = true); -QString xmlTag (const QString &tag, int i, bool newline = true); -QString xmlTag (const QString &tag, float f, bool newline = true); -QString xmlCloseTag (const QString &tag, bool newline = true); +extern TQString XMLEscape (const TQString &s); +TQString xmlOpenTag (const TQString &tag, bool newline = true); +TQString xmlTag (const TQString &tag, const TQString &s, bool newline = true); +TQString xmlTag (const TQString &tag, int i, bool newline = true); +TQString xmlTag (const TQString &tag, float f, bool newline = true); +TQString xmlCloseTag (const TQString &tag, bool newline = true); template<class T1, class T2> inline T1 min (T1 a, T2 b) { return a < b ? a : b; } template<class T1, class T2> inline T1 max (T1 a, T2 b) { return a < b ? b : a; } diff --git a/kradio3/src/include/widgetplugins.h b/kradio3/src/include/widgetplugins.h index c138df3..c3339c4 100644 --- a/kradio3/src/include/widgetplugins.h +++ b/kradio3/src/include/widgetplugins.h @@ -24,23 +24,23 @@ #include "plugins.h" -class QWidget; +class TQWidget; class WidgetPluginBase : public PluginBase { public : - WidgetPluginBase(const QString &name, const QString &description); + WidgetPluginBase(const TQString &name, const TQString &description); virtual void saveState (KConfig *) const; virtual void restoreState (KConfig *); virtual void restoreState (KConfig *, bool showByDefault); virtual void startPlugin(); - virtual QWidget *getWidget() = 0; - virtual const QWidget *getWidget() const = 0; + virtual TQWidget *getWidget() = 0; + virtual const TQWidget *getWidget() const = 0; - virtual bool isReallyVisible(const QWidget *w = NULL) const; - virtual bool isAnywhereVisible(const QWidget *w = NULL) const; + virtual bool isReallyVisible(const TQWidget *w = NULL) const; + virtual bool isAnywhereVisible(const TQWidget *w = NULL) const; virtual void showOnOrgDesktop () = 0; protected: @@ -50,12 +50,12 @@ protected: virtual void pHide (); virtual void pToggleShown (); - virtual void pShowEvent(QShowEvent *); - virtual void pHideEvent(QHideEvent *); + virtual void pShowEvent(TQShowEvent *); + virtual void pHideEvent(TQHideEvent *); virtual void notifyManager(bool shown); - virtual void getKWinState(const QWidget *w = NULL) const; + virtual void getKWinState(const TQWidget *w = NULL) const; protected: // temporary data @@ -64,7 +64,7 @@ protected: mutable bool m_saveMaximized; mutable bool m_saveSticky; mutable int m_saveDesktop; - mutable QRect m_saveGeometry; + mutable TQRect m_saveGeometry; bool m_geoRestoreFlag; bool m_restoreShow; diff --git a/kradio3/src/internetradiostation.cpp b/kradio3/src/internetradiostation.cpp index f3e5029..6bec8d2 100644 --- a/kradio3/src/internetradiostation.cpp +++ b/kradio3/src/internetradiostation.cpp @@ -39,8 +39,8 @@ InternetRadioStation::InternetRadioStation(const KURL &url) { } -InternetRadioStation::InternetRadioStation(const QString &name, - const QString &shortName, +InternetRadioStation::InternetRadioStation(const TQString &name, + const TQString &shortName, const KURL &url) : RadioStation(name, shortName), m_url(url) @@ -54,7 +54,7 @@ InternetRadioStation::InternetRadioStation(const InternetRadioStation &s) } -InternetRadioStation::InternetRadioStation(RegisterStationClass, const QString &classname) +InternetRadioStation::InternetRadioStation(RegisterStationClass, const TQString &classname) : RadioStation(registerStationClass, !classname.isNull() ? classname : getClassName()), m_url() { @@ -91,8 +91,8 @@ int InternetRadioStation::compare(const RadioStation &_s) const if (!s) return (typeid(this).name() > typeid(&_s).name()) ? 1 : -1; - QString thisurl = m_url.url(-1); // -1: remove trailing '/' - QString thaturl = s->m_url.url(-1); + TQString thisurl = m_url.url(-1); // -1: remove trailing '/' + TQString thaturl = s->m_url.url(-1); // empty urls are never identical if (thisurl.length () == 0) @@ -111,11 +111,11 @@ bool InternetRadioStation::isValid() const return !m_url.isEmpty(); } -QString InternetRadioStation::longName() const +TQString InternetRadioStation::longName() const { - QString longN = name(); + TQString longN = name(); if (!longN.isEmpty()) { - longN = i18n("%1, %2").arg(longN).arg(description()); + longN = i18n("%1, %2").tqarg(longN).tqarg(description()); } else { longN = description(); } @@ -124,13 +124,13 @@ QString InternetRadioStation::longName() const } -QString InternetRadioStation::description() const +TQString InternetRadioStation::description() const { return m_url.url(); } -bool InternetRadioStation::setProperty(const QString &pn, const QString &val) +bool InternetRadioStation::setProperty(const TQString &pn, const TQString &val) { bool retval = false; if (pn == StationUrlElement) { @@ -142,7 +142,7 @@ bool InternetRadioStation::setProperty(const QString &pn, const QString &val) return retval; } -QString InternetRadioStation::getProperty(const QString &pn) const +TQString InternetRadioStation::getProperty(const TQString &pn) const { if (pn == StationUrlElement) { return m_url.url(); @@ -151,9 +151,9 @@ QString InternetRadioStation::getProperty(const QString &pn) const } } -QStringList InternetRadioStation::getPropertyNames() const +TQStringList InternetRadioStation::getPropertyNames() const { - QStringList l = RadioStation::getPropertyNames(); + TQStringList l = RadioStation::getPropertyNames(); l.push_back(StationUrlElement); return l; } diff --git a/kradio3/src/kradioapp.cpp b/kradio3/src/kradioapp.cpp index 0f2dca6..6937bcf 100644 --- a/kradio3/src/kradioapp.cpp +++ b/kradio3/src/kradioapp.cpp @@ -85,7 +85,7 @@ AboutPageInfo KRadioAbout::createAboutPage () ///////////////////////////////////////////////////////////////////////////// //// PluginLibraryInfo -PluginLibraryInfo::PluginLibraryInfo (const QString &lib_name) +PluginLibraryInfo::PluginLibraryInfo (const TQString &lib_name) : library (NULL), init_func(NULL), info_func(NULL), @@ -104,7 +104,7 @@ PluginLibraryInfo::PluginLibraryInfo (const QString &lib_name) } else { KMessageBox::error(NULL, i18n("Library %1: Plugin Entry Point is missing\n") - .arg(lib_name), + .tqarg(lib_name), i18n("Plugin Library Load Error")); library->unload(); info_func = NULL; @@ -114,8 +114,8 @@ PluginLibraryInfo::PluginLibraryInfo (const QString &lib_name) } else { KMessageBox::error(NULL, i18n("Library %1: \n%2") - .arg(lib_name) - .arg(KLibLoader::self()->lastErrorMessage()), + .tqarg(lib_name) + .tqarg(KLibLoader::self()->lastErrorMessage()), i18n("Plugin Library Load Error")); } } @@ -129,7 +129,7 @@ KRadioApp::KRadioApp() m_quitting(false) { m_Instances.setAutoDelete(true); - connect(this, SIGNAL(aboutToQuit()), this, SLOT(slotAboutToQuit())); + connect(this, TQT_SIGNAL(aboutToQuit()), this, TQT_SLOT(slotAboutToQuit())); } @@ -150,19 +150,19 @@ void KRadioApp::saveState (KConfig *c) c->writeEntry("instances", m_Instances.count()); int i = 0; - QDictIterator<PluginManager> it(m_Instances); + TQDictIterator<PluginManager> it(m_Instances); for (; it.current(); ++it, ++i) { c->setGroup("Global"); - c->writeEntry("instance_name_" + QString::number(i), it.currentKey()); + c->writeEntry("instance_name_" + TQString::number(i), it.currentKey()); it.current()->saveState(c); } c->setGroup("Plugin Libraries"); c->writeEntry("count", m_PluginLibraries.count()); int idx = 0; - QMapConstIterator<QString, PluginLibraryInfo> end = m_PluginLibraries.end(); - for (QMapConstIterator<QString, PluginLibraryInfo> it = m_PluginLibraries.begin(); it != end; ++it, ++idx) { - c->writeEntry("library_" + QString::number(idx), it.key()); + TQMapConstIterator<TQString, PluginLibraryInfo> end = m_PluginLibraries.end(); + for (TQMapConstIterator<TQString, PluginLibraryInfo> it = m_PluginLibraries.begin(); it != end; ++it, ++idx) { + c->writeEntry("library_" + TQString::number(idx), it.key()); } c->sync(); @@ -179,12 +179,12 @@ void KRadioApp::restoreState (KConfig *c) // KProgressDialog *progress = new KProgressDialog(NULL, NULL, i18n("Loading Plugin Libraries")); // progress->setMinimumWidth(400); // progress->setAllowCancel(false); -// progress->QWidget::setCaption(i18n("KRadio - Loading Plugin Libraries")); +// progress->TQWidget::setCaption(i18n("KRadio - Loading Plugin Libraries")); // progress->show(); /* progress->progressBar()->setTotalSteps(n_libs);*/ for (int idx = 0; idx < n_libs; ++idx) { - QString lib = c->readEntry("library_" + QString::number(idx), QString::null); + TQString lib = c->readEntry("library_" + TQString::number(idx), TQString()); if (lib.length()) { LoadLibrary(lib); // progress->progressBar()->setProgress(idx+1); @@ -192,12 +192,12 @@ void KRadioApp::restoreState (KConfig *c) } if (n_libs < 6) { // this seems to be a meaningful minimum value for a working kradio setup - QStringList libs + TQStringList libs = KGlobal::dirs()->findAllResources("lib", "kradio/plugins/*.so"); - QValueListIterator<QString> end = libs.end(); + TQValueListIterator<TQString> end = libs.end(); int idx = 0; // progress->progressBar()->setTotalSteps(libs.count()); - for (QValueListIterator<QString> it = libs.begin(); it != end; ++it, ++idx) { + for (TQValueListIterator<TQString> it = libs.begin(); it != end; ++it, ++idx) { LoadLibrary(*it); // progress->progressBar()->setProgress(idx+1); } @@ -217,20 +217,20 @@ void KRadioApp::restoreState (KConfig *c) for (int i = 0; i < n; ++i) { c->setGroup("Global"); - QString name = c->readEntry("instance_name_" + QString::number(i), - n > 1 ? (i18n("Instance") + " " + QString::number(i+1)) : QString("")); + TQString name = c->readEntry("instance_name_" + TQString::number(i), + n > 1 ? (i18n("Instance") + " " + TQString::number(i+1)) : TQString("")); createNewInstance(name)->restoreState(c); } } -PluginManager *KRadioApp::createNewInstance(const QString &_name) +PluginManager *KRadioApp::createNewInstance(const TQString &_name) { BlockProfiler profiler("KRadioApp::createNewInstance"); - QString instance_name = _name; - QString title_ext = ""; - QString id = QString::number(m_Instances.count()+1); + TQString instance_name = _name; + TQString title_ext = ""; + TQString id = TQString::number(m_Instances.count()+1); if (instance_name.length() == 0) { instance_name = "Instance " + id; } @@ -253,7 +253,7 @@ PluginManager *KRadioApp::createNewInstance(const QString &_name) } -KLibrary *KRadioApp::LoadLibrary (const QString &library) +KLibrary *KRadioApp::LoadLibrary (const TQString &library) { BlockProfiler profiler("KRadioApp::LoadLibrary"); BlockProfiler libprofiler("KRadioApp::LoadLibrary - " + library); @@ -261,19 +261,19 @@ KLibrary *KRadioApp::LoadLibrary (const QString &library) PluginLibraryInfo libinfo(library); if (libinfo.valid()) { m_PluginLibraries.insert(library, libinfo); - QMapConstIterator<QString,QString> end = libinfo.plugins.end(); - for (QMapConstIterator<QString,QString> it = libinfo.plugins.begin(); it != end; ++it) { + TQMapConstIterator<TQString,TQString> end = libinfo.plugins.end(); + for (TQMapConstIterator<TQString,TQString> it = libinfo.plugins.begin(); it != end; ++it) { m_PluginInfos.insert(it.key(), PluginClassInfo (it.key(), *it, libinfo.init_func)); } } else { - kdDebug() << QDateTime::currentDateTime().toString(Qt::ISODate) + kdDebug() << TQDateTime::tqcurrentDateTime().toString(Qt::ISODate) << " " << i18n("Error: Loading Library %1 failed: %2") - .arg(library).arg(KLibLoader::self()->lastErrorMessage()) + .tqarg(library).tqarg(KLibLoader::self()->lastErrorMessage()) << endl; } - for (QDictIterator<PluginManager> it_managers(m_Instances); it_managers.current(); ++it_managers) { + for (TQDictIterator<PluginManager> it_managers(m_Instances); it_managers.current(); ++it_managers) { it_managers.current()->noticeLibrariesChanged(); } @@ -281,16 +281,16 @@ KLibrary *KRadioApp::LoadLibrary (const QString &library) } -void KRadioApp::UnloadLibrary (const QString &library) +void KRadioApp::UnloadLibrary (const TQString &library) { - if (!m_PluginLibraries.contains(library)) + if (!m_PluginLibraries.tqcontains(library)) return; PluginLibraryInfo info = m_PluginLibraries[library]; - QMapConstIterator<QString, QString> end_classes = info.plugins.end(); - for (QMapConstIterator<QString, QString> it_classes = info.plugins.begin(); it_classes != end_classes; ++it_classes) { - for (QDictIterator<PluginManager> it_managers(m_Instances); it_managers.current(); ++it_managers) { + TQMapConstIterator<TQString, TQString> end_classes = info.plugins.end(); + for (TQMapConstIterator<TQString, TQString> it_classes = info.plugins.begin(); it_classes != end_classes; ++it_classes) { + for (TQDictIterator<PluginManager> it_managers(m_Instances); it_managers.current(); ++it_managers) { it_managers.current()->unloadPlugins(it_classes.key()); } m_PluginInfos.remove(it_classes.key()); @@ -300,13 +300,13 @@ void KRadioApp::UnloadLibrary (const QString &library) info.libunload_func(); info.library->unload(); - for (QDictIterator<PluginManager> it_managers(m_Instances); it_managers.current(); ++it_managers) { + for (TQDictIterator<PluginManager> it_managers(m_Instances); it_managers.current(); ++it_managers) { it_managers.current()->noticeLibrariesChanged(); } } -PluginBase *KRadioApp::CreatePlugin (PluginManager *manager, const QString &class_name, const QString &object_name) +PluginBase *KRadioApp::CreatePlugin (PluginManager *manager, const TQString &class_name, const TQString &object_name) { BlockProfiler all_profiler ("KRadioApp::CreatePlugin"); BlockProfiler class_profiler("KRadioApp::CreatePlugin - " + class_name); @@ -314,18 +314,18 @@ PluginBase *KRadioApp::CreatePlugin (PluginManager *manager, const QString &clas BlockProfiler create_profiler("KRadioApp::CreatePlugin - create"); PluginBase *retval = NULL; - if (m_PluginInfos.contains(class_name)) { + if (m_PluginInfos.tqcontains(class_name)) { retval = m_PluginInfos[class_name].CreateInstance(object_name); if (!retval) { - kdDebug() << QDateTime::currentDateTime().toString(Qt::ISODate) + kdDebug() << TQDateTime::tqcurrentDateTime().toString(Qt::ISODate) << " " - << i18n("Error: Creation of instance \"%1\" of class %2 falied.").arg(object_name).arg(class_name) + << i18n("Error: Creation of instance \"%1\" of class %2 falied.").tqarg(object_name).tqarg(class_name) << endl; } } else { - kdDebug() << QDateTime::currentDateTime().toString(Qt::ISODate) + kdDebug() << TQDateTime::tqcurrentDateTime().toString(Qt::ISODate) << " " - << i18n("Error: Cannot create instance \"%1\" of unknown class %2.").arg(object_name).arg(class_name) + << i18n("Error: Cannot create instance \"%1\" of unknown class %2.").tqarg(object_name).tqarg(class_name) << endl; } @@ -346,7 +346,7 @@ PluginBase *KRadioApp::CreatePlugin (PluginManager *manager, const QString &clas void KRadioApp::startPlugins() { - QDictIterator<PluginManager> it(m_Instances); + TQDictIterator<PluginManager> it(m_Instances); for (; it.current(); ++it) { it.current()->startPlugins(); } @@ -359,7 +359,7 @@ void KRadioApp::slotAboutToQuit() IErrorLogClient::staticLogDebug("slotAboutToQuit, m_quitting = false"); m_quitting = true; saveState(); - QDictIterator<PluginManager> it(m_Instances); + TQDictIterator<PluginManager> it(m_Instances); for (; it.current(); ++it) { it.current()->aboutToQuit(); } diff --git a/kradio3/src/multibuffer.cpp b/kradio3/src/multibuffer.cpp index 5ed4bd0..07eb74b 100644 --- a/kradio3/src/multibuffer.cpp +++ b/kradio3/src/multibuffer.cpp @@ -25,7 +25,7 @@ MultiBuffer::MultiBuffer(size_t n_buffers, size_t buffersize) m_currentReadBuffer(m_nBuffers-1), // during wait4read, this will be incremented to 0 m_currentWriteBuffer(0), m_readLock(n_buffers), - m_errorString(QString::null), + m_errorString(TQString()), m_error(false) { m_readLock += m_nBuffers; @@ -68,7 +68,7 @@ char *MultiBuffer::lockWriteBuffer(size_t &bufferSize) bufferSize = bytesAvailable; return m_buffers[m_currentWriteBuffer] + m_buffersFill[m_currentWriteBuffer]; } -/* QString tmp; +/* TQString tmp; IErrorLogClient::staticLogDebug(tmp.sprintf("current input buffer: %li", m_currentInputBuffer)); IErrorLogClient::staticLogDebug(tmp.sprintf("inputAvailableLock: %i", m_inputAvailableLock.available())); for (size_t i = 0; i < m_config.m_EncodeBufferCount; ++i) { @@ -127,5 +127,5 @@ char *MultiBuffer::getCurrentReadBuffer(size_t &buffer_fill) const void MultiBuffer::resetError() { m_error = false; - m_errorString = QString::null; + m_errorString = TQString(); } diff --git a/kradio3/src/plugin_configuration_dialog.cpp b/kradio3/src/plugin_configuration_dialog.cpp index d5f4568..a20edfd 100644 --- a/kradio3/src/plugin_configuration_dialog.cpp +++ b/kradio3/src/plugin_configuration_dialog.cpp @@ -20,12 +20,12 @@ #include <klocale.h> PluginConfigurationDialog::PluginConfigurationDialog( - int dialogFace, const QString &caption, + int dialogFace, const TQString &caption, int buttonMask, ButtonCode defaultButton, - QWidget *parent, const char *name, + TQWidget *tqparent, const char *name, bool modal, bool separator) : KDialogBase(dialogFace, caption, buttonMask, defaultButton, - parent, name, modal, separator), + tqparent, name, modal, separator), WidgetPluginBase (name, i18n("Configuration Dialog")), m_Caption(caption) { @@ -36,13 +36,13 @@ PluginConfigurationDialog::PluginConfigurationDialog( void PluginConfigurationDialog::saveState (KConfig *c) const { - c->setGroup(QString("config-dialog-") + WidgetPluginBase::name()); + c->setGroup(TQString("config-dialog-") + WidgetPluginBase::name()); WidgetPluginBase::saveState(c); } void PluginConfigurationDialog::restoreState (KConfig *c) { - c->setGroup(QString("config-dialog-") + WidgetPluginBase::name()); + c->setGroup(TQString("config-dialog-") + WidgetPluginBase::name()); WidgetPluginBase::restoreState(c, true); } @@ -82,17 +82,17 @@ void PluginConfigurationDialog::hide() } -// QWidget overrides +// TQWidget overrides -void PluginConfigurationDialog::showEvent(QShowEvent *e) +void PluginConfigurationDialog::showEvent(TQShowEvent *e) { KDialogBase::showEvent(e); - QWidget::setCaption(m_Caption); + TQWidget::setCaption(m_Caption); WidgetPluginBase::pShowEvent(e); } -void PluginConfigurationDialog::hideEvent(QHideEvent *e) +void PluginConfigurationDialog::hideEvent(TQHideEvent *e) { KDialogBase::hideEvent(e); WidgetPluginBase::pHideEvent(e); diff --git a/kradio3/src/pluginmanager-configuration-ui.ui b/kradio3/src/pluginmanager-configuration-ui.ui index ce481e3..12c4824 100644 --- a/kradio3/src/pluginmanager-configuration-ui.ui +++ b/kradio3/src/pluginmanager-configuration-ui.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>PluginManagerConfigurationUI</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>PluginManagerConfigurationUI</cstring> </property> @@ -22,7 +22,7 @@ <property name="margin"> <number>11</number> </property> - <widget class="QCheckBox" row="6" column="0"> + <widget class="TQCheckBox" row="6" column="0"> <property name="name"> <cstring>cbShowProgressBar</cstring> </property> @@ -47,7 +47,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QGroupBox" row="4" column="0"> + <widget class="TQGroupBox" row="4" column="0"> <property name="name"> <cstring>groupBox4</cstring> </property> @@ -126,7 +126,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>87</height> @@ -137,7 +137,7 @@ <property name="name"> <cstring>btnRemovePluginInstance</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>24</width> <height>24</height> @@ -169,7 +169,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QGroupBox" row="2" column="0"> + <widget class="TQGroupBox" row="2" column="0"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -196,7 +196,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>55</height> @@ -207,7 +207,7 @@ <property name="name"> <cstring>btnNewPluginInstance</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>24</width> <height>24</height> @@ -272,7 +272,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -301,7 +301,7 @@ <property name="name"> <cstring>btnRemoveLibrary</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>24</width> <height>24</height> @@ -321,7 +321,7 @@ <property name="name"> <cstring>btnAddLibrary</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>24</width> <height>24</height> @@ -363,7 +363,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>61</height> @@ -380,7 +380,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>kpushbutton.h</includehint> diff --git a/kradio3/src/pluginmanager-configuration.cpp b/kradio3/src/pluginmanager-configuration.cpp index f589ecb..2852e61 100644 --- a/kradio3/src/pluginmanager-configuration.cpp +++ b/kradio3/src/pluginmanager-configuration.cpp @@ -26,10 +26,10 @@ #include <kurlrequester.h> #include <kinputdialog.h> -#include <qcheckbox.h> +#include <tqcheckbox.h> -PluginManagerConfiguration::PluginManagerConfiguration(QWidget *parent, KRadioApp *app, PluginManager *pm) - : PluginManagerConfigurationUI(parent), +PluginManagerConfiguration::PluginManagerConfiguration(TQWidget *tqparent, KRadioApp *app, PluginManager *pm) + : PluginManagerConfigurationUI(tqparent), m_Application(app), m_PluginManager(pm), m_dirty(true) @@ -37,11 +37,11 @@ PluginManagerConfiguration::PluginManagerConfiguration(QWidget *parent, KRadioAp noticePluginLibrariesChanged(); noticePluginsChanged(); - QObject::connect(btnAddLibrary, SIGNAL(clicked()), this, SLOT(slotAddLibrary())); - QObject::connect(btnRemoveLibrary, SIGNAL(clicked()), this, SLOT(slotRemoveLibrary())); - QObject::connect(btnNewPluginInstance, SIGNAL(clicked()), this, SLOT(slotNewPluginInstance())); - QObject::connect(btnRemovePluginInstance, SIGNAL(clicked()), this, SLOT(slotRemovePluginInstance())); - QObject::connect(cbShowProgressBar, SIGNAL(toggled(bool)), this, SLOT(slotSetDirty())); + TQObject::connect(btnAddLibrary, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddLibrary())); + TQObject::connect(btnRemoveLibrary, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemoveLibrary())); + TQObject::connect(btnNewPluginInstance, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNewPluginInstance())); + TQObject::connect(btnRemovePluginInstance, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemovePluginInstance())); + TQObject::connect(cbShowProgressBar, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetDirty())); slotCancel(); } @@ -55,16 +55,16 @@ PluginManagerConfiguration::~PluginManagerConfiguration () void PluginManagerConfiguration::noticePluginLibrariesChanged() { listPluginLibraries->clear(); - const QMap<QString, PluginLibraryInfo> &libs = m_Application->getPluginLibraries(); - QMapConstIterator<QString,PluginLibraryInfo> end = libs.end(); - for (QMapConstIterator<QString,PluginLibraryInfo> it = libs.begin(); it != end; ++it) { + const TQMap<TQString, PluginLibraryInfo> &libs = m_Application->getPluginLibraries(); + TQMapConstIterator<TQString,PluginLibraryInfo> end = libs.end(); + for (TQMapConstIterator<TQString,PluginLibraryInfo> it = libs.begin(); it != end; ++it) { listPluginLibraries->insertItem(it.key()); } listPluginClasses->clear(); - const QMap<QString, PluginClassInfo> &classes = m_Application->getPluginClasses(); - QMapConstIterator<QString, PluginClassInfo> end_cls = classes.end(); - for (QMapConstIterator<QString, PluginClassInfo> it = classes.begin(); it != end_cls; ++it) { + const TQMap<TQString, PluginClassInfo> &classes = m_Application->getPluginClasses(); + TQMapConstIterator<TQString, PluginClassInfo> end_cls = classes.end(); + for (TQMapConstIterator<TQString, PluginClassInfo> it = classes.begin(); it != end_cls; ++it) { listPluginClasses->insertItem(new KListViewItem(listPluginClasses, it.key(), (*it).description)); } @@ -76,12 +76,12 @@ void PluginManagerConfiguration::noticePluginsChanged() { listPluginInstances->clear(); const PluginList &plugins = m_PluginManager->plugins(); - const QMap<QString, PluginClassInfo> &classes = m_Application->getPluginClasses(); + const TQMap<TQString, PluginClassInfo> &classes = m_Application->getPluginClasses(); for (PluginIterator it(plugins); it.current(); ++it) { - QString class_name = it.current()->pluginClassName(); - if (classes.contains(class_name)) { - QString obj_name = it.current()->name(); + TQString class_name = it.current()->pluginClassName(); + if (classes.tqcontains(class_name)) { + TQString obj_name = it.current()->name(); listPluginInstances->insertItem(new KListViewItem(listPluginInstances, class_name, obj_name, classes[class_name].description)); } } @@ -111,7 +111,7 @@ void PluginManagerConfiguration::slotCancel() void PluginManagerConfiguration::slotAddLibrary() { slotSetDirty(); - QString url = editPluginLibrary->url(); + TQString url = editPluginLibrary->url(); if (m_Application && url.length()) m_Application->LoadLibrary(url); } @@ -121,7 +121,7 @@ void PluginManagerConfiguration::slotRemoveLibrary() { slotSetDirty(); if (m_Application) { - QString lib = listPluginLibraries->currentText(); + TQString lib = listPluginLibraries->currentText(); if (lib.length()) { m_Application->UnloadLibrary(lib); } @@ -133,16 +133,16 @@ void PluginManagerConfiguration::slotNewPluginInstance() { slotSetDirty(); if (m_Application && m_PluginManager) { - QListViewItem *item = listPluginClasses->currentItem(); - QString class_name = item ? item->text(0) : QString::null; + TQListViewItem *item = listPluginClasses->currentItem(); + TQString class_name = item ? item->text(0) : TQString(); bool ok = false; int default_object_id = 1; - while (m_PluginManager->getPluginByName(class_name + QString::number(default_object_id))) + while (m_PluginManager->getPluginByName(class_name + TQString::number(default_object_id))) ++default_object_id; - QString object_name = KInputDialog::getText(i18n("Enter Plugin Instance Name"), + TQString object_name = KInputDialog::getText(i18n("Enter Plugin Instance Name"), i18n("Instance Name"), - class_name + QString::number(default_object_id), + class_name + TQString::number(default_object_id), &ok); if (ok && class_name.length() && object_name.length()) m_Application->CreatePlugin(m_PluginManager, class_name, object_name); @@ -154,8 +154,8 @@ void PluginManagerConfiguration::slotRemovePluginInstance() { slotSetDirty(); if (m_Application && m_PluginManager) { - QListViewItem *item = listPluginInstances->currentItem(); - QString object_name = item ? item->text(1) : QString::null; + TQListViewItem *item = listPluginInstances->currentItem(); + TQString object_name = item ? item->text(1) : TQString(); if (object_name.length()) m_PluginManager->deletePluginByName(object_name); } diff --git a/kradio3/src/pluginmanager.cpp b/kradio3/src/pluginmanager.cpp index adac66c..286b588 100644 --- a/kradio3/src/pluginmanager.cpp +++ b/kradio3/src/pluginmanager.cpp @@ -27,17 +27,17 @@ #include <kconfig.h> #include <kprogress.h> -#include <qlayout.h> -#include <qframe.h> -#include <qmenudata.h> +#include <tqlayout.h> +#include <tqframe.h> +#include <tqmenudata.h> #include "include/debug-profiler.h" PluginManager::PluginManager( - const QString &name, + const TQString &name, KRadioApp *app, - const QString &configDialogTitle, - const QString &aboutDialogTitle) + const TQString &configDialogTitle, + const TQString &aboutDialogTitle) : m_Name(name), m_Application(app), m_showProgressBar(true), @@ -87,7 +87,7 @@ void PluginManager::noticeLibrariesChanged() } -void PluginManager::unloadPlugins(const QString &class_name) +void PluginManager::unloadPlugins(const TQString &class_name) { PluginList plugins = m_plugins; for (PluginIterator it(plugins); it.current(); ++it) { @@ -99,7 +99,7 @@ void PluginManager::unloadPlugins(const QString &class_name) } -void PluginManager::addWidgetPluginMenuItems(QMenuData *menu, QMap<WidgetPluginBase *,int> &map) const +void PluginManager::addWidgetPluginMenuItems(TQMenuData *menu, TQMap<WidgetPluginBase *,int> &map) const { map.clear(); @@ -107,23 +107,23 @@ void PluginManager::addWidgetPluginMenuItems(QMenuData *menu, QMap<WidgetPluginB WidgetPluginBase *b = dynamic_cast<WidgetPluginBase*>(it.current()); if (!b) continue; - int id = menu->insertItem("dummy", b->getWidget(), SLOT(toggleShown())); + int id = menu->insertItem("dummy", b->getWidget(), TQT_SLOT(toggleShown())); map.insert(b, id); updateWidgetPluginMenuItem(b, menu, map, b->isReallyVisible()); } } -void PluginManager::updateWidgetPluginMenuItem(WidgetPluginBase *b, QMenuData *menu, QMap<WidgetPluginBase *,int> &map, bool shown) const +void PluginManager::updateWidgetPluginMenuItem(WidgetPluginBase *b, TQMenuData *menu, TQMap<WidgetPluginBase *,int> &map, bool shown) const { - if (!b || !map.contains(b)) + if (!b || !map.tqcontains(b)) return; - const QString &name = b->description(); - QString text = (shown ? i18n("Hide %1") : i18n("Show %1")).arg(name); + const TQString &name = b->description(); + TQString text = (shown ? i18n("Hide %1") : i18n("Show %1")).tqarg(name); menu->changeItem(map[b], - QIconSet(SmallIconSet(!shown ? "kradio_show" : "kradio_hide")), + TQIconSet(SmallIconSet(!shown ? "kradio_show" : "kradio_hide")), text); } @@ -136,7 +136,7 @@ void PluginManager::noticeWidgetPluginShown(WidgetPluginBase *p, bool shown) } -PluginBase *PluginManager::getPluginByName(const QString &name) const +PluginBase *PluginManager::getPluginByName(const TQString &name) const { for (PluginIterator it(m_plugins); it.current(); ++it) { if (it.current()->name() == name) @@ -153,7 +153,7 @@ void PluginManager::insertPlugin(PluginBase *p) if (p) { BlockProfiler profiler_cfg("PluginManager::insertPlugin - about/config"); - /*kdDebug() << QDateTime::currentDateTime().toString(Qt::ISODate) + /*kdDebug() << TQDateTime::tqcurrentDateTime().toString(Qt::ISODate) << " Debug: Adding Plugin: " << p->name() << "\n";*/ if (!m_configDialog) @@ -173,7 +173,7 @@ void PluginManager::insertPlugin(PluginBase *p) // connect plugins with each other for (PluginIterator it(m_plugins); it.current(); ++it) { if (it.current() != p) { - /*kdDebug() << QDateTime::currentDateTime().toString(Qt::ISODate) + /*kdDebug() << TQDateTime::tqcurrentDateTime().toString(Qt::ISODate) << " Debug: connecting with " << it.current()->name() << "\n";*/ p->connectI(it.current()); } @@ -181,7 +181,7 @@ void PluginManager::insertPlugin(PluginBase *p) // perhaps some existing config pages will profit from new plugin // example: timecontrol profits from radio plugin - for (QWidgetDictIterator it(m_configPages); it.current(); ++it) { + for (TQWidgetDictIterator it(m_configPages); it.current(); ++it) { Interface *i = dynamic_cast<Interface *>(it.current()); if (i) i->connectI(p); @@ -211,7 +211,7 @@ void PluginManager::insertPlugin(PluginBase *p) void PluginManager::deletePlugin(PluginBase *p) { - if (p && m_plugins.contains(p)) { + if (p && m_plugins.tqcontains(p)) { removePlugin(p); delete p; } @@ -220,7 +220,7 @@ void PluginManager::deletePlugin(PluginBase *p) void PluginManager::removePlugin(PluginBase *p) { - if (p && m_plugins.contains(p)) { + if (p && m_plugins.tqcontains(p)) { for (PluginIterator it(m_plugins); it.current(); ++it) { if (it.current() != p) { @@ -236,12 +236,12 @@ void PluginManager::removePlugin(PluginBase *p) // remove config page from config dialog, only chance is to delete it // plugin will be notified automatically (mechanism implemented by // PluginBase) - while (QFrame *f = m_configPageFrames.find(p)) { + while (TQFrame *f = m_configPageFrames.tqfind(p)) { m_configPageFrames.remove(p); m_configPages.remove(p); delete f; } - while (QFrame *f = m_aboutPageFrames.find(p)) { + while (TQFrame *f = m_aboutPageFrames.tqfind(p)) { m_aboutPageFrames.remove(p); m_aboutPages.remove(p); delete f; @@ -265,9 +265,9 @@ void PluginManager::removePlugin(PluginBase *p) void PluginManager::addConfigurationPage (PluginBase *forWhom, const ConfigPageInfo &info) { - if (!forWhom || !m_plugins.containsRef(forWhom) || !info.page) + if (!forWhom || !m_plugins.tqcontainsRef(forWhom) || !info.page) return; - QFrame *f = addConfigurationPage(info); + TQFrame *f = addConfigurationPage(info); // register this frame and config page m_configPageFrames.insert(forWhom, f); @@ -283,36 +283,36 @@ void PluginManager::addConfigurationPage (PluginBase *forWhom, } -QFrame *PluginManager::addConfigurationPage (const ConfigPageInfo &info) +TQFrame *PluginManager::addConfigurationPage (const ConfigPageInfo &info) { if (!m_configDialog) createConfigDialog(i18n(m_configDialogTitle.ascii())); // create empty config frame - QFrame *f = m_configDialog->addPage( + TQFrame *f = m_configDialog->addPage( info.itemName, info.pageHeader, KGlobal::instance()->iconLoader()->loadIcon( info.iconName, KIcon::NoGroup, KIcon::SizeMedium ) ); - // fill config frame with layout ... - QGridLayout *l = new QGridLayout(f); + // fill config frame with tqlayout ... + TQGridLayout *l = new TQGridLayout(f); l->setSpacing( 0 ); l->setMargin( 0 ); // ... and externally created config page - info.page->reparent (f, QPoint(0,0), true); + info.page->reparent (f, TQPoint(0,0), true); l->addWidget( info.page, 0, 0 ); // make sure, that config page receives ok, apply and cancel signals - QObject::connect(this, SIGNAL(sigConfigOK()), info.page, SLOT(slotOK())); - QObject::connect(m_configDialog, SIGNAL(cancelClicked()), info.page, SLOT(slotCancel())); + TQObject::connect(this, TQT_SIGNAL(sigConfigOK()), info.page, TQT_SLOT(slotOK())); + TQObject::connect(m_configDialog, TQT_SIGNAL(cancelClicked()), info.page, TQT_SLOT(slotCancel())); return f; } -void PluginManager::createConfigDialog(const QString &title) +void PluginManager::createConfigDialog(const TQString &title) { if (m_configDialog) delete m_configDialog; m_configDialog = NULL; @@ -322,15 +322,15 @@ void PluginManager::createConfigDialog(const QString &title) title, KDialogBase::Apply|KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, - /*parent = */ NULL, + /*tqparent = */ NULL, title.ascii(), /*modal = */ false, true); m_configDialog = cfg; - QObject::connect(m_configDialog, SIGNAL(okClicked()), this, SLOT(slotConfigOK())); - QObject::connect(m_configDialog, SIGNAL(applyClicked()), this, SLOT(slotConfigOK())); + TQObject::connect(m_configDialog, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotConfigOK())); + TQObject::connect(m_configDialog, TQT_SIGNAL(applyClicked()), this, TQT_SLOT(slotConfigOK())); insertPlugin(cfg); @@ -362,13 +362,13 @@ void PluginManager::addAboutPage (PluginBase *forWhom, if (!m_aboutDialog) createAboutDialog(i18n(m_aboutDialogTitle.ascii())); - if ( !forWhom || !m_plugins.containsRef(forWhom) + if ( !forWhom || !m_plugins.tqcontainsRef(forWhom) || !m_aboutDialog || !info.page) return; // create empty about frame - QFrame *f = m_aboutDialog->addPage( + TQFrame *f = m_aboutDialog->addPage( info.itemName, info.pageHeader, KGlobal::instance()->iconLoader()->loadIcon( info.iconName, KIcon::NoGroup, KIcon::SizeMedium ) @@ -378,18 +378,18 @@ void PluginManager::addAboutPage (PluginBase *forWhom, m_aboutPageFrames.insert(forWhom, f); m_aboutPages.insert(forWhom, info.page); - // fill config frame with layout ... - QGridLayout *l = new QGridLayout(f); + // fill config frame with tqlayout ... + TQGridLayout *l = new TQGridLayout(f); l->setSpacing( 0 ); l->setMargin( 0 ); // ... and externally created config page - info.page->reparent (f, QPoint(0,0), true); + info.page->reparent (f, TQPoint(0,0), true); l->addWidget( info.page, 0, 0 ); } -void PluginManager::createAboutDialog(const QString &title) +void PluginManager::createAboutDialog(const TQString &title) { if (m_aboutDialog) delete m_aboutDialog; m_aboutDialog = NULL; @@ -398,7 +398,7 @@ void PluginManager::createAboutDialog(const QString &title) title, KDialogBase::Close, KDialogBase::Close, - /*parent = */ NULL, + /*tqparent = */ NULL, title.ascii(), /*modal = */ false, true); @@ -416,14 +416,14 @@ void PluginManager::saveState (KConfig *c) const c->writeEntry("show-progress-bar", m_showProgressBar); int n = 0; for (PluginIterator it(m_plugins); it.current(); ++it) { - QString class_name = it.current()->pluginClassName(); - QString object_name = it.current()->name(); + TQString class_name = it.current()->pluginClassName(); + TQString object_name = it.current()->name(); if (class_name.length() && object_name.length() && - m_Application->getPluginClasses().contains(class_name)) + m_Application->getPluginClasses().tqcontains(class_name)) { ++n; - c->writeEntry("plugin_class_" + QString::number(n), class_name); - c->writeEntry("plugin_name_" + QString::number(n), object_name); + c->writeEntry("plugin_class_" + TQString::number(n), class_name); + c->writeEntry("plugin_name_" + TQString::number(n), object_name); } } c->writeEntry("plugins", n); @@ -452,11 +452,11 @@ void PluginManager::restoreState (KConfig *c) for (int i = 1; i <= n; ++i) { c->setGroup("PluginManager-" + m_Name); - QString class_name = c->readEntry("plugin_class_" + QString::number(i)); - QString object_name = c->readEntry("plugin_name_" + QString::number(i)); + TQString class_name = c->readEntry("plugin_class_" + TQString::number(i)); + TQString object_name = c->readEntry("plugin_name_" + TQString::number(i)); if (m_showProgressBar) - progress->QWidget::setCaption(i18n("Creating Plugin %1").arg(class_name)); + progress->TQWidget::setCaption(i18n("Creating Plugin %1").tqarg(class_name)); if (class_name.length() && object_name.length()) m_Application->CreatePlugin(this, class_name, object_name); if (m_showProgressBar) @@ -464,16 +464,16 @@ void PluginManager::restoreState (KConfig *c) } if (m_Application && n == 0) { - const QMap<QString, PluginClassInfo> &classes = m_Application->getPluginClasses(); - QMapConstIterator<QString, PluginClassInfo> end = classes.end(); + const TQMap<TQString, PluginClassInfo> &classes = m_Application->getPluginClasses(); + TQMapConstIterator<TQString, PluginClassInfo> end = classes.end(); n = classes.count(); if (m_showProgressBar) progress->progressBar()->setTotalSteps(2*n); int idx = 1; - for (QMapConstIterator<QString, PluginClassInfo> it=classes.begin(); it != end; ++it, ++idx) { + for (TQMapConstIterator<TQString, PluginClassInfo> it=classes.begin(); it != end; ++it, ++idx) { const PluginClassInfo &cls = *it; if (m_showProgressBar) - progress->QWidget::setCaption(i18n("Creating Plugin %1").arg(cls.class_name)); + progress->TQWidget::setCaption(i18n("Creating Plugin %1").tqarg(cls.class_name)); m_Application->CreatePlugin(this, cls.class_name, m_Name + "-" + cls.class_name); if (m_showProgressBar) progress->progressBar()->setProgress(idx); @@ -487,7 +487,7 @@ void PluginManager::restoreState (KConfig *c) for (PluginIterator i(m_plugins); i.current(); ++i, ++idx) { BlockProfiler profile_plugin("PluginManager::restoreState - " + i.current()->pluginClassName()); if (m_showProgressBar) - progress->QWidget::setCaption(i18n("Initializing Plugin %1").arg(i.current()->pluginClassName())); + progress->TQWidget::setCaption(i18n("Initializing Plugin %1").tqarg(i.current()->pluginClassName())); i.current()->restoreState(c); if (m_showProgressBar) progress->progressBar()->setProgress(idx+1); diff --git a/kradio3/src/plugins.cpp b/kradio3/src/plugins.cpp index 4da7310..f711bf0 100644 --- a/kradio3/src/plugins.cpp +++ b/kradio3/src/plugins.cpp @@ -18,7 +18,7 @@ #include "include/plugins.h" #include "include/pluginmanager.h" -PluginBase::PluginBase(const QString &name, const QString &description) +PluginBase::PluginBase(const TQString &name, const TQString &description) : m_name(name), m_description(description), m_manager(NULL), diff --git a/kradio3/src/radio_interfaces.cpp b/kradio3/src/radio_interfaces.cpp index c91df36..f4e68a9 100644 --- a/kradio3/src/radio_interfaces.cpp +++ b/kradio3/src/radio_interfaces.cpp @@ -27,7 +27,7 @@ IF_IMPL_SENDER ( IRadio::notifyStationChanged (const RadioStation &s, int idx) noticeStationChanged (s, idx) ); IF_IMPL_SENDER ( IRadio::notifyStationsChanged(const StationList &sl), noticeStationsChanged(sl) ); -IF_IMPL_SENDER ( IRadio::notifyPresetFileChanged(const QString &f), +IF_IMPL_SENDER ( IRadio::notifyPresetFileChanged(const TQString &f), noticePresetFileChanged(f) ); IF_IMPL_SENDER ( IRadio::notifyCurrentSoundStreamIDChanged(SoundStreamID id), noticeCurrentSoundStreamIDChanged(id) ); @@ -44,39 +44,39 @@ IF_IMPL_SENDER ( IRadioClient::sendActivateStation(int index), activateStation(index) ); IF_IMPL_SENDER ( IRadioClient::sendStations(const StationList &sl), setStations(sl) ); -IF_IMPL_SENDER ( IRadioClient::sendPresetFile(const QString &f), +IF_IMPL_SENDER ( IRadioClient::sendPresetFile(const TQString &f), setPresetFile(f) ); -IF_IMPL_QUERY ( bool IRadioClient::queryIsPowerOn(), +IF_IMPL_TQUERY ( bool IRadioClient::queryIsPowerOn(), isPowerOn(), false ); -IF_IMPL_QUERY ( bool IRadioClient::queryIsPowerOff(), +IF_IMPL_TQUERY ( bool IRadioClient::queryIsPowerOff(), isPowerOff(), true ); -IF_IMPL_QUERY ( const RadioStation & IRadioClient::queryCurrentStation(), +IF_IMPL_TQUERY ( const RadioStation & IRadioClient::queryCurrentStation(), getCurrentStation(), undefinedRadioStation ); -IF_IMPL_QUERY ( int IRadioClient::queryCurrentStationIdx(), +IF_IMPL_TQUERY ( int IRadioClient::queryCurrentStationIdx(), getCurrentStationIdx(), -1 ); -IF_IMPL_QUERY ( int IRadioClient::queryStationIdx(const RadioStation &rs), +IF_IMPL_TQUERY ( int IRadioClient::queryStationIdx(const RadioStation &rs), getStationIdx(rs), -1 ); -IF_IMPL_QUERY ( const StationList & IRadioClient::queryStations(), +IF_IMPL_TQUERY ( const StationList & IRadioClient::queryStations(), getStations(), emptyStationList ); -static QString emptyString; -IF_IMPL_QUERY ( const QString & IRadioClient::queryPresetFile(), +static TQString emptyString; +IF_IMPL_TQUERY ( const TQString & IRadioClient::queryPresetFile(), getPresetFile(), emptyString ); -IF_IMPL_QUERY ( SoundStreamID IRadioClient::queryCurrentSoundStreamID(), +IF_IMPL_TQUERY ( SoundStreamID IRadioClient::queryCurrentSoundStreamID(), getCurrentSoundStreamID(), SoundStreamID::InvalidID ); diff --git a/kradio3/src/radiodevice_interfaces.cpp b/kradio3/src/radiodevice_interfaces.cpp index 3f8a015..0a75a8b 100644 --- a/kradio3/src/radiodevice_interfaces.cpp +++ b/kradio3/src/radiodevice_interfaces.cpp @@ -27,7 +27,7 @@ IF_IMPL_SENDER ( IRadioDevice::notifyPowerChanged(bool on), noticePowerChanged(on, this) ); IF_IMPL_SENDER ( IRadioDevice::notifyStationChanged (const RadioStation &s), noticeStationChanged (s, this) ); -IF_IMPL_SENDER ( IRadioDevice::notifyDescriptionChanged (const QString&s), +IF_IMPL_SENDER ( IRadioDevice::notifyDescriptionChanged (const TQString&s), noticeDescriptionChanged (s, this) ); IF_IMPL_SENDER ( IRadioDevice::notifyCurrentSoundStreamIDChanged(SoundStreamID id), noticeCurrentSoundStreamIDChanged(id, this) ); @@ -43,22 +43,22 @@ IF_IMPL_SENDER ( IRadioDeviceClient::sendPowerOff(), IF_IMPL_SENDER ( IRadioDeviceClient::sendActivateStation(const RadioStation &rs), activateStation(rs) ); -IF_IMPL_QUERY ( bool IRadioDeviceClient::queryIsPowerOn(), +IF_IMPL_TQUERY ( bool IRadioDeviceClient::queryIsPowerOn(), isPowerOn(), false ); -IF_IMPL_QUERY ( bool IRadioDeviceClient::queryIsPowerOff(), +IF_IMPL_TQUERY ( bool IRadioDeviceClient::queryIsPowerOff(), isPowerOff(), true ); -IF_IMPL_QUERY ( const RadioStation & IRadioDeviceClient::queryCurrentStation(), +IF_IMPL_TQUERY ( const RadioStation & IRadioDeviceClient::queryCurrentStation(), getCurrentStation(), undefinedRadioStation ); -static QString IRadioDeviceClient_unknown("unknown"); -IF_IMPL_QUERY ( const QString & IRadioDeviceClient::queryDescription(), +static TQString IRadioDeviceClient_unknown("unknown"); +IF_IMPL_TQUERY ( const TQString & IRadioDeviceClient::queryDescription(), getDescription(), IRadioDeviceClient_unknown ); -IF_IMPL_QUERY ( SoundStreamID IRadioDeviceClient::queryCurrentSoundStreamID(), +IF_IMPL_TQUERY ( SoundStreamID IRadioDeviceClient::queryCurrentSoundStreamID(), getCurrentSoundStreamID(), SoundStreamID::InvalidID ); @@ -120,31 +120,31 @@ IF_IMPL_SENDER ( IRadioSoundClient::sendSignalMinQuality (float q), IF_IMPL_SENDER ( IRadioSoundClient::sendStereo(bool s), setStereo(s) ) -IF_IMPL_QUERY ( float IRadioSoundClient::queryVolume(), +IF_IMPL_TQUERY ( float IRadioSoundClient::queryVolume(), getVolume(), 0.0 ) -IF_IMPL_QUERY ( float IRadioSoundClient::queryTreble(), +IF_IMPL_TQUERY ( float IRadioSoundClient::queryTreble(), getTreble(), 0.0 ) -IF_IMPL_QUERY ( float IRadioSoundClient::queryBass(), +IF_IMPL_TQUERY ( float IRadioSoundClient::queryBass(), getBass(), 0.0 ) -IF_IMPL_QUERY ( float IRadioSoundClient::queryBalance(), +IF_IMPL_TQUERY ( float IRadioSoundClient::queryBalance(), getBalance(), 0.0 ) -IF_IMPL_QUERY ( float IRadioSoundClient::querySignalQuality(), +IF_IMPL_TQUERY ( float IRadioSoundClient::querySignalQuality(), getSignalQuality(), 0.0 ) -IF_IMPL_QUERY ( float IRadioSoundClient::querySignalMinQuality(), +IF_IMPL_TQUERY ( float IRadioSoundClient::querySignalMinQuality(), getSignalMinQuality(), 0.75 ) -IF_IMPL_QUERY ( bool IRadioSoundClient::queryHasGoodQuality(), +IF_IMPL_TQUERY ( bool IRadioSoundClient::queryHasGoodQuality(), hasGoodQuality(), false ) -IF_IMPL_QUERY ( bool IRadioSoundClient::queryIsStereo(), +IF_IMPL_TQUERY ( bool IRadioSoundClient::queryIsStereo(), isStereo(), false ) -IF_IMPL_QUERY ( bool IRadioSoundClient::queryIsMuted(), +IF_IMPL_TQUERY ( bool IRadioSoundClient::queryIsMuted(), isMuted(), true ) @@ -207,16 +207,16 @@ IF_IMPL_SENDER ( ISeekRadioClient::sendStartSeekDown(), IF_IMPL_SENDER ( ISeekRadioClient::sendStopSeek(), stopSeek() ); -IF_IMPL_QUERY ( bool ISeekRadioClient::queryIsSeekRunning(), +IF_IMPL_TQUERY ( bool ISeekRadioClient::queryIsSeekRunning(), isSeekRunning(), false ); -IF_IMPL_QUERY ( bool ISeekRadioClient::queryIsSeekUpRunning(), +IF_IMPL_TQUERY ( bool ISeekRadioClient::queryIsSeekUpRunning(), isSeekUpRunning(), false ); -IF_IMPL_QUERY ( bool ISeekRadioClient::queryIsSeekDownRunning(), +IF_IMPL_TQUERY ( bool ISeekRadioClient::queryIsSeekDownRunning(), isSeekDownRunning(), false ); -IF_IMPL_QUERY ( float ISeekRadioClient::queryProgress(), +IF_IMPL_TQUERY ( float ISeekRadioClient::queryProgress(), getProgress(), 1.0 ); @@ -261,22 +261,22 @@ IF_IMPL_SENDER ( IFrequencyRadioClient::sendMaxFrequency(float mf), IF_IMPL_SENDER ( IFrequencyRadioClient::sendScanStep(float s), setScanStep(s) ) -IF_IMPL_QUERY ( float IFrequencyRadioClient::queryFrequency(), +IF_IMPL_TQUERY ( float IFrequencyRadioClient::queryFrequency(), getFrequency(), 0 ) -IF_IMPL_QUERY ( float IFrequencyRadioClient::queryMinFrequency(), +IF_IMPL_TQUERY ( float IFrequencyRadioClient::queryMinFrequency(), getMinFrequency(), 0 ) -IF_IMPL_QUERY ( float IFrequencyRadioClient::queryMinDeviceFrequency(), +IF_IMPL_TQUERY ( float IFrequencyRadioClient::queryMinDeviceFrequency(), getMinDeviceFrequency(), 0 ) -IF_IMPL_QUERY ( float IFrequencyRadioClient::queryMaxFrequency(), +IF_IMPL_TQUERY ( float IFrequencyRadioClient::queryMaxFrequency(), getMaxFrequency(), 0 ) -IF_IMPL_QUERY ( float IFrequencyRadioClient::queryMaxDeviceFrequency(), +IF_IMPL_TQUERY ( float IFrequencyRadioClient::queryMaxDeviceFrequency(), getMaxDeviceFrequency(), 0 ) -IF_IMPL_QUERY ( float IFrequencyRadioClient::queryScanStep(), +IF_IMPL_TQUERY ( float IFrequencyRadioClient::queryScanStep(), getScanStep(), 0.05 ) @@ -312,7 +312,7 @@ IF_IMPL_SENDER ( IInternetRadioClient::sendURL(const KURL &url), static KURL emptyURL; -IF_IMPL_QUERY ( const KURL &IInternetRadioClient::queryURL(), +IF_IMPL_TQUERY ( const KURL &IInternetRadioClient::queryURL(), getURL(), emptyURL ) diff --git a/kradio3/src/radiodevicepool_interfaces.cpp b/kradio3/src/radiodevicepool_interfaces.cpp index 27c111e..6b6fbe1 100644 --- a/kradio3/src/radiodevicepool_interfaces.cpp +++ b/kradio3/src/radiodevicepool_interfaces.cpp @@ -23,9 +23,9 @@ IF_IMPL_SENDER ( IRadioDevicePool::notifyActiveDeviceChanged(IRadioDevice *rd), noticeActiveDeviceChanged(rd) ) -IF_IMPL_SENDER ( IRadioDevicePool::notifyDevicesChanged(const QPtrList<IRadioDevice> &l), +IF_IMPL_SENDER ( IRadioDevicePool::notifyDevicesChanged(const TQPtrList<IRadioDevice> &l), noticeDevicesChanged(l) ) -IF_IMPL_SENDER ( IRadioDevicePool::notifyDeviceDescriptionChanged(const QString &s), +IF_IMPL_SENDER ( IRadioDevicePool::notifyDeviceDescriptionChanged(const TQString &s), noticeDeviceDescriptionChanged(s) ) // IRadioDevicePoolClient @@ -33,17 +33,17 @@ IF_IMPL_SENDER ( IRadioDevicePool::notifyDeviceDescriptionChanged(const QStrin IF_IMPL_SENDER ( IRadioDevicePoolClient::sendActiveDevice(IRadioDevice *rd, bool keepPower ), setActiveDevice(rd, keepPower) ) -IF_IMPL_QUERY ( IRadioDevice *IRadioDevicePoolClient::queryActiveDevice(), +IF_IMPL_TQUERY ( IRadioDevice *IRadioDevicePoolClient::queryActiveDevice(), getActiveDevice(), NULL ) -static const QPtrList<IRadioDevice> IRadioDevicePoolClient_emptyList; -IF_IMPL_QUERY ( const QPtrList<IRadioDevice> &IRadioDevicePoolClient::queryDevices(), +static const TQPtrList<IRadioDevice> IRadioDevicePoolClient_emptyList; +IF_IMPL_TQUERY ( const TQPtrList<IRadioDevice> &IRadioDevicePoolClient::queryDevices(), getDevices(), IRadioDevicePoolClient_emptyList ) -static QString IRadioDevicePoolClient_unknown("unknown"); -IF_IMPL_QUERY ( const QString &IRadioDevicePoolClient::queryDeviceDescription(), +static TQString IRadioDevicePoolClient_unknown("unknown"); +IF_IMPL_TQUERY ( const TQString &IRadioDevicePoolClient::queryDeviceDescription(), getDeviceDescription(), IRadioDevicePoolClient_unknown ) diff --git a/kradio3/src/radiostation-config.cpp b/kradio3/src/radiostation-config.cpp index f60230c..9f191c8 100644 --- a/kradio3/src/radiostation-config.cpp +++ b/kradio3/src/radiostation-config.cpp @@ -15,9 +15,9 @@ * * ***************************************************************************/ -#include <qlabel.h> -#include <qspinbox.h> -#include <qlayout.h> +#include <tqlabel.h> +#include <tqspinbox.h> +#include <tqlayout.h> #include <klocale.h> #include <math.h> @@ -26,8 +26,8 @@ #include "include/frequencyradiostation.h" -RadioStationConfig::RadioStationConfig(QWidget *parent) - : QWidget (parent) +RadioStationConfig::RadioStationConfig(TQWidget *tqparent) + : TQWidget (tqparent) { } @@ -39,10 +39,10 @@ RadioStationConfig::~RadioStationConfig() /////////////////////////////////////////////////////////////////////// -UndefinedRadioStationConfig::UndefinedRadioStationConfig (QWidget *parent) - : RadioStationConfig(parent) +UndefinedRadioStationConfig::UndefinedRadioStationConfig (TQWidget *tqparent) + : RadioStationConfig(tqparent) { - new QLabel (i18n("I don't know how to edit this station"), this); + new TQLabel (i18n("I don't know how to edit this station"), this); } UndefinedRadioStationConfig::~UndefinedRadioStationConfig() @@ -60,17 +60,17 @@ void UndefinedRadioStationConfig::storeStationData (RadioStation &/*rs*/) /////////////////////////////////////////////////////////////////////// -FrequencyRadioStationConfig::FrequencyRadioStationConfig (QWidget *parent) - : RadioStationConfig(parent) +FrequencyRadioStationConfig::FrequencyRadioStationConfig (TQWidget *tqparent) + : RadioStationConfig(tqparent) { - QHBoxLayout *hl = new QHBoxLayout(this); - QVBoxLayout *vl = new QVBoxLayout(hl); - vl->addWidget (new QLabel(i18n("Frequency:"), this)); - m_editFrequency = new QSpinBox(20, 150000, 10, this); + TQHBoxLayout *hl = new TQHBoxLayout(this); + TQVBoxLayout *vl = new TQVBoxLayout(hl); + vl->addWidget (new TQLabel(i18n("Frequency:"), this)); + m_editFrequency = new TQSpinBox(20, 150000, 10, this); vl->addWidget (m_editFrequency); - hl->addItem(new QSpacerItem (10, 1, QSizePolicy::Expanding, QSizePolicy::Fixed)); + hl->addItem(new TQSpacerItem (10, 1, TQSizePolicy::Expanding, TQSizePolicy::Fixed)); - connect (m_editFrequency, SIGNAL(valueChanged(int)), this, SLOT(slotValueChanged(int))); + connect (m_editFrequency, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotValueChanged(int))); } FrequencyRadioStationConfig::~FrequencyRadioStationConfig() diff --git a/kradio3/src/radiostation-listview.cpp b/kradio3/src/radiostation-listview.cpp index e23fbaa..a9f814c 100644 --- a/kradio3/src/radiostation-listview.cpp +++ b/kradio3/src/radiostation-listview.cpp @@ -21,14 +21,14 @@ #include "include/station-drag-object.h" #include <klocale.h> -#include <qfile.h> -#include <qimage.h> -#include <qpixmap.h> +#include <tqfile.h> +#include <tqimage.h> +#include <tqpixmap.h> #include <kconfig.h> -RadioStationListView::RadioStationListView(QWidget *parent, const char *name) - : KListView(parent, name) +RadioStationListView::RadioStationListView(TQWidget *tqparent, const char *name) + : KListView(tqparent, name) { addColumn(i18n("No.")); addColumn(i18n("Icon")); @@ -37,14 +37,14 @@ RadioStationListView::RadioStationListView(QWidget *parent, const char *name) setAllColumnsShowFocus(true); setSorting(-1); - QObject::connect(this, SIGNAL(spacePressed(QListViewItem*)), - this, SLOT(slotStationActivation(QListViewItem* ))); - QObject::connect(this, SIGNAL(returnPressed(QListViewItem*)), - this, SLOT(slotStationActivation(QListViewItem* ))); - QObject::connect(this, SIGNAL(doubleClicked(QListViewItem*)), - this, SLOT(slotStationActivation(QListViewItem *))); - QObject::connect(this, SIGNAL(currentChanged(QListViewItem*)), - this, SLOT(slotCurrentStationChanged(QListViewItem *))); + TQObject::connect(this, TQT_SIGNAL(spacePressed(TQListViewItem*)), + this, TQT_SLOT(slotStationActivation(TQListViewItem* ))); + TQObject::connect(this, TQT_SIGNAL(returnPressed(TQListViewItem*)), + this, TQT_SLOT(slotStationActivation(TQListViewItem* ))); + TQObject::connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem*)), + this, TQT_SLOT(slotStationActivation(TQListViewItem *))); + TQObject::connect(this, TQT_SIGNAL(currentChanged(TQListViewItem*)), + this, TQT_SLOT(slotCurrentStationChanged(TQListViewItem *))); setAcceptDrops(true); } @@ -55,9 +55,9 @@ RadioStationListView::~RadioStationListView() } -QListViewItem *RadioStationListView::getItemForIndex(int idx) const +TQListViewItem *RadioStationListView::getItemForIndex(int idx) const { - QListViewItem *item = NULL; + TQListViewItem *item = NULL; if (idx >= 0 && idx < childCount()) { item = firstChild(); @@ -71,12 +71,12 @@ QListViewItem *RadioStationListView::getItemForIndex(int idx) const } -int RadioStationListView::getIndexForItem(QListViewItem *queryItem) const +int RadioStationListView::getIndexForItem(TQListViewItem *queryItem) const { int idx = -1; if (queryItem) { - QListViewItem *item = firstChild(); + TQListViewItem *item = firstChild(); ++idx; while (item && item != queryItem) { item = item->nextSibling(); @@ -92,15 +92,15 @@ int RadioStationListView::getIndexForItem(QListViewItem *queryItem) const void RadioStationListView::setStation(int idx, const RadioStation &s, int nr) { - QListViewItem *item = getItemForIndex(idx); + TQListViewItem *item = getItemForIndex(idx); if (idx < 0) { - item = new QListViewItem(this, firstChild()); + item = new TQListViewItem(this, firstChild()); firstChild()->moveItem(item); m_StationIDs.prepend(s.stationID()); idx = 0; } else if (idx >= childCount()) { - item = new QListViewItem(this, lastChild()); + item = new TQListViewItem(this, lastChild()); m_StationIDs.append(s.stationID()); idx = childCount() - 1; } @@ -109,19 +109,19 @@ void RadioStationListView::setStation(int idx, const RadioStation &s, int nr) item->setDragEnabled(true); item->setDropEnabled(true); - item->setText(0, QString::number(nr > 0 ? nr : idx+1)); + item->setText(0, TQString::number(nr > 0 ? nr : idx+1)); item->setText(2, s.name()); item->setText(3, s.description()); m_StationIDs[idx] = s.stationID(); - QImage img(s.iconName()); + TQImage img(s.iconName()); if (!img.isNull()) { int h = img.height(); float f = 0.9 * (float)(item->height()) / (h ? (float)h : 1.0); item->setPixmap(1, img.smoothScale((int)(img.width()*f), (int)(h * f))); } else { - item->setPixmap(1, QPixmap()); + item->setPixmap(1, TQPixmap()); } } } @@ -144,28 +144,28 @@ void RadioStationListView::setStations(const StationList &stations) void RadioStationListView::removeStation(int idx) { - QListViewItem *item = getItemForIndex(idx); + TQListViewItem *item = getItemForIndex(idx); if (item) { delete item; m_StationIDs.remove(m_StationIDs.at(idx)); } } -void RadioStationListView::takeItem(QListViewItem *item, int idx) +void RadioStationListView::takeItem(TQListViewItem *item, int idx) { - QListView::takeItem(item); + TQListView::takeItem(item); m_StationIDs.remove(m_StationIDs.at(idx)); } -void RadioStationListView::insertItem(QListViewItem *item, const QString &stationid, int idx_to) +void RadioStationListView::insertItem(TQListViewItem *item, const TQString &stationid, int idx_to) { - QListView::insertItem(item); + TQListView::insertItem(item); m_StationIDs.insert(m_StationIDs.at(idx_to), stationid); } void RadioStationListView::setCurrentStation(int idx) { - QListViewItem *item = getItemForIndex(idx); + TQListViewItem *item = getItemForIndex(idx); if (item) { clearSelection(); setSelected(item, true); @@ -180,13 +180,13 @@ int RadioStationListView::currentStationIndex() const } -void RadioStationListView::slotStationActivation(QListViewItem *item) +void RadioStationListView::slotStationActivation(TQListViewItem *item) { emit sigStationActivated(getIndexForItem(item)); } -void RadioStationListView::slotCurrentStationChanged(QListViewItem *item) +void RadioStationListView::slotCurrentStationChanged(TQListViewItem *item) { emit sigCurrentStationChanged(getIndexForItem(item)); } @@ -197,7 +197,7 @@ void RadioStationListView::saveState (KConfig *cfg) const if (!cfg) return; for (int i = 0; i < 4; ++i) - cfg->writeEntry(QString(name()) + "_radiostation_listview_col_" + QString::number(i), columnWidth(i)); + cfg->writeEntry(TQString(name()) + "_radiostation_listview_col_" + TQString::number(i), columnWidth(i)); } @@ -206,14 +206,14 @@ void RadioStationListView::restoreState (KConfig *cfg) if (!cfg) return; for (int i = 0; i < 4; ++i) - setColumnWidth(i, cfg->readNumEntry(QString(name()) + "_radiostation_listview_col_" + QString::number(i), -1)); + setColumnWidth(i, cfg->readNumEntry(TQString(name()) + "_radiostation_listview_col_" + TQString::number(i), -1)); } -QDragObject *RadioStationListView::dragObject() +TQDragObject *RadioStationListView::dragObject() { - QStringList list; - QListViewItem *item = firstChild(); + TQStringList list; + TQListViewItem *item = firstChild(); for (int idx = 0; item; ++idx, item = item->nextSibling()) { if (item->isSelected()) { list.append(m_StationIDs[idx]); @@ -222,12 +222,12 @@ QDragObject *RadioStationListView::dragObject() return new StationDragObject(list, this); } -void RadioStationListView::dragEnterEvent(QDragEnterEvent* event) +void RadioStationListView::dragEnterEvent(TQDragEnterEvent* event) { event->accept(StationDragObject::canDecode(event)); } -void RadioStationListView::contentsDragEnterEvent(QDragEnterEvent* event) +void RadioStationListView::contentsDragEnterEvent(TQDragEnterEvent* event) { bool a = StationDragObject::canDecode(event); if (a) @@ -237,21 +237,21 @@ void RadioStationListView::contentsDragEnterEvent(QDragEnterEvent* event) event->accept(a); } -void RadioStationListView::dropEvent(QDropEvent* event) +void RadioStationListView::dropEvent(TQDropEvent* event) { - QStringList list; + TQStringList list; if ( StationDragObject::decode(event, list) ) { emit sigStationsReceived(list); } } -void RadioStationListView::contentsDropEvent(QDropEvent* event) +void RadioStationListView::contentsDropEvent(TQDropEvent* event) { dropEvent(event); } -void RadioStationListView::contentsDragMoveEvent(QDragMoveEvent* event) +void RadioStationListView::contentsDragMoveEvent(TQDragMoveEvent* event) { event->accept(); } diff --git a/kradio3/src/radiostation.cpp b/kradio3/src/radiostation.cpp index 6bdcd1a..f1eb58c 100644 --- a/kradio3/src/radiostation.cpp +++ b/kradio3/src/radiostation.cpp @@ -38,7 +38,7 @@ const char *dev_urandom_radiostations = "/dev/urandom"; ///////////////////////////////////////////////////////////////////////////// -QDict<RadioStation> *RadioStation::stationClassRegistry = 0; +TQDict<RadioStation> *RadioStation::stationClassRegistry = 0; ///////////////////////////////////////////////////////////////////////////// @@ -48,33 +48,33 @@ const UndefinedRadioStation undefinedRadioStation (registerStationClass); ///////////////////////////////////////////////////////////////////////////// -RadioStation::RadioStation(RegisterStationClass, const QString &classname) - : m_stationID(QString::null), // mark this station as a prototype station +RadioStation::RadioStation(RegisterStationClass, const TQString &classname) + : m_stationID(TQString()), // mark this station as a prototype station // so that we can create later a real stationID - m_name(QString::null), - m_shortName(QString::null), + m_name(TQString()), + m_shortName(TQString()), m_initialVolume(-1), - m_iconName(QString::null) + m_iconName(TQString()) { if (! stationClassRegistry) - stationClassRegistry = new QDict<RadioStation>; + stationClassRegistry = new TQDict<RadioStation>; stationClassRegistry->insert(classname, this); } RadioStation::RadioStation() - : m_name(QString::null), - m_shortName(QString::null), + : m_name(TQString()), + m_shortName(TQString()), m_initialVolume(-1), - m_iconName(QString::null) + m_iconName(TQString()) { generateNewStationID(); } -RadioStation::RadioStation(const QString &name, const QString &shortName) +RadioStation::RadioStation(const TQString &name, const TQString &shortName) : m_name(name), m_shortName(shortName), m_initialVolume(-1), - m_iconName(QString::null) + m_iconName(TQString()) { generateNewStationID(); } @@ -112,29 +112,29 @@ void RadioStation::generateNewStationID() const int buffersize = 32; unsigned char buffer[buffersize]; - QString stime, srandom = QString::null; + TQString stime, srandom = TQString(); stime.setNum(time(NULL)); int fd = open (dev_urandom_radiostations, O_RDONLY); read(fd, buffer, buffersize); close(fd); for (int i = 0; i < buffersize; ++i) - srandom += QString().sprintf("%02X", (unsigned int)buffer[i]); + srandom += TQString().sprintf("%02X", (unsigned int)buffer[i]); m_stationID = stime + srandom; } -RadioStation const *RadioStation::getStationClass(const QString &classname) +RadioStation const *RadioStation::getStationClass(const TQString &classname) { if (stationClassRegistry) - return stationClassRegistry->find(classname); + return stationClassRegistry->tqfind(classname); else return NULL; } -bool RadioStation::setProperty(const QString &pn, const QString &val) +bool RadioStation::setProperty(const TQString &pn, const TQString &val) { bool retval = false; if (pn == StationIDElement) { @@ -158,7 +158,7 @@ bool RadioStation::setProperty(const QString &pn, const QString &val) } -QString RadioStation::getProperty(const QString &pn) const +TQString RadioStation::getProperty(const TQString &pn) const { if (pn == StationIDElement) { return m_stationID; @@ -169,16 +169,16 @@ QString RadioStation::getProperty(const QString &pn) const } else if (pn == StationIconStringElement) { return m_iconName; } else if (pn == StationVolumePresetElement) { - return QString().setNum(m_initialVolume); + return TQString().setNum(m_initialVolume); } else { - return QString::null; + return TQString(); } } -QStringList RadioStation::getPropertyNames() const +TQStringList RadioStation::getPropertyNames() const { - QStringList l; + TQStringList l; l.push_back(StationIDElement); l.push_back(StationNameElement); l.push_back(StationShortNameElement); diff --git a/kradio3/src/seekhelper.cpp b/kradio3/src/seekhelper.cpp index eab7c1a..6a26c5d 100644 --- a/kradio3/src/seekhelper.cpp +++ b/kradio3/src/seekhelper.cpp @@ -19,9 +19,9 @@ #include <kdebug.h> -SeekHelper::SeekHelper(ISeekRadio &parent) +SeekHelper::SeekHelper(ISeekRadio &tqparent) : m_state(off), - m_parent(parent), + m_parent(tqparent), m_SoundStreamID(SoundStreamID::InvalidID) { } diff --git a/kradio3/src/soundformat.cpp b/kradio3/src/soundformat.cpp index c3f290b..9ca1b5d 100644 --- a/kradio3/src/soundformat.cpp +++ b/kradio3/src/soundformat.cpp @@ -47,7 +47,7 @@ int SoundFormat::maxValue() const } -void SoundFormat::restoreConfig(const QString &prefix, KConfig *c) +void SoundFormat::restoreConfig(const TQString &prefix, KConfig *c) { m_SampleBits = c->readNumEntry (prefix + "bits", 16); m_IsSigned = c->readBoolEntry(prefix + "sign", true); @@ -59,7 +59,7 @@ void SoundFormat::restoreConfig(const QString &prefix, KConfig *c) } -void SoundFormat::saveConfig(const QString &prefix, KConfig *c) const +void SoundFormat::saveConfig(const TQString &prefix, KConfig *c) const { c->writeEntry(prefix + "bits", m_SampleBits); c->writeEntry(prefix + "sign", m_IsSigned); @@ -87,15 +87,15 @@ int SoundFormat::convertSampleToInt(const char *sample, bool do_scale) const } int scale = (sizeof(unsigned) << 3) - m_SampleBits; - int signmask = do_scale ? (!m_IsSigned << ((sizeof(unsigned) << 3) - 1)) : + int signtqmask = do_scale ? (!m_IsSigned << ((sizeof(unsigned) << 3) - 1)) : (-m_IsSigned << ((size << 3) - 1)) ; if (do_scale) { // map to int number space - return (val << scale) ^ signmask; + return (val << scale) ^ signtqmask; } else { // do only sign extension - if (val & signmask) - val |= signmask; + if (val & signtqmask) + val |= signtqmask; return val; } } @@ -105,9 +105,9 @@ void SoundFormat::convertIntToSample(int src, char *dst, bool is_scaled) const { int size = sampleSize(); int scale = (sizeof(unsigned) * 8) - m_SampleBits; - int signmask = (!m_IsSigned << (sizeof(unsigned) * 8 - 1)); + int signtqmask = (!m_IsSigned << (sizeof(unsigned) * 8 - 1)); - unsigned val = is_scaled ? (src ^ signmask) >> scale : src; + unsigned val = is_scaled ? (src ^ signtqmask) >> scale : src; if (m_Endianess == LITTLE_ENDIAN) { for (int i = 0; i < size; ++i, ++dst) { (unsigned char &)*dst = val & 0xFF; @@ -127,7 +127,7 @@ void SoundFormat::convertSamplesToInts(const char *src, int *dst, size_t n, bool { int size = sampleSize(); int scale = (sizeof(unsigned) * 8) - m_SampleBits; - int signmask = do_scale ? (!m_IsSigned << ((sizeof(unsigned) << 3) - 1)) : + int signtqmask = do_scale ? (!m_IsSigned << ((sizeof(unsigned) << 3) - 1)) : (-m_IsSigned << ((size << 3) - 1)) ; if (m_Endianess == LITTLE_ENDIAN) { src = src - 1 + (size * n); @@ -138,9 +138,9 @@ void SoundFormat::convertSamplesToInts(const char *src, int *dst, size_t n, bool val = (val << 8) | (unsigned char)*src; } if (do_scale) { - *dst = (val << scale) ^ signmask; - } else if (val & signmask) { - *dst = val | signmask; + *dst = (val << scale) ^ signtqmask; + } else if (val & signtqmask) { + *dst = val | signtqmask; } } } else { @@ -150,9 +150,9 @@ void SoundFormat::convertSamplesToInts(const char *src, int *dst, size_t n, bool val = (val << 8) | (unsigned char)*src; } if (do_scale) { - *dst = (val << scale) ^ signmask; - } else if (val & signmask) { - *dst = val | signmask; + *dst = (val << scale) ^ signtqmask; + } else if (val & signtqmask) { + *dst = val | signtqmask; } } } @@ -163,11 +163,11 @@ void SoundFormat::convertIntsToSamples(const int *src, char *dst, size_t n, bool { int size = sampleSize(); int scale = (sizeof(unsigned) * 8) - m_SampleBits; - int signmask = (!m_IsSigned << (sizeof(unsigned) * 8 - 1)); + int signtqmask = (!m_IsSigned << (sizeof(unsigned) * 8 - 1)); if (m_Endianess == LITTLE_ENDIAN) { for (const int *end = src+n; src < end; ++src) { - unsigned val = is_scaled ? ((unsigned)(*src ^ signmask)) >> scale : *src; + unsigned val = is_scaled ? ((unsigned)(*src ^ signtqmask)) >> scale : *src; for (int i = 0; i < size; ++i, ++dst) { (unsigned char &)*dst = val & 0xFF; val >>= 8; @@ -177,7 +177,7 @@ void SoundFormat::convertIntsToSamples(const int *src, char *dst, size_t n, bool dst = dst - 1 + (size * n); const int *end = src; for (src = src - 1 + n; src >= end; --src) { - unsigned val = is_scaled ? ((unsigned)(*src ^ signmask)) >> scale : *src; + unsigned val = is_scaled ? ((unsigned)(*src ^ signtqmask)) >> scale : *src; for (int i = size - 1; i >= 0; --i, --dst) { (unsigned char &)*dst = val & 0xFF; val >>= 8; @@ -192,7 +192,7 @@ void SoundFormat::convertSamplesToFloat(const char *_src, float **_dst, size_t n int sample_size = sampleSize(); int frame_size = frameSize(); int scale = (sizeof(short) << 3) - m_SampleBits; - int signmask = !m_IsSigned << ((sizeof(short) << 3) - 1); + int signtqmask = !m_IsSigned << ((sizeof(short) << 3) - 1); int skip = frame_size - sample_size; if (m_Endianess == LITTLE_ENDIAN) { @@ -206,7 +206,7 @@ void SoundFormat::convertSamplesToFloat(const char *_src, float **_dst, size_t n for (int i = sample_size - 1; i >= 0; --i, --src) { val = (val << 8) | (unsigned char)*src; } - *dst = (float)(signed short)((val << scale) ^ signmask) / 32768.0f; + *dst = (float)(signed short)((val << scale) ^ signtqmask) / 32768.0f; src = src - skip; } } @@ -219,7 +219,7 @@ void SoundFormat::convertSamplesToFloat(const char *_src, float **_dst, size_t n for (int i = 0; i < sample_size; ++i, ++src) { val = (val << 8) | (unsigned char)*src; } - *dst = (float)(signed short)((val << scale) ^ signmask) / 32768.0f; + *dst = (float)(signed short)((val << scale) ^ signtqmask) / 32768.0f; src = src + skip; } } @@ -233,7 +233,7 @@ void SoundFormat::convertFloatsToSamples(const float **_src, char *_dst, size_t int sample_size = sampleSize(); int frame_size = frameSize(); int scale = (sizeof(short) << 3) - m_SampleBits; - int signmask = (!m_IsSigned << (sizeof(short) << 3) - 1); + int signtqmask = (!m_IsSigned << (sizeof(short) << 3) - 1); int skip = frame_size - sample_size; if (m_Endianess == LITTLE_ENDIAN) { @@ -241,7 +241,7 @@ void SoundFormat::convertFloatsToSamples(const float **_src, char *_dst, size_t const float *src = _src[ch]; char *dst = _dst + ch * sample_size; for (const float *end = src+n; src < end; ++src) { - unsigned val = (( ((unsigned)(*src * 32768.0f)) ^ signmask)) >> scale; + unsigned val = (( ((unsigned)(*src * 32768.0f)) ^ signtqmask)) >> scale; for (int i = 0; i < sample_size; ++i, ++dst) { (unsigned char &)*dst = val & 0xFF; val >>= 8; @@ -256,7 +256,7 @@ void SoundFormat::convertFloatsToSamples(const float **_src, char *_dst, size_t const float *src = _src[ch]; const float *end = src; for (src = src - 1 + n; src >= end; --src) { - unsigned val = (( ((unsigned)(*src * 32768.0f)) ^ signmask)) >> scale; + unsigned val = (( ((unsigned)(*src * 32768.0f)) ^ signtqmask)) >> scale; for (int i = sample_size - 1; i >= 0; --i, --dst) { (unsigned char &)*dst = val & 0xFF; val >>= 8; diff --git a/kradio3/src/soundstreamclient_interfaces.cpp b/kradio3/src/soundstreamclient_interfaces.cpp index c030ec4..943276c 100644 --- a/kradio3/src/soundstreamclient_interfaces.cpp +++ b/kradio3/src/soundstreamclient_interfaces.cpp @@ -27,7 +27,7 @@ const char *dev_urandom = "/dev/urandom"; void ISoundStreamServer::noticeConnectedI(cmplInterface *i, bool pointer_valid) { - for (QPtrListIterator<cmplInterface> it(iConnections); it.current(); ++it) { + for (TQPtrListIterator<cmplInterface> it(iConnections); it.current(); ++it) { it.current()->noticeConnectedSoundClient(i, pointer_valid); cmplInterface *x = it.current(); if (x != i && pointer_valid) @@ -37,7 +37,7 @@ void ISoundStreamServer::noticeConnectedI(cmplInterface *i, bool pointer_valid) void ISoundStreamServer::noticeDisconnectedI(cmplInterface *i, bool pointer_valid) { - for (QPtrListIterator<cmplInterface> it(iConnections); it.current(); ++it) { + for (TQPtrListIterator<cmplInterface> it(iConnections); it.current(); ++it) { it.current()->noticeDisconnectedSoundClient(i, pointer_valid); cmplInterface *x = it.current(); if (x != i && pointer_valid) @@ -47,20 +47,20 @@ void ISoundStreamServer::noticeDisconnectedI(cmplInterface *i, bool pointer_vali -QPtrList<ISoundStreamClient> ISoundStreamServer::getPlaybackMixers() const +TQPtrList<ISoundStreamClient> ISoundStreamServer::getPlaybackMixers() const { - QPtrList<ISoundStreamClient> tmp; - for (QPtrListIterator<ISoundStreamClient> it(iConnections); it.current(); ++it) { + TQPtrList<ISoundStreamClient> tmp; + for (TQPtrListIterator<ISoundStreamClient> it(iConnections); it.current(); ++it) { if (it.current()->supportsPlayback()) tmp.append(it.current()); } return tmp; } -QPtrList<ISoundStreamClient> ISoundStreamServer::getCaptureMixers() const +TQPtrList<ISoundStreamClient> ISoundStreamServer::getCaptureMixers() const { - QPtrList<ISoundStreamClient> tmp; - for (QPtrListIterator<ISoundStreamClient> it(iConnections); it.current(); ++it) { + TQPtrList<ISoundStreamClient> tmp; + for (TQPtrListIterator<ISoundStreamClient> it(iConnections); it.current(); ++it) { if (it.current()->supportsCapture()) tmp.append(it.current()); } @@ -196,18 +196,18 @@ IF_IMPL_SENDER_FINE ( ISoundStreamServer, queryIsMuted, (SoundStreamID id, bool isMuted(id, m) ); -IF_IMPL_SENDER_FINE ( ISoundStreamServer, notifyPlaybackChannelsChanged, (const QString &client_id, const QStringList &map), +IF_IMPL_SENDER_FINE ( ISoundStreamServer, notifyPlaybackChannelsChanged, (const TQString &client_id, const TQStringList &map), noticePlaybackChannelsChanged(client_id, map) ); -IF_IMPL_SENDER_FINE ( ISoundStreamServer, notifyCaptureChannelsChanged, (const QString &client_id, const QStringList &map), +IF_IMPL_SENDER_FINE ( ISoundStreamServer, notifyCaptureChannelsChanged, (const TQString &client_id, const TQStringList &map), noticeCaptureChannelsChanged (client_id, map) ); -IF_IMPL_SENDER_FINE ( ISoundStreamServer, querySoundStreamDescription, (SoundStreamID id, QString &descr), +IF_IMPL_SENDER_FINE ( ISoundStreamServer, querySoundStreamDescription, (SoundStreamID id, TQString &descr), getSoundStreamDescription(id, descr) ); IF_IMPL_SENDER_FINE ( ISoundStreamServer, querySoundStreamRadioStation, (SoundStreamID id, const RadioStation *&rs), getSoundStreamRadioStation(id, rs) ); -IF_IMPL_SENDER_FINE ( ISoundStreamServer, queryEnumerateSoundStreams, (QMap<QString, SoundStreamID> &list), +IF_IMPL_SENDER_FINE ( ISoundStreamServer, queryEnumerateSoundStreams, (TQMap<TQString, SoundStreamID> &list), enumerateSoundStreams(list) ); @@ -228,26 +228,26 @@ ISoundStreamClient::~ISoundStreamClient() { } -QString ISoundStreamClient::createNewSoundStreamClientID() +TQString ISoundStreamClient::createNewSoundStreamClientID() { const int buffersize = 32; unsigned char buffer[buffersize]; - QString stime, srandom = QString::null; + TQString stime, srandom = TQString(); stime.setNum(time(NULL)); int fd = open (dev_urandom, O_RDONLY); read(fd, buffer, buffersize); close(fd); for (int i = 0; i < buffersize; ++i) - srandom += QString().sprintf("%02X", (unsigned int)buffer[i]); + srandom += TQString().sprintf("%02X", (unsigned int)buffer[i]); return stime + srandom; } -void ISoundStreamClient::setSoundStreamClientID(const QString &s) +void ISoundStreamClient::setSoundStreamClientID(const TQString &s) { ISoundStreamServer *server = getSoundStreamServer(); if (server) @@ -258,7 +258,7 @@ void ISoundStreamClient::setSoundStreamClientID(const QString &s) } -const QString &ISoundStreamClient::getSoundStreamClientID() const +const TQString &ISoundStreamClient::getSoundStreamClientID() const { return m_SoundStreamClientID; } @@ -304,30 +304,30 @@ void ISoundStreamClient::closeSoundStream(SoundStreamID id, bool notify) } -static const QStringList emptyList; +static const TQStringList emptyList; -const QStringList &ISoundStreamClient::getPlaybackChannels() const +const TQStringList &ISoundStreamClient::getPlaybackChannels() const { return emptyList; } -const QStringList &ISoundStreamClient::getCaptureChannels() const +const TQStringList &ISoundStreamClient::getCaptureChannels() const { return emptyList; } -static const QMap<QString, ISoundStreamClient *> emptyClientMap; -QMap<QString, ISoundStreamClient *> ISoundStreamClient::getPlaybackClients() const +static const TQMap<TQString, ISoundStreamClient *> emptyClientMap; +TQMap<TQString, ISoundStreamClient *> ISoundStreamClient::getPlaybackClients() const { return iConnections.count() ? iConnections.getFirst()->getPlaybackClients() : emptyClientMap; } -QMap<QString, ISoundStreamClient *> ISoundStreamServer::getPlaybackClients() const +TQMap<TQString, ISoundStreamClient *> ISoundStreamServer::getPlaybackClients() const { - QMap<QString, ISoundStreamClient *> map; - for (QPtrListIterator<ISoundStreamClient> it(ISoundStreamServer::iConnections); it.current(); ++it) { + TQMap<TQString, ISoundStreamClient *> map; + for (TQPtrListIterator<ISoundStreamClient> it(ISoundStreamServer::iConnections); it.current(); ++it) { if (it.current()->supportsPlayback()) map.insert(it.current()->getSoundStreamClientID(), it.current()); } @@ -336,16 +336,16 @@ QMap<QString, ISoundStreamClient *> ISoundStreamServer::getPlaybackClients() con -static const QMap<QString, QString> emptyClientDescrMap; -QMap<QString, QString> ISoundStreamClient::getPlaybackClientDescriptions() const +static const TQMap<TQString, TQString> emptyClientDescrMap; +TQMap<TQString, TQString> ISoundStreamClient::getPlaybackClientDescriptions() const { return iConnections.count() ? iConnections.getFirst()->getPlaybackClientDescriptions() : emptyClientDescrMap; } -QMap<QString, QString> ISoundStreamServer::getPlaybackClientDescriptions() const +TQMap<TQString, TQString> ISoundStreamServer::getPlaybackClientDescriptions() const { - QMap<QString, QString> map; - for (QPtrListIterator<ISoundStreamClient> it(ISoundStreamServer::iConnections); it.current(); ++it) { + TQMap<TQString, TQString> map; + for (TQPtrListIterator<ISoundStreamClient> it(ISoundStreamServer::iConnections); it.current(); ++it) { if (it.current()->supportsPlayback()) map.insert(it.current()->getSoundStreamClientID(), it.current()->getSoundStreamClientDescription()); } @@ -355,16 +355,16 @@ QMap<QString, QString> ISoundStreamServer::getPlaybackClientDescriptions() const -QMap<QString, ISoundStreamClient *> ISoundStreamClient::getCaptureClients() const +TQMap<TQString, ISoundStreamClient *> ISoundStreamClient::getCaptureClients() const { return iConnections.count() ? iConnections.getFirst()->getCaptureClients() : emptyClientMap; } -QMap<QString, ISoundStreamClient *> ISoundStreamServer::getCaptureClients() const +TQMap<TQString, ISoundStreamClient *> ISoundStreamServer::getCaptureClients() const { - QMap<QString, ISoundStreamClient *> map; - for (QPtrListIterator<ISoundStreamClient> it(ISoundStreamServer::iConnections); it.current(); ++it) { + TQMap<TQString, ISoundStreamClient *> map; + for (TQPtrListIterator<ISoundStreamClient> it(ISoundStreamServer::iConnections); it.current(); ++it) { if (it.current()->supportsCapture()) map.insert(it.current()->getSoundStreamClientID(), it.current()); } @@ -374,15 +374,15 @@ QMap<QString, ISoundStreamClient *> ISoundStreamServer::getCaptureClients() cons -QMap<QString, QString> ISoundStreamClient::getCaptureClientDescriptions() const +TQMap<TQString, TQString> ISoundStreamClient::getCaptureClientDescriptions() const { return iConnections.count() ? iConnections.getFirst()->getCaptureClientDescriptions() : emptyClientDescrMap; } -QMap<QString, QString> ISoundStreamServer::getCaptureClientDescriptions() const +TQMap<TQString, TQString> ISoundStreamServer::getCaptureClientDescriptions() const { - QMap<QString, QString> map; - for (QPtrListIterator<ISoundStreamClient> it(ISoundStreamServer::iConnections); it.current(); ++it) { + TQMap<TQString, TQString> map; + for (TQPtrListIterator<ISoundStreamClient> it(ISoundStreamServer::iConnections); it.current(); ++it) { if (it.current()->supportsCapture()) map.insert(it.current()->getSoundStreamClientID(), it.current()->getSoundStreamClientDescription()); } @@ -393,15 +393,15 @@ QMap<QString, QString> ISoundStreamServer::getCaptureClientDescriptions() const -ISoundStreamClient *ISoundStreamClient::getSoundStreamClientWithID(const QString &search_id) const +ISoundStreamClient *ISoundStreamClient::getSoundStreamClientWithID(const TQString &search_id) const { return iConnections.count() ? iConnections.getFirst()->getSoundStreamClientWithID(search_id) : NULL; } -ISoundStreamClient *ISoundStreamServer::getSoundStreamClientWithID(const QString &search_id) const +ISoundStreamClient *ISoundStreamServer::getSoundStreamClientWithID(const TQString &search_id) const { - for (QPtrListIterator<ISoundStreamClient> it(ISoundStreamServer::iConnections); it.current(); ++it) { - const QString &id = it.current()->getSoundStreamClientID(); + for (TQPtrListIterator<ISoundStreamClient> it(ISoundStreamServer::iConnections); it.current(); ++it) { + const TQString &id = it.current()->getSoundStreamClientID(); if (id == search_id) return it.current(); } @@ -416,11 +416,11 @@ void ISoundStreamClient::noticeDisconnectedSoundClient(thisInterface */*i*/, boo { } -static const QPtrList<ISoundStreamClient> emptyClientList; -IF_IMPL_QUERY ( QPtrList<ISoundStreamClient> ISoundStreamClient::queryPlaybackMixers(), +static const TQPtrList<ISoundStreamClient> emptyClientList; +IF_IMPL_TQUERY ( TQPtrList<ISoundStreamClient> ISoundStreamClient::queryPlaybackMixers(), getPlaybackMixers(), emptyClientList ); -IF_IMPL_QUERY ( QPtrList<ISoundStreamClient> ISoundStreamClient::queryCaptureMixers(), +IF_IMPL_TQUERY ( TQPtrList<ISoundStreamClient> ISoundStreamClient::queryCaptureMixers(), getPlaybackMixers(), emptyClientList ); diff --git a/kradio3/src/soundstreamid.cpp b/kradio3/src/soundstreamid.cpp index 1c9cfed..f1905e9 100644 --- a/kradio3/src/soundstreamid.cpp +++ b/kradio3/src/soundstreamid.cpp @@ -62,7 +62,7 @@ SoundStreamID SoundStreamID::createNewID(const SoundStreamID &oldID) } -void SoundStreamID::invalidate() +void SoundStreamID::tqinvalidate() { m_ID = 0; m_PhysicalID = 0; diff --git a/kradio3/src/standardscandialog-ui.ui b/kradio3/src/standardscandialog-ui.ui index ba7b98e..47e084e 100644 --- a/kradio3/src/standardscandialog-ui.ui +++ b/kradio3/src/standardscandialog-ui.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>StandardScanDialogUI</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>StandardScanDialogUI</cstring> </property> @@ -22,7 +22,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QProgressBar" row="0" column="0"> + <widget class="TQProgressBar" row="0" column="0"> <property name="name"> <cstring>progressBar</cstring> </property> @@ -36,9 +36,9 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget" row="2" column="0"> + <widget class="TQLayoutWidget" row="2" column="0"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> @@ -54,14 +54,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>100</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -79,7 +79,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>70</width> <height>20</height> @@ -88,15 +88,15 @@ </spacer> </hbox> </widget> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>labelTimeDescr</cstring> </property> @@ -104,7 +104,7 @@ <string>remaining time</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>labelTime</cstring> </property> @@ -130,7 +130,7 @@ </includes> <variables> </variables> -<slots> -</slots> -<layoutdefaults spacing="6" margin="11"/> +<Q_SLOTS> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kradio3/src/standardscandialog.cpp b/kradio3/src/standardscandialog.cpp index 32d5308..cccfac0 100644 --- a/kradio3/src/standardscandialog.cpp +++ b/kradio3/src/standardscandialog.cpp @@ -18,23 +18,23 @@ #include "include/standardscandialog.h" #include "include/radiostation.h" -#include <qprogressbar.h> -#include <qlabel.h> -#include <qpushbutton.h> +#include <tqprogressbar.h> +#include <tqlabel.h> +#include <tqpushbutton.h> #include <klocale.h> #include <math.h> -StandardScanDialog::StandardScanDialog(QWidget *parent) - : StandardScanDialogUI(parent, NULL, true), +StandardScanDialog::StandardScanDialog(TQWidget *tqparent) + : StandardScanDialogUI(tqparent, NULL, true), m_count(0), m_running(false), m_oldPowerOn(false), m_oldStation(NULL), m_ignorePower(false) { - QObject::connect(buttonCancel, SIGNAL(clicked()), this, SLOT(slotCancelDone())); + TQObject::connect(buttonCancel, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCancelDone())); } @@ -67,7 +67,7 @@ void StandardScanDialog::start() if (!m_running) { m_running = true; m_stations.all().clear(); - m_startTime = QDateTime::currentDateTime(); + m_startTime = TQDateTime::tqcurrentDateTime(); m_oldPowerOn = queryIsPowerOn(); m_oldStation = queryCurrentStation().copy(); sendToBeginning(); @@ -110,7 +110,7 @@ bool StandardScanDialog::noticeSeekFinished (const RadioStation &, bool goodQual { if (goodQuality) { ++m_count; - QString s; + TQString s; s.setNum(m_count); RadioStation *st = queryCurrentStation().copy(); @@ -153,11 +153,11 @@ bool StandardScanDialog::noticeProgress (float f) progressBar->setProgress((int)rint(f * 100)); if (m_running) { - int secs = m_startTime.secsTo(QDateTime::currentDateTime()); + int secs = m_startTime.secsTo(TQDateTime::tqcurrentDateTime()); int ms = (int)rint((1 - f) * (float) secs / f * 1000.0); if (ms > 0 && ms < 86400000) // max one day - labelTime->setText(i18n("<p align=\"right\">%1</p>").arg(QTime(0,0).addMSecs(ms).toString())); + labelTime->setText(i18n("<p align=\"right\">%1</p>").tqarg(TQTime(0,0).addMSecs(ms).toString())); else labelTime->setText(i18n("unknown")); diff --git a/kradio3/src/station-drag-object.cpp b/kradio3/src/station-drag-object.cpp index f951d54..b3fecb7 100644 --- a/kradio3/src/station-drag-object.cpp +++ b/kradio3/src/station-drag-object.cpp @@ -21,14 +21,14 @@ #define STATION_LIST_MIME_TYPE "multimedia/kradio-stationids" -StationDragObject::StationDragObject(const QStringList &stationIDs, QWidget *dragSource, const char * name) - : QStoredDrag(STATION_LIST_MIME_TYPE, dragSource, name) +StationDragObject::StationDragObject(const TQStringList &stationIDs, TQWidget *dragSource, const char * name) + : TQStoredDrag(STATION_LIST_MIME_TYPE, dragSource, name) { setStations(stationIDs); } -StationDragObject::StationDragObject(QWidget *dragSource, const char * name) - : QStoredDrag(STATION_LIST_MIME_TYPE, dragSource, name) +StationDragObject::StationDragObject(TQWidget *dragSource, const char * name) + : TQStoredDrag(STATION_LIST_MIME_TYPE, dragSource, name) { } @@ -46,12 +46,12 @@ const char *StationDragObject::format(int i) const } -void StationDragObject::setStations(const QStringList &stationIDs) +void StationDragObject::setStations(const TQStringList &stationIDs) { - QByteArray tmp; + TQByteArray tmp; int pos = 0; - for (QValueListConstIterator<QString> it=stationIDs.begin(); it != stationIDs.end(); ++it) { - const QString &s = *it; + for (TQValueListConstIterator<TQString> it=stationIDs.begin(); it != stationIDs.end(); ++it) { + const TQString &s = *it; tmp.resize(tmp.size()+s.length() + 1); for (unsigned int k = 0; k < s.length(); ++k) { tmp[pos++] = s[k].latin1(); @@ -62,22 +62,22 @@ void StationDragObject::setStations(const QStringList &stationIDs) } -bool StationDragObject::canDecode (const QMimeSource *e) +bool StationDragObject::canDecode (const TQMimeSource *e) { IErrorLogClient::staticLogDebug(e->format(0)); - bool retval = (e && e->format(0) == QString(STATION_LIST_MIME_TYPE)); + bool retval = (e && e->format(0) == TQString(STATION_LIST_MIME_TYPE)); if (retval) IErrorLogClient::staticLogDebug(i18n("canDecode = true")); return retval; } -bool StationDragObject::decode (const QMimeSource *e, QStringList &stationIDs) +bool StationDragObject::decode (const TQMimeSource *e, TQStringList &stationIDs) { stationIDs.clear(); if (canDecode(e)) { - const QByteArray &tmp = e->encodedData(e->format(0)); - QString str = ""; + const TQByteArray &tmp = e->tqencodedData(e->format(0)); + TQString str = ""; for (unsigned int pos = 0; pos < tmp.size(); ++pos) { if (tmp[pos]) { str.append(tmp[pos]); diff --git a/kradio3/src/stationlist.cpp b/kradio3/src/stationlist.cpp index f0f0ace..737fd72 100644 --- a/kradio3/src/stationlist.cpp +++ b/kradio3/src/stationlist.cpp @@ -22,10 +22,10 @@ #include "include/stationlistxmlhandler.h" #include "include/kradioversion.h" -#include <qstring.h> -#include <qfile.h> -#include <qiodevice.h> -#include <qmessagebox.h> +#include <tqstring.h> +#include <tqfile.h> +#include <tqiodevice.h> +#include <tqmessagebox.h> #include <kio/netaccess.h> #include <ktempfile.h> #include <klocale.h> @@ -43,7 +43,7 @@ RawStationList::RawStationList () RawStationList::RawStationList (const RawStationList &sl) - : QPtrList<RadioStation>(sl) + : TQPtrList<RadioStation>(sl) { setAutoDelete(true); } @@ -55,7 +55,7 @@ RawStationList::~RawStationList () } -QPtrCollection::Item RawStationList::newItem (QPtrCollection::Item s) +TQPtrCollection::Item RawStationList::newItem (TQPtrCollection::Item s) { if (s) return ((RadioStation*)s)->copy(); @@ -64,14 +64,14 @@ QPtrCollection::Item RawStationList::newItem (QPtrCollection::Item s) } -void RawStationList::deleteItem (QPtrCollection::Item s) +void RawStationList::deleteItem (TQPtrCollection::Item s) { if (autoDelete()) delete (RadioStation*)s; } -int RawStationList::compareItems(QPtrCollection::Item a, QPtrCollection::Item b) +int RawStationList::compareItems(TQPtrCollection::Item a, TQPtrCollection::Item b) { if (!a && !b) return 0; @@ -104,7 +104,7 @@ bool RawStationList::insert (const RadioStation * item ) if (!item) return false; int idx = idxWithID(item->stationID()); if (idx >= 0) { - return replace(idx, item); + return tqreplace(idx, item); } else { append(item); return true; @@ -145,11 +145,11 @@ void RawStationList::append ( const RadioStation * item ) } -bool RawStationList::replace ( uint index, const RadioStation * item ) +bool RawStationList::tqreplace ( uint index, const RadioStation * item ) { bool r = true; RadioStation *rs = &stationWithID(item->stationID()); - r = BaseClass::replace(index, item); + r = BaseClass::tqreplace(index, item); if (rs != item) { BaseClass::removeRef(rs); } @@ -157,7 +157,7 @@ bool RawStationList::replace ( uint index, const RadioStation * item ) } -const RadioStation &RawStationList::stationWithID(const QString &sid) const +const RadioStation &RawStationList::stationWithID(const TQString &sid) const { Iterator it(*this); for (; const RadioStation *s = it.current(); ++it) { @@ -168,7 +168,7 @@ const RadioStation &RawStationList::stationWithID(const QString &sid) const } -RadioStation &RawStationList::stationWithID(const QString &sid) +RadioStation &RawStationList::stationWithID(const TQString &sid) { Iterator it(*this); for (; RadioStation *s = it.current(); ++it) { @@ -180,7 +180,7 @@ RadioStation &RawStationList::stationWithID(const QString &sid) -int RawStationList::idxWithID(const QString &sid) const +int RawStationList::idxWithID(const TQString &sid) const { int i = 0; Iterator it(*this); @@ -194,8 +194,8 @@ int RawStationList::idxWithID(const QString &sid) const bool RawStationList::operator == (const RawStationList &l) const { - QPtrListIterator<RadioStation> it1(*this); - QPtrListIterator<RadioStation> it2(l); + TQPtrListIterator<RadioStation> it1(*this); + TQPtrListIterator<RadioStation> it2(l); if (count() != l.count()) return false; for (; it1.current() && it2.current(); ++it1, ++it2) { @@ -235,29 +235,29 @@ void StationList::merge(const StationList & other) if (! m_metaData.comment.isEmpty()) m_metaData.comment += "\n"; - m_metaData.lastChange = QDateTime::currentDateTime(); + m_metaData.lastChange = TQDateTime::tqcurrentDateTime(); if (!metaData.maintainer.isEmpty()) - m_metaData.maintainer += (count() ? QString(" / ") : QString::null) + metaData.maintainer; + m_metaData.maintainer += (count() ? TQString(" / ") : TQString()) + metaData.maintainer; if (!metaData.country.isEmpty()) - m_metaData.country += (count() ? QString(" / ") : QString::null) + metaData.country; + m_metaData.country += (count() ? TQString(" / ") : TQString()) + metaData.country; if (!metaData.city.isEmpty()) - m_metaData.city = (count() ? QString(" / ") : QString::null) + metaData.city; + m_metaData.city = (count() ? TQString(" / ") : TQString()) + metaData.city; if (!metaData.media.isEmpty()) - m_metaData.media += (count() ? QString(" / ") : QString::null) + metaData.media; + m_metaData.media += (count() ? TQString(" / ") : TQString()) + metaData.media; if (!metaData.comment.isEmpty()) - m_metaData.comment += (count() ? QString(" / ") : QString::null) + metaData.comment; + m_metaData.comment += (count() ? TQString(" / ") : TQString()) + metaData.comment; if (count() && other.count()) m_metaData.comment += " " + i18n("Contains merged Data"); // merge stations - QPtrListIterator<RadioStation> it(other.all()); + TQPtrListIterator<RadioStation> it(other.all()); for (RadioStation *s = it.current(); s; s = ++it) { m_all.insert(s); } @@ -289,29 +289,29 @@ RadioStation &StationList::at(int idx) } -const RadioStation &StationList::stationWithID(const QString &sid) const +const RadioStation &StationList::stationWithID(const TQString &sid) const { return m_all.stationWithID(sid); } -RadioStation &StationList::stationWithID(const QString &sid) +RadioStation &StationList::stationWithID(const TQString &sid) { return m_all.stationWithID(sid); } -bool StationList::readXML (const QString &dat, const IErrorLogClient &logger, bool enableMessageBox) +bool StationList::readXML (const TQString &dat, const IErrorLogClient &logger, bool enableMessageBox) { // FIXME: TODO: error handling - QXmlInputSource source; + TQXmlInputSource source; source.setData(dat); - QXmlSimpleReader reader; + TQXmlSimpleReader reader; StationListXmlHandler handler(logger); reader.setContentHandler (&handler); if (reader.parse(source)) { if (handler.wasCompatMode() && enableMessageBox) { - QMessageBox::information(NULL, "KRadio", + TQMessageBox::information(NULL, "KRadio", i18n("Probably an old station preset file was read.\n" "You have to rebuild your station selections for " "the quickbar and the docking menu.") @@ -325,7 +325,7 @@ bool StationList::readXML (const QString &dat, const IErrorLogClient &logger, bo logger.logError("StationList::readXML: " + i18n("parsing failed")); if (enableMessageBox) { - QMessageBox::warning(NULL, "KRadio", + TQMessageBox::warning(NULL, "KRadio", i18n("Parsing the station preset file failed.\n" "See console output for more details.")); } @@ -336,17 +336,17 @@ bool StationList::readXML (const QString &dat, const IErrorLogClient &logger, bo bool StationList::readXML (const KURL &url, const IErrorLogClient &logger, bool enableMessageBox) { - QString tmpfile; + TQString tmpfile; if (!KIO::NetAccess::download(url, tmpfile, NULL)) { if (enableMessageBox) { logger.logError("StationList::readXML: " + - i18n("error downloading preset file %1").arg(url.url())); - QMessageBox::warning(NULL, "KRadio", + i18n("error downloading preset file %1").tqarg(url.url())); + TQMessageBox::warning(NULL, "KRadio", i18n("Download of the station preset file at %1 failed.") - .arg(url.url())); + .tqarg(url.url())); } else { logger.logWarning("StationList::readXML: " + - i18n("error downloading preset file %1").arg(url.url())); + i18n("error downloading preset file %1").tqarg(url.url())); } return false; } @@ -354,40 +354,40 @@ bool StationList::readXML (const KURL &url, const IErrorLogClient &logger, bool logger.logDebug("StationList::readXML: " + i18n("temporary file: ") + tmpfile); - QFile presetFile (tmpfile); + TQFile presetFile (tmpfile); if (! presetFile.open(IO_ReadOnly)) { logger.logError("StationList::readXML: " + - i18n("error opening preset file %1").arg(tmpfile)); + i18n("error opening preset file %1").tqarg(tmpfile)); if (enableMessageBox) { - QMessageBox::warning(NULL, "KRadio", + TQMessageBox::warning(NULL, "KRadio", i18n("Opening of the station preset file at %1 failed.") - .arg(tmpfile)); + .tqarg(tmpfile)); } return false; } - QString xmlData; + TQString xmlData; // make sure that qtextstream is gone when we close presetFile - QString tmp; + TQString tmp; { - QTextStream ins(&presetFile); + TQTextStream ins(&presetFile); tmp = ins.read(); } presetFile.reset(); // preset file written with kradio <= 0.2.x - if (tmp.find("<format>") < 0) { + if (tmp.tqfind("<format>") < 0) { logger.logInfo(i18n("Old Preset File Format detected")); - QTextStream ins(&presetFile); - ins.setEncoding(QTextStream::Locale); + TQTextStream ins(&presetFile); + ins.setEncoding(TQTextStream::Locale); xmlData = ins.read(); } // preset file written with kradio >= 0.3.0 else { - QXmlInputSource tmp(&presetFile); + TQXmlInputSource tmp(TQT_TQIODEVICE(&presetFile)); xmlData = tmp.data(); } @@ -399,15 +399,15 @@ bool StationList::readXML (const KURL &url, const IErrorLogClient &logger, bool } -QString StationList::writeXML (const IErrorLogClient &/*logger*/) const +TQString StationList::writeXML (const IErrorLogClient &/*logger*/) const { - QString data = QString::null; + TQString data = TQString(); // write station list - QString t = "\t"; - QString tt = "\t\t"; - QString ttt = "\t\t\t"; + TQString t = "\t"; + TQString tt = "\t\t"; + TQString ttt = "\t\t\t"; data += xmlOpenTag(KRadioConfigElement) + t + xmlOpenTag(StationListElement) + @@ -427,9 +427,9 @@ QString StationList::writeXML (const IErrorLogClient &/*logger*/) const data += tt + xmlOpenTag (s->getClassName()); - QStringList properties = s->getPropertyNames(); - QStringList::iterator end = properties.end(); - for (QStringList::iterator sit = properties.begin(); sit != end; ++sit) { + TQStringList properties = s->getPropertyNames(); + TQStringList::iterator end = properties.end(); + for (TQStringList::iterator sit = properties.begin(); sit != end; ++sit) { data += ttt + xmlTag (*sit, s->getProperty(*sit)); } data += tt + xmlCloseTag(s->getClassName()); @@ -447,22 +447,22 @@ bool StationList::writeXML (const KURL &url, const IErrorLogClient &logger, bool { 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); outs << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl; - QString output = writeXML(logger); + TQString output = writeXML(logger); outs << output; if (outf->status() != IO_Ok) { logger.logError("StationList::writeXML: " + - i18n("error writing to tempfile %1").arg(tmpFile.name())); + i18n("error writing to tempfile %1").tqarg(tmpFile.name())); if (enableMessageBox) { - QMessageBox::warning(NULL, "KRadio", + TQMessageBox::warning(NULL, "KRadio", i18n("Writing station preset file %1 failed.") - .arg(tmpFile.name())); + .tqarg(tmpFile.name())); } return false; } @@ -472,19 +472,19 @@ bool StationList::writeXML (const KURL &url, const IErrorLogClient &logger, bool if (count() <= 1) { logger.logWarning("StationList::writeXML: " + - i18n("uploading preset file %1: ").arg(url.url())); + i18n("uploading preset file %1: ").tqarg(url.url())); logger.logWarning("StationList::writeXML: " + - i18n("something strange happend, station list has only %1 entries. Writing station preset file skipped").arg(count())); + i18n("something strange happend, station list has only %1 entries. Writing station preset file skipped").tqarg(count())); } else { if (!KIO::NetAccess::upload(tmpFile.name(), url, NULL)) { logger.logError("StationList::writeXML: " + - i18n("error uploading preset file %1").arg(url.url())); + i18n("error uploading preset file %1").tqarg(url.url())); if (enableMessageBox) { - QMessageBox::warning(NULL, "KRadio", + TQMessageBox::warning(NULL, "KRadio", i18n("Upload of station preset file to %1 failed.") - .arg(url.url())); + .tqarg(url.url())); } return false; } diff --git a/kradio3/src/stationlistxmlhandler.cpp b/kradio3/src/stationlistxmlhandler.cpp index 71fb78e..0e303da 100644 --- a/kradio3/src/stationlistxmlhandler.cpp +++ b/kradio3/src/stationlistxmlhandler.cpp @@ -62,13 +62,13 @@ bool StationListXmlHandler::startDocument () #define START_ELEMENT_ERROR m_logger.logError("StationListXmlHandler::startElement: " + \ i18n("misplaced element %1") \ - .arg(qname));\ + .tqarg(qname));\ return false; -bool StationListXmlHandler::startElement (const QString &/*ns*/, const QString &/*localname*/, - const QString& _qname, const QXmlAttributes &) +bool StationListXmlHandler::startElement (const TQString &/*ns*/, const TQString &/*localname*/, + const TQString& _qname, const TQXmlAttributes &) { - QString qname = _qname; + TQString qname = _qname; if (qname == KRadioConfigElement) { if (m_status.size()) { START_ELEMENT_ERROR } @@ -113,7 +113,7 @@ bool StationListXmlHandler::startElement (const QString &/*ns*/, const QString & } else { // unknown m_logger.logWarning("StationListXmlHandler::startElement: " + - i18n("unknown or unexpected element %1").arg(qname)); + i18n("unknown or unexpected element %1").tqarg(qname)); } m_status.push_back(qname); @@ -121,10 +121,10 @@ bool StationListXmlHandler::startElement (const QString &/*ns*/, const QString & } -bool StationListXmlHandler::endElement (const QString &/*ns*/, const QString &/*localname*/, - const QString &_qname) +bool StationListXmlHandler::endElement (const TQString &/*ns*/, const TQString &/*localname*/, + const TQString &_qname) { - QString qname = _qname; + TQString qname = _qname; if (qname == compatStationElement) { qname = "FrequencyRadioStation"; m_compatMode = true; @@ -143,10 +143,10 @@ bool StationListXmlHandler::endElement (const QString &/*ns*/, const QString &/* if (m_status.size()) { m_logger.logError("StationListXmlHandler::endElement: " + i18n("expected element %1, but found %2") - .arg(m_status.back()).arg(qname)); + .tqarg(m_status.back()).tqarg(qname)); } else { m_logger.logError("StationListXmlHandler::endElement: " + - i18n("unexpected element %1").arg(qname)); + i18n("unexpected element %1").tqarg(qname)); } } return true; @@ -155,13 +155,13 @@ bool StationListXmlHandler::endElement (const QString &/*ns*/, const QString &/* #define CHARACTERS_ERROR m_logger.logError("StationListXmlHandler::characters: " + \ i18n("invalid data for element %1") \ - .arg(stat)); \ + .tqarg(stat)); \ return false; -bool StationListXmlHandler::characters (const QString &ch) +bool StationListXmlHandler::characters (const TQString &ch) { - QString stat = m_status.back(); - QString str = ch.stripWhiteSpace(); + TQString stat = m_status.back(); + TQString str = ch.stripWhiteSpace(); // Station parsing @@ -169,7 +169,7 @@ bool StationListXmlHandler::characters (const QString &ch) if (stat == StationListFormat) { if (str != STATION_LIST_FORMAT) { - m_logger.logError(i18n("found a station list with unknown format %1").arg(str)); + m_logger.logError(i18n("found a station list with unknown format %1").tqarg(str)); return false; } @@ -197,7 +197,7 @@ bool StationListXmlHandler::characters (const QString &ch) } else if (stat == StationListInfoChanged) { - m_metaData.lastChange = QDateTime::fromString(str, Qt::ISODate); + m_metaData.lastChange = TQDateTime::fromString(str, Qt::ISODate); } else if (stat == StationListInfoCreator) { @@ -210,13 +210,13 @@ bool StationListXmlHandler::characters (const QString &ch) if (!m_newStation->setProperty(stat, str)) { m_logger.logWarning("StationListXmlHandler::characters: " + i18n("unknown property %1 for class %2") - .arg(stat) - .arg(m_newStation->getClassName())); + .tqarg(stat) + .tqarg(m_newStation->getClassName())); } } else if (str.length()) { m_logger.logError("StationListXmlHandler::characters: " + - i18n("characters ignored for element %1").arg(stat)); + i18n("characters ignored for element %1").tqarg(stat)); } return true; } diff --git a/kradio3/src/stationselection_interfaces.cpp b/kradio3/src/stationselection_interfaces.cpp index b8d6fe9..4cdc84d 100644 --- a/kradio3/src/stationselection_interfaces.cpp +++ b/kradio3/src/stationselection_interfaces.cpp @@ -16,19 +16,19 @@ ***************************************************************************/ #include "include/stationselection_interfaces.h" -#include <qstringlist.h> +#include <tqstringlist.h> -IF_IMPL_SENDER ( IStationSelection::notifyStationSelectionChanged(const QStringList &sl), +IF_IMPL_SENDER ( IStationSelection::notifyStationSelectionChanged(const TQStringList &sl), noticeStationSelectionChanged(sl) ) -IF_IMPL_SENDER ( IStationSelectionClient::sendStationSelection(const QStringList &sl), +IF_IMPL_SENDER ( IStationSelectionClient::sendStationSelection(const TQStringList &sl), setStationSelection(sl) ) -static QStringList IStationSelectionClient_emptyList; +static TQStringList IStationSelectionClient_emptyList; -IF_IMPL_QUERY ( const QStringList & IStationSelectionClient::queryStationSelection(), +IF_IMPL_TQUERY ( const TQStringList & IStationSelectionClient::queryStationSelection(), getStationSelection(), IStationSelectionClient_emptyList ) diff --git a/kradio3/src/stationselector-ui.ui b/kradio3/src/stationselector-ui.ui index d8adf16..9ef12b1 100644 --- a/kradio3/src/stationselector-ui.ui +++ b/kradio3/src/stationselector-ui.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>StationSelectorUI</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>StationSelectorUI</cstring> </property> @@ -22,7 +22,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel" row="0" column="2"> + <widget class="TQLabel" row="0" column="2"> <property name="name"> <cstring>labelSelected</cstring> </property> @@ -46,9 +46,9 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget" row="1" column="1"> + <widget class="TQLayoutWidget" row="1" column="1"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <vbox> <property name="name"> @@ -102,7 +102,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> @@ -111,7 +111,7 @@ </spacer> </vbox> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>labelAvailable</cstring> </property> @@ -129,7 +129,7 @@ <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>10</width> <height>20</height> @@ -165,7 +165,7 @@ <include location="global" impldecl="in implementation">kiconloader.h</include> </includes> <pixmapfunction>SmallIconSet</pixmapfunction> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>radiostation-listview.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/kradio3/src/stationselector.cpp b/kradio3/src/stationselector.cpp index 635d4da..8cf240c 100644 --- a/kradio3/src/stationselector.cpp +++ b/kradio3/src/stationselector.cpp @@ -26,17 +26,17 @@ using namespace std; #include "include/stationselector.h" #include "include/radiostation-listview.h" -StationSelector::StationSelector (QWidget *parent) - : StationSelectorUI(parent), +StationSelector::StationSelector (TQWidget *tqparent) + : StationSelectorUI(tqparent), m_dirty(true) { - QObject::connect(buttonToLeft, SIGNAL(clicked()), this, SLOT(slotButtonToLeft())); - QObject::connect(buttonToRight, SIGNAL(clicked()), this, SLOT(slotButtonToRight())); - QObject::connect(listAvailable, SIGNAL(sigStationsReceived(const QStringList&)), this, SLOT(slotMoveToLeft(const QStringList&))); - QObject::connect(listSelected, SIGNAL(sigStationsReceived(const QStringList&)), this, SLOT(slotMoveToRight(const QStringList&))); + TQObject::connect(buttonToLeft, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotButtonToLeft())); + TQObject::connect(buttonToRight, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotButtonToRight())); + TQObject::connect(listAvailable, TQT_SIGNAL(sigStationsReceived(const TQStringList&)), this, TQT_SLOT(slotMoveToLeft(const TQStringList&))); + TQObject::connect(listSelected, TQT_SIGNAL(sigStationsReceived(const TQStringList&)), this, TQT_SLOT(slotMoveToRight(const TQStringList&))); - listSelected->setSelectionMode(QListView::Extended); - listAvailable->setSelectionMode(QListView::Extended); + listSelected->setSelectionMode(TQListView::Extended); + listAvailable->setSelectionMode(TQListView::Extended); } @@ -61,21 +61,21 @@ bool StationSelector::disconnectI(Interface *i) } -bool StationSelector::noticeStationSelectionChanged(const QStringList &sl) +bool StationSelector::noticeStationSelectionChanged(const TQStringList &sl) { m_stationIDsNotDisplayed.clear(); m_stationIDsSelected.clear(); m_stationIDsAvailable.clear(); for (unsigned int i = 0; i < m_stationIDsAll.count(); ++i) { - if (sl.contains(m_stationIDsAll[i])) { + if (sl.tqcontains(m_stationIDsAll[i])) { m_stationIDsSelected.append(m_stationIDsAll[i]); } else { m_stationIDsAvailable.append(m_stationIDsAll[i]); } } for (unsigned int i = 0; i < sl.count(); ++i) { - if (!m_stationIDsAll.contains(sl[i])) + if (!m_stationIDsAll.tqcontains(sl[i])) m_stationIDsNotDisplayed.append(sl[i]); } updateListViews(); @@ -100,10 +100,10 @@ bool StationSelector::noticeStationsChanged(const StationList &sl) m_stationIDsSelected.clear(); for (RawStationList::Iterator i(sl.all()); i.current(); ++i) { - const QString &id = i.current()->stationID(); + const TQString &id = i.current()->stationID(); m_stationIDsAll.append(id); - if (m_stationIDsNotDisplayed.contains(id)) { + if (m_stationIDsNotDisplayed.tqcontains(id)) { m_stationIDsNotDisplayed.remove(id); m_stationIDsSelected.append(id); } else { @@ -120,10 +120,10 @@ void StationSelector::slotButtonToLeft() { slotSetDirty(); listAvailable->clearSelection(); - QListViewItem *item = listSelected->firstChild(); + TQListViewItem *item = listSelected->firstChild(); int idx_from = 0; while (item) { - QListViewItem *next_item = item->nextSibling(); + TQListViewItem *next_item = item->nextSibling(); if (item->isSelected()) { @@ -143,10 +143,10 @@ void StationSelector::slotButtonToRight() { slotSetDirty(); listSelected->clearSelection(); - QListViewItem *item = listAvailable->firstChild(); + TQListViewItem *item = listAvailable->firstChild(); int idx_from = 0; while (item) { - QListViewItem *next_item = item->nextSibling(); + TQListViewItem *next_item = item->nextSibling(); if (item->isSelected()) { @@ -162,16 +162,16 @@ void StationSelector::slotButtonToRight() } -void StationSelector::slotMoveToRight(const QStringList &list) +void StationSelector::slotMoveToRight(const TQStringList &list) { slotSetDirty(); listSelected->clearSelection(); - QListViewItem *item = listAvailable->firstChild(); + TQListViewItem *item = listAvailable->firstChild(); int idx_from = 0; while (item) { - QListViewItem *next_item = item->nextSibling(); + TQListViewItem *next_item = item->nextSibling(); - if (list.contains(m_stationIDsAvailable[idx_from])) { + if (list.tqcontains(m_stationIDsAvailable[idx_from])) { moveItem (listAvailable, m_stationIDsAvailable, item, idx_from, @@ -185,16 +185,16 @@ void StationSelector::slotMoveToRight(const QStringList &list) } -void StationSelector::slotMoveToLeft(const QStringList &list) +void StationSelector::slotMoveToLeft(const TQStringList &list) { slotSetDirty(); listAvailable->clearSelection(); - QListViewItem *item = listSelected->firstChild(); + TQListViewItem *item = listSelected->firstChild(); int idx_from = 0; while (item) { - QListViewItem *next_item = item->nextSibling(); + TQListViewItem *next_item = item->nextSibling(); - if (list.contains(m_stationIDsSelected[idx_from])) { + if (list.tqcontains(m_stationIDsSelected[idx_from])) { moveItem (listSelected, m_stationIDsSelected, item, idx_from, @@ -210,22 +210,22 @@ void StationSelector::slotMoveToLeft(const QStringList &list) void StationSelector::moveItem( RadioStationListView *fromListView, - QStringList &fromIDList, - QListViewItem *item, + TQStringList &fromIDList, + TQListViewItem *item, int idx_from, RadioStationListView *toListView, - QStringList &toIDList + TQStringList &toIDList ) { fromListView->takeItem(item, idx_from); - QString id = fromIDList[idx_from]; + TQString id = fromIDList[idx_from]; fromIDList.remove(fromIDList.at(idx_from)); unsigned int idx_to = 0, idx_all = 0; bool found = false; - QListViewItem *item_to = toListView->firstChild(), + TQListViewItem *item_to = toListView->firstChild(), *prev_item_to = NULL; while (idx_all < m_stationIDsAll.count() && @@ -266,11 +266,11 @@ void StationSelector::updateListViews() const RawStationList &sl = stations.all(); for (unsigned int i = 0; i < m_stationIDsAvailable.count(); ++i) { - QString id = m_stationIDsAvailable[i]; + TQString id = m_stationIDsAvailable[i]; listAvailable->appendStation(sl.stationWithID(id), sl.idxWithID(id)+1); } for (unsigned int i = 0; i < m_stationIDsSelected.count(); ++i) { - QString id = m_stationIDsSelected[i]; + TQString id = m_stationIDsSelected[i]; listSelected->appendStation(sl.stationWithID(id), sl.idxWithID(id)+1); } } @@ -279,7 +279,7 @@ void StationSelector::updateListViews() void StationSelector::slotOK() { if (m_dirty) { - QStringList l = m_stationIDsSelected; + TQStringList l = m_stationIDsSelected; for (unsigned int i = 0; i < m_stationIDsNotDisplayed.count(); ++i) l.append(m_stationIDsNotDisplayed[i]); sendStationSelection(l); diff --git a/kradio3/src/timecontrol_interfaces.cpp b/kradio3/src/timecontrol_interfaces.cpp index f33422c..248fa47 100644 --- a/kradio3/src/timecontrol_interfaces.cpp +++ b/kradio3/src/timecontrol_interfaces.cpp @@ -30,7 +30,7 @@ IF_IMPL_SENDER ( ITimeControl::notifyAlarm(const Alarm &a), IF_IMPL_SENDER ( ITimeControl::notifyNextAlarmChanged(const Alarm *a), noticeNextAlarmChanged(a) ) -IF_IMPL_SENDER ( ITimeControl::notifyCountdownStarted(const QDateTime &end), +IF_IMPL_SENDER ( ITimeControl::notifyCountdownStarted(const TQDateTime &end), noticeCountdownStarted(end) ) IF_IMPL_SENDER ( ITimeControl::notifyCountdownStopped(), @@ -57,33 +57,33 @@ IF_IMPL_SENDER ( ITimeControlClient::sendStopCountdown(), stopCountdown() ) -IF_IMPL_QUERY ( QDateTime ITimeControlClient::queryNextAlarmTime (), +IF_IMPL_TQUERY ( TQDateTime ITimeControlClient::queryNextAlarmTime (), getNextAlarmTime(), - QDateTime() ) + TQDateTime() ) -IF_IMPL_QUERY ( const Alarm * ITimeControlClient::queryNextAlarm (), +IF_IMPL_TQUERY ( const Alarm * ITimeControlClient::queryNextAlarm (), getNextAlarm(), NULL ) -IF_IMPL_QUERY ( const AlarmVector &ITimeControlClient::queryAlarms (), +IF_IMPL_TQUERY ( const AlarmVector &ITimeControlClient::queryAlarms (), getAlarms(), emptyAlarms ) -IF_IMPL_QUERY ( int ITimeControlClient::queryCountdownSeconds (), +IF_IMPL_TQUERY ( int ITimeControlClient::queryCountdownSeconds (), getCountdownSeconds(), 30*60 ) -IF_IMPL_QUERY ( QDateTime ITimeControlClient::queryCountdownEnd (), +IF_IMPL_TQUERY ( TQDateTime ITimeControlClient::queryCountdownEnd (), getCountdownEnd(), - QDateTime() ) + TQDateTime() ) void ITimeControlClient::noticeConnectedI(cmplInterface *, bool /*pointer_valid*/) { noticeAlarmsChanged(queryAlarms()); noticeNextAlarmChanged(queryNextAlarm()); - QDateTime end = queryCountdownEnd(); - if (end > QDateTime::currentDateTime()) + TQDateTime end = queryCountdownEnd(); + if (end > TQDateTime::tqcurrentDateTime()) noticeCountdownStarted(end); else noticeCountdownStopped(); @@ -94,8 +94,8 @@ void ITimeControlClient::noticeDisconnectedI(cmplInterface *, bool /*pointer_val { noticeAlarmsChanged(queryAlarms()); noticeNextAlarmChanged(queryNextAlarm()); - QDateTime end = queryCountdownEnd(); - if (end > QDateTime::currentDateTime()) + TQDateTime end = queryCountdownEnd(); + if (end > TQDateTime::tqcurrentDateTime()) noticeCountdownStarted(end); else noticeCountdownStopped(); diff --git a/kradio3/src/utils.cpp b/kradio3/src/utils.cpp index e54f19d..fa60b02 100644 --- a/kradio3/src/utils.cpp +++ b/kradio3/src/utils.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -#include <qregexp.h> +#include <tqregexp.h> #include "include/utils.h" #include <linux/soundcard.h> @@ -23,47 +23,47 @@ //const char *mixerChannelNames[] = SOUND_DEVICE_NAMES; -QString XMLEscape (const QString &s) +TQString XMLEscape (const TQString &s) { - QString c = s; - c.replace(QRegExp("&"), "&"); - c.replace(QRegExp("<"), "<"); - c.replace(QRegExp(">"), ">"); - c.replace(QRegExp("\""), """); - c.replace(QRegExp("'"), "'"); + TQString c = s; + c.tqreplace(TQRegExp("&"), "&"); + c.tqreplace(TQRegExp("<"), "<"); + c.tqreplace(TQRegExp(">"), ">"); + c.tqreplace(TQRegExp("\""), """); + c.tqreplace(TQRegExp("'"), "'"); return c; } -QString xmlOpenTag (const QString &tag, bool nl) +TQString xmlOpenTag (const TQString &tag, bool nl) { - return "<" + tag + ">" + (nl ? QString("\n") : QString::null); + return "<" + tag + ">" + (nl ? TQString("\n") : TQString()); } -QString xmlCloseTag (const QString &tag, bool nl) +TQString xmlCloseTag (const TQString &tag, bool nl) { - return "</" + tag + ">" + (nl ? QString("\n") : QString::null); + return "</" + tag + ">" + (nl ? TQString("\n") : TQString()); } -QString xmlTag (const QString &tag, int v, bool nl) +TQString xmlTag (const TQString &tag, int v, bool nl) { - return xmlTag (tag, QString().setNum(v), nl); + return xmlTag (tag, TQString().setNum(v), nl); } -QString xmlTag (const QString &tag, float f, bool nl) +TQString xmlTag (const TQString &tag, float f, bool nl) { - return xmlTag(tag, QString().setNum(f), nl); + return xmlTag(tag, TQString().setNum(f), nl); } -QString xmlTag (const QString &tag, const QString &data, bool nl) +TQString xmlTag (const TQString &tag, const TQString &data, bool nl) { return xmlOpenTag(tag, false) + XMLEscape(data) + xmlCloseTag(tag, false) - + (nl ? QString("\n") : QString::null); + + (nl ? TQString("\n") : TQString()); } diff --git a/kradio3/src/widgetplugins.cpp b/kradio3/src/widgetplugins.cpp index 434b568..a0e662a 100644 --- a/kradio3/src/widgetplugins.cpp +++ b/kradio3/src/widgetplugins.cpp @@ -23,11 +23,11 @@ #endif #include <kwin.h> -#include <qwidget.h> +#include <tqwidget.h> #include <kconfig.h> #include <klocale.h> -WidgetPluginBase::WidgetPluginBase(const QString &name, const QString &description) +WidgetPluginBase::WidgetPluginBase(const TQString &name, const TQString &description) : PluginBase(name, description), m_geoCacheValid(false), m_geoRestoreFlag(false), @@ -36,15 +36,15 @@ WidgetPluginBase::WidgetPluginBase(const QString &name, const QString &descripti } /* -QWidget *WidgetPluginBase::getWidget() +TQWidget *WidgetPluginBase::getWidget() { - return dynamic_cast<QWidget*>(this); + return dynamic_cast<TQWidget*>(this); } -const QWidget *WidgetPluginBase::getWidget() const +const TQWidget *WidgetPluginBase::getWidget() const { - return dynamic_cast<const QWidget*>(this); + return dynamic_cast<const TQWidget*>(this); } */ @@ -55,9 +55,9 @@ void WidgetPluginBase::notifyManager(bool shown) } -bool WidgetPluginBase::isReallyVisible(const QWidget *_w) const +bool WidgetPluginBase::isReallyVisible(const TQWidget *_w) const { - const QWidget *w = _w ? _w : getWidget(); + const TQWidget *w = _w ? _w : getWidget(); if (!w) return false; KWin::WindowInfo i = KWin::WindowInfo(w->winId(), 0, 0); return (i.mappingState() == NET::Visible) @@ -66,9 +66,9 @@ bool WidgetPluginBase::isReallyVisible(const QWidget *_w) const } -bool WidgetPluginBase::isAnywhereVisible(const QWidget *_w) const +bool WidgetPluginBase::isAnywhereVisible(const TQWidget *_w) const { - const QWidget *w = _w ? _w : getWidget(); + const TQWidget *w = _w ? _w : getWidget(); if (!w) return false; return w->isVisible(); } @@ -76,7 +76,7 @@ bool WidgetPluginBase::isAnywhereVisible(const QWidget *_w) const void WidgetPluginBase::pShow(bool on) { - QWidget *w = getWidget(); + TQWidget *w = getWidget(); if (!w) return; if (on && !isReallyVisible(w)) w->show(); @@ -87,7 +87,7 @@ void WidgetPluginBase::pShow(bool on) void WidgetPluginBase::pToggleShown() { - QWidget *w = getWidget(); + TQWidget *w = getWidget(); if (!w) return; if (!isReallyVisible(w)) w->show(); @@ -100,9 +100,9 @@ void WidgetPluginBase::pShowOnOrgDesktop() { KWin::setMainWindow(getWidget(), 0); - logDebug(QString("%1::pShowOnOrgDesktop: 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::pShowOnOrgDesktop: 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)); if (m_geoCacheValid && (!isReallyVisible() || m_geoRestoreFlag) ) { - QWidget *w = getWidget(); + TQWidget *w = getWidget(); if (!w) return; WId id = w->winId(); @@ -131,9 +131,9 @@ void WidgetPluginBase::pShow() { KWin::setMainWindow(getWidget(), 0); - logDebug(QString("%1::pShow: 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::pShow: 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)); if (m_geoCacheValid && (!isReallyVisible() || m_geoRestoreFlag) ) { - QWidget *w = getWidget(); + TQWidget *w = getWidget(); if (!w) return; WId id = w->winId(); @@ -150,29 +150,29 @@ void WidgetPluginBase::pShow() void WidgetPluginBase::pHide() { - logDebug(QString("%1::pHide1: 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::pHide1: 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)); getKWinState(); - logDebug(QString("%1::pHide2: 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::pHide2: 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)); } -void WidgetPluginBase::pShowEvent(QShowEvent *) +void WidgetPluginBase::pShowEvent(TQShowEvent *) { notifyManager (true); } -void WidgetPluginBase::pHideEvent(QHideEvent *) +void WidgetPluginBase::pHideEvent(TQHideEvent *) { notifyManager (false); } -void WidgetPluginBase::getKWinState(const QWidget *_w) const +void WidgetPluginBase::getKWinState(const TQWidget *_w) const { if (m_geoRestoreFlag) return; - const QWidget *w = _w ? _w : getWidget(); + const TQWidget *w = _w ? _w : getWidget(); if (!w) return; if (w->isVisible()) { KWin::WindowInfo i = KWin::WindowInfo(w->winId(), 0, 0); @@ -180,7 +180,7 @@ void WidgetPluginBase::getKWinState(const QWidget *_w) const m_saveMaximized = w->isMaximized(); m_saveSticky = i.onAllDesktops(); m_saveDesktop = i.desktop(); - m_saveGeometry = QRect(w->pos(), w->size()); + m_saveGeometry = TQRect(w->pos(), w->size()); m_geoCacheValid = true; } } @@ -188,7 +188,7 @@ void WidgetPluginBase::getKWinState(const QWidget *_w) const void WidgetPluginBase::saveState (KConfig *config) const { - const QWidget *w = getWidget(); + const TQWidget *w = getWidget(); getKWinState(w); config->writeEntry("hidden", w ? w->isHidden() : false); @@ -224,7 +224,7 @@ void WidgetPluginBase::startPlugin() { PluginBase::startPlugin(); - QWidget *w = getWidget(); + TQWidget *w = getWidget(); if (w) { m_geoRestoreFlag = true; if (!m_restoreShow) w->hide(); |