diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 00:15:53 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 00:15:53 +0000 |
commit | 0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 (patch) | |
tree | b95c0ca86c4876dd139af376b9f4afd8917cf0cd /src/devices/pic/base/pic.h | |
parent | b79a2c28534cf09987eeeba3077fff9236df182a (diff) | |
download | piklab-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/devices/pic/base/pic.h')
-rw-r--r-- | src/devices/pic/base/pic.h | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/src/devices/pic/base/pic.h b/src/devices/pic/base/pic.h index 7b0dfc4..17fb96a 100644 --- a/src/devices/pic/base/pic.h +++ b/src/devices/pic/base/pic.h @@ -9,8 +9,8 @@ #ifndef PIC_H #define PIC_H -#include <qstringlist.h> -#include <qmap.h> +#include <tqstringlist.h> +#include <tqmap.h> #include "common/global/global.h" #include "common/common/bitvalue.h" @@ -38,8 +38,8 @@ struct CalibrationData { }; enum MemoryRangeTypeProperty { ReadOnly = 0, Writable = 1 }; -Q_DECLARE_FLAGS(MemoryRangeTypeProperties, MemoryRangeTypeProperty) -Q_DECLARE_OPERATORS_FOR_FLAGS(MemoryRangeTypeProperties) +TQ_DECLARE_FLAGS(MemoryRangeTypeProperties, MemoryRangeTypeProperty) +TQ_DECLARE_OPERATORS_FOR_FLAGS(MemoryRangeTypeProperties) struct MemoryRangeTypeData { const char *key, *label; MemoryRangeTypeProperties properties; @@ -73,8 +73,8 @@ BEGIN_DECLARE_ENUM(Architecture) END_DECLARE_ENUM(Architecture, ArchitectureData) enum MemoryRangeProperty { NotPresent = 0, Present = 1, Programmable = 2 }; -Q_DECLARE_FLAGS(MemoryRangeProperties, MemoryRangeProperty) -Q_DECLARE_OPERATORS_FOR_FLAGS(MemoryRangeProperties) +TQ_DECLARE_FLAGS(MemoryRangeProperties, MemoryRangeProperty) +TQ_DECLARE_OPERATORS_FOR_FLAGS(MemoryRangeProperties) struct MemoryRangeData { MemoryRangeProperties properties; Address start, end; @@ -90,8 +90,8 @@ namespace Checksum public: BitValue constant; Algorithm algorithm; - QStringList protectedMaskNames; - QString bbsize; + TQStringList protectedMaskNames; + TQString bbsize; BitValue blankChecksum, checkChecksum; }; } // namespace @@ -107,8 +107,8 @@ class Data : public Device::Data public: Data(); virtual ~Data(); - virtual QString fname(Device::Special special) const; - virtual QString listViewGroup() const { return _architecture.label(); } + virtual TQString fname(Device::Special special) const; + virtual TQString listViewGroup() const { return _architecture.label(); } bool isPresent(MemoryRangeType type) const { return (range(type).properties & Present); } bool isReadable(MemoryRangeType type) const; bool isWritable(MemoryRangeType type) const; @@ -121,7 +121,7 @@ public: uint nbBitsWord(MemoryRangeType type) const { return _architecture.data().nbBits[type.type()]; } uint nbBytesWord(MemoryRangeType type) const { return nbBitsToNbBytes(nbBitsWord(type)); } uint nbCharsWord(MemoryRangeType type) const { return nbBitsToNbChars(nbBitsWord(type)); } - BitValue mask(MemoryRangeType type) const { return uint(1 << nbBitsWord(type))-1; } + BitValue tqmask(MemoryRangeType type) const { return uint(1 << nbBitsWord(type))-1; } BitValue userIdRecommendedMask() const { return _userIdRecommendedMask; } const Config &config() const { return *_config; } Architecture architecture() const { return _architecture; } @@ -129,11 +129,11 @@ public: bool is16bitFamily() const { return ( _architecture.data().nbBitsRegister==16 ); } VoltageData voltage(ProgVoltageType type) const { return _voltages[type]; } virtual bool canWriteCalibration() const { return isWritable(MemoryRangeType::Cal); } - bool checkCalibration(const Device::Array &data, QString *message = 0) const; - const QMap<Device::Special, BitValue> ids() const { return _ids; } + bool checkCalibration(const Device::Array &data, TQString *message = 0) const; + const TQMap<Device::Special, BitValue> ids() const { return _ids; } virtual bool matchId(BitValue rawId, Device::IdData &data) const; - QStringList idNames(const QMap<QString, Device::IdData> &ids) const; - const QMap<QString, Checksum::Data> checksums() const { return _checksums; } + TQStringList idNames(const TQMap<TQString, Device::IdData> &ids) const; + const TQMap<TQString, Checksum::Data> checksums() const { return _checksums; } const RegistersData ®istersData() const; const CalibrationData &calibrationData() const { return _calibration; } @@ -144,36 +144,36 @@ public: private: Architecture _architecture; - QMap<Device::Special, BitValue> _ids; + TQMap<Device::Special, BitValue> _ids; uint _nbBitsPC; uint _nbWordsCodeWrite; // #### only for 18F/18J devices [0 for other devices] uint _nbWordsCodeRowErase; // #### only for 18F/18J devices [0 for other devices or if not available] - QMap<ProgVoltageType, VoltageData> _voltages; - QMap<MemoryRangeType, MemoryRangeData> _ranges; + TQMap<ProgVoltageType, VoltageData> _voltages; + TQMap<MemoryRangeType, MemoryRangeData> _ranges; BitValue _userIdRecommendedMask; Config *_config; - QMap<QString, Checksum::Data> _checksums; + TQMap<TQString, Checksum::Data> _checksums; CalibrationData _calibration; SelfWrite _selfWrite; friend class XmlToData; friend class Group; - friend QDataStream &operator <<(QDataStream &s, const Data &data); - friend QDataStream &operator >>(QDataStream &s, Data &data); + friend TQDataStream &operator <<(TQDataStream &s, const Data &data); + friend TQDataStream &operator >>(TQDataStream &s, Data &data); }; -QDataStream &operator <<(QDataStream &s, const Data &data); -QDataStream &operator >>(QDataStream &s, Data &data); +TQDataStream &operator <<(TQDataStream &s, const Data &data); +TQDataStream &operator >>(TQDataStream &s, Data &data); } // namespace -QDataStream &operator <<(QDataStream &s, const Pic::VoltageData &vd); -QDataStream &operator >>(QDataStream &s, Pic::VoltageData &vd); -QDataStream &operator <<(QDataStream &s, const Pic::MemoryRangeData &mrd); -QDataStream &operator >>(QDataStream &s, Pic::MemoryRangeData &mrd); -QDataStream &operator <<(QDataStream &s, const Pic::Checksum::Data &cd); -QDataStream &operator >>(QDataStream &s, Pic::Checksum::Data &cd); -QDataStream &operator <<(QDataStream &s, const Pic::CalibrationData &cd); -QDataStream &operator >>(QDataStream &s, Pic::CalibrationData &cd); +TQDataStream &operator <<(TQDataStream &s, const Pic::VoltageData &vd); +TQDataStream &operator >>(TQDataStream &s, Pic::VoltageData &vd); +TQDataStream &operator <<(TQDataStream &s, const Pic::MemoryRangeData &mrd); +TQDataStream &operator >>(TQDataStream &s, Pic::MemoryRangeData &mrd); +TQDataStream &operator <<(TQDataStream &s, const Pic::Checksum::Data &cd); +TQDataStream &operator >>(TQDataStream &s, Pic::Checksum::Data &cd); +TQDataStream &operator <<(TQDataStream &s, const Pic::CalibrationData &cd); +TQDataStream &operator >>(TQDataStream &s, Pic::CalibrationData &cd); #endif |