summaryrefslogtreecommitdiffstats
path: root/kommander/widget/expression.h
diff options
context:
space:
mode:
Diffstat (limited to 'kommander/widget/expression.h')
-rw-r--r--kommander/widget/expression.h46
1 files changed, 23 insertions, 23 deletions
diff --git a/kommander/widget/expression.h b/kommander/widget/expression.h
index 7ab163e2..2302ba46 100644
--- a/kommander/widget/expression.h
+++ b/kommander/widget/expression.h
@@ -17,59 +17,59 @@
#ifndef _HAVE_EXPRESSION_H_
#define _HAVE_EXPRESSION_H_
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qvariant.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqvariant.h>
class Expression
{
public:
Expression();
- Expression(const QString& expr);
+ Expression(const TQString& expr);
/* set string to parse */
- Expression& operator=(const QString& s);
+ Expression& operator=(const TQString& s);
/* calculate value */
- QVariant value(bool* valid = 0);
+ TQVariant value(bool* valid = 0);
/* equivalent of setString(s) and value(valid) */
- QVariant value(const QString& s, bool* valid = 0);
+ TQVariant value(const TQString& s, bool* valid = 0);
/* equivalent of setString(s) and checking if value(valid) is true */
- bool isTrue(const QString& s, bool* valid = 0);
+ bool isTrue(const TQString& s, bool* valid = 0);
private:
enum Type {TypeInt, TypeDouble, TypeString};
/* parsing function - top-down approach */
/* parse terminal (number or string) */
- QVariant parseNumber();
+ TQVariant parseNumber();
/* parse -x expression */
- QVariant parseMinus();
+ TQVariant parseMinus();
/* parse (x) expression */
- QVariant parseBracket();
+ TQVariant parseBracket();
/* parse x*y, x/y and x%y expressions */
- QVariant parseMultiply();
+ TQVariant parseMultiply();
/* parse x+y and x-y expressions */
- QVariant parseAdd();
+ TQVariant parseAdd();
/* parse !x and (equivalent) not x expressions */
- QVariant parseNot();
+ TQVariant parseNot();
/* parse x==y, x<=y, x>=y, x<y and x>y expressions */
- QVariant parseComparison();
+ TQVariant parseComparison();
/* parse x && y, (equivalent) x and y expressions */
- QVariant parseAnd();
+ TQVariant parseAnd();
/* parse x || y and (equivalent) x or y expressions */
- QVariant parseOr();
+ TQVariant parseOr();
/* starting point of parsing - just call first function above */
- QVariant parse();
+ TQVariant parse();
/* check if we still have next argument */
bool validate();
/* return next argument to parse or null if there is none */
- QString next() const;
+ TQString next() const;
/* set error position for future error reporting */
void setError(int pos = -1);
- /* compare various types of QVariant (strings, floats, ints */
- int compare(const QVariant v1, const QVariant v2) const;
+ /* compare various types of TQVariant (strings, floats, ints */
+ int compare(const TQVariant v1, const TQVariant v2) const;
/* return common type for binary operations */
- Type commonType(const QVariant v1, const QVariant v2) const;
+ Type commonType(const TQVariant v1, const TQVariant v2) const;
- QValueList<QVariant> m_parts;
+ TQValueList<TQVariant> m_parts;
uint m_start;
bool m_error;
uint m_errorPosition;