diff options
Diffstat (limited to 'src/devices/pic/gui/pic_register_view.cpp')
-rw-r--r-- | src/devices/pic/gui/pic_register_view.cpp | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/src/devices/pic/gui/pic_register_view.cpp b/src/devices/pic/gui/pic_register_view.cpp index ef7de9b..ced5085 100644 --- a/src/devices/pic/gui/pic_register_view.cpp +++ b/src/devices/pic/gui/pic_register_view.cpp @@ -8,12 +8,12 @@ ***************************************************************************/ #include "pic_register_view.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qpopupmenu.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqpopupmenu.h> #include <klocale.h> #include <kiconloader.h> @@ -29,13 +29,13 @@ #include "coff/base/text_coff.h" //----------------------------------------------------------------------------- -Pic::BankWidget::BankWidget(uint i, QWidget *parent) - : QFrame(parent, "bank_widget"), _bindex(i), _bankCombo(0) +Pic::BankWidget::BankWidget(uint i, TQWidget *tqparent) + : TQFrame(tqparent, "bank_widget"), _bindex(i), _bankCombo(0) { setFrameStyle(WinPanel | Sunken); - QGridLayout *top = new QGridLayout(this, 1, 1, 5, 0); + TQGridLayout *top = new TQGridLayout(this, 1, 1, 5, 0); top->setColSpacing(1, 4); - QFont f("courier", font().pointSize()); + TQFont f("courier", font().pointSize()); const Pic::Data &data = static_cast<const Pic::Data &>(*Main::deviceData()); const Pic::RegistersData &rdata = data.registersData(); @@ -44,22 +44,22 @@ Pic::BankWidget::BankWidget(uint i, QWidget *parent) if ( rdata.nbBanks!=1 ) { if ( data.is18Family() ) { if ( (i/2)==0 ) { - QString title = ((i%2)==0 ? i18n("Access Bank (low)") : i18n("Access Bank (high)")); - QLabel *label = new QLabel(title, this); - label->setAlignment(AlignCenter); + TQString title = ((i%2)==0 ? i18n("Access Bank (low)") : i18n("Access Bank (high)")); + TQLabel *label = new TQLabel(title, this); + label->tqsetAlignment(AlignCenter); top->addMultiCellWidget(label, row,row, 0,6, AlignHCenter); } else { - _bankCombo = new QComboBox(this); + _bankCombo = new TQComboBox(this); for (uint k=1; k<2*rdata.nbBanks-1; k++) { - _bankCombo->insertItem((k%2)==0 ? i18n("Bank %1 (low)").arg(k/2) : i18n("Bank %1 (high)").arg(k/2)); + _bankCombo->insertItem((k%2)==0 ? i18n("Bank %1 (low)").tqarg(k/2) : i18n("Bank %1 (high)").tqarg(k/2)); } if ( _bindex==3 ) _bankCombo->setCurrentItem(1); - connect(_bankCombo, SIGNAL(activated(int)), SLOT(bankChanged())); + connect(_bankCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(bankChanged())); top->addMultiCellWidget(_bankCombo, row,row, 0,6, AlignHCenter); } } else { - QLabel *label = new QLabel(i18n("Bank %1").arg(i), this); - label->setAlignment(AlignCenter); + TQLabel *label = new TQLabel(i18n("Bank %1").tqarg(i), this); + label->tqsetAlignment(AlignCenter); top->addMultiCellWidget(label, row,row, 0,6, AlignHCenter); } row++; @@ -68,14 +68,14 @@ Pic::BankWidget::BankWidget(uint i, QWidget *parent) } KIconLoader loader; - QPixmap readIcon = loader.loadIcon("viewmag", KIcon::Small); - QPixmap editIcon = loader.loadIcon("edit", KIcon::Small); + TQPixmap readIcon = loader.loadIcon("viewmag", KIcon::Small); + TQPixmap editIcon = loader.loadIcon("edit", KIcon::Small); uint nb; if ( !data.is18Family() ) nb = rdata.nbRegistersPerBank(); else nb = kMax(rdata.accessBankSplit, rdata.nbRegistersPerBank() - rdata.accessBankSplit); _registers.resize(nb); for (uint k=0; k<nb; k++) { - _registers[k].alabel = new QLabel(this); + _registers[k].alabel = new TQLabel(this); _registers[k].alabel->setFont(f); top->addWidget(_registers[k].alabel, row, 0); if (debugging) { @@ -83,14 +83,14 @@ Pic::BankWidget::BankWidget(uint i, QWidget *parent) _registers[k].button->appendItem(i18n("Read"), readIcon, ReadId); _registers[k].button->appendItem(i18n("Edit"), editIcon, EditId); _registers[k].button->appendItem(i18n("Watch"), WatchId); - connect(_registers[k].button, SIGNAL(activated(int)), SLOT(buttonActivated(int))); + connect(_registers[k].button, TQT_SIGNAL(activated(int)), TQT_SLOT(buttonActivated(int))); top->addWidget(_registers[k].button, row, 2); _registers[k].edit = new Register::LineEdit(this); - connect(_registers[k].edit, SIGNAL(modified()), SLOT(write())); + connect(_registers[k].edit, TQT_SIGNAL(modified()), TQT_SLOT(write())); _registers[k].edit->setFont(f); top->addWidget(_registers[k].edit, row, 6); } else { - _registers[k].label = new QLabel(this); + _registers[k].label = new TQLabel(this); top->addWidget(_registers[k].label, row, 2); } row++; @@ -203,11 +203,11 @@ void Pic::BankWidget::updateView() for (uint i=0; i<_registers.count(); i++) { uint address = _registers[i].address; Device::RegisterProperties rp = rdata.properties(address); - QString label = rdata.label(address); + TQString label = rdata.label(address); Register::TypeData rtd(address, rdata.nbChars()); bool isWatched = Register::list().isWatched(rtd); if (coff) { - QString name = coff->variableName(address); + TQString name = coff->variableName(address); if ( !name.isEmpty() ) label = "<" + name + ">"; } if (_registers[i].button) { @@ -215,7 +215,7 @@ void Pic::BankWidget::updateView() _registers[i].button->show(); _registers[i].button->setText(label); if (isWatched) { - QFont f = _registers[i].button->font(); + TQFont f = _registers[i].button->font(); f.setBold(true); _registers[i].button->setFont(f); } else _registers[i].button->unsetFont(); @@ -245,36 +245,36 @@ void Pic::BankWidget::updateView() } //----------------------------------------------------------------------------- -Pic::RegisterView::RegisterView(QWidget *parent) - : Register::View(parent, "pic_register_view"), +Pic::RegisterView::RegisterView(TQWidget *tqparent) + : Register::View(tqparent, "pic_register_view"), _readAllButton(0), _clearAllButton(0) { - QVBoxLayout *vbox = new QVBoxLayout(this, 10, 10); - QHBoxLayout *hbox = new QHBoxLayout(vbox); + TQVBoxLayout *vbox = new TQVBoxLayout(this, 10, 10); + TQHBoxLayout *hbox = new TQHBoxLayout(vbox); bool debugging = Main::programmerGroup().isDebugger(); const Pic::Data &data = static_cast<const Pic::Data &>(*Main::deviceData()); uint nb = data.registersData().nbBanks; if ( debugging && nb!=0 ) { - QWidget *w = new QWidget(this); + TQWidget *w = new TQWidget(this); hbox->addWidget(w); - QGridLayout *grid = new QGridLayout(w, 1, 1, 0, 10); - _readAllButton = new QPushButton(i18n("Read All"), w); - connect(_readAllButton, SIGNAL(clicked()), Debugger::manager, SLOT(readAllRegisters())); + TQGridLayout *grid = new TQGridLayout(w, 1, 1, 0, 10); + _readAllButton = new TQPushButton(i18n("Read All"), w); + connect(_readAllButton, TQT_SIGNAL(clicked()), Debugger::manager, TQT_SLOT(readAllRegisters())); grid->addWidget(_readAllButton, 0, 0); - _clearAllButton = new QPushButton(i18n("Clear all watching"), w); - connect(_clearAllButton, SIGNAL(clicked()), SLOT(stopWatchAllRegisters())); + _clearAllButton = new TQPushButton(i18n("Clear all watching"), w); + connect(_clearAllButton, TQT_SIGNAL(clicked()), TQT_SLOT(stopWatchAllRegisters())); grid->addWidget(_clearAllButton, 0, 1); grid->setColStretch(2, 1); } - QHBoxLayout *hbox2 = 0; + TQHBoxLayout *hbox2 = 0; if ( nb==0 ) { - QLabel *label = new QLabel(i18n("Registers information not available."), this); + TQLabel *label = new TQLabel(i18n("Registers information not available."), this); vbox->addWidget(label); } else { - hbox = new QHBoxLayout(vbox); - hbox2 = new QHBoxLayout(hbox); + hbox = new TQHBoxLayout(vbox); + hbox2 = new TQHBoxLayout(hbox); hbox->addStretch(1); if ( data.is18Family() ) { nb = 2; @@ -306,8 +306,8 @@ void Pic::RegisterView::stopWatchAllRegisters() } //---------------------------------------------------------------------------- -Pic::RegisterListViewItem::RegisterListViewItem(const Register::TypeData &data, KListViewItem *parent) - : Register::ListViewItem(data, parent) +Pic::RegisterListViewItem::RegisterListViewItem(const Register::TypeData &data, KListViewItem *tqparent) + : Register::ListViewItem(data, tqparent) {} uint Pic::RegisterListViewItem::nbCharsAddress() const @@ -316,12 +316,12 @@ uint Pic::RegisterListViewItem::nbCharsAddress() const return data.registersData().nbCharsAddress(); } -QString Pic::RegisterListViewItem::label() const +TQString Pic::RegisterListViewItem::label() const { if ( _data.type()!=Register::Regular ) return _data.name(); const Coff::Object *coff = Debugger::manager->coff(); if (coff) { - QString name = coff->variableName(_data.address()); + TQString name = coff->variableName(_data.address()); if ( !name.isEmpty() ) return "<" + name + ">"; } const Pic::Data &data = static_cast<const Pic::Data &>(*Main::deviceData()); |