summaryrefslogtreecommitdiffstats
path: root/kommander/widget/parser.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
commitdc6b8e72fed2586239e3514819238c520636c9d9 (patch)
tree88b200df0a0b7fab9d6f147596173556f1ed9a13 /kommander/widget/parser.h
parent6927d4436e54551917f600b706a8d6109e49de1c (diff)
downloadtdewebdev-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 'kommander/widget/parser.h')
-rw-r--r--kommander/widget/parser.h56
1 files changed, 28 insertions, 28 deletions
diff --git a/kommander/widget/parser.h b/kommander/widget/parser.h
index 6dc66258..3ad7d59c 100644
--- a/kommander/widget/parser.h
+++ b/kommander/widget/parser.h
@@ -20,9 +20,9 @@
#include "kommander_export.h"
#include "parsenode.h"
-#include <qvaluevector.h>
-#include <qstringlist.h>
-#include <qmap.h>
+#include <tqvaluevector.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
class KommanderWidget;
class ParserData;
@@ -31,43 +31,43 @@ class Parser
{
public:
Parser(ParserData* data);
- Parser(ParserData* data, const QString& expr);
+ Parser(ParserData* data, const TQString& expr);
// set string to parse
- bool setString(const QString& s);
+ bool setString(const TQString& s);
// set Kommander widget associated with parser
void setWidget(KommanderWidget* w);
// parse generic expression
- QString expression(Parse::Mode mode = Parse::Execute);
+ TQString expression(Parse::Mode mode = Parse::Execute);
// execute single command; return true if ok
bool command(Parse::Mode mode = Parse::Execute);
// special class method to execute single parser function without creating parser object
- static QString function(ParserData* data, const QString& name, const QStringList& params);
+ static TQString function(ParserData* data, const TQString& name, const TQStringList& params);
// execute whole block; return true if ok
bool parse(Parse::Mode mode = Parse::Execute);
// return line of errorneous node
int errorLine() const;
// return error message
- QString errorMessage() const;
+ TQString errorMessage() const;
// check if this is a name of standard variable
- bool isVariable(const QString& name) const;
+ bool isVariable(const TQString& name) const;
// set variable value
- void setVariable(const QString& name, ParseNode value);
+ void setVariable(const TQString& name, ParseNode value);
// unset variable
- void unsetVariable(const QString& key);
+ void unsetVariable(const TQString& key);
// get variable value
- ParseNode variable(const QString& name) const;
+ ParseNode variable(const TQString& name) const;
// access associative array
- const QMap<QString, ParseNode>& array(const QString& name) const;
+ const TQMap<TQString, ParseNode>& array(const TQString& name) const;
// check if this is a name of an array
- bool isArray(const QString& name) const;
+ bool isArray(const TQString& name) const;
// set array key
- void setArray(const QString& name, const QString& key, ParseNode value);
+ void setArray(const TQString& name, const TQString& key, ParseNode value);
// unset array key or whole array
- void unsetArray(const QString& name, const QString& key = QString::null);
+ void unsetArray(const TQString& name, const TQString& key = TQString::null);
// array value
- ParseNode arrayValue(const QString& name, const QString& key) const;
+ ParseNode arrayValue(const TQString& name, const TQString& key) const;
// get associated widget
KommanderWidget* currentWidget() const;
@@ -110,7 +110,7 @@ private:
// parse parameters
ParseNode parseFunction(Parse::Mode mode = Parse::Execute);
// parse widget function
- ParseNode parseWidget(Parse::Mode mode = Parse::Execute, const QString &widgetName = QString::null);
+ ParseNode parseWidget(Parse::Mode mode = Parse::Execute, const TQString &widgetName = TQString::null);
// parse assignment
ParseNode parseAssignment(Parse::Mode mode = Parse::Execute);
@@ -139,9 +139,9 @@ private:
bool tryVariable(Parse::Mode mode = Parse::Execute);
// get the name of the next node treated as variable
- QString nextVariable(Parse::Mode mode = Parse::Execute);
+ TQString nextVariable(Parse::Mode mode = Parse::Execute);
// check whether variable/array name is global (preceded with _)
- bool isGlobal(const QString& name) const;
+ bool isGlobal(const TQString& name) const;
// check if next item is a function
bool isFunction() const;
// check if next item is a widget
@@ -150,8 +150,8 @@ private:
// reset to default state
void reset();
// set error state if no error was set before; err is expected symbol that wasn't found
- void setError(const QString& msg);
- void setError(const QString& msg, int pos);
+ void setError(const TQString& msg);
+ void setError(const TQString& msg, int pos);
// check whether parsing was successful
bool isError() const;
@@ -160,21 +160,21 @@ private:
// current parsing position
uint m_start;
// current error message
- QString m_error;
+ TQString m_error;
// in case of error, this keeps position of first error
uint m_errorPosition;
// parsing nodes
- QValueVector<ParseNode> m_parts;
+ TQValueVector<ParseNode> m_parts;
// variables
- QMap<QString, ParseNode> m_variables;
+ TQMap<TQString, ParseNode> m_variables;
// arrays
- QMap<QString, QMap<QString, ParseNode> > m_arrays;
+ TQMap<TQString, TQMap<TQString, ParseNode> > m_arrays;
// Kommander
KommanderWidget* m_widget;
// global variables
- static QMap<QString, ParseNode> m_globalVariables;
+ static TQMap<TQString, ParseNode> m_globalVariables;
// global arrays
- static QMap<QString, QMap<QString, ParseNode> > m_globalArrays;
+ static TQMap<TQString, TQMap<TQString, ParseNode> > m_globalArrays;
};
#endif