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/node.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/node.h')
-rw-r--r-- | src/node.h | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -19,7 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include <qstring.h> +#include <tqstring.h> #include "numerictypes.h" @@ -31,7 +31,7 @@ typedef SharedPtr<Node> NodePtr; /** * A class that operates on a Node. Called recursively on a node and all - * of its children. + * of its tqchildren. */ class NodeFunctor { @@ -50,11 +50,11 @@ class Node // typically read-only. virtual void deleteNode(Node *node); - // Calls functor() on all subchildren and this. + // Calls functor() on all subtqchildren and this. virtual void applyMap(NodeFunctor &fn) const = 0; // Returns an infix representation of the expression. - virtual QString infixString() const = 0; + virtual TQString infixString() const = 0; // Returns the derivative of the node. virtual Abakus::number_t derivative() const = 0; @@ -65,11 +65,11 @@ class BaseFunction : public Node public: BaseFunction(const char *name); - virtual QString name() const { return m_name; } + virtual TQString name() const { return m_name; } virtual const Function *function() const; private: - QString m_name; + TQString m_name; const Function *m_function; }; @@ -83,7 +83,7 @@ class UnaryFunction : public BaseFunction virtual void setOperand(Node *operand); virtual void applyMap(NodeFunctor &fn) const; - virtual QString infixString() const; + virtual TQString infixString() const; private: Node *m_node; @@ -102,7 +102,7 @@ class DerivativeFunction : public Node virtual void applyMap(NodeFunctor &fn) const; // Returns an infix representation of the expression. - virtual QString infixString() const; + virtual TQString infixString() const; virtual Abakus::number_t derivative() const; @@ -138,7 +138,7 @@ class UnaryOperator : public Node virtual ~UnaryOperator(); virtual void applyMap(NodeFunctor &fn) const; - virtual QString infixString() const; + virtual TQString infixString() const; virtual Abakus::number_t value() const; virtual Abakus::number_t derivative() const; @@ -160,7 +160,7 @@ class BinaryOperator : public Node virtual ~BinaryOperator(); virtual void applyMap(NodeFunctor &fn) const; - virtual QString infixString() const; + virtual TQString infixString() const; virtual Abakus::number_t value() const; virtual Abakus::number_t derivative() const; @@ -182,7 +182,7 @@ class Identifier : public Node Identifier(const char *name); virtual void applyMap(NodeFunctor &fn) const; - virtual QString infixString() const { return name(); } + virtual TQString infixString() const { return name(); } virtual Abakus::number_t value() const; virtual Abakus::number_t derivative() const @@ -193,10 +193,10 @@ class Identifier : public Node return "0"; } - virtual QString name() const { return m_name; } + virtual TQString name() const { return m_name; } private: - QString m_name; + TQString m_name; }; class NumericValue : public Node @@ -205,7 +205,7 @@ class NumericValue : public Node NumericValue(const Abakus::number_t value) : m_value(value) { } virtual void applyMap(NodeFunctor &fn) const { fn(this); } - virtual QString infixString() const; + virtual TQString infixString() const; virtual Abakus::number_t value() const { return m_value; } virtual Abakus::number_t derivative() const { return "0"; } |