diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:46:43 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:46:43 +0000 |
commit | ffe8a83e053396df448e9413828527613ca3bd46 (patch) | |
tree | a73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /kdecore/kmacroexpander.h | |
parent | 682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff) | |
download | tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.tar.gz tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdecore/kmacroexpander.h')
-rw-r--r-- | kdecore/kmacroexpander.h | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/kdecore/kmacroexpander.h b/kdecore/kmacroexpander.h index deb12e284..226264990 100644 --- a/kdecore/kmacroexpander.h +++ b/kdecore/kmacroexpander.h @@ -22,9 +22,9 @@ #ifndef _KMACROEXPANDER_H #define _KMACROEXPANDER_H -#include <qstringlist.h> -#include <qstring.h> -#include <qmap.h> +#include <tqstringlist.h> +#include <tqstring.h> +#include <tqmap.h> #include "kdelibs_export.h" /** @@ -39,9 +39,9 @@ class KDECORE_EXPORT KMacroExpanderBase { public: /** * Constructor. - * @param c escape char indicating start of macros, or QChar::null for none + * @param c escape char indicating start of macros, or TQChar::null for none */ - KMacroExpanderBase( QChar c = '%' ); + KMacroExpanderBase( TQChar c = '%' ); /** * Destructor. @@ -53,7 +53,7 @@ public: * * @param str the string in which macros are expanded in-place */ - void expandMacros( QString &str ); + void expandMacros( TQString &str ); /* * Perform safe macro expansion (substitution) on a string for use @@ -83,30 +83,30 @@ public: * or brace outside any shell construct is @em not an error (unlike in * the function below), but still prematurely terminates processing. */ - bool expandMacrosShellQuote( QString &str, uint &pos ); + bool expandMacrosShellQuote( TQString &str, uint &pos ); /** * Same as above, but always starts at position 0, and unmatched closing * parens and braces are treated as errors. */ - bool expandMacrosShellQuote( QString &str ); + bool expandMacrosShellQuote( TQString &str ); /** * Set the macro escape character. - * @param c escape char indicating start of macros, or QChar::null if none + * @param c escape char indicating start of macros, or TQChar::null if none */ - void setEscapeChar( QChar c ); + void setEscapeChar( TQChar c ); /** * Obtain the macro escape character. - * @return escape char indicating start of macros, or QChar::null if none + * @return escape char indicating start of macros, or TQChar::null if none */ - QChar escapeChar() const; + TQChar escapeChar() const; protected: /** * This function is called for every single char within the string if - * the escape char is QChar::null. It should determine whether the + * the escape char is TQChar::null. It should determine whether the * string starting at @p pos within @p str is a valid macro and return * the substitution value for it if so. * @param str the input string @@ -117,11 +117,11 @@ protected: * than zero, subtract this value from @p pos (to skip a macro, i.e., * substitute it with itself). zero requests no special action. */ - virtual int expandPlainMacro( const QString &str, uint pos, QStringList &ret ); + virtual int expandPlainMacro( const TQString &str, uint pos, TQStringList &ret ); /** * This function is called every time the escape char is found if it is - * not QChar::null. It should determine whether the + * not TQChar::null. It should determine whether the * string starting at @p pos witin @p str is a valid macro and return * the substitution value for it if so. * @param str the input string @@ -133,10 +133,10 @@ protected: * than zero, subtract this value from @p pos (to skip a macro, i.e., * substitute it with itself). zero requests no special action. */ - virtual int expandEscapedMacro( const QString &str, uint pos, QStringList &ret ); + virtual int expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret ); private: - QChar escapechar; + TQChar escapechar; }; /** @@ -150,7 +150,7 @@ private: * class MyClass { * ... * private: - * QString m_str; + * TQString m_str; * ... * friend class MyExpander; * }; @@ -159,12 +159,12 @@ private: * public: * MyExpander( MyClass *_that ) : KWordMacroExpander(), that( _that ) {} * protected: - * virtual bool expandMacro( const QString &str, QStringList &ret ); + * virtual bool expandMacro( const TQString &str, TQStringList &ret ); * private: * MyClass *that; * }; * - * bool MyExpander::expandMacro( const QString &str, QStringList &ret ) + * bool MyExpander::expandMacro( const TQString &str, TQStringList &ret ) * { * if (str == "macro") { * ret += complexOperation( that->m_str ); @@ -175,7 +175,7 @@ private: * * ... MyClass::...(...) * { - * QString str; + * TQString str; * ... * MyExpander mx( this ); * mx.expandMacrosShellQuote( str ); @@ -193,13 +193,13 @@ class KDECORE_EXPORT KWordMacroExpander : public KMacroExpanderBase { public: /** * Constructor. - * @param c escape char indicating start of macros, or QChar::null for none + * @param c escape char indicating start of macros, or TQChar::null for none */ - KWordMacroExpander( QChar c = '%' ) : KMacroExpanderBase( c ) {} + KWordMacroExpander( TQChar c = '%' ) : KMacroExpanderBase( c ) {} protected: - virtual int expandPlainMacro( const QString &str, uint pos, QStringList &ret ); - virtual int expandEscapedMacro( const QString &str, uint pos, QStringList &ret ); + virtual int expandPlainMacro( const TQString &str, uint pos, TQStringList &ret ); + virtual int expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret ); /** * Return substitution list @p ret for string macro @p str. @@ -208,7 +208,7 @@ protected: * when expandMacro is entered. * @return @c true iff @p chr was a recognized macro name */ - virtual bool expandMacro( const QString &str, QStringList &ret ) = 0; + virtual bool expandMacro( const TQString &str, TQStringList &ret ) = 0; }; /** @@ -226,13 +226,13 @@ class KDECORE_EXPORT KCharMacroExpander : public KMacroExpanderBase { public: /** * Constructor. - * @param c escape char indicating start of macros, or QChar::null for none + * @param c escape char indicating start of macros, or TQChar::null for none */ - KCharMacroExpander( QChar c = '%' ) : KMacroExpanderBase( c ) {} + KCharMacroExpander( TQChar c = '%' ) : KMacroExpanderBase( c ) {} protected: - virtual int expandPlainMacro( const QString &str, uint pos, QStringList &ret ); - virtual int expandEscapedMacro( const QString &str, uint pos, QStringList &ret ); + virtual int expandPlainMacro( const TQString &str, uint pos, TQStringList &ret ); + virtual int expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret ); /** * Return substitution list @p ret for single-character macro @p chr. @@ -241,7 +241,7 @@ protected: * when expandMacro is entered. * @return @c true iff @p chr was a recognized macro name */ - virtual bool expandMacro( QChar chr, QStringList &ret ) = 0; + virtual bool expandMacro( TQChar chr, TQStringList &ret ) = 0; }; /** @@ -257,20 +257,20 @@ namespace KMacroExpander { * * @param str The string to expand * @param map map with substitutions - * @param c escape char indicating start of macro, or QChar::null if none + * @param c escape char indicating start of macro, or TQChar::null if none * @return the string with all valid macros expanded * * \code * // Code example - * QMap<QChar,QString> map; + * TQMap<TQChar,TQString> map; * map.insert('u', "/tmp/myfile.txt"); * map.insert('n', "My File"); - * QString s = "%% Title: %u:%n"; + * TQString s = "%% Title: %u:%n"; * s = KMacroExpander::expandMacros(s, map); * // s is now "% Title: /tmp/myfile.txt:My File"; * \endcode */ - KDECORE_EXPORT QString expandMacros( const QString &str, const QMap<QChar,QString> &map, QChar c = '%' ); + KDECORE_EXPORT TQString expandMacros( const TQString &str, const TQMap<TQChar,TQString> &map, TQChar c = '%' ); /** * Perform safe macro expansion (substitution) on a string for use @@ -280,22 +280,22 @@ namespace KMacroExpander { * * @param str The string to expand * @param map map with substitutions - * @param c escape char indicating start of macro, or QChar::null if none + * @param c escape char indicating start of macro, or TQChar::null if none * @return the string with all valid macros expanded, or a null string * if a shell syntax error was detected in the command * * \code * // Code example - * QMap<QChar,QString> map; + * TQMap<TQChar,TQString> map; * map.insert('u', "/tmp/myfile.txt"); * map.insert('n', "My File"); - * QString s = "kedit --caption %n %u"; + * TQString s = "kedit --caption %n %u"; * s = KMacroExpander::expandMacrosShellQuote(s, map); * // s is now "kedit --caption 'My File' '/tmp/myfile.txt'"; - * system(QFile::encodeName(s)); + * system(TQFile::encodeName(s)); * \endcode */ - KDECORE_EXPORT QString expandMacrosShellQuote( const QString &str, const QMap<QChar,QString> &map, QChar c = '%' ); + KDECORE_EXPORT TQString expandMacrosShellQuote( const TQString &str, const TQMap<TQChar,TQString> &map, TQChar c = '%' ); /** * Perform safe macro expansion (substitution) on a string. @@ -307,20 +307,20 @@ namespace KMacroExpander { * * @param str The string to expand * @param map map with substitutions - * @param c escape char indicating start of macro, or QChar::null if none + * @param c escape char indicating start of macro, or TQChar::null if none * @return the string with all valid macros expanded * * \code * // Code example - * QMap<QString,QString> map; + * TQMap<TQString,TQString> map; * map.insert("url", "/tmp/myfile.txt"); * map.insert("name", "My File"); - * QString s = "Title: %{url}-%name"; + * TQString s = "Title: %{url}-%name"; * s = KMacroExpander::expandMacros(s, map); * // s is now "Title: /tmp/myfile.txt-My File"; * \endcode */ - KDECORE_EXPORT QString expandMacros( const QString &str, const QMap<QString,QString> &map, QChar c = '%' ); + KDECORE_EXPORT TQString expandMacros( const TQString &str, const TQMap<TQString,TQString> &map, TQChar c = '%' ); /** * Perform safe macro expansion (substitution) on a string for use @@ -333,33 +333,33 @@ namespace KMacroExpander { * * @param str The string to expand * @param map map with substitutions - * @param c escape char indicating start of macro, or QChar::null if none + * @param c escape char indicating start of macro, or TQChar::null if none * @return the string with all valid macros expanded, or a null string * if a shell syntax error was detected in the command * * \code * // Code example - * QMap<QString,QString> map; + * TQMap<TQString,TQString> map; * map.insert("url", "/tmp/myfile.txt"); * map.insert("name", "My File"); - * QString s = "kedit --caption %name %{url}"; + * TQString s = "kedit --caption %name %{url}"; * s = KMacroExpander::expandMacrosShellQuote(s, map); * // s is now "kedit --caption 'My File' '/tmp/myfile.txt'"; - * system(QFile::encodeName(s)); + * system(TQFile::encodeName(s)); * \endcode */ - KDECORE_EXPORT QString expandMacrosShellQuote( const QString &str, const QMap<QString,QString> &map, QChar c = '%' ); + KDECORE_EXPORT TQString expandMacrosShellQuote( const TQString &str, const TQMap<TQString,TQString> &map, TQChar c = '%' ); /** * Same as above, except that the macros expand to string lists that * are simply join(" ")ed together. */ - KDECORE_EXPORT QString expandMacros( const QString &str, const QMap<QChar,QStringList> &map, QChar c = '%' ); + KDECORE_EXPORT TQString expandMacros( const TQString &str, const TQMap<TQChar,TQStringList> &map, TQChar c = '%' ); /** * Same as above, except that the macros expand to string lists that * are simply join(" ")ed together. */ - KDECORE_EXPORT QString expandMacros( const QString &str, const QMap<QString,QStringList> &map, QChar c = '%' ); + KDECORE_EXPORT TQString expandMacros( const TQString &str, const TQMap<TQString,TQStringList> &map, TQChar c = '%' ); /** * Same as above, except that the macros expand to string lists. @@ -367,14 +367,14 @@ namespace KMacroExpander { * join(" ")ed together; otherwise every element expands to a separate * quoted string. */ - KDECORE_EXPORT QString expandMacrosShellQuote( const QString &str, const QMap<QChar,QStringList> &map, QChar c = '%' ); + KDECORE_EXPORT TQString expandMacrosShellQuote( const TQString &str, const TQMap<TQChar,TQStringList> &map, TQChar c = '%' ); /** * Same as above, except that the macros expand to string lists. * If the macro appears inside a quoted string, the list is simply * join(" ")ed together; otherwise every element expands to a separate * quoted string. */ - KDECORE_EXPORT QString expandMacrosShellQuote( const QString &str, const QMap<QString,QStringList> &map, QChar c = '%' ); + KDECORE_EXPORT TQString expandMacrosShellQuote( const TQString &str, const TQMap<TQString,TQStringList> &map, TQChar c = '%' ); } #endif /* _KMACROEXPANDER_H */ |