diff options
Diffstat (limited to 'src/devices/mem24')
-rw-r--r-- | src/devices/mem24/base/mem24.cpp | 4 | ||||
-rw-r--r-- | src/devices/mem24/base/mem24.h | 10 | ||||
-rw-r--r-- | src/devices/mem24/gui/mem24_group_ui.cpp | 4 | ||||
-rw-r--r-- | src/devices/mem24/gui/mem24_group_ui.h | 8 | ||||
-rw-r--r-- | src/devices/mem24/gui/mem24_hex_view.cpp | 10 | ||||
-rw-r--r-- | src/devices/mem24/gui/mem24_hex_view.h | 5 | ||||
-rw-r--r-- | src/devices/mem24/gui/mem24_memory_editor.cpp | 14 | ||||
-rw-r--r-- | src/devices/mem24/gui/mem24_memory_editor.h | 15 | ||||
-rw-r--r-- | src/devices/mem24/mem24/mem24_group.cpp | 10 | ||||
-rw-r--r-- | src/devices/mem24/mem24/mem24_group.h | 8 | ||||
-rw-r--r-- | src/devices/mem24/mem24/mem24_memory.cpp | 20 | ||||
-rw-r--r-- | src/devices/mem24/mem24/mem24_memory.h | 4 | ||||
-rw-r--r-- | src/devices/mem24/prog/mem24_prog.cpp | 8 | ||||
-rw-r--r-- | src/devices/mem24/prog/mem24_prog.h | 2 | ||||
-rw-r--r-- | src/devices/mem24/xml/mem24_xml_to_data.cpp | 24 |
15 files changed, 75 insertions, 71 deletions
diff --git a/src/devices/mem24/base/mem24.cpp b/src/devices/mem24/base/mem24.cpp index 03bffe3..147c199 100644 --- a/src/devices/mem24/base/mem24.cpp +++ b/src/devices/mem24/base/mem24.cpp @@ -8,13 +8,13 @@ ***************************************************************************/ #include "mem24.h" -QDataStream &Mem24::operator <<(QDataStream &s, const Data &data) +TQDataStream &Mem24::operator <<(TQDataStream &s, const Data &data) { s << static_cast<const Device::Data &>(data); s << data._nbBytes << data._nbBlocks << data._nbBytesPage; return s; } -QDataStream &Mem24::operator >>(QDataStream &s, Data &data) +TQDataStream &Mem24::operator >>(TQDataStream &s, Data &data) { s >> static_cast<Device::Data &>(data); s >> data._nbBytes >> data._nbBlocks >> data._nbBytesPage; diff --git a/src/devices/mem24/base/mem24.h b/src/devices/mem24/base/mem24.h index d66ff47..7e0b5e7 100644 --- a/src/devices/mem24/base/mem24.h +++ b/src/devices/mem24/base/mem24.h @@ -22,7 +22,7 @@ class Data : public Device::Data { public: Data() : Device::Data(0) {} - virtual QString listViewGroup() const { return i18n("24 EEPROM"); } + virtual TQString listViewGroup() const { return i18n("24 EEPROM"); } uint nbBytes() const { return _nbBytes; } virtual bool matchId(BitValue, Device::IdData &) const { return false; } virtual uint nbBitsAddress() const { return nbBits(_nbBytes-1); } @@ -35,12 +35,12 @@ private: 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 diff --git a/src/devices/mem24/gui/mem24_group_ui.cpp b/src/devices/mem24/gui/mem24_group_ui.cpp index 751e5a7..8a8bb5a 100644 --- a/src/devices/mem24/gui/mem24_group_ui.cpp +++ b/src/devices/mem24/gui/mem24_group_ui.cpp @@ -10,7 +10,7 @@ #include "mem24_hex_view.h" -Device::HexView *Mem24::GroupUI::createHexView(const HexEditor &editor, QWidget *parent) const +Device::HexView *Mem24::GroupUI::createHexView(const HexEditor &editor, TQWidget *tqparent) const { - return new HexView(editor, parent); + return new HexView(editor, tqparent); } diff --git a/src/devices/mem24/gui/mem24_group_ui.h b/src/devices/mem24/gui/mem24_group_ui.h index 37766b5..c2b3360 100644 --- a/src/devices/mem24/gui/mem24_group_ui.h +++ b/src/devices/mem24/gui/mem24_group_ui.h @@ -16,10 +16,10 @@ namespace Mem24 class GroupUI : public Device::GroupUI { public: - virtual Device::HexView *createHexView(const HexEditor &editor, QWidget *parent) const; - virtual Register::View *createRegisterView(QWidget *) const { return 0; } - virtual Device::MemoryEditor *createConfigEditor(Device::Memory &, QWidget *) const { return 0; } - virtual void fillWatchListContainer(ListContainer *, QValueVector<Register::TypeData> &) const {} + virtual Device::HexView *createHexView(const HexEditor &editor, TQWidget *tqparent) const; + virtual Register::View *createRegisterView(TQWidget *) const { return 0; } + virtual Device::MemoryEditor *createConfigEditor(Device::Memory &, TQWidget *) const { return 0; } + virtual void fillWatchListContainer(ListContainer *, TQValueVector<Register::TypeData> &) const {} virtual Register::ListViewItem *createWatchItem(const Register::TypeData &, KListViewItem *) const { return 0; } }; diff --git a/src/devices/mem24/gui/mem24_hex_view.cpp b/src/devices/mem24/gui/mem24_hex_view.cpp index 0ada8d0..7ded854 100644 --- a/src/devices/mem24/gui/mem24_hex_view.cpp +++ b/src/devices/mem24/gui/mem24_hex_view.cpp @@ -8,14 +8,14 @@ ***************************************************************************/ #include "mem24_hex_view.h" -#include <qlayout.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <klocale.h> #include "mem24_memory_editor.h" -Mem24::HexView::HexView(const HexEditor &editor, QWidget *parent) - : Device::HexView(editor, parent, "mem24_hex_view") +Mem24::HexView::HexView(const HexEditor &editor, TQWidget *tqparent) + : Device::HexView(editor, tqparent, "mem24_hex_view") {} void Mem24::HexView::display() @@ -34,5 +34,5 @@ BitValue Mem24::HexView::checksum() const BitValue cs = 0x0000; for (uint i=0; i<static_cast<const Data &>(_memory->device()).nbBytes(); i++) cs += static_cast<const Memory *>(_memory)->byte(i); - return cs.maskWith(0xFFFF); + return cs.tqmaskWith(0xFFFF); } diff --git a/src/devices/mem24/gui/mem24_hex_view.h b/src/devices/mem24/gui/mem24_hex_view.h index 378a25e..199865a 100644 --- a/src/devices/mem24/gui/mem24_hex_view.h +++ b/src/devices/mem24/gui/mem24_hex_view.h @@ -9,7 +9,7 @@ #ifndef MEM24_HEX_VIEW_H #define MEM24_HEX_VIEW_H -class QVBoxLayout; +class TQVBoxLayout; #include "devices/gui/hex_view.h" @@ -19,8 +19,9 @@ namespace Mem24 class HexView : public Device::HexView { Q_OBJECT + TQ_OBJECT public: - HexView(const HexEditor &editor, QWidget *parent); + HexView(const HexEditor &editor, TQWidget *tqparent); virtual uint nbChecksumChars() const { return 4; } virtual BitValue checksum() const; diff --git a/src/devices/mem24/gui/mem24_memory_editor.cpp b/src/devices/mem24/gui/mem24_memory_editor.cpp index 61f98fe..a5203b9 100644 --- a/src/devices/mem24/gui/mem24_memory_editor.cpp +++ b/src/devices/mem24/gui/mem24_memory_editor.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "mem24_memory_editor.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include <kpushbutton.h> @@ -19,19 +19,19 @@ #include "devices/base/device_group.h" //----------------------------------------------------------------------------- -Mem24::MemoryRangeEditor::MemoryRangeEditor(Memory &memory, QWidget *parent) - : Device::MemoryRangeEditor(memory, 16, 16, 0, -1, parent, "mem24_memory_range_editor"), +Mem24::MemoryRangeEditor::MemoryRangeEditor(Memory &memory, TQWidget *tqparent) + : Device::MemoryRangeEditor(memory, 16, 16, 0, -1, tqparent, "mem24_memory_range_editor"), MemoryCaster(memory) {} -Device::HexWordEditor *Mem24::MemoryRangeEditor::createHexWordEditor(QWidget *parent) +Device::HexWordEditor *Mem24::MemoryRangeEditor::createHexWordEditor(TQWidget *tqparent) { - return new HexWordEditor(memory(), parent); + return new HexWordEditor(memory(), tqparent); } //----------------------------------------------------------------------------- -Mem24::MemoryTypeEditor::MemoryTypeEditor(const HexView *hexview, Memory &memory, QWidget *parent) - : Device::MemoryTypeEditor(hexview, memory, parent, "mem24_memory_type_editor"), +Mem24::MemoryTypeEditor::MemoryTypeEditor(const HexView *hexview, Memory &memory, TQWidget *tqparent) + : Device::MemoryTypeEditor(hexview, memory, tqparent, "mem24_memory_type_editor"), MemoryCaster(memory) {} diff --git a/src/devices/mem24/gui/mem24_memory_editor.h b/src/devices/mem24/gui/mem24_memory_editor.h index eb99e97..657810a 100644 --- a/src/devices/mem24/gui/mem24_memory_editor.h +++ b/src/devices/mem24/gui/mem24_memory_editor.h @@ -34,12 +34,13 @@ private: class HexWordEditor : public Device::HexWordEditor, public MemoryCaster { Q_OBJECT + TQ_OBJECT public: - HexWordEditor(Memory &memory, QWidget *parent) - : Device::HexWordEditor(memory, 2, parent), MemoryCaster(memory) {} + HexWordEditor(Memory &memory, TQWidget *tqparent) + : Device::HexWordEditor(memory, 2, tqparent), MemoryCaster(memory) {} private: - virtual BitValue mask() const { return 0xFF; } + virtual BitValue tqmask() const { return 0xFF; } virtual BitValue normalizeWord(BitValue value) const { return value; } virtual BitValue word() const { return memory().byte(_offset); } virtual void setWord(BitValue value) { memory().setByte(_offset, value); } @@ -49,14 +50,15 @@ private: class MemoryRangeEditor : public Device::MemoryRangeEditor, public MemoryCaster { Q_OBJECT + TQ_OBJECT public: - MemoryRangeEditor(Memory &memory, QWidget *parent); + MemoryRangeEditor(Memory &memory, TQWidget *tqparent); private: virtual uint nbWords() const { return device().nbBytes(); } virtual uint addressIncrement() const { return 1; } virtual Address startAddress() const { return 0x0; } - virtual Device::HexWordEditor *createHexWordEditor(QWidget *parent); + virtual Device::HexWordEditor *createHexWordEditor(TQWidget *tqparent); virtual bool isRangeReadOnly() const { return false; } }; @@ -64,8 +66,9 @@ private: class MemoryTypeEditor : public Device::MemoryTypeEditor, public MemoryCaster { Q_OBJECT + TQ_OBJECT public: - MemoryTypeEditor(const HexView *hexview, Memory &memory, QWidget *parent); + MemoryTypeEditor(const HexView *hexview, Memory &memory, TQWidget *tqparent); virtual void init(bool first); private: diff --git a/src/devices/mem24/mem24/mem24_group.cpp b/src/devices/mem24/mem24/mem24_group.cpp index 53cad5b..f396027 100644 --- a/src/devices/mem24/mem24/mem24_group.cpp +++ b/src/devices/mem24/mem24/mem24_group.cpp @@ -15,19 +15,19 @@ Device::Memory *Mem24::Group::createMemory(const Device::Data &data) const return new Memory(static_cast<const Mem24::Data &>(data)); } -QString Mem24::Group::informationHtml(const Device::Data &data) const +TQString Mem24::Group::informationHtml(const Device::Data &data) const { const Mem24::Data &mdata = static_cast<const Mem24::Data &>(data); - QString tmp = i18n("%1 bytes").arg(formatNumber(mdata.nbBytes())); + TQString tmp = i18n("%1 bytes").tqarg(formatNumber(mdata.nbBytes())); return htmlTableRow(i18n("Memory Size"), tmp); } #if !defined(NO_KDE) -QPixmap Mem24::Group::memoryGraph(const Device::Data &data) const +TQPixmap Mem24::Group::memoryGraph(const Device::Data &data) const { const Mem24::Data &mdata = static_cast<const Mem24::Data &>(data); uint offset = 0x0; - QValueList<Device::MemoryGraphData> ranges; + TQValueList<Device::MemoryGraphData> ranges; for (uint i=0; i<mdata.nbBlocks(); i++) { Device::MemoryGraphData data; data.startAddress = offset; @@ -35,7 +35,7 @@ QPixmap Mem24::Group::memoryGraph(const Device::Data &data) const data.endAddress = offset - 1; data.start = toHexLabel(data.startAddress, mdata.nbCharsAddress()); data.end = toHexLabel(data.endAddress, mdata.nbCharsAddress()); - data.label = i18n("Block #%1").arg(i+1); + data.label = i18n("Block #%1").tqarg(i+1); ranges.append(data); } return Device::memoryGraph(ranges); diff --git a/src/devices/mem24/mem24/mem24_group.h b/src/devices/mem24/mem24/mem24_group.h index 46a1234..f39bf5f 100644 --- a/src/devices/mem24/mem24/mem24_group.h +++ b/src/devices/mem24/mem24/mem24_group.h @@ -21,12 +21,12 @@ extern const char *DATA_STREAM; class Group : public Device::Group<Data> { public: - virtual QString name() const { return "mem24"; } - virtual QString label() const { return i18n("Serial Memory 24"); } + virtual TQString name() const { return "mem24"; } + virtual TQString label() const { return i18n("Serial Memory 24"); } virtual Device::Memory *createMemory(const Device::Data &data) const; - virtual QString informationHtml(const Device::Data &data) const; + virtual TQString informationHtml(const Device::Data &data) const; #if !defined(NO_KDE) - virtual QPixmap memoryGraph(const Device::Data &data) const; + virtual TQPixmap memoryGraph(const Device::Data &data) const; #endif private: diff --git a/src/devices/mem24/mem24/mem24_memory.cpp b/src/devices/mem24/mem24/mem24_memory.cpp index a4296ea..b09aa79 100644 --- a/src/devices/mem24/mem24/mem24_memory.cpp +++ b/src/devices/mem24/mem24/mem24_memory.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "mem24_memory.h" -#include <qfile.h> +#include <tqfile.h> #include "common/global/global.h" #include "common/common/misc.h" @@ -34,7 +34,7 @@ void Mem24::Memory::copyFrom(const Device::Memory &memory) Device::Array Mem24::Memory::arrayForWriting() const { Device::Array data(_data.count()); - for (uint i=0; i<data.count(); i++) data[i] = _data[i].maskWith(0xFF); + for (uint i=0; i<data.count(); i++) data[i] = _data[i].tqmaskWith(0xFF); return data; } @@ -55,11 +55,11 @@ BitValue Mem24::Memory::checksum() const { BitValue cs = 0x0000; for (uint i=0; i<_data.count(); i++) cs += _data[i]; - return cs.maskWith(0xFFFF); + return cs.tqmaskWith(0xFFFF); } //----------------------------------------------------------------------------- -void Mem24::Memory::savePartial(QTextStream &stream, HexBuffer::Format format) const +void Mem24::Memory::savePartial(TQTextStream &stream, HexBuffer::Format format) const { HexBuffer hb = toHexBuffer(); hb.savePartial(stream, format); @@ -74,19 +74,19 @@ HexBuffer Mem24::Memory::toHexBuffer() const } void Mem24::Memory::fromHexBuffer(const HexBuffer &hb, WarningTypes &result, - QStringList &warnings, QMap<uint, bool> &inRange) + TQStringList &warnings, TQMap<uint, bool> &inRange) { - BitValue mask = 0xFF; + BitValue tqmask = 0xFF; for (uint k=0; k<device().nbBytes(); k++) { _data[k] = hb[k]; if ( _data[k].isInitialized() ) { inRange[k] = true; - if ( !(result & ValueTooLarge) && !_data[k].isInside(mask) ) { + if ( !(result & ValueTooLarge) && !_data[k].isInside(tqmask) ) { result |= ValueTooLarge; - warnings += i18n("At least one word (at offset %1) is larger (%2) than the corresponding mask (%3).") - .arg(toHexLabel(k, 8)).arg(toHexLabel(_data[k], 8)).arg(toHexLabel(mask, 8)); + warnings += i18n("At least one word (at offset %1) is larger (%2) than the corresponding tqmask (%3).") + .tqarg(toHexLabel(k, 8)).tqarg(toHexLabel(_data[k], 8)).tqarg(toHexLabel(tqmask, 8)); } - _data[k] = _data[k].maskWith(mask); + _data[k] = _data[k].tqmaskWith(tqmask); } } } diff --git a/src/devices/mem24/mem24/mem24_memory.h b/src/devices/mem24/mem24/mem24_memory.h index fbd6c64..bde2729 100644 --- a/src/devices/mem24/mem24/mem24_memory.h +++ b/src/devices/mem24/mem24/mem24_memory.h @@ -35,9 +35,9 @@ public: private: Device::Array _data; - virtual void savePartial(QTextStream &stream, HexBuffer::Format format) const; + virtual void savePartial(TQTextStream &stream, HexBuffer::Format format) const; virtual void fromHexBuffer(const HexBuffer &hb, WarningTypes &warningTypes, - QStringList &warnings, QMap<uint, bool> &inRange); + TQStringList &warnings, TQMap<uint, bool> &inRange); }; } // namespace diff --git a/src/devices/mem24/prog/mem24_prog.cpp b/src/devices/mem24/prog/mem24_prog.cpp index 4c4b201..338c217 100644 --- a/src/devices/mem24/prog/mem24_prog.cpp +++ b/src/devices/mem24/prog/mem24_prog.cpp @@ -32,15 +32,15 @@ bool Programmer::Mem24DeviceSpecific::write(const Device::Array &data) bool Programmer::Mem24DeviceSpecific::verifyByte(uint index, BitValue d, const VerifyData &vdata) { BitValue v = static_cast<const Mem24::Memory &>(vdata.memory).byte(index); - v = v.maskWith(0xFF); - d = d.maskWith(0xFF); + v = v.tqmaskWith(0xFF); + d = d.tqmaskWith(0xFF); if ( v==d ) return true; Address address = index; if ( vdata.actions & BlankCheckVerify ) log(Log::LineType::Error, i18n("Device memory is not blank (at address %1: reading %2 and expecting %3).") - .arg(toHexLabel(address, device().nbCharsAddress())).arg(toHexLabel(d, 2)).arg(toHexLabel(v, 2))); + .tqarg(toHexLabel(address, device().nbCharsAddress())).tqarg(toHexLabel(d, 2)).tqarg(toHexLabel(v, 2))); else log(Log::LineType::Error, i18n("Device memory doesn't match hex file (at address %1: reading %2 and expecting %3).") - .arg(toHexLabel(address, device().nbCharsAddress())).arg(toHexLabel(d, 2)).arg(toHexLabel(v, 2))); + .tqarg(toHexLabel(address, device().nbCharsAddress())).tqarg(toHexLabel(d, 2)).tqarg(toHexLabel(v, 2))); return false; } diff --git a/src/devices/mem24/prog/mem24_prog.h b/src/devices/mem24/prog/mem24_prog.h index 86948c2..b2d699f 100644 --- a/src/devices/mem24/prog/mem24_prog.h +++ b/src/devices/mem24/prog/mem24_prog.h @@ -34,7 +34,7 @@ protected: class Mem24Hardware : public Hardware { public: - Mem24Hardware(::Programmer::Base &base, Port::Base *port, const QString &name) : Hardware(base, port, name) {} + Mem24Hardware(::Programmer::Base &base, Port::Base *port, const TQString &name) : Hardware(base, port, name) {} const Mem24::Data &device() const { return static_cast<const Mem24::Data &>(*_base.device()); } }; diff --git a/src/devices/mem24/xml/mem24_xml_to_data.cpp b/src/devices/mem24/xml/mem24_xml_to_data.cpp index 734ebca..d38d669 100644 --- a/src/devices/mem24/xml/mem24_xml_to_data.cpp +++ b/src/devices/mem24/xml/mem24_xml_to_data.cpp @@ -6,8 +6,8 @@ * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * ***************************************************************************/ -#include <qfile.h> -#include <qtextstream.h> +#include <tqfile.h> +#include <tqtextstream.h> #include "xml_to_data/device_xml_to_data.h" #include "common/common/misc.h" @@ -21,13 +21,13 @@ class XmlToData : public Device::XmlToData<Data> private: virtual uint nbOutputFiles(uint) const { return 1; } virtual bool isIncluded(uint, uint) const { return true; } - virtual QString namespaceName() const { return "Mem24"; } + virtual TQString namespaceName() const { return "Mem24"; } -virtual void processDevice(QDomElement device) +virtual void processDevice(TQDomElement device) { Device::XmlToDataBase::processDevice(device); - QDomElement e = findUniqueElement(device, "memory", "name", QString::null); + TQDomElement e = findUniqueElement(device, "memory", "name", TQString()); bool ok; data()->_nbBytes = fromHexLabel(e.attribute("size"), &ok); if ( !ok ) qFatal("Missing or invalid size"); @@ -38,18 +38,18 @@ virtual void processDevice(QDomElement device) data()->_nbBytesPage = e.attribute("page_size").toUInt(&ok); if ( !ok || data()->_nbBytesPage==0 ) qFatal("Missing, zero, or invalid page_size"); if ( ((data()->_nbBytes/data()->_nbBlocks) % data()->_nbBytesPage)!=0 ) qFatal("page_size should divide size/nb_blocks"); - QStringList names; - names.append(QString::null); + TQStringList names; + names.append(TQString()); checkTagNames(device, "memory", names); } -virtual void checkPins(const QMap<QString, uint> &pinLabels) const +virtual void checkPins(const TQMap<TQString, uint> &pinLabels) const { - if ( !pinLabels.contains("VCC") ) qFatal("No VDD pin specified"); - if ( !pinLabels.contains("VSS") ) qFatal("No VSS pin specified"); - QMap<QString, uint>::const_iterator it; + if ( !pinLabels.tqcontains("VCC") ) qFatal("No VDD pin specified"); + if ( !pinLabels.tqcontains("VSS") ) qFatal("No VSS pin specified"); + TQMap<TQString, uint>::const_iterator it; for (it=pinLabels.begin(); it!=pinLabels.end(); ++it) - if ( it.data()!=1 ) qFatal(QString("Duplicated pin %1").arg(it.key())); + if ( it.data()!=1 ) qFatal(TQString("Duplicated pin %1").tqarg(it.key())); } }; // class |