Rename old tq methods that no longer need a unique name

r14.0.x
Timothy Pearson 13 years ago
parent ad1fc5fc8e
commit 9d9fe02a94

@ -146,13 +146,13 @@ bool Process::Base::isFilteredLine(const TQString &line)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void Process::StringOutput::receivedStdout(KProcess*, char *data, int len) void Process::StringOutput::receivedStdout(KProcess*, char *data, int len)
{ {
_stdout += TQString::tqfromLatin1(data, len); _stdout += TQString::fromLatin1(data, len);
emit stdoutDataReceived(); emit stdoutDataReceived();
} }
void Process::StringOutput::receivedStderr(KProcess*, char *data, int len) void Process::StringOutput::receivedStderr(KProcess*, char *data, int len)
{ {
_stderr += TQString::tqfromLatin1(data, len); _stderr += TQString::fromLatin1(data, len);
emit stderrDataReceived(); emit stderrDataReceived();
} }
@ -164,7 +164,7 @@ void Process::LineBase::receivedStdout(KProcess*, char *data, int len)
if ( data[i]=='\n' ) { if ( data[i]=='\n' ) {
if ( !isFilteredLine(_stdout) ) addStdoutLine(_stdout); if ( !isFilteredLine(_stdout) ) addStdoutLine(_stdout);
_stdout = TQString(); _stdout = TQString();
} else _stdout += TQString::tqfromLatin1(data + i, 1); } else _stdout += TQString::fromLatin1(data + i, 1);
} }
if ( !_process->isRunning() && !isFilteredLine(_stdout) ) addStdoutLine(_stdout); if ( !_process->isRunning() && !isFilteredLine(_stdout) ) addStdoutLine(_stdout);
emit stdoutDataReceived(); emit stdoutDataReceived();
@ -177,7 +177,7 @@ void Process::LineBase::receivedStderr(KProcess*, char *data, int len)
if ( data[i]=='\n' ) { if ( data[i]=='\n' ) {
if ( !isFilteredLine(_stderr) ) addStderrLine(_stderr); if ( !isFilteredLine(_stderr) ) addStderrLine(_stderr);
_stderr = TQString(); _stderr = TQString();
} else _stderr += TQString::tqfromLatin1(data + i, 1); } else _stderr += TQString::fromLatin1(data + i, 1);
} }
if ( !_process->isRunning() && !isFilteredLine(_stderr) ) addStderrLine(_stderr); if ( !_process->isRunning() && !isFilteredLine(_stderr) ) addStderrLine(_stderr);
emit stderrDataReceived(); emit stderrDataReceived();

@ -53,7 +53,7 @@ void EditListBox::init(uint nbColumns, TQWidget *view)
_moveDownButton = 0; _moveDownButton = 0;
_removeAllButton = 0; _removeAllButton = 0;
_resetButton = 0; _resetButton = 0;
tqsetSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding)); setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding));
TQGridLayout *grid = new TQGridLayout(this, 1, 1, 0, KDialog::spacingHint()); TQGridLayout *grid = new TQGridLayout(this, 1, 1, 0, KDialog::spacingHint());
uint row = 0; uint row = 0;

@ -125,12 +125,12 @@ bool GenericHexWordEditor::event(TQEvent *e)
return TQLineEdit::event(e); return TQLineEdit::event(e);
} }
TQSize GenericHexWordEditor::tqsizeHint() const TQSize GenericHexWordEditor::sizeHint() const
{ {
return TQSize(maxCharWidth(NumberBase::Hex, font()) * (_nbChars+1), fontMetrics().height()); return TQSize(maxCharWidth(NumberBase::Hex, font()) * (_nbChars+1), fontMetrics().height());
} }
TQSize GenericHexWordEditor::tqminimumSizeHint() const TQSize GenericHexWordEditor::minimumSizeHint() const
{ {
return TQSize(maxCharWidth(NumberBase::Hex, font()) * (_nbChars+1), fontMetrics().height()); return TQSize(maxCharWidth(NumberBase::Hex, font()) * (_nbChars+1), fontMetrics().height());
} }

@ -35,8 +35,8 @@ Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
GenericHexWordEditor(uint nbChars, bool hasBlankValue, TQWidget *parent); GenericHexWordEditor(uint nbChars, bool hasBlankValue, TQWidget *parent);
virtual TQSize tqsizeHint() const; virtual TQSize sizeHint() const;
virtual TQSize tqminimumSizeHint() const; virtual TQSize minimumSizeHint() const;
signals: signals:
void modified(); void modified();

@ -77,7 +77,7 @@ public:
ParentType::_widget->clear(); ParentType::_widget->clear();
} }
void fixMinimumWidth() { void fixMinimumWidth() {
ParentType::_widget->setMinimumWidth(ParentType::_widget->tqsizeHint().width()); ParentType::_widget->setMinimumWidth(ParentType::_widget->sizeHint().width());
} }
protected: protected:

@ -62,8 +62,8 @@ bool ListView::eventFilter(TQObject *o, TQEvent *e)
break; break;
} }
case TQEvent::FocusOut: { case TQEvent::FocusOut: {
//qDebug("focus out %i %i=%i", tqApp->tqfocusWidget(), tqfocusWidget(), (*it)->_editWidgets[i]); //qDebug("focus out %i %i=%i", tqApp->focusWidget(), focusWidget(), (*it)->_editWidgets[i]);
if ( tqApp->tqfocusWidget() && tqfocusWidget()==(*it)->_editWidgets[i] ) break; if ( tqApp->focusWidget() && focusWidget()==(*it)->_editWidgets[i] ) break;
//qDebug("ext"); //qDebug("ext");
TQCustomEvent *e = new TQCustomEvent(9999); TQCustomEvent *e = new TQCustomEvent(9999);
TQApplication::postEvent(o, e); TQApplication::postEvent(o, e);
@ -95,7 +95,7 @@ void ListViewToolTip::maybeTip(const TQPoint &p)
if ( _listView==0 ) return; if ( _listView==0 ) return;
const TQListViewItem* item = _listView->itemAt(p); const TQListViewItem* item = _listView->itemAt(p);
if ( item==0 ) return; if ( item==0 ) return;
TQRect rect = _listView->tqitemRect(item); TQRect rect = _listView->itemRect(item);
if ( !rect.isValid() ) return; if ( !rect.isValid() ) return;
int col = _listView->header()->sectionAt(p.x()); int col = _listView->header()->sectionAt(p.x());
TQString text = _listView->tooltip(*item, col); TQString text = _listView->tooltip(*item, col);
@ -149,7 +149,7 @@ void EditListViewItem::startRename()
_renaming = true; _renaming = true;
_editWidgets.resize(lv->columns()); _editWidgets.resize(lv->columns());
for (uint i=0; i<_editWidgets.count(); i++) { for (uint i=0; i<_editWidgets.count(); i++) {
TQRect r = lv->tqitemRect(this); TQRect r = lv->itemRect(this);
r = TQRect(lv->viewportToContents(r.topLeft()), r.size()); r = TQRect(lv->viewportToContents(r.topLeft()), r.size());
r.setLeft(lv->header()->sectionPos(i)); r.setLeft(lv->header()->sectionPos(i));
r.setWidth(lv->header()->sectionSize(i) - 1); r.setWidth(lv->header()->sectionSize(i) - 1);
@ -162,7 +162,7 @@ void EditListViewItem::startRename()
if ( _editWidgets[i]==0 ) continue; if ( _editWidgets[i]==0 ) continue;
_editWidgets[i]->installEventFilter(lv); _editWidgets[i]->installEventFilter(lv);
lv->addChild(_editWidgets[i], r.x(), r.y()); lv->addChild(_editWidgets[i], r.x(), r.y());
uint w = TQMIN(r.width(), _editWidgets[i]->tqsizeHint().width()); uint w = TQMIN(r.width(), _editWidgets[i]->sizeHint().width());
_editWidgets[i]->resize(w, r.height()); _editWidgets[i]->resize(w, r.height());
lv->viewport()->setFocusProxy(_editWidgets[i]); lv->viewport()->setFocusProxy(_editWidgets[i]);
_editWidgets[i]->setFocus(); _editWidgets[i]->setFocus();
@ -191,9 +191,9 @@ void EditListViewItem::removeEditBox()
void EditListViewItem::editDone(int col, const TQWidget *edit) void EditListViewItem::editDone(int col, const TQWidget *edit)
{ {
if ( edit->tqmetaObject()->findProperty("text", true)!=-1 ) if ( edit->metaObject()->findProperty("text", true)!=-1 )
emit listView()->itemRenamed(this, col, edit->property("text").toString()); emit listView()->itemRenamed(this, col, edit->property("text").toString());
else if ( edit->tqmetaObject()->findProperty("currentText", true)!=-1 ) else if ( edit->metaObject()->findProperty("currentText", true)!=-1 )
emit listView()->itemRenamed(this, col, edit->property("currentText").toString()); emit listView()->itemRenamed(this, col, edit->property("currentText").toString());
} }
@ -215,7 +215,7 @@ int EditListViewItem::width(const TQFontMetrics &fm, const TQListView *lv, int c
int w = KListViewItem::width(fm, lv, col); int w = KListViewItem::width(fm, lv, col);
TQWidget *edit = editWidgetFactory(col); TQWidget *edit = editWidgetFactory(col);
if ( edit==0 ) return w; if ( edit==0 ) return w;
w = TQMAX(w, edit->tqsizeHint().width()); w = TQMAX(w, edit->sizeHint().width());
delete edit; delete edit;
return w; return w;
} }

@ -271,7 +271,7 @@ KAboutData::setProgramLogo(const TQImage& image)
TQString TQString
KAboutData::version() const KAboutData::version() const
{ {
return TQString::tqfromLatin1(mVersion); return TQString::fromLatin1(mVersion);
} }
TQString TQString
@ -286,13 +286,13 @@ KAboutData::shortDescription() const
TQString TQString
KAboutData::homepage() const KAboutData::homepage() const
{ {
return TQString::tqfromLatin1(mHomepageAddress); return TQString::fromLatin1(mHomepageAddress);
} }
TQString TQString
KAboutData::bugAddress() const KAboutData::bugAddress() const
{ {
return TQString::tqfromLatin1(mBugEmailAddress); return TQString::fromLatin1(mBugEmailAddress);
} }
const TQValueList<KAboutPerson> const TQValueList<KAboutPerson>

@ -880,7 +880,7 @@ KCmdLineArgs::usage(const char *id)
bool hasOptions = false; bool hasOptions = false;
TQString optionsHeader; TQString optionsHeader;
if (args->name) if (args->name)
optionsHeader = optionHeaderString.tqarg(i18n("%1 options").tqarg(TQString::tqfromLatin1(args->name))); optionsHeader = optionHeaderString.tqarg(i18n("%1 options").tqarg(TQString::fromLatin1(args->name)));
else else
optionsHeader = i18n("\nOptions:\n"); optionsHeader = i18n("\nOptions:\n");

@ -100,12 +100,12 @@ const Port::Parallel::PPinData Port::Parallel::PIN_DATA[Nb_Pins] = {
{ Data, 0x20, Out, "D5" }, // data 5 { Data, 0x20, Out, "D5" }, // data 5
{ Data, 0x40, Out, "D6" }, // data 6 { Data, 0x40, Out, "D6" }, // data 6
{ Data, 0x80, Out, "D7" }, // data 7 { Data, 0x80, Out, "D7" }, // data 7
{ tqStatus, 0x40, In, "/ACK" }, // !ack { Status, 0x40, In, "/ACK" }, // !ack
{ tqStatus, 0x80, In, "BUSY" }, // busy { Status, 0x80, In, "BUSY" }, // busy
{ tqStatus, 0x20, In, "PAPER" }, // pout { Status, 0x20, In, "PAPER" }, // pout
{ tqStatus, 0x10, In, "SELin" }, // select { Status, 0x10, In, "SELin" }, // select
{ Control, 0x02, Out, "LF" }, // !feed { Control, 0x02, Out, "LF" }, // !feed
{ tqStatus, 0x08, In, "/ERROR" }, // !error { Status, 0x08, In, "/ERROR" }, // !error
{ Control, 0x04, Out, "PRIME" }, // !init { Control, 0x04, Out, "PRIME" }, // !init
{ Control, 0x08, Out, "SELout" }, // !si { Control, 0x08, Out, "SELout" }, // !si
{ Nb_RequestTypes, 0x00, NoIO, "GND" }, // GND { Nb_RequestTypes, 0x00, NoIO, "GND" }, // GND

@ -33,7 +33,7 @@ public:
enum Pin { DS = 0, D0, D1, D2, D3, D4, D5, D6, D7, ACK, BUSY, PAPER, SELin, enum Pin { DS = 0, D0, D1, D2, D3, D4, D5, D6, D7, ACK, BUSY, PAPER, SELin,
LF, ERROR, PRIME, SELout, P18, P19, P20, P21, P22, P23, P24, P25, LF, ERROR, PRIME, SELout, P18, P19, P20, P21, P22, P23, P24, P25,
Nb_Pins }; Nb_Pins };
enum RequestType { Control = 0, tqStatus, Data, Nb_RequestTypes }; enum RequestType { Control = 0, Status, Data, Nb_RequestTypes };
struct PPinData { struct PPinData {
RequestType rType; RequestType rType;
uchar mask; uchar mask;

@ -387,7 +387,7 @@ bool Port::Serial::internalReadPin(Pin pin, LogicType type, bool &value)
return true; return true;
#elif defined(Q_OS_WIN) #elif defined(Q_OS_WIN)
DWORD status; DWORD status;
if ( GetCommModemtqStatus(_fd, &status)==0 ) return false; if ( GetCommModemStatus(_fd, &status)==0 ) return false;
switch (pin) { switch (pin) {
case DCD: value = (status & MS_RLSD_ON); break; case DCD: value = (status & MS_RLSD_ON); break;
case DSR: value = (status & MS_DSR_ON); break; case DSR: value = (status & MS_DSR_ON); break;

@ -12,16 +12,16 @@
# include <tqpainter.h> # include <tqpainter.h>
# include <kglobal.h> # include <kglobal.h>
TQColor Device::statusColor(tqStatus status) TQColor Device::statusColor(Status status)
{ {
switch (status.type()) { switch (status.type()) {
case tqStatus::Future: return TQt::blue; case Status::Future: return TQt::blue;
case tqStatus::InProduction: return TQt::green; case Status::InProduction: return TQt::green;
case tqStatus::Mature: case Status::Mature:
case tqStatus::NotRecommended: return TQColor("orange"); case Status::NotRecommended: return TQColor("orange");
case tqStatus::EOL: return TQt::red; case Status::EOL: return TQt::red;
case tqStatus::Unknown: case Status::Unknown:
case tqStatus::Nb_Types: break; case Status::Nb_Types: break;
} }
return TQt::black; return TQt::black;
} }

@ -61,7 +61,7 @@ protected:
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
#if !defined(NO_KDE) #if !defined(NO_KDE)
extern TQColor statusColor(tqStatus status); extern TQColor statusColor(Status status);
extern TQPixmap vddGraph(const TQString &xLabel, const TQString &yLabel, const TQValueVector<RangeBox> &boxes); extern TQPixmap vddGraph(const TQString &xLabel, const TQString &yLabel, const TQValueVector<RangeBox> &boxes);
extern const Package *barPackage(const char *name, const Data &data); extern const Package *barPackage(const char *name, const Data &data);
extern TQPixmap pinsGraph(const Package &package); extern TQPixmap pinsGraph(const Package &package);

@ -13,7 +13,7 @@
#include "register.h" #include "register.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
const Device::tqStatus::Data Device::tqStatus::DATA[Nb_Types] = { const Device::Status::Data Device::Status::DATA[Nb_Types] = {
{ "IP", I18N_NOOP("In Production") }, { "IP", I18N_NOOP("In Production") },
{ "Future", I18N_NOOP("Future Product") }, { "Future", I18N_NOOP("Future Product") },
{ "NR", I18N_NOOP("Not Recommended for New Design") }, { "NR", I18N_NOOP("Not Recommended for New Design") },

@ -19,9 +19,9 @@
namespace Device namespace Device
{ {
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
BEGIN_DECLARE_ENUM(tqStatus) BEGIN_DECLARE_ENUM(Status)
InProduction = 0, Future, NotRecommended, EOL, Unknown, Mature InProduction = 0, Future, NotRecommended, EOL, Unknown, Mature
END_DECLARE_ENUM_STD(tqStatus) END_DECLARE_ENUM_STD(Status)
BEGIN_DECLARE_ENUM(MemoryTechnology) BEGIN_DECLARE_ENUM(MemoryTechnology)
Flash = 0, Eprom, Rom, Romless Flash = 0, Eprom, Rom, Romless
@ -121,7 +121,7 @@ public:
virtual TQString name() const { return _name; } virtual TQString name() const { return _name; }
virtual TQString fname(Special) const { return _name; } virtual TQString fname(Special) const { return _name; }
virtual TQString listViewGroup() const = 0; virtual TQString listViewGroup() const = 0;
tqStatus status() const { return _status; } Status status() const { return _status; }
const Documents &documents() const { return _documents; } const Documents &documents() const { return _documents; }
const TQStringList &alternatives() const { return _alternatives; } const TQStringList &alternatives() const { return _alternatives; }
MemoryTechnology memoryTechnology() const { return _memoryTechnology; } MemoryTechnology memoryTechnology() const { return _memoryTechnology; }
@ -141,7 +141,7 @@ protected:
TQString _name; TQString _name;
Documents _documents; Documents _documents;
TQStringList _alternatives; TQStringList _alternatives;
tqStatus _status; Status _status;
TQValueVector<FrequencyRange> _frequencyRanges; TQValueVector<FrequencyRange> _frequencyRanges;
MemoryTechnology _memoryTechnology; MemoryTechnology _memoryTechnology;
RegistersData *_registersData; RegistersData *_registersData;

@ -176,7 +176,7 @@ void Register::LineEdit::updateText()
setText(_value.isInitialized() ? toLabel(_base, _value, _nbChars) : "--"); setText(_value.isInitialized() ? toLabel(_base, _value, _nbChars) : "--");
uint w = 2*frameWidth() + maxLabelWidth(_base, _nbChars, font()); uint w = 2*frameWidth() + maxLabelWidth(_base, _nbChars, font());
setFixedWidth(w+5); setFixedWidth(w+5);
setFixedHeight(tqminimumSizeHint().height()); setFixedHeight(minimumSizeHint().height());
} }
void Register::LineEdit::setValue(NumberBase base, BitValue value, uint nbChars) void Register::LineEdit::setValue(NumberBase base, BitValue value, uint nbChars)

@ -114,7 +114,7 @@ Pic::ConfigWordEditor::ConfigWordEditor(Memory &memory, uint ci, bool withWordEd
connect(_mdb, TQT_SIGNAL(modified()), TQT_SLOT(updateDisplay())); connect(_mdb, TQT_SIGNAL(modified()), TQT_SLOT(updateDisplay()));
hbox->addWidget(_mdb); hbox->addWidget(_mdb);
KPushButton *button = new KPushButton(i18n("Details..."), this); KPushButton *button = new KPushButton(i18n("Details..."), this);
button->setFixedHeight(button->tqsizeHint().height()); button->setFixedHeight(button->sizeHint().height());
connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(showDialog())); connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(showDialog()));
hbox->addWidget(button); hbox->addWidget(button);
hbox->addStretch(1); hbox->addStretch(1);

@ -46,7 +46,7 @@ Pic::BankWidget::BankWidget(uint i, TQWidget *parent)
if ( (i/2)==0 ) { if ( (i/2)==0 ) {
TQString title = ((i%2)==0 ? i18n("Access Bank (low)") : i18n("Access Bank (high)")); TQString title = ((i%2)==0 ? i18n("Access Bank (low)") : i18n("Access Bank (high)"));
TQLabel *label = new TQLabel(title, this); TQLabel *label = new TQLabel(title, this);
label->tqsetAlignment(AlignCenter); label->setAlignment(AlignCenter);
top->addMultiCellWidget(label, row,row, 0,6, AlignHCenter); top->addMultiCellWidget(label, row,row, 0,6, AlignHCenter);
} else { } else {
_bankCombo = new TQComboBox(this); _bankCombo = new TQComboBox(this);
@ -59,7 +59,7 @@ Pic::BankWidget::BankWidget(uint i, TQWidget *parent)
} }
} else { } else {
TQLabel *label = new TQLabel(i18n("Bank %1").tqarg(i), this); TQLabel *label = new TQLabel(i18n("Bank %1").tqarg(i), this);
label->tqsetAlignment(AlignCenter); label->setAlignment(AlignCenter);
top->addMultiCellWidget(label, row,row, 0,6, AlignHCenter); top->addMultiCellWidget(label, row,row, 0,6, AlignHCenter);
} }
row++; row++;

@ -20,7 +20,7 @@ Register::TypeData Debugger::PicBase::registerTypeData(const TQString &name) con
return Register::TypeData(rdata.sfrs[name].address, rdata.nbChars()); return Register::TypeData(rdata.sfrs[name].address, rdata.nbChars());
} }
bool Debugger::PicBase::updatePorttqStatus(uint index, TQMap<uint, Device::PortBitData> &bits) bool Debugger::PicBase::updatePortStatus(uint index, TQMap<uint, Device::PortBitData> &bits)
{ {
const Pic::RegistersData &rdata = device()->registersData(); const Pic::RegistersData &rdata = device()->registersData();
BitValue tris; BitValue tris;
@ -65,7 +65,7 @@ const Debugger::PicBase &Debugger::PicSpecific::base() const
return static_cast<PicBase &>(_base); return static_cast<PicBase &>(_base);
} }
bool Debugger::PicSpecific::updatetqStatus() bool Debugger::PicSpecific::updateStatus()
{ {
if ( !Debugger::manager->readRegister(base().pcTypeData()) ) return false; if ( !Debugger::manager->readRegister(base().pcTypeData()) ) return false;
if ( !Debugger::manager->readRegister(base().registerTypeData("STATUS")) ) return false; if ( !Debugger::manager->readRegister(base().registerTypeData("STATUS")) ) return false;
@ -92,9 +92,9 @@ TQString Debugger::P16FSpecific::statusString() const
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
bool Debugger::P18FSpecific::updatetqStatus() bool Debugger::P18FSpecific::updateStatus()
{ {
if ( !PicSpecific::updatetqStatus() ) return false; if ( !PicSpecific::updateStatus() ) return false;
if ( !Debugger::manager->readRegister(base().registerTypeData("BSR")) ) return false; if ( !Debugger::manager->readRegister(base().registerTypeData("BSR")) ) return false;
return true; return true;
} }

@ -25,7 +25,7 @@ public:
const Pic::Data &device() const { return static_cast<const Pic::Data &>(*_base.device()); } const Pic::Data &device() const { return static_cast<const Pic::Data &>(*_base.device()); }
PicBase &base(); PicBase &base();
const PicBase &base() const; const PicBase &base() const;
virtual bool updatetqStatus(); virtual bool updateStatus();
virtual Register::TypeData wregTypeData() const = 0; virtual Register::TypeData wregTypeData() const = 0;
}; };
@ -44,7 +44,7 @@ class P18FSpecific : public PicSpecific
public: public:
P18FSpecific(Debugger::Base &base) : PicSpecific(base) {} P18FSpecific(Debugger::Base &base) : PicSpecific(base) {}
virtual TQString statusString() const; virtual TQString statusString() const;
virtual bool updatetqStatus(); virtual bool updateStatus();
virtual Register::TypeData wregTypeData() const; virtual Register::TypeData wregTypeData() const;
}; };
@ -57,7 +57,7 @@ public:
const PicSpecific *deviceSpecific() const { return static_cast<const PicSpecific *>(_deviceSpecific); } const PicSpecific *deviceSpecific() const { return static_cast<const PicSpecific *>(_deviceSpecific); }
const Pic::Data *device() const { return static_cast<const Pic::Data *>(Debugger::Base::device()); } const Pic::Data *device() const { return static_cast<const Pic::Data *>(Debugger::Base::device()); }
Register::TypeData registerTypeData(const TQString &name) const; Register::TypeData registerTypeData(const TQString &name) const;
virtual bool updatePorttqStatus(uint index, TQMap<uint, Device::PortBitData> &bits); virtual bool updatePortStatus(uint index, TQMap<uint, Device::PortBitData> &bits);
}; };
} // namespace } // namespace

@ -147,7 +147,7 @@ DeviceChooser::Dialog::Dialog(const TQString &device, Type type, TQWidget *paren
shbox = new TQHBoxLayout(vbox); shbox = new TQHBoxLayout(vbox);
// status filter // status filter
_statusCombo = new EnumComboBox<Device::tqStatus>(i18n("<Status>"), "status", frame); _statusCombo = new EnumComboBox<Device::Status>(i18n("<Status>"), "status", frame);
connect(_statusCombo->combo(), TQT_SIGNAL(activated(int)), TQT_SLOT(updateList())); connect(_statusCombo->combo(), TQT_SIGNAL(activated(int)), TQT_SLOT(updateList()));
shbox->addWidget(_statusCombo->combo()); shbox->addWidget(_statusCombo->combo());
@ -274,7 +274,7 @@ void DeviceChooser::Dialog::updateList(const TQString &device)
const Device::Data *data = Device::lister().data(list[i]); const Device::Data *data = Device::lister().data(list[i]);
Q_ASSERT(data); Q_ASSERT(data);
if ( _memoryCombo->value()!=Device::MemoryTechnology::Nb_Types && data->memoryTechnology()!=_memoryCombo->value() ) continue; if ( _memoryCombo->value()!=Device::MemoryTechnology::Nb_Types && data->memoryTechnology()!=_memoryCombo->value() ) continue;
if ( _statusCombo->value()!=Device::tqStatus::Nb_Types && data->status()!=_statusCombo->value() ) continue; if ( _statusCombo->value()!=Device::Status::Nb_Types && data->status()!=_statusCombo->value() ) continue;
if ( _featureCombo->value()!=Pic::Feature::Nb_Types ) { if ( _featureCombo->value()!=Pic::Feature::Nb_Types ) {
if ( data->group().name()!="pic" ) continue; if ( data->group().name()!="pic" ) continue;
if ( !static_cast<const Pic::Data *>(data)->hasFeature(_featureCombo->value()) ) continue; if ( !static_cast<const Pic::Data *>(data)->hasFeature(_featureCombo->value()) ) continue;

@ -105,7 +105,7 @@ private:
KeyComboBox<TQString> *_programmerCombo, *_toolCombo; KeyComboBox<TQString> *_programmerCombo, *_toolCombo;
EnumComboBox<ListType> *_listTypeCombo; EnumComboBox<ListType> *_listTypeCombo;
EnumComboBox<Device::MemoryTechnology> *_memoryCombo; EnumComboBox<Device::MemoryTechnology> *_memoryCombo;
EnumComboBox<Device::tqStatus> *_statusCombo; EnumComboBox<Device::Status> *_statusCombo;
EnumComboBox<Pic::Feature> *_featureCombo; EnumComboBox<Pic::Feature> *_featureCombo;
KListView *_listView; KListView *_listView;
View *_deviceView; View *_deviceView;

@ -110,7 +110,7 @@ LikeBack::LikeBack(Button buttons)
// KMessageBox::saveDontShowAgainContinue(messageShown); // KMessageBox::saveDontShowAgainContinue(messageShown);
// } // }
resize(tqsizeHint()); resize(sizeHint());
connect( &m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(autoMove()) ); connect( &m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(autoMove()) );
m_timer.start(10); m_timer.start(10);
@ -452,7 +452,7 @@ void LikeBack::init(bool isDevelopmentVersion, Button buttons)
if (m_process) if (m_process)
return; return;
m_process = new KProcess(); m_process = new KProcess();
*m_process << TQString::tqfromLatin1("kcmshell") << TQString::tqfromLatin1("kcm_useraccount"); *m_process << TQString::fromLatin1("kcmshell") << TQString::fromLatin1("kcm_useraccount");
connect( m_process, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(endFetchingEmailFrom()) ); connect( m_process, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(endFetchingEmailFrom()) );
if (!m_process->start()) { if (!m_process->start()) {
kdDebug() << "Couldn't start kcmshell.." << endl; kdDebug() << "Couldn't start kcmshell.." << endl;
@ -473,23 +473,23 @@ void LikeBack::endFetchingEmailFrom()
// m_configureEmail->setEnabled(true); // m_configureEmail->setEnabled(true);
// ### KDE4: why oh why is KEmailSettings in kio? // ### KDE4: why oh why is KEmailSettings in kio?
KConfig emailConf( TQString::tqfromLatin1("emaildefaults") ); KConfig emailConf( TQString::fromLatin1("emaildefaults") );
// find out the default profile // find out the default profile
emailConf.setGroup(TQString::tqfromLatin1("Defaults")); emailConf.setGroup(TQString::fromLatin1("Defaults"));
TQString profile = TQString::tqfromLatin1("PROFILE_"); TQString profile = TQString::fromLatin1("PROFILE_");
profile += emailConf.readEntry(TQString::tqfromLatin1("Profile"), TQString::tqfromLatin1("Default")); profile += emailConf.readEntry(TQString::fromLatin1("Profile"), TQString::fromLatin1("Default"));
emailConf.setGroup(profile); emailConf.setGroup(profile);
TQString fromaddr = emailConf.readEntry(TQString::tqfromLatin1("EmailAddress")); TQString fromaddr = emailConf.readEntry(TQString::fromLatin1("EmailAddress"));
if (fromaddr.isEmpty()) { if (fromaddr.isEmpty()) {
struct passwd *p; struct passwd *p;
p = getpwuid(getuid()); p = getpwuid(getuid());
m_fetchedEmail = TQString::tqfromLatin1(p->pw_name); m_fetchedEmail = TQString::fromLatin1(p->pw_name);
} else { } else {
TQString name = emailConf.readEntry(TQString::tqfromLatin1("FullName")); TQString name = emailConf.readEntry(TQString::fromLatin1("FullName"));
if (!name.isEmpty()) if (!name.isEmpty())
m_fetchedEmail = /*name + TQString::tqfromLatin1(" <") +*/ fromaddr /*+ TQString::tqfromLatin1(">")*/; m_fetchedEmail = /*name + TQString::fromLatin1(" <") +*/ fromaddr /*+ TQString::fromLatin1(">")*/;
} }
// m_from->setText( fromaddr ); // m_from->setText( fromaddr );
} }
@ -580,7 +580,7 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, TQString windowName, TQS
m_comment = new TQTextEdit(coloredWidget); m_comment = new TQTextEdit(coloredWidget);
TQIconSet sendIconSet = kapp->iconLoader()->loadIconSet("mail_send", KIcon::Toolbar); TQIconSet sendIconSet = kapp->iconLoader()->loadIconSet("mail_send", KIcon::Toolbar);
m_sendButton = new TQPushButton(sendIconSet, i18n("Send"), coloredWidget); m_sendButton = new TQPushButton(sendIconSet, i18n("Send"), coloredWidget);
m_sendButton->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding); m_sendButton->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding);
m_sendButton->setEnabled(false); m_sendButton->setEnabled(false);
connect( m_sendButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(send()) ); connect( m_sendButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(send()) );
connect( m_comment, TQT_SIGNAL(textChanged()), this, TQT_SLOT(commentChanged()) ); connect( m_comment, TQT_SIGNAL(textChanged()), this, TQT_SLOT(commentChanged()) );
@ -607,7 +607,7 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, TQString windowName, TQS
resize(kapp->desktop()->width() / 2, kapp->desktop()->height() / 3); resize(kapp->desktop()->width() / 2, kapp->desktop()->height() / 3);
setCaption(kapp->makeStdCaption(i18n("Send a Comment"))); setCaption(kapp->makeStdCaption(i18n("Send a Comment")));
// setMinimumSize(mainLayout->tqsizeHint()); // FIXME: Doesn't work! // setMinimumSize(mainLayout->sizeHint()); // FIXME: Doesn't work!
} }
LikeBackDialog::~LikeBackDialog() LikeBackDialog::~LikeBackDialog()

@ -76,7 +76,7 @@ FileListBox::FileListBox(TQWidget *parent)
_listView->header()->setResizeEnabled(false); _listView->header()->setResizeEnabled(false);
_listView->header()->setMovingEnabled(false); _listView->header()->setMovingEnabled(false);
_listView->setColumnText(0, i18n("Copy")); _listView->setColumnText(0, i18n("Copy"));
int spacing = tqstyle().tqpixelMetric(TQStyle::PM_HeaderMargin); int spacing = tqstyle().pixelMetric(TQStyle::PM_HeaderMargin);
TQFontMetrics fm(font()); TQFontMetrics fm(font());
_listView->header()->resizeSection(0, fm.width(i18n("Copy")) + 2*spacing); // hack _listView->header()->resizeSection(0, fm.width(i18n("Copy")) + 2*spacing); // hack
_listView->setColumnText(1, i18n("Filename")); _listView->setColumnText(1, i18n("Filename"));

@ -96,7 +96,7 @@ void TextEditor::addView()
connect(v, TQT_SIGNAL(gotFocus(Kate::View *)), TQT_SLOT(gotFocus(Kate::View *))); connect(v, TQT_SIGNAL(gotFocus(Kate::View *)), TQT_SLOT(gotFocus(Kate::View *)));
connect(v, TQT_SIGNAL(cursorPositionChanged()), TQT_SLOT(statusChanged())); connect(v, TQT_SIGNAL(cursorPositionChanged()), TQT_SLOT(statusChanged()));
connect(v, TQT_SIGNAL(dropEventPass(TQDropEvent *)), TQT_SIGNAL(dropEventPass(TQDropEvent *))); connect(v, TQT_SIGNAL(dropEventPass(TQDropEvent *)), TQT_SIGNAL(dropEventPass(TQDropEvent *)));
connect(v, TQT_SIGNAL(newtqStatus()), TQT_SLOT(statusChanged())); connect(v, TQT_SIGNAL(newStatus()), TQT_SLOT(statusChanged()));
v->show(); v->show();
v->setFocus(); v->setFocus();
v->child(0, "KateViewInternal")->installEventFilter(this); v->child(0, "KateViewInternal")->installEventFilter(this);

@ -91,23 +91,23 @@ MainWindow::MainWindow()
Main::_toplevel = this; Main::_toplevel = this;
// status bar // status bar
_actiontqStatus = new TQLabel(statusBar()); _actionStatus = new TQLabel(statusBar());
statusBar()->addWidget(_actiontqStatus); statusBar()->addWidget(_actionStatus);
_actionProgress = new TQProgressBar(statusBar()); _actionProgress = new TQProgressBar(statusBar());
statusBar()->addWidget(_actionProgress); statusBar()->addWidget(_actionProgress);
_debugtqStatus = new TQLabel(statusBar()); _debugStatus = new TQLabel(statusBar());
statusBar()->addWidget(_debugtqStatus, 0, true); statusBar()->addWidget(_debugStatus, 0, true);
_editortqStatus = new TQLabel(statusBar()); _editorStatus = new TQLabel(statusBar());
statusBar()->addWidget(_editortqStatus, 0, true); statusBar()->addWidget(_editorStatus, 0, true);
_programmertqStatus = new ProgrammerStatusWidget(statusBar()); _programmerStatus = new ProgrammerStatusWidget(statusBar());
connect(_programmertqStatus, TQT_SIGNAL(configure()), TQT_SLOT(configureProgrammer())); connect(_programmerStatus, TQT_SIGNAL(configure()), TQT_SLOT(configureProgrammer()));
connect(_programmertqStatus, TQT_SIGNAL(selected(const Programmer::Group &)), TQT_SLOT(selectProgrammer(const Programmer::Group &))); connect(_programmerStatus, TQT_SIGNAL(selected(const Programmer::Group &)), TQT_SLOT(selectProgrammer(const Programmer::Group &)));
statusBar()->addWidget(_programmertqStatus->widget(), 0, true); statusBar()->addWidget(_programmerStatus->widget(), 0, true);
_tooltqStatus = new ToolStatusWidget(statusBar()); _toolStatus = new ToolStatusWidget(statusBar());
connect(_tooltqStatus, TQT_SIGNAL(configureToolchain()), TQT_SLOT(configureToolchains())); connect(_toolStatus, TQT_SIGNAL(configureToolchain()), TQT_SLOT(configureToolchains()));
connect(_tooltqStatus, TQT_SIGNAL(configure()), TQT_SLOT(configureProject())); connect(_toolStatus, TQT_SIGNAL(configure()), TQT_SLOT(configureProject()));
connect(_tooltqStatus, TQT_SIGNAL(selected(const Tool::Group &)), TQT_SLOT(selectTool(const Tool::Group &))); connect(_toolStatus, TQT_SIGNAL(selected(const Tool::Group &)), TQT_SLOT(selectTool(const Tool::Group &)));
statusBar()->addWidget(_tooltqStatus->widget(), 0, true); statusBar()->addWidget(_toolStatus->widget(), 0, true);
// interface // interface
_mainDock = createDockWidget("main_dock_widget", TQPixmap()); _mainDock = createDockWidget("main_dock_widget", TQPixmap());
@ -132,7 +132,7 @@ MainWindow::MainWindow()
_mainDock->setWidget(Main::_editorManager); _mainDock->setWidget(Main::_editorManager);
connect(TQT_TQOBJECT(Main::_editorManager), TQT_SIGNAL(guiChanged()), TQT_SLOT(updateGUI())); connect(TQT_TQOBJECT(Main::_editorManager), TQT_SIGNAL(guiChanged()), TQT_SLOT(updateGUI()));
connect(TQT_TQOBJECT(Main::_editorManager), TQT_SIGNAL(modified(const PURL::Url &)), TQT_TQOBJECT(Main::_projectManager), TQT_SLOT(modified(const PURL::Url &))); connect(TQT_TQOBJECT(Main::_editorManager), TQT_SIGNAL(modified(const PURL::Url &)), TQT_TQOBJECT(Main::_projectManager), TQT_SLOT(modified(const PURL::Url &)));
connect(TQT_TQOBJECT(Main::_editorManager), TQT_SIGNAL(statusChanged(const TQString &)), _editortqStatus, TQT_SLOT(setText(const TQString &))); connect(TQT_TQOBJECT(Main::_editorManager), TQT_SIGNAL(statusChanged(const TQString &)), _editorStatus, TQT_SLOT(setText(const TQString &)));
dock = createDock("compile_log_dock_widget", loader.loadIcon("piklab_compile", KIcon::Small), dock = createDock("compile_log_dock_widget", loader.loadIcon("piklab_compile", KIcon::Small),
i18n("Compile Log"), DockPosition(KDockWidget::DockBottom, 80)); i18n("Compile Log"), DockPosition(KDockWidget::DockBottom, 80));
@ -160,15 +160,15 @@ MainWindow::MainWindow()
// managers // managers
Programmer::manager = new Programmer::GuiManager(TQT_TQOBJECT(this)); Programmer::manager = new Programmer::GuiManager(TQT_TQOBJECT(this));
Programmer::manager->setView(_programLog); Programmer::manager->setView(_programLog);
connect(Programmer::manager, TQT_SIGNAL(actionMessage(const TQString &)), _actiontqStatus, TQT_SLOT(setText(const TQString &))); connect(Programmer::manager, TQT_SIGNAL(actionMessage(const TQString &)), _actionStatus, TQT_SLOT(setText(const TQString &)));
connect(Programmer::manager, TQT_SIGNAL(showProgress(bool)), TQT_SLOT(showProgress(bool))); connect(Programmer::manager, TQT_SIGNAL(showProgress(bool)), TQT_SLOT(showProgress(bool)));
connect(Programmer::manager, TQT_SIGNAL(setTotalProgress(uint)), TQT_SLOT(setTotalProgress(uint))); connect(Programmer::manager, TQT_SIGNAL(setTotalProgress(uint)), TQT_SLOT(setTotalProgress(uint)));
connect(Programmer::manager, TQT_SIGNAL(setProgress(uint)), TQT_SLOT(setProgress(uint))); connect(Programmer::manager, TQT_SIGNAL(setProgress(uint)), TQT_SLOT(setProgress(uint)));
Debugger::manager = new Debugger::GuiManager; Debugger::manager = new Debugger::GuiManager;
connect(Debugger::manager, TQT_SIGNAL(targetStateChanged()), TQT_SLOT(updateGUI())); connect(Debugger::manager, TQT_SIGNAL(targetStateChanged()), TQT_SLOT(updateGUI()));
connect(Debugger::manager, TQT_SIGNAL(statusChanged(const TQString &)), _debugtqStatus, TQT_SLOT(setText(const TQString &))); connect(Debugger::manager, TQT_SIGNAL(statusChanged(const TQString &)), _debugStatus, TQT_SLOT(setText(const TQString &)));
connect(Debugger::manager, TQT_SIGNAL(actionMessage(const TQString &)), _actiontqStatus, TQT_SLOT(setText(const TQString &))); connect(Debugger::manager, TQT_SIGNAL(actionMessage(const TQString &)), _actionStatus, TQT_SLOT(setText(const TQString &)));
Main::_compileManager = new Compile::Manager(TQT_TQOBJECT(this)); Main::_compileManager = new Compile::Manager(TQT_TQOBJECT(this));
Main::_compileManager->setView(Main::_compileLog); Main::_compileManager->setView(Main::_compileLog);
@ -570,7 +570,7 @@ void MainWindow::updateGUI()
showProgress(false); showProgress(false);
break; break;
case Main::Compiling: case Main::Compiling:
_actiontqStatus->setText(Main::_compileManager->label()); _actionStatus->setText(Main::_compileManager->label());
showProgress(true); showProgress(true);
makeWidgetDockVisible(Main::_compileLog); makeWidgetDockVisible(Main::_compileLog);
break; break;
@ -618,7 +618,7 @@ void MainWindow::updateGUI()
Main::action("project_add_current_file")->setEnabled(Main::project() && !inProject && idle && isSource); Main::action("project_add_current_file")->setEnabled(Main::project() && !inProject && idle && isSource);
// update build actions // update build actions
static_cast<PopupButton *>(_tooltqStatus->widget())->setText(" " + Main::toolGroup().label() + " "); static_cast<PopupButton *>(_toolStatus->widget())->setText(" " + Main::toolGroup().label() + " ");
bool hexProject = ( Main::_projectManager->projectUrl().fileType()==PURL::Hex ); bool hexProject = ( Main::_projectManager->projectUrl().fileType()==PURL::Hex );
bool customTool = Main::toolGroup().isCustom(); bool customTool = Main::toolGroup().isCustom();
Main::action("build_build_project")->setEnabled((Main::project() || (inProject && !hexProject) ) && idle); Main::action("build_build_project")->setEnabled((Main::project() || (inProject && !hexProject) ) && idle);
@ -630,11 +630,11 @@ void MainWindow::updateGUI()
// update programmer status // update programmer status
PortType ptype = Programmer::GroupConfig::portType(Main::programmerGroup()); PortType ptype = Programmer::GroupConfig::portType(Main::programmerGroup());
static_cast<PopupButton *>(_programmertqStatus->widget())->setText(" " + Main::programmerGroup().statusLabel(ptype) + " "); static_cast<PopupButton *>(_programmerStatus->widget())->setText(" " + Main::programmerGroup().statusLabel(ptype) + " ");
TQFont f = font(); TQFont f = font();
bool supported = (Main::deviceData() ? Main::programmerGroup().isSupported(Main::deviceData()->name()) : false); bool supported = (Main::deviceData() ? Main::programmerGroup().isSupported(Main::deviceData()->name()) : false);
f.setItalic(!supported); f.setItalic(!supported);
_programmertqStatus->widget()->setFont(f); _programmerStatus->widget()->setFont(f);
bool isProgrammer = ( Main::programmerGroup().properties() & ::Programmer::Programmer ); bool isProgrammer = ( Main::programmerGroup().properties() & ::Programmer::Programmer );
PURL::Url purl = Main::_projectManager->projectUrl(); PURL::Url purl = Main::_projectManager->projectUrl();
bool hasHex = ( currentType==PURL::Hex || Main::_projectManager->contains(purl.toFileType(PURL::Hex)) ); bool hasHex = ( currentType==PURL::Hex || Main::_projectManager->contains(purl.toFileType(PURL::Hex)) );
@ -965,11 +965,11 @@ void MainWindow::showProgress(bool show)
{ {
if (show) { if (show) {
PBusyCursor::start(); PBusyCursor::start();
_actiontqStatus->show(); _actionStatus->show();
_actionProgress->show(); _actionProgress->show();
} else { } else {
PBusyCursor::stop(); PBusyCursor::stop();
_actiontqStatus->hide(); _actionStatus->hide();
_actionProgress->hide(); _actionProgress->hide();
} }
} }

@ -93,9 +93,9 @@ signals:
private: private:
Log::Widget *_programLog; Log::Widget *_programLog;
TQLabel *_actiontqStatus, *_debugtqStatus, *_editortqStatus; TQLabel *_actionStatus, *_debugStatus, *_editorStatus;
ProgrammerStatusWidget *_programmertqStatus; ProgrammerStatusWidget *_programmerStatus;
ToolStatusWidget *_tooltqStatus; ToolStatusWidget *_toolStatus;
TQProgressBar *_actionProgress; TQProgressBar *_actionProgress;
ConfigGenerator *_configGenerator; ConfigGenerator *_configGenerator;
::Process::Base *_pikloopsProcess, *_kfindProcess; ::Process::Base *_pikloopsProcess, *_kfindProcess;

@ -65,7 +65,7 @@ MenuBarButton::MenuBarButton(const TQString &icon, TQWidget *parent)
: TQToolButton(parent, "menu_bar_button") : TQToolButton(parent, "menu_bar_button")
{ {
TQFontMetrics fm(font()); TQFontMetrics fm(font());
int h = fm.height() + 2*tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth, this); int h = fm.height() + 2*tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth, this);
setFixedHeight(h); setFixedHeight(h);
KIconLoader loader; KIconLoader loader;
setIconSet(loader.loadIconSet(icon, KIcon::Small, fm.height()-2)); setIconSet(loader.loadIconSet(icon, KIcon::Small, fm.height()-2));
@ -73,7 +73,7 @@ MenuBarButton::MenuBarButton(const TQString &icon, TQWidget *parent)
setAutoRaise(true); setAutoRaise(true);
} }
TQSize MenuBarButton::tqsizeHint() const TQSize MenuBarButton::sizeHint() const
{ {
return TQSize(TQToolButton::tqsizeHint().width(), height()); return TQSize(TQToolButton::sizeHint().width(), height());
} }

@ -75,7 +75,7 @@ Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
MenuBarButton(const TQString &icon, TQWidget *parent); MenuBarButton(const TQString &icon, TQWidget *parent);
virtual TQSize tqsizeHint() const; virtual TQSize sizeHint() const;
}; };
#endif #endif

@ -53,7 +53,7 @@ bool Debugger::Base::init()
bool Debugger::Base::update() bool Debugger::Base::update()
{ {
if ( !updateState() ) return false; if ( !updateState() ) return false;
if ( _programmer.state()==::Programmer::Halted ) return _deviceSpecific->updatetqStatus(); if ( _programmer.state()==::Programmer::Halted ) return _deviceSpecific->updateStatus();
return true; return true;
} }

@ -44,7 +44,7 @@ public:
Register::TypeData pcTypeData() const; Register::TypeData pcTypeData() const;
virtual bool readRegister(const Register::TypeData &data, BitValue &value) = 0; virtual bool readRegister(const Register::TypeData &data, BitValue &value) = 0;
virtual bool writeRegister(const Register::TypeData &data, BitValue value) = 0; virtual bool writeRegister(const Register::TypeData &data, BitValue value) = 0;
virtual bool updatePorttqStatus(uint index, TQMap<uint, Device::PortBitData> &bits) = 0; virtual bool updatePortStatus(uint index, TQMap<uint, Device::PortBitData> &bits) = 0;
protected: protected:
Programmer::Base &_programmer; Programmer::Base &_programmer;
@ -68,7 +68,7 @@ class DeviceSpecific : public Log::Base
{ {
public: public:
DeviceSpecific(Debugger::Base &base) : Log::Base(base), _base(base) {} DeviceSpecific(Debugger::Base &base) : Log::Base(base), _base(base) {}
virtual bool updatetqStatus() = 0; virtual bool updateStatus() = 0;
virtual TQString statusString() const = 0; virtual TQString statusString() const = 0;
protected: protected:

@ -57,7 +57,7 @@ Direct::HConfigWidget::HConfigWidget(::Programmer::Base &base, TQWidget *parent,
_testLabels[i] = new TQLabel(w); _testLabels[i] = new TQLabel(w);
TQToolTip::add(_testcbs[i], PIN_DATA[i].testComment); TQToolTip::add(_testcbs[i], PIN_DATA[i].testComment);
grid->addWidget(_testLabels[i], i, 4); grid->addWidget(_testLabels[i], i, 4);
updateTesttqStatus(PinType(i), false); updateTestStatus(PinType(i), false);
} else { } else {
_testcbs[i] = 0; _testcbs[i] = 0;
_testLabels[i] = 0; _testLabels[i] = 0;
@ -150,11 +150,11 @@ void Direct::HConfigWidget::updateTestPin(PinType ptype)
Q_ASSERT( _connected && ptype!=DataIn ); Q_ASSERT( _connected && ptype!=DataIn );
bool on = _testcbs[ptype]->isChecked(); bool on = _testcbs[ptype]->isChecked();
hardware()->setPin(ptype, on); hardware()->setPin(ptype, on);
updateTesttqStatus(ptype, on); updateTestStatus(ptype, on);
if ( ptype==Vpp ) updateDataIn(); 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)); if (on) _testLabels[ptype]->setText(i18n(PIN_DATA[ptype].onLabel));
else _testLabels[ptype]->setText(i18n(PIN_DATA[ptype].offLabel)); 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() void Direct::HConfigWidget::updateDataIn()
{ {
bool on = hardware()->readBit(); bool on = hardware()->readBit();
updateTesttqStatus(DataIn, on); updateTestStatus(DataIn, on);
_testcbs[DataIn]->setChecked(on); _testcbs[DataIn]->setChecked(on);
} }
@ -204,7 +204,7 @@ bool Direct::HConfigWidget::set(const Port::Description &pd, const ::Hardware::D
if (_edit) { if (_edit) {
for (uint i=0; i<Nb_PinTypes; i++) { for (uint i=0; i<Nb_PinTypes; i++) {
_testcbs[i]->setEnabled(_connected); _testcbs[i]->setEnabled(_connected);
updateTesttqStatus(PinType(i), false); updateTestStatus(PinType(i), false);
} }
if ( _connected ) _timerPollDataOut->start(100); if ( _connected ) _timerPollDataOut->start(100);
_sendBitsButton->setEnabled(_connected); _sendBitsButton->setEnabled(_connected);

@ -55,7 +55,7 @@ private:
void sendBits(uint d, int nbb); void sendBits(uint d, int nbb);
void updateTestPin(PinType ptype); void updateTestPin(PinType ptype);
void updateTesttqStatus(PinType ptype, bool on); void updateTestStatus(PinType ptype, bool on);
uint pin(PinType ptype) const; uint pin(PinType ptype) const;
void updatePin(PinType ptype); void updatePin(PinType ptype);
Hardware *hardware() { return static_cast<Hardware *>(_hardware); } Hardware *hardware() { return static_cast<Hardware *>(_hardware); }

@ -195,7 +195,7 @@ bool GPSim::Debugger::writeWreg(BitValue value)
return setRegister("W", value); return setRegister("W", value);
} }
bool GPSim::Debugger::updatePorttqStatus(uint index, TQMap<uint, Device::PortBitData> &bits) bool GPSim::Debugger::updatePortStatus(uint index, TQMap<uint, Device::PortBitData> &bits)
{ {
for (uint i=0; i<Device::MAX_NB_PORT_BITS; i++) { for (uint i=0; i<Device::MAX_NB_PORT_BITS; i++) {
if ( !device()->registersData().hasPortBit(index, i) ) continue; if ( !device()->registersData().hasPortBit(index, i) ) continue;

@ -45,7 +45,7 @@ public:
virtual bool setBreakpoints(const TQValueList<Address> &list); virtual bool setBreakpoints(const TQValueList<Address> &list);
virtual bool readRegister(const Register::TypeData &data, BitValue &value); virtual bool readRegister(const Register::TypeData &data, BitValue &value);
virtual bool writeRegister(const Register::TypeData &data, BitValue value); virtual bool writeRegister(const Register::TypeData &data, BitValue value);
virtual bool updatePorttqStatus(uint index, TQMap<uint, Device::PortBitData> &bits); virtual bool updatePortStatus(uint index, TQMap<uint, Device::PortBitData> &bits);
private: private:
uint _nbBreakpoints; uint _nbBreakpoints;

@ -23,10 +23,10 @@ GPSim::ConfigWidget::ConfigWidget(const ::Programmer::Group &group, TQWidget *pa
_status = new TQLabel(this); _status = new TQLabel(this);
addWidget(_status, row,row, 1,1); addWidget(_status, row,row, 1,1);
TQTimer::singleShot(0, this, TQT_SLOT(updatetqStatus())); TQTimer::singleShot(0, this, TQT_SLOT(updateStatus()));
} }
void GPSim::ConfigWidget::updatetqStatus() void GPSim::ConfigWidget::updateStatus()
{ {
VersionData version; VersionData version;
ProcessManager manager(0); ProcessManager manager(0);

@ -23,7 +23,7 @@ public:
ConfigWidget(const ::Programmer::Group &group, TQWidget *parent); ConfigWidget(const ::Programmer::Group &group, TQWidget *parent);
private slots: private slots:
void updatetqStatus(); void updateStatus();
private: private:
TQLabel *_status; TQLabel *_status;

@ -101,7 +101,7 @@ void PortSelector::addPortType(const Port::Description &pd)
} }
} }
void PortSelector::settqStatus(PortType ptype, const TQString &message) void PortSelector::setStatus(PortType ptype, const TQString &message)
{ {
_pending = false; _pending = false;
FOR_EACH(PortType, type) { FOR_EACH(PortType, type) {

@ -27,7 +27,7 @@ public:
void setGroup(const Programmer::Group &group); void setGroup(const Programmer::Group &group);
Port::Description portDescription() const { return Port::Description(type(), device(type())); } Port::Description portDescription() const { return Port::Description(type(), device(type())); }
void saveConfig(); void saveConfig();
void settqStatus(PortType type, const TQString &message); void setStatus(PortType type, const TQString &message);
signals: signals:
void changed(); void changed();

@ -86,7 +86,7 @@ void Programmer::SelectConfigWidget::portChanged()
delete config; delete config;
TQWidget *w = _stack->item(_combo->currentItem()); TQWidget *w = _stack->item(_combo->currentItem());
bool ok = static_cast< ::Programmer::ConfigWidget *>(w)->setPort(hd); bool ok = static_cast< ::Programmer::ConfigWidget *>(w)->setPort(hd);
_portSelector->settqStatus(hd.port.type, ok ? i18n("Connection: Ok") : i18n("Connection: Error")); _portSelector->setStatus(hd.port.type, ok ? i18n("Connection: Ok") : i18n("Connection: Error"));
} }
TQPixmap Programmer::SelectConfigWidget::pixmap() const TQPixmap Programmer::SelectConfigWidget::pixmap() const

@ -32,7 +32,7 @@ public:
virtual bool setPort(const HardwareDescription &hd); virtual bool setPort(const HardwareDescription &hd);
signals: signals:
void updatePorttqStatus(bool ok); void updatePortStatus(bool ok);
protected: protected:
const Group &_group; const Group &_group;

@ -213,7 +213,7 @@ bool Debugger::Manager::updateRegister(const Register::TypeData &data)
int index = rdata->portIndex(data.address()); int index = rdata->portIndex(data.address());
if ( index!=-1 ) { if ( index!=-1 ) {
TQMap<uint, Device::PortBitData> data; TQMap<uint, Device::PortBitData> data;
if ( !debugger()->updatePorttqStatus(index, data) ) return false; if ( !debugger()->updatePortStatus(index, data) ) return false;
Register::list().setPortData(index, data); Register::list().setPortData(index, data);
} }
} }

@ -45,9 +45,9 @@ bool Pickit2V2::Hardware::setTarget()
return true; return true;
} }
bool Pickit2V2::Hardware::readtqStatus(ushort &status) bool Pickit2V2::Hardware::readStatus(ushort &status)
{ {
if ( !port().command(ReadtqStatus) ) return false; if ( !port().command(ReadStatus) ) return false;
Array a; Array a;
if ( !port().receive(a) ) return false; if ( !port().receive(a) ) return false;
status = (a[1] << 8) + a[0]; status = (a[1] << 8) + a[0];

@ -18,7 +18,7 @@ namespace Pickit2V2
enum FirmwareCommand { enum FirmwareCommand {
EnterBootloader = 0x42, NoOperation = 0x5A, FirmwareVersion = 0x76, EnterBootloader = 0x42, NoOperation = 0x5A, FirmwareVersion = 0x76,
SetVdd = 0xA0, SetVpp = 0xA1, ReadtqStatus = 0xA2, ReadVoltages = 0xA3, SetVdd = 0xA0, SetVpp = 0xA1, ReadStatus = 0xA2, ReadVoltages = 0xA3,
DownloadScript = 0xA4, RunScript = 0xA5, ExecuteScript = 0xA6, DownloadScript = 0xA4, RunScript = 0xA5, ExecuteScript = 0xA6,
ClearDownloadBuffer = 0xA7, DownloadData = 0xA8, ClearUploadBuffer = 0xA9, ClearDownloadBuffer = 0xA7, DownloadData = 0xA8, ClearUploadBuffer = 0xA9,
UploadData = 0xAA, ClearScriptBuffer = 0xAB, UploadDataNoLen = 0xAC, UploadData = 0xAA, ClearScriptBuffer = 0xAB, UploadDataNoLen = 0xAC,
@ -94,7 +94,7 @@ public:
bool setTarget(); bool setTarget();
bool setFastProgramming(bool fast); bool setFastProgramming(bool fast);
virtual bool readVoltages(VoltagesData &voltagesData); virtual bool readVoltages(VoltagesData &voltagesData);
bool readtqStatus(ushort &status); bool readStatus(ushort &status);
bool readMemory(Pic::MemoryRangeType type, ::Device::Array &data, const ::Programmer::VerifyData *vdata); bool readMemory(Pic::MemoryRangeType type, ::Device::Array &data, const ::Programmer::VerifyData *vdata);
bool writeMemory(Pic::MemoryRangeType type, const ::Device::Array &data, bool force); bool writeMemory(Pic::MemoryRangeType type, const ::Device::Array &data, bool force);
bool eraseAll(); bool eraseAll();

@ -92,7 +92,7 @@ bool Pickit2V2::Base::setTarget()
bool Pickit2V2::Base::selfTest(bool ask) bool Pickit2V2::Base::selfTest(bool ask)
{ {
ushort status; ushort status;
if ( !hardware().readtqStatus(status) ) return false; if ( !hardware().readStatus(status) ) return false;
TQString error; TQString error;
if ( status & VppError ) error += i18n("Vpp voltage level error; "); if ( status & VppError ) error += i18n("Vpp voltage level error; ");
if ( status & VddError ) error += i18n("Vdd voltage level error; "); if ( status & VddError ) error += i18n("Vdd voltage level error; ");

@ -194,7 +194,7 @@ bool GPSim::Debugger::writeWreg(BitValue value)
return setRegister("W", value); return setRegister("W", value);
} }
bool GPSim::Debugger::updatePorttqStatus(uint index, TQMap<uint, Device::PortBitData> &bits) bool GPSim::Debugger::updatePortStatus(uint index, TQMap<uint, Device::PortBitData> &bits)
{ {
for (uint i=0; i<Device::MAX_NB_PORT_BITS; i++) { for (uint i=0; i<Device::MAX_NB_PORT_BITS; i++) {
if ( !device()->registersData().hasPortBit(index, i) ) continue; if ( !device()->registersData().hasPortBit(index, i) ) continue;

@ -45,7 +45,7 @@ public:
virtual bool setBreakpoints(const TQValueList<Address> &list); virtual bool setBreakpoints(const TQValueList<Address> &list);
virtual bool readRegister(const Register::TypeData &data, BitValue &value); virtual bool readRegister(const Register::TypeData &data, BitValue &value);
virtual bool writeRegister(const Register::TypeData &data, BitValue value); virtual bool writeRegister(const Register::TypeData &data, BitValue value);
virtual bool updatePorttqStatus(uint index, TQMap<uint, Device::PortBitData> &bits); virtual bool updatePortStatus(uint index, TQMap<uint, Device::PortBitData> &bits);
private: private:
uint _nbBreakpoints; uint _nbBreakpoints;

@ -90,21 +90,21 @@ void Device::XmlToDataBase::processDevice(TQDomElement device)
_data->_name = name; _data->_name = name;
_data->_alternatives = TQStringList::split(' ', device.attribute("alternative")); _data->_alternatives = TQStringList::split(' ', device.attribute("alternative"));
if ( _data->_alternatives.count() ) _alternatives[name] = _data->_alternatives; if ( _data->_alternatives.count() ) _alternatives[name] = _data->_alternatives;
_data->_status = tqStatus::fromKey(device.attribute("status")); _data->_status = Status::fromKey(device.attribute("status"));
switch (_data->_status.type()) { switch (_data->_status.type()) {
case tqStatus::Nb_Types: case Status::Nb_Types:
qFatal("Unrecognized or absent device status"); qFatal("Unrecognized or absent device status");
break; break;
case tqStatus::Future: case Status::Future:
if ( _data->_alternatives.count() ) qFatal("Future device has alternative"); if ( _data->_alternatives.count() ) qFatal("Future device has alternative");
break; break;
case tqStatus::NotRecommended: case Status::NotRecommended:
case tqStatus::Mature: case Status::Mature:
if ( _data->_alternatives.count()==0 ) warning("Not-recommended/mature device has no alternative"); if ( _data->_alternatives.count()==0 ) warning("Not-recommended/mature device has no alternative");
break; break;
case tqStatus::InProduction: case Status::InProduction:
case tqStatus::EOL: case Status::EOL:
case tqStatus::Unknown: break; case Status::Unknown: break;
} }
// document // document

@ -13,7 +13,7 @@
* *
* Use PICCLITE to compile this program for the PIC16F877. * Use PICCLITE to compile this program for the PIC16F877.
* *
* tqStatus: Sept 25, 2003 * Status: Sept 25, 2003
* Working. The code is pretty brute force and the resolution isn't * Working. The code is pretty brute force and the resolution isn't
* what I expected. Need to review calculations for angle vs. accel * what I expected. Need to review calculations for angle vs. accel
* (gravity). I determined the zero offsets empirically and hard coded * (gravity). I determined the zero offsets empirically and hard coded

@ -10,7 +10,7 @@
* *
* Use PICCLITE to compile this program for the PIC16F877. * Use PICCLITE to compile this program for the PIC16F877.
* *
* tqStatus: Sept 25, 2003 * Status: Sept 25, 2003
* Working. The code is pretty brute force and the resolution isn't * Working. The code is pretty brute force and the resolution isn't
* what I expected. Need to review calculations for angle vs. accel * what I expected. Need to review calculations for angle vs. accel
* (gravity). I determined the zero offsets empirically and hard coded * (gravity). I determined the zero offsets empirically and hard coded

Loading…
Cancel
Save