summaryrefslogtreecommitdiffstats
path: root/src/progs
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
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')
-rw-r--r--src/progs/base/debug_config.cpp4
-rw-r--r--src/progs/base/generic_debug.cpp10
-rw-r--r--src/progs/base/generic_debug.h16
-rw-r--r--src/progs/base/generic_prog.cpp34
-rw-r--r--src/progs/base/generic_prog.h15
-rw-r--r--src/progs/base/hardware_config.cpp36
-rw-r--r--src/progs/base/hardware_config.h26
-rw-r--r--src/progs/base/prog_config.cpp36
-rw-r--r--src/progs/base/prog_config.h8
-rw-r--r--src/progs/base/prog_group.cpp2
-rw-r--r--src/progs/base/prog_group.h10
-rw-r--r--src/progs/base/prog_specific.cpp8
-rw-r--r--src/progs/base/prog_specific.h12
-rw-r--r--src/progs/bootloader/base/bootloader.h2
-rw-r--r--src/progs/bootloader/base/bootloader_prog.h1
-rw-r--r--src/progs/bootloader/gui/bootloader_ui.h4
-rw-r--r--src/progs/direct/base/direct.cpp18
-rw-r--r--src/progs/direct/base/direct.h6
-rw-r--r--src/progs/direct/base/direct_16.cpp14
-rw-r--r--src/progs/direct/base/direct_16.h2
-rw-r--r--src/progs/direct/base/direct_18F.cpp22
-rw-r--r--src/progs/direct/base/direct_data.h2
-rw-r--r--src/progs/direct/base/direct_mem24.cpp16
-rw-r--r--src/progs/direct/base/direct_pic.cpp10
-rw-r--r--src/progs/direct/base/direct_pic.h2
-rw-r--r--src/progs/direct/base/direct_prog.h8
-rw-r--r--src/progs/direct/base/direct_prog_config.cpp8
-rw-r--r--src/progs/direct/base/direct_prog_config.h6
-rw-r--r--src/progs/direct/gui/direct_config_widget.cpp88
-rw-r--r--src/progs/direct/gui/direct_config_widget.h26
-rw-r--r--src/progs/direct/xml/xml_direct_parser.cpp16
-rw-r--r--src/progs/gpsim/base/gpsim.cpp28
-rw-r--r--src/progs/gpsim/base/gpsim.h11
-rw-r--r--src/progs/gpsim/base/gpsim_debug.cpp68
-rw-r--r--src/progs/gpsim/base/gpsim_debug.h19
-rw-r--r--src/progs/gpsim/gui/gpsim_group_ui.cpp20
-rw-r--r--src/progs/gpsim/gui/gpsim_group_ui.h11
-rw-r--r--src/progs/gui/debug_config_center.cpp2
-rw-r--r--src/progs/gui/debug_config_center.h8
-rw-r--r--src/progs/gui/hardware_config_widget.cpp66
-rw-r--r--src/progs/gui/hardware_config_widget.h33
-rw-r--r--src/progs/gui/port_selector.cpp44
-rw-r--r--src/progs/gui/port_selector.h29
-rw-r--r--src/progs/gui/prog_config_center.cpp50
-rw-r--r--src/progs/gui/prog_config_center.h21
-rw-r--r--src/progs/gui/prog_config_widget.cpp14
-rw-r--r--src/progs/gui/prog_config_widget.h7
-rw-r--r--src/progs/gui/prog_group_ui.cpp56
-rw-r--r--src/progs/gui/prog_group_ui.h15
-rw-r--r--src/progs/icd1/base/icd1.cpp22
-rw-r--r--src/progs/icd1/base/icd1.h6
-rw-r--r--src/progs/icd1/base/icd1_data.h4
-rw-r--r--src/progs/icd1/base/icd1_prog.cpp2
-rw-r--r--src/progs/icd1/base/icd1_prog.h7
-rw-r--r--src/progs/icd1/base/icd1_serial.cpp10
-rw-r--r--src/progs/icd1/base/icd1_serial.h2
-rw-r--r--src/progs/icd1/gui/icd1_group_ui.cpp16
-rw-r--r--src/progs/icd1/gui/icd1_group_ui.h9
-rw-r--r--src/progs/icd1/xml/xml_icd1_parser.cpp8
-rw-r--r--src/progs/icd2/base/icd.cpp10
-rw-r--r--src/progs/icd2/base/icd.h8
-rw-r--r--src/progs/icd2/base/icd2.cpp78
-rw-r--r--src/progs/icd2/base/icd2.h14
-rw-r--r--src/progs/icd2/base/icd2_data.h4
-rw-r--r--src/progs/icd2/base/icd2_debug.cpp56
-rw-r--r--src/progs/icd2/base/icd2_debug.h9
-rw-r--r--src/progs/icd2/base/icd2_debug_specific.cpp16
-rw-r--r--src/progs/icd2/base/icd2_debug_specific.h6
-rw-r--r--src/progs/icd2/base/icd2_prog.cpp18
-rw-r--r--src/progs/icd2/base/icd2_prog.h8
-rw-r--r--src/progs/icd2/base/icd2_serial.cpp12
-rw-r--r--src/progs/icd2/base/icd2_serial.h6
-rw-r--r--src/progs/icd2/base/icd2_usb.cpp30
-rw-r--r--src/progs/icd2/base/icd2_usb.h10
-rw-r--r--src/progs/icd2/base/icd_prog.cpp4
-rw-r--r--src/progs/icd2/base/icd_prog.h1
-rw-r--r--src/progs/icd2/base/microchip.h2
-rw-r--r--src/progs/icd2/gui/icd2_group_ui.cpp28
-rw-r--r--src/progs/icd2/gui/icd2_group_ui.h11
-rw-r--r--src/progs/icd2/xml/xml_icd2_parser.cpp14
-rw-r--r--src/progs/manager/breakpoint.cpp22
-rw-r--r--src/progs/manager/breakpoint.h13
-rw-r--r--src/progs/manager/debug_manager.cpp40
-rw-r--r--src/progs/manager/debug_manager.h17
-rw-r--r--src/progs/manager/prog_manager.cpp20
-rw-r--r--src/progs/manager/prog_manager.h9
-rw-r--r--src/progs/picdem_bootloader/base/picdem_bootloader.cpp36
-rw-r--r--src/progs/picdem_bootloader/base/picdem_bootloader.h8
-rw-r--r--src/progs/picdem_bootloader/base/picdem_bootloader_data.h4
-rw-r--r--src/progs/picdem_bootloader/base/picdem_bootloader_prog.h5
-rw-r--r--src/progs/picdem_bootloader/gui/picdem_bootloader_ui.cpp12
-rw-r--r--src/progs/picdem_bootloader/gui/picdem_bootloader_ui.h5
-rw-r--r--src/progs/picdem_bootloader/xml/xml_picdem_bootloader_parser.cpp4
-rw-r--r--src/progs/pickit1/base/pickit1.cpp4
-rw-r--r--src/progs/pickit1/base/pickit1_data.h4
-rw-r--r--src/progs/pickit1/base/pickit1_prog.h5
-rw-r--r--src/progs/pickit1/gui/pickit1_group_ui.cpp8
-rw-r--r--src/progs/pickit1/gui/pickit1_group_ui.h4
-rw-r--r--src/progs/pickit1/xml/xml_pickit1_parser.cpp16
-rw-r--r--src/progs/pickit2/base/pickit.cpp20
-rw-r--r--src/progs/pickit2/base/pickit.h6
-rw-r--r--src/progs/pickit2/base/pickit2.cpp16
-rw-r--r--src/progs/pickit2/base/pickit2_data.h4
-rw-r--r--src/progs/pickit2/base/pickit2_prog.cpp4
-rw-r--r--src/progs/pickit2/base/pickit2_prog.h5
-rw-r--r--src/progs/pickit2/base/pickit_prog.cpp10
-rw-r--r--src/progs/pickit2/base/pickit_prog.h1
-rw-r--r--src/progs/pickit2/gui/pickit2_group_ui.cpp12
-rw-r--r--src/progs/pickit2/gui/pickit2_group_ui.h7
-rw-r--r--src/progs/pickit2/xml/xml_pickit2_parser.cpp16
-rw-r--r--src/progs/pickit2_bootloader/base/pickit2_bootloader.cpp6
-rw-r--r--src/progs/pickit2_bootloader/base/pickit2_bootloader_data.h4
-rw-r--r--src/progs/pickit2_bootloader/base/pickit2_bootloader_prog.h5
-rw-r--r--src/progs/pickit2_bootloader/gui/pickit2_bootloader_ui.cpp8
-rw-r--r--src/progs/pickit2_bootloader/gui/pickit2_bootloader_ui.h5
-rw-r--r--src/progs/pickit2_bootloader/xml/xml_pickit2_bootloader_parser.cpp4
-rw-r--r--src/progs/pickit2v2/base/pickit2v2.cpp40
-rw-r--r--src/progs/pickit2v2/base/pickit2v2.h8
-rw-r--r--src/progs/pickit2v2/base/pickit2v2_data.cpp8
-rw-r--r--src/progs/pickit2v2/base/pickit2v2_data.h4
-rw-r--r--src/progs/pickit2v2/base/pickit2v2_prog.cpp22
-rw-r--r--src/progs/pickit2v2/base/pickit2v2_prog.h5
-rw-r--r--src/progs/pickit2v2/gui/pickit2v2_group_ui.cpp8
-rw-r--r--src/progs/pickit2v2/gui/pickit2v2_group_ui.h4
-rw-r--r--src/progs/psp/base/psp.cpp48
-rw-r--r--src/progs/psp/base/psp.h6
-rw-r--r--src/progs/psp/base/psp_data.h6
-rw-r--r--src/progs/psp/base/psp_prog.h7
-rw-r--r--src/progs/psp/base/psp_serial.cpp20
-rw-r--r--src/progs/psp/base/psp_serial.h8
-rw-r--r--src/progs/psp/gui/psp_group_ui.cpp8
-rw-r--r--src/progs/psp/gui/psp_group_ui.h4
-rw-r--r--src/progs/psp/xml/xml_psp_parser.cpp8
-rw-r--r--src/progs/sdcdb/base/sdcdb_debug.cpp64
-rw-r--r--src/progs/sdcdb/base/sdcdb_debug.h19
-rw-r--r--src/progs/tbl_bootloader/base/tbl_bootloader.cpp24
-rw-r--r--src/progs/tbl_bootloader/base/tbl_bootloader.h2
-rw-r--r--src/progs/tbl_bootloader/base/tbl_bootloader_data.h4
-rw-r--r--src/progs/tbl_bootloader/base/tbl_bootloader_prog.h5
-rw-r--r--src/progs/tbl_bootloader/gui/tbl_bootloader_ui.cpp16
-rw-r--r--src/progs/tbl_bootloader/gui/tbl_bootloader_ui.h5
-rw-r--r--src/progs/tbl_bootloader/xml/xml_tbl_bootloader_parser.cpp8
142 files changed, 1086 insertions, 1045 deletions
diff --git a/src/progs/base/debug_config.cpp b/src/progs/base/debug_config.cpp
index 387941d..b1bbda4 100644
--- a/src/progs/base/debug_config.cpp
+++ b/src/progs/base/debug_config.cpp
@@ -9,6 +9,6 @@
#include "debug_config.h"
const Debugger::Config::Data Debugger::Config::DATA[Nb_Types] = {
- { "only_stop_on_source_line", I18N_NOOP("Only stop stepping on source line."), QVariant(true, 0) },
- { "only_stop_on_project_source_line", I18N_NOOP("Only stop stepping on project source line."), QVariant(true, 0) }
+ { "only_stop_on_source_line", I18N_NOOP("Only stop stepping on source line."), TQVariant(true, 0) },
+ { "only_stop_on_project_source_line", I18N_NOOP("Only stop stepping on project source line."), TQVariant(true, 0) }
};
diff --git a/src/progs/base/generic_debug.cpp b/src/progs/base/generic_debug.cpp
index 252d239..46c6597 100644
--- a/src/progs/base/generic_debug.cpp
+++ b/src/progs/base/generic_debug.cpp
@@ -53,7 +53,7 @@ bool Debugger::Base::init()
bool Debugger::Base::update()
{
if ( !updateState() ) return false;
- if ( _programmer.state()==::Programmer::Halted ) return _deviceSpecific->updateStatus();
+ if ( _programmer.state()==::Programmer::Halted ) return _deviceSpecific->updatetqStatus();
return true;
}
@@ -76,7 +76,7 @@ bool Debugger::Base::halt()
if ( !softHalt(success) ) return false;
if ( !success ) return hardHalt();
if ( !update() ) return false;
- log(Log::LineType::Information, QString("Halted at %1").arg(toHexLabel(pc(), _programmer.device()->nbCharsAddress())));
+ log(Log::LineType::Information, TQString("Halted at %1").tqarg(toHexLabel(pc(), _programmer.device()->nbCharsAddress())));
_programmer.setState(::Programmer::Halted);
return true;
}
@@ -87,13 +87,13 @@ bool Debugger::Base::reset()
return update();
}
-QString Debugger::Base::statusString() const
+TQString Debugger::Base::statusString() const
{
- if ( _programmer.state()!=::Programmer::Halted ) return QString::null;
+ if ( _programmer.state()!=::Programmer::Halted ) return TQString();
return _deviceSpecific->statusString();
}
-void Debugger::Base::setupInput(PURL::FileType type, const QString &directory, const QString &filename)
+void Debugger::Base::setupInput(PURL::FileType type, const TQString &directory, const TQString &filename)
{
_inputType = type;
_directory = directory;
diff --git a/src/progs/base/generic_debug.h b/src/progs/base/generic_debug.h
index 903d451..48f9e60 100644
--- a/src/progs/base/generic_debug.h
+++ b/src/progs/base/generic_debug.h
@@ -29,29 +29,29 @@ public:
virtual ~Base();
void init(DeviceSpecific *deviceSpecific, Specific *specific);
const Device::Data *device() const;
- void setupInput(PURL::FileType type, const QString &directory, const QString &filename);
+ void setupInput(PURL::FileType type, const TQString &directory, const TQString &filename);
void setCoff(const Coff::TextObject *coff) { _coff = coff; }
- QString directory() const { return _directory; }
+ TQString directory() const { return _directory; }
bool init();
bool update();
bool reset();
bool run();
bool halt();
bool step();
- QString statusString() const;
- virtual bool setBreakpoints(const QValueList<Address> &addresses) = 0;
+ TQString statusString() const;
+ virtual bool setBreakpoints(const TQValueList<Address> &addresses) = 0;
BitValue pc() const;
Register::TypeData pcTypeData() const;
virtual bool readRegister(const Register::TypeData &data, BitValue &value) = 0;
virtual bool writeRegister(const Register::TypeData &data, BitValue value) = 0;
- virtual bool updatePortStatus(uint index, QMap<uint, Device::PortBitData> &bits) = 0;
+ virtual bool updatePorttqStatus(uint index, TQMap<uint, Device::PortBitData> &bits) = 0;
protected:
Programmer::Base &_programmer;
DeviceSpecific *_deviceSpecific;
Specific *_specific;
PURL::FileType _inputType;
- QString _directory, _filename;
+ TQString _directory, _filename;
const Coff::TextObject *_coff;
virtual bool internalInit() = 0;
@@ -68,8 +68,8 @@ class DeviceSpecific : public Log::Base
{
public:
DeviceSpecific(Debugger::Base &base) : Log::Base(base), _base(base) {}
- virtual bool updateStatus() = 0;
- virtual QString statusString() const = 0;
+ virtual bool updatetqStatus() = 0;
+ virtual TQString statusString() const = 0;
protected:
Debugger::Base &_base;
diff --git a/src/progs/base/generic_prog.cpp b/src/progs/base/generic_prog.cpp
index 6386eb2..e7e6e2e 100644
--- a/src/progs/base/generic_prog.cpp
+++ b/src/progs/base/generic_prog.cpp
@@ -8,7 +8,7 @@
***************************************************************************/
#include "generic_prog.h"
-#include <qdir.h>
+#include <tqdir.h>
#include "common/global/global.h"
#include "prog_group.h"
@@ -70,15 +70,15 @@ bool Programmer::Base::simpleConnectHardware()
disconnectHardware();
clear();
if (_device) {
- QString label = _group.label();
+ TQString label = _group.label();
if ( group().isSoftware() )
- log(Log::LineType::Information, i18n("Connecting %1 with device %2...").arg(label).arg(_device->name()));
+ log(Log::LineType::Information, i18n("Connecting %1 with device %2...").tqarg(label).tqarg(_device->name()));
else {
if ( !_hardware->name().isEmpty() ) label += "[" + _hardware->name() + "]";
Port::Description pd = _hardware->portDescription();
- QString s = pd.type.label();
+ TQString s = pd.type.label();
if (pd.type.data().withDevice) s += " (" + pd.device + ")";
- log(Log::LineType::Information, i18n("Connecting %1 on %2 with device %3...").arg(label).arg(s).arg(_device->name()));
+ log(Log::LineType::Information, i18n("Connecting %1 on %2 with device %3...").tqarg(label).tqarg(s).tqarg(_device->name()));
}
}
return _hardware->connectHardware();
@@ -98,7 +98,7 @@ bool Programmer::Base::connectHardware()
if ( !checkFirmwareVersion() ) return false;
if ( !setTargetPowerOn(false) ) return false;
if ( !setTarget() ) return false;
- log(Log::LineType::Information, i18n(" Set target self powered: %1").arg(_targetSelfPowered ? "true" : "false"));
+ log(Log::LineType::Information, i18n(" Set target self powered: %1").tqarg(_targetSelfPowered ? "true" : "false"));
if ( !setTargetPowerOn(!_targetSelfPowered) ) return false;
if ( !internalSetupHardware() ) return false;
if ( !readVoltages() ) return false;
@@ -133,30 +133,30 @@ bool Programmer::Base::checkFirmwareVersion()
{
if ( _mode==BootloadMode ) log(Log::LineType::Information, i18n("Programmer is in bootload mode."));
if ( !_firmwareVersion.isValid() ) return true;
- log(Log::LineType::Information, i18n("Firmware version is %1").arg(_firmwareVersion.pretty()));
+ log(Log::LineType::Information, i18n("Firmware version is %1").tqarg(_firmwareVersion.pretty()));
VersionData vd = _firmwareVersion.toWithoutDot();
VersionData tmp = firmwareVersion(FirmwareVersionType::Max);
if ( tmp.isValid() && tmp.toWithoutDot()<vd ) {
VersionData mplab = mplabVersion(FirmwareVersionType::Max);
- QString s = (mplab.isValid() ? " " + i18n("MPLAB %1").arg(mplab.prettyWithoutDot()) : QString::null);
+ TQString s = (mplab.isValid() ? " " + i18n("MPLAB %1").tqarg(mplab.prettyWithoutDot()) : TQString());
log(Log::LineType::Warning, i18n("The firmware version (%1) is higher than the version tested with piklab (%2%3).\n"
- "You may experience problems.").arg(_firmwareVersion.pretty()).arg(tmp.pretty()).arg(s));
+ "You may experience problems.").tqarg(_firmwareVersion.pretty()).tqarg(tmp.pretty()).tqarg(s));
return true;
}
tmp = firmwareVersion(FirmwareVersionType::Min);
if ( tmp.isValid() && vd<tmp.toWithoutDot() ) {
VersionData mplab = mplabVersion(FirmwareVersionType::Min);
- QString s = (mplab.isValid() ? " " + i18n("MPLAB %1").arg(mplab.prettyWithoutDot()) : QString::null);
+ TQString s = (mplab.isValid() ? " " + i18n("MPLAB %1").tqarg(mplab.prettyWithoutDot()) : TQString());
log(Log::LineType::Warning, i18n("The firmware version (%1) is lower than the version tested with piklab (%2%3).\n"
- "You may experience problems.").arg(_firmwareVersion.pretty()).arg(tmp.pretty()).arg(s));
+ "You may experience problems.").tqarg(_firmwareVersion.pretty()).tqarg(tmp.pretty()).tqarg(s));
return true;
}
tmp = firmwareVersion(FirmwareVersionType::Recommended);
if ( tmp.isValid() && vd<tmp.toWithoutDot() ) {
VersionData mplab = mplabVersion(FirmwareVersionType::Recommended);
- QString s = (mplab.isValid() ? " " + i18n("MPLAB %1").arg(mplab.prettyWithoutDot()) : QString::null);
+ TQString s = (mplab.isValid() ? " " + i18n("MPLAB %1").tqarg(mplab.prettyWithoutDot()) : TQString());
log(Log::LineType::Warning, i18n("The firmware version (%1) is lower than the recommended version (%2%3).\n"
- "It is recommended to upgrade the firmware.").arg(_firmwareVersion.pretty()).arg(tmp.pretty()).arg(s));
+ "It is recommended to upgrade the firmware.").tqarg(_firmwareVersion.pretty()).tqarg(tmp.pretty()).tqarg(s));
return true;
}
return true;
@@ -173,13 +173,13 @@ bool Programmer::Base::enterMode(Mode mode)
return ( _mode==mode );
}
-void Programmer::Base::log(Log::LineType type, const QString &message)
+void Programmer::Base::log(Log::LineType type, const TQString &message)
{
if ( type==Log::LineType::Error ) _state = NotConnected;
Log::Base::log(type, message);
}
-void Programmer::Base::log(Log::DebugLevel level, const QString &message)
+void Programmer::Base::log(Log::DebugLevel level, const TQString &message)
{
Log::Base::log(level, message);
}
@@ -243,11 +243,11 @@ void Programmer::Base::endProgramming()
bool Programmer::Base::uploadFirmware(const PURL::Url &url)
{
_progressMonitor.clear();
- log(Log::DebugLevel::Normal, QString(" Firmware file: %1").arg(url.pretty()));
+ log(Log::DebugLevel::Normal, TQString(" Firmware file: %1").tqarg(url.pretty()));
Log::StringView sview;
PURL::File file(url, sview);
if ( !file.openForRead() ) {
- log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").arg(url.pretty()));
+ log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").tqarg(url.pretty()));
return false;
}
bool ok = doUploadFirmware(file);
diff --git a/src/progs/base/generic_prog.h b/src/progs/base/generic_prog.h
index 3b4b219..c1667b0 100644
--- a/src/progs/base/generic_prog.h
+++ b/src/progs/base/generic_prog.h
@@ -31,8 +31,8 @@ namespace Programmer
enum VerifyAction { NormalVerify = 0, BlankCheckVerify = 1,
IgnoreProtectedVerify = 2, OnlyProgrammedVerify = 4 };
- Q_DECLARE_FLAGS(VerifyActions, VerifyAction)
- Q_DECLARE_OPERATORS_FOR_FLAGS(VerifyActions)
+ TQ_DECLARE_FLAGS(VerifyActions, VerifyAction)
+ TQ_DECLARE_OPERATORS_FOR_FLAGS(VerifyActions)
class VerifyData {
public:
VerifyData(VerifyActions pactions, const Device::Memory &pmemory) : actions(pactions), memory(pmemory) {}
@@ -47,7 +47,7 @@ namespace Programmer
class HardwareDescription {
public:
Port::Description port;
- QString name;
+ TQString name;
};
BEGIN_DECLARE_ENUM(Task)
@@ -59,15 +59,16 @@ namespace Programmer
END_DECLARE_ENUM_NO_DATA(FirmwareVersionType)
//-----------------------------------------------------------------------------
-class Base : public QObject, public Log::Base
+class Base : public TQObject, public Log::Base
{
Q_OBJECT
+ TQ_OBJECT
public:
Base(const Group &group, const Device::Data *data, const char *name);
virtual ~Base();
- virtual void log(Log::LineType type, const QString &message);
- virtual void log(Log::DebugLevel level, const QString &message);
+ virtual void log(Log::LineType type, const TQString &message);
+ virtual void log(Log::DebugLevel level, const TQString &message);
void init(bool targetSelfPowered, Hardware *hardware, DeviceSpecific *deviceSpecific);
const Device::Data *device() const { return _device; }
const Group &group() const { return _group; }
@@ -108,7 +109,7 @@ public:
virtual void clear();
signals:
- void actionMessage(const QString &message);
+ void actionMessage(const TQString &message);
protected:
Hardware *_hardware;
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]);
diff --git a/src/progs/base/hardware_config.h b/src/progs/base/hardware_config.h
index 5252ff3..866ecb9 100644
--- a/src/progs/base/hardware_config.h
+++ b/src/progs/base/hardware_config.h
@@ -30,7 +30,7 @@ public:
virtual void writeConfig(GenericConfig &config) const;
virtual bool isEqual(const Data &data) const;
PortType portType;
- QString name;
+ TQString name;
};
//-----------------------------------------------------------------------------
@@ -39,20 +39,20 @@ class Config : public GenericConfig
public:
Config(const char *group) : GenericConfig(group) {}
virtual ~Config() {}
- QStringList hardwareNames(PortType type);
- bool isStandardHardware(const QString &name) const { return standardHardwareData(name); }
- QString label(const QString &name) const;
- QString comment(const QString &name) const;
- void writeCustomHardware(const QString &name, const Hardware::Data &data);
- QString currentHardware(PortType type);
- void writeCurrentHardware(PortType type, const QString &name);
- void deleteCustomHardware(const QString &name);
- Hardware::Data *hardwareData(const QString& name) const;
+ TQStringList hardwareNames(PortType type);
+ bool isStandardHardware(const TQString &name) const { return standardHardwareData(name); }
+ TQString label(const TQString &name) const;
+ TQString comment(const TQString &name) const;
+ void writeCustomHardware(const TQString &name, const Hardware::Data &data);
+ TQString currentHardware(PortType type);
+ void writeCurrentHardware(PortType type, const TQString &name);
+ void deleteCustomHardware(const TQString &name);
+ Hardware::Data *hardwareData(const TQString& name) const;
protected:
- virtual QStringList standardHardwareNames(PortType type) const = 0;
- virtual Hardware::Data *standardHardwareData(const QString &name) const = 0;
- virtual const DataInfo *standardHardwareDataInfo(const QString &name) const = 0;
+ virtual TQStringList standardHardwareNames(PortType type) const = 0;
+ virtual Hardware::Data *standardHardwareData(const TQString &name) const = 0;
+ virtual const DataInfo *standardHardwareDataInfo(const TQString &name) const = 0;
virtual Hardware::Data *createHardwareData() const = 0;
};
diff --git a/src/progs/base/prog_config.cpp b/src/progs/base/prog_config.cpp
index 8115ce7..9802fba 100644
--- a/src/progs/base/prog_config.cpp
+++ b/src/progs/base/prog_config.cpp
@@ -24,22 +24,22 @@ void Programmer::GroupConfig::writePortType(const Group &group, PortType type)
config.writeEnumEntry<PortType>("port_group", type);
}
-QString Programmer::GroupConfig::portDevice(const Group &group, PortType portType)
+TQString Programmer::GroupConfig::portDevice(const Group &group, PortType portType)
{
GenericConfig config(group.name());
- QString device = config.readEntry(QString(portType.key()) + "_port_device" , QString::null);
+ TQString device = config.readEntry(TQString(portType.key()) + "_port_device" , TQString());
if ( device.isNull() ) {
- QStringList list = Port::probedDeviceList(portType);
- if ( list.isEmpty() ) return QString::null;
+ TQStringList list = Port::probedDeviceList(portType);
+ if ( list.isEmpty() ) return TQString();
return list[0];
}
return device;
}
-void Programmer::GroupConfig::writePortDevice(const Group &group, PortType type, const QString &device)
+void Programmer::GroupConfig::writePortDevice(const Group &group, PortType type, const TQString &device)
{
if ( type==PortType::Nb_Types ) return;
GenericConfig config(group.name());
- config.writeEntry(QString(type.key()) + "_port_device", device);
+ config.writeEntry(TQString(type.key()) + "_port_device", device);
}
Port::Description Programmer::GroupConfig::portDescription(const Group &group)
@@ -53,12 +53,12 @@ void Programmer::GroupConfig::writePortDescription(const Group &group, const Por
writePortDevice(group, dp.type, dp.device);
}
-QString Programmer::GroupConfig::firmwareDirectory(const Group &group)
+TQString Programmer::GroupConfig::firmwareDirectory(const Group &group)
{
GenericConfig config(group.name());
- return config.readEntry("firmware_directory", QString::null);
+ return config.readEntry("firmware_directory", TQString());
}
-void Programmer::GroupConfig::writeFirmwareDirectory(const Group &group, const QString &path)
+void Programmer::GroupConfig::writeFirmwareDirectory(const Group &group, const TQString &path)
{
GenericConfig config(group.name());
config.writeEntry("firmware_directory", path);
@@ -66,13 +66,13 @@ void Programmer::GroupConfig::writeFirmwareDirectory(const Group &group, const Q
//----------------------------------------------------------------------------
const Programmer::Config::Data Programmer::Config::DATA[Nb_Types] = {
- { "only_program_non_mask", I18N_NOOP("Only program what is needed (faster)."), QVariant(true, 0) },
- { "verify_after_program", I18N_NOOP("Verify device memory after programming."), QVariant(true, 0) },
- { "only_verify_programmed", I18N_NOOP("Only verify programmed words in code memory (faster)."), QVariant(true, 0) },
- { "power_down_after_programming", I18N_NOOP("Power down target after programming."), QVariant(true, 0) },
- { "target_self_powered", I18N_NOOP("Target is self-powered (when possible)."), QVariant(true, 0) },
- { "blank_check_after_erase", I18N_NOOP("Blank check after erase."), QVariant(false, 0) },
- { "preserve_eeprom", I18N_NOOP("Preserve data EEPROM when programming."), QVariant(false, 0) },
- { "program_eeprom", I18N_NOOP("Program data EEPROM."), QVariant(true, 0) },
- { "run_after_program", I18N_NOOP("Run device after successful programming."), QVariant(false, 0) }
+ { "only_program_non_tqmask", I18N_NOOP("Only program what is needed (faster)."), TQVariant(true, 0) },
+ { "verify_after_program", I18N_NOOP("Verify device memory after programming."), TQVariant(true, 0) },
+ { "only_verify_programmed", I18N_NOOP("Only verify programmed words in code memory (faster)."), TQVariant(true, 0) },
+ { "power_down_after_programming", I18N_NOOP("Power down target after programming."), TQVariant(true, 0) },
+ { "target_self_powered", I18N_NOOP("Target is self-powered (when possible)."), TQVariant(true, 0) },
+ { "blank_check_after_erase", I18N_NOOP("Blank check after erase."), TQVariant(false, 0) },
+ { "preserve_eeprom", I18N_NOOP("Preserve data EEPROM when programming."), TQVariant(false, 0) },
+ { "program_eeprom", I18N_NOOP("Program data EEPROM."), TQVariant(true, 0) },
+ { "run_after_program", I18N_NOOP("Run device after successful programming."), TQVariant(false, 0) }
};
diff --git a/src/progs/base/prog_config.h b/src/progs/base/prog_config.h
index 0c772c2..425d92c 100644
--- a/src/progs/base/prog_config.h
+++ b/src/progs/base/prog_config.h
@@ -22,12 +22,12 @@ class GroupConfig
public:
static PortType portType(const Group &group);
static void writePortType(const Group &group, PortType type);
- static QString portDevice(const Group &group, PortType type);
- static void writePortDevice(const Group &group, PortType type, const QString &device);
+ static TQString portDevice(const Group &group, PortType type);
+ static void writePortDevice(const Group &group, PortType type, const TQString &device);
static Port::Description portDescription(const Group &group);
static void writePortDescription(const Group &group, const Port::Description &pd);
- static QString firmwareDirectory(const Group &group);
- static void writeFirmwareDirectory(const Group &group, const QString &path);
+ static TQString firmwareDirectory(const Group &group);
+ static void writeFirmwareDirectory(const Group &group, const TQString &path);
};
//----------------------------------------------------------------------------
diff --git a/src/progs/base/prog_group.cpp b/src/progs/base/prog_group.cpp
index 5801318..d1a2a2b 100644
--- a/src/progs/base/prog_group.cpp
+++ b/src/progs/base/prog_group.cpp
@@ -19,7 +19,7 @@ const PURL::FileType Programmer::INPUT_FILE_TYPE_DATA[Nb_InputFileTypes] = {
PURL::Coff, PURL::Cod, PURL::Hex
};
-QString Programmer::Group::statusLabel(PortType type) const
+TQString Programmer::Group::statusLabel(PortType type) const
{
uint nb = 0;
FOR_EACH(PortType, ptype) if ( isPortSupported(ptype) ) nb++;
diff --git a/src/progs/base/prog_group.h b/src/progs/base/prog_group.h
index 07807fe..f72c783 100644
--- a/src/progs/base/prog_group.h
+++ b/src/progs/base/prog_group.h
@@ -9,7 +9,7 @@
#ifndef PROG_GROUP_H
#define PROG_GROUP_H
-class QWidget;
+class TQWidget;
#include "common/common/group.h"
#include "common/port/port.h"
#include "common/common/purl_base.h"
@@ -29,8 +29,8 @@ enum Property { NoProperty = 0, Programmer = 1, Debugger = 2,
CanReleaseReset = 4, HasFirmware = 8, CanUploadFirmware = 16,
NeedDeviceSpecificFirmware = 32, HasSelfTest = 64,
CanReadMemory = 128, HasConnectedState = 256 };
-Q_DECLARE_FLAGS(Properties, Property)
-Q_DECLARE_OPERATORS_FOR_FLAGS(Properties)
+TQ_DECLARE_FLAGS(Properties, Property)
+TQ_DECLARE_OPERATORS_FOR_FLAGS(Properties)
enum TargetPowerMode { TargetPowerModeFromConfig, TargetSelfPowered, TargetExternallyPowered };
@@ -40,10 +40,10 @@ extern const PURL::FileType INPUT_FILE_TYPE_DATA[Nb_InputFileTypes];
class Group : public ::Group::Base
{
public:
- virtual QString xmlName() const { return name(); }
+ virtual TQString xmlName() const { return name(); }
virtual ::Hardware::Config *hardwareConfig() const { return 0; }
virtual Properties properties() const = 0;
- virtual QString statusLabel(PortType type) const;
+ virtual TQString statusLabel(PortType type) const;
virtual bool canReadVoltages() const = 0;
virtual TargetPowerMode targetPowerMode() const = 0;
bool isDebugger() const { return ( properties() & Debugger ); }
diff --git a/src/progs/base/prog_specific.cpp b/src/progs/base/prog_specific.cpp
index a372e92..32bc5e3 100644
--- a/src/progs/base/prog_specific.cpp
+++ b/src/progs/base/prog_specific.cpp
@@ -16,7 +16,7 @@ Programmer::DeviceSpecific::DeviceSpecific(Programmer::Base &base)
{}
//-----------------------------------------------------------------------------
-Programmer::Hardware::Hardware(Programmer::Base &base, Port::Base *port, const QString &name)
+Programmer::Hardware::Hardware(Programmer::Base &base, Port::Base *port, const TQString &name)
: Log::Base(&base), _port(port), _name(name), _base(base)
{}
@@ -37,14 +37,14 @@ void Programmer::Hardware::disconnectHardware()
internalDisconnectHardware();
}
-bool Programmer::Hardware::rawWrite(const QString &data)
+bool Programmer::Hardware::rawWrite(const TQString &data)
{
Q_ASSERT(_port);
- QByteArray a = toAscii(data);
+ TQByteArray a = toAscii(data);
return _port->send(a.data(), a.count());
}
-bool Programmer::Hardware::rawRead(uint size, QString &data)
+bool Programmer::Hardware::rawRead(uint size, TQString &data)
{
Q_ASSERT(_port);
return _port->receive(size, data);
diff --git a/src/progs/base/prog_specific.h b/src/progs/base/prog_specific.h
index 1703bcb..732726e 100644
--- a/src/progs/base/prog_specific.h
+++ b/src/progs/base/prog_specific.h
@@ -9,7 +9,7 @@
#ifndef PROG_SPECIFIC_H
#define PROG_SPECIFIC_H
-#include <qfile.h>
+#include <tqfile.h>
#include "common/global/log.h"
#include "common/port/port_base.h"
@@ -38,18 +38,18 @@ protected:
class Hardware : public Log::Base
{
public:
- Hardware(::Programmer::Base &base, Port::Base *port, const QString &name);
+ Hardware(::Programmer::Base &base, Port::Base *port, const TQString &name);
virtual ~Hardware();
Port::Description portDescription() const { return _port->description(); }
- QString name() const { return _name; }
+ TQString name() const { return _name; }
bool connectHardware();
- bool rawWrite(const QString &data);
- bool rawRead(uint size, QString &data);
+ bool rawWrite(const TQString &data);
+ bool rawRead(uint size, TQString &data);
void disconnectHardware();
protected:
Port::Base *_port;
- QString _name;
+ TQString _name;
::Programmer::Base &_base;
virtual bool internalConnectHardware() = 0;
diff --git a/src/progs/bootloader/base/bootloader.h b/src/progs/bootloader/base/bootloader.h
index 08a0730..8f358a4 100644
--- a/src/progs/bootloader/base/bootloader.h
+++ b/src/progs/bootloader/base/bootloader.h
@@ -17,7 +17,7 @@ namespace Bootloader
class Hardware : public ::Programmer::PicHardware
{
public:
- Hardware(::Programmer::Base &base, Port::Base *port) : ::Programmer::PicHardware(base, port, QString::null) {}
+ Hardware(::Programmer::Base &base, Port::Base *port) : ::Programmer::PicHardware(base, port, TQString()) {}
virtual bool write(Pic::MemoryRangeType type, const Device::Array &data) = 0;
virtual bool read(Pic::MemoryRangeType type, Device::Array &data, const ::Programmer::VerifyData *vdata) = 0;
virtual bool internalConnectHardware() = 0;
diff --git a/src/progs/bootloader/base/bootloader_prog.h b/src/progs/bootloader/base/bootloader_prog.h
index 7b9749e..52e1b0d 100644
--- a/src/progs/bootloader/base/bootloader_prog.h
+++ b/src/progs/bootloader/base/bootloader_prog.h
@@ -18,6 +18,7 @@ namespace Bootloader
class ProgrammerBase : public Programmer::PicBase
{
Q_OBJECT
+ TQ_OBJECT
public:
ProgrammerBase(const Programmer::Group &group, const Pic::Data *data, const char *name);
diff --git a/src/progs/bootloader/gui/bootloader_ui.h b/src/progs/bootloader/gui/bootloader_ui.h
index 386c412..0d6737a 100644
--- a/src/progs/bootloader/gui/bootloader_ui.h
+++ b/src/progs/bootloader/gui/bootloader_ui.h
@@ -9,7 +9,7 @@
#ifndef BOOTLOADER_UI_H
#define BOOTLOADER_UI_H
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include "progs/gui/prog_group_ui.h"
#include "progs/gui/prog_config_widget.h"
@@ -22,7 +22,7 @@ class GroupUI : public ::Programmer::GroupUI
{
public:
virtual bool hasAdvancedDialog() const { return false; }
- virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &, QWidget *) const { return 0; }
+ virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &, TQWidget *) const { return 0; }
};
} // namespace
diff --git a/src/progs/direct/base/direct.cpp b/src/progs/direct/base/direct.cpp
index fc53cf3..c0d7de6 100644
--- a/src/progs/direct/base/direct.cpp
+++ b/src/progs/direct/base/direct.cpp
@@ -47,7 +47,7 @@ namespace Direct
class SerialPort : public Port::Serial
{
public:
- SerialPort(const QString &device, Log::Base &base)
+ SerialPort(const TQString &device, Log::Base &base)
: Serial(device, NeedBreak, base) {}
bool open() {
@@ -83,7 +83,7 @@ void Direct::Hardware::setPin(PinType type, bool on)
int pin = _data.pins[type];
if ( isGroundPin(pin) ) return;
uint p = (pin<0 ? -pin : pin)-1;
- //log(Log::DebugLevel::Extra, QString("Hardware::setPin %1 %2: %3 %4").arg(PIN_DATA[type].label).arg(pin).arg(on).arg(_data.clockDelay));
+ //log(Log::DebugLevel::Extra, TQString("Hardware::setPin %1 %2: %3 %4").tqarg(PIN_DATA[type].label).tqarg(pin).tqarg(on).tqarg(_data.clockDelay));
_port->setPinOn(p, on, (pin<0 ? Port::NegativeLogic : Port::PositiveLogic));
if ( type==Clock ) Port::usleep(_data.clockDelay);
}
@@ -95,7 +95,7 @@ bool Direct::Hardware::readBit()
uint p = (pin<0 ? -pin : pin)-1;
bool on;
_port->readPin(p, (pin<0 ? Port::NegativeLogic : Port::PositiveLogic), on);
- //log(Log::DebugLevel::Extra, QString("Hardware::read DataIn %2: %3").arg(pin).arg(on));
+ //log(Log::DebugLevel::Extra, TQString("Hardware::read DataIn %2: %3").tqarg(pin).tqarg(on));
return on;
}
@@ -104,10 +104,10 @@ uint Direct::Hardware::nbPins(Port::IODir dir) const
return _port->pinData(dir).count();
}
-QString Direct::Hardware::pinLabelForIndex(Port::IODir dir, uint i) const
+TQString Direct::Hardware::pinLabelForIndex(Port::IODir dir, uint i) const
{
Port::PinData pd = _port->pinData(dir)[i];
- return QString("%1 (%2)").arg(pd.pin+1).arg(pd.label);
+ return TQString("%1 (%2)").tqarg(pd.pin+1).tqarg(pd.label);
}
Port::IODir Direct::Hardware::ioTypeForPin(int pin) const
@@ -126,7 +126,7 @@ uint Direct::Hardware::pinForIndex(Port::IODir dir, uint i) const
uint Direct::Hardware::indexForPin(Port::IODir dir, int pin) const
{
- QValueVector<Port::PinData> v = _port->pinData(dir);
+ TQValueVector<Port::PinData> v = _port->pinData(dir);
Q_ASSERT( pin!=0 );
uint p = (pin<0 ? -pin : pin)-1;
for (uint i=0; i<uint(v.count()); i++)
@@ -151,11 +151,11 @@ bool Direct::operator !=(const HData &d1, const HData &d2)
}
//-----------------------------------------------------------------------------
-Direct::SerialHardware::SerialHardware(::Programmer::Base &base, const QString &portDevice, const HardwareData &data)
+Direct::SerialHardware::SerialHardware(::Programmer::Base &base, const TQString &portDevice, const HardwareData &data)
: Hardware(base, new SerialPort(portDevice, base), data)
{}
-Direct::ParallelHardware::ParallelHardware(::Programmer::Base &base, const QString &portDevice, const HardwareData &data)
+Direct::ParallelHardware::ParallelHardware(::Programmer::Base &base, const TQString &portDevice, const HardwareData &data)
: Hardware(base, new Port::Parallel(portDevice, base), data)
{}
@@ -375,7 +375,7 @@ int Direct::Hardware::timing_test()
for (long j=0; j<loop; ++j)
{
int d = 0x2AAA ;
- d &= 0x3FFF ; // mask unused msb
+ d &= 0x3FFF ; // tqmask unused msb
d <<= 1; // insert start bit
for (uint x = 0; x<16; x++) {
diff --git a/src/progs/direct/base/direct.h b/src/progs/direct/base/direct.h
index 6a890b0..a3b9e09 100644
--- a/src/progs/direct/base/direct.h
+++ b/src/progs/direct/base/direct.h
@@ -48,7 +48,7 @@ public:
void setWrite() { setPin(DataRW, false); }
uint nbPins(Port::IODir dir) const;
- QString pinLabelForIndex(Port::IODir dir, uint i) const;
+ TQString pinLabelForIndex(Port::IODir dir, uint i) const;
Port::IODir ioTypeForPin(int pin) const;
uint pinForIndex(Port::IODir dir, uint i) const;
uint indexForPin(Port::IODir dir, int pin) const;
@@ -76,13 +76,13 @@ extern bool operator !=(const HData &d1, const HData &d2);
class SerialHardware : public Hardware
{
public:
- SerialHardware(::Programmer::Base &base, const QString &portDevice, const HardwareData &data);
+ SerialHardware(::Programmer::Base &base, const TQString &portDevice, const HardwareData &data);
};
class ParallelHardware : public Hardware
{
public:
- ParallelHardware(::Programmer::Base &base, const QString &portDevice, const HardwareData &data);
+ ParallelHardware(::Programmer::Base &base, const TQString &portDevice, const HardwareData &data);
};
} // namespace
diff --git a/src/progs/direct/base/direct_16.cpp b/src/progs/direct/base/direct_16.cpp
index 124b35e..a9e33e1 100644
--- a/src/progs/direct/base/direct_16.cpp
+++ b/src/progs/direct/base/direct_16.cpp
@@ -56,7 +56,7 @@ BitValue Direct::pic16::get_word()
hardware().setPin(Clock, High);
Port::usleep(1+_clockDelay);
if ( hardware().readBit() ) ind |= 0x8000;
- else ind = ind.maskWith(0x7FFF);
+ else ind = ind.tqmaskWith(0x7FFF);
ind >>= 1;
hardware().setPin(Clock, Low);
Port::usleep(1+_clockDelay);
@@ -87,10 +87,10 @@ bool Direct::pic16::doRead(Pic::MemoryRangeType type, Device::Array &data, const
const Device::Array wdata = static_cast<const Pic::Memory &>(vdata->memory).arrayForWriting(type);
if (only) nbWords = findNonMaskEnd(type, wdata)+1;
}
- BitValue mask = device().mask(type);
+ BitValue tqmask = device().tqmask(type);
for (uint i = 0; i<nbWords; i++) {
- if ( !only || data[i]!=mask || type!=Pic::MemoryRangeType::Code ) {
- data[i] = readWord(type).maskWith(mask);
+ if ( !only || data[i]!=tqmask || type!=Pic::MemoryRangeType::Code ) {
+ data[i] = readWord(type).tqmaskWith(tqmask);
if ( vdata && !hardware().verifyWord(i, data[i], type, *vdata) ) return false;
}
incrementPC(1);
@@ -105,7 +105,7 @@ bool Direct::pic16::doWrite(Pic::MemoryRangeType type, const Device::Array &data
gotoMemory(type);
for (uint i = 0; i<data.count(); ) {
if ( !writeWords(type, data, i, force) ) {
- log(Log::LineType::Error, i18n("Error programming %1 at %2.").arg(type.label()).arg(toHexLabel(i, 8)));
+ log(Log::LineType::Error, i18n("Error programming %1 at %2.").tqarg(type.label()).tqarg(toHexLabel(i, 8)));
return false;
}
}
@@ -117,7 +117,7 @@ bool Direct::pic16::skipMaskWords(Pic::MemoryRangeType type, const Device::Array
if (force) return false;
uint nb = (type==Pic::MemoryRangeType::Code ? nbWordsCodeProg() : 1);
for (uint k=0; k<nb; k++)
- if ( data[i+k]!=device().mask(type) ) return false;
+ if ( data[i+k]!=device().tqmask(type) ) return false;
incrementPC(nb);
i += nb;
return true;
@@ -134,7 +134,7 @@ bool Direct::pic16::writeWords(Pic::MemoryRangeType type, const Device::Array &d
}
}
startProg(type);
- QString cmd = QString("w%1").arg(waitProgTime(type));
+ TQString cmd = TQString("w%1").tqarg(waitProgTime(type));
pulseEngine(cmd.latin1());
endProg(type);
return true;
diff --git a/src/progs/direct/base/direct_16.h b/src/progs/direct/base/direct_16.h
index 683083e..beb6c43 100644
--- a/src/progs/direct/base/direct_16.h
+++ b/src/progs/direct/base/direct_16.h
@@ -20,7 +20,7 @@ class pic16 : public Pic8DeviceSpecific
public:
pic16(::Programmer::Base &base) : Pic8DeviceSpecific(base) {}
virtual BitValue get_word();
- virtual BitValue get_byte() { return get_word().maskWith(0xFF); }
+ virtual BitValue get_byte() { return get_word().tqmaskWith(0xFF); }
virtual void send_word(BitValue word);
virtual void send_bits(BitValue d, uint nbBits);
virtual void send_cmd(BitValue d) { send_bits(d, 6); }
diff --git a/src/progs/direct/base/direct_18F.cpp b/src/progs/direct/base/direct_18F.cpp
index 9860e63..75112c2 100644
--- a/src/progs/direct/base/direct_18F.cpp
+++ b/src/progs/direct/base/direct_18F.cpp
@@ -17,21 +17,21 @@ bool Direct::P18F::skipMaskWords(Pic::MemoryRangeType type, const Device::Array
{
if (forceProgram) return false;
for (uint k=0; k<nb; k++)
- if ( data[i+k]!=device().mask(type) ) return false;
+ if ( data[i+k]!=device().tqmask(type) ) return false;
i += nb;
return true;
}
void Direct::P18F::program(Type type)
{
- QString cmd;
+ TQString cmd;
switch (type) {
case Code:
- cmd = QString("d,C,c,C,c,C,c,Cw%1cw%2X0000,").arg(programHighTime(Code)).arg(programLowTime());
+ cmd = TQString("d,C,c,C,c,C,c,Cw%1cw%2X0000,").tqarg(programHighTime(Code)).tqarg(programLowTime());
break;
case Erase:
pulseEngine("k0,X0000,"); // NOP
- cmd = QString("k0;w%1;w%2;X0000").arg(programHighTime(type)).arg(programLowTime());
+ cmd = TQString("k0;w%1;w%2;X0000").tqarg(programHighTime(type)).tqarg(programLowTime());
break;
case Eeprom:
for (;;) {
@@ -41,7 +41,7 @@ void Direct::P18F::program(Type type)
BitValue b = get_byte();
if ( !b.bit(1) ) break; // WR bit clear
}
- cmd = QString("w%1").arg(programLowTime());
+ cmd = TQString("w%1").tqarg(programLowTime());
break;
}
pulseEngine(cmd);
@@ -82,7 +82,7 @@ bool Direct::P18F::doRead(Pic::MemoryRangeType type, Device::Array &data, const
nbWords = findNonMaskEnd(type, wdata)+1;
}
}
- BitValue mask = device().mask(type);
+ BitValue tqmask = device().tqmask(type);
//qDebug("read %s %i", Pic::MEMORY_RANGE_TYPE_DATA[type].label, device().nbWords(type));
//pulseEngine("w300000"); // what for ?
directAccess(type);
@@ -91,7 +91,7 @@ bool Direct::P18F::doRead(Pic::MemoryRangeType type, Device::Array &data, const
for (uint i = 0; i<data.count(); i++) {
setPointer(type, i);
pulseEngine("k0,X80A6,k0,X50A8,k0,X6EF5,k0,X0000");
- data[i] = pulseEngine("r").maskWith(mask);
+ data[i] = pulseEngine("r").tqmaskWith(tqmask);
if ( vdata && !hardware().verifyWord(offset+i, data[i], type, *vdata) ) return false;
}
_base.progressMonitor().addTaskProgress(data.count());
@@ -100,7 +100,7 @@ bool Direct::P18F::doRead(Pic::MemoryRangeType type, Device::Array &data, const
setPointer(type, offset);
//pulseEngine("w1000"); ??
for (uint i=0; i<nbWords; i++) {
- data[i] = pulseEngine("R").maskWith(mask);
+ data[i] = pulseEngine("R").tqmaskWith(tqmask);
if ( vdata && !hardware().verifyWord(offset+i, data[i], type, *vdata) ) return false;
}
_base.progressMonitor().addTaskProgress(data.count());
@@ -111,7 +111,7 @@ bool Direct::P18F::doRead(Pic::MemoryRangeType type, Device::Array &data, const
setPointer(type, 0);
for (uint i = 0; i<data.count(); i+=2) {
BitValue w = pulseEngine("R");
- data[i] = w.maskWith(mask);
+ data[i] = w.tqmaskWith(tqmask);
if ( vdata && !hardware().verifyWord(offset+i, data[i], type, *vdata) ) return false;
data[i+1] = w >> 8;
if ( vdata && !hardware().verifyWord(offset+i+1, data[i+1], type, *vdata) ) return false;
@@ -234,7 +234,7 @@ void Direct::P18F1220::program(Type type)
{
if ( type==Eeprom ) {
pulseEngine("k0,X0000,"); // NOP
- QString cmd = QString("k0;w%1;w%2;X0000").arg(programHighTime(type)).arg(programLowTime());
+ TQString cmd = TQString("k0;w%1;w%2;X0000").tqarg(programHighTime(type)).tqarg(programLowTime());
pulseEngine(cmd);
} else P18F::program(type);
}
@@ -249,7 +249,7 @@ void Direct::P18F242::configureSinglePanel()
//-----------------------------------------------------------------------------
bool Direct::P18F2539::doErase(bool)
{
- // apparently there is no chip erase...
+ // aptqparently there is no chip erase...
return ( doEraseRange(Pic::MemoryRangeType::Code) && doEraseRange(Pic::MemoryRangeType::Eeprom) );
}
diff --git a/src/progs/direct/base/direct_data.h b/src/progs/direct/base/direct_data.h
index 0b84084..f1291bb 100644
--- a/src/progs/direct/base/direct_data.h
+++ b/src/progs/direct/base/direct_data.h
@@ -14,7 +14,7 @@ namespace Direct
struct Data {
};
-extern const Data &data(const QString &device);
+extern const Data &data(const TQString &device);
} // namespace
diff --git a/src/progs/direct/base/direct_mem24.cpp b/src/progs/direct/base/direct_mem24.cpp
index a719add..98b5f9a 100644
--- a/src/progs/direct/base/direct_mem24.cpp
+++ b/src/progs/direct/base/direct_mem24.cpp
@@ -8,7 +8,7 @@
***************************************************************************/
#include "direct_mem24.h"
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include "common/global/global.h"
#include "common/common/misc.h"
@@ -68,18 +68,18 @@ uint Direct::Mem24DeviceSpecific::controlByte(uint address, Operation operation)
bool Direct::Mem24DeviceSpecific::setAddress(uint address)
{
- log(Log::DebugLevel::Extra, QString("set address %1").arg(toHexLabel(address, nbChars(NumberBase::Hex, address))));
+ log(Log::DebugLevel::Extra, TQString("set address %1").tqarg(toHexLabel(address, nbChars(NumberBase::Hex, address))));
if ( !start() ) return false;
uint bsize = device().nbBytes() / device().nbBlocks();
uint block = address / bsize;
- log(Log::DebugLevel::Extra, QString(" in block #%1/%2").arg(block).arg(device().nbBlocks()));
+ log(Log::DebugLevel::Extra, TQString(" in block #%1/%2").tqarg(block).tqarg(device().nbBlocks()));
uint cbyte = controlByte(address, Write);
- log(Log::DebugLevel::Max, QString(" control byte is %1").arg(toHexLabel(cbyte, 2)));
+ log(Log::DebugLevel::Max, TQString(" control byte is %1").tqarg(toHexLabel(cbyte, 2)));
if ( !writeByteAck(cbyte) ) return false;
uint nb = nbBytes(bsize-1);
for (int i=nb-1; i>=0; i--) {
uint add = (address >> 8*i) & 0xFF;
- log(Log::DebugLevel::Max, QString(" byte #%1: %2").arg(i).arg(toHexLabel(add, 2)));
+ log(Log::DebugLevel::Max, TQString(" byte #%1: %2").tqarg(i).tqarg(toHexLabel(add, 2)));
if ( !writeByteAck(add) ) return false;
}
return true;
@@ -103,11 +103,11 @@ bool Direct::Mem24DeviceSpecific::doRead(Device::Array &data, const ::Programmer
bool Direct::Mem24DeviceSpecific::doWrite(const Device::Array &data)
{
- QTime time;
+ TQTime time;
// page by page (page_size==1: byte by byte)
uint nbPages = device().nbBytes() / device().nbBytesPage();
for (uint i=0; i<nbPages; i++) {
- log(Log::DebugLevel::Extra, QString("write page #%1/%2").arg(i).arg(nbPages));
+ log(Log::DebugLevel::Extra, TQString("write page #%1/%2").tqarg(i).tqarg(nbPages));
uint address = i * device().nbBytesPage();
// write bytes
if ( !setAddress(address) ) return false;
@@ -122,7 +122,7 @@ bool Direct::Mem24DeviceSpecific::doWrite(const Device::Array &data)
if ( !writeByte(controlByte(address, Write), acked) ) return false;
if (acked) break;
if ( time.elapsed()>200 ) { // 200 ms timeout
- log(Log::LineType::Error, i18n("Timeout writing at address %1").arg(toHexLabel(address, nbChars(device().nbBytes()))));
+ log(Log::LineType::Error, i18n("Timeout writing at address %1").tqarg(toHexLabel(address, nbChars(device().nbBytes()))));
return false;
}
}
diff --git a/src/progs/direct/base/direct_pic.cpp b/src/progs/direct/base/direct_pic.cpp
index 30e4722..c6316e9 100644
--- a/src/progs/direct/base/direct_pic.cpp
+++ b/src/progs/direct/base/direct_pic.cpp
@@ -17,10 +17,10 @@ Direct::PulseEngine::PulseEngine(::Programmer::Base &base)
_clockDelay = 0;
}
-BitValue Direct::PulseEngine::pulseEngine(const QString &cmd, BitValue value)
+BitValue Direct::PulseEngine::pulseEngine(const TQString &cmd, BitValue value)
{
- _pbase.log(Log::DebugLevel::Extra, QString("pulse engine: %1").arg(cmd));
- QByteArray a = toAscii(cmd);
+ _pbase.log(Log::DebugLevel::Extra, TQString("pulse engine: %1").tqarg(cmd));
+ TQByteArray a = toAscii(cmd);
BitValue res = 0;
for (const char *ptr=a.data(); (ptr-a.data())<int(a.count()); ++ptr)
if ( !pulse(ptr, value, res) ) qFatal("pulse engine: invalid command '%c'", *ptr);
@@ -75,7 +75,7 @@ bool Direct::PulseEngine::pulse(const char * &cmd, BitValue, BitValue &)
uint n = 0;
for(; *(cmd+1) && isdigit((int)*(cmd+1)); ++cmd)
n = (n * 10) + *(cmd+1) - '0';
- _pbase.log(Log::DebugLevel::Max, "WAIT " + QString::number(n) + " micro-sec.");
+ _pbase.log(Log::DebugLevel::Max, "WAIT " + TQString::number(n) + " micro-sec.");
Port::usleep(n);
break;
}
@@ -177,7 +177,7 @@ bool Direct::Pic8DeviceSpecific::pulse(const char *&cmd, BitValue value, BitValu
uint n = 0;
for(; *(cmd+1) && isdigit((int)*(cmd+1)); ++cmd)
n = (n * 10) + *(cmd+1) - '0';
- log(Log::DebugLevel::Max, "SEND cmd " + QString::number(n));
+ log(Log::DebugLevel::Max, "SEND cmd " + TQString::number(n));
send_cmd(n);
break;
}
diff --git a/src/progs/direct/base/direct_pic.h b/src/progs/direct/base/direct_pic.h
index 39cd97c..2092f05 100644
--- a/src/progs/direct/base/direct_pic.h
+++ b/src/progs/direct/base/direct_pic.h
@@ -20,7 +20,7 @@ class PulseEngine
public:
PulseEngine(::Programmer::Base &base);
virtual ~PulseEngine() {}
- BitValue pulseEngine(const QString &command, BitValue value = 0);
+ BitValue pulseEngine(const TQString &command, BitValue value = 0);
protected:
::Programmer::Base &_pbase;
diff --git a/src/progs/direct/base/direct_prog.h b/src/progs/direct/base/direct_prog.h
index 34ca0b7..cdfb907 100644
--- a/src/progs/direct/base/direct_prog.h
+++ b/src/progs/direct/base/direct_prog.h
@@ -17,13 +17,14 @@
namespace Direct
{
- extern bool isSupported(const QString &device);
+ extern bool isSupported(const TQString &device);
class Hardware;
//----------------------------------------------------------------------------
class PicBase : public ::Programmer::PicBase
{
Q_OBJECT
+ TQ_OBJECT
public:
PicBase(const ::Programmer::Group &group, const Pic::Data *data)
: ::Programmer::PicBase(group, data, "pic_direct_programmer") {}
@@ -36,6 +37,7 @@ private:
class Mem24Base : public ::Programmer::Mem24Base
{
Q_OBJECT
+ TQ_OBJECT
public:
Mem24Base(const ::Programmer::Group &group, const Mem24::Data *data)
: ::Programmer::Mem24Base(group, data, "mem24_direct_programmer") {}
@@ -55,8 +57,8 @@ protected:
class DGroup : public Group
{
public:
- virtual QString name() const { return "direct"; }
- virtual QString label() const { return i18n("Direct Programmer"); }
+ virtual TQString name() const { return "direct"; }
+ virtual TQString label() const { return i18n("Direct Programmer"); }
virtual ::Hardware::Config *hardwareConfig() const;
virtual ::Programmer::Properties properties() const { return ::Programmer::Programmer | ::Programmer::CanReadMemory | ::Programmer::HasConnectedState; }
virtual ::Programmer::TargetPowerMode targetPowerMode() const { return ::Programmer::TargetExternallyPowered; }
diff --git a/src/progs/direct/base/direct_prog_config.cpp b/src/progs/direct/base/direct_prog_config.cpp
index ffce899..86794db 100644
--- a/src/progs/direct/base/direct_prog_config.cpp
+++ b/src/progs/direct/base/direct_prog_config.cpp
@@ -113,15 +113,15 @@ bool Direct::HardwareData::isEqual(const ::Hardware::Data &cdata) const
}
//-----------------------------------------------------------------------------
-QStringList Direct::Config::standardHardwareNames(PortType type) const
+TQStringList Direct::Config::standardHardwareNames(PortType type) const
{
- QStringList names;
+ TQStringList names;
for (uint i=0; STANDARD_HARDWARE_DATA[i].info.name; i++)
if ( STANDARD_HARDWARE_DATA[i].data.portType==type ) names += STANDARD_HARDWARE_DATA[i].info.name;
return names;
}
-const Hardware::DataInfo *Direct::Config::standardHardwareDataInfo(const QString &name) const
+const Hardware::DataInfo *Direct::Config::standardHardwareDataInfo(const TQString &name) const
{
for (uint i=0; STANDARD_HARDWARE_DATA[i].info.name; i++) {
const ConstStandardHardwareData &csdata = STANDARD_HARDWARE_DATA[i];
@@ -130,7 +130,7 @@ const Hardware::DataInfo *Direct::Config::standardHardwareDataInfo(const QString
return 0;
}
-Hardware::Data *Direct::Config::standardHardwareData(const QString &name) const
+Hardware::Data *Direct::Config::standardHardwareData(const TQString &name) const
{
for (uint i=0; STANDARD_HARDWARE_DATA[i].info.name; i++) {
const ConstStandardHardwareData &csdata = STANDARD_HARDWARE_DATA[i];
diff --git a/src/progs/direct/base/direct_prog_config.h b/src/progs/direct/base/direct_prog_config.h
index 151b141..7dd0b40 100644
--- a/src/progs/direct/base/direct_prog_config.h
+++ b/src/progs/direct/base/direct_prog_config.h
@@ -31,9 +31,9 @@ public:
Config() : ::Hardware::Config("direct_programmer") {}
protected:
- virtual QStringList standardHardwareNames(PortType type) const;
- virtual const ::Hardware::DataInfo *standardHardwareDataInfo(const QString &name) const;
- virtual ::Hardware::Data *standardHardwareData(const QString &name) const;
+ virtual TQStringList standardHardwareNames(PortType type) const;
+ virtual const ::Hardware::DataInfo *standardHardwareDataInfo(const TQString &name) const;
+ virtual ::Hardware::Data *standardHardwareData(const TQString &name) const;
virtual ::Hardware::Data *createHardwareData() const { return new HardwareData; }
};
diff --git a/src/progs/direct/gui/direct_config_widget.cpp b/src/progs/direct/gui/direct_config_widget.cpp
index 985cacd..fc7b867 100644
--- a/src/progs/direct/gui/direct_config_widget.cpp
+++ b/src/progs/direct/gui/direct_config_widget.cpp
@@ -9,87 +9,87 @@
***************************************************************************/
#include "direct_config_widget.h"
-#include <qtooltip.h>
-#include <qcheckbox.h>
-#include <qtimer.h>
-#include <qpushbutton.h>
+#include <tqtooltip.h>
+#include <tqcheckbox.h>
+#include <tqtimer.h>
+#include <tqpushbutton.h>
#include "progs/direct/base/direct_prog_config.h"
#include "progs/direct/base/direct_prog.h"
//-----------------------------------------------------------------------------
-::Programmer::ConfigWidget *Direct::GroupUI::createConfigWidget(QWidget *parent) const
+::Programmer::ConfigWidget *Direct::GroupUI::createConfigWidget(TQWidget *tqparent) const
{
- return new ConfigWidget(static_cast<const ::Programmer::Group &>(group()), parent);
+ return new ConfigWidget(static_cast<const ::Programmer::Group &>(group()), tqparent);
}
//-----------------------------------------------------------------------------
const char * const INV_PIN_LABEL = I18N_NOOP("Check this option if your hardware uses negative logic for this pin.");
const char * const DELAY_LABEL = I18N_NOOP("Some programming cards need low clock rate:\nadding delay to clock pulses might help.");
-Direct::HConfigWidget::HConfigWidget(::Programmer::Base &base, QWidget *parent, bool edit)
- : ::Hardware::HConfigWidget(base, parent, edit)
+Direct::HConfigWidget::HConfigWidget(::Programmer::Base &base, TQWidget *tqparent, bool edit)
+ : ::Hardware::HConfigWidget(base, tqparent, edit)
{
// pins assignment
- QGroupBox *groupb = new QGroupBox(1, Horizontal, i18n("Pin assignment"), this);
+ TQGroupBox *groupb = new TQGroupBox(1,Qt::Horizontal, i18n("Pin assignment"), this);
_mainVBox->addWidget(groupb);
- QWidget *w = new QWidget(groupb);
- QGridLayout *grid = new QGridLayout(w, 1, 1, 0, 10);
+ TQWidget *w = new TQWidget(groupb);
+ TQGridLayout *grid = new TQGridLayout(w, 1, 1, 0, 10);
if (edit) grid->setColStretch(5, 1);
for (uint i=0; i<Nb_PinTypes; i++) {
- QLabel *label = new QLabel(i18n(PIN_DATA[i].label), w);
- QToolTip::add(label, PIN_DATA[i].comment);
+ TQLabel *label = new TQLabel(i18n(PIN_DATA[i].label), w);
+ TQToolTip::add(label, PIN_DATA[i].comment);
grid->addWidget(label, i, 0);
- _combos[i] = new QComboBox(w);
+ _combos[i] = new TQComboBox(w);
_combos[i]->setEnabled(edit);
- connect(_combos[i], SIGNAL(activated(int)), SLOT(slotPinChanged()));
- QToolTip::add(_combos[i], PIN_DATA[i].comment);
+ connect(_combos[i], TQT_SIGNAL(activated(int)), TQT_SLOT(slotPinChanged()));
+ TQToolTip::add(_combos[i], PIN_DATA[i].comment);
grid->addWidget(_combos[i], i, 1);
- _invcbs[i] = new QCheckBox(i18n("Inverted"), w);
+ _invcbs[i] = new TQCheckBox(i18n("Inverted"), w);
_invcbs[i]->setEnabled(edit);
- QToolTip::add(_invcbs[i], i18n(INV_PIN_LABEL));
+ TQToolTip::add(_invcbs[i], i18n(INV_PIN_LABEL));
grid->addWidget(_invcbs[i], i, 2);
if (edit) {
- _testcbs[i] = new QCheckBox(i18n("on"), w);
- QToolTip::add(_testcbs[i], PIN_DATA[i].testComment);
- connect(_testcbs[i], SIGNAL(clicked()), SLOT(slotTestPin()));
+ _testcbs[i] = new TQCheckBox(i18n("on"), w);
+ TQToolTip::add(_testcbs[i], PIN_DATA[i].testComment);
+ connect(_testcbs[i], TQT_SIGNAL(clicked()), TQT_SLOT(slotTestPin()));
grid->addWidget(_testcbs[i], i, 3);
- _testLabels[i] = new QLabel(w);
- QToolTip::add(_testcbs[i], PIN_DATA[i].testComment);
+ _testLabels[i] = new TQLabel(w);
+ TQToolTip::add(_testcbs[i], PIN_DATA[i].testComment);
grid->addWidget(_testLabels[i], i, 4);
- updateTestStatus(PinType(i), false);
+ updateTesttqStatus(PinType(i), false);
} else {
_testcbs[i] = 0;
_testLabels[i] = 0;
}
}
- QHBoxLayout *hbox = new QHBoxLayout(_mainVBox);
- QLabel *label = new QLabel(i18n("Clock delay"), this);
- QToolTip::add(label, i18n(DELAY_LABEL));
+ TQHBoxLayout *hbox = new TQHBoxLayout(_mainVBox);
+ TQLabel *label = new TQLabel(i18n("Clock delay"), this);
+ TQToolTip::add(label, i18n(DELAY_LABEL));
hbox->addWidget(label);
- _delay = new KIntNumInput(0, Horizontal, this);
+ _delay = new KIntNumInput(0,Qt::Horizontal, this);
_delay->setRange(0, 50, 5);
_delay->setEnabled(edit);
- QToolTip::add(_delay, i18n(DELAY_LABEL));
+ TQToolTip::add(_delay, i18n(DELAY_LABEL));
hbox->addWidget(_delay);
if (edit) {
- _sendBitsButton = new QPushButton(i18n("Send 0xA55A"), this);
+ _sendBitsButton = new TQPushButton(i18n("Send 0xA55A"), this);
_sendBitsButton->setToggleButton(true);
- connect(_sendBitsButton, SIGNAL(clicked()), SLOT(sendBits()));
- QToolTip::add(_sendBitsButton, i18n("Continuously send 0xA55A on \"Data out\" pin."));
+ connect(_sendBitsButton, TQT_SIGNAL(clicked()), TQT_SLOT(sendBits()));
+ TQToolTip::add(_sendBitsButton, i18n("Continuously send 0xA55A on \"Data out\" pin."));
_editVBox->addWidget(_sendBitsButton);
_editVBox->addStretch(1);
} else _sendBitsButton = 0;
// timer for sending bits
- _timerSendBits = new QTimer(this);
- connect(_timerSendBits, SIGNAL(timeout()), SLOT(slotSendBits()));
+ _timerSendBits = new TQTimer(this);
+ connect(_timerSendBits, TQT_SIGNAL(timeout()), TQT_SLOT(slotSendBits()));
// timer for automatically polling DataOut pin
- _timerPollDataOut = new QTimer(this);
- connect(_timerPollDataOut, SIGNAL(timeout()), SLOT(updateDataIn()));
+ _timerPollDataOut = new TQTimer(this);
+ connect(_timerPollDataOut, TQT_SIGNAL(timeout()), TQT_SLOT(updateDataIn()));
}
void Direct::HConfigWidget::sendBits()
@@ -150,11 +150,11 @@ void Direct::HConfigWidget::updateTestPin(PinType ptype)
Q_ASSERT( _connected && ptype!=DataIn );
bool on = _testcbs[ptype]->isChecked();
hardware()->setPin(ptype, on);
- updateTestStatus(ptype, on);
+ updateTesttqStatus(ptype, on);
if ( ptype==Vpp ) updateDataIn();
}
-void Direct::HConfigWidget::updateTestStatus(PinType ptype, bool on)
+void Direct::HConfigWidget::updateTesttqStatus(PinType ptype, bool on)
{
if (on) _testLabels[ptype]->setText(i18n(PIN_DATA[ptype].onLabel));
else _testLabels[ptype]->setText(i18n(PIN_DATA[ptype].offLabel));
@@ -163,7 +163,7 @@ void Direct::HConfigWidget::updateTestStatus(PinType ptype, bool on)
void Direct::HConfigWidget::updateDataIn()
{
bool on = hardware()->readBit();
- updateTestStatus(DataIn, on);
+ updateTesttqStatus(DataIn, on);
_testcbs[DataIn]->setChecked(on);
}
@@ -204,7 +204,7 @@ bool Direct::HConfigWidget::set(const Port::Description &pd, const ::Hardware::D
if (_edit) {
for (uint i=0; i<Nb_PinTypes; i++) {
_testcbs[i]->setEnabled(_connected);
- updateTestStatus(PinType(i), false);
+ updateTesttqStatus(PinType(i), false);
}
if ( _connected ) _timerPollDataOut->start(100);
_sendBitsButton->setEnabled(_connected);
@@ -239,11 +239,11 @@ Hardware::Data *Direct::HConfigWidget::data() const
}
//-----------------------------------------------------------------------------
-Direct::ConfigWidget::ConfigWidget(const ::Programmer::Group &group, QWidget *parent)
- : ::Hardware::ConfigWidget(new ::Direct::PicBase(group, 0), new Config, parent)
+Direct::ConfigWidget::ConfigWidget(const ::Programmer::Group &group, TQWidget *tqparent)
+ : ::Hardware::ConfigWidget(new ::Direct::PicBase(group, 0), new Config, tqparent)
{}
-Hardware::HConfigWidget *Direct::ConfigWidget::createHardwareConfigWidget(QWidget *parent, bool edit) const
+Hardware::HConfigWidget *Direct::ConfigWidget::createHardwareConfigWidget(TQWidget *tqparent, bool edit) const
{
- return new HConfigWidget(*_base, parent, edit);
+ return new HConfigWidget(*_base, tqparent, edit);
}
diff --git a/src/progs/direct/gui/direct_config_widget.h b/src/progs/direct/gui/direct_config_widget.h
index 4a5e4c6..093e9fa 100644
--- a/src/progs/direct/gui/direct_config_widget.h
+++ b/src/progs/direct/gui/direct_config_widget.h
@@ -22,17 +22,18 @@ namespace Direct
class GroupUI : public ::Programmer::GroupUI
{
public:
- virtual ::Programmer::ConfigWidget *createConfigWidget(QWidget *parent) const;
+ virtual ::Programmer::ConfigWidget *createConfigWidget(TQWidget *tqparent) const;
virtual bool hasAdvancedDialog() const { return false; }
- virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &, QWidget *) const { return 0; }
+ virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &, TQWidget *) const { return 0; }
};
//-----------------------------------------------------------------------------
class HConfigWidget : public ::Hardware::HConfigWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- HConfigWidget(::Programmer::Base &base, QWidget *parent, bool edit);
+ HConfigWidget(::Programmer::Base &base, TQWidget *tqparent, bool edit);
virtual bool set(const Port::Description &pd, const ::Hardware::Data &data);
virtual ::Hardware::Data *data() const;
@@ -44,17 +45,17 @@ private slots:
void slotSendBits();
private:
- QComboBox *_combos[Nb_PinTypes];
- QCheckBox *_invcbs[Nb_PinTypes];
- QCheckBox *_testcbs[Nb_PinTypes];
- QLabel *_testLabels[Nb_PinTypes];
+ TQComboBox *_combos[Nb_PinTypes];
+ TQCheckBox *_invcbs[Nb_PinTypes];
+ TQCheckBox *_testcbs[Nb_PinTypes];
+ TQLabel *_testLabels[Nb_PinTypes];
KIntNumInput *_delay;
- QPushButton *_sendBitsButton;
- QTimer *_timerSendBits, *_timerPollDataOut;
+ TQPushButton *_sendBitsButton;
+ TQTimer *_timerSendBits, *_timerPollDataOut;
void sendBits(uint d, int nbb);
void updateTestPin(PinType ptype);
- void updateTestStatus(PinType ptype, bool on);
+ void updateTesttqStatus(PinType ptype, bool on);
uint pin(PinType ptype) const;
void updatePin(PinType ptype);
Hardware *hardware() { return static_cast<Hardware *>(_hardware); }
@@ -64,9 +65,10 @@ private:
class ConfigWidget : public ::Hardware::ConfigWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- ConfigWidget(const ::Programmer::Group &group, QWidget *parent);
- virtual ::Hardware::HConfigWidget *createHardwareConfigWidget(QWidget *parent, bool edit) const;
+ ConfigWidget(const ::Programmer::Group &group, TQWidget *tqparent);
+ virtual ::Hardware::HConfigWidget *createHardwareConfigWidget(TQWidget *tqparent, bool edit) const;
};
} // namespace
diff --git a/src/progs/direct/xml/xml_direct_parser.cpp b/src/progs/direct/xml/xml_direct_parser.cpp
index ee51674..bc77853 100644
--- a/src/progs/direct/xml/xml_direct_parser.cpp
+++ b/src/progs/direct/xml/xml_direct_parser.cpp
@@ -18,19 +18,19 @@ public:
XmlToData() : ::Programmer::XmlToData<Data>("direct", "Direct") {}
private:
- virtual void parseData(QDomElement element, Data &data);
- virtual void includes(QTextStream &s) const;
- virtual void outputFunctions(QTextStream &s) const;
+ virtual void parseData(TQDomElement element, Data &data);
+ virtual void includes(TQTextStream &s) const;
+ virtual void outputFunctions(TQTextStream &s) const;
};
-void Direct::XmlToData::parseData(QDomElement element, Data &)
+void Direct::XmlToData::parseData(TQDomElement element, Data &)
{
- QString s = element.attribute("pwidth");
+ TQString s = element.attribute("pwidth");
const Device::Data *d = Device::lister().data(currentDevice());
if ( d==0 ) qFatal("Invalid device name");
}
-void Direct::XmlToData::includes(QTextStream &s) const
+void Direct::XmlToData::includes(TQTextStream &s) const
{
Programmer::XmlToData<Data>::includes(s);
s << "#include \"direct_baseline.h\"" << endl;
@@ -38,7 +38,7 @@ void Direct::XmlToData::includes(QTextStream &s) const
s << "#include \"direct_18F.h\"" << endl;
}
-void Direct::XmlToData::outputFunctions(QTextStream &s) const
+void Direct::XmlToData::outputFunctions(TQTextStream &s) const
{
Programmer::XmlToData<Data>::outputFunctions(s);
s << "::Programmer::DeviceSpecific *Direct::Group::createDeviceSpecific(::Programmer::Base &base) const" << endl;
@@ -46,7 +46,7 @@ void Direct::XmlToData::outputFunctions(QTextStream &s) const
s << " uint i = family(static_cast<PicBase &>(base).device()->name());" << endl;
s << " switch(i) {" << endl;
for (uint i=0; i<uint(families().count()); i++) {
- s << " case " + QString::number(i) + ": return new P" + families()[i] + "(base);" << endl;
+ s << " case " + TQString::number(i) + ": return new P" + families()[i] + "(base);" << endl;
}
s << " }" << endl;
s << " Q_ASSERT(false);" << endl;
diff --git a/src/progs/gpsim/base/gpsim.cpp b/src/progs/gpsim/base/gpsim.cpp
index e6c17bd..4352162 100644
--- a/src/progs/gpsim/base/gpsim.cpp
+++ b/src/progs/gpsim/base/gpsim.cpp
@@ -8,7 +8,7 @@
***************************************************************************/
#include "gpsim.h"
-#include <qregexp.h>
+#include <tqregexp.h>
#include "progs/base/generic_prog.h"
#include "progs/base/generic_debug.h"
@@ -16,7 +16,7 @@
GPSim::Process::Process(Log::Base *base)
: ::Process::LineOutput(0, "gpsim_process"), Log::Base(base), _ready(false)
{
- connect(this, SIGNAL(stdoutDataReceived()), SLOT(stdoutDataReceivedSlot()));
+ connect(this, TQT_SIGNAL(stdoutDataReceived()), TQT_SLOT(stdoutDataReceivedSlot()));
}
void GPSim::Process::stdoutDataReceivedSlot()
@@ -28,15 +28,15 @@ void GPSim::Process::stdoutDataReceivedSlot()
}
}
-void GPSim::Process::addStdoutLine(const QString &line)
+void GPSim::Process::addStdoutLine(const TQString &line)
{
log(Log::DebugLevel::Extra, " " + line, Log::Delayed);
if ( line.startsWith("***ERROR:") ) {
log(Log::LineType::Error, line);
return;
}
- QString s = line;
- QString prompt = "**gpsim> ";
+ TQString s = line;
+ TQString prompt = "**gpsim> ";
while ( s.startsWith(prompt) ) {
_ready = true;
s = s.mid(prompt.length());
@@ -53,7 +53,7 @@ GPSim::ProcessManager::ProcessManager(Log::Base *base)
bool GPSim::ProcessManager::start()
{
_process._ready = false;
- _process.setup("gpsim", QStringList("-i"), false);
+ _process.setup("gpsim", TQStringList("-i"), false);
if ( !_process.start(0) ) {
log(Log::LineType::Error, i18n("Failed to start \"gpsim\"."));
return false;
@@ -75,11 +75,11 @@ bool GPSim::ProcessManager::runSynchronously()
return true;
}
-bool GPSim::ProcessManager::sendCommand(const QString &cmd, bool synchronous)
+bool GPSim::ProcessManager::sendCommand(const TQString &cmd, bool synchronous)
{
_process._ready = false;
_process._stdoutLines.clear();
- _process._stdout = QString::null;
+ _process._stdout = TQString();
_process.writeToStdin(cmd + '\n');
if (synchronous) return runSynchronously();
return true;
@@ -89,7 +89,7 @@ bool GPSim::ProcessManager::sendSignal(uint n, bool synchronous)
{
_process._ready = false;
_process._stdoutLines.clear();
- _process._stdout = QString::null;
+ _process._stdout = TQString();
if ( !_process.signal(n) ) {
log(Log::LineType::Error, i18n("Error send a signal to the subprocess."));
return false;
@@ -101,7 +101,7 @@ bool GPSim::ProcessManager::sendSignal(uint n, bool synchronous)
bool GPSim::ProcessManager::getVersion(VersionData &version)
{
if ( !sendCommand("version", true) ) return false;
- QRegExp reg("\\w*\\s*(\\d+\\.\\d+\\.\\d+).*");
+ TQRegExp reg("\\w*\\s*(\\d+\\.\\d+\\.\\d+).*");
if ( _process.sout().count()==0 || !reg.exactMatch(_process.sout()[0]) ) {
version = VersionData();
return true;
@@ -136,18 +136,18 @@ void GPSim::Hardware::internalDisconnectHardware()
_manager = 0;
}
-bool GPSim::Hardware::execute(const QString &command, bool synchronous, QStringList *output)
+bool GPSim::Hardware::execute(const TQString &command, bool synchronous, TQStringList *output)
{
- log(Log::DebugLevel::Normal, QString("command: %1").arg(command));
+ log(Log::DebugLevel::Normal, TQString("command: %1").tqarg(command));
if (output) output->clear();
if ( !_manager->sendCommand(command, synchronous) ) return false;
if (output) *output = _manager->process().sout();
return true;
}
-bool GPSim::Hardware::signal(uint n, bool synchronous, QStringList *output)
+bool GPSim::Hardware::signal(uint n, bool synchronous, TQStringList *output)
{
- log(Log::DebugLevel::Normal, QString("signal: %1").arg(n));
+ log(Log::DebugLevel::Normal, TQString("signal: %1").tqarg(n));
if (output) output->clear();
if ( !_manager->sendSignal(n, synchronous) ) return false;
if (output) *output = _manager->process().sout();
diff --git a/src/progs/gpsim/base/gpsim.h b/src/progs/gpsim/base/gpsim.h
index ab004a3..fcdabab 100644
--- a/src/progs/gpsim/base/gpsim.h
+++ b/src/progs/gpsim/base/gpsim.h
@@ -20,6 +20,7 @@ namespace GPSim
class Process : public ::Process::LineOutput, public Log::Base
{
Q_OBJECT
+ TQ_OBJECT
public:
Process(Log::Base *base);
@@ -29,7 +30,7 @@ private slots:
private:
bool _ready;
- virtual void addStdoutLine(const QString &line);
+ virtual void addStdoutLine(const TQString &line);
friend class ProcessManager;
};
@@ -43,7 +44,7 @@ public:
bool isReady() const { return _process._ready; }
bool start();
bool runSynchronously();
- bool sendCommand(const QString &cmd, bool synchronous);
+ bool sendCommand(const TQString &cmd, bool synchronous);
bool sendSignal(uint n, bool synchronous);
bool getVersion(VersionData &version);
@@ -55,11 +56,11 @@ private:
class Hardware : public Programmer::Hardware
{
public:
- Hardware(::Programmer::Base &base) : Programmer::Hardware(base, 0, QString::null), _manager(0) {}
+ Hardware(::Programmer::Base &base) : Programmer::Hardware(base, 0, TQString()), _manager(0) {}
virtual ~Hardware();
bool isReady() const { return _manager->isReady(); }
- bool execute(const QString &command, bool synchronous, QStringList *output = 0);
- bool signal(uint n, bool synchronous, QStringList *output = 0);
+ bool execute(const TQString &command, bool synchronous, TQStringList *output = 0);
+ bool signal(uint n, bool synchronous, TQStringList *output = 0);
const VersionData &version() const { return _version; }
private:
diff --git a/src/progs/gpsim/base/gpsim_debug.cpp b/src/progs/gpsim/base/gpsim_debug.cpp
index b2bcec5..eca9841 100644
--- a/src/progs/gpsim/base/gpsim_debug.cpp
+++ b/src/progs/gpsim/base/gpsim_debug.cpp
@@ -9,7 +9,7 @@
#include "gpsim_debug.h"
#include <signal.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include "devices/list/device_list.h"
#include "devices/pic/base/pic_register.h"
@@ -52,10 +52,10 @@ bool GPSim::Debugger::internalStep()
return hardware()->execute("step", true);
}
-bool GPSim::Debugger::setBreakpoints(const QValueList<Address> &list)
+bool GPSim::Debugger::setBreakpoints(const TQValueList<Address> &list)
{
for (uint i=0; i<_nbBreakpoints; i++)
- if ( !hardware()->execute("clear " + QString::number(i), true) ) return false;
+ if ( !hardware()->execute("clear " + TQString::number(i), true) ) return false;
for (uint i=0; i<uint(list.count()); i++)
if ( !hardware()->execute("break e 0x" + toHex(list[i], nbChars(list[i].toUInt())), true) ) return false;
_nbBreakpoints = list.count();
@@ -75,15 +75,15 @@ bool GPSim::Debugger::updateState()
return true;
}
-bool GPSim::Debugger::findRegExp(const QStringList &lines, const QString &pattern,
- const QString &label, QString &value) const
+bool GPSim::Debugger::findRegExp(const TQStringList &lines, const TQString &pattern,
+ const TQString &label, TQString &value) const
{
- QRegExp rexp(pattern);
+ TQRegExp rexp(pattern);
uint i = 0;
for (; i<uint(lines.count()); i++) {
int offset = 0;
for (;;) {
- offset = rexp.search(lines[i], offset, QRegExp::CaretAtOffset);
+ offset = rexp.search(lines[i], offset, TQRegExp::CaretAtOffset);
if ( offset==-1 || rexp.cap(1)==label ) break;
offset += rexp.cap(0).length();
}
@@ -99,22 +99,22 @@ bool GPSim::Debugger::readWreg(BitValue &value)
// #### only known for version 4 and 11
if ( hardware()->version()<=VersionData(0, 21, 7) || hardware()->version()>=VersionData(0, 22, 0) )
return getRegister("W", value);
- QStringList lines;
+ TQStringList lines;
if ( !hardware()->execute("dump s", true, &lines) ) return false;
- QString w = (_coff->symbol("_WREG") ? "_WREG" : "W");
- QString s;
+ TQString w = (_coff->symbol("_WREG") ? "_WREG" : "W");
+ TQString s;
if ( !findRegExp(lines, "^\\s*[0-9A-Fa-f]+\\s+(\\w+)\\s*=\\s*([0-9A-Fa-f]+)", w, s) ) {
- log(Log::LineType::Error, i18n("Error reading register \"%1\"").arg(w));
+ log(Log::LineType::Error, i18n("Error reading register \"%1\"").tqarg(w));
return false;
}
value = fromHex(s, 0);
return true;
}
-bool GPSim::Debugger::getRegister(const QString &name, BitValue &value)
+bool GPSim::Debugger::getRegister(const TQString &name, BitValue &value)
{
- QStringList lines;
- QRegExp r;
+ TQStringList lines;
+ TQRegExp r;
if ( hardware()->version()<VersionData(0, 22, 0) ) {
if ( !hardware()->execute("x " + name, true, &lines) ) return false;
r.setPattern("\\w+\\s*[][\\w]+\\s*=\\s*(?:0x|)([0-9A-Fa-f]+)(?:\\W.*|)");
@@ -126,7 +126,7 @@ bool GPSim::Debugger::getRegister(const QString &name, BitValue &value)
for (; i<uint(lines.count()); i++)
if ( r.exactMatch(lines[i]) ) break;
if ( i==uint(lines.count()) ) {
- log(Log::LineType::Error, i18n("Error reading register \"%1\"").arg(name));
+ log(Log::LineType::Error, i18n("Error reading register \"%1\"").tqarg(name));
return false;
}
value = fromHex(r.cap(1), 0);
@@ -136,9 +136,9 @@ bool GPSim::Debugger::getRegister(const QString &name, BitValue &value)
bool GPSim::Debugger::getRegister(Address address, BitValue &value)
{
const Pic::RegistersData &rdata = device()->registersData();
- QString name = toHex(address, rdata.nbCharsAddress());
+ TQString name = toHex(address, rdata.nbCharsAddress());
if ( hardware()->version()<VersionData(0, 22, 0) ) return getRegister("0x" + name, value);
- return getRegister(QString("ramData[$%1]").arg(name), value);
+ return getRegister(TQString("ramData[$%1]").tqarg(name), value);
}
bool GPSim::Debugger::readRegister(const Register::TypeData &data, BitValue &value)
@@ -149,27 +149,27 @@ bool GPSim::Debugger::readRegister(const Register::TypeData &data, BitValue &val
Q_ASSERT(false);
return true;
}
- QString name = device()->registersData().sfrNames[data.address()];
+ TQString name = device()->registersData().sfrNames[data.address()];
if ( name=="WREG" ) return readWreg(value);
if ( !name.isEmpty() ) return getRegister(name.lower(), value);
return getRegister(data.address(), value);
}
-bool GPSim::Debugger::setRegister(const QString &name, BitValue value)
+bool GPSim::Debugger::setRegister(const TQString &name, BitValue value)
{
if ( hardware()->version()<VersionData(0, 22, 0) ) {
log(Log::LineType::Warning, i18n("Writing registers is not supported by this version of gpsim"));
return true;
}
const Pic::RegistersData &rdata = device()->registersData();
- QString s = QString("%1 = %2").arg(name).arg(toHexLabel(value, rdata.nbChars()));
+ TQString s = TQString("%1 = %2").tqarg(name).tqarg(toHexLabel(value, rdata.nbChars()));
return hardware()->execute(s, true);
}
bool GPSim::Debugger::setRegister(Address address, BitValue value)
{
const Pic::RegistersData &rdata = device()->registersData();
- QString s = QString("ramData[$%1]").arg(toHex(address, rdata.nbCharsAddress()));
+ TQString s = TQString("ramData[$%1]").tqarg(toHex(address, rdata.nbCharsAddress()));
return setRegister(s, value);
}
@@ -185,7 +185,7 @@ bool GPSim::Debugger::writeRegister(const Register::TypeData &data, BitValue val
return false;
}
const Pic::RegistersData &rdata = device()->registersData();
- QString name = rdata.sfrNames[data.address()];
+ TQString name = rdata.sfrNames[data.address()];
if ( !name.isEmpty() ) return setRegister(name.lower(), value);
return setRegister(data.address(), value);
}
@@ -195,16 +195,16 @@ bool GPSim::Debugger::writeWreg(BitValue value)
return setRegister("W", value);
}
-bool GPSim::Debugger::updatePortStatus(uint index, QMap<uint, Device::PortBitData> &bits)
+bool GPSim::Debugger::updatePorttqStatus(uint index, TQMap<uint, Device::PortBitData> &bits)
{
for (uint i=0; i<Device::MAX_NB_PORT_BITS; i++) {
if ( !device()->registersData().hasPortBit(index, i) ) continue;
- QString name = device()->registersData().portName(index).lower() + QString::number(i);
- QStringList lines;
+ TQString name = device()->registersData().portName(index).lower() + TQString::number(i);
+ TQStringList lines;
if ( !hardware()->execute("symbol " + name, true, &lines) ) return false;
- QString pattern = "^(\\w+)=([^\\s])+\\s*", value;
+ TQString pattern = "^(\\w+)=([^\\s])+\\s*", value;
if ( !findRegExp(lines, pattern, "bitState", value) || value.length()!=1 ) {
- log(Log::LineType::Error, i18n("Error reading state of IO bit: %1").arg(name));
+ log(Log::LineType::Error, i18n("Error reading state of IO bit: %1").tqarg(name));
return false;
}
switch (value[0].latin1()) {
@@ -218,24 +218,24 @@ bool GPSim::Debugger::updatePortStatus(uint index, QMap<uint, Device::PortBitDat
case 'X': bits[i].state = Device::Unknown; break;
default:
bits[i].state = Device::Unknown;
- log(Log::LineType::Warning, i18n("Unknown state for IO bit: %1 (%2)").arg(name).arg(value));
+ log(Log::LineType::Warning, i18n("Unknown state for IO bit: %1 (%2)").tqarg(name).tqarg(value));
break;
}
if ( !findRegExp(lines, pattern, "Driving", value) || value.length()!=1 ) {
- log(Log::LineType::Error, i18n("Error reading driving state of IO bit: %1").arg(name));
+ log(Log::LineType::Error, i18n("Error reading driving state of IO bit: %1").tqarg(name));
return false;
}
bits[i].driving = ( value[0]=='1' );
if (bits[i].driving) {
if ( !findRegExp(lines, pattern, "drivingState", value) || value.length()!=1 ) {
- log(Log::LineType::Error, i18n("Error reading driving state of IO bit: %1").arg(name));
+ log(Log::LineType::Error, i18n("Error reading driving state of IO bit: %1").tqarg(name));
return false;
}
bits[i].drivingState = (value[0]=='0' ? Device::IoLow : Device::IoHigh);
bits[i].drivenState = Device::IoUnknown;
} else {
if ( !findRegExp(lines, pattern, "drivenState", value) || value.length()!=1 ) {
- log(Log::LineType::Error, i18n("Error reading driven state of IO bit: %1").arg(name));
+ log(Log::LineType::Error, i18n("Error reading driven state of IO bit: %1").tqarg(name));
return false;
}
bits[i].drivenState = (value[0]=='0' ? Device::IoLow : Device::IoHigh);
@@ -246,7 +246,7 @@ bool GPSim::Debugger::updatePortStatus(uint index, QMap<uint, Device::PortBitDat
}
//----------------------------------------------------------------------------
-QString GPSim::Group::statusLabel() const
+TQString GPSim::Group::statusLabel() const
{
return i18n("GPSim (4MHz)"); // #### FIXME: add config
}
@@ -259,9 +259,9 @@ void GPSim::Group::initSupported()
if ( !manager.getVersion(version) ) return;
bool oldGpsim = ( version<VersionData(0, 21, 11) );
if ( !manager.sendCommand("processor list", true) ) return;
- QStringList devices = QStringList::split(" ", manager.process().sout().join(" "));
+ TQStringList devices = TQStringList::split(" ", manager.process().sout().join(" "));
for (uint i=0; i<uint(devices.count()); i++) {
- QString s = devices[i].upper();
+ TQString s = devices[i].upper();
if ( s.startsWith("PIC") ) s = s.mid(3);
const Pic::Data *data = static_cast<const Pic::Data *>(Device::lister().data(s));
if (data) {
diff --git a/src/progs/gpsim/base/gpsim_debug.h b/src/progs/gpsim/base/gpsim_debug.h
index ad838b2..7c258d9 100644
--- a/src/progs/gpsim/base/gpsim_debug.h
+++ b/src/progs/gpsim/base/gpsim_debug.h
@@ -19,6 +19,7 @@ namespace GPSim
class Programmer : public ::Programmer::PicBase
{
Q_OBJECT
+ TQ_OBJECT
public:
Programmer(const ::Programmer::Group &group, const Pic::Data *data)
: Programmer::PicBase(group, data, "gpsim_programmer") {}
@@ -41,18 +42,18 @@ class Debugger : public ::Debugger::PicBase
{
public:
Debugger(Programmer &programmer);
- virtual bool setBreakpoints(const QValueList<Address> &list);
+ virtual bool setBreakpoints(const TQValueList<Address> &list);
virtual bool readRegister(const Register::TypeData &data, BitValue &value);
virtual bool writeRegister(const Register::TypeData &data, BitValue value);
- virtual bool updatePortStatus(uint index, QMap<uint, Device::PortBitData> &bits);
+ virtual bool updatePorttqStatus(uint index, TQMap<uint, Device::PortBitData> &bits);
private:
uint _nbBreakpoints;
- bool findRegExp(const QStringList &lines, const QString &pattern,
- const QString &label, QString &value) const;
- bool getRegister(const QString &name, BitValue &value);
- bool setRegister(const QString &name, BitValue value);
+ bool findRegExp(const TQStringList &lines, const TQString &pattern,
+ const TQString &label, TQString &value) const;
+ bool getRegister(const TQString &name, BitValue &value);
+ bool setRegister(const TQString &name, BitValue value);
bool getRegister(Address address, BitValue &value);
bool setRegister(Address address, BitValue value);
Hardware *hardware() { return static_cast<Hardware *>(_programmer.hardware()); }
@@ -72,9 +73,9 @@ private:
class Group : public ::Programmer::PicGroup
{
public:
- virtual QString name() const { return "gpsim"; }
- virtual QString label() const { return i18n("GPSim"); }
- virtual QString statusLabel() const;
+ virtual TQString name() const { return "gpsim"; }
+ virtual TQString label() const { return i18n("GPSim"); }
+ virtual TQString statusLabel() const;
virtual ::Programmer::Properties properties() const { return ::Programmer::Debugger | ::Programmer::HasConnectedState; }
virtual ::Programmer::TargetPowerMode targetPowerMode() const { return ::Programmer::TargetSelfPowered; }
virtual bool isPortSupported(PortType) const { return false; }
diff --git a/src/progs/gpsim/gui/gpsim_group_ui.cpp b/src/progs/gpsim/gui/gpsim_group_ui.cpp
index 3949b8e..f3375cc 100644
--- a/src/progs/gpsim/gui/gpsim_group_ui.cpp
+++ b/src/progs/gpsim/gui/gpsim_group_ui.cpp
@@ -8,35 +8,35 @@
***************************************************************************/
#include "gpsim_group_ui.h"
-#include <qtimer.h>
+#include <tqtimer.h>
#include "progs/base/prog_group.h"
#include "progs/gpsim/base/gpsim.h"
//----------------------------------------------------------------------------
-GPSim::ConfigWidget::ConfigWidget(const ::Programmer::Group &group, QWidget *parent)
- : ::Programmer::ConfigWidget(group, parent)
+GPSim::ConfigWidget::ConfigWidget(const ::Programmer::Group &group, TQWidget *tqparent)
+ : ::Programmer::ConfigWidget(group, tqparent)
{
uint row = numRows();
- QLabel *label = new QLabel(i18n("Status:"), this);
+ TQLabel *label = new TQLabel(i18n("tqStatus:"), this);
addWidget(label, row,row, 0,0);
- _status = new QLabel(this);
+ _status = new TQLabel(this);
addWidget(_status, row,row, 1,1);
- QTimer::singleShot(0, this, SLOT(updateStatus()));
+ TQTimer::singleShot(0, this, TQT_SLOT(updatetqStatus()));
}
-void GPSim::ConfigWidget::updateStatus()
+void GPSim::ConfigWidget::updatetqStatus()
{
VersionData version;
ProcessManager manager(0);
if ( !manager.start() ) _status->setText(i18n("Could not start \"gpsim\""));
else if ( !manager.getVersion(version) || !version.isValid() ) _status->setText(i18n("Could not detect \"gpsim\" version"));
- else _status->setText(i18n("Found version \"%1\"").arg(version.pretty()));
+ else _status->setText(i18n("Found version \"%1\"").tqarg(version.pretty()));
}
//----------------------------------------------------------------------------
-::Programmer::ConfigWidget *GPSim::GroupUI::createConfigWidget(QWidget *parent) const
+::Programmer::ConfigWidget *GPSim::GroupUI::createConfigWidget(TQWidget *tqparent) const
{
- return new ConfigWidget(static_cast<const ::Programmer::Group &>(group()), parent);
+ return new ConfigWidget(static_cast<const ::Programmer::Group &>(group()), tqparent);
}
diff --git a/src/progs/gpsim/gui/gpsim_group_ui.h b/src/progs/gpsim/gui/gpsim_group_ui.h
index 485aa69..7916a1d 100644
--- a/src/progs/gpsim/gui/gpsim_group_ui.h
+++ b/src/progs/gpsim/gui/gpsim_group_ui.h
@@ -18,23 +18,24 @@ namespace GPSim
class ConfigWidget : public ::Programmer::ConfigWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- ConfigWidget(const ::Programmer::Group &group, QWidget *parent);
+ ConfigWidget(const ::Programmer::Group &group, TQWidget *tqparent);
private slots:
- void updateStatus();
+ void updatetqStatus();
private:
- QLabel *_status;
+ TQLabel *_status;
};
//----------------------------------------------------------------------------
class GroupUI : public ::Programmer::GroupUI
{
public:
- virtual ::Programmer::ConfigWidget *createConfigWidget(QWidget *parent) const;
+ virtual ::Programmer::ConfigWidget *createConfigWidget(TQWidget *tqparent) const;
virtual bool hasAdvancedDialog() const { return false; }
- virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &, QWidget *) const { return 0; }
+ virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &, TQWidget *) const { return 0; }
};
} // namespace
diff --git a/src/progs/gui/debug_config_center.cpp b/src/progs/gui/debug_config_center.cpp
index 9286e3e..a35eeba 100644
--- a/src/progs/gui/debug_config_center.cpp
+++ b/src/progs/gui/debug_config_center.cpp
@@ -10,7 +10,7 @@
#include <kiconloader.h>
-QPixmap Debugger::OptionsConfigWidget::pixmap() const
+TQPixmap Debugger::OptionsConfigWidget::pixmap() const
{
KIconLoader loader;
return loader.loadIcon("piklab_config_debugger", KIcon::Toolbar, KIcon::SizeMedium);
diff --git a/src/progs/gui/debug_config_center.h b/src/progs/gui/debug_config_center.h
index a8e496e..169829e 100644
--- a/src/progs/gui/debug_config_center.h
+++ b/src/progs/gui/debug_config_center.h
@@ -9,7 +9,7 @@
#ifndef DEBUG_CONFIG_CENTER_H
#define DEBUG_CONFIG_CENTER_H
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include "common/gui/config_widget.h"
#include "progs/base/debug_config.h"
@@ -18,9 +18,9 @@ namespace Debugger
{
BEGIN_DECLARE_CONFIG_WIDGET(Config, OptionsConfigWidget)
- virtual QString header() const { return i18n("Debugging Options"); }
- virtual QString title() const { return i18n("Debugging Options"); }
- virtual QPixmap pixmap() const;
+ virtual TQString header() const { return i18n("Debugging Options"); }
+ virtual TQString title() const { return i18n("Debugging Options"); }
+ virtual TQPixmap pixmap() const;
END_DECLARE_CONFIG_WIDGET
} // namespace
diff --git a/src/progs/gui/hardware_config_widget.cpp b/src/progs/gui/hardware_config_widget.cpp
index 8d82ddb..4dbaac6 100644
--- a/src/progs/gui/hardware_config_widget.cpp
+++ b/src/progs/gui/hardware_config_widget.cpp
@@ -9,7 +9,7 @@
***************************************************************************/
#include "hardware_config_widget.h"
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kpushbutton.h>
#include "progs/base/prog_config.h"
@@ -17,39 +17,39 @@
#include "common/gui/misc_gui.h"
//-----------------------------------------------------------------------------
-Hardware::HConfigWidget::HConfigWidget(::Programmer::Base &base, QWidget *parent, bool edit)
- : QFrame(parent, "hardware_config_widget"), _edit(edit), _connected(false), _base(base)
+Hardware::HConfigWidget::HConfigWidget(::Programmer::Base &base, TQWidget *tqparent, bool edit)
+ : TQFrame(tqparent, "hardware_config_widget"), _edit(edit), _connected(false), _base(base)
{
_hardware = 0;
- QHBoxLayout *top = new QHBoxLayout(this, 0, 10);
- _mainVBox = new QVBoxLayout(top);
+ TQHBoxLayout *top = new TQHBoxLayout(this, 0, 10);
+ _mainVBox = new TQVBoxLayout(top);
if (edit) {
- _editVBox = new QVBoxLayout(top);
+ _editVBox = new TQVBoxLayout(top);
top->setStretchFactor(_editVBox, 1);
} else _editVBox = 0;
}
//-----------------------------------------------------------------------------
-Hardware::EditDialog::EditDialog(ConfigWidget *cwidget, const QString &name, const Port::Description &pd, Data *data)
+Hardware::EditDialog::EditDialog(ConfigWidget *cwidget, const TQString &name, const Port::Description &pd, Data *data)
: KDialogBase(Plain, i18n("Edit and test hardware"), Ok|Cancel, Cancel, cwidget, "hardware_edit_dialog", true, true),
_cwidget(cwidget), _savedName(name), _oldData(data)
{
setButtonOK(i18n("Save"));
setButtonCancel(i18n("Close"));
- QGridLayout *grid = new QGridLayout(plainPage(), 1, 1, 0, 10);
+ TQGridLayout *grid = new TQGridLayout(plainPage(), 1, 1, 0, 10);
grid->setColStretch(2, 1);
- QLabel *label = new QLabel(i18n("Hardware name:"), plainPage());
+ TQLabel *label = new TQLabel(i18n("Hardware name:"), plainPage());
grid->addWidget(label, 0, 0);
- _name = new QLineEdit(name, plainPage());
+ _name = new TQLineEdit(name, plainPage());
grid->addWidget(_name, 0, 1);
- label = new QLabel(i18n("%1 at %2:").arg(pd.type.label()).arg(pd.device), plainPage());
+ label = new TQLabel(i18n("%1 at %2:").tqarg(pd.type.label()).tqarg(pd.device), plainPage());
grid->addWidget(label, 1, 0);
- label = new QLabel(plainPage());
+ label = new TQLabel(plainPage());
grid->addWidget(label, 1, 1);
_hc = cwidget->createHardwareConfigWidget(plainPage(), true);
@@ -71,9 +71,9 @@ void Hardware::EditDialog::slotOk()
MessageBox::sorry(i18n("The hardware name is already used for a standard hardware."), Log::Show);
return;
}
- QStringList names = _cwidget->_config->hardwareNames(PortType::Nb_Types); // all hardwares
- if ( names.contains(_name->text()) ) {
- if ( !MessageBox::askContinue(i18n("Do you want to overwrite this custom hardware \"%1\"?").arg(_name->text()),
+ TQStringList names = _cwidget->_config->hardwareNames(PortType::Nb_Types); // all hardwares
+ if ( names.tqcontains(_name->text()) ) {
+ if ( !MessageBox::askContinue(i18n("Do you want to overwrite this custom hardware \"%1\"?").tqarg(_name->text()),
KStdGuiItem::save()) ) return;
}
delete _oldData;
@@ -94,19 +94,19 @@ void Hardware::EditDialog::slotCancel()
}
//-----------------------------------------------------------------------------
-Hardware::ConfigWidget::ConfigWidget(::Programmer::Base *base, Config *config, QWidget *parent)
- : ::Programmer::ConfigWidget(base->group(), parent), _base(base), _config(config), _hc(0)
+Hardware::ConfigWidget::ConfigWidget(::Programmer::Base *base, Config *config, TQWidget *tqparent)
+ : ::Programmer::ConfigWidget(base->group(), tqparent), _base(base), _config(config), _hc(0)
{
// programmer combo
uint row = numRows();
- _configCombo = new QComboBox(this);
- connect(_configCombo, SIGNAL(activated(int)), SLOT(configChanged(int)));
+ _configCombo = new TQComboBox(this);
+ connect(_configCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(configChanged(int)));
addWidget(_configCombo, row,row, 0,0);
row++;
// hardware config
- QHBoxLayout *hbox = new QHBoxLayout(10);
- _hbox = new QHBoxLayout(10);
+ TQHBoxLayout *hbox = new TQHBoxLayout(10);
+ _hbox = new TQHBoxLayout(10);
hbox->addLayout(_hbox);
addLayout(hbox, row,row, 0,1);
row++;
@@ -117,12 +117,12 @@ Hardware::ConfigWidget::ConfigWidget(::Programmer::Base *base, Config *config, Q
row++;
// buttons
- QVBoxLayout *vbox = new QVBoxLayout(hbox);
+ TQVBoxLayout *vbox = new TQVBoxLayout(hbox);
_editButton = new KPushButton(this);
- connect(_editButton, SIGNAL(clicked()), SLOT(editClicked()));
+ connect(_editButton, TQT_SIGNAL(clicked()), TQT_SLOT(editClicked()));
vbox->addWidget(_editButton);
_deleteButton = new KPushButton(i18n("Delete"), this);
- connect(_deleteButton, SIGNAL(clicked()), SLOT(deleteClicked()));
+ connect(_deleteButton, TQT_SIGNAL(clicked()), TQT_SLOT(deleteClicked()));
vbox->addWidget(_deleteButton);
vbox->addStretch(1);
}
@@ -148,7 +148,7 @@ bool Hardware::ConfigWidget::set(const Port::Description &pd, uint i)
}
bool ok = _hc->set(pd, *hd);
delete hd;
- QString s = _config->comment(_names[i]);
+ TQString s = _config->comment(_names[i]);
if ( s.isEmpty() ) _comment->hide();
else {
_comment->setText(s);
@@ -163,7 +163,7 @@ bool Hardware::ConfigWidget::set(const Port::Description &pd, uint i)
bool Hardware::ConfigWidget::setPort(const ::Programmer::HardwareDescription &hd)
{
updateList(hd.port.type);
- int i = _names.findIndex(_config->currentHardware(hd.port.type));
+ int i = _names.tqfindIndex(_config->currentHardware(hd.port.type));
if ( i!=-1 ) _configCombo->setCurrentItem(i);
return set(hd.port, _configCombo->currentItem());
}
@@ -174,29 +174,29 @@ void Hardware::ConfigWidget::updateList(PortType type)
_names = _config->hardwareNames(type);
for (uint i=0; i<_names.count(); i++) {
bool standard = _config->isStandardHardware(_names[i]);
- QString s = (standard ? _config->label(_names[i]) : i18n("%1 <custom>").arg(_names[i]));
+ TQString s = (standard ? _config->label(_names[i]) : i18n("%1 <custom>").tqarg(_names[i]));
_configCombo->insertItem(s);
}
}
void Hardware::ConfigWidget::editClicked()
{
- QString name = _names[_configCombo->currentItem()];
- QString cname = (_config->isStandardHardware(name) ? QString::null : name);
+ TQString name = _names[_configCombo->currentItem()];
+ TQString cname = (_config->isStandardHardware(name) ? TQString() : name);
Port::Description pd = _hc->portDescription();
EditDialog *hcd = new EditDialog(this, cname, pd, _hc->data());
int res = hcd->exec();
- if ( res==QDialog::Rejected ) return;
+ if ( res==TQDialog::Rejected ) return;
updateList(pd.type);
- int index = _names.findIndex(hcd->savedName());
+ int index = _names.tqfindIndex(hcd->savedName());
_configCombo->setCurrentItem(index);
configChanged(_configCombo->currentItem());
}
void Hardware::ConfigWidget::deleteClicked()
{
- QString name = _names[_configCombo->currentItem()];
- if ( !MessageBox::askContinue(i18n("Do you want to delete custom hardware \"%1\"?").arg(name),
+ TQString name = _names[_configCombo->currentItem()];
+ if ( !MessageBox::askContinue(i18n("Do you want to delete custom hardware \"%1\"?").tqarg(name),
KStdGuiItem::del()) ) return;
_config->deleteCustomHardware(name);
updateList(_hc->portDescription().type);
diff --git a/src/progs/gui/hardware_config_widget.h b/src/progs/gui/hardware_config_widget.h
index d373990..2f94e81 100644
--- a/src/progs/gui/hardware_config_widget.h
+++ b/src/progs/gui/hardware_config_widget.h
@@ -10,8 +10,8 @@
#ifndef HARDWARE_CONFIG_WIDGET
#define HARDWARE_CONFIG_WIDGET
-#include <qlineedit.h>
-#include <qcombobox.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
#include <kdialogbase.h>
#include <ktextbrowser.h>
@@ -24,11 +24,12 @@ namespace Hardware
{
//-----------------------------------------------------------------------------
-class HConfigWidget : public QFrame
+class HConfigWidget : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- HConfigWidget(::Programmer::Base &base, QWidget *parent, bool edit);
+ HConfigWidget(::Programmer::Base &base, TQWidget *tqparent, bool edit);
virtual ~HConfigWidget() { delete _hardware; }
virtual bool set(const Port::Description &pd, const Data &data) = 0;
virtual Data *data() const = 0;
@@ -36,7 +37,7 @@ public:
protected:
::Programmer::Hardware *_hardware;
- QVBoxLayout *_mainVBox, *_editVBox;
+ TQVBoxLayout *_mainVBox, *_editVBox;
bool _edit, _connected;
::Programmer::Base &_base;
};
@@ -47,9 +48,10 @@ class ConfigWidget;
class EditDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- EditDialog(ConfigWidget *parent, const QString &name, const Port::Description &pd, Data *data);
- QString savedName() const { return _savedName; }
+ EditDialog(ConfigWidget *tqparent, const TQString &name, const Port::Description &pd, Data *data);
+ TQString savedName() const { return _savedName; }
private slots:
virtual void slotOk();
@@ -57,22 +59,23 @@ private slots:
private:
ConfigWidget *_cwidget;
- QString _savedName;
+ TQString _savedName;
Data *_oldData;
HConfigWidget *_hc;
- QLineEdit *_name;
+ TQLineEdit *_name;
};
//-----------------------------------------------------------------------------
class ConfigWidget : public ::Programmer::ConfigWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- ConfigWidget(::Programmer::Base *base, Config *config, QWidget *parent);
+ ConfigWidget(::Programmer::Base *base, Config *config, TQWidget *tqparent);
virtual ~ConfigWidget() { delete _base; }
virtual void saveConfig();
virtual bool setPort(const ::Programmer::HardwareDescription &hd);
- virtual HConfigWidget *createHardwareConfigWidget(QWidget *parent, bool edit) const = 0;
+ virtual HConfigWidget *createHardwareConfigWidget(TQWidget *tqparent, bool edit) const = 0;
private slots:
void editClicked();
@@ -84,12 +87,12 @@ protected:
private:
Config *_config;
- QStringList _names;
+ TQStringList _names;
HConfigWidget *_hc;
- QPushButton *_editButton, *_deleteButton;
- QComboBox *_configCombo;
+ TQPushButton *_editButton, *_deleteButton;
+ TQComboBox *_configCombo;
KTextBrowser *_comment;
- QHBoxLayout *_hbox;
+ TQHBoxLayout *_hbox;
void updateList(PortType type);
bool set(const Port::Description &pd, uint i);
diff --git a/src/progs/gui/port_selector.cpp b/src/progs/gui/port_selector.cpp
index 2aaaabf..4bb4539 100644
--- a/src/progs/gui/port_selector.cpp
+++ b/src/progs/gui/port_selector.cpp
@@ -8,7 +8,7 @@
***************************************************************************/
#include "port_selector.h"
-#include <qtimer.h>
+#include <tqtimer.h>
#include <ktextbrowser.h>
#include "common/port/serial.h"
@@ -21,23 +21,23 @@ const char * const PortSelector::LABELS[PortType::Nb_Types] = {
I18N_NOOP("Serial"), I18N_NOOP("Parallel"), I18N_NOOP("USB")
};
-PortSelector::PortSelector(QWidget *parent)
- : QFrame(parent, "port_selector"), _group(0), _main(0)
+PortSelector::PortSelector(TQWidget *tqparent)
+ : TQFrame(tqparent, "port_selector"), _group(0), _main(0)
{
- _top = new QGridLayout(this, 1, 1, 0, 10);
+ _top = new TQGridLayout(this, 1, 1, 0, 10);
_top->setRowStretch(1, 1);
- _bgroup = new QButtonGroup;
- connect(_bgroup, SIGNAL(clicked(int)), SIGNAL(changed()));
+ _bgroup = new TQButtonGroup;
+ connect(_bgroup, TQT_SIGNAL(clicked(int)), TQT_SIGNAL(changed()));
}
void PortSelector::setGroup(const Programmer::Group &group)
{
_group = &group;
delete _main;
- _main = new QWidget(this);
+ _main = new TQWidget(this);
_top->addWidget(_main, 0, 0);
- _grid = new QGridLayout(_main, 1, 1, 0, 10);
+ _grid = new TQGridLayout(_main, 1, 1, 0, 10);
_grid->setColStretch(3, 1);
FOR_EACH(PortType, type) {
_combos[type.type()] = 0;
@@ -52,7 +52,7 @@ void PortSelector::setGroup(const Programmer::Group &group)
void PortSelector::addPortType(const Port::Description &pd)
{
- QString noDeviceMessage, notAvailableMessage;
+ TQString noDeviceMessage, notAvailableMessage;
switch (pd.type.type()) {
case PortType::Serial:
noDeviceMessage = i18n("Your computer might not have any serial port.");
@@ -70,38 +70,38 @@ void PortSelector::addPortType(const Port::Description &pd)
case PortType::Nb_Types: Q_ASSERT(false); break;
}
- QRadioButton *rb = new QRadioButton(i18n(LABELS[pd.type.type()]), _main);
+ TQRadioButton *rb = new TQRadioButton(i18n(LABELS[pd.type.type()]), _main);
_bgroup->insert(rb, pd.type.type());
if ( _bgroup->count()==1 ) _bgroup->setButton(pd.type.type());
_grid->addWidget(rb, 3*(_bgroup->count()-1), 0);
- _status[pd.type.type()] = new QLabel(_main);
+ _status[pd.type.type()] = new TQLabel(_main);
_grid->addWidget(_status[pd.type.type()], 3*(_bgroup->count()-1), 2);
- QStringList list = Port::probedDeviceList(pd.type);
+ TQStringList list = Port::probedDeviceList(pd.type);
bool noDevice = ( list.isEmpty() && pd.type.data().withDevice );
bool notAvailable = !Port::isAvailable(pd.type);
rb->setEnabled(!notAvailable);
if ( noDevice || notAvailable ) {
KTextBrowser *comment = new KTextBrowser(_main);
- QString text = (notAvailable ? notAvailableMessage : noDeviceMessage);
+ TQString text = (notAvailable ? notAvailableMessage : noDeviceMessage);
text += "<p>";
- text += i18n("<a href=\"%1\">See Piklab homepage for help</a>.").arg(Piklab::URLS[Piklab::Support]);
+ text += i18n("<a href=\"%1\">See Piklab homepage for help</a>.").tqarg(Piklab::URLS[Piklab::Support]);
comment->setText(text);
_grid->addMultiCellWidget(comment, 3*(_bgroup->count()-1)+1,3*(_bgroup->count()-1)+1, 0,3);
}
if (pd.type.data().withDevice) {
- _combos[pd.type.type()] = new QComboBox(true, _main);
+ _combos[pd.type.type()] = new TQComboBox(true, _main);
for (uint i=0; i<list.count(); i++) _combos[pd.type.type()]->insertItem(list[i]);
- if ( !pd.device.isEmpty() && !list.contains(pd.device) ) _combos[pd.type.type()]->insertItem(pd.device);
+ if ( !pd.device.isEmpty() && !list.tqcontains(pd.device) ) _combos[pd.type.type()]->insertItem(pd.device);
_combos[pd.type.type()]->setCurrentText(pd.device);
- connect(_combos[pd.type.type()], SIGNAL(activated(int)), SIGNAL(changed()));
- connect(_combos[pd.type.type()], SIGNAL(textChanged(const QString &)), SLOT(textChanged()));
+ connect(_combos[pd.type.type()], TQT_SIGNAL(activated(int)), TQT_SIGNAL(changed()));
+ connect(_combos[pd.type.type()], TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(textChanged()));
_grid->addWidget(_combos[pd.type.type()], 3*(_bgroup->count()-1), 1);
}
}
-void PortSelector::setStatus(PortType ptype, const QString &message)
+void PortSelector::settqStatus(PortType ptype, const TQString &message)
{
_pending = false;
FOR_EACH(PortType, type) {
@@ -114,9 +114,9 @@ void PortSelector::setStatus(PortType ptype, const QString &message)
}
}
-QString PortSelector::device(PortType type) const
+TQString PortSelector::device(PortType type) const
{
- if ( type==PortType::Nb_Types || _combos[type.type()]==0 || !type.data().withDevice ) return QString::null;
+ if ( type==PortType::Nb_Types || _combos[type.type()]==0 || !type.data().withDevice ) return TQString();
return _combos[type.type()]->currentText();
}
@@ -140,5 +140,5 @@ void PortSelector::textChanged()
if (_pending) return;
_status[type().type()]->hide();
_pending = true;
- QTimer::singleShot(1000, this, SIGNAL(changed()));
+ TQTimer::singleShot(1000, this, TQT_SIGNAL(changed()));
}
diff --git a/src/progs/gui/port_selector.h b/src/progs/gui/port_selector.h
index 6304d1a..86a0d4d 100644
--- a/src/progs/gui/port_selector.h
+++ b/src/progs/gui/port_selector.h
@@ -9,24 +9,25 @@
#ifndef PORT_SELECTOR_H
#define PORT_SELECTOR_H
-#include <qradiobutton.h>
-#include <qcombobox.h>
-#include <qlayout.h>
-#include <qbuttongroup.h>
-#include <qlabel.h>
+#include <tqradiobutton.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
+#include <tqbuttongroup.h>
+#include <tqlabel.h>
#include "common/port/port.h"
namespace Programmer { class Group; }
-class PortSelector : public QFrame
+class PortSelector : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- PortSelector(QWidget *parent);
+ PortSelector(TQWidget *tqparent);
void setGroup(const Programmer::Group &group);
Port::Description portDescription() const { return Port::Description(type(), device(type())); }
void saveConfig();
- void setStatus(PortType type, const QString &message);
+ void settqStatus(PortType type, const TQString &message);
signals:
void changed();
@@ -36,17 +37,17 @@ private slots:
private:
const Programmer::Group *_group;
- QGridLayout *_top, *_grid;
- QWidget *_main;
- QButtonGroup *_bgroup;
- QComboBox *_combos[PortType::Nb_Types];
- QLabel *_status[PortType::Nb_Types];
+ TQGridLayout *_top, *_grid;
+ TQWidget *_main;
+ TQButtonGroup *_bgroup;
+ TQComboBox *_combos[PortType::Nb_Types];
+ TQLabel *_status[PortType::Nb_Types];
bool _pending;
static const char * const LABELS[PortType::Nb_Types];
void addPortType(const Port::Description &pd);
PortType type() const;
- QString device(PortType type) const;
+ TQString device(PortType type) const;
};
#endif
diff --git a/src/progs/gui/prog_config_center.cpp b/src/progs/gui/prog_config_center.cpp
index 3210921..f781280 100644
--- a/src/progs/gui/prog_config_center.cpp
+++ b/src/progs/gui/prog_config_center.cpp
@@ -8,13 +8,13 @@
***************************************************************************/
#include "prog_config_center.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qwidgetstack.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qtimer.h>
-#include <qtabwidget.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqwidgetstack.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
+#include <tqtimer.h>
+#include <tqtabwidget.h>
#include <kiconloader.h>
#include "progs/list/prog_list.h"
@@ -25,7 +25,7 @@
#include "libgui/main_global.h"
//----------------------------------------------------------------------------
-QPixmap Programmer::OptionsConfigWidget::pixmap() const
+TQPixmap Programmer::OptionsConfigWidget::pixmap() const
{
KIconLoader loader;
return loader.loadIcon("piklab_config_programmer", KIcon::Toolbar, KIcon::SizeMedium);
@@ -37,15 +37,15 @@ Programmer::SelectConfigWidget::SelectConfigWidget()
uint row = 0;
// programmer type
- QLabel *label = new QLabel(i18n("Programmer in use:"), this);
+ TQLabel *label = new TQLabel(i18n("Programmer in use:"), this);
addWidget(label, row,row, 0,0);
- _combo = new KeyComboBox<QString>(this);
- connect(_combo->widget(), SIGNAL(activated(int)), SLOT(programmerChanged()));
+ _combo = new KeyComboBox<TQString>(this);
+ connect(_combo->widget(), TQT_SIGNAL(activated(int)), TQT_SLOT(programmerChanged()));
addWidget(_combo->widget(), row,row, 1,1);
row++;
// tab widget
- _tabWidget = new QTabWidget(this);
+ _tabWidget = new TQTabWidget(this);
addWidget(_tabWidget, row,row, 0,2);
row++;
@@ -53,14 +53,14 @@ Programmer::SelectConfigWidget::SelectConfigWidget()
_portSelectorContainer = new Container;
_portSelectorContainer->setMargin(10);
_portSelector = new PortSelector(_portSelectorContainer);
- connect(_portSelector, SIGNAL(changed()), SLOT(portChanged()));
+ connect(_portSelector, TQT_SIGNAL(changed()), TQT_SLOT(portChanged()));
_portSelectorContainer->addWidget(_portSelector, 0,0, 0,0);
// specific programmer config
- _stack = new KeyWidgetStack<QString>(_tabWidget);
- static_cast<QFrame *>(_stack->widget())->setMargin(10);
+ _stack = new KeyWidgetStack<TQString>(_tabWidget);
+ static_cast<TQFrame *>(_stack->widget())->setMargin(10);
KIconLoader loader;
- QPixmap icon = loader.loadIcon("configure", KIcon::Small);
+ TQPixmap icon = loader.loadIcon("configure", KIcon::Small);
_tabWidget->addTab(_stack->widget(), icon, i18n("Specific"));
::Programmer::Lister::ConstIterator it;
for (it=::Programmer::lister().begin(); it!=::Programmer::lister().end(); ++it) {
@@ -73,23 +73,23 @@ Programmer::SelectConfigWidget::SelectConfigWidget()
// init
_combo->setCurrentItem(GlobalConfig::programmerGroup().name());
_stack->setCurrentItem(GlobalConfig::programmerGroup().name());
- QTimer::singleShot(0, this, SLOT(programmerChanged()));
+ TQTimer::singleShot(0, this, TQT_SLOT(programmerChanged()));
}
void Programmer::SelectConfigWidget::portChanged()
{
- ::BusyCursor bc; // can take a few seconds to connect programmer...
+ ::PBusyCursor bc; // can take a few seconds to connect programmer...
HardwareDescription hd;
hd.port = _portSelector->portDescription();
::Hardware::Config *config = Main::programmerGroup().hardwareConfig();
if (config) hd.name = config->currentHardware(hd.port.type);
delete config;
- QWidget *w = _stack->item(_combo->currentItem());
+ TQWidget *w = _stack->item(_combo->currentItem());
bool ok = static_cast< ::Programmer::ConfigWidget *>(w)->setPort(hd);
- _portSelector->setStatus(hd.port.type, ok ? i18n("Connection: Ok") : i18n("Connection: Error"));
+ _portSelector->settqStatus(hd.port.type, ok ? i18n("Connection: Ok") : i18n("Connection: Error"));
}
-QPixmap Programmer::SelectConfigWidget::pixmap() const
+TQPixmap Programmer::SelectConfigWidget::pixmap() const
{
KIconLoader loader;
return loader.loadIcon("piklab_config_programmer", KIcon::Toolbar, KIcon::SizeMedium);
@@ -98,25 +98,25 @@ QPixmap Programmer::SelectConfigWidget::pixmap() const
void Programmer::SelectConfigWidget::saveConfig()
{
_portSelector->saveConfig();
- QString key = _combo->currentItem();
+ TQString key = _combo->currentItem();
static_cast<ConfigWidget *>(_stack->item(key))->saveConfig();
GlobalConfig::writeProgrammerGroup(*::Programmer::lister().group(key));
}
void Programmer::SelectConfigWidget::programmerChanged()
{
- QString key = _combo->currentItem();
+ TQString key = _combo->currentItem();
const ::Programmer::Group &group = *::Programmer::lister().group(key);
bool isHardware = !group.isSoftware();
bool hasTab = ( _tabWidget->indexOf(_portSelectorContainer)!=-1 );
if (isHardware) {
if ( !hasTab ) {
KIconLoader loader;
- QPixmap icon = loader.loadIcon("connect_creating", KIcon::Small);
+ TQPixmap icon = loader.loadIcon("connect_creating", KIcon::Small);
_tabWidget->insertTab(_portSelectorContainer, icon, i18n("Port Selection"), 0);
}
} else if (hasTab) _tabWidget->removePage(_portSelectorContainer);
_portSelector->setGroup(group);
_stack->setCurrentItem(key);
- if (isHardware) QTimer::singleShot(0, this, SLOT(portChanged()));
+ if (isHardware) TQTimer::singleShot(0, this, TQT_SLOT(portChanged()));
}
diff --git a/src/progs/gui/prog_config_center.h b/src/progs/gui/prog_config_center.h
index ea5ee6d..e2f13c8 100644
--- a/src/progs/gui/prog_config_center.h
+++ b/src/progs/gui/prog_config_center.h
@@ -9,7 +9,7 @@
#ifndef PROG_CONFIG_CENTER_H
#define PROG_CONFIG_CENTER_H
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include "common/gui/config_widget.h"
#include "common/gui/key_gui.h"
@@ -20,21 +20,22 @@ class PortSelector;
namespace Programmer
{
BEGIN_DECLARE_CONFIG_WIDGET(Config, OptionsConfigWidget)
- virtual QString header() const { return i18n("Programmer Options"); }
- virtual QString title() const { return i18n("Programmer Options"); }
- virtual QPixmap pixmap() const;
+ virtual TQString header() const { return i18n("Programmer Options"); }
+ virtual TQString title() const { return i18n("Programmer Options"); }
+ virtual TQPixmap pixmap() const;
END_DECLARE_CONFIG_WIDGET
//----------------------------------------------------------------------------
class SelectConfigWidget : public ::ConfigWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
SelectConfigWidget();
virtual void loadConfig() {}
- virtual QString header() const { return i18n("Programmer Selection"); }
- virtual QString title() const { return i18n("Programmer Selection"); }
- virtual QPixmap pixmap() const;
+ virtual TQString header() const { return i18n("Programmer Selection"); }
+ virtual TQString title() const { return i18n("Programmer Selection"); }
+ virtual TQPixmap pixmap() const;
public slots:
virtual void saveConfig();
@@ -44,11 +45,11 @@ private slots:
void portChanged();
private:
- KeyComboBox<QString> *_combo;
+ KeyComboBox<TQString> *_combo;
PortSelector *_portSelector;
- KeyWidgetStack<QString> *_stack;
+ KeyWidgetStack<TQString> *_stack;
Container *_portSelectorContainer;
- QTabWidget *_tabWidget;
+ TQTabWidget *_tabWidget;
};
} // namespace
diff --git a/src/progs/gui/prog_config_widget.cpp b/src/progs/gui/prog_config_widget.cpp
index be767c2..5ff6047 100644
--- a/src/progs/gui/prog_config_widget.cpp
+++ b/src/progs/gui/prog_config_widget.cpp
@@ -8,21 +8,21 @@
***************************************************************************/
#include "prog_config_widget.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
#include <kurlrequester.h>
#include "progs/base/prog_config.h"
#include "progs/base/prog_group.h"
-Programmer::ConfigWidget::ConfigWidget(const Group &group, QWidget *parent)
- : ::ConfigWidget(parent), _group(group)
+Programmer::ConfigWidget::ConfigWidget(const Group &group, TQWidget *tqparent)
+ : ::ConfigWidget(tqparent), _group(group)
{
if ( group.properties() & NeedDeviceSpecificFirmware ) {
uint row = numRows();
- QLabel *label = new QLabel(i18n("Firmware directory:"), this);
+ TQLabel *label = new TQLabel(i18n("Firmware directory:"), this);
addWidget(label, row,row, 0,0);
_firmwareDir = new KURLRequester(this);
_firmwareDir->setMode(KFile::Directory | KFile::ExistingOnly);
diff --git a/src/progs/gui/prog_config_widget.h b/src/progs/gui/prog_config_widget.h
index d201cea..2dc8b7e 100644
--- a/src/progs/gui/prog_config_widget.h
+++ b/src/progs/gui/prog_config_widget.h
@@ -9,7 +9,7 @@
#ifndef PROG_CONFIG_WIDGET
#define PROG_CONFIG_WIDGET
-class QCheckBox;
+class TQCheckBox;
class KURLRequester;
#include "common/gui/config_widget.h"
@@ -23,15 +23,16 @@ class HardwareDescription;
class ConfigWidget: public ::ConfigWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- ConfigWidget(const Group &group, QWidget *parent);
+ ConfigWidget(const Group &group, TQWidget *tqparent);
virtual void loadConfig();
const Group &group() const { return _group; }
virtual void saveConfig();
virtual bool setPort(const HardwareDescription &hd);
signals:
- void updatePortStatus(bool ok);
+ void updatePorttqStatus(bool ok);
protected:
const Group &_group;
diff --git a/src/progs/gui/prog_group_ui.cpp b/src/progs/gui/prog_group_ui.cpp
index 14cf7b0..90643a0 100644
--- a/src/progs/gui/prog_group_ui.cpp
+++ b/src/progs/gui/prog_group_ui.cpp
@@ -24,50 +24,50 @@
#include "devices/pic/prog/pic_prog.h"
//----------------------------------------------------------------------------
-Programmer::StandaloneMemoryCalibrationEditor::StandaloneMemoryCalibrationEditor(const Pic::Memory &memory, QWidget *parent)
- : Pic::MemoryCalibrationEditor(0, const_cast<Pic::Memory &>(memory), parent)
+Programmer::StandaloneMemoryCalibrationEditor::StandaloneMemoryCalibrationEditor(const Pic::Memory &memory, TQWidget *tqparent)
+ : Pic::MemoryCalibrationEditor(0, const_cast<Pic::Memory &>(memory), tqparent)
{}
void Programmer::StandaloneMemoryCalibrationEditor::init(bool first)
{
Pic::MemoryCalibrationEditor::init(first);
- KAction *action = new KAction(i18n("Read"), "reload", 0, this, SIGNAL(updateCalibration()), Main::toplevel().actionCollection());
+ KAction *action = new KAction(i18n("Read"), "reload", 0, TQT_TQOBJECT(this), TQT_SIGNAL(updateCalibration()), Main::toplevel().actionCollection());
addAction(action);
- action = new KAction(i18n("Regenerating..."), 0, 0, this, SIGNAL(regenerate()), Main::toplevel().actionCollection());
+ action = new KAction(i18n("Regenerating..."), 0, 0, TQT_TQOBJECT(this), TQT_SIGNAL(regenerate()), Main::toplevel().actionCollection());
addAction(action);
}
//----------------------------------------------------------------------------
-Programmer::ButtonContainer::ButtonContainer(const QString &title,
- QObject *receiver, const char *updateSlot, QWidget *parent)
- : ::ButtonContainer(title, parent)
+Programmer::ButtonContainer::ButtonContainer(const TQString &title,
+ TQObject *receiver, const char *updateSlot, TQWidget *tqparent)
+ : ::ButtonContainer(title, tqparent)
{
if (receiver) button().appendAction(i18n("Read"), "reload", receiver, updateSlot);
}
//----------------------------------------------------------------------------
-Programmer::AdvancedDialog::AdvancedDialog(Base &base, QWidget *parent, const char *name)
- : Dialog(IconList, i18n("Advanced Dialog"), Close, Close, parent, name, true, false),
+Programmer::AdvancedDialog::AdvancedDialog(Base &base, TQWidget *tqparent, const char *name)
+ : Dialog(IconList, i18n("Advanced Dialog"), Close, Close, tqparent, name, true, false),
_base(base), _calEditor(0)
{
// programmer
KIconLoader loader;
- QPixmap pixmap = loader.loadIcon("piklab_burnchip", KIcon::Toolbar, KIcon::SizeMedium);
- QFrame *page = addPage(i18n("Programmer"), _base.group().label(), pixmap);
- QVBoxLayout *vbox = new QVBoxLayout(page);
+ TQPixmap pixmap = loader.loadIcon("piklab_burnchip", KIcon::Toolbar, KIcon::SizeMedium);
+ TQFrame *page = addPage(i18n("Programmer"), _base.group().label(), pixmap);
+ TQVBoxLayout *vbox = new TQVBoxLayout(page);
_programmerContainer = new Container(page);
vbox->addWidget(_programmerContainer);
Properties properties = _base.group().properties();
uint row = _programmerContainer->numRows();
if ( properties & HasFirmware ) {
- _firmwareContainer = new ButtonContainer(i18n("Firmware"), this, SLOT(updateFirmware()), _programmerContainer);
+ _firmwareContainer = new ButtonContainer(i18n("Firmware"), TQT_TQOBJECT(this), TQT_SLOT(updateFirmware()), _programmerContainer);
_programmerContainer->addWidget(_firmwareContainer, row,row, 0,1);
if ( _base.group().properties() & CanUploadFirmware )
- _firmwareContainer->button().appendAction(i18n("Uploading..."), "piklab_burnchip", this, SLOT(uploadFirmware()));
- QLabel *label = new QLabel(i18n("Version:"), _firmwareContainer);
+ _firmwareContainer->button().appendAction(i18n("Uploading..."), "piklab_burnchip", TQT_TQOBJECT(this), TQT_SLOT(uploadFirmware()));
+ TQLabel *label = new TQLabel(i18n("Version:"), _firmwareContainer);
_firmwareContainer->addWidget(label, 1,1, 0,0);
- _firmwareLabel = new QLabel(_firmwareContainer);
+ _firmwareLabel = new TQLabel(_firmwareContainer);
_firmwareContainer->addWidget(_firmwareLabel, 1,1, 1,1);
row++;
} else {
@@ -76,13 +76,13 @@ Programmer::AdvancedDialog::AdvancedDialog(Base &base, QWidget *parent, const ch
}
if ( _base.group().canReadVoltages() ) {
- _voltagesContainer = new ButtonContainer(i18n("Voltages"), this, SLOT(updateVoltages()), _programmerContainer);
+ _voltagesContainer = new ButtonContainer(i18n("Voltages"), TQT_TQOBJECT(this), TQT_SLOT(updateVoltages()), _programmerContainer);
_programmerContainer->addWidget(_voltagesContainer, row,row, 0,1);
row++;
} else _voltagesContainer = 0;
if ( properties & HasSelfTest ) {
- _selfTestContainer = new ButtonContainer(i18n("Self-test"), this, SLOT(updateSelfTest()), _programmerContainer);
+ _selfTestContainer = new ButtonContainer(i18n("Self-test"), TQT_TQOBJECT(this), TQT_SLOT(updateSelfTest()), _programmerContainer);
_programmerContainer->addWidget(_selfTestContainer, row,row, 0,1);
row++;
} else _selfTestContainer = 0;
@@ -90,11 +90,11 @@ Programmer::AdvancedDialog::AdvancedDialog(Base &base, QWidget *parent, const ch
// calibration
pixmap = loader.loadIcon("configure", KIcon::Toolbar, KIcon::SizeMedium);
page = addPage(i18n("Calibration"), i18n("Calibration"), pixmap);
- vbox = new QVBoxLayout(page);
+ vbox = new TQVBoxLayout(page);
_calibrationContainer = new Container(page);
vbox->addWidget(_calibrationContainer);
const Device::Data *data = Main::deviceData();
- QString s;
+ TQString s;
if ( data==0 ) s = i18n("No device selected.");
else if ( data->group().name()!="pic" || !static_cast<const Pic::Data *>(data)->isReadable(Pic::MemoryRangeType::Cal) )
s = i18n("This device has no calibration information.");
@@ -102,14 +102,14 @@ Programmer::AdvancedDialog::AdvancedDialog(Base &base, QWidget *parent, const ch
else {
const ::Programmer::PicBase &pbase = static_cast<const ::Programmer::PicBase &>(_base);
_calEditor = new StandaloneMemoryCalibrationEditor(pbase.deviceMemory(), _calibrationContainer);
- connect(_calEditor, SIGNAL(updateCalibration()), SLOT(updateCalibration()));
- connect(_calEditor, SIGNAL(regenerate()), SLOT(regenerateCalibration()));
+ connect(_calEditor, TQT_SIGNAL(updateCalibration()), TQT_SLOT(updateCalibration()));
+ connect(_calEditor, TQT_SIGNAL(regenerate()), TQT_SLOT(regenerateCalibration()));
_calEditor->init(true);
_calEditor->setReadOnly(true);
_calibrationContainer->addWidget(_calEditor, 0,0, 0,0);
}
if ( !s.isEmpty() ) {
- QLabel *label = new QLabel(s, _calibrationContainer);
+ TQLabel *label = new TQLabel(s, _calibrationContainer);
_calibrationContainer->addWidget(label, 0,0, 0,0);
}
}
@@ -132,7 +132,7 @@ bool Programmer::AdvancedDialog::ensureConnected()
void Programmer::AdvancedDialog::updateFirmware()
{
- ::BusyCursor bc;
+ ::PBusyCursor bc;
if ( ensureConnected() ) _base.readFirmwareVersion();
updateDisplay();
}
@@ -141,7 +141,7 @@ void Programmer::AdvancedDialog::uploadFirmware()
{
PURL::Url url = PURL::getOpenUrl(":open_firmware", PURL::filter(PURL::Hex), this ,i18n("Open Firmware"));
if ( url.isEmpty() ) return;
- ::BusyCursor bc;
+ ::PBusyCursor bc;
if ( !connectProgrammer() ) return;
if ( _base.uploadFirmware(url) )
MessageBox::information(i18n("Firmware uploaded successfully."), Log::Show);
@@ -151,21 +151,21 @@ void Programmer::AdvancedDialog::uploadFirmware()
void Programmer::AdvancedDialog::updateVoltages()
{
- ::BusyCursor bc;
+ ::PBusyCursor bc;
if ( ensureConnected() ) _base.readVoltages();
updateDisplay();
}
void Programmer::AdvancedDialog::updateSelfTest()
{
- ::BusyCursor bc;
+ ::PBusyCursor bc;
if ( ensureConnected() ) _base.selfTest(false);
updateDisplay();
}
void Programmer::AdvancedDialog::updateCalibration()
{
- ::BusyCursor bc;
+ ::PBusyCursor bc;
if ( ensureConnected() ) static_cast< ::Programmer::PicBase &>(_base).readCalibration();
updateDisplay();
}
diff --git a/src/progs/gui/prog_group_ui.h b/src/progs/gui/prog_group_ui.h
index cd97834..edc15ee 100644
--- a/src/progs/gui/prog_group_ui.h
+++ b/src/progs/gui/prog_group_ui.h
@@ -27,8 +27,9 @@ class Group;
class StandaloneMemoryCalibrationEditor : public Pic::MemoryCalibrationEditor
{
Q_OBJECT
+ TQ_OBJECT
public:
- StandaloneMemoryCalibrationEditor(const Pic::Memory &memory, QWidget *parent);
+ StandaloneMemoryCalibrationEditor(const Pic::Memory &memory, TQWidget *tqparent);
virtual void init(bool first);
virtual bool hasAction(Device::Action) const { return false; }
@@ -41,16 +42,18 @@ signals:
class ButtonContainer : public ::ButtonContainer
{
Q_OBJECT
+ TQ_OBJECT
public:
- ButtonContainer(const QString &title, QObject *receiver, const char *updateSlot, QWidget *parent);
+ ButtonContainer(const TQString &title, TQObject *receiver, const char *updateSlot, TQWidget *tqparent);
};
//----------------------------------------------------------------------------
class AdvancedDialog : public Dialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- AdvancedDialog(Base &base, QWidget *parent, const char *name);
+ AdvancedDialog(Base &base, TQWidget *tqparent, const char *name);
virtual void updateDisplay();
protected:
@@ -70,16 +73,16 @@ protected slots:
virtual void regenerateCalibration();
private:
- QLabel *_firmwareLabel;
+ TQLabel *_firmwareLabel;
};
//----------------------------------------------------------------------------
class GroupUI : public ::Group::BaseGui
{
public:
- virtual ::Programmer::ConfigWidget *createConfigWidget(QWidget *parent) const = 0;
+ virtual ::Programmer::ConfigWidget *createConfigWidget(TQWidget *tqparent) const = 0;
virtual bool hasAdvancedDialog() const = 0;
- virtual AdvancedDialog *createAdvancedDialog(Base &base, QWidget *parent) const = 0;
+ virtual AdvancedDialog *createAdvancedDialog(Base &base, TQWidget *tqparent) const = 0;
};
inline const ::Programmer::GroupUI &groupui(const ::Programmer::Base &base) { return static_cast<const ::Programmer::GroupUI &>(*base.group().gui()); }
diff --git a/src/progs/icd1/base/icd1.cpp b/src/progs/icd1/base/icd1.cpp
index 8c2704a..2ce3c80 100644
--- a/src/progs/icd1/base/icd1.cpp
+++ b/src/progs/icd1/base/icd1.cpp
@@ -14,24 +14,24 @@
#include "common/port/port_base.h"
//-----------------------------------------------------------------------------
-Icd1::Hardware::Hardware(::Programmer::Base &base, const QString &portDevice)
+Icd1::Hardware::Hardware(::Programmer::Base &base, const TQString &portDevice)
: Icd::Hardware(base, new SerialPort(portDevice, base))
{}
-bool Icd1::Hardware::internalConnect(const QString &mode)
+bool Icd1::Hardware::internalConnect(const TQString &mode)
{
if ( !port()->open() ) return false;
if ( !port()->reset() ) return false;
if ( hasError() ) return false;
- QByteArray a = toAscii(mode);
+ TQByteArray a = toAscii(mode);
if ( !port()->send(a.data(), a.count()) ) return false;
- QString s;
+ TQString s;
if ( !port()->receive(1, s) ) return false;
port()->setPinOn(Port::Serial::RTS, false, Port::PositiveLogic);
Port::msleep(1);
port()->setPinOn(Port::Serial::RTS, true, Port::PositiveLogic);
if ( s.upper()!=mode ) {
- log(Log::LineType::Error, i18n("Failed to set port mode to '%1'.").arg(mode));
+ log(Log::LineType::Error, i18n("Failed to set port mode to '%1'.").tqarg(mode));
return false;
}
return true;
@@ -52,10 +52,10 @@ bool Icd1::Hardware::readBlockCommand(uint nbBytes)
{
Q_ASSERT( nbBytes<=0xFF );
if ( !port()->sendCommand(0x7D00 + nbBytes) ) return false;
- QByteArray a(nbBytes);
+ TQByteArray a(nbBytes);
for (uint i=0; i<nbBytes; i++)
if ( !port()->receiveByte(*(a.data()+i), i!=0) ) return false;
- _rx = QString(a);
+ _rx = TQString(a);
return true;
}
@@ -79,12 +79,12 @@ bool Icd1::Hardware::readVoltages(VoltagesData &voltages)
if ( !sendCommand(0x701C, &res) ) return false;
voltages[Pic::TargetVdd].value = (2.050 / 256) * res.toUInt(); // voltage at AN0 pin
voltages[Pic::TargetVdd].value /= (4.7 / 14.7); // voltage at Vcc
- log(Log::DebugLevel::Max, QString("Vdd: %1 %2").arg(toHexLabel(res, 4)).arg(voltages[Pic::TargetVdd].value));
+ log(Log::DebugLevel::Max, TQString("Vdd: %1 %2").tqarg(toHexLabel(res, 4)).tqarg(voltages[Pic::TargetVdd].value));
voltages[Pic::TargetVdd].error = false;
if ( !sendCommand(0x701D, &res) ) return false;
voltages[Pic::TargetVpp].value = (2.050 / 256) * res.byte(0); // voltage at AN1 pin
voltages[Pic::TargetVpp].value /= (10.0 / 110.0); // voltage at Vpp
- log(Log::DebugLevel::Max, QString("Vpp: %1 %2").arg(toHexLabel(res, 4)).arg(voltages[Pic::TargetVpp].value));
+ log(Log::DebugLevel::Max, TQString("Vpp: %1 %2").tqarg(toHexLabel(res, 4)).tqarg(voltages[Pic::TargetVpp].value));
voltages[Pic::TargetVpp].error = false;
return sendCommand(0x7001);
}
@@ -106,7 +106,7 @@ bool Icd1::Hardware::selfTest()
BitValue res;
if ( !sendCommand(0x700B, &res, 5000) ) return false;
if ( res!=0 ) {
- log(Log::LineType::Warning, i18n("Self-test failed (returned value is %1)").arg(toLabel(res)));
+ log(Log::LineType::Warning, i18n("Self-test failed (returned value is %1)").tqarg(toLabel(res)));
return false;
}
return true;
@@ -152,7 +152,7 @@ bool Icd1::Hardware::eraseAll()
if ( !sendCommand(0x7007, &res) ) return false;
if ( !sendCommand(0x7001) ) return false; // disable Vpp
if ( res!=0x3FFF ) {
- log(Log::LineType::Error, i18n("Erase failed (returned value is %1)").arg(toHexLabel(res, 4)));
+ log(Log::LineType::Error, i18n("Erase failed (returned value is %1)").tqarg(toHexLabel(res, 4)));
return false;
}
return true;
diff --git a/src/progs/icd1/base/icd1.h b/src/progs/icd1/base/icd1.h
index d1ae1d0..4026c8e 100644
--- a/src/progs/icd1/base/icd1.h
+++ b/src/progs/icd1/base/icd1.h
@@ -20,7 +20,7 @@ namespace Icd1
class Hardware : public Icd::Hardware
{
public:
- Hardware(::Programmer::Base &base, const QString &portDevice);
+ Hardware(::Programmer::Base &base, const TQString &portDevice);
SerialPort *port() { return static_cast<SerialPort *>(_port); }
// initialization
virtual bool uploadFirmware(const Pic::Memory &memory);
@@ -46,8 +46,8 @@ public:
virtual BitValue getProgramCounter();
private:
- virtual bool internalConnect(const QString &mode);
- virtual QString receivedData() const { return _rx; }
+ virtual bool internalConnect(const TQString &mode);
+ virtual TQString receivedData() const { return _rx; }
bool sendCommand(uint cmd, BitValue *res = 0, uint timeout = Port::Serial::DEFAULT_TIMEOUT);
bool readBlockCommand(uint nbBytes);
bool gotoMemory(Pic::MemoryRangeType type, uint offset);
diff --git a/src/progs/icd1/base/icd1_data.h b/src/progs/icd1/base/icd1_data.h
index 4200578..a3aeec0 100644
--- a/src/progs/icd1/base/icd1_data.h
+++ b/src/progs/icd1/base/icd1_data.h
@@ -9,14 +9,14 @@
#ifndef ICD1_DATA_H
#define ICD1_DATA_H
-#include <qstring.h>
+#include <tqstring.h>
namespace Icd1
{
struct Data {
uchar part;
};
- extern const Data &data(const QString &device);
+ extern const Data &data(const TQString &device);
} // namespace
#endif
diff --git a/src/progs/icd1/base/icd1_prog.cpp b/src/progs/icd1/base/icd1_prog.cpp
index 13d0d4c..0f79270 100644
--- a/src/progs/icd1/base/icd1_prog.cpp
+++ b/src/progs/icd1/base/icd1_prog.cpp
@@ -8,7 +8,7 @@
***************************************************************************/
#include "icd1_prog.h"
-#include <qdir.h>
+#include <tqdir.h>
#include "progs/base/prog_config.h"
#include "devices/list/device_list.h"
diff --git a/src/progs/icd1/base/icd1_prog.h b/src/progs/icd1/base/icd1_prog.h
index 721be49..5df72ab 100644
--- a/src/progs/icd1/base/icd1_prog.h
+++ b/src/progs/icd1/base/icd1_prog.h
@@ -22,6 +22,7 @@ class Hardware;
class ProgrammerBase : public Icd::ProgrammerBase
{
Q_OBJECT
+ TQ_OBJECT
public:
ProgrammerBase(const Programmer::Group &group, const Pic::Data *data)
: Icd::ProgrammerBase(group, data, "icd1_programmer_base") {}
@@ -40,9 +41,9 @@ private:
class Group : public Icd::Group
{
public:
- virtual QString name() const { return "icd1"; }
- virtual QString label() const { return i18n("ICD1 Programmer"); }
- virtual QString xmlName() const { return "icd1"; }
+ virtual TQString name() const { return "icd1"; }
+ virtual TQString label() const { return i18n("ICD1 Programmer"); }
+ virtual TQString xmlName() const { return "icd1"; }
virtual ::Programmer::Properties properties() const;
virtual ::Programmer::TargetPowerMode targetPowerMode() const { return ::Programmer::TargetExternallyPowered; }
virtual bool isPortSupported(PortType type) const { return ( type==PortType::Serial ); }
diff --git a/src/progs/icd1/base/icd1_serial.cpp b/src/progs/icd1/base/icd1_serial.cpp
index a506fdb..8d40697 100644
--- a/src/progs/icd1/base/icd1_serial.cpp
+++ b/src/progs/icd1/base/icd1_serial.cpp
@@ -9,13 +9,13 @@
***************************************************************************/
#include "icd1_serial.h"
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include "common/global/global.h"
#include "common/common/misc.h"
#include "common/common/number.h"
//-----------------------------------------------------------------------------
-Icd1::SerialPort::SerialPort(const QString &device, Log::Base &log)
+Icd1::SerialPort::SerialPort(const TQString &device, Log::Base &log)
: Port::Serial(device, NeedDrain | NeedFlush, log)
{}
@@ -41,7 +41,7 @@ bool Icd1::SerialPort::reset()
bool Icd1::SerialPort::synchronize()
{
if ( !setPinOn(RTS, false, Port::PositiveLogic) ) return false;
- QTime time;
+ TQTime time;
time.start();
for (;;) {
bool bit;
@@ -60,8 +60,8 @@ bool Icd1::SerialPort::sendCommand(uint cmd)
Q_ASSERT( cmd<=0xFFFF );
synchronize();
char c[7] = "$XXXX\r";
- QString cs = toHex(cmd, 4);
- log(Log::DebugLevel::Extra, QString("Send command: %1").arg(toPrintable(cs, PrintAlphaNum)));
+ TQString cs = toHex(cmd, 4);
+ log(Log::DebugLevel::Extra, TQString("Send command: %1").tqarg(toPrintable(cs, PrintAlphaNum)));
c[1] = cs[0].latin1();
c[2] = cs[1].latin1();
c[3] = cs[2].latin1();
diff --git a/src/progs/icd1/base/icd1_serial.h b/src/progs/icd1/base/icd1_serial.h
index e8d03da..e86dbaa 100644
--- a/src/progs/icd1/base/icd1_serial.h
+++ b/src/progs/icd1/base/icd1_serial.h
@@ -18,7 +18,7 @@ namespace Icd1
class SerialPort : public Port::Serial
{
public:
- SerialPort(const QString &portDevice, Log::Base &log);
+ SerialPort(const TQString &portDevice, Log::Base &log);
bool open();
bool reset();
bool synchronize();
diff --git a/src/progs/icd1/gui/icd1_group_ui.cpp b/src/progs/icd1/gui/icd1_group_ui.cpp
index 34f28d5..1ae73a3 100644
--- a/src/progs/icd1/gui/icd1_group_ui.cpp
+++ b/src/progs/icd1/gui/icd1_group_ui.cpp
@@ -13,13 +13,13 @@
#include "progs/icd1/base/icd1_prog.h"
//----------------------------------------------------------------------------
-Icd1::AdvancedDialog::AdvancedDialog(ProgrammerBase &base, QWidget *parent)
- : ::Programmer::PicAdvancedDialog(base, parent, "icd1_advanced_dialog")
+Icd1::AdvancedDialog::AdvancedDialog(ProgrammerBase &base, TQWidget *tqparent)
+ : ::Programmer::PicAdvancedDialog(base, tqparent, "icd1_advanced_dialog")
{
uint row = _selfTestContainer->numRows();
- QLabel *label = new QLabel(i18n("Result:"), _selfTestContainer);
+ TQLabel *label = new TQLabel(i18n("Result:"), _selfTestContainer);
_selfTestContainer->addWidget(label, row,row, 0,0);
- _selfTestLabel = new QLabel(_selfTestContainer);
+ _selfTestLabel = new TQLabel(_selfTestContainer);
_selfTestContainer->addWidget(_selfTestLabel, row,row, 1,1);
}
@@ -30,12 +30,12 @@ void Icd1::AdvancedDialog::updateDisplay()
}
//----------------------------------------------------------------------------
-::Programmer::ConfigWidget *Icd1::GroupUI::createConfigWidget(QWidget *parent) const
+::Programmer::ConfigWidget *Icd1::GroupUI::createConfigWidget(TQWidget *tqparent) const
{
- return new ::Programmer::ConfigWidget(static_cast<const Group &>(group()), parent);
+ return new ::Programmer::ConfigWidget(static_cast<const Group &>(group()), tqparent);
}
-::Programmer::AdvancedDialog *Icd1::GroupUI::createAdvancedDialog(::Programmer::Base &base, QWidget *parent) const
+::Programmer::AdvancedDialog *Icd1::GroupUI::createAdvancedDialog(::Programmer::Base &base, TQWidget *tqparent) const
{
- return new AdvancedDialog(static_cast<ProgrammerBase &>(base), parent);
+ return new AdvancedDialog(static_cast<ProgrammerBase &>(base), tqparent);
}
diff --git a/src/progs/icd1/gui/icd1_group_ui.h b/src/progs/icd1/gui/icd1_group_ui.h
index f60562a..c4f1c33 100644
--- a/src/progs/icd1/gui/icd1_group_ui.h
+++ b/src/progs/icd1/gui/icd1_group_ui.h
@@ -20,12 +20,13 @@ class Group;
class AdvancedDialog : public ::Programmer::PicAdvancedDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- AdvancedDialog(ProgrammerBase &base, QWidget *parent);
+ AdvancedDialog(ProgrammerBase &base, TQWidget *tqparent);
virtual void updateDisplay();
private:
- QLabel *_selfTestLabel;
+ TQLabel *_selfTestLabel;
ProgrammerBase &base() { return static_cast<ProgrammerBase &>(_base); }
};
@@ -33,9 +34,9 @@ private:
class GroupUI : public ::Programmer::GroupUI
{
public:
- virtual ::Programmer::ConfigWidget *createConfigWidget(QWidget *parent) const;
+ virtual ::Programmer::ConfigWidget *createConfigWidget(TQWidget *tqparent) const;
virtual bool hasAdvancedDialog() const { return true; }
- virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &base, QWidget *parent) const;
+ virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &base, TQWidget *tqparent) const;
};
} // namespace
diff --git a/src/progs/icd1/xml/xml_icd1_parser.cpp b/src/progs/icd1/xml/xml_icd1_parser.cpp
index e09f51c..3296134 100644
--- a/src/progs/icd1/xml/xml_icd1_parser.cpp
+++ b/src/progs/icd1/xml/xml_icd1_parser.cpp
@@ -19,18 +19,18 @@ public:
XmlToData() : Programmer::XmlToData<Data>("icd1", "Icd1") {}
private:
- virtual void parseData(QDomElement element, Data &data);
- virtual void outputData(const Data &data, QTextStream &s) const;
+ virtual void parseData(TQDomElement element, Data &data);
+ virtual void outputData(const Data &data, TQTextStream &s) const;
};
-void Icd1::XmlToData::parseData(QDomElement element, Data &data)
+void Icd1::XmlToData::parseData(TQDomElement element, Data &data)
{
bool ok;
data.part = fromHexLabel(element.attribute("family"), 2, &ok);
if ( !ok ) qFatal("Missing or malformed family attribute");
}
-void Icd1::XmlToData::outputData(const Data &data, QTextStream &s) const
+void Icd1::XmlToData::outputData(const Data &data, TQTextStream &s) const
{
s << toHexLabel(data.part, 2);
}
diff --git a/src/progs/icd2/base/icd.cpp b/src/progs/icd2/base/icd.cpp
index bfb1129..d458981 100644
--- a/src/progs/icd2/base/icd.cpp
+++ b/src/progs/icd2/base/icd.cpp
@@ -37,9 +37,9 @@ Device::Array Icd::DeviceSpecific::prepareRange(Pic::MemoryRangeType type, const
if ( wordOffset!=data.count() ) {
uint end = (force ? data.count() : findNonMaskEnd(type, data));
nbWords = end - wordOffset + 1;
- log(Log::DebugLevel::Normal, QString(" start=%1 nbWords=%2 total=%3 force=%4")
- .arg(toHexLabel(wordOffset, device().nbCharsAddress())).arg(toHexLabel(nbWords, device().nbCharsAddress()))
- .arg(toHexLabel(data.count(), device().nbCharsAddress())).arg(force ? "true" : "false"));
+ log(Log::DebugLevel::Normal, TQString(" start=%1 nbWords=%2 total=%3 force=%4")
+ .tqarg(toHexLabel(wordOffset, device().nbCharsAddress())).tqarg(toHexLabel(nbWords, device().nbCharsAddress()))
+ .tqarg(toHexLabel(data.count(), device().nbCharsAddress())).tqarg(force ? "true" : "false"));
}
_base.progressMonitor().addTaskProgress(data.count()-nbWords);
return data.mid(wordOffset, nbWords);
@@ -52,7 +52,7 @@ bool Icd::DeviceSpecific::doWrite(Pic::MemoryRangeType type, const Device::Array
uint nb = device().nbWordsWriteAlignment(Pic::MemoryRangeType::Code);
if ( device().architecture()==Pic::Architecture::P18J && type==Pic::MemoryRangeType::Config ) {
Q_ASSERT( data.count()%2==0 );
- int delta = nb - data.count()/2; // config memory words contains 1 byte
+ int delta = nb - data.count()/2; // config memory words tqcontains 1 byte
Q_ASSERT( delta>=0 );
Device::Array rdata(delta);
uint wordOffset = device().nbWords(Pic::MemoryRangeType::Code) - delta;
@@ -87,7 +87,7 @@ bool Icd::DeviceSpecific::doErase(bool)
{
if ( device().architecture()==Pic::Architecture::P18J ) { // ### also true for others ?
Device::Array data(device().nbWords(Pic::MemoryRangeType::Config));
- for (uint i=0; i<data.size(); i++) data[i] = device().config()._words[i].wmask;
+ for (uint i=0; i<data.size(); i++) data[i] = device().config()._words[i].wtqmask;
if ( !doWrite(Pic::MemoryRangeType::Config, data, true) ) return false;
}
return hardware().eraseAll();
diff --git a/src/progs/icd2/base/icd.h b/src/progs/icd2/base/icd.h
index 9a65755..0aa7208 100644
--- a/src/progs/icd2/base/icd.h
+++ b/src/progs/icd2/base/icd.h
@@ -20,7 +20,7 @@ namespace Icd
class Hardware : public ::Programmer::PicHardware
{
public:
- Hardware(::Programmer::Base &base, Port::Base *port) : ::Programmer::PicHardware(base, port, QString::null) {}
+ Hardware(::Programmer::Base &base, Port::Base *port) : ::Programmer::PicHardware(base, port, TQString()) {}
// initialization
virtual bool uploadFirmware(const Pic::Memory &memory) = 0;
virtual bool setTarget() = 0;
@@ -43,9 +43,9 @@ public:
virtual BitValue getProgramCounter() = 0;
protected:
- QString _rx;
- virtual bool internalConnect(const QString &mode) = 0;
- virtual QString receivedData() const = 0;
+ TQString _rx;
+ virtual bool internalConnect(const TQString &mode) = 0;
+ virtual TQString receivedData() const = 0;
virtual bool internalConnectHardware() { return internalConnect("U"); }
};
diff --git a/src/progs/icd2/base/icd2.cpp b/src/progs/icd2/base/icd2.cpp
index 375fc60..6765340 100644
--- a/src/progs/icd2/base/icd2.cpp
+++ b/src/progs/icd2/base/icd2.cpp
@@ -57,7 +57,7 @@ Icd2::TestData::TestData()
for (uint k=0; k<Nb_VoltageTypes; k++) _voltages[k] = -1;
}
-Icd2::TestData::TestData(const QString &rx)
+Icd2::TestData::TestData(const TQString &rx)
{
for (uint k=0; k<Nb_VoltageTypes; k++)
_voltages[k] = fromHex(rx.mid(5 + 2*k, 2), 0);
@@ -70,14 +70,14 @@ bool Icd2::TestData::pass() const
return true;
}
-QString Icd2::TestData::result(VoltageType type) const
+TQString Icd2::TestData::result(VoltageType type) const
{
for (uint i=0; i<=(::Programmer::Nb_ResultTypes); i++)
if ( _voltages[type]==RESULT_TYPE_VALUES[i] ) return i18n(::Programmer::RESULT_TYPE_LABELS[i]);
return toHex(_voltages[type], 2);
}
-QString Icd2::TestData::pretty(VoltageType type) const
+TQString Icd2::TestData::pretty(VoltageType type) const
{
return i18n(VOLTAGE_LABELS[type]) + "=" + result(type);
}
@@ -136,7 +136,7 @@ bool Icd2::Hardware::uploadFirmware(const Pic::Memory &memory)
if ( !internalConnect("V") ) return false;
log(Log::LineType::Information, " Uploading firmware to ICD2...");
uint start = 0x0004, size = 0x1BFB;
- QString cmd = "10" + toHex(start, 4) + toHex(size, 4);
+ TQString cmd = "10" + toHex(start, 4) + toHex(size, 4);
if ( !command(cmd, 0) ) return false;
uint nbBytesWord = memory.device().nbBytesWord(Pic::MemoryRangeType::Code); // should be 2 for 16F876
Device::Array data = memory.arrayForWriting(Pic::MemoryRangeType::Code);
@@ -151,7 +151,7 @@ bool Icd2::Hardware::setTarget()
log(Log::DebugLevel::Normal, " Set target");
// set target family
const Icd2::Data &d = data(device().name());
- if ( !command(QString("2A") + toHex(d.famid, 2), 0) ) return false;
+ if ( !command(TQString("2A") + toHex(d.famid, 2), 0) ) return false;
// set code range end
Address end = device().range(Pic::MemoryRangeType::Code).end;
if ( device().range(Pic::MemoryRangeType::Cal).start==end ) end += 1;
@@ -167,47 +167,47 @@ bool Icd2::Hardware::setup()
// ??
_port->send("$7F00\x0D", 6);
- QString s;
+ TQString s;
if ( !_port->receive(2, s) ) return false;
if ( s!="02" ) {
- log(Log::LineType::Error, i18n("Unexpected answer ($7F00) from ICD2 (%1).").arg(s));
+ log(Log::LineType::Error, i18n("Unexpected answer ($7F00) from ICD2 (%1).").tqarg(s));
return false;
}
// ??
if ( !command("08", 2) ) return false;
if ( _rx.mid(5, 2)!="00" ) {
- log(Log::LineType::Error, i18n("Unexpected answer (08) from ICD2 (%1).").arg(_rx));
+ log(Log::LineType::Error, i18n("Unexpected answer (08) from ICD2 (%1).").tqarg(_rx));
return false;
}
return !hasError();
}
-bool Icd2::Hardware::sendCommand(const QString &s)
+bool Icd2::Hardware::sendCommand(const TQString &s)
{
//format: <LLXX....CC>
- QString cs = s.upper();
- QString tx = "<";
+ TQString cs = s.upper();
+ TQString tx = "<";
tx += toHex(cs.length() + 6, 2);
tx += cs;
uchar chk = tx[1].latin1() + tx[2].latin1();
for (uint i=0; i<uint(s.length()); i++) chk += cs[i].latin1();
tx += toHex(chk, 2);
tx += '>';
- log(Log::DebugLevel::Extra, QString("send command: '%1'").arg(tx));
- QByteArray a = toAscii(tx);
+ log(Log::DebugLevel::Extra, TQString("send command: '%1'").tqarg(tx));
+ TQByteArray a = toAscii(tx);
return _port->send(a.data(), a.count());
}
-bool Icd2::Hardware::receiveResponse(const QString &command, uint responseSize, bool poll)
+bool Icd2::Hardware::receiveResponse(const TQString &command, uint responseSize, bool poll)
{
// format: [LLXX...CC]
uint size = responseSize + 8;
if ( poll && _port->type()==PortType::USB ) {
if ( !static_cast<USBPort *>(_port)->poll(size, _rx) ) return false;
} else if ( !_port->receive(size, _rx, 180000) ) return false; // is 3 minutes enough ?? (we should really have an abort button here...)
- log(Log::DebugLevel::Extra, QString("received answer: '%1'").arg(_rx));
+ log(Log::DebugLevel::Extra, TQString("received answer: '%1'").tqarg(_rx));
if ( size!=fromHex(_rx.mid(1, 2), 0) ) {
log(Log::LineType::Error, i18n("Received length too short."));
return false;
@@ -217,12 +217,12 @@ bool Icd2::Hardware::receiveResponse(const QString &command, uint responseSize,
return false;
}
if ( _rx[0]!='[' || _rx[size-1]!=']' ) {
- log(Log::LineType::Error, i18n("Malformed string received \"%1\"").arg(_rx));
+ log(Log::LineType::Error, i18n("Malformed string received \"%1\"").tqarg(_rx));
return false;
}
if ( command.mid(0, 2)!=_rx.mid(3, 2) ) {
log(Log::LineType::Error, i18n("Wrong return value (\"%1\"; was expecting \"%2\")")
- .arg(_rx.mid(3, 2)).arg(command.mid(0, 2)));
+ .tqarg(_rx.mid(3, 2)).tqarg(command.mid(0, 2)));
return false;
}
// verify the checksum
@@ -235,7 +235,7 @@ bool Icd2::Hardware::receiveResponse(const QString &command, uint responseSize,
return true;
}
-bool Icd2::Hardware::command(const QString &command, uint responseSize)
+bool Icd2::Hardware::command(const TQString &command, uint responseSize)
{
if ( hasError() ) return false;
if ( !sendCommand(command) ) return false;
@@ -265,7 +265,7 @@ bool Icd2::Hardware::getDebugExecVersion(VersionData &version)
bool Icd2::Hardware::setTargetPowerOn(bool on)
{
- return command(QString("05") + (on ? "FF" : "00"), 0);
+ return command(TQString("05") + (on ? "FF" : "00"), 0);
}
bool Icd2::Hardware::readVoltage(Pic::VoltageType type, double &value)
@@ -299,7 +299,7 @@ bool Icd2::Hardware::getTargetMode(Pic::TargetMode &tmode)
bool Icd2::Hardware::setTargetReset(Pic::ResetMode mode)
{
- return command(QString("33") + RESET_MODE_VALUES[mode], 0);
+ return command(TQString("33") + RESET_MODE_VALUES[mode], 0);
}
bool Icd2::Hardware::selfTest(TestData &test)
@@ -314,12 +314,12 @@ bool Icd2::Hardware::readBlock(uint nbBytesWord, uint nbWords, Device::Array &da
//qDebug("readBlock %i %s", nbBytesWord, toHex(nbWords, 8).data());
// receive data
uint length = 2*nbBytesWord*nbWords+4;
- QString s;
+ TQString s;
uint i = 0;
while ( i<length ) {
uint maxSize = (_port->type()==PortType::Serial ? 2*nbBytesWord : 0x100);
- uint size = QMIN(maxSize, length-i);
- QString tmp;
+ uint size = TQMIN(maxSize, length-i);
+ TQString tmp;
if ( _port->type()==PortType::USB ) {
if ( !static_cast<USBPort *>(_port)->dataReceive(size, tmp) ) return false;
} else if ( !_port->receive(size, tmp) ) return false;
@@ -334,9 +334,9 @@ bool Icd2::Hardware::readBlock(uint nbBytesWord, uint nbWords, Device::Array &da
}
log(Log::DebugLevel::Max, "received: " + s);
data.resize(nbWords);
- Q_UINT8 chk = 0;
+ TQ_UINT8 chk = 0;
for (uint i=0; i<nbWords; i++) {
- QString ts = s.mid(1+2*nbBytesWord*i, 2*nbBytesWord);
+ TQString ts = s.mid(1+2*nbBytesWord*i, 2*nbBytesWord);
//if ( i<10 ) qDebug("%i: %s", i, ts.data());
data[i] = 0;
for (int k=nbBytesWord-1; k>=0; k--) {
@@ -346,9 +346,9 @@ bool Icd2::Hardware::readBlock(uint nbBytesWord, uint nbWords, Device::Array &da
}
}
- QString cs = s.mid(s.length()-3, 2);
+ TQString cs = s.mid(s.length()-3, 2);
if ( chk!=fromHex(cs, 0) ) {
- log(Log::LineType::Error, i18n("Bad checksum for read block: %1 (%2 expected).").arg(cs).arg(toHex(chk, 2)));
+ log(Log::LineType::Error, i18n("Bad checksum for read block: %1 (%2 expected).").tqarg(cs).tqarg(toHex(chk, 2)));
return false;
}
return true;
@@ -369,10 +369,10 @@ bool Icd2::Hardware::readMemory(Pic::MemoryRangeType type, uint wordOffset,
//qDebug("read size=%s div=%i nbBytes=%i", toHex(size, 8).data(), div, nbBytesWord);
data.resize(0);
do {
- uint size = QMIN(todo, uint(0x1000)); // addresses
+ uint size = TQMIN(todo, uint(0x1000)); // addresses
uint nb = size / inc; // word
//qDebug("read %s start=%s size=%s", Pic::MEMORY_RANGE_TYPE_DATA[type].label, toHex(start+offset, 8).data(), toHex(nb, 8).data());
- QString cmd = r + toHex(start+offset, 8) + toHex(nb/div, 8);
+ TQString cmd = r + toHex(start+offset, 8) + toHex(nb/div, 8);
if ( !command(cmd, 0) ) return false;
Device::Array pdata;
if ( !readBlock(nbBytesWord, nb, pdata) ) return false;
@@ -392,13 +392,13 @@ bool Icd2::Hardware::readMemory(Pic::MemoryRangeType type, uint wordOffset,
bool Icd2::Hardware::writeBlock(uint nbBytesWord, const Device::Array &data, uint wordIndex, uint nbWords)
{
- log(Log::DebugLevel::Extra, QString("writeBlock offset:%1 nbWords:%2 (size: %3)").arg(toHex(wordIndex, 8)).arg(toHex(nbWords, 8)).arg(toHex(data.size(), 8)));
+ log(Log::DebugLevel::Extra, TQString("writeBlock offset:%1 nbWords:%2 (size: %3)").tqarg(toHex(wordIndex, 8)).tqarg(toHex(nbWords, 8)).tqarg(toHex(data.size(), 8)));
Q_ASSERT( wordIndex+nbWords<=data.size() );
// prepare data
- QString s = "{";
+ TQString s = "{";
uchar chk = 0;
for (uint i=0; i<nbWords; i++) {
- QString ts = toHex(data[wordIndex+i], 2*nbBytesWord);
+ TQString ts = toHex(data[wordIndex+i], 2*nbBytesWord);
for (int k=nbBytesWord-1; k>=0; k--) {
//if ( i<10 || i>=nbWords-10 ) qDebug("send: %i-%i %s", i, k, ts.mid(2*k, 2).data());
s += ts.mid(2*k, 2);
@@ -414,8 +414,8 @@ bool Icd2::Hardware::writeBlock(uint nbBytesWord, const Device::Array &data, uin
while ( i<uint(s.length()) ) {
uint maxSize = (_port->description().type==PortType::Serial ? 2*nbBytesWord : 0x100);
if ( _port->description().type==PortType::Serial && i==0 ) maxSize = 1;
- uint size = QMIN(maxSize, s.length()-i);
- QByteArray a = toAscii(s);
+ uint size = TQMIN(maxSize, s.length()-i);
+ TQByteArray a = toAscii(s);
if ( _port->type()==PortType::USB ) {
if ( !static_cast<USBPort *>(_port)->dataSend(a.data()+i, size) ) return false;
} else if ( !_port->send(a.data()+i, size) ) return false;
@@ -441,10 +441,10 @@ bool Icd2::Hardware::writeMemory(Pic::MemoryRangeType type, uint wordOffset, con
uint index = 0;
//qDebug("write todo=%s div=%i nbBytes=%i dataSize=%i", toHex(todo, 8).data(), div, nbBytesWord, data.size());
do {
- uint size = QMIN(todo, uint(0x1000)); // address
+ uint size = TQMIN(todo, uint(0x1000)); // address
uint nb = size / inc; // word
//qDebug("write %s start=%s nbWords=%s", Pic::MEMORY_RANGE_TYPE_DATA[type].label, toHex(start+offset, 8).data(), toHex(nb, 8).data());
- QString cmd = w + toHex(start+offset+index, 8) + toHex(nb/div, 8);
+ TQString cmd = w + toHex(start+offset+index, 8) + toHex(nb/div, 8);
if ( !command(cmd, 0) ) return false;
if ( !writeBlock(nbBytesWord, data, index/inc, nb) ) return false;
if ( !receiveResponse(cmd, 0, false) ) return false;
@@ -482,12 +482,12 @@ bool Icd2::Hardware::resumeRun()
bool Icd2::Hardware::setWriteMode(Pic::WriteMode mode)
{
- return command(QString("4B") + WRITE_MODE_VALUES[mode], 0);
+ return command(TQString("4B") + WRITE_MODE_VALUES[mode], 0);
}
bool Icd2::Hardware::writeRegister(Address address, BitValue value, uint nbBytes)
{
- QString cmd = "1B" + toHex(address, 8) + toHex(nbBytes, 8);
+ TQString cmd = "1B" + toHex(address, 8) + toHex(nbBytes, 8);
if ( !command(cmd, 0) ) return false;
Device::Array data(nbBytes);
for (uint i=0; i<nbBytes; i++) data[nbBytes-i-1] = value.byte(i);
@@ -497,7 +497,7 @@ bool Icd2::Hardware::writeRegister(Address address, BitValue value, uint nbBytes
bool Icd2::Hardware::readRegister(Address address, BitValue &value, uint nbBytes)
{
- QString cmd = "1E" + toHex(address, 8) + toHex(nbBytes, 8);
+ TQString cmd = "1E" + toHex(address, 8) + toHex(nbBytes, 8);
if ( !command(cmd, 0) ) return false;
Device::Array data;
if ( !readBlock(1, nbBytes, data) ) return false;
diff --git a/src/progs/icd2/base/icd2.h b/src/progs/icd2/base/icd2.h
index 1c9c1b9..8200f1b 100644
--- a/src/progs/icd2/base/icd2.h
+++ b/src/progs/icd2/base/icd2.h
@@ -21,12 +21,12 @@ namespace Icd2
class TestData {
public:
TestData();
- TestData(const QString &rx);
+ TestData(const TQString &rx);
enum VoltageType { TargetVdd = 0, ModuleVpp, MclrGround, MclrVdd, MclrVpp,
Nb_VoltageTypes };
bool pass() const;
- QString result(VoltageType type) const;
- QString pretty(VoltageType type) const;
+ TQString result(VoltageType type) const;
+ TQString pretty(VoltageType type) const;
static const char * const VOLTAGE_LABELS[Nb_VoltageTypes];
private:
@@ -39,7 +39,7 @@ class Hardware : public Icd::Hardware
{
public:
Hardware(::Programmer::Base &base, Port::Base *port) : Icd::Hardware(base, port) {}
- bool command(const QString &command, uint responseSize);
+ bool command(const TQString &command, uint responseSize);
// initialization
virtual bool uploadFirmware(const Pic::Memory &memory);
@@ -72,7 +72,7 @@ public:
virtual BitValue getProgramCounter();
protected:
- virtual QString receivedData() const { return _rx.mid(5, _rx.length()-8); }
+ virtual TQString receivedData() const { return _rx.mid(5, _rx.length()-8); }
private:
struct VoltageTypeData {
@@ -82,8 +82,8 @@ private:
static const VoltageTypeData VOLTAGE_TYPE_DATA[Pic::Nb_VoltageTypes];
static const char * const WRITE_MODE_VALUES[Pic::Nb_WriteModes];
- bool sendCommand(const QString &command);
- bool receiveResponse(const QString &command, uint responseSize, bool poll);
+ bool sendCommand(const TQString &command);
+ bool receiveResponse(const TQString &command, uint responseSize, bool poll);
bool readBlock(uint nbBytesWord, uint nbWords, Device::Array &data);
bool writeBlock(uint nbBytesWord, const Device::Array &data, uint wordOffset, uint nbWords);
const char *readCommand(Pic::MemoryRangeType type) const;
diff --git a/src/progs/icd2/base/icd2_data.h b/src/progs/icd2/base/icd2_data.h
index ceda394..5bf972f 100644
--- a/src/progs/icd2/base/icd2_data.h
+++ b/src/progs/icd2/base/icd2_data.h
@@ -35,8 +35,8 @@ namespace Icd2
uint famid;
::Group::Support debugSupport;
};
- extern const Data &data(const QString &device);
- extern uint family(const QString &device);
+ extern const Data &data(const TQString &device);
+ extern uint family(const TQString &device);
} // namespace
#endif
diff --git a/src/progs/icd2/base/icd2_debug.cpp b/src/progs/icd2/base/icd2_debug.cpp
index 62f6404..ba10a4d 100644
--- a/src/progs/icd2/base/icd2_debug.cpp
+++ b/src/progs/icd2/base/icd2_debug.cpp
@@ -26,8 +26,8 @@ bool Icd2::Debugger::waitForTargetMode(Pic::TargetMode mode)
if ( rmode==mode ) return true;
Port::msleep(200);
}
- log(Log::LineType::Error, QString("Timeout waiting for mode: %1 (target is in mode: %2).")
- .arg(i18n(Pic::TARGET_MODE_LABELS[mode])).arg(i18n(Pic::TARGET_MODE_LABELS[rmode])));
+ log(Log::LineType::Error, TQString("Timeout waiting for mode: %1 (target is in mode: %2).")
+ .tqarg(i18n(Pic::TARGET_MODE_LABELS[mode])).tqarg(i18n(Pic::TARGET_MODE_LABELS[rmode])));
return false;
}
@@ -55,11 +55,11 @@ bool Icd2::Debugger::updateState()
return true;
}
-bool Icd2::Debugger::setBreakpoints(const QValueList<Address> &addresses)
+bool Icd2::Debugger::setBreakpoints(const TQValueList<Address> &addresses)
{
if ( addresses.count()==0 ) return specific()->setBreakpoint(Address());
for (uint i=0; i<uint(addresses.count()); i++) {
- log(Log::DebugLevel::Normal, QString("Set breakpoint at %1").arg(toHexLabel(addresses[i], device()->nbCharsAddress())));
+ log(Log::DebugLevel::Normal, TQString("Set breakpoint at %1").tqarg(toHexLabel(addresses[i], device()->nbCharsAddress())));
if ( !specific()->setBreakpoint(addresses[i]) ) return false;
}
return true;
@@ -97,14 +97,14 @@ bool Icd2::Debugger::readRegister(const Register::TypeData &data, BitValue &valu
{
if ( data.type()==Register::Special ) {
if ( data.name()=="WREG" ) return hardware()->readRegister(specific()->addressWREG(), value, 1);
- if ( data.name()=="PC" ) { value = hardware()->getProgramCounter().maskWith(specific()->maskPC()); return !hasError(); }
+ if ( data.name()=="PC" ) { value = hardware()->getProgramCounter().tqmaskWith(specific()->tqmaskPC()); return !hasError(); }
Q_ASSERT(false);
return true;
}
- QString name = device()->registersData().sfrNames[data.address()];
+ TQString name = device()->registersData().sfrNames[data.address()];
if ( name=="WREG" ) return hardware()->readRegister(specific()->addressWREG(), value, 1);
- if ( name=="PCL" ) { value = hardware()->getProgramCounter().maskWith(specific()->maskPC()).byte(0); return !hasError(); }
- if ( name=="PCLATH" ) { value = hardware()->getProgramCounter().maskWith(specific()->maskPC()).byte(1); return !hasError(); }
+ if ( name=="PCL" ) { value = hardware()->getProgramCounter().tqmaskWith(specific()->tqmaskPC()).byte(0); return !hasError(); }
+ if ( name=="PCLATH" ) { value = hardware()->getProgramCounter().tqmaskWith(specific()->tqmaskPC()).byte(1); return !hasError(); }
return hardware()->readRegister(specific()->addressRegister(data.address()), value, 1);
}
@@ -115,7 +115,7 @@ bool Icd2::Debugger::writeRegister(const Register::TypeData &data, BitValue valu
Q_ASSERT(false);
return true;
}
- QString name = device()->registersData().sfrNames[data.address()];
+ TQString name = device()->registersData().sfrNames[data.address()];
if ( name=="WREG" ) return hardware()->writeRegister(specific()->addressWREG(), value, 1);
return hardware()->writeRegister(specific()->addressRegister(data.address()), value, 1);
}
@@ -143,29 +143,29 @@ bool Icd2::DebugProgrammer::internalSetupHardware()
return false;
}
uint reservedBank = 0;
- QString filename;
+ TQString filename;
if ( device()->is18Family() ) {
Debugger *debug = static_cast<Debugger *>(debugger());
reservedBank = static_cast<const P18FDebuggerSpecific *>(debug->specific())->reservedBank();
- filename = QString("de18F_BANK%1.hex").arg(QString(toString(NumberBase::Dec, reservedBank, 2)));
- } else filename = QString("de%1.hex").arg(fdata.debugExec);
+ filename = TQString("de18F_BANK%1.hex").tqarg(TQString(toString(NumberBase::Dec, reservedBank, 2)));
+ } else filename = TQString("de%1.hex").tqarg(fdata.debugExec);
PURL::Url url = dir.findMatchingFilename(filename);
- log(Log::DebugLevel::Normal, QString(" Debug executive file: %1").arg(url.pretty()));
+ log(Log::DebugLevel::Normal, TQString(" Debug executive file: %1").tqarg(url.pretty()));
if ( !url.exists() ) {
- log(Log::LineType::Error, i18n("Could not find debug executive file \"%1\".").arg(url.pretty()));
+ log(Log::LineType::Error, i18n("Could not find debug executive file \"%1\".").tqarg(url.pretty()));
return false;
}
// upload hex file
Log::StringView sview;
PURL::File file(url, sview);
if ( !file.openForRead() ) {
- log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").arg(url.pretty()));
+ log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").tqarg(url.pretty()));
return false;
}
- QStringList errors;
+ TQStringList errors;
HexBuffer hbuffer;
if ( !hbuffer.load(file.stream(), errors) ) {
- log(Log::LineType::Error, i18n("Could not read debug executive file \"%1\": %2.").arg(url.pretty()).arg(errors[0]));
+ log(Log::LineType::Error, i18n("Could not read debug executive file \"%1\": %2.").tqarg(url.pretty()).tqarg(errors[0]));
return false;
}
uint nbWords = device()->nbWords(Pic::MemoryRangeType::Code);
@@ -173,8 +173,8 @@ bool Icd2::DebugProgrammer::internalSetupHardware()
if ( fdata.debugExecOffset!=0 && fdata.debugExecOffset!=offset )
for (uint i=0; i<0x100; i++) hbuffer.insert(offset+i, hbuffer[fdata.debugExecOffset+i]);
Pic::Memory::WarningTypes warningTypes;
- QStringList warnings;
- QMap<uint, bool> inRange;
+ TQStringList warnings;
+ TQMap<uint, bool> inRange;
Pic::Memory memory(*device());
memory.fromHexBuffer(Pic::MemoryRangeType::Code, hbuffer, warningTypes, warnings, inRange);
_deArray = memory.arrayForWriting(Pic::MemoryRangeType::Code);
@@ -199,7 +199,7 @@ bool Icd2::DebugProgrammer::internalSetupHardware()
_deStart = specific()->findNonMaskStart(Pic::MemoryRangeType::Code, _deArray);
_deEnd = specific()->findNonMaskEnd(Pic::MemoryRangeType::Code, _deArray);
}
- log(Log::DebugLevel::Extra, QString("debug executive: \"%1\" %2:%3").arg(url.pretty()).arg(toHexLabel(_deStart, 4)).arg(toHexLabel(_deEnd, 4)));
+ log(Log::DebugLevel::Extra, TQString("debug executive: \"%1\" %2:%3").tqarg(url.pretty()).tqarg(toHexLabel(_deStart, 4)).tqarg(toHexLabel(_deEnd, 4)));
return Icd2::ProgrammerBase::internalSetupHardware();
}
@@ -251,9 +251,9 @@ bool Icd2::DebugProgrammer::writeDebugExecutive()
uint inc = device()->addressIncrement(Pic::MemoryRangeType::Code);
Address address = device()->range(Pic::MemoryRangeType::Code).start + inc * (_deStart + i);
log(Log::LineType::Error, i18n("Device memory doesn't match debug executive (at address %1: reading %2 and expecting %3).")
- .arg(toHexLabel(address, device()->nbCharsAddress()))
- .arg(toHexLabel(data[i], device()->nbCharsWord(Pic::MemoryRangeType::Code)))
- .arg(toHexLabel(_deArray[_deStart+i], device()->nbCharsWord(Pic::MemoryRangeType::Code))));
+ .tqarg(toHexLabel(address, device()->nbCharsAddress()))
+ .tqarg(toHexLabel(data[i], device()->nbCharsWord(Pic::MemoryRangeType::Code)))
+ .tqarg(toHexLabel(_deArray[_deStart+i], device()->nbCharsWord(Pic::MemoryRangeType::Code))));
return false;
}
return true;
@@ -265,7 +265,7 @@ bool Icd2::DebugProgrammer::doProgram(const Device::Memory &memory, const Device
if ( !doConnectDevice() ) return false;
_progressMonitor.startNextTask();
// probably needed for all devices that don't have a "erase and write" mode
- if ( range.all() && FAMILY_DATA[family(device()->name())].debugExec==QString("16F7X7") ) {
+ if ( range.all() && FAMILY_DATA[family(device()->name())].debugExec==TQString("16F7X7") ) {
Pic::Memory dmemory(*device());
dmemory.setWord(Pic::MemoryRangeType::Code, 0, 0x0028);
dmemory.setWord(Pic::MemoryRangeType::Code, 1, 0x0030);
@@ -290,7 +290,7 @@ bool Icd2::DebugProgrammer::programAll(const Pic::Memory &mem)
if ( !programAndVerifyRange(Pic::MemoryRangeType::UserId, memory) ) return false;
if ( device()->is18Family() ) {
if ( !hardware()->command("0C00", 0) ) return false; // #### ??
- QString com = "42" + toHex(0xFB5, 8) + toHex(1, 8); // write RSBUG (?)
+ TQString com = "42" + toHex(0xFB5, 8) + toHex(1, 8); // write RSBUG (?)
if ( !hardware()->command(com, 0) ) return false;
if ( !hardware()->command("0C01", 0) ) return false; // #### ??
}
@@ -311,12 +311,12 @@ bool Icd2::DebugProgrammer::internalRead(Device::Memory *mem, const Device::Memo
bool Icd2::DebugProgrammer::readDebugExecutiveVersion()
{
if ( !hardware()->getDebugExecVersion(_debugExecutiveVersion) ) return false;
- log(Log::LineType::Information, i18n(" Debug executive version: %1").arg(_debugExecutiveVersion.pretty()));
+ log(Log::LineType::Information, i18n(" Debug executive version: %1").tqarg(_debugExecutiveVersion.pretty()));
return true;
}
//----------------------------------------------------------------------------
-void Icd2::DebuggerGroup::addDevice(const QString &name, const Device::Data *ddata, ::Group::Support)
+void Icd2::DebuggerGroup::addDevice(const TQString &name, const Device::Data *ddata, ::Group::Support)
{
if ( FAMILY_DATA[family(name)].debugExec==0 ) return;
Group::addDevice(name, ddata, data(name).debugSupport);
@@ -326,7 +326,7 @@ void Icd2::DebuggerGroup::addDevice(const QString &name, const Device::Data *dda
{
const Pic::Data *data = static_cast< ::Debugger::PicBase &>(base).device();
if ( data==0 ) return 0;
- QString debugExec = FAMILY_DATA[family(data->name())].debugExec;
+ TQString debugExec = FAMILY_DATA[family(data->name())].debugExec;
switch (data->architecture().type()) {
case Pic::Architecture::P16X:
if ( debugExec=="16F872" ) return new P16F872DebuggerSpecific(base);
diff --git a/src/progs/icd2/base/icd2_debug.h b/src/progs/icd2/base/icd2_debug.h
index bd2a6fe..7042a22 100644
--- a/src/progs/icd2/base/icd2_debug.h
+++ b/src/progs/icd2/base/icd2_debug.h
@@ -20,6 +20,7 @@ class DebuggerSpecific;
class DebugProgrammer : public ProgrammerBase
{
Q_OBJECT
+ TQ_OBJECT
public:
DebugProgrammer(const ::Programmer::Group &group, const Pic::Data *data);
bool readDebugExecutiveVersion();
@@ -46,7 +47,7 @@ class Debugger : public ::Debugger::PicBase
{
public:
Debugger(DebugProgrammer &programmer) : ::Debugger::PicBase(programmer) {}
- virtual bool setBreakpoints(const QValueList<Address> &addresses);
+ virtual bool setBreakpoints(const TQValueList<Address> &addresses);
Hardware *hardware() { return static_cast<Hardware *>(_programmer.hardware()); }
DebugProgrammer &programmer() { return static_cast<DebugProgrammer &>(_programmer); }
DebuggerSpecific *specific();
@@ -72,13 +73,13 @@ private:
class DebuggerGroup : public Group
{
public:
- virtual QString name() const { return "icd2_debugger"; }
- virtual QString label() const { return i18n("ICD2 Debugger"); }
+ virtual TQString name() const { return "icd2_debugger"; }
+ virtual TQString label() const { return i18n("ICD2 Debugger"); }
virtual ::Programmer::Properties properties() const { return Group::properties() | ::Programmer::Debugger; }
virtual uint maxNbBreakpoints(const Device::Data *) const { return 1; }
protected:
- virtual void addDevice(const QString &name, const Device::Data *data, ::Group::Support support);
+ virtual void addDevice(const TQString &name, const Device::Data *data, ::Group::Support support);
virtual ::Programmer::Base *createBase(const Device::Data *data) const { return new DebugProgrammer(*this, static_cast<const Pic::Data *>(data)); }
virtual ::Debugger::Base *createDebuggerBase(::Programmer::Base &base) const { return new Debugger(static_cast<DebugProgrammer &>(base)); }
virtual ::Debugger::Specific *createDebuggerSpecific(::Debugger::Base &base) const;
diff --git a/src/progs/icd2/base/icd2_debug_specific.cpp b/src/progs/icd2/base/icd2_debug_specific.cpp
index 56cc178..61bc373 100644
--- a/src/progs/icd2/base/icd2_debug_specific.cpp
+++ b/src/progs/icd2/base/icd2_debug_specific.cpp
@@ -19,7 +19,7 @@ Address Icd2::P16FDebuggerSpecific::addressWREG() const
Address Icd2::P16FDebuggerSpecific::addressRegister(Address address) const
{
- QString name = device()->registersData().sfrNames[address];
+ TQString name = device()->registersData().sfrNames[address];
if ( name=="FSR" ) return FAMILY_DATA[family(device()->name())].fsr;
if ( name=="STATUS" ) return FAMILY_DATA[family(device()->name())].status;
return address;
@@ -41,7 +41,7 @@ bool Icd2::P16FDebuggerSpecific::setBreakpoint(Address address)
bool Icd2::P16FDebuggerSpecific::readBreakpoint(BitValue &value)
{
if ( !hardware()->readRegister(0x18E, value, 2) ) return false;
- value = value.maskWith(0x1FFF);
+ value = value.tqmaskWith(0x1FFF);
return true;
}
@@ -50,7 +50,7 @@ bool Icd2::P16FDebuggerSpecific::beginInit(Device::Array *saved)
if ( !hardware()->setTargetReset(Pic::ResetHeld) ) return false;
double vdd;
if ( !hardware()->readVoltage(Pic::TargetVdd, vdd) ) return false;
- log(Log::DebugLevel::Normal, QString(" Target Vdd: %1 V").arg(vdd));
+ log(Log::DebugLevel::Normal, TQString(" Target Vdd: %1 V").tqarg(vdd));
if (saved) {
saved->resize(1);
@@ -73,14 +73,14 @@ bool Icd2::P16FDebuggerSpecific::endInit(BitValue expectedPC)
//log(Log::LineType::Information, i18n("Detected custom ICD2"));
}
if ( value!=expectedPC ) {
- log(Log::LineType::Error, i18n(" PC is not at address %1 (%2)").arg(toHexLabel(expectedPC, 4)).arg(toHexLabel(value, 4)));
+ log(Log::LineType::Error, i18n(" PC is not at address %1 (%2)").tqarg(toHexLabel(expectedPC, 4)).tqarg(toHexLabel(value, 4)));
return false;
}
if ( !setBreakpoint(0x0000) ) return false;
if ( !base().update() ) return false;
if ( base().pc()!=expectedPC ) {
- log(Log::LineType::Error, i18n(" PC is not at address %1 (%2)").arg(toHexLabel(expectedPC, 4)).arg(toHexLabel(base().pc(), 4)));
+ log(Log::LineType::Error, i18n(" PC is not at address %1 (%2)").tqarg(toHexLabel(expectedPC, 4)).tqarg(toHexLabel(base().pc(), 4)));
return false;
}
return true;
@@ -163,7 +163,7 @@ bool Icd2::P16F7X7DebuggerSpecific::init(bool last)
log(Log::DebugLevel::Normal, "Probably detected custom ICD2");
}
if ( value!=expectedPC )
- log(Log::DebugLevel::Normal, i18n(" PC is not at address %1 (%2)").arg(toHexLabel(expectedPC, 4)).arg(toHexLabel(value, 4)));
+ log(Log::DebugLevel::Normal, i18n(" PC is not at address %1 (%2)").tqarg(toHexLabel(expectedPC, 4)).tqarg(toHexLabel(value, 4)));
if ( !setBreakpoint(0x0000) ) return false;
if ( !base().update() ) return false;
@@ -205,7 +205,7 @@ Address Icd2::P18FDebuggerSpecific::addressWREG()const
Address Icd2::P18FDebuggerSpecific::addressRegister(Address address) const
{
- QString name = device()->registersData().sfrNames[address];
+ TQString name = device()->registersData().sfrNames[address];
if ( name=="PCLATU" ) return reservedRegisterOffset() | 0x0F4;
if ( name=="PCLATH" ) return reservedRegisterOffset() | 0x0F5;
if ( name=="FSR0H" ) return reservedRegisterOffset() | 0x0FB;
@@ -241,7 +241,7 @@ bool Icd2::P18FDebuggerSpecific::reset()
log(Log::LineType::Information, i18n("Detected custom ICD2"));
}
if ( base().pc()!=expectedPC ) {
- log(Log::LineType::Error, i18n(" PC is not at address %1 (%2)").arg(toHexLabel(expectedPC, 4)).arg(toHexLabel(base().pc(), 4)));
+ log(Log::LineType::Error, i18n(" PC is not at address %1 (%2)").tqarg(toHexLabel(expectedPC, 4)).tqarg(toHexLabel(base().pc(), 4)));
return false;
}
return true;
diff --git a/src/progs/icd2/base/icd2_debug_specific.h b/src/progs/icd2/base/icd2_debug_specific.h
index d14887b..830ab0f 100644
--- a/src/progs/icd2/base/icd2_debug_specific.h
+++ b/src/progs/icd2/base/icd2_debug_specific.h
@@ -25,7 +25,7 @@ public:
DebugProgrammer &programmer() { return base().programmer(); }
::Debugger::PicSpecific *deviceSpecific() { return base().deviceSpecific(); }
virtual Address addressWREG() const = 0;
- virtual BitValue maskPC() const = 0;
+ virtual BitValue tqmaskPC() const = 0;
virtual Address addressRegister(Address address) const = 0;
virtual bool setBreakpoint(Address address) = 0;
virtual bool readBreakpoint(BitValue &value) = 0;
@@ -42,7 +42,7 @@ public:
virtual BitValue writeMaskBreakpointRegister() const { return 0x8000; }
virtual BitValue readMaskBreakpointRegister() const { return 0x1FFF; }
virtual Address addressWREG() const;
- virtual BitValue maskPC() const { return 0x1FFF; }
+ virtual BitValue tqmaskPC() const { return 0x1FFF; }
virtual Address addressRegister(Address address) const;
virtual bool setBreakpoint(Address address);
virtual bool readBreakpoint(BitValue &value);
@@ -80,7 +80,7 @@ class P18FDebuggerSpecific : public DebuggerSpecific
public:
P18FDebuggerSpecific(::Debugger::Base &base);
virtual Address addressWREG() const;
- virtual BitValue maskPC() const { return 0xFFFF; }
+ virtual BitValue tqmaskPC() const { return 0xFFFF; }
virtual Address addressRegister(Address address) const;
virtual bool setBreakpoint(Address address);
virtual bool readBreakpoint(BitValue &value);
diff --git a/src/progs/icd2/base/icd2_prog.cpp b/src/progs/icd2/base/icd2_prog.cpp
index 7b2a59b..dbea1d3 100644
--- a/src/progs/icd2/base/icd2_prog.cpp
+++ b/src/progs/icd2/base/icd2_prog.cpp
@@ -47,13 +47,13 @@ bool Icd2::ProgrammerBase::selfTest(bool ask)
log(Log::DebugLevel::Normal, " Self-test");
if ( !hardware()->selfTest(_testData) ) return false;
if ( !_testData.pass() ) {
- QString s;
+ TQString s;
for (uint i=0; i<TestData::Nb_VoltageTypes; i++) {
if ( i!=0 ) s += "; ";
s += _testData.pretty(TestData::VoltageType(i));
}
- log(Log::LineType::Warning, i18n("Self-test failed: %1").arg(s));
- if ( ask && !askContinue(i18n("Self-test failed (%1). Do you want to continue anyway?").arg(s)) ) {
+ log(Log::LineType::Warning, i18n("Self-test failed: %1").tqarg(s));
+ if ( ask && !askContinue(i18n("Self-test failed (%1). Do you want to continue anyway?").tqarg(s)) ) {
logUserAbort();
return false;
}
@@ -77,27 +77,27 @@ VersionData Icd2::ProgrammerBase::mplabVersion(::Programmer::FirmwareVersionType
bool Icd2::ProgrammerBase::setupFirmware()
{
const FamilyData &fdata = FAMILY_DATA[family(device()->name())];
- log(Log::DebugLevel::Normal, QString(" Firmware id is %1 and we want %2").arg(_firmwareId).arg(fdata.efid));
+ log(Log::DebugLevel::Normal, TQString(" Firmware id is %1 and we want %2").tqarg(_firmwareId).tqarg(fdata.efid));
if ( fdata.efid==_firmwareId ) return true;
log(Log::LineType::Information, i18n(" Incorrect firmware loaded."));
// find firmware file
PURL::Directory dir = firmwareDirectory();
if ( dir.isEmpty() ) return false;
- QString nameFilter = "ICD" + QString::number(fdata.efid).rightJustify(2, '0') + "??????.hex";
- QStringList files = dir.files(nameFilter);
+ TQString nameFilter = "ICD" + TQString::number(fdata.efid).rightJustify(2, '0') + "??????.hex";
+ TQStringList files = dir.files(nameFilter);
if ( files.isEmpty() ) {
- log(Log::LineType::Error, i18n("Could not find firmware file \"%1\" in directory \"%2\".").arg(nameFilter).arg(dir.path()));
+ log(Log::LineType::Error, i18n("Could not find firmware file \"%1\" in directory \"%2\".").tqarg(nameFilter).tqarg(dir.path()));
return false;
}
// upload hex file
PURL::Url url(dir, files[files.count()-1]);
- log(Log::DebugLevel::Normal, QString(" Firmware file: %1").arg(url.pretty()));
+ log(Log::DebugLevel::Normal, TQString(" Firmware file: %1").tqarg(url.pretty()));
Log::StringView sview;
PURL::File file(url, sview);
if ( !file.openForRead() ) {
- log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").arg(url.pretty()));
+ log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").tqarg(url.pretty()));
return false;
}
if ( !doUploadFirmware(file) ) return false;
diff --git a/src/progs/icd2/base/icd2_prog.h b/src/progs/icd2/base/icd2_prog.h
index e8be727..14df438 100644
--- a/src/progs/icd2/base/icd2_prog.h
+++ b/src/progs/icd2/base/icd2_prog.h
@@ -22,6 +22,7 @@ class Hardware;
class ProgrammerBase : public Icd::ProgrammerBase
{
Q_OBJECT
+ TQ_OBJECT
public:
ProgrammerBase(const Programmer::Group &group, const Pic::Data *data, const char *name)
: Icd::ProgrammerBase(group, data, name) {}
@@ -48,6 +49,7 @@ private:
class Programmer : public ProgrammerBase
{
Q_OBJECT
+ TQ_OBJECT
public:
Programmer(const ::Programmer::Group &group, const Pic::Data *data);
};
@@ -56,7 +58,7 @@ public:
class Group : public Icd::Group
{
public:
- virtual QString xmlName() const { return "icd2"; }
+ virtual TQString xmlName() const { return "icd2"; }
virtual ::Programmer::Properties properties() const;
virtual ::Programmer::TargetPowerMode targetPowerMode() const { return ::Programmer::TargetPowerModeFromConfig; }
virtual bool isPortSupported(PortType type) const { return ( type==PortType::Serial || type==PortType::USB ); }
@@ -72,8 +74,8 @@ protected:
class ProgrammerGroup : public Group
{
public:
- virtual QString name() const { return "icd2"; }
- virtual QString label() const { return i18n("ICD2 Programmer"); }
+ virtual TQString name() const { return "icd2"; }
+ virtual TQString label() const { return i18n("ICD2 Programmer"); }
protected:
virtual ::Programmer::Base *createBase(const Device::Data *data) const { return new Programmer(*this, static_cast<const Pic::Data *>(data)); }
diff --git a/src/progs/icd2/base/icd2_serial.cpp b/src/progs/icd2/base/icd2_serial.cpp
index 1ab738c..7f276f0 100644
--- a/src/progs/icd2/base/icd2_serial.cpp
+++ b/src/progs/icd2/base/icd2_serial.cpp
@@ -13,7 +13,7 @@
#include "common/common/misc.h"
//-----------------------------------------------------------------------------
-Icd2::SerialPort::SerialPort(const QString &device, Log::Base &log)
+Icd2::SerialPort::SerialPort(const TQString &device, Log::Base &log)
: Port::Serial(device, NeedDrain | NeedFlush, log)
{}
@@ -24,23 +24,23 @@ bool Icd2::SerialPort::open(Speed speed)
}
//-----------------------------------------------------------------------------
-Icd2::SerialHardware::SerialHardware(::Programmer::Base &base, const QString &portDevice)
+Icd2::SerialHardware::SerialHardware(::Programmer::Base &base, const TQString &portDevice)
: Hardware(base, new SerialPort(portDevice, base))
{}
-bool Icd2::SerialHardware::internalConnect(const QString &mode)
+bool Icd2::SerialHardware::internalConnect(const TQString &mode)
{
if ( !static_cast<SerialPort *>(_port)->open(Port::Serial::S19200) ) return false;
if ( !reset() ) return false;
if ( !_port->send("Z", 1) ) return false;
- QString s;
+ TQString s;
if ( !_port->receive(4, s) ) return false;
if ( !reset() ) return false;
- QByteArray a = toAscii(mode);
+ TQByteArray a = toAscii(mode);
if ( !_port->send(a.data(), a.count()) ) return false;
if ( !_port->receive(1, s) ) return false;
if ( s.upper()!=mode ) {
- log(Log::LineType::Error, i18n("Failed to set port mode to '%1'.").arg(mode));
+ log(Log::LineType::Error, i18n("Failed to set port mode to '%1'.").tqarg(mode));
return false;
}
//log(Log::Debug, "set fast speed");
diff --git a/src/progs/icd2/base/icd2_serial.h b/src/progs/icd2/base/icd2_serial.h
index 546e7b3..0291f49 100644
--- a/src/progs/icd2/base/icd2_serial.h
+++ b/src/progs/icd2/base/icd2_serial.h
@@ -20,7 +20,7 @@ namespace Icd2
class SerialPort : public Port::Serial
{
public:
- SerialPort(const QString &portDevice, Log::Base &log);
+ SerialPort(const TQString &portDevice, Log::Base &log);
bool open(Speed speed);
};
@@ -28,12 +28,12 @@ public:
class SerialHardware : public Hardware
{
public:
- SerialHardware(::Programmer::Base &base, const QString &portDevice);
+ SerialHardware(::Programmer::Base &base, const TQString &portDevice);
private:
bool setFastSpeed();
bool reset();
- virtual bool internalConnect(const QString &mode);
+ virtual bool internalConnect(const TQString &mode);
};
} // namespace
diff --git a/src/progs/icd2/base/icd2_usb.cpp b/src/progs/icd2/base/icd2_usb.cpp
index 945ef6f..7cc2458 100644
--- a/src/progs/icd2/base/icd2_usb.cpp
+++ b/src/progs/icd2/base/icd2_usb.cpp
@@ -27,7 +27,7 @@ Icd2::USBPort::USBPort(uint deviceId, Log::Base &log)
bool Icd2::USBPort::doSequence(SequenceType type, char *data, uint size)
{
- QByteArray tx(0x12);
+ TQByteArray tx(0x12);
for (uint i=0; i<uint(tx.count()); i++) tx[i] = 0x00;
tx[0x00] = SEQUENCE_DATA[type].type;
tx[0x01] = _seqnum;
@@ -51,7 +51,7 @@ bool Icd2::USBPort::doSequence(SequenceType type, char *data, uint size)
case Nb_SequenceTypes: Q_ASSERT(false); break;
}
- QByteArray rx(0x08);
+ TQByteArray rx(0x08);
if ( !read(0x81, rx.data(), rx.size(), 0) ) return false;
//Q_ASSERT( rx[0]==tx[1] );
@@ -60,14 +60,14 @@ bool Icd2::USBPort::doSequence(SequenceType type, char *data, uint size)
return true;
}
-bool Icd2::USBPort::connectDevice(const QString &mode)
+bool Icd2::USBPort::connectDevice(const TQString &mode)
{
_seqnum = 0xC1; // preset seqnum
_ctype = 0x00;
if ( !doSequence(Connect, 0, 0) ) return false;
if ( !send("Z", 1) ) return false;
- QString s;
+ TQString s;
if ( !receive(4, s) ) return false;
_ctype = 0x00;
@@ -78,7 +78,7 @@ bool Icd2::USBPort::connectDevice(const QString &mode)
return false;
}
_ctype = 0x02;
- QByteArray a = toAscii(mode);
+ TQByteArray a = toAscii(mode);
if ( !doSequence(Send, a.data(), a.count()) ) return false;
char c;
_ctype = 0x02;
@@ -92,7 +92,7 @@ bool Icd2::USBPort::connectDevice(const QString &mode)
bool Icd2::USBPort::internalReceive(uint size, char *data, uint)
{
if (_dataSend) {
- //_ctype = qMin(0x65, qRound(4.8 * size)); // timing ?? (1.6 for my ICD2)
+ //_ctype = qMin(0x65, tqRound(4.8 * size)); // timing ?? (1.6 for my ICD2)
_ctype = 0xC9;
} else _ctype = 0xC9;
bool ok = doSequence(Receive, data, size);
@@ -103,7 +103,7 @@ bool Icd2::USBPort::internalReceive(uint size, char *data, uint)
bool Icd2::USBPort::internalSend(const char *data, uint size, uint)
{
if (_dataSend) {
- //_ctype = qMin(0x65, qRound(4.8 * size)); // timing ?? (1.6 for my ICD2)
+ //_ctype = qMin(0x65, tqRound(4.8 * size)); // timing ?? (1.6 for my ICD2)
_ctype = 0xC9;
} else _ctype = 0xC9;
bool ok = doSequence(Send, (char *)data, size);
@@ -111,16 +111,16 @@ bool Icd2::USBPort::internalSend(const char *data, uint size, uint)
return ok;
}
-bool Icd2::USBPort::poll(uint size, QString &s)
+bool Icd2::USBPort::poll(uint size, TQString &s)
{
- QMemArray<uchar> a;
+ TQMemArray<uchar> a;
if ( !poll(size, a) ) return false;
s.fill(0, size);
for (uint i=0; i<size; i++) s[i] = a[i];
return true;
}
-bool Icd2::USBPort::poll(uint size, QMemArray<uchar> &a)
+bool Icd2::USBPort::poll(uint size, TQMemArray<uchar> &a)
{
a.resize(size);
for (;;) {
@@ -128,7 +128,7 @@ bool Icd2::USBPort::poll(uint size, QMemArray<uchar> &a)
if ( !doSequence(Poll, (char *)a.data(), size) ) return false;
if (_poll) break;
}
- //log(Log::DebugLevel::Max, QString("Receiced: \"%1\"").arg(toPrintable((const char *)a.data(), size)));
+ //log(Log::DebugLevel::Max, TQString("Receiced: \"%1\"").tqarg(toPrintable((const char *)a.data(), size)));
return true;
}
@@ -138,7 +138,7 @@ bool Icd2::USBPort::dataSend(const char *data, uint size)
return Port::USB::send(data, size);
}
-bool Icd2::USBPort::dataReceive(uint size, QString &s)
+bool Icd2::USBPort::dataReceive(uint size, TQString &s)
{
_dataSend = true;
return Port::USB::receive(size, s);
@@ -149,10 +149,10 @@ Icd2::USBHardware::USBHardware(::Programmer::Base &base)
: Hardware(base, new USBPort(ID_CLIENT, base))
{}
-bool Icd2::USBHardware::internalConnect(const QString &mode)
+bool Icd2::USBHardware::internalConnect(const TQString &mode)
{
// load control messages for USB device if needed
- log(Log::DebugLevel::Extra, QString("need firmware ? %1").arg(USBPort::findDevice(Microchip::VENDOR_ID, ID_FIRMWARE)!=0));
+ log(Log::DebugLevel::Extra, TQString("need firmware ? %1").tqarg(USBPort::findDevice(Microchip::VENDOR_ID, ID_FIRMWARE)!=0));
if ( Port::USB::findDevice(Microchip::VENDOR_ID, ID_FIRMWARE) ) {
USBPort port(ID_FIRMWARE, *this);
if ( !port.open() ) return false;
@@ -163,7 +163,7 @@ bool Icd2::USBHardware::internalConnect(const QString &mode)
}
port.close();
for (uint i=0; i<10; i++) {
- log(Log::DebugLevel::Extra, QString("client here ? %1").arg(USBPort::findDevice(Microchip::VENDOR_ID, ID_CLIENT)!=0));
+ log(Log::DebugLevel::Extra, TQString("client here ? %1").tqarg(USBPort::findDevice(Microchip::VENDOR_ID, ID_CLIENT)!=0));
if ( Port::USB::findDevice(Microchip::VENDOR_ID, ID_CLIENT) ) break;
Port::msleep(1000);
}
diff --git a/src/progs/icd2/base/icd2_usb.h b/src/progs/icd2/base/icd2_usb.h
index c2677a6..30d9065 100644
--- a/src/progs/icd2/base/icd2_usb.h
+++ b/src/progs/icd2/base/icd2_usb.h
@@ -22,11 +22,11 @@ class USBPort : public Port::USB
{
public:
USBPort(uint deviceId, Log::Base &log);
- bool connectDevice(const QString &mode);
- bool poll(uint size, QString &s);
- bool poll(uint size, QMemArray<uchar> &data);
+ bool connectDevice(const TQString &mode);
+ bool poll(uint size, TQString &s);
+ bool poll(uint size, TQMemArray<uchar> &data);
bool dataSend(const char *data, uint size);
- bool dataReceive(uint size, QString &s);
+ bool dataReceive(uint size, TQString &s);
private:
uchar _seqnum;
@@ -55,7 +55,7 @@ private:
enum { ID_FIRMWARE = 0x8000, // ICD2 id before usb firmware is transmitted
ID_CLIENT = 0x8001 // ICD2 id after firmware is transmitted
};
- virtual bool internalConnect(const QString &mode);
+ virtual bool internalConnect(const TQString &mode);
};
} // namespace
diff --git a/src/progs/icd2/base/icd_prog.cpp b/src/progs/icd2/base/icd_prog.cpp
index 6fadf06..00f7c25 100644
--- a/src/progs/icd2/base/icd_prog.cpp
+++ b/src/progs/icd2/base/icd_prog.cpp
@@ -16,10 +16,10 @@ bool Icd::ProgrammerBase::doUploadFirmware(PURL::File &file)
{
const Device::Data &data = *Device::lister().data("16F876");
Pic::Memory memory(static_cast<const Pic::Data &>(data));
- QStringList errors, warnings;
+ TQStringList errors, warnings;
Pic::Memory::WarningTypes warningTypes;
if ( !memory.load(file.stream(), errors, warningTypes, warnings) ) {
- log(Log::LineType::Error, i18n("Could not read firmware hex file \"%1\": %2.").arg(file.url().pretty()).arg(errors[0]));
+ log(Log::LineType::Error, i18n("Could not read firmware hex file \"%1\": %2.").tqarg(file.url().pretty()).tqarg(errors[0]));
return false;
}
if ( warningTypes!=Pic::Memory::NoWarning ) {
diff --git a/src/progs/icd2/base/icd_prog.h b/src/progs/icd2/base/icd_prog.h
index ba6d9bb..8a0ab2e 100644
--- a/src/progs/icd2/base/icd_prog.h
+++ b/src/progs/icd2/base/icd_prog.h
@@ -19,6 +19,7 @@ namespace Icd
class ProgrammerBase : public ::Programmer::PicBase
{
Q_OBJECT
+ TQ_OBJECT
public:
ProgrammerBase(const Programmer::Group &group, const Pic::Data *data, const char *name)
: ::Programmer::PicBase(group, data, name) {}
diff --git a/src/progs/icd2/base/microchip.h b/src/progs/icd2/base/microchip.h
index 627b2ad..20ac4ed 100644
--- a/src/progs/icd2/base/microchip.h
+++ b/src/progs/icd2/base/microchip.h
@@ -9,7 +9,7 @@
#ifndef MICROCHIP_H
#define MICROCHIP_H
-#include <qstring.h>
+#include <tqstring.h>
namespace Microchip
{
diff --git a/src/progs/icd2/gui/icd2_group_ui.cpp b/src/progs/icd2/gui/icd2_group_ui.cpp
index 6f00788..b8d71df 100644
--- a/src/progs/icd2/gui/icd2_group_ui.cpp
+++ b/src/progs/icd2/gui/icd2_group_ui.cpp
@@ -14,38 +14,38 @@
#include "progs/icd2/base/icd2_debug.h"
//----------------------------------------------------------------------------
-Icd2::AdvancedDialog::AdvancedDialog(ProgrammerBase &base, QWidget *parent)
- : ::Programmer::PicAdvancedDialog(base, parent, "icd2_advanced_dialog")
+Icd2::AdvancedDialog::AdvancedDialog(ProgrammerBase &base, TQWidget *tqparent)
+ : ::Programmer::PicAdvancedDialog(base, tqparent, "icd2_advanced_dialog")
{
uint row = _firmwareContainer->numRows();
- QLabel *label = new QLabel(i18n("Id:"), _firmwareContainer);
+ TQLabel *label = new TQLabel(i18n("Id:"), _firmwareContainer);
_firmwareContainer->addWidget(label, row,row, 0,0);
- _firmwareIdLabel = new QLabel(_firmwareContainer);
+ _firmwareIdLabel = new TQLabel(_firmwareContainer);
_firmwareContainer->addWidget(_firmwareIdLabel, row,row, 1,1);
row++;
row = _programmerContainer->numRows();
if ( base.group().properties() & ::Programmer::Debugger ) {
- ButtonContainer *container = new ::Programmer::ButtonContainer(i18n("Debug Executive"), this, SLOT(updateDebugExecutive()), _programmerContainer);
+ ButtonContainer *container = new ::Programmer::ButtonContainer(i18n("Debug Executive"), TQT_TQOBJECT(this), TQT_SLOT(updateDebugExecutive()), _programmerContainer);
_programmerContainer->addWidget(container, row,row, 0,1);
- label = new QLabel(i18n("Version:"), container);
+ label = new TQLabel(i18n("Version:"), container);
container->addWidget(label, 1,1, 0,0);
- _debugExecLabel = new QLabel(container);
+ _debugExecLabel = new TQLabel(container);
container->addWidget(_debugExecLabel, 1,1, 1,1);
row++;
} else _debugExecLabel = 0;
for (uint i=0; i<TestData::Nb_VoltageTypes; i++) {
- QLabel *label = new QLabel(i18n(TestData::VOLTAGE_LABELS[i]) + ":", _selfTestContainer);
+ TQLabel *label = new TQLabel(i18n(TestData::VOLTAGE_LABELS[i]) + ":", _selfTestContainer);
_selfTestContainer->addWidget(label, 1+i,1+i, 0,0);
- _tests[i] = new QLabel(_selfTestContainer);
+ _tests[i] = new TQLabel(_selfTestContainer);
_selfTestContainer->addWidget(_tests[i], 1+i,1+i, 1,1);
}
}
void Icd2::AdvancedDialog::updateDebugExecutive()
{
- ::BusyCursor bc;
+ ::PBusyCursor bc;
if ( ensureConnected() ) {
Pic::TargetMode mode;
if ( !base().getTargetMode(mode) ) return;
@@ -70,12 +70,12 @@ void Icd2::AdvancedDialog::updateDisplay()
}
//----------------------------------------------------------------------------
-::Programmer::ConfigWidget *Icd2::GroupUI::createConfigWidget(QWidget *parent) const
+::Programmer::ConfigWidget *Icd2::GroupUI::createConfigWidget(TQWidget *tqparent) const
{
- return new ::Programmer::ConfigWidget(static_cast<const Group &>(group()), parent);
+ return new ::Programmer::ConfigWidget(static_cast<const Group &>(group()), tqparent);
}
-::Programmer::AdvancedDialog *Icd2::GroupUI::createAdvancedDialog(::Programmer::Base &base, QWidget *parent) const
+::Programmer::AdvancedDialog *Icd2::GroupUI::createAdvancedDialog(::Programmer::Base &base, TQWidget *tqparent) const
{
- return new AdvancedDialog(static_cast<ProgrammerBase &>(base), parent);
+ return new AdvancedDialog(static_cast<ProgrammerBase &>(base), tqparent);
}
diff --git a/src/progs/icd2/gui/icd2_group_ui.h b/src/progs/icd2/gui/icd2_group_ui.h
index 93d66e7..14c0fdb 100644
--- a/src/progs/icd2/gui/icd2_group_ui.h
+++ b/src/progs/icd2/gui/icd2_group_ui.h
@@ -21,16 +21,17 @@ class Group;
class AdvancedDialog : public ::Programmer::PicAdvancedDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- AdvancedDialog(ProgrammerBase &base, QWidget *parent);
+ AdvancedDialog(ProgrammerBase &base, TQWidget *tqparent);
virtual void updateDisplay();
private slots:
void updateDebugExecutive();
private:
- QLabel *_firmwareIdLabel, *_debugExecLabel;
- QLabel *_tests[TestData::Nb_VoltageTypes];
+ TQLabel *_firmwareIdLabel, *_debugExecLabel;
+ TQLabel *_tests[TestData::Nb_VoltageTypes];
ProgrammerBase &base() { return static_cast<ProgrammerBase &>(_base); }
};
@@ -38,9 +39,9 @@ private:
class GroupUI : public ::Programmer::GroupUI
{
public:
- virtual ::Programmer::ConfigWidget *createConfigWidget(QWidget *parent) const;
+ virtual ::Programmer::ConfigWidget *createConfigWidget(TQWidget *tqparent) const;
virtual bool hasAdvancedDialog() const { return true; }
- virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &base, QWidget *parent) const;
+ virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &base, TQWidget *tqparent) const;
};
} // namespace
diff --git a/src/progs/icd2/xml/xml_icd2_parser.cpp b/src/progs/icd2/xml/xml_icd2_parser.cpp
index 7ce2ad9..06eed27 100644
--- a/src/progs/icd2/xml/xml_icd2_parser.cpp
+++ b/src/progs/icd2/xml/xml_icd2_parser.cpp
@@ -19,21 +19,21 @@ public:
XmlToData() : Programmer::XmlToData<Data>("icd2", "Icd2") {}
private:
- virtual uint familyIndex(const QString &family) const;
- virtual void parseData(QDomElement element, Data &data);
- virtual void outputData(const Data &data, QTextStream &s) const;
+ virtual uint familyIndex(const TQString &family) const;
+ virtual void parseData(TQDomElement element, Data &data);
+ virtual void outputData(const Data &data, TQTextStream &s) const;
};
-uint Icd2::XmlToData::familyIndex(const QString &family) const
+uint Icd2::XmlToData::familyIndex(const TQString &family) const
{
uint i = 0;
for (; Icd2::FAMILY_DATA[i].efid!=0; i++)
if ( family==Icd2::FAMILY_DATA[i].name ) break;
- if ( Icd2::FAMILY_DATA[i].efid==0 ) qFatal(QString("Family \"%1\" is unknown").arg(family));
+ if ( Icd2::FAMILY_DATA[i].efid==0 ) qFatal(TQString("Family \"%1\" is unknown").tqarg(family));
return i;
}
-void Icd2::XmlToData::parseData(QDomElement element, Data &data)
+void Icd2::XmlToData::parseData(TQDomElement element, Data &data)
{
bool ok;
data.famid = fromHexLabel(element.attribute("famid"), 2, &ok);
@@ -41,7 +41,7 @@ void Icd2::XmlToData::parseData(QDomElement element, Data &data)
data.debugSupport = extractSupport(element.attribute("debug_support_type"));
}
-void Icd2::XmlToData::outputData(const Data &data, QTextStream &s) const
+void Icd2::XmlToData::outputData(const Data &data, TQTextStream &s) const
{
s << toHexLabel(data.famid, 2) << ", ";
s << "::Group::Support::Type(" << data.debugSupport.type() << ")";
diff --git a/src/progs/manager/breakpoint.cpp b/src/progs/manager/breakpoint.cpp
index 15e08e0..dc7d836 100644
--- a/src/progs/manager/breakpoint.cpp
+++ b/src/progs/manager/breakpoint.cpp
@@ -23,7 +23,7 @@ Breakpoint::List &Breakpoint::list()
void Breakpoint::List::append(const Data &data)
{
- Q_ASSERT( !contains(data) );
+ Q_ASSERT( !tqcontains(data) );
StateData sdata;
sdata.data = data;
_list.append(sdata);
@@ -32,8 +32,8 @@ void Breakpoint::List::append(const Data &data)
void Breakpoint::List::remove(const Data &data)
{
- Q_ASSERT( contains(data) );
- _list.remove(find(data));
+ Q_ASSERT( tqcontains(data) );
+ _list.remove(tqfind(data));
delayedChanged();
}
@@ -43,17 +43,17 @@ void Breakpoint::List::clear()
delayedChanged();
}
-QValueList<Breakpoint::List::StateData>::iterator Breakpoint::List::find(const Data &data)
+TQValueList<Breakpoint::List::StateData>::iterator Breakpoint::List::tqfind(const Data &data)
{
- QValueList<StateData>::iterator it;
+ TQValueList<StateData>::iterator it;
for (it=_list.begin(); it!=_list.end(); ++it)
if ( (*it).data==data ) return it;
return _list.end();
}
-QValueList<Breakpoint::List::StateData>::const_iterator Breakpoint::List::find(const Data &data) const
+TQValueList<Breakpoint::List::StateData>::const_iterator Breakpoint::List::tqfind(const Data &data) const
{
- QValueList<StateData>::const_iterator it;
+ TQValueList<StateData>::const_iterator it;
for (it=_list.begin(); it!=_list.end(); ++it)
if ( (*it).data==data ) return it;
return _list.end();
@@ -61,14 +61,14 @@ QValueList<Breakpoint::List::StateData>::const_iterator Breakpoint::List::find(c
void Breakpoint::List::setState(const Data &data, State state)
{
- Q_ASSERT( contains(data) );
- (*find(data)).state = state;
+ Q_ASSERT( tqcontains(data) );
+ (*tqfind(data)).state = state;
delayedChanged();
}
void Breakpoint::List::setAddress(const Data &data, Address address)
{
- Q_ASSERT( contains(data) );
- (*find(data)).address = address;
+ Q_ASSERT( tqcontains(data) );
+ (*tqfind(data)).address = address;
delayedChanged();
}
diff --git a/src/progs/manager/breakpoint.h b/src/progs/manager/breakpoint.h
index fca0570..07f5263 100644
--- a/src/progs/manager/breakpoint.h
+++ b/src/progs/manager/breakpoint.h
@@ -39,6 +39,7 @@ extern List &list();
class List : public GenericStorage
{
Q_OBJECT
+ TQ_OBJECT
public:
List() {}
void append(const Data &data);
@@ -46,9 +47,9 @@ public:
void clear();
uint count() const { return _list.count(); }
const Data &data(uint i) const { return _list[i].data; }
- bool contains(const Data &data) const { return find(data)!=_list.end(); }
- State state(const Data &data) const { return (*find(data)).state; }
- Address address(const Data &data) const { return (*find(data)).address; }
+ bool tqcontains(const Data &data) const { return tqfind(data)!=_list.end(); }
+ State state(const Data &data) const { return (*tqfind(data)).state; }
+ Address address(const Data &data) const { return (*tqfind(data)).address; }
void setState(const Data &data, State state);
void setAddress(const Data &data, Address address);
@@ -60,9 +61,9 @@ private:
Address address;
State state;
};
- QValueList<StateData> _list;
- QValueList<StateData>::const_iterator find(const Data &data) const;
- QValueList<StateData>::iterator find(const Data &data);
+ TQValueList<StateData> _list;
+ TQValueList<StateData>::const_iterator tqfind(const Data &data) const;
+ TQValueList<StateData>::iterator tqfind(const Data &data);
};
} // namespace
diff --git a/src/progs/manager/debug_manager.cpp b/src/progs/manager/debug_manager.cpp
index 7889432..631a4bd 100644
--- a/src/progs/manager/debug_manager.cpp
+++ b/src/progs/manager/debug_manager.cpp
@@ -8,8 +8,8 @@
***************************************************************************/
#include "debug_manager.h"
-#include <qtimer.h>
-#include <qeventloop.h>
+#include <tqtimer.h>
+#include <tqeventloop.h>
#include "coff/base/text_coff.h"
#include "coff/base/cdb_parser.h"
@@ -23,11 +23,11 @@
Debugger::Manager *Debugger::manager = 0;
Debugger::Manager::Manager()
- : QObject(Programmer::manager, "debug_manager"), Log::Base(Programmer::manager), GenericView(Breakpoint::list()),
+ : TQObject(Programmer::manager, "debug_manager"), Log::Base(Programmer::manager), GenericView(Breakpoint::list()),
_coff(0), _data(0)
{
- connect(&_runTimer, SIGNAL(timeout()), SLOT(slotRunTimeout()));
- connect(&_stepTimer, SIGNAL(timeout()), SLOT(doStep()));
+ connect(&_runTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotRunTimeout()));
+ connect(&_stepTimer, TQT_SIGNAL(timeout()), TQT_SLOT(doStep()));
}
Debugger::Manager::~Manager()
@@ -81,7 +81,7 @@ bool Debugger::Manager::internalInit()
if ( !coffUrl().exists() ) return false;
Log::Base log;
log.setView(compileView());
- log.log(Log::LineType::Information, i18n("Parsing COFF file: %1").arg(coffUrl().pretty()));
+ log.log(Log::LineType::Information, i18n("Parsing COFF file: %1").tqarg(coffUrl().pretty()));
_coff = new Coff::TextObject(_data, coffUrl());
if ( !_coff->parse(log) ) {
delete _coff;
@@ -110,7 +110,7 @@ void Debugger::Manager::freeActiveBreakpoint()
uint max = programmerGroup()->maxNbBreakpoints(deviceData());
Q_ASSERT( nb<=max && max!=0 );
if ( nb==max ) {
- log(Log::LineType::Warning, i18n("The number of active breakpoints is higher than the maximum for the current debugger (%1): disabling the last breakpoint.").arg(max));
+ log(Log::LineType::Warning, i18n("The number of active breakpoints is higher than the maximum for the current debugger (%1): disabling the last breakpoint.").tqarg(max));
Breakpoint::list().setState(last, Breakpoint::Disabled);
}
}
@@ -137,9 +137,9 @@ bool Debugger::Manager::checkBreakpoint(const Breakpoint::Data &bdata, bool only
{
address = Address();
if ( _coff==0 ) return true;
- QValueVector<Address> addresses = _coff->addresses(bdata.url, bdata.line);
+ TQValueVector<Address> addresses = _coff->addresses(bdata.url, bdata.line);
if ( addresses.isEmpty() ) {
- QString s = i18n("Breakpoint at non-code line.");
+ TQString s = i18n("Breakpoint at non-code line.");
if (onlyWarn) log(Log::LineType::Warning, s);
else sorry(s);
return false;
@@ -166,9 +166,9 @@ void Debugger::Manager::computeBreakpointAddresses()
}
}
-QValueList<Address> Debugger::Manager::activeBreakpointAddresses() const
+TQValueList<Address> Debugger::Manager::activeBreakpointAddresses() const
{
- QValueList<Address> addresses;
+ TQValueList<Address> addresses;
for (uint i=0; i<Breakpoint::list().count(); i++) {
const Breakpoint::Data &data = Breakpoint::list().data(i);
if ( Breakpoint::list().state(data)==Breakpoint::Active ) addresses.append(Breakpoint::list().address(data));
@@ -193,7 +193,7 @@ bool Debugger::Manager::update(bool gotoPC)
_readRegisters.clear();
if ( !updateRegisters() ) return false;
if ( debugger() ) emit statusChanged(debugger()->statusString());
- else emit statusChanged(QString::null);
+ else emit statusChanged(TQString());
_currentSourceLines.clear();
if (_coff) _currentSourceLines = _coff->sourceLinesForAddress(pc().toUInt());
updateView(gotoPC);
@@ -205,15 +205,15 @@ bool Debugger::Manager::updateRegister(const Register::TypeData &data)
// read related registers
const Device::RegistersData *rdata = deviceData()->registersData();
Q_ASSERT(rdata);
- QValueList<Register::TypeData> related = rdata->relatedRegisters(data);
+ TQValueList<Register::TypeData> related = rdata->relatedRegisters(data);
for (uint k=0; k<uint(related.count()); k++)
if ( !readRegister(related[k]) ) return false;
// read port status
if ( data.type()==Register::Regular ) {
int index = rdata->portIndex(data.address());
if ( index!=-1 ) {
- QMap<uint, Device::PortBitData> data;
- if ( !debugger()->updatePortStatus(index, data) ) return false;
+ TQMap<uint, Device::PortBitData> data;
+ if ( !debugger()->updatePorttqStatus(index, data) ) return false;
Register::list().setPortData(index, data);
}
}
@@ -223,7 +223,7 @@ bool Debugger::Manager::updateRegister(const Register::TypeData &data)
bool Debugger::Manager::updateRegisters()
{
if ( programmer()==0 || programmer()->state()!=Programmer::Halted ) return true;
- QValueList<Register::TypeData> watched = Register::list().watched();
+ TQValueList<Register::TypeData> watched = Register::list().watched();
for (uint i=0; i<uint(watched.count()); i++)
if ( !updateRegister(watched[i]) ) return false;
return true;
@@ -265,13 +265,13 @@ bool Debugger::Manager::checkIfContinueStepping(bool &continueStepping)
continueStepping = false;
if ( !readConfigEntry(Config::OnlyStopOnSourceLine).toBool() ) return true;
if ( !update(false) ) return false;
- QMap<PURL::Url, uint>::const_iterator it;
+ TQMap<PURL::Url, uint>::const_iterator it;
for (it=_currentSourceLines.begin(); it!=_currentSourceLines.end(); ++it) {
PURL::FileGroup group = it.key().fileType().data().group;
if ( group!=PURL::Source && group!=PURL::Header ) continue;
if ( !it.key().exists() ) continue;
if ( readConfigEntry(Config::OnlyStopOnProjectSourceLine).toBool() && !isProjectSource(it.key()) ) continue;
- QValueVector<Address> addresses = _coff->addresses(it.key(), it.data());
+ TQValueVector<Address> addresses = _coff->addresses(it.key(), it.data());
qHeapSort(addresses);
Q_ASSERT( addresses.count()!=0 );
if ( pc()!=addresses[0] ) continue; // we only break if pc is on the first instruction of the source line
@@ -331,7 +331,7 @@ void Debugger::Manager::setRegisterWatched(const Register::TypeData &data, bool
bool Debugger::Manager::readRegister(const Register::TypeData &data)
{
Q_ASSERT( data.type()==Register::Regular || data.type()==Register::Special );
- if ( _readRegisters.contains(data) ) return true;
+ if ( _readRegisters.tqcontains(data) ) return true;
BitValue value;
if ( !debugger()->readRegister(data, value) ) return false;
Register::list().setValue(data, value);
@@ -384,7 +384,7 @@ bool Debugger::Manager::prepareDebugging()
break;
}
if ( i==Programmer::Nb_InputFileTypes ) {
- log(Log::LineType::Error, i18n("Cannot start debugging session without input file (%1).").arg(first.pretty()));
+ log(Log::LineType::Error, i18n("Cannot start debugging session without input file (%1).").tqarg(first.pretty()));
return false;
}
}
diff --git a/src/progs/manager/debug_manager.h b/src/progs/manager/debug_manager.h
index 90b8584..1598287 100644
--- a/src/progs/manager/debug_manager.h
+++ b/src/progs/manager/debug_manager.h
@@ -9,7 +9,7 @@
#ifndef DEBUG_MANAGER_H
#define DEBUG_MANAGER_H
-#include <qtimer.h>
+#include <tqtimer.h>
#include "common/global/log.h"
#include "common/global/purl.h"
@@ -24,9 +24,10 @@ namespace CDB { class Object; }
namespace Debugger
{
-class Manager : public QObject, public Log::Base, public GenericView
+class Manager : public TQObject, public Log::Base, public GenericView
{
Q_OBJECT
+ TQ_OBJECT
public:
Manager();
virtual ~Manager();
@@ -58,13 +59,13 @@ public slots:
void stopWatchAll();
signals:
- void statusChanged(const QString &text);
+ void statusChanged(const TQString &text);
void targetStateChanged();
- void actionMessage(const QString &text);
+ void actionMessage(const TQString &text);
protected:
Coff::TextObject *_coff;
- QMap<PURL::Url, uint> _currentSourceLines;
+ TQMap<PURL::Url, uint> _currentSourceLines;
void freeActiveBreakpoint();
bool checkBreakpoint(const Breakpoint::Data &bdata, bool onlyWarn, Address &address);
@@ -81,11 +82,11 @@ private slots:
private:
const Device::Data *_data;
- QTimer _runTimer, _stepTimer;
- QValueList<Register::TypeData> _readRegisters;
+ TQTimer _runTimer, _stepTimer;
+ TQValueList<Register::TypeData> _readRegisters;
void computeBreakpointAddresses();
- QValueList<Address> activeBreakpointAddresses() const;
+ TQValueList<Address> activeBreakpointAddresses() const;
void updateBreakpointsDisplay();
virtual void updateView() { updateView(false); }
virtual void updateView(bool gotoPC) = 0;
diff --git a/src/progs/manager/prog_manager.cpp b/src/progs/manager/prog_manager.cpp
index bc824c9..c39d955 100644
--- a/src/progs/manager/prog_manager.cpp
+++ b/src/progs/manager/prog_manager.cpp
@@ -18,8 +18,8 @@
//----------------------------------------------------------------------------
Programmer::Manager *Programmer::manager = 0;
-Programmer::Manager::Manager(QObject *parent)
- : QObject(parent, "programmer_manager"), _programmer(0)
+Programmer::Manager::Manager(TQObject *tqparent)
+ : TQObject(tqparent, "programmer_manager"), _programmer(0)
{}
Programmer::Manager::~Manager()
@@ -39,11 +39,11 @@ void Programmer::Manager::createProgrammer(const Device::Data *data, const Hardw
delete _programmer;
_programmer = group().createProgrammer(isTargetSelfPowered(), data, hd);
_programmer->Log::Base::setParent(this);
- connect(_programmer, SIGNAL(actionMessage(const QString &)), SIGNAL(actionMessage(const QString &)));
- connect(&_programmer->progressMonitor(), SIGNAL(setLabel(const QString &)), SIGNAL(actionMessage(const QString &)));
- connect(&_programmer->progressMonitor(), SIGNAL(setTotalProgress(uint)), SIGNAL(setTotalProgress(uint)));
- connect(&_programmer->progressMonitor(), SIGNAL(setProgress(uint)), SIGNAL(setProgress(uint)));
- connect(&_programmer->progressMonitor(), SIGNAL(showProgress(bool)), SIGNAL(showProgress(bool)));
+ connect(_programmer, TQT_SIGNAL(actionMessage(const TQString &)), TQT_SIGNAL(actionMessage(const TQString &)));
+ connect(&_programmer->progressMonitor(), TQT_SIGNAL(setLabel(const TQString &)), TQT_SIGNAL(actionMessage(const TQString &)));
+ connect(&_programmer->progressMonitor(), TQT_SIGNAL(setTotalProgress(uint)), TQT_SIGNAL(setTotalProgress(uint)));
+ connect(&_programmer->progressMonitor(), TQT_SIGNAL(setProgress(uint)), TQT_SIGNAL(setProgress(uint)));
+ connect(&_programmer->progressMonitor(), TQT_SIGNAL(showProgress(bool)), TQT_SIGNAL(showProgress(bool)));
}
bool Programmer::Manager::initProgramming(bool debugging)
@@ -61,8 +61,8 @@ bool Programmer::Manager::internalInitProgramming(bool)
}
if ( !group().isSupported(device()->name()) ) {
if ( group().isSoftware() && group().supportedDevices().isEmpty() )
- sorry(i18n("Could not detect supported devices for \"%1\". Please check installation.").arg(group().label()));
- else sorry(i18n("The current programmer \"%1\" does not support device \"%2\".").arg(group().label()).arg(device()->name()));
+ sorry(i18n("Could not detect supported devices for \"%1\". Please check installation.").tqarg(group().label()));
+ else sorry(i18n("The current programmer \"%1\" does not support device \"%2\".").tqarg(group().label()).tqarg(device()->name()));
return false;
}
createProgrammer(device());
@@ -135,7 +135,7 @@ bool Programmer::Manager::setDevicePower(bool on)
if ( !initProgramming(false) ) return false;
bool ok = true;
if ( _programmer->isTargetSelfPowered() )
- sorry(i18n("Cannot toggle target power since target is self-powered."), QString::null);
+ sorry(i18n("Cannot toggle target power since target is self-powered."), TQString());
else {
emit actionMessage(i18n("Toggle Device Power..."));
ok = _programmer->setTargetPowerOn(on);
diff --git a/src/progs/manager/prog_manager.h b/src/progs/manager/prog_manager.h
index 11f7401..233013b 100644
--- a/src/progs/manager/prog_manager.h
+++ b/src/progs/manager/prog_manager.h
@@ -10,7 +10,7 @@
#ifndef PROG_MANAGER_H
#define PROG_MANAGER_H
-#include <qobject.h>
+#include <tqobject.h>
#include "common/global/log.h"
namespace Device { class Data; class Memory; class MemoryRange; }
@@ -22,11 +22,12 @@ class Base;
class Group;
class HardwareDescription;
-class Manager : public QObject, public Log::Base
+class Manager : public TQObject, public Log::Base
{
Q_OBJECT
+ TQ_OBJECT
public:
- Manager(QObject *parent);
+ Manager(TQObject *tqparent);
virtual ~Manager();
::Programmer::Base *programmer() { return _programmer; }
virtual void createProgrammer(const Device::Data *data) = 0;
@@ -52,7 +53,7 @@ public slots:
bool step();
signals:
- void actionMessage(const QString &message);
+ void actionMessage(const TQString &message);
void showProgress(bool show);
void setTotalProgress(uint steps);
void setProgress(uint steps);
diff --git a/src/progs/picdem_bootloader/base/picdem_bootloader.cpp b/src/progs/picdem_bootloader/base/picdem_bootloader.cpp
index f22eecb..90fed61 100644
--- a/src/progs/picdem_bootloader/base/picdem_bootloader.cpp
+++ b/src/progs/picdem_bootloader/base/picdem_bootloader.cpp
@@ -38,29 +38,29 @@ PicdemBootloader::Port::Port(Log::Base &log)
: Port::USB(log, Config::readVendorId(), Config::readProductId(), 1, 0)
{}
-bool PicdemBootloader::Port::receive(uint nb, QMemArray<uchar> &data)
+bool PicdemBootloader::Port::receive(uint nb, TQMemArray<uchar> &data)
{
data.resize(nb);
if ( !read(0x81, (char *)data.data(), nb) ) return false;
- log(Log::DebugLevel::Max, QString("received: \"%1\"").arg(toPrintable(data, PrintEscapeAll)));
+ log(Log::DebugLevel::Max, TQString("received: \"%1\"").tqarg(toPrintable(data, PrintEscapeAll)));
return true;
}
-bool PicdemBootloader::Port::send(const QMemArray<uchar> &cmd)
+bool PicdemBootloader::Port::send(const TQMemArray<uchar> &cmd)
{
- log(Log::DebugLevel::Extra, QString("send: \"%1\"").arg(toPrintable(cmd, PrintEscapeAll)));
+ log(Log::DebugLevel::Extra, TQString("send: \"%1\"").tqarg(toPrintable(cmd, PrintEscapeAll)));
return write(0x01, (const char *)cmd.data(), cmd.count());
}
-bool PicdemBootloader::Port::sendAndReceive(QMemArray<uchar> &data, uint nb)
+bool PicdemBootloader::Port::sendAndReceive(TQMemArray<uchar> &data, uint nb)
{
if ( !send(data) ) return false;
return receive(nb, data);
}
-QMemArray<uchar> PicdemBootloader::Port::command(uchar instruction, uint address, uint len, uint nb) const
+TQMemArray<uchar> PicdemBootloader::Port::command(uchar instruction, uint address, uint len, uint nb) const
{
- QMemArray<uchar> cmd(5+nb);
+ TQMemArray<uchar> cmd(5+nb);
cmd[0] = instruction;
cmd[1] = len;
cmd[2] = address & 0xFF;
@@ -77,11 +77,11 @@ PicdemBootloader::Hardware::Hardware(::Programmer::Base &base)
bool PicdemBootloader::Hardware::internalConnectHardware()
{
if ( !openPort() ) return false;
- QMemArray<uchar> cmd(5);
+ TQMemArray<uchar> cmd(5);
cmd.fill(0);
if ( !port().sendAndReceive(cmd, 4) ) return false;
VersionData version(cmd[3], cmd[2], 0);
- log(Log::LineType::Information, i18n("Bootloader version %1 detected").arg(version.pretty()));
+ log(Log::LineType::Information, i18n("Bootloader version %1 detected").tqarg(version.pretty()));
if ( version.majorNum()!=1 ) {
log(Log::LineType::Error, i18n("Only bootloader version 1.x is supported"));
return false;
@@ -106,9 +106,9 @@ bool PicdemBootloader::Hardware::write(Pic::MemoryRangeType type, const Device::
if ( type==Pic::MemoryRangeType::Code ) { // check that there is nothing in bootloader reserved area
for (uint i=0; i<data.count(); i++) {
if ( i>=0x400 ) continue;
- if ( data[i]==device().mask(Pic::MemoryRangeType::Code) ) continue;
+ if ( data[i]==device().tqmask(Pic::MemoryRangeType::Code) ) continue;
uint address = device().addressIncrement(Pic::MemoryRangeType::Code) * i;
- log(Log::LineType::Warning, " " + i18n("Code is present in bootloader reserved area (at address %1). It will be ignored.").arg(toHexLabel(address, device().nbCharsAddress())));
+ log(Log::LineType::Warning, " " + i18n("Code is present in bootloader reserved area (at address %1). It will be ignored.").tqarg(toHexLabel(address, device().nbCharsAddress())));
break;
}
}
@@ -116,7 +116,7 @@ bool PicdemBootloader::Hardware::write(Pic::MemoryRangeType type, const Device::
uint nbBytes = nbBytesWord * device().nbWords(type);
uint offset = (type==Pic::MemoryRangeType::Code ? 0x0800 : 0x00);
for (; offset<nbBytes; offset+=16) {
- QMemArray<uchar> cmd = port().command(0x02, device().range(type).start.toUInt() + offset, 16, 16);
+ TQMemArray<uchar> cmd = port().command(0x02, device().range(type).start.toUInt() + offset, 16, 16);
for (uint k=0; k<16; k += nbBytesWord) {
uint index = (offset + k) / nbBytesWord;
cmd[5 + k] = data[index].byte(0);
@@ -147,9 +147,9 @@ bool PicdemBootloader::Hardware::read(Pic::MemoryRangeType type, Device::Array &
if (vdata) varray = static_cast<const Pic::Memory &>(vdata->memory).arrayForWriting(type);
uint nbBytesWord = device().nbBytesWord(type);
uint nbBytes = nbBytesWord * device().nbWords(type);
- uint nb = QMIN(uint(16), nbBytes);
+ uint nb = TQMIN(uint(16), nbBytes);
for (uint offset=0; offset<nbBytes; offset+=16) {
- QMemArray<uchar> cmd = port().command(readInstruction(type), device().range(type).start.toUInt() + offset, nb, 0);
+ TQMemArray<uchar> cmd = port().command(readInstruction(type), device().range(type).start.toUInt() + offset, nb, 0);
if ( !port().sendAndReceive(cmd, 5+nb) ) return false;
for (uint k=0; k<nb; k += nbBytesWord) {
uint index = (offset + k) / nbBytesWord;
@@ -157,9 +157,9 @@ bool PicdemBootloader::Hardware::read(Pic::MemoryRangeType type, Device::Array &
if ( nbBytesWord==2 ) data[index] |= (cmd[5 + k+1] << 8);
if ( vdata && index>=0x0800 && data[index]!=varray[index] ) {
log(Log::LineType::Error, i18n("Device memory does not match hex file (at address 0x%2: reading 0x%3 and expecting 0x%4).")
- .arg(QString(toHex(index/2, device().nbCharsAddress())))
- .arg(QString(toHex(data[index], device().nbCharsWord(type))))
- .arg(QString(toHex(varray[index], device().nbCharsWord(type)))));
+ .tqarg(TQString(toHex(index/2, device().nbCharsAddress())))
+ .tqarg(TQString(toHex(data[index], device().nbCharsWord(type))))
+ .tqarg(TQString(toHex(varray[index], device().nbCharsWord(type)))));
return false;
}
}
@@ -177,7 +177,7 @@ bool PicdemBootloader::Hardware::erase(Pic::MemoryRangeType type)
uint nbBytesWord = device().nbBytesWord(type);
uint nbBytes = nbBytesWord * device().nbWords(type);
for (uint offset=0x0800; offset<nbBytes; offset+=64) {
- QMemArray<uchar> cmd = port().command(0x03, device().range(type).start.toUInt() + offset, 1, 0);
+ TQMemArray<uchar> cmd = port().command(0x03, device().range(type).start.toUInt() + offset, 1, 0);
if ( !port().sendAndReceive(cmd, 1) ) return false;
}
return true;
diff --git a/src/progs/picdem_bootloader/base/picdem_bootloader.h b/src/progs/picdem_bootloader/base/picdem_bootloader.h
index 3081382..e0b9cac 100644
--- a/src/progs/picdem_bootloader/base/picdem_bootloader.h
+++ b/src/progs/picdem_bootloader/base/picdem_bootloader.h
@@ -32,10 +32,10 @@ class Port : public ::Port::USB
{
public:
Port(Log::Base &base);
- bool receive(uint nb, QMemArray<uchar> &array);
- bool send(const QMemArray<uchar> &array);
- bool sendAndReceive(QMemArray<uchar> &data, uint nb);
- QMemArray<uchar> command(uchar instruction, uint address, uint len, uint nb) const;
+ bool receive(uint nb, TQMemArray<uchar> &array);
+ bool send(const TQMemArray<uchar> &array);
+ bool sendAndReceive(TQMemArray<uchar> &data, uint nb);
+ TQMemArray<uchar> command(uchar instruction, uint address, uint len, uint nb) const;
};
//-----------------------------------------------------------------------------
diff --git a/src/progs/picdem_bootloader/base/picdem_bootloader_data.h b/src/progs/picdem_bootloader/base/picdem_bootloader_data.h
index bf2a40f..a27dc48 100644
--- a/src/progs/picdem_bootloader/base/picdem_bootloader_data.h
+++ b/src/progs/picdem_bootloader/base/picdem_bootloader_data.h
@@ -12,8 +12,8 @@
namespace PicdemBootloader
{
struct Data {};
- extern bool isSupported(const QString &device);
- extern const Data &data(const QString &device);
+ extern bool isSupported(const TQString &device);
+ extern const Data &data(const TQString &device);
} // namespace
#endif
diff --git a/src/progs/picdem_bootloader/base/picdem_bootloader_prog.h b/src/progs/picdem_bootloader/base/picdem_bootloader_prog.h
index 698d612..cb82da0 100644
--- a/src/progs/picdem_bootloader/base/picdem_bootloader_prog.h
+++ b/src/progs/picdem_bootloader/base/picdem_bootloader_prog.h
@@ -19,6 +19,7 @@ namespace PicdemBootloader
class ProgrammerBase : public Bootloader::ProgrammerBase
{
Q_OBJECT
+ TQ_OBJECT
public:
ProgrammerBase(const Programmer::Group &group, const Pic::Data *data);
};
@@ -27,8 +28,8 @@ public:
class Group : public ::Bootloader::Group
{
public:
- virtual QString name() const { return "picdem_bootloader"; }
- virtual QString label() const { return i18n("Picdem Bootloader"); }
+ virtual TQString name() const { return "picdem_bootloader"; }
+ virtual TQString label() const { return i18n("Picdem Bootloader"); }
virtual ::Programmer::Properties properties() const { return ::Programmer::Programmer | ::Programmer::CanReadMemory; }
virtual ::Programmer::TargetPowerMode targetPowerMode() const { return ::Programmer::TargetSelfPowered; }
virtual bool isPortSupported(PortType type) const { return type==PortType::USB; }
diff --git a/src/progs/picdem_bootloader/gui/picdem_bootloader_ui.cpp b/src/progs/picdem_bootloader/gui/picdem_bootloader_ui.cpp
index c958249..fdfa3d1 100644
--- a/src/progs/picdem_bootloader/gui/picdem_bootloader_ui.cpp
+++ b/src/progs/picdem_bootloader/gui/picdem_bootloader_ui.cpp
@@ -11,18 +11,18 @@
#include "progs/picdem_bootloader/base/picdem_bootloader.h"
//-----------------------------------------------------------------------------
-PicdemBootloader::ConfigWidget::ConfigWidget(const ::Programmer::Group &group, QWidget *parent)
- : ::Programmer::ConfigWidget(group, parent)
+PicdemBootloader::ConfigWidget::ConfigWidget(const ::Programmer::Group &group, TQWidget *tqparent)
+ : ::Programmer::ConfigWidget(group, tqparent)
{
uint row = numRows();
- QLabel *label = new QLabel(i18n("USB Vendor Id:"), this);
+ TQLabel *label = new TQLabel(i18n("USB Vendor Id:"), this);
addWidget(label, row,row, 0,0);
_vendorId = new HexWordEditor(4, this);
addWidget(_vendorId, row,row, 1,1);
row++;
- label = new QLabel(i18n("USB Product Id:"), this);
+ label = new TQLabel(i18n("USB Product Id:"), this);
addWidget(label, row,row, 0,0);
_productId = new HexWordEditor(4, this);
addWidget(_productId, row,row, 1,1);
@@ -42,7 +42,7 @@ void PicdemBootloader::ConfigWidget::loadConfig()
}
//-----------------------------------------------------------------------------
-::Programmer::ConfigWidget *PicdemBootloader::GroupUI::createConfigWidget(QWidget *parent) const
+::Programmer::ConfigWidget *PicdemBootloader::GroupUI::createConfigWidget(TQWidget *tqparent) const
{
- return new ConfigWidget(static_cast<const ::Programmer::Group &>(group()), parent);
+ return new ConfigWidget(static_cast<const ::Programmer::Group &>(group()), tqparent);
}
diff --git a/src/progs/picdem_bootloader/gui/picdem_bootloader_ui.h b/src/progs/picdem_bootloader/gui/picdem_bootloader_ui.h
index 50777af..0540625 100644
--- a/src/progs/picdem_bootloader/gui/picdem_bootloader_ui.h
+++ b/src/progs/picdem_bootloader/gui/picdem_bootloader_ui.h
@@ -17,8 +17,9 @@ namespace PicdemBootloader
class ConfigWidget: public ::Programmer::ConfigWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- ConfigWidget(const ::Programmer::Group &group, QWidget *parent);
+ ConfigWidget(const ::Programmer::Group &group, TQWidget *tqparent);
virtual void loadConfig();
virtual void saveConfig();
@@ -30,7 +31,7 @@ private:
class GroupUI : public ::Bootloader::GroupUI
{
public:
- virtual ::Programmer::ConfigWidget *createConfigWidget(QWidget *parent) const;
+ virtual ::Programmer::ConfigWidget *createConfigWidget(TQWidget *tqparent) const;
};
} // namespace
diff --git a/src/progs/picdem_bootloader/xml/xml_picdem_bootloader_parser.cpp b/src/progs/picdem_bootloader/xml/xml_picdem_bootloader_parser.cpp
index 745b6a0..04c6e17 100644
--- a/src/progs/picdem_bootloader/xml/xml_picdem_bootloader_parser.cpp
+++ b/src/progs/picdem_bootloader/xml/xml_picdem_bootloader_parser.cpp
@@ -22,10 +22,10 @@ public:
XmlToData() : Programmer::XmlToData<Data>("picdem_bootloader", "PicdemBootloader") {}
private:
- virtual void parseData(QDomElement element, Data &data);
+ virtual void parseData(TQDomElement element, Data &data);
};
-void PicdemBootloader::XmlToData::parseData(QDomElement, Data &)
+void PicdemBootloader::XmlToData::parseData(TQDomElement, Data &)
{
const Device::Data *ddata = Device::lister().data(currentDevice());
if ( ddata->group().name()!="pic" ) qFatal("non-pic device not supported");
diff --git a/src/progs/pickit1/base/pickit1.cpp b/src/progs/pickit1/base/pickit1.cpp
index c5ab021..55d98e4 100644
--- a/src/progs/pickit1/base/pickit1.cpp
+++ b/src/progs/pickit1/base/pickit1.cpp
@@ -37,8 +37,8 @@ bool Pickit1::Baseline::incrementPC(uint nb)
// work around bugs in firmware
Array cmd;
uint high = (nb >> 8) & 0xFF;
- log(Log::DebugLevel::Extra, QString("work around bug in firmware (nb_inc=%1 high=%2)")
- .arg(toHexLabel(nb, 4)).arg(toHexLabel(high, 2)));
+ log(Log::DebugLevel::Extra, TQString("work around bug in firmware (nb_inc=%1 high=%2)")
+ .tqarg(toHexLabel(nb, 4)).tqarg(toHexLabel(high, 2)));
if ( high==1 ) {
cmd[0] = 'I';
cmd[1] = 0x40;
diff --git a/src/progs/pickit1/base/pickit1_data.h b/src/progs/pickit1/base/pickit1_data.h
index 767fc4b..75a65ea 100644
--- a/src/progs/pickit1/base/pickit1_data.h
+++ b/src/progs/pickit1/base/pickit1_data.h
@@ -9,7 +9,7 @@
#ifndef PICKIT1_DATA_H
#define PICKIT1_DATA_H
-#include <qstring.h>
+#include <tqstring.h>
namespace Pickit1
{
@@ -17,7 +17,7 @@ namespace Pickit1
char entryMode;
bool regenerateOsccal;
};
- extern const Data &data(const QString &device);
+ extern const Data &data(const TQString &device);
} // namespace
#endif
diff --git a/src/progs/pickit1/base/pickit1_prog.h b/src/progs/pickit1/base/pickit1_prog.h
index c0763b4..341e879 100644
--- a/src/progs/pickit1/base/pickit1_prog.h
+++ b/src/progs/pickit1/base/pickit1_prog.h
@@ -17,6 +17,7 @@ namespace Pickit1
class Base : public Pickit::Base
{
Q_OBJECT
+ TQ_OBJECT
public:
Base(const Programmer::Group &group, const Pic::Data *data) : Pickit::Base(group, data) {}
virtual bool deviceHasOsccalRegeneration() const;
@@ -31,8 +32,8 @@ private:
class Group : public Pickit::Group
{
public:
- virtual QString name() const { return "pickit1"; }
- virtual QString label() const { return i18n("PICkit1"); }
+ virtual TQString name() const { return "pickit1"; }
+ virtual TQString label() const { return i18n("PICkit1"); }
virtual Programmer::Properties properties() const { return ::Programmer::Programmer | ::Programmer::HasFirmware | ::Programmer::CanReadMemory | ::Programmer::HasConnectedState; }
protected:
diff --git a/src/progs/pickit1/gui/pickit1_group_ui.cpp b/src/progs/pickit1/gui/pickit1_group_ui.cpp
index 2c862fb..795533e 100644
--- a/src/progs/pickit1/gui/pickit1_group_ui.cpp
+++ b/src/progs/pickit1/gui/pickit1_group_ui.cpp
@@ -12,12 +12,12 @@
#include "progs/pickit2/gui/pickit2_group_ui.h"
#include "progs/pickit1/base/pickit1_prog.h"
-::Programmer::ConfigWidget *Pickit1::GroupUI::createConfigWidget(QWidget *parent) const
+::Programmer::ConfigWidget *Pickit1::GroupUI::createConfigWidget(TQWidget *tqparent) const
{
- return new ::Programmer::ConfigWidget(static_cast<const ::Programmer::Group &>(group()), parent);
+ return new ::Programmer::ConfigWidget(static_cast<const ::Programmer::Group &>(group()), tqparent);
}
-::Programmer::AdvancedDialog *Pickit1::GroupUI::createAdvancedDialog(::Programmer::Base &base, QWidget *parent) const
+::Programmer::AdvancedDialog *Pickit1::GroupUI::createAdvancedDialog(::Programmer::Base &base, TQWidget *tqparent) const
{
- return new Pickit::AdvancedDialog(static_cast<Base &>(base), parent, "pickit1_advanced_dialog");
+ return new Pickit::AdvancedDialog(static_cast<Base &>(base), tqparent, "pickit1_advanced_dialog");
}
diff --git a/src/progs/pickit1/gui/pickit1_group_ui.h b/src/progs/pickit1/gui/pickit1_group_ui.h
index 5fb8ad6..147f99c 100644
--- a/src/progs/pickit1/gui/pickit1_group_ui.h
+++ b/src/progs/pickit1/gui/pickit1_group_ui.h
@@ -17,9 +17,9 @@ namespace Pickit1
class GroupUI : public ::Programmer::GroupUI
{
public:
- virtual ::Programmer::ConfigWidget *createConfigWidget(QWidget *parent) const;
+ virtual ::Programmer::ConfigWidget *createConfigWidget(TQWidget *tqparent) const;
virtual bool hasAdvancedDialog() const { return true; }
- virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &base, QWidget *parent) const;
+ virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &base, TQWidget *tqparent) const;
};
} // namespace
diff --git a/src/progs/pickit1/xml/xml_pickit1_parser.cpp b/src/progs/pickit1/xml/xml_pickit1_parser.cpp
index e5d1b78..9fbfafc 100644
--- a/src/progs/pickit1/xml/xml_pickit1_parser.cpp
+++ b/src/progs/pickit1/xml/xml_pickit1_parser.cpp
@@ -18,14 +18,14 @@ public:
XmlToData() : Programmer::XmlToData<Data>("pickit1", "Pickit1") {}
private:
- virtual void parseData(QDomElement element, Data &data);
- virtual void outputData(const Data &data, QTextStream &s) const;
- virtual void outputFunctions(QTextStream &s) const;
+ virtual void parseData(TQDomElement element, Data &data);
+ virtual void outputData(const Data &data, TQTextStream &s) const;
+ virtual void outputFunctions(TQTextStream &s) const;
};
-void Pickit1::XmlToData::parseData(QDomElement element, Data &data)
+void Pickit1::XmlToData::parseData(TQDomElement element, Data &data)
{
- QString s = element.attribute("entry");
+ TQString s = element.attribute("entry");
if ( s.length()!=1 || (s[0]!='O' && s[0]!='P') ) qFatal("Invalid or missing entry mode");
data.entryMode = s[0].latin1();
s = element.attribute("regen");
@@ -34,12 +34,12 @@ void Pickit1::XmlToData::parseData(QDomElement element, Data &data)
else qFatal("Invalid regen value");
}
-void Pickit1::XmlToData::outputData(const Data &data, QTextStream &s) const
+void Pickit1::XmlToData::outputData(const Data &data, TQTextStream &s) const
{
s << "'" << data.entryMode << "', " << (data.regenerateOsccal ? "true" : "false");
}
-void Pickit1::XmlToData::outputFunctions(QTextStream &s) const
+void Pickit1::XmlToData::outputFunctions(TQTextStream &s) const
{
Programmer::XmlToData<Data>::outputFunctions(s);
s << "::Programmer::DeviceSpecific *Group::createDeviceSpecific(Programmer::Base &base) const" << endl;
@@ -47,7 +47,7 @@ void Pickit1::XmlToData::outputFunctions(QTextStream &s) const
s << " uint i = family(static_cast< ::Pickit1::Base &>(base).device()->name());" << endl;
s << " switch(i) {" << endl;
for (uint i=0; i<uint(families().count()); i++) {
- s << " case " + QString::number(i) + ": return new " + families()[i] + "(base);" << endl;
+ s << " case " + TQString::number(i) + ": return new " + families()[i] + "(base);" << endl;
}
s << " }" << endl;
s << " Q_ASSERT(false);" << endl;
diff --git a/src/progs/pickit2/base/pickit.cpp b/src/progs/pickit2/base/pickit.cpp
index 7da2d18..3344ef8 100644
--- a/src/progs/pickit2/base/pickit.cpp
+++ b/src/progs/pickit2/base/pickit.cpp
@@ -18,12 +18,12 @@ Pickit::Array::Array(uint length, uchar fillChar, PrintMode mode)
_data.fill(fillChar);
}
-QString Pickit::Array::pretty() const
+TQString Pickit::Array::pretty() const
{
int end = _data.count() - 1;
for (; end>=0; end--)
if ( _data[end]!=_fillChar ) break;
- QString s;
+ TQString s;
for (int i=0; i<=end; i++) s += toPrintable(_data[i], _mode);
return s;
}
@@ -52,14 +52,14 @@ bool Pickit::USBPort::command(const char *s)
bool Pickit::USBPort::command(const Array &cmd)
{
- log(Log::DebugLevel::Extra, QString("send command: \"%1\"").arg(cmd.pretty()));
+ log(Log::DebugLevel::Extra, TQString("send command: \"%1\"").tqarg(cmd.pretty()));
return write(writeEndPoint(), (const char *)cmd._data.data(), cmd.length());
}
bool Pickit::USBPort::receive(Pickit::Array &array)
{
if ( !read(readEndPoint(), (char *)array._data.data(), array.length()) ) return false;
- log(Log::DebugLevel::Max, QString("received: \"%1\"").arg(array.pretty()));
+ log(Log::DebugLevel::Max, TQString("received: \"%1\"").tqarg(array.pretty()));
return true;
}
@@ -78,11 +78,11 @@ bool Pickit::USBPort::getMode(VersionData &version, ::Programmer::Mode &mode)
return true;
}
-bool Pickit::USBPort::receiveWords(uint nbBytesWord, uint nbRead, QValueVector<uint> &words, uint offset)
+bool Pickit::USBPort::receiveWords(uint nbBytesWord, uint nbRead, TQValueVector<uint> &words, uint offset)
{
- log(Log::DebugLevel::Max, QString("receive words nbBytesWord=%1 nbRead=%2 offset=%3").arg(nbBytesWord).arg(nbRead).arg(offset));
+ log(Log::DebugLevel::Max, TQString("receive words nbBytesWord=%1 nbRead=%2 offset=%3").tqarg(nbBytesWord).tqarg(nbRead).tqarg(offset));
Array a = array();
- QMemArray<uchar> data(nbRead*a.length());
+ TQMemArray<uchar> data(nbRead*a.length());
uint l = 0;
for (uint i=0; i<nbRead; i++) {
if ( !receive(a) ) return false;
@@ -101,7 +101,7 @@ bool Pickit::USBPort::receiveWords(uint nbBytesWord, uint nbRead, QValueVector<u
//-----------------------------------------------------------------------------
Pickit::Hardware::Hardware(::Programmer::Base &base, USBPort *port)
- : ::Programmer::PicHardware(base, port, QString::null)
+ : ::Programmer::PicHardware(base, port, TQString())
{}
bool Pickit::Hardware::internalConnectHardware()
@@ -149,7 +149,7 @@ bool Pickit::Hardware::regenerateOsccal(BitValue &newValue)
cmd[4] = 'r';
cmd[5] = 'p';
if ( !port().command(cmd) ) return false;
- QValueVector<uint> words;
+ TQValueVector<uint> words;
if ( !port().receiveWords(1, 1, words) ) return false;
newValue = words[7] | 0x3400;
return true;
@@ -176,7 +176,7 @@ bool Pickit::BMDeviceSpecific::doRead(Pic::MemoryRangeType type, Device::Array &
{
data.resize(device().nbWords(type));
gotoMemory(type);
- QValueVector<uint> words;
+ TQValueVector<uint> words;
switch (type.type()) {
case Pic::MemoryRangeType::Config:
case Pic::MemoryRangeType::Code:
diff --git a/src/progs/pickit2/base/pickit.h b/src/progs/pickit2/base/pickit.h
index 741ed61..184a110 100644
--- a/src/progs/pickit2/base/pickit.h
+++ b/src/progs/pickit2/base/pickit.h
@@ -23,7 +23,7 @@ class Array
{
public:
uint length() const { return _data.count(); }
- QString pretty() const;
+ TQString pretty() const;
uchar &operator[](uint i) { return _data[i]; }
uchar operator[](uint i) const { return _data[i]; }
@@ -33,7 +33,7 @@ protected:
private:
uchar _fillChar;
PrintMode _mode;
- QMemArray<uchar> _data;
+ TQMemArray<uchar> _data;
friend class USBPort;
};
@@ -49,7 +49,7 @@ public:
bool command(const char *s);
bool receive(Array &data);
bool getMode(VersionData &version, ::Programmer::Mode &mode);
- bool receiveWords(uint nbBytesWord, uint nbRead, QValueVector<uint> &data, uint offset = 0);
+ bool receiveWords(uint nbBytesWord, uint nbRead, TQValueVector<uint> &data, uint offset = 0);
protected:
virtual uint writeEndPoint() const = 0;
diff --git a/src/progs/pickit2/base/pickit2.cpp b/src/progs/pickit2/base/pickit2.cpp
index 6458fa2..6a010ff 100644
--- a/src/progs/pickit2/base/pickit2.cpp
+++ b/src/progs/pickit2/base/pickit2.cpp
@@ -43,16 +43,16 @@ bool Pickit2::USBPort::readFirmwareCodeMemory(Device::Array &data, const Device:
uint nb = end - start + 1;
Pickit::Array cmd = createCommand(1, 2*nb, 2*i);
if ( !command(cmd) ) return false;
- QValueVector<uint> read;
+ TQValueVector<uint> read;
if ( !receiveWords(1, 1, read) ) return false;
for (uint k=0; k<nb; k++) {
uint index = i + start + k;
data[index]= read[5 + 2*k] & 0xFF | (read[6 + 2*k] << 8);
if ( vdata && index>=0x1000 && index<0x3FF0 && data[index]!=(*vdata)[index] ) {
log(Log::LineType::Error, i18n("Firmware memory does not match hex file (at address 0x%2: reading 0x%3 and expecting 0x%4).")
- .arg(QString(toHex(index/2, device->nbCharsAddress())))
- .arg(QString(toHex(data[index], device->nbCharsWord(Pic::MemoryRangeType::Code))))
- .arg(QString(toHex((*vdata)[index], device->nbCharsWord(Pic::MemoryRangeType::Code)))));
+ .tqarg(TQString(toHex(index/2, device->nbCharsAddress())))
+ .tqarg(TQString(toHex(data[index], device->nbCharsWord(Pic::MemoryRangeType::Code))))
+ .tqarg(TQString(toHex((*vdata)[index], device->nbCharsWord(Pic::MemoryRangeType::Code)))));
return false;
}
}
@@ -111,7 +111,7 @@ bool Pickit2::USBPort::uploadFirmware(const Pic::Memory &memory, ProgressMonitor
//-----------------------------------------------------------------------------
bool Pickit2::Hardware::readVoltages(VoltagesData &voltages)
{
- log(Log::DebugLevel::Extra, QString("readVoltages: Firmware is %1").arg(_base.firmwareVersion().pretty()));
+ log(Log::DebugLevel::Extra, TQString("readVoltages: Firmware is %1").tqarg(_base.firmwareVersion().pretty()));
if ( _base.firmwareVersion()<VersionData(1, 20, 0) ) {
log(Log::LineType::Warning, i18n("Cannot read voltages with this firmware version."));
return true;
@@ -128,9 +128,9 @@ bool Pickit2::Hardware::readVoltages(VoltagesData &voltages)
bool Pickit2::Hardware::setVddVpp(double vdd, double vpp)
{
- log(Log::DebugLevel::Extra, QString("setVddVpp: Firmware is %1").arg(_base.firmwareVersion().pretty()));
+ log(Log::DebugLevel::Extra, TQString("setVddVpp: Firmware is %1").tqarg(_base.firmwareVersion().pretty()));
if ( _base.firmwareVersion()<VersionData(1, 20, 0) ) return true;
- log(Log::DebugLevel::Normal, QString(" set Vdd = %1 V and Vpp = %2 V").arg(vdd).arg(vpp));
+ log(Log::DebugLevel::Normal, TQString(" set Vdd = %1 V and Vpp = %2 V").tqarg(vdd).tqarg(vpp));
Array cmd;
cmd[0] = 's';
uint cvdd = uint(32.0 * vdd + 12.5);
@@ -313,7 +313,7 @@ bool Pickit2::P18F::doRead(Pic::MemoryRangeType type, Device::Array &data, const
{
USBPort &port = static_cast<USBPort &>(hardware().port());
data.resize(device().nbWords(type));
- QValueVector<uint> words;
+ TQValueVector<uint> words;
switch (type.type()) {
case Pic::MemoryRangeType::DeviceId:
case Pic::MemoryRangeType::UserId:
diff --git a/src/progs/pickit2/base/pickit2_data.h b/src/progs/pickit2/base/pickit2_data.h
index abae867..7eece69 100644
--- a/src/progs/pickit2/base/pickit2_data.h
+++ b/src/progs/pickit2/base/pickit2_data.h
@@ -9,7 +9,7 @@
#ifndef PICKIT2_DATA_H
#define PICKIT2_DATA_H
-#include <qstring.h>
+#include <tqstring.h>
namespace Pickit2
{
@@ -18,7 +18,7 @@ namespace Pickit2
uchar progWidth;
bool regenerateOsccal;
};
- extern const Data &data(const QString &device);
+ extern const Data &data(const TQString &device);
} // namespace
#endif
diff --git a/src/progs/pickit2/base/pickit2_prog.cpp b/src/progs/pickit2/base/pickit2_prog.cpp
index 88b73b9..3e3a2bd 100644
--- a/src/progs/pickit2/base/pickit2_prog.cpp
+++ b/src/progs/pickit2/base/pickit2_prog.cpp
@@ -50,10 +50,10 @@ bool Pickit2::Base::doUploadFirmware(PURL::File &file)
{
const Pic::Data &data = static_cast<const Pic::Data &>(*Device::lister().data("18F2550"));
Pic::Memory memory(static_cast<const Pic::Data &>(data));
- QStringList errors, warnings;
+ TQStringList errors, warnings;
Pic::Memory::WarningTypes warningTypes;
if ( !memory.load(file.stream(), errors, warningTypes, warnings) ) {
- log(Log::LineType::Error, i18n("Could not read firmware hex file \"%1\" (%2).").arg(file.url().pretty()).arg(errors[0]));
+ log(Log::LineType::Error, i18n("Could not read firmware hex file \"%1\" (%2).").tqarg(file.url().pretty()).tqarg(errors[0]));
return false;
}
if ( warningTypes!=Pic::Memory::NoWarning ) {
diff --git a/src/progs/pickit2/base/pickit2_prog.h b/src/progs/pickit2/base/pickit2_prog.h
index 5a67e2a..31efb44 100644
--- a/src/progs/pickit2/base/pickit2_prog.h
+++ b/src/progs/pickit2/base/pickit2_prog.h
@@ -18,6 +18,7 @@ namespace Pickit2
class Base : public Pickit::Base
{
Q_OBJECT
+ TQ_OBJECT
public:
Base(const Programmer::Group &group, const Pic::Data *data) : Pickit::Base(group, data) {}
virtual bool deviceHasOsccalRegeneration() const;
@@ -33,8 +34,8 @@ private:
class Group : public Pickit::Group
{
public:
- virtual QString name() const { return "pickit2"; }
- virtual QString label() const { return i18n("PICkit2 Firmware 1.x"); }
+ virtual TQString name() const { return "pickit2"; }
+ virtual TQString label() const { return i18n("PICkit2 Firmware 1.x"); }
virtual Programmer::Properties properties() const { return ::Programmer::Programmer | ::Programmer::HasFirmware | ::Programmer::CanUploadFirmware | ::Programmer::CanReadMemory | ::Programmer::HasConnectedState; }
virtual bool canReadVoltage(Pic::VoltageType type) const { return ( type==Pic::TargetVdd || type==Pic::TargetVpp ); }
diff --git a/src/progs/pickit2/base/pickit_prog.cpp b/src/progs/pickit2/base/pickit_prog.cpp
index c11dd08..f894906 100644
--- a/src/progs/pickit2/base/pickit_prog.cpp
+++ b/src/progs/pickit2/base/pickit_prog.cpp
@@ -28,22 +28,22 @@ bool Pickit::Base::readFirmwareVersion()
bool Pickit::Base::regenerateOsccal(const PURL::Url &url)
{
- log(Log::DebugLevel::Normal, QString(" Calibration firmware file: %1").arg(url.pretty()));
+ log(Log::DebugLevel::Normal, TQString(" Calibration firmware file: %1").tqarg(url.pretty()));
Log::StringView sview;
PURL::File file(url, sview);
if ( !file.openForRead() ) {
- log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").arg(url.pretty()));
+ log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").tqarg(url.pretty()));
return false;
}
Pic::Memory memory(*device());
- QStringList errors, warnings;
+ TQStringList errors, warnings;
Pic::Memory::WarningTypes warningTypes;
if ( !memory.load(file.stream(), errors, warningTypes, warnings) ) {
- log(Log::LineType::Error, i18n("Could not read calibration firmware file \"%1\" (%2).").arg(url.pretty()).arg(errors[0]));
+ log(Log::LineType::Error, i18n("Could not read calibration firmware file \"%1\" (%2).").tqarg(url.pretty()).tqarg(errors[0]));
return false;
}
if ( warningTypes!=Pic::Memory::NoWarning ) {
- log(Log::LineType::Error, i18n("Calibration firmware file seems incompatible with selected device %1.").arg(device()->name()));
+ log(Log::LineType::Error, i18n("Calibration firmware file seems incompatible with selected device %1.").tqarg(device()->name()));
return false;
}
if ( !askContinue(i18n("This will overwrite the device code memory. Continue anyway?")) ) return false;
diff --git a/src/progs/pickit2/base/pickit_prog.h b/src/progs/pickit2/base/pickit_prog.h
index b35fc92..7d2e76d 100644
--- a/src/progs/pickit2/base/pickit_prog.h
+++ b/src/progs/pickit2/base/pickit_prog.h
@@ -22,6 +22,7 @@ class Hardware;
class Base : public Programmer::PicBase
{
Q_OBJECT
+ TQ_OBJECT
public:
Base(const Programmer::Group &group, const Pic::Data *data);
virtual bool deviceHasOsccalRegeneration() const = 0;
diff --git a/src/progs/pickit2/gui/pickit2_group_ui.cpp b/src/progs/pickit2/gui/pickit2_group_ui.cpp
index f36395a..473dea7 100644
--- a/src/progs/pickit2/gui/pickit2_group_ui.cpp
+++ b/src/progs/pickit2/gui/pickit2_group_ui.cpp
@@ -18,8 +18,8 @@
#include "progs/pickit2/base/pickit2.h"
//----------------------------------------------------------------------------
-Pickit::AdvancedDialog::AdvancedDialog(Base &base, QWidget *parent, const char *name)
- : ::Programmer::PicAdvancedDialog(base, parent, name)
+Pickit::AdvancedDialog::AdvancedDialog(Base &base, TQWidget *tqparent, const char *name)
+ : ::Programmer::PicAdvancedDialog(base, tqparent, name)
{}
void Pickit::AdvancedDialog::regenerateCalibration()
@@ -41,12 +41,12 @@ void Pickit::AdvancedDialog::regenerateCalibration()
}
//----------------------------------------------------------------------------
-::Programmer::ConfigWidget *Pickit2::GroupUI::createConfigWidget(QWidget *parent) const
+::Programmer::ConfigWidget *Pickit2::GroupUI::createConfigWidget(TQWidget *tqparent) const
{
- return new ::Programmer::ConfigWidget(static_cast<const ::Programmer::Group &>(group()), parent);
+ return new ::Programmer::ConfigWidget(static_cast<const ::Programmer::Group &>(group()), tqparent);
}
-::Programmer::AdvancedDialog *Pickit2::GroupUI::createAdvancedDialog(::Programmer::Base &base, QWidget *parent) const
+::Programmer::AdvancedDialog *Pickit2::GroupUI::createAdvancedDialog(::Programmer::Base &base, TQWidget *tqparent) const
{
- return new Pickit::AdvancedDialog(static_cast<Base &>(base), parent, "pickit2_advanced_dialog");
+ return new Pickit::AdvancedDialog(static_cast<Base &>(base), tqparent, "pickit2_advanced_dialog");
}
diff --git a/src/progs/pickit2/gui/pickit2_group_ui.h b/src/progs/pickit2/gui/pickit2_group_ui.h
index f79aa1f..78da904 100644
--- a/src/progs/pickit2/gui/pickit2_group_ui.h
+++ b/src/progs/pickit2/gui/pickit2_group_ui.h
@@ -18,8 +18,9 @@ namespace Pickit
class AdvancedDialog : public ::Programmer::PicAdvancedDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- AdvancedDialog(Base &base, QWidget *parent, const char *name);
+ AdvancedDialog(Base &base, TQWidget *tqparent, const char *name);
Base &base() { return static_cast<Base &>(_base); }
public slots:
@@ -33,9 +34,9 @@ namespace Pickit2
class GroupUI : public ::Programmer::GroupUI
{
public:
- virtual ::Programmer::ConfigWidget *createConfigWidget(QWidget *parent) const;
+ virtual ::Programmer::ConfigWidget *createConfigWidget(TQWidget *tqparent) const;
virtual bool hasAdvancedDialog() const { return true; }
- virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &base, QWidget *parent) const;
+ virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &base, TQWidget *tqparent) const;
};
} // namespace
diff --git a/src/progs/pickit2/xml/xml_pickit2_parser.cpp b/src/progs/pickit2/xml/xml_pickit2_parser.cpp
index ffc82f7..686e4b2e 100644
--- a/src/progs/pickit2/xml/xml_pickit2_parser.cpp
+++ b/src/progs/pickit2/xml/xml_pickit2_parser.cpp
@@ -18,14 +18,14 @@ public:
XmlToData() : Programmer::XmlToData<Data>("pickit2", "Pickit2") {}
private:
- virtual void parseData(QDomElement element, Data &data);
- virtual void outputData(const Data &data, QTextStream &s) const;
- virtual void outputFunctions(QTextStream &s) const;
+ virtual void parseData(TQDomElement element, Data &data);
+ virtual void outputData(const Data &data, TQTextStream &s) const;
+ virtual void outputFunctions(TQTextStream &s) const;
};
-void Pickit2::XmlToData::parseData(QDomElement element, Data &data)
+void Pickit2::XmlToData::parseData(TQDomElement element, Data &data)
{
- QString s = element.attribute("entry");
+ TQString s = element.attribute("entry");
if ( s.length()!=1 || (s[0]!='O' && s[0]!='P') ) qFatal("Invalid or missing entry mode");
data.entryMode = s[0].latin1();
s = element.attribute("pmode");
@@ -47,13 +47,13 @@ void Pickit2::XmlToData::parseData(QDomElement element, Data &data)
else qFatal("Invalid regen value");
}
-void Pickit2::XmlToData::outputData(const Data &data, QTextStream &s) const
+void Pickit2::XmlToData::outputData(const Data &data, TQTextStream &s) const
{
s << "'" << data.entryMode << "', '" << data.progMode;
s << "', " << data.progWidth << ", " << (data.regenerateOsccal ? "true" : "false");
}
-void Pickit2::XmlToData::outputFunctions(QTextStream &s) const
+void Pickit2::XmlToData::outputFunctions(TQTextStream &s) const
{
Programmer::XmlToData<Data>::outputFunctions(s);
s << "::Programmer::DeviceSpecific *Group::createDeviceSpecific(::Programmer::Base &base) const" << endl;
@@ -61,7 +61,7 @@ void Pickit2::XmlToData::outputFunctions(QTextStream &s) const
s << " uint i = family(static_cast< ::Pickit2::Base &>(base).device()->name());" << endl;
s << " switch(i) {" << endl;
for (uint i=0; i<uint(families().count()); i++) {
- s << " case " + QString::number(i) + ": return new " + families()[i] + "(base);" << endl;
+ s << " case " + TQString::number(i) + ": return new " + families()[i] + "(base);" << endl;
}
s << " }" << endl;
s << " Q_ASSERT(false);" << endl;
diff --git a/src/progs/pickit2_bootloader/base/pickit2_bootloader.cpp b/src/progs/pickit2_bootloader/base/pickit2_bootloader.cpp
index d080481..5a60a28 100644
--- a/src/progs/pickit2_bootloader/base/pickit2_bootloader.cpp
+++ b/src/progs/pickit2_bootloader/base/pickit2_bootloader.cpp
@@ -33,7 +33,7 @@ bool Pickit2Bootloader::Hardware::internalConnectHardware()
}
}
}
- log(Log::LineType::Information, i18n("Bootloader version %1 detected.").arg(version.pretty()));
+ log(Log::LineType::Information, i18n("Bootloader version %1 detected.").tqarg(version.pretty()));
if ( version.majorNum()!=2 ) {
log(Log::LineType::Error, i18n("Only bootloader version 2.x is supported."));
return false;
@@ -48,9 +48,9 @@ bool Pickit2Bootloader::Hardware::write(Pic::MemoryRangeType type, const Device:
// check that there is nothing in bootloader reserved area
for (uint i=0; i<data.count(); i++) {
if ( i>=0x1000 && i<0x3FF0 ) continue;
- if ( data[i]==device().mask(Pic::MemoryRangeType::Code) ) continue;
+ if ( data[i]==device().tqmask(Pic::MemoryRangeType::Code) ) continue;
uint address = device().addressIncrement(Pic::MemoryRangeType::Code) * i;
- log(Log::LineType::Warning, " " + i18n("Code is present in bootloader reserved area (at address %1). It will be ignored.").arg(toHexLabel(address, device().nbCharsAddress())));
+ log(Log::LineType::Warning, " " + i18n("Code is present in bootloader reserved area (at address %1). It will be ignored.").tqarg(toHexLabel(address, device().nbCharsAddress())));
break;
}
return port().writeFirmwareCodeMemory(data, _base.progressMonitor());
diff --git a/src/progs/pickit2_bootloader/base/pickit2_bootloader_data.h b/src/progs/pickit2_bootloader/base/pickit2_bootloader_data.h
index 87aead1..92ca6fa 100644
--- a/src/progs/pickit2_bootloader/base/pickit2_bootloader_data.h
+++ b/src/progs/pickit2_bootloader/base/pickit2_bootloader_data.h
@@ -12,8 +12,8 @@
namespace Pickit2Bootloader
{
struct Data {};
- extern bool isSupported(const QString &device);
- extern const Data &data(const QString &device);
+ extern bool isSupported(const TQString &device);
+ extern const Data &data(const TQString &device);
} // namespace
#endif
diff --git a/src/progs/pickit2_bootloader/base/pickit2_bootloader_prog.h b/src/progs/pickit2_bootloader/base/pickit2_bootloader_prog.h
index 461d734..b7e8bd8 100644
--- a/src/progs/pickit2_bootloader/base/pickit2_bootloader_prog.h
+++ b/src/progs/pickit2_bootloader/base/pickit2_bootloader_prog.h
@@ -19,6 +19,7 @@ namespace Pickit2Bootloader
class ProgrammerBase : public ::Bootloader::ProgrammerBase
{
Q_OBJECT
+ TQ_OBJECT
public:
ProgrammerBase(const Programmer::Group &group, const Pic::Data *data);
virtual bool verifyDeviceId() { return true; }
@@ -28,8 +29,8 @@ public:
class Group : public ::Bootloader::Group
{
public:
- virtual QString name() const { return "pickit2_bootloader"; }
- virtual QString label() const { return i18n("Pickit2 Bootloader"); }
+ virtual TQString name() const { return "pickit2_bootloader"; }
+ virtual TQString label() const { return i18n("Pickit2 Bootloader"); }
virtual ::Programmer::Properties properties() const { return ::Programmer::Programmer | ::Programmer::CanReadMemory; }
virtual ::Programmer::TargetPowerMode targetPowerMode() const { return ::Programmer::TargetSelfPowered; }
virtual bool isPortSupported(PortType type) const { return type==PortType::USB; }
diff --git a/src/progs/pickit2_bootloader/gui/pickit2_bootloader_ui.cpp b/src/progs/pickit2_bootloader/gui/pickit2_bootloader_ui.cpp
index 89bf5c7..f68e39a 100644
--- a/src/progs/pickit2_bootloader/gui/pickit2_bootloader_ui.cpp
+++ b/src/progs/pickit2_bootloader/gui/pickit2_bootloader_ui.cpp
@@ -9,12 +9,12 @@
#include "pickit2_bootloader_ui.h"
//-----------------------------------------------------------------------------
-Pickit2Bootloader::ConfigWidget::ConfigWidget(const::Programmer::Group &group, QWidget *parent)
- : ::Programmer::ConfigWidget(group, parent)
+Pickit2Bootloader::ConfigWidget::ConfigWidget(const::Programmer::Group &group, TQWidget *tqparent)
+ : ::Programmer::ConfigWidget(group, tqparent)
{}
//-----------------------------------------------------------------------------
-::Programmer::ConfigWidget *Pickit2Bootloader::GroupUI::createConfigWidget(QWidget *parent) const
+::Programmer::ConfigWidget *Pickit2Bootloader::GroupUI::createConfigWidget(TQWidget *tqparent) const
{
- return new ConfigWidget(static_cast<const ::Programmer::Group &>(group()), parent);
+ return new ConfigWidget(static_cast<const ::Programmer::Group &>(group()), tqparent);
}
diff --git a/src/progs/pickit2_bootloader/gui/pickit2_bootloader_ui.h b/src/progs/pickit2_bootloader/gui/pickit2_bootloader_ui.h
index d715574..e1c88fc 100644
--- a/src/progs/pickit2_bootloader/gui/pickit2_bootloader_ui.h
+++ b/src/progs/pickit2_bootloader/gui/pickit2_bootloader_ui.h
@@ -17,8 +17,9 @@ namespace Pickit2Bootloader
class ConfigWidget: public ::Programmer::ConfigWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- ConfigWidget(const::Programmer::Group &group, QWidget *parent);
+ ConfigWidget(const::Programmer::Group &group, TQWidget *tqparent);
virtual void loadConfig() {}
virtual void saveConfig() {}
};
@@ -28,7 +29,7 @@ public:
class GroupUI : public ::Bootloader::GroupUI
{
public:
- virtual ::Programmer::ConfigWidget *createConfigWidget(QWidget *parent) const;
+ virtual ::Programmer::ConfigWidget *createConfigWidget(TQWidget *tqparent) const;
};
} // namespace
diff --git a/src/progs/pickit2_bootloader/xml/xml_pickit2_bootloader_parser.cpp b/src/progs/pickit2_bootloader/xml/xml_pickit2_bootloader_parser.cpp
index 150e814..f718c03 100644
--- a/src/progs/pickit2_bootloader/xml/xml_pickit2_bootloader_parser.cpp
+++ b/src/progs/pickit2_bootloader/xml/xml_pickit2_bootloader_parser.cpp
@@ -22,10 +22,10 @@ public:
XmlToData() : Programmer::XmlToData<Data>("pickit2_bootloader", "Pickit2Bootloader") {}
private:
- virtual void parseData(QDomElement element, Data &data);
+ virtual void parseData(TQDomElement element, Data &data);
};
-void Pickit2Bootloader::XmlToData::parseData(QDomElement, Data &)
+void Pickit2Bootloader::XmlToData::parseData(TQDomElement, Data &)
{
const Device::Data *ddata = Device::lister().data(currentDevice());
if ( ddata->group().name()!="pic" ) qFatal("non-pic device not supported");
diff --git a/src/progs/pickit2v2/base/pickit2v2.cpp b/src/progs/pickit2v2/base/pickit2v2.cpp
index 31dd6ca..d813a52 100644
--- a/src/progs/pickit2v2/base/pickit2v2.cpp
+++ b/src/progs/pickit2v2/base/pickit2v2.cpp
@@ -23,7 +23,7 @@ const Pickit2V2::FamilyData *Pickit2V2::familyData(const Pic::Data &device)
//-----------------------------------------------------------------------------
Pickit2V2::Hardware::Hardware(::Programmer::Base &base)
- : ::Programmer::PicHardware(base, new USBPort(base), QString::null),
+ : ::Programmer::PicHardware(base, new USBPort(base), TQString()),
_scriptBufferChecksum(0), _deviceSet(false)
{}
@@ -45,9 +45,9 @@ bool Pickit2V2::Hardware::setTarget()
return true;
}
-bool Pickit2V2::Hardware::readStatus(ushort &status)
+bool Pickit2V2::Hardware::readtqStatus(ushort &status)
{
- if ( !port().command(ReadStatus) ) return false;
+ if ( !port().command(ReadtqStatus) ) return false;
Array a;
if ( !port().receive(a) ) return false;
status = (a[1] << 8) + a[0];
@@ -68,7 +68,7 @@ bool Pickit2V2::Hardware::executeScript(uint i)
{
Q_ASSERT( i!=0 );
const ScriptData &sdata = SCRIPT_DATA[i-1];
- log(Log::DebugLevel::Extra, QString("execute script #%1: %2").arg(i).arg(sdata.name));
+ log(Log::DebugLevel::Extra, TQString("execute script #%1: %2").tqarg(i).tqarg(sdata.name));
return sendScript(sdata.data, sdata.length);
}
@@ -78,7 +78,7 @@ bool Pickit2V2::Hardware::getScriptBufferChecksum(uint &checksum)
Array array;
if ( !port().receive(array) ) return false;
checksum = (array[0] << 24) + (array[1] << 16) + (array[2] << 8) + array[3];
- log(Log::DebugLevel::Extra, QString("get script buffer checksum: %1").arg(toHexLabel(checksum, 8)));
+ log(Log::DebugLevel::Extra, TQString("get script buffer checksum: %1").tqarg(toHexLabel(checksum, 8)));
return true;
}
@@ -86,8 +86,8 @@ bool Pickit2V2::Hardware::downloadScript(ScriptType type, uint i)
{
if (i==0 ) return true; // empty script
const ScriptData &sdata = SCRIPT_DATA[i-1];
- log(Log::DebugLevel::Max, QString(" download script #%1 (\"%2\") at position #%3")
- .arg(i-1).arg(sdata.name).arg(toHexLabel(type, 2)));
+ log(Log::DebugLevel::Max, TQString(" download script #%1 (\"%2\") at position #%3")
+ .tqarg(i-1).tqarg(sdata.name).tqarg(toHexLabel(type, 2)));
Array cmd;
cmd[0] = DownloadScript;
cmd[1] = type;
@@ -145,8 +145,8 @@ bool Pickit2V2::Hardware::setTargetReset(Pic::ResetMode mode)
bool Pickit2V2::Hardware::setVddVoltage(double value, double threshold)
{
- ushort v = ushort(qRound(32.0*value + 10.5)) << 6;
- uchar vfault = uchar(qRound(256.0 * (threshold * value) / 5.0));
+ ushort v = ushort(tqRound(32.0*value + 10.5)) << 6;
+ uchar vfault = uchar(tqRound(256.0 * (threshold * value) / 5.0));
if ( vfault>210 ) vfault = 210;
Array cmd;
cmd[0] = SetVdd;
@@ -161,14 +161,14 @@ bool Pickit2V2::Hardware::setVppVoltage(double value, double threshold)
Array cmd;
cmd[0] = SetVpp;
cmd[1] = 0x40;
- cmd[2] = uchar(qRound(18.61*value));
- cmd[3] = uchar(qRound(18.61*value*threshold));
+ cmd[2] = uchar(tqRound(18.61*value));
+ cmd[3] = uchar(tqRound(18.61*value*threshold));
return port().command(cmd);
}
bool Pickit2V2::Hardware::setVddOn(bool on)
{
- log(Log::DebugLevel::Extra, QString("Vdd set to %1, self powered is %2").arg(on).arg(_base.isTargetSelfPowered()));
+ log(Log::DebugLevel::Extra, TQString("Vdd set to %1, self powered is %2").tqarg(on).tqarg(_base.isTargetSelfPowered()));
ushort script[2];
script[0] = (on ? VddGroundOff : VddOff);
if ( _base.isTargetSelfPowered() ) script[1] = (on ? VddOff : VddGroundOff);
@@ -215,7 +215,7 @@ bool Pickit2V2::Hardware::readVoltages(VoltagesData &voltagesData)
bool Pickit2V2::Hardware::downloadAddress(Address address)
{
- log(Log::DebugLevel::Max, QString("download address %1").arg(toHexLabel(address, 6)));
+ log(Log::DebugLevel::Max, TQString("download address %1").tqarg(toHexLabel(address, 6)));
Array cmd;
cmd[0] = ClearDownloadBuffer;
cmd[1] = DownloadData;
@@ -228,8 +228,8 @@ bool Pickit2V2::Hardware::downloadAddress(Address address)
bool Pickit2V2::Hardware::runScript(ScriptType stype, uint repetitions, uint nbNoLens)
{
- log(Log::DebugLevel::Max, QString("run script %1: repetitions=%2 nbNoLen=%3")
- .arg(toHexLabel(stype, 2)).arg(repetitions).arg(nbNoLens));
+ log(Log::DebugLevel::Max, TQString("run script %1: repetitions=%2 nbNoLen=%3")
+ .tqarg(toHexLabel(stype, 2)).tqarg(repetitions).tqarg(nbNoLens));
#if 0 // ALTERNATE METHOD
const Data &d = data(device().name());
for (uint i=0; i<repetitions; i++)
@@ -283,7 +283,7 @@ bool Pickit2V2::Hardware::readMemory(Pic::MemoryRangeType otype, Device::Array &
{
uint nbWords = device().nbWords(otype);
data.resize(nbWords);
- log(Log::DebugLevel::Max, QString("read %1 nbWords=%2").arg(otype.label()).arg(nbWords));
+ log(Log::DebugLevel::Max, TQString("read %1 nbWords=%2").tqarg(otype.label()).tqarg(nbWords));
uint nbBytesWord = device().nbBytesWord(otype);
// EEPROM is read like regular program memory in midrange
if ( !device().is18Family() && !device().is16bitFamily() && otype==Pic::MemoryRangeType::Eeprom ) nbBytesWord = 2;
@@ -297,7 +297,7 @@ bool Pickit2V2::Hardware::readMemory(Pic::MemoryRangeType otype, Device::Array &
ScriptType stype = readScript(type);
Q_ASSERT( stype!=Nb_ScriptTypes );
const FamilyData *fdata = familyData(device());
- uint nbRunWords = QMIN(UploadBufferNbBytes / nbBytesWord, nbWords);
+ uint nbRunWords = TQMIN(UploadBufferNbBytes / nbBytesWord, nbWords);
uint nbRuns = 1;
uint nbReceive = (nbRunWords*nbBytesWord + 63) / 64;
switch (type.type()) {
@@ -312,7 +312,7 @@ bool Pickit2V2::Hardware::readMemory(Pic::MemoryRangeType otype, Device::Array &
setAddress = false;
if ( !prepareRead(type, wordOffset + i) ) return false;
}
- QValueVector<uint> words;
+ TQValueVector<uint> words;
if ( type==Pic::MemoryRangeType::Config || type==Pic::MemoryRangeType::Cal ) {
if ( !runScript(stype, 1, 0) ) return false;
if ( !port().command(UploadData) ) return false;
@@ -322,12 +322,12 @@ bool Pickit2V2::Hardware::readMemory(Pic::MemoryRangeType otype, Device::Array &
if ( !runScript(stype, nbRuns, nbReceive) ) return false;
if ( !port().receiveWords(nbBytesWord, nbReceive, words) ) return false;
}
- log(Log::DebugLevel::Max, QString("nbRunWords=%1 readNbWords=%2 index=%3/%4").arg(nbRunWords).arg(words.count()).arg(i).arg(nbWords));
+ log(Log::DebugLevel::Max, TQString("nbRunWords=%1 readNbWords=%2 index=%3/%4").tqarg(nbRunWords).tqarg(words.count()).tqarg(i).tqarg(nbWords));
for (uint k=0; k<words.count(); k++) {
if ( i>=nbWords ) break;
data[i] = words[k];
if (fdata->progMemShift) data[i] >>= 1;
- data[i] = data[i].maskWith(device().mask(type)); // ### correct ?
+ data[i] = data[i].tqmaskWith(device().tqmask(type)); // ### correct ?
if ( vdata && !verifyWord(i, data[i], type, *vdata) ) return false;
if ( type==Pic::MemoryRangeType::Code && i!=0x0 && i%0x8000==0 ) setAddress = true;
i++;
diff --git a/src/progs/pickit2v2/base/pickit2v2.h b/src/progs/pickit2v2/base/pickit2v2.h
index 7c6f294..d1bd567 100644
--- a/src/progs/pickit2v2/base/pickit2v2.h
+++ b/src/progs/pickit2v2/base/pickit2v2.h
@@ -18,7 +18,7 @@ namespace Pickit2V2
enum FirmwareCommand {
EnterBootloader = 0x42, NoOperation = 0x5A, FirmwareVersion = 0x76,
- SetVdd = 0xA0, SetVpp = 0xA1, ReadStatus = 0xA2, ReadVoltages = 0xA3,
+ SetVdd = 0xA0, SetVpp = 0xA1, ReadtqStatus = 0xA2, ReadVoltages = 0xA3,
DownloadScript = 0xA4, RunScript = 0xA5, ExecuteScript = 0xA6,
ClearDownloadBuffer = 0xA7, DownloadData = 0xA8, ClearUploadBuffer = 0xA9,
UploadData = 0xAA, ClearScriptBuffer = 0xAB, UploadDataNoLen = 0xAC,
@@ -74,8 +74,8 @@ enum StatusFlag {
ButtonPressed = 0x0040, VppError = 0x0020, VddError = 0x0010,
VppIsOn = 0x0008, VppGroundIsOn = 0x0004,
VddIsOn = 0x0002, VddGroundIsOn = 0x0001 };
-Q_DECLARE_FLAGS(StatusFlags, StatusFlag)
-Q_DECLARE_OPERATORS_FOR_FLAGS(StatusFlags)
+TQ_DECLARE_FLAGS(StatusFlags, StatusFlag)
+TQ_DECLARE_OPERATORS_FOR_FLAGS(StatusFlags)
//-----------------------------------------------------------------------------
class Hardware : public ::Programmer::PicHardware
@@ -94,7 +94,7 @@ public:
bool setTarget();
bool setFastProgramming(bool fast);
virtual bool readVoltages(VoltagesData &voltagesData);
- bool readStatus(ushort &status);
+ bool readtqStatus(ushort &status);
bool readMemory(Pic::MemoryRangeType type, ::Device::Array &data, const ::Programmer::VerifyData *vdata);
bool writeMemory(Pic::MemoryRangeType type, const ::Device::Array &data, bool force);
bool eraseAll();
diff --git a/src/progs/pickit2v2/base/pickit2v2_data.cpp b/src/progs/pickit2v2/base/pickit2v2_data.cpp
index b93fad4..68a41aa 100644
--- a/src/progs/pickit2v2/base/pickit2v2_data.cpp
+++ b/src/progs/pickit2v2/base/pickit2v2_data.cpp
@@ -686,17 +686,17 @@ const CData *DATA_LIST[] = {
&PIC33FJ64GP708_DATA,&PIC33FJ64GP710_DATA,&PIC33FJ64MC506_DATA,&PIC33FJ64MC508_DATA,&PIC33FJ64MC510_DATA,&PIC33FJ64MC706_DATA,&PIC33FJ64MC710_DATA,0
};
-const CData *cdata(const QString &device)
+const CData *cdata(const TQString &device)
{
for(uint i=0; DATA_LIST[i]; i++)
if ( device==DATA_LIST[i]->name ) return DATA_LIST[i];
return 0;
}
-::Group::Support support(const QString &)
+::Group::Support support(const TQString &)
{
return ::Group::Support::Untested;
}
-const Data &data(const QString &device)
+const Data &data(const TQString &device)
{
return cdata(device)->data;
}
@@ -736,7 +736,7 @@ const ScriptData SCRIPT_DATA[] = {
{ "DBG_BulkWrData.1", 1, 18, { 0xAAF5, 0xAADF, 0xBB04, 0xAAE0, 0xAAE6, 0xBB00, 0x000C, 0xAADE, 0xAADE, 0xAADE, 0xAADE, 0xAADE, 0xAADD, 0xBB01, 0xAAF4, 0xAAE3, 0xAAE0, 0xAAF4 } },
{ "DBG_BulkRdData.1", 1, 18, { 0xAAF5, 0xAADF, 0xBB03, 0xAAE0, 0xAAE6, 0xBB00, 0x000C, 0xAADE, 0xAADE, 0xAADE, 0xAADE, 0xAAE0, 0xAADD, 0xBB01, 0xAAF4, 0xAAE3, 0xAAE0, 0xAAF4 } },
{ "DBG_SStep.1", 1, 10, { 0xAAF5, 0xAADF, 0xBB1A, 0xAAE0, 0xAAF4, 0xAAE6, 0xBB00, 0xBB04, 0xAAE3, 0xAAE0 } },
- { "DBG_Status.1", 0, 1, { 0xAADC } },
+ { "DBG_tqStatus.1", 0, 1, { 0xAADC } },
{ "24_ProgEntry.1", 1, 31, { 0xAAFA, 0xAAF7, 0xAAF9, 0xAAF5, 0xAAF3, 0xBB00, 0xAAE8, 0x0014, 0xAAF6, 0xAAFB, 0xAAE7, 0x00EB, 0xAAFA, 0xAAF7, 0xAAE7, 0x002F, 0xAAF2, 0xBBB2, 0xAAF2, 0xBBC2, 0xAAF2, 0xBB12, 0xAAF2, 0xBB8A, 0xAAF6, 0xAAFB, 0xAAE8, 0x0009, 0xAAEE, 0xBB05, 0xBB00 } },
{ "24_RdDevID.1", 0, 47, { 0xAAD9, 0xBB00, 0xBB02, 0xBB04, 0xAAD9, 0xBB00, 0xBB02, 0xBB04, 0xAAD8, 0xAAD8, 0xAAD8, 0xAAD9, 0xBB00, 0xBB02, 0xBB04, 0xAAD8, 0xAAD9, 0xBBF0, 0xBB0F, 0xBB20, 0xAAD9, 0xBB90, 0xBB01, 0xBB88, 0xAAD9, 0xBB06, 0xBB00, 0xBB20, 0xAAD8, 0xAAD8, 0xAAD9, 0xBB07, 0xBB00, 0xBB20, 0xAAD9, 0xBBB6, 0xBB0B, 0xBBBA, 0xAAD8, 0xAAD8, 0xAAD9, 0xBB20, 0xBB3C, 0xBB88, 0xAAD8, 0xAAD7, 0xAAD8 } },
{ "24_SetAddr.1", 0, 29, { 0xAAD9, 0xBB00, 0xBB02, 0xBB04, 0xAAD9, 0xBB00, 0xBB02, 0xBB04, 0xAAD8, 0xAAD8, 0xAAD8, 0xAAD9, 0xBB00, 0xBB02, 0xBB04, 0xAAD8, 0xAAD4, 0xBB06, 0xAAD3, 0xBB00, 0xAAD9, 0xBB90, 0xBB01, 0xBB88, 0xAAD9, 0xBB47, 0xBB78, 0xBB20, 0xAAD8 } },
diff --git a/src/progs/pickit2v2/base/pickit2v2_data.h b/src/progs/pickit2v2/base/pickit2v2_data.h
index 272fe92..582c485 100644
--- a/src/progs/pickit2v2/base/pickit2v2_data.h
+++ b/src/progs/pickit2v2/base/pickit2v2_data.h
@@ -9,7 +9,7 @@
#ifndef PICKIT2V2_DATA_H
#define PICKIT2V2_DATA_H
-#include <qstring.h>
+#include <tqstring.h>
namespace Pickit2V2
{
@@ -81,7 +81,7 @@ struct Data {
uchar codeMemoryNbWriteWords, eepromMemoryNbWriteWords;
uchar scriptIndexes[Nb_ScriptTypes];
};
-extern const Data &data(const QString &device);
+extern const Data &data(const TQString &device);
struct FamilyData {
Pic::Architecture architecture;
diff --git a/src/progs/pickit2v2/base/pickit2v2_prog.cpp b/src/progs/pickit2v2/base/pickit2v2_prog.cpp
index 3a44bca..b75cc56 100644
--- a/src/progs/pickit2v2/base/pickit2v2_prog.cpp
+++ b/src/progs/pickit2v2/base/pickit2v2_prog.cpp
@@ -40,7 +40,7 @@ bool Pickit2V2::Base::identifyDevice()
if ( !_targetSelfPowered ) {
if ( !hardware().setVddVoltage(vdd, 0.85)) return false;
}
- QString message = i18n("Unknown device");
+ TQString message = i18n("Unknown device");
for (uint i=0; FAMILY_DATA[i].architecture!=Pic::Architecture::Nb_Types; i++) {
const FamilyData &fdata = FAMILY_DATA[i];
if ( fdata.readDevIdScript==0 ) {
@@ -59,8 +59,8 @@ bool Pickit2V2::Base::identifyDevice()
if ( !hardware().executeScript(fdata.progExitScript) ) return false;
uint rawId = (data[2]<<8) + data[1];
if (fdata.progMemShift) rawId >>= 1;
- log(Log::DebugLevel::Normal, QString("Read id for family %1: %2").arg(fdata.architecture.key()).arg(toHexLabelAbs(rawId)));
- QMap<QString, Device::IdData> ids;
+ log(Log::DebugLevel::Normal, TQString("Read id for family %1: %2").tqarg(fdata.architecture.key()).tqarg(toHexLabelAbs(rawId)));
+ TQMap<TQString, Device::IdData> ids;
::Group::Base::ConstIterator it;
for (it=group().begin(); it!=group().end(); ++it) {
const Pic::Data *data = static_cast<const Pic::Data *>(it.data().data);
@@ -69,9 +69,9 @@ bool Pickit2V2::Base::identifyDevice()
if ( data->matchId(rawId, idata) ) ids[it.key()] = idata;
}
if ( ids.count()!=0 ) {
- log(Log::LineType::Information, i18n("Read id: %1").arg(device()->idNames(ids).join("; ")));
- if ( ids.contains(device()->name()) ) return true;
- message = i18n("Read id does not match the specified device name \"%1\".").arg(device()->name());
+ log(Log::LineType::Information, i18n("Read id: %1").tqarg(device()->idNames(ids).join("; ")));
+ if ( ids.tqcontains(device()->name()) ) return true;
+ message = i18n("Read id does not match the specified device name \"%1\".").tqarg(device()->name());
break;
}
}
@@ -79,7 +79,7 @@ bool Pickit2V2::Base::identifyDevice()
logUserAbort();
return false;
}
- log(Log::LineType::Information, i18n("Continue with the specified device name: \"%1\"...").arg(device()->name()));
+ log(Log::LineType::Information, i18n("Continue with the specified device name: \"%1\"...").tqarg(device()->name()));
return true;
}
@@ -92,13 +92,13 @@ bool Pickit2V2::Base::setTarget()
bool Pickit2V2::Base::selfTest(bool ask)
{
ushort status;
- if ( !hardware().readStatus(status) ) return false;
- QString error;
+ if ( !hardware().readtqStatus(status) ) return false;
+ TQString error;
if ( status & VppError ) error += i18n("Vpp voltage level error; ");
if ( status & VddError ) error += i18n("Vdd voltage level error; ");
if ( error.isEmpty() ) return true;
- log(Log::LineType::Warning, i18n("Self-test failed: %1").arg(error));
- if ( ask && !askContinue(i18n("Self-test failed (%1). Do you want to continue anyway?").arg(error)) ) {
+ log(Log::LineType::Warning, i18n("Self-test failed: %1").tqarg(error));
+ if ( ask && !askContinue(i18n("Self-test failed (%1). Do you want to continue anyway?").tqarg(error)) ) {
logUserAbort();
return false;
}
diff --git a/src/progs/pickit2v2/base/pickit2v2_prog.h b/src/progs/pickit2v2/base/pickit2v2_prog.h
index 3653649..5c9f764 100644
--- a/src/progs/pickit2v2/base/pickit2v2_prog.h
+++ b/src/progs/pickit2v2/base/pickit2v2_prog.h
@@ -19,6 +19,7 @@ class Hardware;
class Base : public Pickit2::Base
{
Q_OBJECT
+ TQ_OBJECT
public:
Base(const Programmer::Group &group, const Pic::Data *data);
virtual bool setTarget();
@@ -35,8 +36,8 @@ private:
class Group : public Programmer::PicGroup
{
public:
- virtual QString name() const { return "pickit2v2"; }
- virtual QString label() const { return i18n("PICkit2 Firmware 2.x"); }
+ virtual TQString name() const { return "pickit2v2"; }
+ virtual TQString label() const { return i18n("PICkit2 Firmware 2.x"); }
virtual Programmer::Properties properties() const { return ::Programmer::Programmer | ::Programmer::HasFirmware | ::Programmer::CanUploadFirmware | ::Programmer::CanReadMemory | ::Programmer::HasConnectedState; }
virtual bool canReadVoltage(Pic::VoltageType type) const { return ( type==Pic::TargetVdd || type==Pic::TargetVpp ); }
virtual ::Programmer::TargetPowerMode targetPowerMode() const { return ::Programmer::TargetPowerModeFromConfig; }
diff --git a/src/progs/pickit2v2/gui/pickit2v2_group_ui.cpp b/src/progs/pickit2v2/gui/pickit2v2_group_ui.cpp
index b3596fd..1deff68 100644
--- a/src/progs/pickit2v2/gui/pickit2v2_group_ui.cpp
+++ b/src/progs/pickit2v2/gui/pickit2v2_group_ui.cpp
@@ -11,12 +11,12 @@
#include "progs/gui/prog_config_widget.h"
#include "progs/pickit2v2/base/pickit2v2_prog.h"
-::Programmer::ConfigWidget *Pickit2V2::GroupUI::createConfigWidget(QWidget *parent) const
+::Programmer::ConfigWidget *Pickit2V2::GroupUI::createConfigWidget(TQWidget *tqparent) const
{
- return new ::Programmer::ConfigWidget(static_cast<const ::Programmer::Group &>(group()), parent);
+ return new ::Programmer::ConfigWidget(static_cast<const ::Programmer::Group &>(group()), tqparent);
}
-::Programmer::AdvancedDialog *Pickit2V2::GroupUI::createAdvancedDialog(::Programmer::Base &base, QWidget *parent) const
+::Programmer::AdvancedDialog *Pickit2V2::GroupUI::createAdvancedDialog(::Programmer::Base &base, TQWidget *tqparent) const
{
- return new ::Programmer::AdvancedDialog(static_cast<Base &>(base), parent, "pickit2v2_advanced_dialog");
+ return new ::Programmer::AdvancedDialog(static_cast<Base &>(base), tqparent, "pickit2v2_advanced_dialog");
}
diff --git a/src/progs/pickit2v2/gui/pickit2v2_group_ui.h b/src/progs/pickit2v2/gui/pickit2v2_group_ui.h
index 6c5ff64..7023367 100644
--- a/src/progs/pickit2v2/gui/pickit2v2_group_ui.h
+++ b/src/progs/pickit2v2/gui/pickit2v2_group_ui.h
@@ -16,9 +16,9 @@ namespace Pickit2V2
class GroupUI : public ::Programmer::GroupUI
{
public:
- virtual ::Programmer::ConfigWidget *createConfigWidget(QWidget *parent) const;
+ virtual ::Programmer::ConfigWidget *createConfigWidget(TQWidget *tqparent) const;
virtual bool hasAdvancedDialog() const { return true; }
- virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &base, QWidget *parent) const;
+ virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &base, TQWidget *tqparent) const;
};
} // namespace
diff --git a/src/progs/psp/base/psp.cpp b/src/progs/psp/base/psp.cpp
index 1b76bf5..188fbcb 100644
--- a/src/progs/psp/base/psp.cpp
+++ b/src/progs/psp/base/psp.cpp
@@ -13,9 +13,9 @@
#include "common/common/misc.h"
//-----------------------------------------------------------------------------
-QMemArray<uchar> Psp::createConfigInfo(const Pic::Data &data)
+TQMemArray<uchar> Psp::createConfigInfo(const Pic::Data &data)
{
- QMemArray<uchar> array(33);
+ TQMemArray<uchar> array(33);
array.fill(0x00);
const Pic::Config &config = data.config();
@@ -35,10 +35,10 @@ QMemArray<uchar> Psp::createConfigInfo(const Pic::Data &data)
return array;
}
-QMemArray<uchar> Psp::createDeviceInfo(const Pic::Data &data)
+TQMemArray<uchar> Psp::createDeviceInfo(const Pic::Data &data)
{
- QMemArray<uchar> config = createConfigInfo(data);
- QMemArray<uchar> array(45);
+ TQMemArray<uchar> config = createConfigInfo(data);
+ TQMemArray<uchar> array(45);
array.fill(0x00);
// memory code length
@@ -46,7 +46,7 @@ QMemArray<uchar> Psp::createDeviceInfo(const Pic::Data &data)
array[0] = v.byte(1);
array[1] = v.byte(0);
// address word width
- v = data.mask(Pic::MemoryRangeType::Code);
+ v = data.tqmask(Pic::MemoryRangeType::Code);
array[2] = v.byte(1);
array[3] = v.byte(0);
// data word width
@@ -59,12 +59,12 @@ QMemArray<uchar> Psp::createDeviceInfo(const Pic::Data &data)
if ( data.nbBytesWord(Pic::MemoryRangeType::UserId)==1 ) v += v << 8;
array[6] = v.byte(1);
array[7] = v.byte(0);
- // user id mask
+ // user id tqmask
array[8] = v.byte(1);
array[9] = v.byte(0);
}
- // memory config mask
+ // memory config tqmask
array[10] = config[0];
array[11] = config[1];
array[12] = config[16];
@@ -72,20 +72,20 @@ QMemArray<uchar> Psp::createDeviceInfo(const Pic::Data &data)
if ( data.isReadable(Pic::MemoryRangeType::Eeprom) ) {
// memory eeprom width
- v = data.mask(Pic::MemoryRangeType::Eeprom);
+ v = data.tqmask(Pic::MemoryRangeType::Eeprom);
array[14] = v.byte(1);
array[15] = v.byte(0);
- // memory eeprom mask
+ // memory eeprom tqmask
array[16] = v.byte(1);
array[17] = v.byte(0);
}
if ( data.isReadable(Pic::MemoryRangeType::Cal) ) {
// memory calibration width
- v = data.mask(Pic::MemoryRangeType::Cal);
+ v = data.tqmask(Pic::MemoryRangeType::Cal);
array[18] = v.byte(1);
array[19] = v.byte(0);
- // memory calibration mask
+ // memory calibration tqmask
array[20] = v.byte(1);
array[21] = v.byte(0);
}
@@ -159,8 +159,8 @@ QMemArray<uchar> Psp::createDeviceInfo(const Pic::Data &data)
}
//-----------------------------------------------------------------------------
-Psp::Hardware::Hardware(::Programmer::Base &base, const QString &portDevice)
- : Programmer::PicHardware(base, new SerialPort(portDevice, base), QString::null)
+Psp::Hardware::Hardware(::Programmer::Base &base, const TQString &portDevice)
+ : Programmer::PicHardware(base, new SerialPort(portDevice, base), TQString())
{}
bool Psp::Hardware::internalConnectHardware()
@@ -168,7 +168,7 @@ bool Psp::Hardware::internalConnectHardware()
if ( !port()->open() ) return false;
if ( !port()->reset() ) return false;
// #### TODO: detect Warp13 or JuPic
- QMemArray<uchar> a;
+ TQMemArray<uchar> a;
if ( !port()->command(0x88, 1, a) ) return false;
if ( a[0]!=0xAB ) {
log(Log::LineType::Error, i18n("Wrong programmer connected"));
@@ -179,13 +179,13 @@ bool Psp::Hardware::internalConnectHardware()
bool Psp::Hardware::getFirmwareVersion(VersionData &version)
{
- QMemArray<uchar> a1;
+ TQMemArray<uchar> a1;
if ( !port()->commandAck(0x8D, 2, &a1) ) return false;
if ( a1[1]==0xFF ) {
log(Log::LineType::Warning, i18n("Invalid firmware version"));
version = VersionData(0xFF, 0, 0);
} else {
- QMemArray<uchar> a2;
+ TQMemArray<uchar> a2;
if ( !port()->receive(2, a2) ) return false;
version = VersionData(a1[1], a2[0], a2[1]);
}
@@ -197,7 +197,7 @@ bool Psp::Hardware::setTarget()
log(Log::DebugLevel::Max, "set target");
// load device info
if ( !port()->commandAck(0x81) ) return false;
- QMemArray<uchar> a = createDeviceInfo(device());
+ TQMemArray<uchar> a = createDeviceInfo(device());
if ( !port()->send(a) ) return false;
if ( !port()->receiveEnd() ) return false;
@@ -212,7 +212,7 @@ bool Psp::Hardware::setTarget()
bool Psp::Hardware::setRange(uint start, uint size)
{
- QMemArray<uchar> a(6);
+ TQMemArray<uchar> a(6);
a[0] = 0x8E;
a[1] = start >> 16;
a[2] = (start >> 8) & 0xFF;
@@ -220,7 +220,7 @@ bool Psp::Hardware::setRange(uint start, uint size)
a[4] = size >> 8;
a[5] = size & 0xFF;
if ( !port()->send(a) ) return false;
- QMemArray<uchar> r;
+ TQMemArray<uchar> r;
if ( !port()->receive(6, r) ) return false;
for (uint i=0; i<6; i++) {
if ( r[i]!=a[i] ) {
@@ -269,7 +269,7 @@ char Psp::Hardware::writeCommand(Pic::MemoryRangeType type)
bool Psp::Hardware::readMemory(Pic::MemoryRangeType type, Device::Array &data, const ::Programmer::VerifyData *vdata)
{
- QMemArray<uchar> a;
+ TQMemArray<uchar> a;
uint nbWords = device().nbWords(type);
data.resize(nbWords);
uint nbBytes = nbWords * device().nbBytesWord(type);
@@ -281,8 +281,8 @@ bool Psp::Hardware::readMemory(Pic::MemoryRangeType type, Device::Array &data, c
for (uint i=0; i<data.count(); i++) {
if ( !port()->receive(2, a) ) return false;
data[i] = (a[0] << 8) + a[1];
-// log(Log::DebugLevel::Max, QString("code data %1: %2 (%3, %4)").arg(i).arg(toHexLabel(data[i], 4))
-// .arg(toHexLabel(a[0], 2)).arg(toHexLabel(a[1], 2)));
+// log(Log::DebugLevel::Max, TQString("code data %1: %2 (%3, %4)").tqarg(i).tqarg(toHexLabel(data[i], 4))
+// .tqarg(toHexLabel(a[0], 2)).tqarg(toHexLabel(a[1], 2)));
}
if ( !port()->receiveEnd() ) return false;
break;
@@ -336,7 +336,7 @@ bool Psp::Hardware::writeMemory(Pic::MemoryRangeType type, const Device::Array &
bool Psp::Hardware::eraseAll()
{
- QMemArray<uchar> a;
+ TQMemArray<uchar> a;
if ( !port()->commandAck(0x8F, 2, &a) ) return false;
if ( a[1]!=0x00 ) {
log(Log::LineType::Error, i18n("Erase failed"));
diff --git a/src/progs/psp/base/psp.h b/src/progs/psp/base/psp.h
index ad4a160..087b1aa 100644
--- a/src/progs/psp/base/psp.h
+++ b/src/progs/psp/base/psp.h
@@ -16,14 +16,14 @@
namespace Psp
{
- extern QMemArray<uchar> createConfigInfo(const Pic::Data &data);
- extern QMemArray<uchar> createDeviceInfo(const Pic::Data &data);
+ extern TQMemArray<uchar> createConfigInfo(const Pic::Data &data);
+ extern TQMemArray<uchar> createDeviceInfo(const Pic::Data &data);
//-----------------------------------------------------------------------------
class Hardware : public Programmer::PicHardware
{
public:
- Hardware(::Programmer::Base &base, const QString &portDevice);
+ Hardware(::Programmer::Base &base, const TQString &portDevice);
SerialPort *port() { return static_cast<SerialPort *>(_port); }
virtual bool uploadFirmware(const Pic::Memory &) { return false; }
virtual bool setTarget();
diff --git a/src/progs/psp/base/psp_data.h b/src/progs/psp/base/psp_data.h
index c643961..509ee71 100644
--- a/src/progs/psp/base/psp_data.h
+++ b/src/progs/psp/base/psp_data.h
@@ -9,15 +9,15 @@
#ifndef PSP_DATA_H
#define PSP_DATA_H
-#include <qstring.h>
+#include <tqstring.h>
namespace Psp
{
struct Data {
uint algorithm, overprogram, tries;
};
- extern bool isSupported(const QString &device);
- extern const Data &data(const QString &device);
+ extern bool isSupported(const TQString &device);
+ extern const Data &data(const TQString &device);
} // namespace
#endif
diff --git a/src/progs/psp/base/psp_prog.h b/src/progs/psp/base/psp_prog.h
index ef525cd..02d0c68 100644
--- a/src/progs/psp/base/psp_prog.h
+++ b/src/progs/psp/base/psp_prog.h
@@ -18,6 +18,7 @@ namespace Psp
class Base : public Programmer::PicBase
{
Q_OBJECT
+ TQ_OBJECT
public:
Base(const Programmer::Group &group, const Pic::Data *data)
: Programmer::PicBase(group, data, "psp_programmer_base") {}
@@ -33,9 +34,9 @@ protected:
class Group : public ::Programmer::PicGroup
{
public:
- virtual QString name() const { return "psp"; }
- virtual QString label() const { return i18n("Picstart Plus"); }
- virtual QString xmlName() const { return "psp"; }
+ virtual TQString name() const { return "psp"; }
+ virtual TQString label() const { return i18n("Picstart Plus"); }
+ virtual TQString xmlName() const { return "psp"; }
virtual ::Programmer::Properties properties() const;
virtual ::Programmer::TargetPowerMode targetPowerMode() const { return ::Programmer::TargetExternallyPowered; }
virtual bool isPortSupported(PortType type) const { return ( type==PortType::Serial ); }
diff --git a/src/progs/psp/base/psp_serial.cpp b/src/progs/psp/base/psp_serial.cpp
index 964d604..7da4c00 100644
--- a/src/progs/psp/base/psp_serial.cpp
+++ b/src/progs/psp/base/psp_serial.cpp
@@ -14,7 +14,7 @@
#include "common/common/number.h"
//-----------------------------------------------------------------------------
-Psp::SerialPort::SerialPort(const QString &device, Log::Base &log)
+Psp::SerialPort::SerialPort(const TQString &device, Log::Base &log)
: Port::Serial(device, NeedFlush, log)
{}
@@ -46,9 +46,9 @@ bool Psp::SerialPort::reset()
return flush(0);
}
-bool Psp::SerialPort::command(uchar c, uint nbBytes, QMemArray<uchar> &a)
+bool Psp::SerialPort::command(uchar c, uint nbBytes, TQMemArray<uchar> &a)
{
- log(Log::DebugLevel::Extra, QString("Command %1").arg(toHexLabel(c, 2)));
+ log(Log::DebugLevel::Extra, TQString("Command %1").tqarg(toHexLabel(c, 2)));
if ( !sendChar(c) ) return false;
return receive(nbBytes, a);
}
@@ -57,7 +57,7 @@ bool Psp::SerialPort::checkAck(uchar ec, uchar rc)
{
if ( ec==rc ) return true;
log(Log::LineType::Error, i18n("Incorrect ack: expecting %1, received %2")
- .arg(QString(toHex(ec, 2))).arg(QString(toHex(rc, 2))));
+ .tqarg(TQString(toHex(ec, 2))).tqarg(TQString(toHex(rc, 2))));
return false;
}
@@ -65,14 +65,14 @@ bool Psp::SerialPort::checkEnd(uchar c)
{
if ( c==0 ) return true;
log(Log::LineType::Error, i18n("Incorrect received data end: expecting 00, received %1")
- .arg(QString(toHex(c, 2))));
+ .tqarg(TQString(toHex(c, 2))));
return false;
}
-bool Psp::SerialPort::commandAck(uchar c, uint nbBytes, QMemArray<uchar> *a)
+bool Psp::SerialPort::commandAck(uchar c, uint nbBytes, TQMemArray<uchar> *a)
{
Q_ASSERT( nbBytes>=1 );
- QMemArray<uchar> tmp;
+ TQMemArray<uchar> tmp;
if ( !command(c, nbBytes, tmp) ) return false;
if ( !checkAck(c, tmp[0]) ) return false;
if (a) *a = tmp;
@@ -81,13 +81,13 @@ bool Psp::SerialPort::commandAck(uchar c, uint nbBytes, QMemArray<uchar> *a)
bool Psp::SerialPort::receiveEnd()
{
- QMemArray<uchar> a;
+ TQMemArray<uchar> a;
if ( !receive(1, a) ) return false;
if ( !checkEnd(a[0]) ) return false;
return true;
}
-bool Psp::SerialPort::commandAckEnd(uchar c, uint nbBytes, QMemArray<uchar> &a)
+bool Psp::SerialPort::commandAckEnd(uchar c, uint nbBytes, TQMemArray<uchar> &a)
{
Q_ASSERT( nbBytes>=2 );
if ( !command(c, nbBytes, a) ) return false;
@@ -100,7 +100,7 @@ bool Psp::SerialPort::sendData(uint value, uint nbBytes)
{
Q_ASSERT( nbBytes==1 || nbBytes==2 );
Q_ASSERT( value<uint(1 << 8*nbBytes) );
- QMemArray<uchar> a(nbBytes);
+ TQMemArray<uchar> a(nbBytes);
if ( nbBytes==2 ) {
a[0] = value / 256;
a[1] = value & 0xFF;
diff --git a/src/progs/psp/base/psp_serial.h b/src/progs/psp/base/psp_serial.h
index 6f379dd..a7ebf77 100644
--- a/src/progs/psp/base/psp_serial.h
+++ b/src/progs/psp/base/psp_serial.h
@@ -18,12 +18,12 @@ namespace Psp
class SerialPort : public Port::Serial
{
public:
- SerialPort(const QString &portDevice, Log::Base &log);
+ SerialPort(const TQString &portDevice, Log::Base &log);
bool open();
bool reset();
- bool command(uchar c, uint nbBytes, QMemArray<uchar> &a);
- bool commandAck(uchar c, uint nbBytes = 1, QMemArray<uchar> *a = 0);
- bool commandAckEnd(uchar c, uint nbBytes, QMemArray<uchar> &a);
+ bool command(uchar c, uint nbBytes, TQMemArray<uchar> &a);
+ bool commandAck(uchar c, uint nbBytes = 1, TQMemArray<uchar> *a = 0);
+ bool commandAckEnd(uchar c, uint nbBytes, TQMemArray<uchar> &a);
bool receiveEnd();
bool sendData(uint value, uint nbBytes);
diff --git a/src/progs/psp/gui/psp_group_ui.cpp b/src/progs/psp/gui/psp_group_ui.cpp
index e3f2546..ac9c70c 100644
--- a/src/progs/psp/gui/psp_group_ui.cpp
+++ b/src/progs/psp/gui/psp_group_ui.cpp
@@ -11,12 +11,12 @@
#include "progs/gui/prog_config_widget.h"
#include "devices/pic/gui/pic_prog_group_ui.h"
-::Programmer::ConfigWidget *Psp::GroupUI::createConfigWidget(QWidget *parent) const
+::Programmer::ConfigWidget *Psp::GroupUI::createConfigWidget(TQWidget *tqparent) const
{
- return new ::Programmer::ConfigWidget(static_cast<const ::Programmer::Group &>(group()), parent);
+ return new ::Programmer::ConfigWidget(static_cast<const ::Programmer::Group &>(group()), tqparent);
}
-::Programmer::AdvancedDialog *Psp::GroupUI::createAdvancedDialog(::Programmer::Base &base, QWidget *parent) const
+::Programmer::AdvancedDialog *Psp::GroupUI::createAdvancedDialog(::Programmer::Base &base, TQWidget *tqparent) const
{
- return new ::Programmer::PicAdvancedDialog(static_cast< ::Programmer::PicBase &>(base), parent, "psp_advanced_dialog");
+ return new ::Programmer::PicAdvancedDialog(static_cast< ::Programmer::PicBase &>(base), tqparent, "psp_advanced_dialog");
}
diff --git a/src/progs/psp/gui/psp_group_ui.h b/src/progs/psp/gui/psp_group_ui.h
index fc1534a..be0b4ac 100644
--- a/src/progs/psp/gui/psp_group_ui.h
+++ b/src/progs/psp/gui/psp_group_ui.h
@@ -18,9 +18,9 @@ class Group;
class GroupUI : public ::Programmer::GroupUI
{
public:
- virtual ::Programmer::ConfigWidget *createConfigWidget(QWidget *parent) const;
+ virtual ::Programmer::ConfigWidget *createConfigWidget(TQWidget *tqparent) const;
virtual bool hasAdvancedDialog() const { return true; }
- virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &base, QWidget *parent) const;
+ virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &base, TQWidget *tqparent) const;
};
} // namespace
diff --git a/src/progs/psp/xml/xml_psp_parser.cpp b/src/progs/psp/xml/xml_psp_parser.cpp
index 5cdd289..8b8875b 100644
--- a/src/progs/psp/xml/xml_psp_parser.cpp
+++ b/src/progs/psp/xml/xml_psp_parser.cpp
@@ -19,11 +19,11 @@ public:
XmlToData() : Programmer::XmlToData<Data>("psp", "Psp") {}
private:
- virtual void parseData(QDomElement element, Data &data);
- virtual void outputData(const Data &data, QTextStream &s) const;
+ virtual void parseData(TQDomElement element, Data &data);
+ virtual void outputData(const Data &data, TQTextStream &s) const;
};
-void Psp::XmlToData::parseData(QDomElement element, Data &data)
+void Psp::XmlToData::parseData(TQDomElement element, Data &data)
{
bool ok;
data.algorithm = element.attribute("algorithm").toUInt(&ok);
@@ -34,7 +34,7 @@ void Psp::XmlToData::parseData(QDomElement element, Data &data)
if ( !ok ) qFatal("Missing or invalid tries");
}
-void Psp::XmlToData::outputData(const Data &data, QTextStream &s) const
+void Psp::XmlToData::outputData(const Data &data, TQTextStream &s) const
{
s << data.algorithm << ", " << data.overprogram << ", " << data.tries;
}
diff --git a/src/progs/sdcdb/base/sdcdb_debug.cpp b/src/progs/sdcdb/base/sdcdb_debug.cpp
index fcccf22..d8d4ad4 100644
--- a/src/progs/sdcdb/base/sdcdb_debug.cpp
+++ b/src/progs/sdcdb/base/sdcdb_debug.cpp
@@ -9,7 +9,7 @@
#include "gpsim_debug.h"
#include <signal.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include "devices/list/device_list.h"
#include "devices/pic/pic/pic_debug.h"
@@ -52,10 +52,10 @@ bool GPSim::Debugger::internalStep()
return hardware()->execute("step", true);
}
-bool GPSim::Debugger::setBreakpoints(const QValueList<Address> &list)
+bool GPSim::Debugger::setBreakpoints(const TQValueList<Address> &list)
{
for (uint i=0; i<_nbBreakpoints; i++)
- if ( !hardware()->execute("clear " + QString::number(i), true) ) return false;
+ if ( !hardware()->execute("clear " + TQString::number(i), true) ) return false;
for (uint i=0; i<uint(list.count()); i++)
if ( !hardware()->execute("break e 0x" + toHex(list[i], nbChars(list[i].toUInt())), true) ) return false;
_nbBreakpoints = list.count();
@@ -75,15 +75,15 @@ bool GPSim::Debugger::updateState()
return true;
}
-bool GPSim::Debugger::findRegExp(const QStringList &lines, const QString &pattern,
- const QString &label, QString &value) const
+bool GPSim::Debugger::findRegExp(const TQStringList &lines, const TQString &pattern,
+ const TQString &label, TQString &value) const
{
- QRegExp rexp(pattern);
+ TQRegExp rexp(pattern);
uint i = 0;
for (; i<uint(lines.count()); i++) {
int offset = 0;
for (;;) {
- offset = rexp.search(lines[i], offset, QRegExp::CaretAtOffset);
+ offset = rexp.search(lines[i], offset, TQRegExp::CaretAtOffset);
if ( offset==-1 || rexp.cap(1)==label ) break;
offset += rexp.cap(0).length();
}
@@ -99,9 +99,9 @@ bool GPSim::Debugger::readWreg(BitValue &value)
// #### only known for version 4 and 11
if ( hardware()->version()<=VersionData(0, 21, 7) || hardware()->version()>=VersionData(0, 22, 0) )
return getRegister("W", value);
- QStringList lines;
+ TQStringList lines;
if ( !hardware()->execute("dump s", true, &lines) ) return false;
- QString s;
+ TQString s;
if ( !findRegExp(lines, "^\\s*[0-9A-Fa-f]+\\s+(\\w+)\\s*=\\s*([0-9A-Fa-f]+)", "W", s) ) {
log(Log::Error, i18n("Error reading register \"W\""));
return false;
@@ -110,10 +110,10 @@ bool GPSim::Debugger::readWreg(BitValue &value)
return true;
}
-bool GPSim::Debugger::getRegister(const QString &name, BitValue &value)
+bool GPSim::Debugger::getRegister(const TQString &name, BitValue &value)
{
- QStringList lines;
- QRegExp r;
+ TQStringList lines;
+ TQRegExp r;
if ( hardware()->version()<VersionData(0, 22, 0) ) {
if ( !hardware()->execute("x " + name, true, &lines) ) return false;
r.setPattern("\\w+\\s*[][\\w]+\\s*=\\s*(?:0x|)([0-9A-Fa-f]+)(?:\\W.*|)");
@@ -125,7 +125,7 @@ bool GPSim::Debugger::getRegister(const QString &name, BitValue &value)
for (; i<uint(lines.count()); i++)
if ( r.exactMatch(lines[i]) ) break;
if ( i==uint(lines.count()) ) {
- log(Log::Error, i18n("Error reading register \"%1\"").arg(name));
+ log(Log::Error, i18n("Error reading register \"%1\"").tqarg(name));
return false;
}
value = fromHex(r.cap(1), 0);
@@ -135,9 +135,9 @@ bool GPSim::Debugger::getRegister(const QString &name, BitValue &value)
bool GPSim::Debugger::getRegister(Address address, BitValue &value)
{
const Pic::RegistersData &rdata = device()->registersData();
- QString name = toHex(address, rdata.nbCharsAddress());
+ TQString name = toHex(address, rdata.nbCharsAddress());
if ( hardware()->version()<VersionData(0, 22, 0) ) return getRegister("0x" + name, value);
- return getRegister(QString("ramData[$%1]").arg(name), value);
+ return getRegister(TQString("ramData[$%1]").tqarg(name), value);
}
bool GPSim::Debugger::readRegister(const Register::TypeData &data, BitValue &value)
@@ -148,27 +148,27 @@ bool GPSim::Debugger::readRegister(const Register::TypeData &data, BitValue &val
Q_ASSERT(false);
return true;
}
- QString name = device()->registersData().sfrNames[data.address()];
+ TQString name = device()->registersData().sfrNames[data.address()];
if ( name=="WREG" ) return readWreg(value);
if ( !name.isEmpty() ) return getRegister(name.lower(), value);
return getRegister(data.address(), value);
}
-bool GPSim::Debugger::setRegister(const QString &name, BitValue value)
+bool GPSim::Debugger::setRegister(const TQString &name, BitValue value)
{
if ( hardware()->version()<VersionData(0, 22, 0) ) {
log(Log::Warning, i18n("Writing registers is not supported by this version of gpsim"));
return true;
}
const Pic::RegistersData &rdata = device()->registersData();
- QString s = QString("%1 = %2").arg(name).arg(toHexLabel(value, rdata.nbChars()));
+ TQString s = TQString("%1 = %2").tqarg(name).tqarg(toHexLabel(value, rdata.nbChars()));
return hardware()->execute(s, true);
}
bool GPSim::Debugger::setRegister(Address address, BitValue value)
{
const Pic::RegistersData &rdata = device()->registersData();
- QString s = QString("ramData[$%1]").arg(toHex(address, rdata.nbCharsAddress()));
+ TQString s = TQString("ramData[$%1]").tqarg(toHex(address, rdata.nbCharsAddress()));
return setRegister(s, value);
}
@@ -184,7 +184,7 @@ bool GPSim::Debugger::writeRegister(const Register::TypeData &data, BitValue val
return false;
}
const Pic::RegistersData &rdata = device()->registersData();
- QString name = rdata.sfrNames[data.address()];
+ TQString name = rdata.sfrNames[data.address()];
if ( !name.isEmpty() ) return setRegister(name.lower(), value);
return setRegister(data.address(), value);
}
@@ -194,16 +194,16 @@ bool GPSim::Debugger::writeWreg(BitValue value)
return setRegister("W", value);
}
-bool GPSim::Debugger::updatePortStatus(uint index, QMap<uint, Device::PortBitData> &bits)
+bool GPSim::Debugger::updatePorttqStatus(uint index, TQMap<uint, Device::PortBitData> &bits)
{
for (uint i=0; i<Device::MAX_NB_PORT_BITS; i++) {
if ( !device()->registersData().hasPortBit(index, i) ) continue;
- QString name = device()->registersData().portName(index).lower() + QString::number(i);
- QStringList lines;
+ TQString name = device()->registersData().portName(index).lower() + TQString::number(i);
+ TQStringList lines;
if ( !hardware()->execute("symbol " + name, true, &lines) ) return false;
- QString pattern = "^(\\w+)=([^\\s])+\\s*", value;
+ TQString pattern = "^(\\w+)=([^\\s])+\\s*", value;
if ( !findRegExp(lines, pattern, "bitState", value) || value.length()!=1 ) {
- log(Log::Error, i18n("Error reading state of IO bit: %1").arg(name));
+ log(Log::Error, i18n("Error reading state of IO bit: %1").tqarg(name));
return false;
}
switch (value[0].latin1()) {
@@ -217,24 +217,24 @@ bool GPSim::Debugger::updatePortStatus(uint index, QMap<uint, Device::PortBitDat
case 'X': bits[i].state = Device::Unknown; break;
default:
bits[i].state = Device::Unknown;
- log(Log::Warning, i18n("Unknown state for IO bit: %1 (%2)").arg(name).arg(value));
+ log(Log::Warning, i18n("Unknown state for IO bit: %1 (%2)").tqarg(name).tqarg(value));
break;
}
if ( !findRegExp(lines, pattern, "Driving", value) || value.length()!=1 ) {
- log(Log::Error, i18n("Error reading driving state of IO bit: %1").arg(name));
+ log(Log::Error, i18n("Error reading driving state of IO bit: %1").tqarg(name));
return false;
}
bits[i].driving = ( value[0]=='1' );
if (bits[i].driving) {
if ( !findRegExp(lines, pattern, "drivingState", value) || value.length()!=1 ) {
- log(Log::Error, i18n("Error reading driving state of IO bit: %1").arg(name));
+ log(Log::Error, i18n("Error reading driving state of IO bit: %1").tqarg(name));
return false;
}
bits[i].drivingState = (value[0]=='0' ? Device::IoLow : Device::IoHigh);
bits[i].drivenState = Device::IoUnknown;
} else {
if ( !findRegExp(lines, pattern, "drivenState", value) || value.length()!=1 ) {
- log(Log::Error, i18n("Error reading driven state of IO bit: %1").arg(name));
+ log(Log::Error, i18n("Error reading driven state of IO bit: %1").tqarg(name));
return false;
}
bits[i].drivenState = (value[0]=='0' ? Device::IoLow : Device::IoHigh);
@@ -245,7 +245,7 @@ bool GPSim::Debugger::updatePortStatus(uint index, QMap<uint, Device::PortBitDat
}
//----------------------------------------------------------------------------
-QString GPSim::Group::statusLabel() const
+TQString GPSim::Group::statusLabel() const
{
return i18n("GPSim (4MHz)"); // #### FIXME: add config
}
@@ -258,9 +258,9 @@ void GPSim::Group::initSupported()
if ( !manager.getVersion(version) ) return;
bool oldGpsim = ( version<VersionData(0, 21, 11) );
if ( !manager.sendCommand("processor list", true) ) return;
- QStringList devices = QStringList::split(" ", manager.process().sout().join(" "));
+ TQStringList devices = TQStringList::split(" ", manager.process().sout().join(" "));
for (uint i=0; i<uint(devices.count()); i++) {
- QString s = devices[i].upper();
+ TQString s = devices[i].upper();
if ( s.startsWith("PIC") ) s = s.mid(3);
const Pic::Data *data = static_cast<const Pic::Data *>(Device::lister().data(s));
if (data) {
diff --git a/src/progs/sdcdb/base/sdcdb_debug.h b/src/progs/sdcdb/base/sdcdb_debug.h
index 55cda75..e1f109b 100644
--- a/src/progs/sdcdb/base/sdcdb_debug.h
+++ b/src/progs/sdcdb/base/sdcdb_debug.h
@@ -19,6 +19,7 @@ namespace SDCDB
class Programmer : public ::Programmer::PicBase
{
Q_OBJECT
+ TQ_OBJECT
public:
Programmer(const ::Programmer::Group &group, const Pic::Data *data)
: Programmer::PicBase(group, data, "sdcdb_programmer") {}
@@ -41,18 +42,18 @@ class Debugger : public ::Debugger::PicBase
{
public:
Debugger(Programmer &programmer);
- virtual bool setBreakpoints(const QValueList<Address> &list);
+ virtual bool setBreakpoints(const TQValueList<Address> &list);
virtual bool readRegister(const Register::TypeData &data, BitValue &value);
virtual bool writeRegister(const Register::TypeData &data, BitValue value);
- virtual bool updatePortStatus(uint index, QMap<uint, Device::PortBitData> &bits);
+ virtual bool updatePorttqStatus(uint index, TQMap<uint, Device::PortBitData> &bits);
private:
uint _nbBreakpoints;
- bool findRegExp(const QStringList &lines, const QString &pattern,
- const QString &label, QString &value) const;
- bool getRegister(const QString &name, BitValue &value);
- bool setRegister(const QString &name, BitValue value);
+ bool findRegExp(const TQStringList &lines, const TQString &pattern,
+ const TQString &label, TQString &value) const;
+ bool getRegister(const TQString &name, BitValue &value);
+ bool setRegister(const TQString &name, BitValue value);
bool getRegister(Address address, BitValue &value);
bool setRegister(Address address, BitValue value);
Hardware *hardware() { return static_cast<Hardware *>(_programmer.hardware()); }
@@ -72,9 +73,9 @@ private:
class Group : public ::Programmer::PicGroup
{
public:
- virtual QString name() const { return "sdcdb"; }
- virtual QString label() const { return i18n("SDCDB"); }
- virtual QString statusLabel() const;
+ virtual TQString name() const { return "sdcdb"; }
+ virtual TQString label() const { return i18n("SDCDB"); }
+ virtual TQString statusLabel() const;
virtual ::Programmer::Properties properties() const { return ::Programmer::Debugger | ::Programmer::HasConnectedState; }
virtual ::Programmer::TargetPowerMode targetPowerMode() const { return ::Programmer::TargetSelfPowered; }
virtual bool isPortSupported(Port::Type) const { return false; }
diff --git a/src/progs/tbl_bootloader/base/tbl_bootloader.cpp b/src/progs/tbl_bootloader/base/tbl_bootloader.cpp
index 419ad86..9c52fb7 100644
--- a/src/progs/tbl_bootloader/base/tbl_bootloader.cpp
+++ b/src/progs/tbl_bootloader/base/tbl_bootloader.cpp
@@ -43,7 +43,7 @@ void TinyBootloader::Config::writeRetries(uint nb)
}
//-----------------------------------------------------------------------------
-TinyBootloader::Hardware::Hardware(::Programmer::Base &base, const QString &portDevice)
+TinyBootloader::Hardware::Hardware(::Programmer::Base &base, const TQString &portDevice)
: ::Bootloader::Hardware(base, new Port::Serial(portDevice, Port::Serial::NoProperty, base))
{
Config config;
@@ -76,17 +76,17 @@ bool TinyBootloader::Hardware::internalConnectHardware()
bool TinyBootloader::Hardware::verifyDeviceId()
{
uchar id = data(device().name()).id;
- QValueVector<QString> list = _base.group().supportedDevices();
- QStringList devices;
+ TQValueVector<TQString> list = _base.group().supportedDevices();
+ TQStringList devices;
for (uint i=0; i<uint(list.count()); i++)
if ( _id==data(list[i]).id ) devices.append(list[i]);
if ( _id!=id ) {
- if ( devices.count()==0 ) log(Log::LineType::Error, i18n("Unknown id returned by bootloader (%1 read and %2 expected).").arg(toHexLabel(_id, 2)).arg(toHexLabel(id, 2)));
- else log(Log::LineType::Error, i18n("Id returned by bootloader corresponds to other devices: %1 (%2 read and %3 expected).").arg(devices.join(" ")).arg(toHexLabel(_id, 2)).arg(toHexLabel(id, 2)));
+ if ( devices.count()==0 ) log(Log::LineType::Error, i18n("Unknown id returned by bootloader (%1 read and %2 expected).").tqarg(toHexLabel(_id, 2)).tqarg(toHexLabel(id, 2)));
+ else log(Log::LineType::Error, i18n("Id returned by bootloader corresponds to other devices: %1 (%2 read and %3 expected).").tqarg(devices.join(" ")).tqarg(toHexLabel(_id, 2)).tqarg(toHexLabel(id, 2)));
// we can't ask for "continue anyway?" because bootloader can timeout...
return false;
}
- log(Log::LineType::Information, " " + i18n("Bootloader identified device as: %1").arg(devices.join(" ")));
+ log(Log::LineType::Information, " " + i18n("Bootloader identified device as: %1").tqarg(devices.join(" ")));
return true;
}
@@ -101,10 +101,10 @@ bool TinyBootloader::Hardware::waitReady(bool *checkCRC)
if (checkCRC) {
*checkCRC = false;
if ( c=='N' ) return true;
- log(Log::LineType::Error, i18n("Received unexpected character ('%1' received; 'K' or 'N' expected).").arg(toPrintable(c, PrintAlphaNum)));
+ log(Log::LineType::Error, i18n("Received unexpected character ('%1' received; 'K' or 'N' expected).").tqarg(toPrintable(c, PrintAlphaNum)));
return true;
}
- log(Log::LineType::Error, i18n("Received unexpected character ('%1' received; 'K' expected).").arg(toPrintable(c, PrintAlphaNum)));
+ log(Log::LineType::Error, i18n("Received unexpected character ('%1' received; 'K' expected).").tqarg(toPrintable(c, PrintAlphaNum)));
return false;
}
@@ -158,9 +158,9 @@ bool TinyBootloader::Hardware::writeCode(const Device::Array &data, bool erase)
// check that there is nothing on top of bootloader
for (uint i=nb; i<data.size(); i++) {
- if ( data[i]==device().mask(Pic::MemoryRangeType::Code) ) continue;
+ if ( data[i]==device().tqmask(Pic::MemoryRangeType::Code) ) continue;
uint address = device().addressIncrement(Pic::MemoryRangeType::Code) * i;
- log(Log::LineType::Warning, " " + i18n("Code is present in bootloader reserved area (at address %1). It will be ignored.").arg(toHexLabel(address, device().nbCharsAddress())));
+ log(Log::LineType::Warning, " " + i18n("Code is present in bootloader reserved area (at address %1). It will be ignored.").tqarg(toHexLabel(address, device().nbCharsAddress())));
break;
}
@@ -194,7 +194,7 @@ bool TinyBootloader::Hardware::writeCode(const Device::Array &data, bool erase)
if ( !erase ) {
bool write = false;
for (uint k=0; k<nbWords; k++) {
- if ( wdata[i+k]==device().mask(Pic::MemoryRangeType::Code) ) continue;
+ if ( wdata[i+k]==device().tqmask(Pic::MemoryRangeType::Code) ) continue;
write = true;
break;
}
@@ -206,7 +206,7 @@ bool TinyBootloader::Hardware::writeCode(const Device::Array &data, bool erase)
if ( !sendCodeAddress(address, crc) ) return false;
uint nbw = device().nbBytesWord(Pic::MemoryRangeType::Code);
if ( !sendChar(nbw*nbWords, &crc) ) return false;
- log(Log::DebugLevel::Normal, QString("write code memory at %1: %2 bytes").arg(toHexLabel(address, 4)).arg(2*nbWords));
+ log(Log::DebugLevel::Normal, TQString("write code memory at %1: %2 bytes").tqarg(toHexLabel(address, 4)).tqarg(2*nbWords));
for(uint k=0; k<nbWords; k++) {
if ( !sendChar(wdata[i+k].byte(0), &crc) ) return false; // data low
if ( !sendChar(wdata[i+k].byte(1), &crc) ) return false; // data high
diff --git a/src/progs/tbl_bootloader/base/tbl_bootloader.h b/src/progs/tbl_bootloader/base/tbl_bootloader.h
index b6e759f..322df3e 100644
--- a/src/progs/tbl_bootloader/base/tbl_bootloader.h
+++ b/src/progs/tbl_bootloader/base/tbl_bootloader.h
@@ -33,7 +33,7 @@ public:
class Hardware : public ::Bootloader::Hardware
{
public:
- Hardware(::Programmer::Base &base, const QString &portDevice);
+ Hardware(::Programmer::Base &base, const TQString &portDevice);
Port::Serial *port() { return static_cast<Port::Serial *>(_port); }
bool verifyDeviceId();
virtual bool write(Pic::MemoryRangeType type, const Device::Array &data);
diff --git a/src/progs/tbl_bootloader/base/tbl_bootloader_data.h b/src/progs/tbl_bootloader/base/tbl_bootloader_data.h
index 51be528..d8e7f79 100644
--- a/src/progs/tbl_bootloader/base/tbl_bootloader_data.h
+++ b/src/progs/tbl_bootloader/base/tbl_bootloader_data.h
@@ -14,8 +14,8 @@ namespace TinyBootloader
struct Data {
uchar id;
};
- extern bool isSupported(const QString &device);
- extern const Data &data(const QString &device);
+ extern bool isSupported(const TQString &device);
+ extern const Data &data(const TQString &device);
} // namespace
#endif
diff --git a/src/progs/tbl_bootloader/base/tbl_bootloader_prog.h b/src/progs/tbl_bootloader/base/tbl_bootloader_prog.h
index 75b986d..08cbf3f 100644
--- a/src/progs/tbl_bootloader/base/tbl_bootloader_prog.h
+++ b/src/progs/tbl_bootloader/base/tbl_bootloader_prog.h
@@ -18,6 +18,7 @@ namespace TinyBootloader
class ProgrammerBase : public ::Bootloader::ProgrammerBase
{
Q_OBJECT
+ TQ_OBJECT
public:
ProgrammerBase(const Programmer::Group &group, const Pic::Data *data);
virtual bool verifyDeviceId() { return static_cast<Hardware &>(hardware()).verifyDeviceId(); }
@@ -27,8 +28,8 @@ public:
class Group : public ::Bootloader::Group
{
public:
- virtual QString name() const { return "tbl_bootloader"; }
- virtual QString label() const { return i18n("Tiny Bootloader"); }
+ virtual TQString name() const { return "tbl_bootloader"; }
+ virtual TQString label() const { return i18n("Tiny Bootloader"); }
virtual ::Programmer::Properties properties() const { return ::Programmer::Programmer; }
virtual ::Programmer::TargetPowerMode targetPowerMode() const { return ::Programmer::TargetSelfPowered; }
virtual bool isPortSupported(PortType type) const { return type==PortType::Serial; }
diff --git a/src/progs/tbl_bootloader/gui/tbl_bootloader_ui.cpp b/src/progs/tbl_bootloader/gui/tbl_bootloader_ui.cpp
index 5b576b9..f0c1725 100644
--- a/src/progs/tbl_bootloader/gui/tbl_bootloader_ui.cpp
+++ b/src/progs/tbl_bootloader/gui/tbl_bootloader_ui.cpp
@@ -12,29 +12,29 @@
#include "common/port/serial.h"
//-----------------------------------------------------------------------------
-TinyBootloader::ConfigWidget::ConfigWidget(const::Programmer::Group &group, QWidget *parent)
- : ::Programmer::ConfigWidget(group, parent)
+TinyBootloader::ConfigWidget::ConfigWidget(const::Programmer::Group &group, TQWidget *tqparent)
+ : ::Programmer::ConfigWidget(group, tqparent)
{
uint row = numRows();
- QLabel *label = new QLabel(i18n("Port Speed:"), this);
+ TQLabel *label = new TQLabel(i18n("Port Speed:"), this);
addWidget(label, row,row, 0,0);
_speed = new KComboBox(this);
for (uint i=0; i<Port::Serial::Nb_Speeds; i++) {
if ( Port::Serial::SPEED_VALUES[i]==0 || !Port::Serial::SPEED_DATA[i].supported ) continue;
- _speed->insertItem(QString::number(Port::Serial::SPEED_VALUES[i]));
+ _speed->insertItem(TQString::number(Port::Serial::SPEED_VALUES[i]));
}
addWidget(_speed, row,row, 1,1);
row++;
- label = new QLabel(i18n("Timeout (ms):"), this);
+ label = new TQLabel(i18n("Timeout (ms):"), this);
addWidget(label, row,row, 0,0);
_timeout = new KIntNumInput(this);
_timeout->setMinValue(0);
addWidget(_timeout, row,row, 1,1);
row++;
- label = new QLabel(i18n("No of Retries:"), this);
+ label = new TQLabel(i18n("No of Retries:"), this);
addWidget(label, row,row, 0,0);
_retries = new KIntNumInput(this);
_retries->setMinValue(0);
@@ -74,7 +74,7 @@ void TinyBootloader::ConfigWidget::loadConfig()
}
//-----------------------------------------------------------------------------
-::Programmer::ConfigWidget *TinyBootloader::GroupUI::createConfigWidget(QWidget *parent) const
+::Programmer::ConfigWidget *TinyBootloader::GroupUI::createConfigWidget(TQWidget *tqparent) const
{
- return new ConfigWidget(static_cast<const ::Programmer::Group &>(group()), parent);
+ return new ConfigWidget(static_cast<const ::Programmer::Group &>(group()), tqparent);
}
diff --git a/src/progs/tbl_bootloader/gui/tbl_bootloader_ui.h b/src/progs/tbl_bootloader/gui/tbl_bootloader_ui.h
index d0285af..442b879 100644
--- a/src/progs/tbl_bootloader/gui/tbl_bootloader_ui.h
+++ b/src/progs/tbl_bootloader/gui/tbl_bootloader_ui.h
@@ -20,8 +20,9 @@ namespace TinyBootloader
class ConfigWidget: public ::Programmer::ConfigWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- ConfigWidget(const ::Programmer::Group &group, QWidget *parent);
+ ConfigWidget(const ::Programmer::Group &group, TQWidget *tqparent);
virtual void loadConfig();
virtual void saveConfig();
@@ -34,7 +35,7 @@ private:
class GroupUI : public ::Bootloader::GroupUI
{
public:
- virtual ::Programmer::ConfigWidget *createConfigWidget(QWidget *parent) const;
+ virtual ::Programmer::ConfigWidget *createConfigWidget(TQWidget *tqparent) const;
};
} // namespace
diff --git a/src/progs/tbl_bootloader/xml/xml_tbl_bootloader_parser.cpp b/src/progs/tbl_bootloader/xml/xml_tbl_bootloader_parser.cpp
index 62ed806..0960cd1 100644
--- a/src/progs/tbl_bootloader/xml/xml_tbl_bootloader_parser.cpp
+++ b/src/progs/tbl_bootloader/xml/xml_tbl_bootloader_parser.cpp
@@ -22,11 +22,11 @@ public:
XmlToData() : Programmer::XmlToData<Data>("tbl_bootloader", "TinyBootloader") {}
private:
- virtual void parseData(QDomElement element, Data &data);
- virtual void outputData(const Data &data, QTextStream &s) const;
+ virtual void parseData(TQDomElement element, Data &data);
+ virtual void outputData(const Data &data, TQTextStream &s) const;
};
-void TinyBootloader::XmlToData::parseData(QDomElement element, Data &data)
+void TinyBootloader::XmlToData::parseData(TQDomElement element, Data &data)
{
const Device::Data *ddata = Device::lister().data(currentDevice());
if ( ddata->group().name()!="pic" ) qFatal("non-pic device not supported");
@@ -37,7 +37,7 @@ void TinyBootloader::XmlToData::parseData(QDomElement element, Data &data)
if ( !ok ) qFatal("Invalid \"id\" tag");
}
-void TinyBootloader::XmlToData::outputData(const Data &data, QTextStream &s) const
+void TinyBootloader::XmlToData::outputData(const Data &data, TQTextStream &s) const
{
s << data.id;
}