summaryrefslogtreecommitdiffstats
path: root/src/devices/pic/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/pic/gui')
-rw-r--r--src/devices/pic/gui/pic_config_editor.cpp30
-rw-r--r--src/devices/pic/gui/pic_config_editor.h6
-rw-r--r--src/devices/pic/gui/pic_config_word_editor.cpp108
-rw-r--r--src/devices/pic/gui/pic_config_word_editor.h19
-rw-r--r--src/devices/pic/gui/pic_group_ui.cpp24
-rw-r--r--src/devices/pic/gui/pic_group_ui.h10
-rw-r--r--src/devices/pic/gui/pic_hex_view.cpp8
-rw-r--r--src/devices/pic/gui/pic_hex_view.h5
-rw-r--r--src/devices/pic/gui/pic_memory_editor.cpp106
-rw-r--r--src/devices/pic/gui/pic_memory_editor.h50
-rw-r--r--src/devices/pic/gui/pic_prog_group_ui.cpp10
-rw-r--r--src/devices/pic/gui/pic_prog_group_ui.h5
-rw-r--r--src/devices/pic/gui/pic_register_view.cpp90
-rw-r--r--src/devices/pic/gui/pic_register_view.h32
14 files changed, 260 insertions, 243 deletions
diff --git a/src/devices/pic/gui/pic_config_editor.cpp b/src/devices/pic/gui/pic_config_editor.cpp
index 1812bbf..5cbb5b1 100644
--- a/src/devices/pic/gui/pic_config_editor.cpp
+++ b/src/devices/pic/gui/pic_config_editor.cpp
@@ -8,20 +8,20 @@
***************************************************************************/
#include "pic_config_editor.h"
-#include <qlayout.h>
-#include <qvgroupbox.h>
-#include <qapplication.h>
+#include <tqlayout.h>
+#include <tqvgroupbox.h>
+#include <tqapplication.h>
#include "pic_config_word_editor.h"
#include "common/common/misc.h"
#include "common/gui/misc_gui.h"
//----------------------------------------------------------------------------
-Pic::MemoryConfigEditorWidget::MemoryConfigEditorWidget(Memory &memory, bool withWordEditor, QWidget *parent)
- : Device::MemoryEditorGroup(&memory, parent, "pic_config_editor_widget"),
+Pic::MemoryConfigEditorWidget::MemoryConfigEditorWidget(Memory &memory, bool withWordEditor, TQWidget *tqparent)
+ : Device::MemoryEditorGroup(&memory, tqparent, "pic_config_editor_widget"),
MemoryCaster(MemoryRangeType::Config, memory)
{
- QHBoxLayout *hb = new QHBoxLayout(_top);
+ TQHBoxLayout *hb = new TQHBoxLayout(_top);
TabWidget *tabw = 0;
uint nbWords = device().nbWords(MemoryRangeType::Config);
@@ -34,18 +34,18 @@ Pic::MemoryConfigEditorWidget::MemoryConfigEditorWidget(Memory &memory, bool wit
for(uint i=0; i<nbWords; ++i) {
//qDebug("BinWordsEditor for config word #%i", i);
//uint address = device().range(Device::MemoryConfig).start + device().addressIncrement(Device::MemoryConfig) * i;
- //qDebug("address: %s %s nb: %i", toHex(address, 8).data(), device().configWord(i).name.latin1(), device().configWord(i).masks.count());
- if ( device().config()._words[i].masks.count()==0 ) continue;
- QWidget *page = 0;
+ //qDebug("address: %s %s nb: %i", toHex(address, 8).data(), device().configWord(i).name.latin1(), device().configWord(i).tqmasks.count());
+ if ( device().config()._words[i].tqmasks.count()==0 ) continue;
+ TQWidget *page = 0;
if ( nbWords>1 ) {
- page = new QWidget(tabw);
+ page = new TQWidget(tabw);
tabw->addTab(page, device().config()._words[i].name);
} else {
- page = new QGroupBox(this);
+ page = new TQGroupBox(this);
hb->addWidget(page);
}
- QVBoxLayout *vbox = new QVBoxLayout(page, 10, 10);
- QHBoxLayout *hbox = new QHBoxLayout(vbox);
+ TQVBoxLayout *vbox = new TQVBoxLayout(page, 10, 10);
+ TQHBoxLayout *hbox = new TQHBoxLayout(vbox);
ConfigWordEditor *we = new ConfigWordEditor(memory, i, withWordEditor, page);
addEditor(we);
hbox->addWidget(we);
@@ -55,8 +55,8 @@ Pic::MemoryConfigEditorWidget::MemoryConfigEditorWidget(Memory &memory, bool wit
}
//----------------------------------------------------------------------------
-Pic::MemoryConfigEditor::MemoryConfigEditor(const HexView *hexview, Memory &memory, QWidget *parent)
- : MemoryTypeEditor(hexview, MemoryRangeType::Config, memory, parent, "pic_config_editor")
+Pic::MemoryConfigEditor::MemoryConfigEditor(const HexView *hexview, Memory &memory, TQWidget *tqparent)
+ : MemoryTypeEditor(hexview, MemoryRangeType::Config, memory, tqparent, "pic_config_editor")
{}
void Pic::MemoryConfigEditor::init(bool first)
diff --git a/src/devices/pic/gui/pic_config_editor.h b/src/devices/pic/gui/pic_config_editor.h
index 888debf..d8072ca 100644
--- a/src/devices/pic/gui/pic_config_editor.h
+++ b/src/devices/pic/gui/pic_config_editor.h
@@ -19,16 +19,18 @@ class HexView;
class MemoryConfigEditorWidget : public Device::MemoryEditorGroup, public MemoryCaster
{
Q_OBJECT
+ TQ_OBJECT
public:
- MemoryConfigEditorWidget(Memory &memory, bool withWordEditor, QWidget *parent);
+ MemoryConfigEditorWidget(Memory &memory, bool withWordEditor, TQWidget *tqparent);
};
//----------------------------------------------------------------------------
class MemoryConfigEditor : public MemoryTypeEditor
{
Q_OBJECT
+ TQ_OBJECT
public:
- MemoryConfigEditor(const HexView *hexview, Memory &memory, QWidget *parent);
+ MemoryConfigEditor(const HexView *hexview, Memory &memory, TQWidget *tqparent);
virtual void init(bool first);
};
diff --git a/src/devices/pic/gui/pic_config_word_editor.cpp b/src/devices/pic/gui/pic_config_word_editor.cpp
index 23e4bce..bfa55e4 100644
--- a/src/devices/pic/gui/pic_config_word_editor.cpp
+++ b/src/devices/pic/gui/pic_config_word_editor.cpp
@@ -9,17 +9,17 @@
***************************************************************************/
#include "pic_config_word_editor.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcombobox.h>
#include <klocale.h>
#include "common/common/misc.h"
#include "common/gui/misc_gui.h"
//----------------------------------------------------------------------------
-Pic::ConfigWordComboBox::ConfigWordComboBox(QWidget *parent)
- : ComboBox(parent)
+Pic::ConfigWordComboBox::ConfigWordComboBox(TQWidget *tqparent)
+ : ComboBox(tqparent)
{
setIgnoreWheelEvent(true);
}
@@ -38,7 +38,7 @@ void Pic::ConfigWordComboBox::setItem(uint i)
if ( _map[l]==i ) setCurrentItem(l);
}
-void Pic::ConfigWordComboBox::setInvalidItem(uint i, const QString &label)
+void Pic::ConfigWordComboBox::setInvalidItem(uint i, const TQString &label)
{
if ( !isValid() ) changeItem(label, 0);
else insertItem(label, 0);
@@ -47,98 +47,98 @@ void Pic::ConfigWordComboBox::setInvalidItem(uint i, const QString &label)
}
//----------------------------------------------------------------------------
-Pic::ConfigWordDialog::ConfigWordDialog(const Memory &memory, uint ci, QWidget *parent)
- : Dialog(parent, "config_word_dialog", true, i18n("Config Word Details"), Close, Close, false)
+Pic::ConfigWordDialog::ConfigWordDialog(const Memory &memory, uint ci, TQWidget *tqparent)
+ : Dialog(tqparent, "config_word_dialog", true, i18n("Config Word Details"), Close, Close, false)
{
uint nbChars = memory.device().nbCharsWord(MemoryRangeType::Config);
const Config::Word &cword = memory.device().config()._words[ci];
- QGridLayout *grid = new QGridLayout(mainWidget(), 0, 0, 10, 10);
+ TQGridLayout *grid = new TQGridLayout(mainWidget(), 0, 0, 10, 10);
uint row = 0;
- QLabel *label = new QLabel(i18n("Name:"), mainWidget());
+ TQLabel *label = new TQLabel(i18n("Name:"), mainWidget());
grid->addWidget(label, row, 0);
- label = new QLabel(cword.name, mainWidget());
+ label = new TQLabel(cword.name, mainWidget());
grid->addWidget(label, row, 1);
row++;
- label = new QLabel(i18n("Index:"), mainWidget());
+ label = new TQLabel(i18n("Index:"), mainWidget());
grid->addWidget(label, row, 0);
- label = new QLabel(QString::number(ci), mainWidget());
+ label = new TQLabel(TQString::number(ci), mainWidget());
grid->addWidget(label, row, 1);
row++;
- label = new QLabel(i18n("Raw Value:"), mainWidget());
+ label = new TQLabel(i18n("Raw Value:"), mainWidget());
grid->addWidget(label, row, 0);
- label = new QLabel(toHexLabel(memory.word(MemoryRangeType::Config, ci), nbChars), mainWidget());
+ label = new TQLabel(toHexLabel(memory.word(MemoryRangeType::Config, ci), nbChars), mainWidget());
grid->addWidget(label, row, 1);
row++;
- label = new QLabel(i18n("Value:"), mainWidget());
+ label = new TQLabel(i18n("Value:"), mainWidget());
grid->addWidget(label, row, 0);
- label = new QLabel(toHexLabel(memory.normalizedWord(MemoryRangeType::Config, ci), nbChars), mainWidget());
+ label = new TQLabel(toHexLabel(memory.normalizedWord(MemoryRangeType::Config, ci), nbChars), mainWidget());
grid->addWidget(label, row, 1);
row++;
- label = new QLabel(i18n("Raw Blank Value:"), mainWidget());
+ label = new TQLabel(i18n("Raw Blank Value:"), mainWidget());
grid->addWidget(label, row, 0);
- label = new QLabel(toHexLabel(cword.bvalue, nbChars), mainWidget());
+ label = new TQLabel(toHexLabel(cword.bvalue, nbChars), mainWidget());
grid->addWidget(label, row, 1);
row++;
- label = new QLabel(i18n("Used Mask:"), mainWidget());
+ label = new TQLabel(i18n("Used Mask:"), mainWidget());
grid->addWidget(label, row, 0);
- label = new QLabel(toHexLabel(cword.usedMask(), nbChars), mainWidget());
+ label = new TQLabel(toHexLabel(cword.usedMask(), nbChars), mainWidget());
grid->addWidget(label, row, 1);
row++;
- label = new QLabel(i18n("Write Mask:"), mainWidget());
+ label = new TQLabel(i18n("Write Mask:"), mainWidget());
grid->addWidget(label, row, 0);
- label = new QLabel(toHexLabel(cword.wmask, nbChars), mainWidget());
+ label = new TQLabel(toHexLabel(cword.wtqmask, nbChars), mainWidget());
grid->addWidget(label, row, 1);
row++;
- label = new QLabel(i18n("Protected Mask:"), mainWidget());
+ label = new TQLabel(i18n("Protected Mask:"), mainWidget());
grid->addWidget(label, row, 0);
- label = new QLabel(toHexLabel(cword.pmask, nbChars), mainWidget());
+ label = new TQLabel(toHexLabel(cword.ptqmask, nbChars), mainWidget());
grid->addWidget(label, row, 1);
row++;
- label = new QLabel(i18n("Checksum Mask:"), mainWidget());
+ label = new TQLabel(i18n("Checksum Mask:"), mainWidget());
grid->addWidget(label, row, 0);
- label = new QLabel(toHexLabel(cword.cmask, nbChars), mainWidget());
+ label = new TQLabel(toHexLabel(cword.ctqmask, nbChars), mainWidget());
grid->addWidget(label, row, 1);
row++;
}
//----------------------------------------------------------------------------
-Pic::ConfigWordEditor::ConfigWordEditor(Memory &memory, uint ci, bool withWordEditor, QWidget *parent)
- : MemoryEditor(MemoryRangeType::Config, memory, parent, "pic_config_word_editor"), _configIndex(ci)
+Pic::ConfigWordEditor::ConfigWordEditor(Memory &memory, uint ci, bool withWordEditor, TQWidget *tqparent)
+ : MemoryEditor(MemoryRangeType::Config, memory, tqparent, "pic_config_word_editor"), _configIndex(ci)
{
if (withWordEditor) {
- QHBoxLayout *hbox = new QHBoxLayout(_top);
+ TQHBoxLayout *hbox = new TQHBoxLayout(_top);
_mdb = new MemoryRangeEditor(MemoryRangeType::Config, memory, 1, 1, ci, 1, this);
_mdb->init();
- connect(_mdb, SIGNAL(modified()), SIGNAL(modified()));
- connect(_mdb, SIGNAL(modified()), SLOT(updateDisplay()));
+ connect(_mdb, TQT_SIGNAL(modified()), TQT_SIGNAL(modified()));
+ connect(_mdb, TQT_SIGNAL(modified()), TQT_SLOT(updateDisplay()));
hbox->addWidget(_mdb);
KPushButton *button = new KPushButton(i18n("Details..."), this);
- button->setFixedHeight(button->sizeHint().height());
- connect(button, SIGNAL(clicked()), SLOT(showDialog()));
+ button->setFixedHeight(button->tqsizeHint().height());
+ connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(showDialog()));
hbox->addWidget(button);
hbox->addStretch(1);
} else _mdb = 0;
- QGridLayout *grid = new QGridLayout(_top);
+ TQGridLayout *grid = new TQGridLayout(_top);
grid->setColStretch(2, 1);
const Config::Word &cword = device().config()._words[ci];
- _combos.resize(cword.masks.count());
+ _combos.resize(cword.tqmasks.count());
uint nbChars = device().nbCharsWord(MemoryRangeType::Config);
for (uint k=0; k<_combos.count(); k++) {
- const Config::Mask &cmask = cword.masks[k];
- QLabel *label = new QLabel(Config::maskLabel(cmask.name) + ":", this);
+ const Config::Mask &ctqmask = cword.tqmasks[k];
+ TQLabel *label = new TQLabel(Config::tqmaskLabel(ctqmask.name) + ":", this);
grid->addWidget(label, k, 0);
- label = new QLabel(cmask.name, this);
+ label = new TQLabel(ctqmask.name, this);
grid->addWidget(label, k, 1);
_combos[k] = new ConfigWordComboBox(this);
- for (uint i=0; i<cmask.values.count(); i++) {
- if ( !cmask.values[i].isValid() ) continue;
- QString label = Config::valueLabel(cmask.name, cmask.values[i].name);
- label += " (" + toHexLabel(cmask.values[i].value, nbChars) + ")";
+ for (uint i=0; i<ctqmask.values.count(); i++) {
+ if ( !ctqmask.values[i].isValid() ) continue;
+ TQString label = Config::valueLabel(ctqmask.name, ctqmask.values[i].name);
+ label += " (" + toHexLabel(ctqmask.values[i].value, nbChars) + ")";
_combos[k]->appendItem(label, i);
}
- connect(_combos[k], SIGNAL(activated(int)), SLOT(slotModified()));
+ connect(_combos[k], TQT_SIGNAL(activated(int)), TQT_SLOT(slotModified()));
grid->addWidget(_combos[k], k, 2);
}
}
@@ -148,8 +148,8 @@ void Pic::ConfigWordEditor::setReadOnly(bool readOnly)
if (_mdb) _mdb->setReadOnly(readOnly);
const Config::Word &cword = device().config()._words[_configIndex];
for (uint k=0; k<_combos.count(); k++) {
- const Config::Mask &cmask = cword.masks[k];
- _combos[k]->setEnabled(!readOnly && !cmask.value.isOverlapping(cword.pmask) && cmask.values.count()!=1);
+ const Config::Mask &ctqmask = cword.tqmasks[k];
+ _combos[k]->setEnabled(!readOnly && !ctqmask.value.isOverlapping(cword.ptqmask) && ctqmask.values.count()!=1);
}
}
@@ -158,9 +158,9 @@ void Pic::ConfigWordEditor::slotModified()
BitValue v = memory().word(MemoryRangeType::Config, _configIndex);
//qDebug("BinWordEditor::slotModified %i: %s", _configIndex, toHex(v, 4).data());
for (uint k=0; k<_combos.count(); k++) {
- const Config::Mask &cmask = device().config()._words[_configIndex].masks[k];
- v = v.clearMaskBits(cmask.value);
- v |= cmask.values[_combos[k]->index()].value; // set value
+ const Config::Mask &ctqmask = device().config()._words[_configIndex].tqmasks[k];
+ v = v.clearMaskBits(ctqmask.value);
+ v |= ctqmask.values[_combos[k]->index()].value; // set value
}
memory().setWord(MemoryRangeType::Config, _configIndex, v);
//qDebug(" now: %s", toHex(v, 4).data());
@@ -174,12 +174,12 @@ void Pic::ConfigWordEditor::updateDisplay()
uint nbChars = device().nbCharsWord(MemoryRangeType::Config);
//qDebug("BinWordEditor::updateDisplay %i: %s", _configIndex, toHex(v, 4).data());
for (uint k=0; k<_combos.count(); k++) {
- const Config::Mask &cmask = device().config()._words[_configIndex].masks[k];
- for (int i=cmask.values.count()-1; i>=0; i--) {
- if ( cmask.values[i].value.isInside(v) ) {
- if ( cmask.values[i].isValid() ) _combos[k]->setItem(i);
+ const Config::Mask &ctqmask = device().config()._words[_configIndex].tqmasks[k];
+ for (int i=ctqmask.values.count()-1; i>=0; i--) {
+ if ( ctqmask.values[i].value.isInside(v) ) {
+ if ( ctqmask.values[i].isValid() ) _combos[k]->setItem(i);
else {
- QString label = i18n("<invalid>") + " (" + toHexLabel(cmask.values[i].value, nbChars) + ")";
+ TQString label = i18n("<invalid>") + " (" + toHexLabel(ctqmask.values[i].value, nbChars) + ")";
_combos[k]->setInvalidItem(i, label);
}
break;
diff --git a/src/devices/pic/gui/pic_config_word_editor.h b/src/devices/pic/gui/pic_config_word_editor.h
index 8f483c7..1b4077b 100644
--- a/src/devices/pic/gui/pic_config_word_editor.h
+++ b/src/devices/pic/gui/pic_config_word_editor.h
@@ -10,7 +10,7 @@
#ifndef PIC_CONFIG_WORD_EDITOR_H
#define PIC_CONFIG_WORD_EDITOR_H
-#include <qcombobox.h>
+#include <tqcombobox.h>
#include "common/gui/dialog.h"
#include "common/gui/misc_gui.h"
@@ -22,23 +22,25 @@ namespace Pic
class ConfigWordDialog : public Dialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- ConfigWordDialog(const Memory &memory, uint index, QWidget *parent);
+ ConfigWordDialog(const Memory &memory, uint index, TQWidget *tqparent);
};
//----------------------------------------------------------------------------
class ConfigWordComboBox : public ComboBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- ConfigWordComboBox(QWidget *parent);
- void appendItem(const QString &text, uint index) { insertItem(text); _map.append(index); }
+ ConfigWordComboBox(TQWidget *tqparent);
+ void appendItem(const TQString &text, uint index) { insertItem(text); _map.append(index); }
uint index() const;
void setItem(uint index);
- void setInvalidItem(uint index, const QString &label);
+ void setInvalidItem(uint index, const TQString &label);
private:
- QValueVector<uint> _map; // item index -> value index
+ TQValueVector<uint> _map; // item index -> value index
uint _invalidIndex; // if invalid -> value index
bool isValid() const { return uint(count())==_map.count(); }
@@ -48,8 +50,9 @@ private:
class ConfigWordEditor : public MemoryEditor
{
Q_OBJECT
+ TQ_OBJECT
public:
- ConfigWordEditor(Memory &memory, uint index, bool withWordEditor, QWidget *parent);
+ ConfigWordEditor(Memory &memory, uint index, bool withWordEditor, TQWidget *tqparent);
virtual void setReadOnly(bool readOnly);
public slots:
@@ -62,7 +65,7 @@ private slots:
private:
uint _configIndex;
MemoryRangeEditor *_mdb;
- QValueVector<ConfigWordComboBox *> _combos;
+ TQValueVector<ConfigWordComboBox *> _combos;
};
} // namespace
diff --git a/src/devices/pic/gui/pic_group_ui.cpp b/src/devices/pic/gui/pic_group_ui.cpp
index 3f7a84c..5483ee4 100644
--- a/src/devices/pic/gui/pic_group_ui.cpp
+++ b/src/devices/pic/gui/pic_group_ui.cpp
@@ -18,28 +18,28 @@
#include "libgui/gui_debug_manager.h"
#include "common/gui/list_container.h"
-Device::HexView *Pic::GroupUI::createHexView(const HexEditor &editor, QWidget *parent) const
+Device::HexView *Pic::GroupUI::createHexView(const HexEditor &editor, TQWidget *tqparent) const
{
- return new HexView(editor, parent);
+ return new HexView(editor, tqparent);
}
-Register::View *Pic::GroupUI::createRegisterView(QWidget *parent) const
+Register::View *Pic::GroupUI::createRegisterView(TQWidget *tqparent) const
{
- return new RegisterView(parent);
+ return new RegisterView(tqparent);
}
-Device::MemoryEditor *Pic::GroupUI::createConfigEditor(Device::Memory &memory, QWidget *parent) const
+Device::MemoryEditor *Pic::GroupUI::createConfigEditor(Device::Memory &memory, TQWidget *tqparent) const
{
- return new MemoryConfigEditorWidget(static_cast<Memory &>(memory), false, parent);
+ return new MemoryConfigEditorWidget(static_cast<Memory &>(memory), false, tqparent);
}
-void Pic::GroupUI::fillWatchListContainer(ListContainer *container, QValueVector<Register::TypeData> &ids) const
+void Pic::GroupUI::fillWatchListContainer(ListContainer *container, TQValueVector<Register::TypeData> &ids) const
{
ids.clear();
const Pic::Data &data = static_cast<const Pic::Data &>(*Main::deviceData());
const Pic::RegistersData &rdata = data.registersData();
ListContainer *branch = container->appendBranch(i18n("SFRs"));
- QValueVector<Pic::RegisterNameData> list = Pic::sfrList(data);
+ TQValueVector<Pic::RegisterNameData> list = Pic::sfrList(data);
for (uint i=0; i<list.count(); i++) {
branch->appendItem(list[i].label(), ids.count(), ListContainer::UnChecked);
ids.append(list[i].data());
@@ -47,7 +47,7 @@ void Pic::GroupUI::fillWatchListContainer(ListContainer *container, QValueVector
branch = container->appendBranch(i18n("I/Os"));
for (uint i=0; i<Device::MAX_NB_PORTS; i++) {
if ( !rdata.hasPort(i) ) continue;
- QString name = rdata.portName(i);
+ TQString name = rdata.portName(i);
branch->appendItem(name, ids.count(), ListContainer::UnChecked);
ids.append(Register::TypeData(rdata.sfrs[name].address, rdata.nbChars()));
}
@@ -56,7 +56,7 @@ void Pic::GroupUI::fillWatchListContainer(ListContainer *container, QValueVector
list = Pic::gprList(data, coff);
for (uint k=0; k<rdata.nbBanks; k++) {
if ( !rdata.isBankUsed(k) ) continue;
- ListContainer *bbranch = (rdata.nbBanks==1 ? branch : branch->appendBranch(i18n("Bank %1").arg(k)));
+ ListContainer *bbranch = (rdata.nbBanks==1 ? branch : branch->appendBranch(i18n("Bank %1").tqarg(k)));
uint nb = 0;
for (uint i=0; i<list.count(); i++) {
if ( rdata.bankFromAddress(list[i].data().address())!=k ) continue;
@@ -81,7 +81,7 @@ void Pic::GroupUI::fillWatchListContainer(ListContainer *container, QValueVector
}
}
-Register::ListViewItem *Pic::GroupUI::createWatchItem(const Register::TypeData &data, KListViewItem *parent) const
+Register::ListViewItem *Pic::GroupUI::createWatchItem(const Register::TypeData &data, KListViewItem *tqparent) const
{
- return new Pic::RegisterListViewItem(data, parent);
+ return new Pic::RegisterListViewItem(data, tqparent);
}
diff --git a/src/devices/pic/gui/pic_group_ui.h b/src/devices/pic/gui/pic_group_ui.h
index a8bee66..ac97f22 100644
--- a/src/devices/pic/gui/pic_group_ui.h
+++ b/src/devices/pic/gui/pic_group_ui.h
@@ -17,11 +17,11 @@ namespace Pic
class GroupUI : public Device::GroupUI
{
public:
- virtual Device::HexView *createHexView(const HexEditor &editor, QWidget *parent) const;
- virtual Register::View *createRegisterView(QWidget *parent) const;
- virtual Device::MemoryEditor *createConfigEditor(Device::Memory &memory, QWidget *parent) const;
- virtual void fillWatchListContainer(ListContainer *container, QValueVector<Register::TypeData> &ids) const;
- virtual Register::ListViewItem *createWatchItem(const Register::TypeData &data, KListViewItem *parent) const;
+ virtual Device::HexView *createHexView(const HexEditor &editor, TQWidget *tqparent) const;
+ virtual Register::View *createRegisterView(TQWidget *tqparent) const;
+ virtual Device::MemoryEditor *createConfigEditor(Device::Memory &memory, TQWidget *tqparent) const;
+ virtual void fillWatchListContainer(ListContainer *container, TQValueVector<Register::TypeData> &ids) const;
+ virtual Register::ListViewItem *createWatchItem(const Register::TypeData &data, KListViewItem *tqparent) const;
};
} // namespace
diff --git a/src/devices/pic/gui/pic_hex_view.cpp b/src/devices/pic/gui/pic_hex_view.cpp
index 07a1938..760b1ed 100644
--- a/src/devices/pic/gui/pic_hex_view.cpp
+++ b/src/devices/pic/gui/pic_hex_view.cpp
@@ -9,16 +9,16 @@
***************************************************************************/
#include "pic_hex_view.h"
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
#include "pic_memory_editor.h"
#include "pic_config_editor.h"
-Pic::HexView::HexView(const HexEditor &editor, QWidget *parent)
- : Device::HexView(editor, parent, "pic_hex_view")
+Pic::HexView::HexView(const HexEditor &editor, TQWidget *tqparent)
+ : Device::HexView(editor, tqparent, "pic_hex_view")
{}
const Pic::MemoryRangeType::Type Pic::HexView::MEMORY_DATA[] = {
diff --git a/src/devices/pic/gui/pic_hex_view.h b/src/devices/pic/gui/pic_hex_view.h
index 2086ccb..54b679d 100644
--- a/src/devices/pic/gui/pic_hex_view.h
+++ b/src/devices/pic/gui/pic_hex_view.h
@@ -10,7 +10,7 @@
#ifndef PIC_HEX_VIEW_H
#define PIC_HEX_VIEW_H
-class QVBoxLayout;
+class TQVBoxLayout;
#include "devices/gui/hex_view.h"
#include "devices/pic/pic/pic_memory.h"
@@ -21,8 +21,9 @@ namespace Pic
class HexView : public Device::HexView
{
Q_OBJECT
+ TQ_OBJECT
public:
- HexView(const HexEditor &editor, QWidget *parent);
+ HexView(const HexEditor &editor, TQWidget *tqparent);
Memory *memory() { return static_cast<Memory *>(_memory); }
const Memory *memory() const { return static_cast<Memory *>(_memory); }
virtual uint nbChecksumChars() const { return 4; }
diff --git a/src/devices/pic/gui/pic_memory_editor.cpp b/src/devices/pic/gui/pic_memory_editor.cpp
index 3d78097..50f686a 100644
--- a/src/devices/pic/gui/pic_memory_editor.cpp
+++ b/src/devices/pic/gui/pic_memory_editor.cpp
@@ -9,17 +9,17 @@
***************************************************************************/
#include "pic_memory_editor.h"
-#include <qframe.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qscrollbar.h>
-#include <qgrid.h>
-#include <qhbox.h>
-#include <qtooltip.h>
-#include <qregexp.h>
-#include <qcolor.h>
-#include <qlayout.h>
-#include <qpixmap.h>
+#include <tqframe.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqscrollbar.h>
+#include <tqgrid.h>
+#include <tqhbox.h>
+#include <tqtooltip.h>
+#include <tqregexp.h>
+#include <tqcolor.h>
+#include <tqlayout.h>
+#include <tqpixmap.h>
#include <klocale.h>
#include <kpushbutton.h>
@@ -34,17 +34,17 @@
#include "pic_hex_view.h"
//-----------------------------------------------------------------------------
-Pic::MemoryEditorLegend::Data::Data(const QString &text, QWidget *parent)
+Pic::MemoryEditorLegend::Data::Data(const TQString &text, TQWidget *tqparent)
{
- button = new PopupButton(text, parent);
+ button = new PopupButton(text, tqparent);
KActionCollection *ac = 0;
- KAction *a = new KAction(i18n("Go to start"), "top", 0, parent, SLOT(gotoStart()), ac);
+ KAction *a = new KAction(i18n("Go to start"), "top", 0, TQT_TQOBJECT(tqparent), TQT_SLOT(gotoStart()), ac);
actions.append(a);
button->appendAction(a);
- a = new KAction(i18n("Go to end"), "bottom", 0, parent, SLOT(gotoEnd()), ac);
+ a = new KAction(i18n("Go to end"), "bottom", 0, TQT_TQOBJECT(tqparent), TQT_SLOT(gotoEnd()), ac);
actions.append(a);
button->appendAction(a);
- label = new QLabel(parent);
+ label = new TQLabel(tqparent);
}
void Pic::MemoryEditorLegend::Data::setProtected(bool on)
@@ -64,24 +64,24 @@ const char * const Pic::MemoryEditorLegend::BLOCK_COLORS[Protection::MAX_NB_BLOC
"#88FF88", "#88FFFF", "#FFFF88", "#FF88FF", "#0088FF", "#88FF00", "#00FF88", "#FF8800"
};
-Pic::MemoryEditorLegend::MemoryEditorLegend(MemoryRangeType type, Memory &memory, QWidget *parent)
- : MemoryEditor(type, memory, parent, "memory_displayer_legend")
+Pic::MemoryEditorLegend::MemoryEditorLegend(MemoryRangeType type, Memory &memory, TQWidget *tqparent)
+ : MemoryEditor(type, memory, tqparent, "memory_displayer_legend")
{
- QGridLayout *grid = new QGridLayout(_top);
+ TQGridLayout *grid = new TQGridLayout(_top);
- QWidget *w = new QWidget(this);
+ TQWidget *w = new TQWidget(this);
w->setFixedWidth(20);
w->setPaletteBackgroundColor(protectedColor());
grid->addWidget(w, 0, 0);
const Protection &protection = device().config().protection();
- QString s = (protection.family()==Protection::CodeGuard ? i18n("High Security") : i18n("Code protection"));
- QLabel *label = new QLabel(s, this);
+ TQString s = (protection.family()==Protection::CodeGuard ? i18n("High Security") : i18n("Code protection"));
+ TQLabel *label = new TQLabel(s, this);
grid->addMultiCellWidget(label, 0,0, 1,2);
grid->addRowSpacing(1, 10);
uint row = 2;
if ( type==MemoryRangeType::Code && protection.hasBootBlock() ) {
- w = new QWidget(this);
+ w = new TQWidget(this);
w->setFixedWidth(20);
w->setPaletteBackgroundColor(bootColor());
grid->addWidget(w, row, 0);
@@ -93,7 +93,7 @@ Pic::MemoryEditorLegend::MemoryEditorLegend(MemoryRangeType type, Memory &memory
uint nb = (type==MemoryRangeType::Code ? protection.nbBlocks() : 0);
for (uint i=0; i<nb; i++) {
- w = new QWidget(this);
+ w = new TQWidget(this);
w->setFixedWidth(20);
w->setPaletteBackgroundColor(blockColor(i));
grid->addWidget(w, row, 0);
@@ -112,14 +112,14 @@ void Pic::MemoryEditorLegend::updateDisplay()
if (_boot.label) {
AddressRange r = memory().bootRange();
if ( r.isEmpty() ) _boot.label->setText(i18n("not present"));
- else _boot.label->setText(QString("[%1:%2]").arg(toHex(r.start, nbChars)).arg(toHex(r.end, nbChars)));
+ else _boot.label->setText(TQString("[%1:%2]").tqarg(toHex(r.start, nbChars)).tqarg(toHex(r.end, nbChars)));
_boot.button->setEnabled(!r.isEmpty());
_boot.setProtected(memory().isBootProtected(ptype));
}
for (uint i=0; i<_blocks.count(); i++) {
AddressRange r = memory().blockRange(i);
if ( r.isEmpty() ) _blocks[i].label->setText(i18n("not present"));
- else _blocks[i].label->setText(QString("[%1:%2]").arg(toHex(r.start, nbChars)).arg(toHex(r.end, nbChars)));
+ else _blocks[i].label->setText(TQString("[%1:%2]").tqarg(toHex(r.start, nbChars)).tqarg(toHex(r.end, nbChars)));
_blocks[i].button->setEnabled(!r.isEmpty());
_blocks[i].setProtected(memory().isBlockProtected(ptype, i));
}
@@ -165,8 +165,8 @@ void Pic::MemoryEditorLegend::gotoEnd()
//-----------------------------------------------------------------------------
-Pic::HexWordEditor::HexWordEditor(MemoryRangeType type, Memory &memory, QWidget *parent)
- : Device::HexWordEditor(memory, memory.device().nbCharsWord(type), parent),
+Pic::HexWordEditor::HexWordEditor(MemoryRangeType type, Memory &memory, TQWidget *tqparent)
+ : Device::HexWordEditor(memory, memory.device().nbCharsWord(type), tqparent),
MemoryCaster(type, memory)
{}
@@ -174,7 +174,7 @@ void Pic::HexWordEditor::setWord(BitValue value)
{
if ( type()==MemoryRangeType::Config ) {
const Config::Word &cword = device().config()._words[_offset];
- value |= cword.usedMask().complementInMask(device().mask(MemoryRangeType::Config));
+ value |= cword.usedMask().complementInMask(device().tqmask(MemoryRangeType::Config));
}
memory().setWord(type(), _offset, value);
}
@@ -182,19 +182,19 @@ void Pic::HexWordEditor::setWord(BitValue value)
//-----------------------------------------------------------------------------
Pic::MemoryRangeEditor::MemoryRangeEditor(MemoryRangeType type, Memory &memory,
uint nbLines, uint nbCols,
- uint wordOffset, int nbWords, QWidget *parent)
- : Device::MemoryRangeEditor(memory, nbLines, nbCols, wordOffset, nbWords, parent, "pic_memory_range_editor"),
+ uint wordOffset, int nbWords, TQWidget *tqparent)
+ : Device::MemoryRangeEditor(memory, nbLines, nbCols, wordOffset, nbWords, tqparent, "pic_memory_range_editor"),
MemoryCaster(type, memory), _legend(0)
{
if ( type==MemoryRangeType::Code ) _blockRanges.resize(memory.device().config().protection().nbBlocks());
}
-void Pic::MemoryRangeEditor::addLegend(QVBoxLayout *vbox)
+void Pic::MemoryRangeEditor::addLegend(TQVBoxLayout *vbox)
{
if ( type()==MemoryRangeType::Code || type()==MemoryRangeType::Eeprom ) {
_legend = new MemoryEditorLegend(type(), memory(), this);
- connect(_legend, SIGNAL(setStartWord(int)), SLOT(setStartWord(int)));
- connect(_legend, SIGNAL(setEndWord(int)), SLOT(setEndWord(int)));
+ connect(_legend, TQT_SIGNAL(setStartWord(int)), TQT_SLOT(setStartWord(int)));
+ connect(_legend, TQT_SIGNAL(setEndWord(int)), TQT_SLOT(setEndWord(int)));
vbox->addWidget(_legend);
}
}
@@ -220,28 +220,28 @@ void Pic::MemoryRangeEditor::updateDisplay()
void Pic::MemoryRangeEditor::updateAddressColor(uint i, Address address)
{
- if ( _codeProtected.contains(address) )
+ if ( _codeProtected.tqcontains(address) )
_addresses[i]->setPaletteBackgroundColor(MemoryEditorLegend::protectedColor());
else _addresses[i]->unsetPalette();
_blocks[i]->unsetPalette();
if ( type()==MemoryRangeType::Code ) {
- if ( _bootRange.contains(address) ) _blocks[i]->setPaletteBackgroundColor(MemoryEditorLegend::bootColor());
+ if ( _bootRange.tqcontains(address) ) _blocks[i]->setPaletteBackgroundColor(MemoryEditorLegend::bootColor());
else for (uint k=0; k<_blockRanges.count(); k++) {
- if ( !_blockRanges[k].contains(address) ) continue;
+ if ( !_blockRanges[k].tqcontains(address) ) continue;
_blocks[i]->setPaletteBackgroundColor(MemoryEditorLegend::blockColor(k));
break;
}
}
}
-Device::HexWordEditor *Pic::MemoryRangeEditor::createHexWordEditor(QWidget *parent)
+Device::HexWordEditor *Pic::MemoryRangeEditor::createHexWordEditor(TQWidget *tqparent)
{
- return new HexWordEditor(type(), memory(), parent);
+ return new HexWordEditor(type(), memory(), tqparent);
}
//-----------------------------------------------------------------------------
-Pic::MemoryTypeEditor::MemoryTypeEditor(const HexView *hexview, MemoryRangeType type, Memory &memory, QWidget *parent, const char *name)
- : Device::MemoryTypeEditor(hexview, memory, parent, name), MemoryCaster(type, memory)
+Pic::MemoryTypeEditor::MemoryTypeEditor(const HexView *hexview, MemoryRangeType type, Memory &memory, TQWidget *tqparent, const char *name)
+ : Device::MemoryTypeEditor(hexview, memory, tqparent, name), MemoryCaster(type, memory)
{}
void Pic::MemoryTypeEditor::init(bool first)
@@ -250,11 +250,11 @@ void Pic::MemoryTypeEditor::init(bool first)
_title->setText(type().label());
uint nbChars = device().nbCharsWord(type());
- QString add;
- if ( type()==MemoryRangeType::UserId ) add = i18n(" - recommended mask: %1").arg(toHexLabel(device().userIdRecommendedMask(), nbChars));
+ TQString add;
+ if ( type()==MemoryRangeType::UserId ) add = i18n(" - recommended tqmask: %1").tqarg(toHexLabel(device().userIdRecommendedMask(), nbChars));
if ( type()==MemoryRangeType::Cal && _hexview ) add = i18n(" - not programmed by default");
- QString comment = i18n("%1-bit words - mask: %2")
- .arg(device().nbBitsWord(type())).arg(toHexLabel(device().mask(type()), nbChars));
+ TQString comment = i18n("%1-bit words - tqmask: %2")
+ .tqarg(device().nbBitsWord(type())).tqarg(toHexLabel(device().tqmask(type()), nbChars));
_comment->setText(comment + add);
}
@@ -291,8 +291,8 @@ bool Pic::MemoryTypeEditor::internalDoAction(Device::Action action)
}
//-----------------------------------------------------------------------------
-Pic::MemoryTypeRangeEditor::MemoryTypeRangeEditor(const HexView *hexview, MemoryRangeType type, Memory &memory, QWidget *parent)
- : MemoryTypeEditor(hexview, type, memory, parent, "pic_memory_type_range_editor"), _mre(0)
+Pic::MemoryTypeRangeEditor::MemoryTypeRangeEditor(const HexView *hexview, MemoryRangeType type, Memory &memory, TQWidget *tqparent)
+ : MemoryTypeEditor(hexview, type, memory, tqparent, "pic_memory_type_range_editor"), _mre(0)
{}
void Pic::MemoryTypeRangeEditor::init(bool first)
@@ -309,15 +309,15 @@ void Pic::MemoryTypeRangeEditor::init(bool first)
}
//-----------------------------------------------------------------------------
-Pic::MemoryUserIdEditor::MemoryUserIdEditor(const HexView *hexview, Memory &memory, QWidget *parent)
- : MemoryTypeRangeEditor(hexview, MemoryRangeType::UserId, memory, parent), _saveReadOnly(false)
+Pic::MemoryUserIdEditor::MemoryUserIdEditor(const HexView *hexview, Memory &memory, TQWidget *tqparent)
+ : MemoryTypeRangeEditor(hexview, MemoryRangeType::UserId, memory, tqparent), _saveReadOnly(false)
{}
void Pic::MemoryUserIdEditor::init(bool first)
{
MemoryTypeRangeEditor::init(first);
_setToChecksum = new KToggleAction(i18n("Set to unprotected checksum"), 0, 0,
- this, SLOT(toggleSetToChecksum()), Main::toplevel().actionCollection());
+ TQT_TQOBJECT(this), TQT_SLOT(toggleSetToChecksum()), Main::toplevel().actionCollection());
addAction(_setToChecksum);
if ( readConfigEntry(BaseGlobalConfig::UserIdSetToChecksum).toBool() && memory().isClear(MemoryRangeType::UserId) ) {
_setToChecksum->activate();
@@ -330,7 +330,7 @@ void Pic::MemoryUserIdEditor::toggleSetToChecksum()
if ( _setToChecksum->isChecked() ) {
_mre->setComment(i18n("Set to unprotected checksum"));
emit modified();
- } else _mre->setComment(QString::null);
+ } else _mre->setComment(TQString());
setReadOnly(_saveReadOnly);
}
@@ -347,8 +347,8 @@ void Pic::MemoryUserIdEditor::setReadOnly(bool readOnly)
}
//-----------------------------------------------------------------------------
-Pic::MemoryCalibrationEditor::MemoryCalibrationEditor(const HexView *hexview, Memory &memory, QWidget *parent)
- : MemoryTypeEditor(hexview, MemoryRangeType::Cal, memory, parent, "pic_memory_calibration_editor")
+Pic::MemoryCalibrationEditor::MemoryCalibrationEditor(const HexView *hexview, Memory &memory, TQWidget *tqparent)
+ : MemoryTypeEditor(hexview, MemoryRangeType::Cal, memory, tqparent, "pic_memory_calibration_editor")
{}
void Pic::MemoryCalibrationEditor::init(bool first)
diff --git a/src/devices/pic/gui/pic_memory_editor.h b/src/devices/pic/gui/pic_memory_editor.h
index bf67cd1..2a6f72f 100644
--- a/src/devices/pic/gui/pic_memory_editor.h
+++ b/src/devices/pic/gui/pic_memory_editor.h
@@ -10,8 +10,8 @@
#ifndef PIC_MEMORY_EDITOR_H
#define PIC_MEMORY_EDITOR_H
-#include <qscrollbar.h>
-#include <qgroupbox.h>
+#include <tqscrollbar.h>
+#include <tqgroupbox.h>
class KToggleAction;
#include "devices/gui/memory_editor.h"
@@ -42,22 +42,24 @@ private:
class MemoryEditor : public Device::MemoryEditor, public MemoryCaster
{
Q_OBJECT
+ TQ_OBJECT
public:
- MemoryEditor(MemoryRangeType type, Memory &memory, QWidget *parent, const char *name)
- : Device::MemoryEditor(&memory, parent, name), MemoryCaster(type, memory) {}
+ MemoryEditor(MemoryRangeType type, Memory &memory, TQWidget *tqparent, const char *name)
+ : Device::MemoryEditor(&memory, tqparent, name), MemoryCaster(type, memory) {}
};
//-----------------------------------------------------------------------------
class MemoryEditorLegend : public MemoryEditor
{
Q_OBJECT
+ TQ_OBJECT
public:
- MemoryEditorLegend(MemoryRangeType type, Memory &memory, QWidget *parent);
+ MemoryEditorLegend(MemoryRangeType type, Memory &memory, TQWidget *tqparent);
virtual void setReadOnly(bool) {}
- static QColor protectedColor() { return QColor("#FF8888"); }
- static QColor bootColor() { return QColor("#8888FF"); }
- static QColor blockColor(uint i) { return QColor(BLOCK_COLORS[i]); }
+ static TQColor protectedColor() { return TQColor("#FF8888"); }
+ static TQColor bootColor() { return TQColor("#8888FF"); }
+ static TQColor blockColor(uint i) { return TQColor(BLOCK_COLORS[i]); }
signals:
void setStartWord(int i);
@@ -74,15 +76,15 @@ private:
class Data {
public:
Data() : button(0), label(0) {}
- Data(const QString &text, QWidget *parent);
+ Data(const TQString &text, TQWidget *tqparent);
void setProtected(bool on);
bool hasAction(const KAction *action) const;
PopupButton *button;
- QLabel *label;
- QValueVector<KAction *> actions;
+ TQLabel *label;
+ TQValueVector<KAction *> actions;
};
Data _boot;
- QValueVector<Data> _blocks;
+ TQValueVector<Data> _blocks;
static const char * const BLOCK_COLORS[Protection::MAX_NB_BLOCKS];
};
@@ -91,11 +93,12 @@ private:
class HexWordEditor : public Device::HexWordEditor, public MemoryCaster
{
Q_OBJECT
+ TQ_OBJECT
public:
- HexWordEditor(MemoryRangeType type, Memory &memory, QWidget *parent);
+ HexWordEditor(MemoryRangeType type, Memory &memory, TQWidget *tqparent);
private:
- virtual BitValue mask() const { return memory().device().mask(type()); }
+ virtual BitValue tqmask() const { return memory().device().tqmask(type()); }
virtual BitValue normalizeWord(BitValue value) const { return memory().normalizeWord(type(), _offset, value); }
virtual BitValue word() const { return memory().word(type(), _offset); }
virtual void setWord(BitValue value);
@@ -105,9 +108,10 @@ private:
class MemoryRangeEditor : public Device::MemoryRangeEditor, public MemoryCaster
{
Q_OBJECT
+ TQ_OBJECT
public:
MemoryRangeEditor(MemoryRangeType type, Memory &memory,
- uint nbLines, uint nbCols, uint wordOffset, int nbWords, QWidget *parent);
+ uint nbLines, uint nbCols, uint wordOffset, int nbWords, TQWidget *tqparent);
public slots:
virtual void updateDisplay();
@@ -121,18 +125,19 @@ private:
virtual uint nbWords() const { return device().nbWords(type()); }
virtual uint addressIncrement() const { return device().addressIncrement(type()); }
virtual Address startAddress() const { return device().range(type()).start; }
- virtual Device::HexWordEditor *createHexWordEditor(QWidget *parent);
+ virtual Device::HexWordEditor *createHexWordEditor(TQWidget *tqparent);
virtual void updateAddressColor(uint i, Address address);
virtual bool isRangeReadOnly() const;
- virtual void addLegend(QVBoxLayout *vbox);
+ virtual void addLegend(TQVBoxLayout *vbox);
};
//-----------------------------------------------------------------------------
class MemoryTypeEditor : public Device::MemoryTypeEditor, public MemoryCaster
{
Q_OBJECT
+ TQ_OBJECT
public:
- MemoryTypeEditor(const HexView *hexview, MemoryRangeType type, Memory &memory, QWidget *parent, const char *name);
+ MemoryTypeEditor(const HexView *hexview, MemoryRangeType type, Memory &memory, TQWidget *tqparent, const char *name);
virtual void init(bool first);
private:
@@ -143,8 +148,9 @@ private:
class MemoryTypeRangeEditor : public MemoryTypeEditor
{
Q_OBJECT
+ TQ_OBJECT
public:
- MemoryTypeRangeEditor(const HexView *hexview, MemoryRangeType type, Memory &memory, QWidget *parent);
+ MemoryTypeRangeEditor(const HexView *hexview, MemoryRangeType type, Memory &memory, TQWidget *tqparent);
virtual void init(bool first);
protected:
@@ -155,8 +161,9 @@ protected:
class MemoryUserIdEditor : public MemoryTypeRangeEditor
{
Q_OBJECT
+ TQ_OBJECT
public:
- MemoryUserIdEditor(const HexView *hexview, Memory &memory, QWidget *parent);
+ MemoryUserIdEditor(const HexView *hexview, Memory &memory, TQWidget *tqparent);
virtual void init(bool first);
virtual void setReadOnly(bool readOnly);
@@ -175,8 +182,9 @@ private:
class MemoryCalibrationEditor : public MemoryTypeEditor
{
Q_OBJECT
+ TQ_OBJECT
public:
- MemoryCalibrationEditor(const HexView *hexview, Memory &memory, QWidget *parent);
+ MemoryCalibrationEditor(const HexView *hexview, Memory &memory, TQWidget *tqparent);
virtual void init(bool first);
private:
diff --git a/src/devices/pic/gui/pic_prog_group_ui.cpp b/src/devices/pic/gui/pic_prog_group_ui.cpp
index e063b77..8f2f225 100644
--- a/src/devices/pic/gui/pic_prog_group_ui.cpp
+++ b/src/devices/pic/gui/pic_prog_group_ui.cpp
@@ -11,17 +11,17 @@
#include "progs/gui/prog_config_widget.h"
#include "progs/base/prog_group.h"
-Programmer::PicAdvancedDialog::PicAdvancedDialog(PicBase &base, QWidget *parent, const char *name)
- : AdvancedDialog(base, parent, name)
+Programmer::PicAdvancedDialog::PicAdvancedDialog(PicBase &base, TQWidget *tqparent, const char *name)
+ : AdvancedDialog(base, tqparent, name)
{
if (_voltagesContainer) {
uint k = _voltagesContainer->numRows();
for (uint i=0; i<Pic::Nb_VoltageTypes; i++) {
if ( !base.group().canReadVoltage(Pic::VoltageType(i)) ) _voltages[i] = 0;
else {
- QLabel *label = new QLabel(i18n(Pic::VOLTAGE_TYPE_LABELS[i]) + ":", _voltagesContainer);
+ TQLabel *label = new TQLabel(i18n(Pic::VOLTAGE_TYPE_LABELS[i]) + ":", _voltagesContainer);
_voltagesContainer->addWidget(label, k,k, 0,0);
- _voltages[i] = new QLabel(_voltagesContainer);
+ _voltages[i] = new TQLabel(_voltagesContainer);
_voltagesContainer->addWidget(_voltages[i], k,k, 1,1);
k++;
}
@@ -36,6 +36,6 @@ void Programmer::PicAdvancedDialog::updateDisplay()
if ( !base().group().canReadVoltage(Pic::VoltageType(i)) ) continue;
double v = base().voltage(Pic::VoltageType(i));
if ( v==::Programmer::UNKNOWN_VOLTAGE ) _voltages[i]->setText("---");
- else _voltages[i]->setText(QString("%1 V").arg(v));
+ else _voltages[i]->setText(TQString("%1 V").tqarg(v));
}
}
diff --git a/src/devices/pic/gui/pic_prog_group_ui.h b/src/devices/pic/gui/pic_prog_group_ui.h
index 75821b5..1a8540e 100644
--- a/src/devices/pic/gui/pic_prog_group_ui.h
+++ b/src/devices/pic/gui/pic_prog_group_ui.h
@@ -17,12 +17,13 @@ namespace Programmer
class PicAdvancedDialog : public ::Programmer::AdvancedDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- PicAdvancedDialog(PicBase &base, QWidget *parent, const char *name);
+ PicAdvancedDialog(PicBase &base, TQWidget *tqparent, const char *name);
virtual void updateDisplay();
private:
- QLabel *_voltages[Pic::Nb_VoltageTypes];
+ TQLabel *_voltages[Pic::Nb_VoltageTypes];
PicBase &base() { return static_cast<PicBase &>(_base); }
};
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());
diff --git a/src/devices/pic/gui/pic_register_view.h b/src/devices/pic/gui/pic_register_view.h
index f5b9d4b..0f347e4 100644
--- a/src/devices/pic/gui/pic_register_view.h
+++ b/src/devices/pic/gui/pic_register_view.h
@@ -9,11 +9,11 @@
#ifndef PIC_REGISTER_VIEW_H
#define PIC_REGISTER_VIEW_H
-#include <qvaluevector.h>
-class QPushButton;
-class QCheckBox;
-class QLabel;
-class QComboBox;
+#include <tqvaluevector.h>
+class TQPushButton;
+class TQCheckBox;
+class TQLabel;
+class TQComboBox;
#include "devices/gui/register_view.h"
#include "devices/pic/base/pic.h"
@@ -24,11 +24,12 @@ namespace Device { class RegisterHexWordEditor; }
namespace Pic
{
//-----------------------------------------------------------------------------
-class BankWidget : public QFrame
+class BankWidget : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- BankWidget(uint bank, QWidget *parent);
+ BankWidget(uint bank, TQWidget *tqparent);
void updateView();
private slots:
@@ -42,13 +43,13 @@ private:
public:
Data() : label(0), button(0), edit(0) {}
uint address;
- QLabel *alabel, *label;
+ TQLabel *alabel, *label;
PopupButton *button;
Register::LineEdit *edit;
};
uint _bindex;
- QComboBox *_bankCombo;
- QValueVector<Data> _registers;
+ TQComboBox *_bankCombo;
+ TQValueVector<Data> _registers;
uint bank() const;
uint nbRegisters() const;
@@ -60,27 +61,28 @@ private:
class RegisterView : public Register::View
{
Q_OBJECT
+ TQ_OBJECT
public:
- RegisterView(QWidget *parent);
+ RegisterView(TQWidget *tqparent);
virtual void updateView();
private slots:
void stopWatchAllRegisters();
private:
- QPushButton *_readAllButton, *_clearAllButton;
- QValueVector<BankWidget *> _banks;
+ TQPushButton *_readAllButton, *_clearAllButton;
+ TQValueVector<BankWidget *> _banks;
};
//-----------------------------------------------------------------------------
class RegisterListViewItem : public Register::ListViewItem
{
public:
- RegisterListViewItem(const Register::TypeData &data, KListViewItem *parent);
+ RegisterListViewItem(const Register::TypeData &data, KListViewItem *tqparent);
private:
virtual uint nbCharsAddress() const;
- virtual QString label() const;
+ virtual TQString label() const;
};
} // namespace