diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:33:27 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:33:27 -0600 |
commit | 9d6927a7d6a543332f828bffedf65eecf6774c6d (patch) | |
tree | 9f8210096908fddb7d266b477152021c45fa1a00 /src/progs/direct | |
parent | 3534213800bd8d151759df307755f2bbd592dfa1 (diff) | |
download | piklab-9d6927a7d6a543332f828bffedf65eecf6774c6d.tar.gz piklab-9d6927a7d6a543332f828bffedf65eecf6774c6d.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'src/progs/direct')
-rw-r--r-- | src/progs/direct/base/direct.cpp | 6 | ||||
-rw-r--r-- | src/progs/direct/base/direct_16.cpp | 4 | ||||
-rw-r--r-- | src/progs/direct/base/direct_18F.cpp | 8 | ||||
-rw-r--r-- | src/progs/direct/base/direct_mem24.cpp | 12 | ||||
-rw-r--r-- | src/progs/direct/base/direct_pic.cpp | 2 | ||||
-rw-r--r-- | src/progs/direct/gui/direct_config_widget.cpp | 10 | ||||
-rw-r--r-- | src/progs/direct/gui/direct_config_widget.h | 2 |
7 files changed, 22 insertions, 22 deletions
diff --git a/src/progs/direct/base/direct.cpp b/src/progs/direct/base/direct.cpp index 7603ca3..91d9a65 100644 --- a/src/progs/direct/base/direct.cpp +++ b/src/progs/direct/base/direct.cpp @@ -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, TQString("Hardware::setPin %1 %2: %3 %4").tqarg(PIN_DATA[type].label).tqarg(pin).tqarg(on).tqarg(_data.clockDelay)); + //log(Log::DebugLevel::Extra, TQString("Hardware::setPin %1 %2: %3 %4").arg(PIN_DATA[type].label).arg(pin).arg(on).arg(_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, TQString("Hardware::read DataIn %2: %3").tqarg(pin).tqarg(on)); + //log(Log::DebugLevel::Extra, TQString("Hardware::read DataIn %2: %3").arg(pin).arg(on)); return on; } @@ -107,7 +107,7 @@ uint Direct::Hardware::nbPins(Port::IODir dir) const TQString Direct::Hardware::pinLabelForIndex(Port::IODir dir, uint i) const { Port::PinData pd = _port->pinData(dir)[i]; - return TQString("%1 (%2)").tqarg(pd.pin+1).tqarg(pd.label); + return TQString("%1 (%2)").arg(pd.pin+1).arg(pd.label); } Port::IODir Direct::Hardware::ioTypeForPin(int pin) const diff --git a/src/progs/direct/base/direct_16.cpp b/src/progs/direct/base/direct_16.cpp index ef17479..0c930c9 100644 --- a/src/progs/direct/base/direct_16.cpp +++ b/src/progs/direct/base/direct_16.cpp @@ -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.").tqarg(type.label()).tqarg(toHexLabel(i, 8))); + log(Log::LineType::Error, i18n("Error programming %1 at %2.").arg(type.label()).arg(toHexLabel(i, 8))); return false; } } @@ -134,7 +134,7 @@ bool Direct::pic16::writeWords(Pic::MemoryRangeType type, const Device::Array &d } } startProg(type); - TQString cmd = TQString("w%1").tqarg(waitProgTime(type)); + TQString cmd = TQString("w%1").arg(waitProgTime(type)); pulseEngine(cmd.latin1()); endProg(type); return true; diff --git a/src/progs/direct/base/direct_18F.cpp b/src/progs/direct/base/direct_18F.cpp index 0ad5533..8c2c371 100644 --- a/src/progs/direct/base/direct_18F.cpp +++ b/src/progs/direct/base/direct_18F.cpp @@ -27,11 +27,11 @@ void Direct::P18F::program(Type type) TQString cmd; switch (type) { case Code: - cmd = TQString("d,C,c,C,c,C,c,Cw%1cw%2X0000,").tqarg(programHighTime(Code)).tqarg(programLowTime()); + cmd = TQString("d,C,c,C,c,C,c,Cw%1cw%2X0000,").arg(programHighTime(Code)).arg(programLowTime()); break; case Erase: pulseEngine("k0,X0000,"); // NOP - cmd = TQString("k0;w%1;w%2;X0000").tqarg(programHighTime(type)).tqarg(programLowTime()); + cmd = TQString("k0;w%1;w%2;X0000").arg(programHighTime(type)).arg(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 = TQString("w%1").tqarg(programLowTime()); + cmd = TQString("w%1").arg(programLowTime()); break; } pulseEngine(cmd); @@ -234,7 +234,7 @@ void Direct::P18F1220::program(Type type) { if ( type==Eeprom ) { pulseEngine("k0,X0000,"); // NOP - TQString cmd = TQString("k0;w%1;w%2;X0000").tqarg(programHighTime(type)).tqarg(programLowTime()); + TQString cmd = TQString("k0;w%1;w%2;X0000").arg(programHighTime(type)).arg(programLowTime()); pulseEngine(cmd); } else P18F::program(type); } diff --git a/src/progs/direct/base/direct_mem24.cpp b/src/progs/direct/base/direct_mem24.cpp index 98b5f9a..f2a00ff 100644 --- a/src/progs/direct/base/direct_mem24.cpp +++ b/src/progs/direct/base/direct_mem24.cpp @@ -68,18 +68,18 @@ uint Direct::Mem24DeviceSpecific::controlByte(uint address, Operation operation) bool Direct::Mem24DeviceSpecific::setAddress(uint address) { - log(Log::DebugLevel::Extra, TQString("set address %1").tqarg(toHexLabel(address, nbChars(NumberBase::Hex, address)))); + log(Log::DebugLevel::Extra, TQString("set address %1").arg(toHexLabel(address, nbChars(NumberBase::Hex, address)))); if ( !start() ) return false; uint bsize = device().nbBytes() / device().nbBlocks(); uint block = address / bsize; - log(Log::DebugLevel::Extra, TQString(" in block #%1/%2").tqarg(block).tqarg(device().nbBlocks())); + log(Log::DebugLevel::Extra, TQString(" in block #%1/%2").arg(block).arg(device().nbBlocks())); uint cbyte = controlByte(address, Write); - log(Log::DebugLevel::Max, TQString(" control byte is %1").tqarg(toHexLabel(cbyte, 2))); + log(Log::DebugLevel::Max, TQString(" control byte is %1").arg(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, TQString(" byte #%1: %2").tqarg(i).tqarg(toHexLabel(add, 2))); + log(Log::DebugLevel::Max, TQString(" byte #%1: %2").arg(i).arg(toHexLabel(add, 2))); if ( !writeByteAck(add) ) return false; } return true; @@ -107,7 +107,7 @@ bool Direct::Mem24DeviceSpecific::doWrite(const Device::Array &data) // 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, TQString("write page #%1/%2").tqarg(i).tqarg(nbPages)); + log(Log::DebugLevel::Extra, TQString("write page #%1/%2").arg(i).arg(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").tqarg(toHexLabel(address, nbChars(device().nbBytes())))); + log(Log::LineType::Error, i18n("Timeout writing at address %1").arg(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 c6316e9..19c74b5 100644 --- a/src/progs/direct/base/direct_pic.cpp +++ b/src/progs/direct/base/direct_pic.cpp @@ -19,7 +19,7 @@ Direct::PulseEngine::PulseEngine(::Programmer::Base &base) BitValue Direct::PulseEngine::pulseEngine(const TQString &cmd, BitValue value) { - _pbase.log(Log::DebugLevel::Extra, TQString("pulse engine: %1").tqarg(cmd)); + _pbase.log(Log::DebugLevel::Extra, TQString("pulse engine: %1").arg(cmd)); TQByteArray a = toAscii(cmd); BitValue res = 0; for (const char *ptr=a.data(); (ptr-a.data())<int(a.count()); ++ptr) diff --git a/src/progs/direct/gui/direct_config_widget.cpp b/src/progs/direct/gui/direct_config_widget.cpp index 36a8f11..b5f651c 100644 --- a/src/progs/direct/gui/direct_config_widget.cpp +++ b/src/progs/direct/gui/direct_config_widget.cpp @@ -57,7 +57,7 @@ Direct::HConfigWidget::HConfigWidget(::Programmer::Base &base, TQWidget *parent, _testLabels[i] = new TQLabel(w); TQToolTip::add(_testcbs[i], PIN_DATA[i].testComment); grid->addWidget(_testLabels[i], i, 4); - updateTesttqStatus(PinType(i), false); + updateTestStatus(PinType(i), false); } else { _testcbs[i] = 0; _testLabels[i] = 0; @@ -150,11 +150,11 @@ void Direct::HConfigWidget::updateTestPin(PinType ptype) Q_ASSERT( _connected && ptype!=DataIn ); bool on = _testcbs[ptype]->isChecked(); hardware()->setPin(ptype, on); - updateTesttqStatus(ptype, on); + updateTestStatus(ptype, on); if ( ptype==Vpp ) updateDataIn(); } -void Direct::HConfigWidget::updateTesttqStatus(PinType ptype, bool on) +void Direct::HConfigWidget::updateTestStatus(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::updateTesttqStatus(PinType ptype, bool on) void Direct::HConfigWidget::updateDataIn() { bool on = hardware()->readBit(); - updateTesttqStatus(DataIn, on); + updateTestStatus(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); - updateTesttqStatus(PinType(i), false); + updateTestStatus(PinType(i), false); } if ( _connected ) _timerPollDataOut->start(100); _sendBitsButton->setEnabled(_connected); diff --git a/src/progs/direct/gui/direct_config_widget.h b/src/progs/direct/gui/direct_config_widget.h index d61be1a..8d7d5cb 100644 --- a/src/progs/direct/gui/direct_config_widget.h +++ b/src/progs/direct/gui/direct_config_widget.h @@ -55,7 +55,7 @@ private: void sendBits(uint d, int nbb); void updateTestPin(PinType ptype); - void updateTesttqStatus(PinType ptype, bool on); + void updateTestStatus(PinType ptype, bool on); uint pin(PinType ptype) const; void updatePin(PinType ptype); Hardware *hardware() { return static_cast<Hardware *>(_hardware); } |