diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kspread/formula.h | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kspread/formula.h')
-rw-r--r-- | kspread/formula.h | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/kspread/formula.h b/kspread/formula.h index 2425e73d..8a1e2f03 100644 --- a/kspread/formula.h +++ b/kspread/formula.h @@ -20,8 +20,8 @@ #ifndef KSPREAD_FORMULA #define KSPREAD_FORMULA -#include <qstring.h> -#include <qvaluevector.h> +#include <tqstring.h> +#include <tqvaluevector.h> class KLocale; @@ -81,7 +81,7 @@ class Token /** * Creates a token. */ - Token( Type type = Unknown, const QString& text = QString::null, int pos = -1 ); + Token( Type type = Unknown, const TQString& text = TQString(), int pos = -1 ); static const Token null; @@ -100,7 +100,7 @@ class Token * text(), you might use asInteger(), asFloat(), asString(), sheetName(), * etc. */ - QString text() const { return m_text; } + TQString text() const { return m_text; } int pos() const { return m_pos; }; @@ -169,14 +169,14 @@ class Token /** * Returns string value for a string token. - * For any other type of token, it returns QString::null. + * For any other type of token, it returns TQString(). * * Note that token text for a string token still has leading and trailing * double-quotes, i.e for "KOffice", text() return "KOffice" * (with the quotes, 9 characters) while asString() only return KOffice * (without quotes, 7 characters). */ - QString asString() const; + TQString asString() const; /** * Returns operator value for an operator token. @@ -186,7 +186,7 @@ class Token /** * Returns sheet name in a cell reference token. - * For any other type of token, it returns QString::null. + * For any other type of token, it returns TQString(). * * If the cell reference doesn't specify sheet name, an empty string * is returned. As example, for "Sheet1!B3" , sheetName() returns @@ -196,18 +196,18 @@ class Token * in "'Sales Forecast'!F4", sheetName() returns the name * without the quotes, i.e "Sales Forecast" in this case. */ - QString sheetName() const; + TQString sheetName() const; /** * Returns a short description of the token. * Should be used only to assist debugging. */ - QString description() const; + TQString description() const; protected: Type m_type; - QString m_text; + TQString m_text; int m_pos; }; @@ -216,10 +216,10 @@ class Token * Class Tokens represents array of tokens. * */ -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; } protected: @@ -267,12 +267,12 @@ class Formula /** * Sets the expression for this formula. */ - void setExpression( const QString& expr ); + void setExpression( const TQString& expr ); /** * Gets the expression of this formula. */ - QString expression() const; + TQString expression() const; /** * Clears everything, makes as like a newly constructed formula. @@ -280,7 +280,7 @@ class Formula void clear(); /** - * Returns true if the specified expression is valid, i.e. it contains + * Returns true if the specified expression is valid, i.e. it tqcontains * no parsing error. * Empty formula (i.e. without expression) is always invalid. */ @@ -304,9 +304,9 @@ class Formula * If the expression contains error (e.g. unknown operator, string no terminated) * this function returns tokens which is not valid. */ - Tokens scan( const QString& expr, KLocale* locale = 0 ) const; + Tokens scan( const TQString& expr, KLocale* locale = 0 ) const; - QString dump() const; + TQString dump() const; protected: @@ -315,7 +315,7 @@ class Formula /** * helper function: return true for valid named area */ - bool isNamedArea( const QString& expr ) const; + bool isNamedArea( const TQString& expr ) const; private: class Private; @@ -328,19 +328,19 @@ class Formula /** * Dumps the formula, should be used only to assist debugging. */ -QTextStream& operator<<( QTextStream& ts, Formula formula ); +TQTextStream& operator<<( TQTextStream& ts, Formula formula ); /** * helper function: return operator of given token text * e.g. "*" yields Operator::Asterisk, and so on */ -Token::Op matchOperator( const QString& text ); +Token::Op matchOperator( const TQString& text ); /** * helper function: return true for valid identifier character */ -bool isIdentifier( QChar ch ); +bool isIdentifier( TQChar ch ); } // namespace KSpread |