From 0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 30 Jun 2011 00:15:53 +0000 Subject: 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 --- src/xml_to_data/device_xml_to_data.h | 38 ++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'src/xml_to_data/device_xml_to_data.h') diff --git a/src/xml_to_data/device_xml_to_data.h b/src/xml_to_data/device_xml_to_data.h index a1d0529..f9874e4 100644 --- a/src/xml_to_data/device_xml_to_data.h +++ b/src/xml_to_data/device_xml_to_data.h @@ -9,9 +9,9 @@ #ifndef DEVICE_XML_TO_DATA_H #define DEVICE_XML_TO_DATA_H -#include -#include -#include +#include +#include +#include #include "common/common/misc.h" #include "common/common/streamer.h" @@ -27,22 +27,22 @@ public: protected: mutable Data *_data; - QMap _map; // device -> data + TQMap _map; // device -> data virtual void parse(); - virtual QString currentDevice() const { return (_data ? _data->name() : QString::null); } - virtual QString namespaceName() const = 0; + virtual TQString currentDevice() const { return (_data ? _data->name() : TQString()); } + virtual TQString namespaceName() const = 0; virtual Data *createData() const = 0; - virtual void processDevice(QDomElement device); - virtual void checkPins(const QMap &pinLabels) const = 0; + virtual void processDevice(TQDomElement device); + virtual void checkPins(const TQMap &pinLabels) const = 0; private: - QMap _documents; // document -> device - QMap _alternatives; // device -> alternatives + TQMap _documents; // document -> device + TQMap _alternatives; // device -> alternatives - bool getFrequencyRange(OperatingCondition oc, Special special, QDomElement element); - bool getMemoryTechnology(QDomElement element); - Device::Package processPackage(QDomElement element); + bool getFrequencyRange(OperatingCondition oc, Special special, TQDomElement element); + bool getMemoryTechnology(TQDomElement element); + Device::Package processPackage(TQDomElement element); }; template @@ -53,12 +53,12 @@ public: DataType *data() { return static_cast(_data); } const DataType *data() const { return static_cast(_data); } virtual void output() { - QFile dfile("deps.mak"); + TQFile dfile("deps.mak"); if ( !dfile.open(IO_WriteOnly) ) return; - QTextStream dts(&dfile); + TQTextStream dts(&dfile); dts << "noinst_DATA = "; uint i = 0; - QMap::const_iterator it; + TQMap::const_iterator it; for (it=_map.begin(); it!=_map.end(); ++it) { if ( (i%10)==0 ) dts << "\\" << endl << " "; dts << " " << it.key() << ".xml"; @@ -67,13 +67,13 @@ public: dts << endl; dfile.close(); - QFile file(namespaceName().lower() + "_data.cpp"); + TQFile file(namespaceName().lower() + "_data.cpp"); if ( !file.open(IO_WriteOnly) ) return; - QTextStream ts(&file); + TQTextStream ts(&file); ts << "#include \"devices/" << namespaceName().lower() << "/" << namespaceName().lower() << "/" << namespaceName().lower() << "_group.h\"" << endl << endl; ts << "const char *" << namespaceName() << "::DATA_STREAM =" << endl; - QValueList list; + TQValueList list; for (it=_map.begin(); it!=_map.end(); ++it) list.append(static_cast(it.data())); uint size = toCppString(list, ts); -- cgit v1.2.1