summaryrefslogtreecommitdiffstats
path: root/kradio3/plugins/radio/radio-configuration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kradio3/plugins/radio/radio-configuration.cpp')
-rw-r--r--kradio3/plugins/radio/radio-configuration.cpp200
1 files changed, 100 insertions, 100 deletions
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:[email protected]");
mailLabel->setURL ("mailto:[email protected]");
- 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);