From f4f8ac034fa04404e2fcd5029ba050c537c07d7a Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 9 May 2011 19:45:27 +0000 Subject: 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 --- src/evaluator.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/evaluator.h') 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 -#include +#include +#include #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 +class Tokens: public TQValueVector { public: - Tokens(): QValueVector(), m_valid(true) {}; + Tokens(): TQValueVector(), 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& ); -- cgit v1.2.1