From d6f8bbb45b267065a6907e71ff9c98bb6d161241 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:56:07 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- lib/util/domutil.h | 82 +++++++++++++++++++++++++++--------------------------- 1 file changed, 41 insertions(+), 41 deletions(-) (limited to 'lib/util/domutil.h') diff --git a/lib/util/domutil.h b/lib/util/domutil.h index a301ef00..08d2571a 100644 --- a/lib/util/domutil.h +++ b/lib/util/domutil.h @@ -13,11 +13,11 @@ #ifndef _DOMUTIL_H_ #define _DOMUTIL_H_ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include /** @file domutil.h @@ -26,18 +26,18 @@ Utility functions to operate on %DOM. struct DomAttribute { - QString name; - QString value; + TQString name; + TQString value; }; struct DomPathElement { - QString tagName; - QValueList attribute; + TQString tagName; + TQValueList attribute; int matchNumber; // for use when more than one element matches the path }; -typedef QValueList DomPath; +typedef TQValueList DomPath; /** * Utility class for conveniently accessing data in a %DOM tree. @@ -45,52 +45,52 @@ typedef QValueList DomPath; class DomUtil { public: - typedef QPair Pair; - typedef QValueList PairList; + typedef QPair Pair; + typedef TQValueList PairList; /** * Remove all child elements from a given element. */ - static void makeEmpty( QDomElement& ); + static void makeEmpty( TQDomElement& ); /** * Reads a string entry. */ - static QString readEntry(const QDomDocument &doc, const QString &path, const QString &defaultEntry = QString::null); + static TQString readEntry(const TQDomDocument &doc, const TQString &path, const TQString &defaultEntry = TQString::null); /** * Reads a number entry. */ - static int readIntEntry(const QDomDocument &doc, const QString &path, int defaultEntry = 0); + static int readIntEntry(const TQDomDocument &doc, const TQString &path, int defaultEntry = 0); /** * Reads a boolean entry. The strings "true" and "TRUE" are interpreted * as true, all other as false. */ - static bool readBoolEntry(const QDomDocument &doc, const QString &path, bool defaultEntry = false); + static bool readBoolEntry(const TQDomDocument &doc, const TQString &path, bool defaultEntry = false); /** * Reads a list entry. See writeListEntry(). */ - static QStringList readListEntry(const QDomDocument &doc, const QString &path, const QString &tag); + static TQStringList readListEntry(const TQDomDocument &doc, const TQString &path, const TQString &tag); /** * Reads a list of string pairs. See writePairListEntry(). */ - static PairList readPairListEntry(const QDomDocument &doc, const QString &path, const QString &tag, - const QString &firstAttr, const QString &secondAttr); + static PairList readPairListEntry(const TQDomDocument &doc, const TQString &path, const TQString &tag, + const TQString &firstAttr, const TQString &secondAttr); /** * Reads a string to string map. See writeMapEntry() */ - static QMap readMapEntry(const QDomDocument &doc, const QString &path); + static TQMap readMapEntry(const TQDomDocument &doc, const TQString &path); /** * Retrieves an element by path, return null if any item along * the path does not exist. */ - static QDomElement elementByPath( const QDomDocument& doc, const QString& path ); + static TQDomElement elementByPath( const TQDomDocument& doc, const TQString& path ); /** * Retrieves an element by path, creating the necessary nodes. */ - static QDomElement createElementByPath( QDomDocument& doc, const QString& path ); + static TQDomElement createElementByPath( TQDomDocument& doc, const TQString& path ); /** * Retrieves a child element, creating it if it does not exist. * The return value is guaranteed to be non isNull() */ - static QDomElement namedChildElement( QDomElement& el, const QString& name ); + static TQDomElement namedChildElement( TQDomElement& el, const TQString& name ); /** Writes a string entry. For example, \verbatim @@ -103,20 +103,20 @@ public: \endverbatim */ - static void writeEntry(QDomDocument &doc, const QString &path, const QString &value); + static void writeEntry(TQDomDocument &doc, const TQString &path, const TQString &value); /** * Writes a number entry. */ - static void writeIntEntry(QDomDocument &doc, const QString &path, int value); + static void writeIntEntry(TQDomDocument &doc, const TQString &path, int value); /** * Writes a boolean entry. Booleans are stored as "true", "false" resp. */ - static void writeBoolEntry(QDomDocument &doc, const QString &path, bool value); + static void writeBoolEntry(TQDomDocument &doc, const TQString &path, bool value); /** Writes a string list element. The list elements are separated by tag. For example, \verbatim - QStringList l; l << "one" << "two"; + TQStringList l; l << "one" << "two"; writeListEntry(doc, "/general/special", "el", l); \endverbatim creates the %DOM fragment: \verbatim @@ -125,8 +125,8 @@ public: \endverbatim */ - static void writeListEntry(QDomDocument &doc, const QString &path, const QString &tag, - const QStringList &value); + static void writeListEntry(TQDomDocument &doc, const TQString &path, const TQString &tag, + const TQStringList &value); /** Writes a list of string pairs. The list elements are stored in the attributes firstAttr and secondAttr of elements named tag. For example, @@ -146,14 +146,14 @@ public: \endverbatim */ - static void writePairListEntry(QDomDocument &doc, const QString &path, const QString &tag, - const QString &firstAttr, const QString &secondAttr, + static void writePairListEntry(TQDomDocument &doc, const TQString &path, const TQString &tag, + const TQString &firstAttr, const TQString &secondAttr, const PairList &value); /** * Writes a string to string map. This map is stored in a way, that it can be read with * readMapEntry() and readEntry() */ - static void writeMapEntry(QDomDocument &doc, const QString& path, const QMap &map); + static void writeMapEntry(TQDomDocument &doc, const TQString& path, const TQMap &map); /** * Resolves an extended path @@ -162,7 +162,7 @@ public: * where matchNumber is zero-based * path: pathpart[/pathpart/..] */ - static DomPath resolvPathStringExt(const QString pathstring); + static DomPath resolvPathStringExt(const TQString pathstring); /** Retrieve an element specified with extended path @@ -174,7 +174,7 @@ public: or "widget/property||2/string" . \verbatim - + KdevFormName @@ -192,35 +192,35 @@ public: \endverbatim */ - static QDomElement elementByPathExt(QDomDocument &doc, const QString &pathstring); + static TQDomElement elementByPathExt(TQDomDocument &doc, const TQString &pathstring); /** * Open file - filename - and set setContents of doc */ - static bool openDOMFile(QDomDocument &doc, QString filename); + static bool openDOMFile(TQDomDocument &doc, TQString filename); /** * Store contents of doc in file - filename. Existing file will be truncated! */ - static bool saveDOMFile(QDomDocument &doc, QString filename); + static bool saveDOMFile(TQDomDocument &doc, TQString filename); /** * Remove all child text nodes of parent described in pathExt */ - static bool removeTextNodes(QDomDocument doc,QString pathExt); + static bool removeTextNodes(TQDomDocument doc,TQString pathExt); /** * Add child text node to parent described in pathExt */ - static bool appendText(QDomDocument doc, QString pathExt, QString text); + static bool appendText(TQDomDocument doc, TQString pathExt, TQString text); /** * Replace all chilt text nodes of parent described in pathExt with one new. */ - static bool replaceText(QDomDocument doc, QString pathExt, QString text); + static bool replaceText(TQDomDocument doc, TQString pathExt, TQString text); private: - static QString readEntryAux(const QDomDocument &doc, const QString &path); + static TQString readEntryAux(const TQDomDocument &doc, const TQString &path); }; #endif -- cgit v1.2.1