summaryrefslogtreecommitdiffstats
path: root/kommander/widget/parser.h
diff options
context:
space:
mode:
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