diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:54:04 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:54:04 +0000 |
commit | dc6b8e72fed2586239e3514819238c520636c9d9 (patch) | |
tree | 88b200df0a0b7fab9d6f147596173556f1ed9a13 /quanta/parsers/tag.h | |
parent | 6927d4436e54551917f600b706a8d6109e49de1c (diff) | |
download | tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'quanta/parsers/tag.h')
-rw-r--r-- | quanta/parsers/tag.h | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/quanta/parsers/tag.h b/quanta/parsers/tag.h index de2c0a7b..43ed610a 100644 --- a/quanta/parsers/tag.h +++ b/quanta/parsers/tag.h @@ -16,9 +16,9 @@ #ifndef TAG_H #define TAG_H -#include <qstring.h> -#include <qdict.h> -#include <qvaluelist.h> +#include <tqstring.h> +#include <tqdict.h> +#include <tqvaluelist.h> class QDomElement; #include "qtag.h" @@ -39,11 +39,11 @@ struct TagAttr { TagAttr() {nameLine = nameCol = valueLine = valueCol = 0; quoted = true; special = false;} /** For Kafka copy/paste */ - void save(QDomElement& element) const; - bool load(QDomElement const& element); + void save(TQDomElement& element) const; + bool load(TQDomElement const& element); - QString name; //attr name - QString value; //attr value + TQString name; //attr name + TQString value; //attr value int nameLine, nameCol; //where the attr name begins int valueLine, valueCol;//where the attr value begins bool quoted; //quote or not the attribute @@ -73,17 +73,17 @@ public: Tag operator = ( const Tag& ); /** For Kafka copy/paste */ - void save(QDomElement& element) const; - bool load(QDomElement const& element); + void save(TQDomElement& element) const; + bool load(TQDomElement const& element); /** Parse the p_tagStr in p_write and build up the tag's attributes and values */ - void parse (const QString &p_tagStr, Document *p_write); + void parse (const TQString &p_tagStr, Document *p_write); /** Return the attribute at index*/ - QString attribute(int index); + TQString attribute(int index); /** Return the attribute value at index*/ - QString attributeValue(int index); + TQString attributeValue(int index); /** Return the value of attr*/ - QString attributeValue(const QString &attr, bool ignoreCase = false); + TQString attributeValue(const TQString &attr, bool ignoreCase = false); /** Add an attribute */ void addAttribute(TagAttr attr) {attrs.append(attr);} /** Get the attribute number index */ @@ -92,13 +92,13 @@ public: void deleteAttribute(uint index) {attrs.remove(attrs.at(index));} /** Insert a new Attribute, even if it already exists. Prefer using editAttribute. Return true if something was mdofied. */ - bool editAttribute(const QString& attrName, const QString& attrValue); + bool editAttribute(const TQString& attrName, const TQString& attrValue); /** Delete the attribute attrName */ - void deleteAttribute(const QString& attrName); + void deleteAttribute(const TQString& attrName); /** Returns the quotation status of the attribute */ bool isQuotedAttribute(int index) const {return attrs[index].quoted;} /** Check if this tag has the attr attribute defined */ - bool hasAttribute(const QString &attr, bool ignoreCase = false); + bool hasAttribute(const TQString &attr, bool ignoreCase = false); /** set the coordinates of a tag attribute */ void setAttributePosition(int index, int bLineName, int bColName, int bLineValue, int bColValue); /** Set the coordinates of tag inside the document */ @@ -116,9 +116,9 @@ public: /** Where the attr value at index begins in the document */ void attributeValuePos(int index, int &line, int &col); /** Set the internal string which is parsed */ - void setStr(const QString &p_tagStr); + void setStr(const TQString &p_tagStr); /** Get the tag in string format */ - QString tagStr() const {return m_tagStr;}; + TQString tagStr() const {return m_tagStr;}; /** Get the document where the tag lies */ Document *write() {return m_write;} /** Set the document where the tag lies */ @@ -128,14 +128,14 @@ public: /** Returns the index of attributevalue at (line,col). */ int valueIndexAtPos(int line, int col); /** Return the index of attr. */ - int attributeIndex(const QString &attr); + int attributeIndex(const TQString &attr); void namePos(int &line, int &col); int attrCount() const {return attrs.count();} /** modify the attributes of tag according to the attrDict*/ - void modifyAttributes(QDict<QString> *attrDict); + void modifyAttributes(TQDict<TQString> *attrDict); /** returns the tag as a string */ - QString toString(); + TQString toString(); /** returns true if the tag is a closing tag (name or namespace starts with "/") */ bool isClosingTag(); /** Sets the special flag of attribute at index*/ @@ -163,13 +163,13 @@ public: //TODO: write setting/retrieving methods for the below attributes, and add //them the m_ prefix - QString name; - QString nameSpace; - QString cleanStr; + TQString name; + TQString nameSpace; + TQString cleanStr; int type; //one of the TokenType bool single; // tags like <tag /> bool closingMissing; //closing tag is optional and missing - QString structBeginStr; //if it's a special block, contains the block beginning definition string (like <? or <style language="foo">) + TQString structBeginStr; //if it's a special block, contains the block beginning definition string (like <? or <style language="foo">) bool validXMLTag; //false if the closing ">" was not found bool cleanStrBuilt() {return m_cleanStrBuilt;} @@ -196,15 +196,15 @@ private: void init(); /** Verifies if the last char from @param str is inside a script area or not */ - bool isInsideScript(const QString& str); + bool isInsideScript(const TQString& str); AreaStruct m_area; //where the tag is in the doc int m_nameLine;//where the tag name begins int m_nameCol; const DTDStruct* m_dtd; //the tag belongs to this DTD - QValueList<TagAttr> attrs; //attributes in a tag - QString m_tagStr; //the tag in string format (as it is in the document) + TQValueList<TagAttr> attrs; //attributes in a tag + TQString m_tagStr; //the tag in string format (as it is in the document) Document *m_write; //the document }; |