summaryrefslogtreecommitdiffstats
path: root/src/devices/pic/gui/pic_memory_editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/pic/gui/pic_memory_editor.cpp')
-rw-r--r--src/devices/pic/gui/pic_memory_editor.cpp106
1 files changed, 53 insertions, 53 deletions
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)