summaryrefslogtreecommitdiffstats
path: root/src/progs/direct
diff options
context:
space:
mode:
Diffstat (limited to 'src/progs/direct')
-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
15 files changed, 124 insertions, 120 deletions
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;