diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-09 19:45:27 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-09 19:45:27 +0000 |
commit | f4f8ac034fa04404e2fcd5029ba050c537c07d7a (patch) | |
tree | 0daa81b0533ce203c33d5571dcb842257dba4cd0 /src/evaluator.h | |
parent | 4488b6112c4e22493ed88c68035b980a5b42228d (diff) | |
download | abakus-f4f8ac034fa04404e2fcd5029ba050c537c07d7a.tar.gz abakus-f4f8ac034fa04404e2fcd5029ba050c537c07d7a.zip |
TQt4 port Abakus
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/abakus@1231045 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/evaluator.h')
-rw-r--r-- | src/evaluator.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/evaluator.h b/src/evaluator.h index 081ac14..2377f27 100644 --- a/src/evaluator.h +++ b/src/evaluator.h @@ -22,8 +22,8 @@ #ifndef ABAKUS_EVALUATOR_H #define ABAKUS_EVALUATOR_H -#include <qstring.h> -#include <qvaluevector.h> +#include <tqstring.h> +#include <tqvaluevector.h> #include "numerictypes.h" @@ -53,13 +53,13 @@ public: Equal // variable assignment } Op; - Token( Type type = Unknown, const QString& text = QString::null, int pos = -1 ); + Token( Type type = Unknown, const TQString& text = TQString(), int pos = -1 ); Token( const Token& ); Token& operator=( const Token& ); Type type() const { return m_type; } - QString text() const { return m_text; } + TQString text() const { return m_text; } int pos() const { return m_pos; }; bool isNumber() const { return m_type == Number; } @@ -69,21 +69,21 @@ public: Abakus::number_t asNumber() const; Op asOperator() const; - QString description() const; + TQString description() const; static const Token null; protected: Type m_type; - QString m_text; + TQString m_text; int m_pos; }; -class Tokens: public QValueVector<Token> +class Tokens: public TQValueVector<Token> { public: - Tokens(): QValueVector<Token>(), m_valid(true) {}; + Tokens(): TQValueVector<Token>(), m_valid(true) {}; bool valid() const { return m_valid; } void setValid( bool v ) { m_valid = v; } @@ -95,7 +95,7 @@ protected: class Variable { public: - QString name; + TQString name; Abakus::number_t value; }; @@ -105,20 +105,20 @@ public: Evaluator(); ~Evaluator(); - void setExpression( const QString& expr ); - QString expression() const; + void setExpression( const TQString& expr ); + TQString expression() const; void clear(); bool isValid() const; Tokens tokens() const; - static Tokens scan( const QString& expr ); + static Tokens scan( const TQString& expr ); - QString error() const; + TQString error() const; // Abakus::number_t eval(); - static QString autoFix( const QString& expr ); + static TQString autoFix( const TQString& expr ); private: Evaluator( const Evaluator& ); |