summaryrefslogtreecommitdiffstats
path: root/kradio3/src/radiostation.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-01 03:43:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-01 03:43:07 +0000
commit70b9eea2ba01c3691497f49e4c45cb070c16193c (patch)
tree9a6df61aa247a27275aad9c5245e419e89c2c640 /kradio3/src/radiostation.cpp
parent998c1384ace4ae4655997c181fa33242148cd0a4 (diff)
downloadtderadio-70b9eea2ba01c3691497f49e4c45cb070c16193c.tar.gz
tderadio-70b9eea2ba01c3691497f49e4c45cb070c16193c.zip
TQt4 port kradio
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kradio@1238952 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kradio3/src/radiostation.cpp')
-rw-r--r--kradio3/src/radiostation.cpp44
1 files changed, 22 insertions, 22 deletions
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);