summaryrefslogtreecommitdiffstats
path: root/src/progs/base/hardware_config.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 00:15:53 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 00:15:53 +0000
commit0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 (patch)
treeb95c0ca86c4876dd139af376b9f4afd8917cf0cd /src/progs/base/hardware_config.cpp
parentb79a2c28534cf09987eeeba3077fff9236df182a (diff)
downloadpiklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.tar.gz
piklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.zip
TQt4 port piklab
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1238822 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/progs/base/hardware_config.cpp')
-rw-r--r--src/progs/base/hardware_config.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/progs/base/hardware_config.cpp b/src/progs/base/hardware_config.cpp
index 5a3af7c..a3022e5 100644
--- a/src/progs/base/hardware_config.cpp
+++ b/src/progs/base/hardware_config.cpp
@@ -26,36 +26,36 @@ void Hardware::Data::writeConfig(GenericConfig &config) const
}
//-----------------------------------------------------------------------------
-void Hardware::Config::writeCurrentHardware(PortType type, const QString &name)
+void Hardware::Config::writeCurrentHardware(PortType type, const TQString &name)
{
- writeEntry(QString("current_hardware_") + type.key(), name);
+ writeEntry(TQString("current_hardware_") + type.key(), name);
}
-QString Hardware::Config::currentHardware(PortType type)
+TQString Hardware::Config::currentHardware(PortType type)
{
- QStringList names = hardwareNames(type);
- return readEntry(QString("current_hardware_") + type.key(), names[0]);
+ TQStringList names = hardwareNames(type);
+ return readEntry(TQString("current_hardware_") + type.key(), names[0]);
}
-QString Hardware::Config::label(const QString &name) const
+TQString Hardware::Config::label(const TQString &name) const
{
const DataInfo *info = standardHardwareDataInfo(name);
- if ( info==0 ) return QString::null;
+ if ( info==0 ) return TQString();
return i18n(info->label);
}
-QString Hardware::Config::comment(const QString &name) const
+TQString Hardware::Config::comment(const TQString &name) const
{
const DataInfo *info = standardHardwareDataInfo(name);
- if ( info==0 || info->comment==0 ) return QString::null;
+ if ( info==0 || info->comment==0 ) return TQString();
return i18n(info->comment);
}
-void Hardware::Config::writeCustomHardware(const QString& name, const Hardware::Data &hdata)
+void Hardware::Config::writeCustomHardware(const TQString& name, const Hardware::Data &hdata)
{
Q_ASSERT( !isStandardHardware(name) );
- QStringList customNames = readListEntry("custom_hardware_names", QStringList());
- if ( !customNames.contains(name) ) {
+ TQStringList customNames = readListEntry("custom_hardware_names", TQStringList());
+ if ( !customNames.tqcontains(name) ) {
customNames += name;
writeEntry("custom_hardware_names", customNames);
}
@@ -63,16 +63,16 @@ void Hardware::Config::writeCustomHardware(const QString& name, const Hardware::
hdata.writeConfig(config);
}
-void Hardware::Config::deleteCustomHardware(const QString &name)
+void Hardware::Config::deleteCustomHardware(const TQString &name)
{
Q_ASSERT( !isStandardHardware(name) );
- QStringList customNames = readListEntry("custom_hardware_names", QStringList());
+ TQStringList customNames = readListEntry("custom_hardware_names", TQStringList());
customNames.remove(name);
writeEntry("custom_hardware_names", customNames);
GenericConfig::deleteGroup(group() + "_custom_hardware_" + name);
}
-Hardware::Data *Hardware::Config::hardwareData(const QString &name) const
+Hardware::Data *Hardware::Config::hardwareData(const TQString &name) const
{
if ( isStandardHardware(name) ) return standardHardwareData(name);
Hardware::Data *hdata = createHardwareData();
@@ -82,10 +82,10 @@ Hardware::Data *Hardware::Config::hardwareData(const QString &name) const
return hdata;
}
-QStringList Hardware::Config::hardwareNames(PortType type)
+TQStringList Hardware::Config::hardwareNames(PortType type)
{
- QStringList names = standardHardwareNames(type);
- QStringList customNames = readListEntry("custom_hardware_names", QStringList());
+ TQStringList names = standardHardwareNames(type);
+ TQStringList customNames = readListEntry("custom_hardware_names", TQStringList());
for (uint i=0; i<uint(customNames.count()); i++) {
if ( type!=PortType::Nb_Types ) {
Hardware::Data *hdata = hardwareData(customNames[i]);