diff options
Diffstat (limited to 'quanta/parsers/qtag.cpp')
-rw-r--r-- | quanta/parsers/qtag.cpp | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/quanta/parsers/qtag.cpp b/quanta/parsers/qtag.cpp index 46b5b411..d31f91b8 100644 --- a/quanta/parsers/qtag.cpp +++ b/quanta/parsers/qtag.cpp @@ -18,22 +18,22 @@ #include "tag.h" #include <kdebug.h> -QTag::QTag() +TQTag::TQTag() { attrs.setAutoDelete(true); single = false; optional = false; type = "xmltag"; - parentDTD = 0L; + tqparentDTD = 0L; } -QTag::QTag( QTag &t) +TQTag::TQTag( TQTag &t) { tagName = t.tagName; single = t.single; optional = t.optional; m_fileName = t.m_fileName; - parentDTD = t.parentDTD; + tqparentDTD = t.tqparentDTD; type = t.type; returnType = t.returnType; comment = t.comment; @@ -48,12 +48,12 @@ QTag::QTag( QTag &t) } } -QTag::~QTag() +TQTag::~TQTag() { } /** Add an attribute to the tag. */ -void QTag::addAttribute(Attribute* attr) +void TQTag::addAttribute(Attribute* attr) { if (attr) { @@ -79,24 +79,24 @@ void QTag::addAttribute(Attribute* attr) } } /** Returns the number of attributes for the tag. */ -int QTag::attributeCount() +int TQTag::attributeCount() { return attrs.count(); } /** Returns the attribute at index. */ -Attribute* QTag::attributeAt(int index) +Attribute* TQTag::attributeAt(int index) { return attrs.at(index); } /** Returns true if the attribute exists */ -bool QTag::isAttribute(const TQString &attrName) +bool TQTag::isAttribute(const TQString &attrName) { Attribute *a; int i; AttributeList *groupAttrs; - //Check in the QTag specific attributes + //Check in the TQTag specific attributes for(a = attrs.first(); a; a = attrs.next()) { if(a->name == attrName) @@ -105,7 +105,7 @@ bool QTag::isAttribute(const TQString &attrName) //Check in the common attributes for(i = 0; i < (signed)commonGroups.count(); i++) { - groupAttrs = parentDTD->commonAttrs->find(commonGroups[i]); + groupAttrs = tqparentDTD->commonAttrs->tqfind(commonGroups[i]); if(groupAttrs) { for(a = groupAttrs->first(); a; a = groupAttrs->next()) @@ -119,57 +119,57 @@ bool QTag::isAttribute(const TQString &attrName) } /** No descriptions */ -void QTag::setSingle(bool isSingle) +void TQTag::setSingle(bool isSingle) { single = isSingle; } /** No descriptions */ -void QTag::setOptional(bool isOptional) +void TQTag::setOptional(bool isOptional) { optional = isOptional; } /** No descriptions */ -void QTag::setName(const TQString& theName) +void TQTag::setName(const TQString& theName) { tagName = theName; } /** No descriptions */ -TQString QTag::name(bool doNotConvert) +TQString TQTag::name(bool doNotConvert) { - if (doNotConvert || !parentDTD || parentDTD->caseSensitive) + if (doNotConvert || !tqparentDTD || tqparentDTD->caseSensitive) return tagName; else return tagName.upper(); } /** No descriptions */ -bool QTag::isSingle() +bool TQTag::isSingle() { return single; } /** No descriptions */ -bool QTag::isOptional() +bool TQTag::isOptional() { return optional; } /** No descriptions */ -void QTag::setFileName(const TQString& fileName) +void TQTag::setFileName(const TQString& fileName) { m_fileName = fileName; } /** No descriptions */ -TQString QTag::fileName() +TQString TQTag::fileName() { return m_fileName; } -QTag QTag::operator = (QTag &t) +TQTag TQTag::operator = (TQTag &t) { tagName = t.tagName; single = t.single; optional = t.optional; m_fileName = t.m_fileName; - parentDTD = t.parentDTD; + tqparentDTD = t.tqparentDTD; type = t.type; returnType = t.returnType; comment = t.comment; @@ -186,7 +186,7 @@ QTag QTag::operator = (QTag &t) } /** Returns the attribute with name, or 0 if the tag does not have any attribute with name. */ -Attribute* QTag::attribute(const TQString& name) +Attribute* TQTag::attribute(const TQString& name) { Attribute *attr = 0L; for (uint i = 0; i < attrs.count(); i++) @@ -201,17 +201,17 @@ Attribute* QTag::attribute(const TQString& name) return attr; } -bool QTag::isChild(const TQString& tag, bool trueIfNoChildsDefined) +bool TQTag::isChild(const TQString& tag, bool trueIfNoChildsDefined) { TQString tagName = tag; - tagName = parentDTD->caseSensitive ? tagName : tagName.upper(); + tagName = tqparentDTD->caseSensitive ? tagName : tagName.upper(); if(trueIfNoChildsDefined) - return (childTags.isEmpty() || childTags.contains(tagName)); + return (childTags.isEmpty() || childTags.tqcontains(tagName)); else - return (!childTags.isEmpty() && childTags.contains(tagName)); + return (!childTags.isEmpty() && childTags.tqcontains(tagName)); } -bool QTag::isChild(Node *node, bool trueIfNoChildsDefined, bool treatEmptyNodesAsText) +bool TQTag::isChild(Node *node, bool trueIfNoChildsDefined, bool treatEmptyNodesAsText) { TQString nodeName; @@ -220,18 +220,18 @@ bool QTag::isChild(Node *node, bool trueIfNoChildsDefined, bool treatEmptyNodesA else if(node->tag->type == Tag::Text) { if(trueIfNoChildsDefined) - return(childTags.isEmpty() || childTags.contains("#text") || childTags.contains("#TEXT")); + return(childTags.isEmpty() || childTags.tqcontains("#text") || childTags.tqcontains("#TEXT")); else - return(!childTags.isEmpty() && (childTags.contains("#text") || childTags.contains("#TEXT"))); + return(!childTags.isEmpty() && (childTags.tqcontains("#text") || childTags.tqcontains("#TEXT"))); } else if(node->tag->type == Tag::Empty && !treatEmptyNodesAsText) return true; else if(node->tag->type == Tag::Empty && treatEmptyNodesAsText) { if(trueIfNoChildsDefined) - return(childTags.isEmpty() || childTags.contains("#text") || childTags.contains("#TEXT")); + return(childTags.isEmpty() || childTags.tqcontains("#text") || childTags.tqcontains("#TEXT")); else - return(!childTags.isEmpty() && (childTags.contains("#text") || childTags.contains("#TEXT"))); + return(!childTags.isEmpty() && (childTags.tqcontains("#text") || childTags.tqcontains("#TEXT"))); } else if(node->tag->type == Tag::XmlTagEnd) { @@ -247,10 +247,10 @@ bool QTag::isChild(Node *node, bool trueIfNoChildsDefined, bool treatEmptyNodesA return isChild(node->tag->name, trueIfNoChildsDefined); } -TQPtrList<QTag> QTag::parents() +TQPtrList<TQTag> TQTag::tqparents() { - TQPtrList<QTag> qTagList; - TQDictIterator<QTag> it((*parentDTD->tagsList)); + TQPtrList<TQTag> qTagList; + TQDictIterator<TQTag> it((*tqparentDTD->tagsList)); for(; it.current(); ++it) { if(it.current()->isChild(name())) |