summaryrefslogtreecommitdiffstats
path: root/src/devices/pic/base/pic_config.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/pic/base/pic_config.cpp')
-rw-r--r--src/devices/pic/base/pic_config.cpp100
1 files changed, 50 insertions, 50 deletions
diff --git a/src/devices/pic/base/pic_config.cpp b/src/devices/pic/base/pic_config.cpp
index 6672794..811a38e 100644
--- a/src/devices/pic/base/pic_config.cpp
+++ b/src/devices/pic/base/pic_config.cpp
@@ -8,7 +8,7 @@
***************************************************************************/
#include "pic_config.h"
-#include <qregexp.h>
+#include <tqregexp.h>
const Pic::ConfigNameType::Data Pic::ConfigNameType::DATA[Nb_Types] = {
{ "cname", 0 },
@@ -218,8 +218,8 @@ const Pic::Config::Data Pic::Config::DATA[] = {
{ "20BIT", I18N_NOOP("20-bit external bus") }, { 0, 0 } } },
{ { "EASHFT", I18N_NOOP("External address bus shift") }, Toggle, { { 0, 0 } } },
{ { "MSSPSEL", I18N_NOOP("MSSP address select bit") }, Fixed, {
- { "7BIT", I18N_NOOP("7-bit address mask mode") },
- { "5BIT", I18N_NOOP("5-bit address mask mode") }, { 0, 0 } } },
+ { "7BIT", I18N_NOOP("7-bit address tqmask mode") },
+ { "5BIT", I18N_NOOP("5-bit address tqmask mode") }, { 0, 0 } } },
{ { "PMPMX", I18N_NOOP("PMP pin select bit") }, Fixed, {
{ "Connected", I18N_NOOP("Connected to EMB") },
{ "NotConnected", I18N_NOOP("Not connected to EMB") }, { 0, 0 } } },
@@ -280,60 +280,60 @@ const Pic::Config::Data Pic::Config::DATA[] = {
{ { 0, 0 }, Fixed, { { 0, 0 } } }
};
-QMap<QString, Pic::Config::MapData> *Pic::Config::_masks = 0;
-QMap<QString, Pic::Config::MapData> &Pic::Config::masks()
+TQMap<TQString, Pic::Config::MapData> *Pic::Config::_tqmasks = 0;
+TQMap<TQString, Pic::Config::MapData> &Pic::Config::tqmasks()
{
- if ( _masks==0 ) {
- _masks = new QMap<QString, MapData>;
- for (uint i=0; DATA[i].mask.name; i++) {
- (*_masks)[DATA[i].mask.name] = MapData(i, -1);
+ if ( _tqmasks==0 ) {
+ _tqmasks = new TQMap<TQString, MapData>;
+ for (uint i=0; DATA[i].tqmask.name; i++) {
+ (*_tqmasks)[DATA[i].tqmask.name] = MapData(i, -1);
if ( DATA[i].type==MemoryRange ) {
for (uint k=0; k<Protection::MAX_NB_BLOCKS; k++)
- (*_masks)[QString("%1_%2").arg(DATA[i].mask.name).arg(k)] = MapData(i, k);
+ (*_tqmasks)[TQString("%1_%2").tqarg(DATA[i].tqmask.name).tqarg(k)] = MapData(i, k);
}
}
}
- return *_masks;
+ return *_tqmasks;
}
-bool Pic::Config::hasMaskName(const QString &mask)
+bool Pic::Config::hasMaskName(const TQString &tqmask)
{
- return masks().contains(mask);
+ return tqmasks().tqcontains(tqmask);
}
-QString Pic::Config::maskLabel(const QString &mask)
+TQString Pic::Config::tqmaskLabel(const TQString &tqmask)
{
- const MapData &mp = masks()[mask];
- QString s = i18n(DATA[mp.index].mask.label);
- if ( mp.block>=0 ) return i18n("%1 for block %2").arg(s).arg(mp.block);
+ const MapData &mp = tqmasks()[tqmask];
+ TQString s = i18n(DATA[mp.index].tqmask.label);
+ if ( mp.block>=0 ) return i18n("%1 for block %2").tqarg(s).tqarg(mp.block);
return s;
}
-const Pic::Config::Mask *Pic::Config::findMask(const QString &mask, uint *wordIndex) const
+const Pic::Config::Mask *Pic::Config::findMask(const TQString &tqmask, uint *wordIndex) const
{
for (uint i=0; i<uint(_words.count()); i++)
- for (uint k=0; k<uint(_words[i].masks.count()); k++) {
- if ( _words[i].masks[k].name==mask ) {
+ for (uint k=0; k<uint(_words[i].tqmasks.count()); k++) {
+ if ( _words[i].tqmasks[k].name==tqmask ) {
if (wordIndex) *wordIndex = i;
- return &_words[i].masks[k];
+ return &_words[i].tqmasks[k];
}
}
return 0;
}
-const Pic::Config::Value *Pic::Config::findValue(const QString &mask, const QString &value) const
+const Pic::Config::Value *Pic::Config::findValue(const TQString &tqmask, const TQString &value) const
{
- const Mask *cmask = findMask(mask);
- if ( cmask==0 ) return 0;
- for (uint i=0; i<uint(cmask->values.count()); i++)
- if ( cmask->values[i].name==value ) return &cmask->values[i];
+ const Mask *ctqmask = findMask(tqmask);
+ if ( ctqmask==0 ) return 0;
+ for (uint i=0; i<uint(ctqmask->values.count()); i++)
+ if ( ctqmask->values[i].name==value ) return &ctqmask->values[i];
return 0;
}
-bool Pic::Config::checkValueName(const QString &mask, const QString &name) const
+bool Pic::Config::checkValueName(const TQString &tqmask, const TQString &name) const
{
- const Data &data = DATA[masks()[mask].index];
- QString pinRegexp = "[A-Z]+\\d*(/[A-Z]+\\d*)?";
+ const Data &data = DATA[tqmasks()[tqmask].index];
+ TQString pinRegexp = "[A-Z]+\\d*(/[A-Z]+\\d*)?";
switch (data.type) {
case Fixed: break;
case ValueDouble: {
@@ -349,7 +349,7 @@ bool Pic::Config::checkValueName(const QString &mask, const QString &name) const
break;
}
case Ratio: {
- QRegExp regexp("(\\d+):(\\d+)");
+ TQRegExp regexp("(\\d+):(\\d+)");
if ( regexp.exactMatch(name) ) {
bool ok1, ok2;
(void)regexp.cap(1).toUInt(&ok1);
@@ -359,17 +359,17 @@ bool Pic::Config::checkValueName(const QString &mask, const QString &name) const
break;
}
case MemoryRange:
- return _protection.checkRange(mask, name);
+ return _protection.checkRange(tqmask, name);
case Toggle:
if ( name=="On" || name=="Off" ) return true;
break;
case Pin: {
- QRegExp regexp(pinRegexp);
+ TQRegExp regexp(pinRegexp);
if ( regexp.exactMatch(name) ) return true;
break;
}
case Pins: {
- QRegExp regexp(pinRegexp + "(, " + pinRegexp + ")+");
+ TQRegExp regexp(pinRegexp + "(, " + pinRegexp + ")+");
if ( regexp.exactMatch(name) ) return true;
break;
}
@@ -379,9 +379,9 @@ bool Pic::Config::checkValueName(const QString &mask, const QString &name) const
return false;
}
-QString Pic::Config::valueLabel(const QString &mask, const QString &name)
+TQString Pic::Config::valueLabel(const TQString &tqmask, const TQString &name)
{
- const Data &data = DATA[masks()[mask].index];
+ const Data &data = DATA[tqmasks()[tqmask].index];
switch (data.type) {
case Fixed:
case ValueDouble:
@@ -405,51 +405,51 @@ QString Pic::Config::valueLabel(const QString &mask, const QString &name)
BitValue Pic::Config::Word::usedMask() const
{
- BitValue mask = 0x0;
- for (uint i=0; i<uint(masks.count()); i++) mask |= masks[i].value;
- return mask;
+ BitValue tqmask = 0x0;
+ for (uint i=0; i<uint(tqmasks.count()); i++) tqmask |= tqmasks[i].value;
+ return tqmask;
}
//-----------------------------------------------------------------------------
-QDataStream &Pic::operator <<(QDataStream &s, const Config::Value &value)
+TQDataStream &Pic::operator <<(TQDataStream &s, const Config::Value &value)
{
s << value.name << value.configNames << value.value;
return s;
}
-QDataStream &Pic::operator >>(QDataStream &s, Config::Value &value)
+TQDataStream &Pic::operator >>(TQDataStream &s, Config::Value &value)
{
s >> value.name >> value.configNames >> value.value;
return s;
}
-QDataStream &Pic::operator <<(QDataStream &s, const Config::Mask &mask)
+TQDataStream &Pic::operator <<(TQDataStream &s, const Config::Mask &tqmask)
{
- s << mask.name << mask.value << mask.values;
+ s << tqmask.name << tqmask.value << tqmask.values;
return s;
}
-QDataStream &Pic::operator >>(QDataStream &s, Config::Mask &mask)
+TQDataStream &Pic::operator >>(TQDataStream &s, Config::Mask &tqmask)
{
- s >> mask.name >> mask.value >> mask.values;
+ s >> tqmask.name >> tqmask.value >> tqmask.values;
return s;
}
-QDataStream &Pic::operator <<(QDataStream &s, const Config::Word &word)
+TQDataStream &Pic::operator <<(TQDataStream &s, const Config::Word &word)
{
- s << word.name << word.ignoredCNames << word.wmask << word.pmask << word.cmask << word.bvalue << word.masks;
+ s << word.name << word.ignoredCNames << word.wtqmask << word.ptqmask << word.ctqmask << word.bvalue << word.tqmasks;
return s;
}
-QDataStream &Pic::operator >>(QDataStream &s, Config::Word &word)
+TQDataStream &Pic::operator >>(TQDataStream &s, Config::Word &word)
{
- s >> word.name >> word.ignoredCNames >> word.wmask >> word.pmask >> word.cmask >> word.bvalue >> word.masks;
+ s >> word.name >> word.ignoredCNames >> word.wtqmask >> word.ptqmask >> word.ctqmask >> word.bvalue >> word.tqmasks;
return s;
}
-QDataStream &Pic::operator <<(QDataStream &s, const Config &config)
+TQDataStream &Pic::operator <<(TQDataStream &s, const Config &config)
{
s << config._words;
return s;
}
-QDataStream &Pic::operator >>(QDataStream &s, Config &config)
+TQDataStream &Pic::operator >>(TQDataStream &s, Config &config)
{
s >> config._words;
return s;