diff options
Diffstat (limited to 'kradio3/plugins/radio/radio.cpp')
-rw-r--r-- | kradio3/plugins/radio/radio.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
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); |