summaryrefslogtreecommitdiffstats
path: root/src/function.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-09 19:45:27 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-09 19:45:27 +0000
commitf4f8ac034fa04404e2fcd5029ba050c537c07d7a (patch)
tree0daa81b0533ce203c33d5571dcb842257dba4cd0 /src/function.h
parent4488b6112c4e22493ed88c68035b980a5b42228d (diff)
downloadabakus-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/function.h')
-rw-r--r--src/function.h45
1 files changed, 23 insertions, 22 deletions
diff --git a/src/function.h b/src/function.h
index ab66637..2bf7b2d 100644
--- a/src/function.h
+++ b/src/function.h
@@ -21,11 +21,11 @@
#include "numerictypes.h"
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qstring.h>
-#include <qmap.h>
-#include <qdict.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
+#include <tqmap.h>
+#include <tqdict.h>
@@ -35,15 +35,15 @@ struct UserFunction
{
int sequenceNumber;
BaseFunction *fn;
- QString varName;
+ TQString varName;
};
// Ugly pointer-to-member typedef ahead
typedef Abakus::number_t (Abakus::number_t::*function_t)() const;
struct Function {
- QString name;
- QString description;
+ TQString name;
+ TQString description;
// A function is either builtin or user defined, this union is
// used for both cases.
@@ -61,33 +61,34 @@ struct Function {
void setTrigMode(Abakus::TrigMode mode);
Abakus::TrigMode trigMode();
-class FunctionManager : public QObject
+class FunctionManager : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- typedef QDict<Function> functionDict;
+ typedef TQDict<Function> functionDict;
static FunctionManager *instance();
- Function *function(const QString &name);
+ Function *function(const TQString &name);
- bool isFunction(const QString &name);
- bool isFunctionUserDefined(const QString &name);
+ bool isFunction(const TQString &name);
+ bool isFunctionUserDefined(const TQString &name);
- bool addFunction(BaseFunction *fn, const QString &dependantVar);
- bool addFunction(const QString &name, function_t fn, const QString &desc);
- void removeFunction(const QString &name);
+ bool addFunction(BaseFunction *fn, const TQString &dependantVar);
+ bool addFunction(const TQString &name, function_t fn, const TQString &desc);
+ void removeFunction(const TQString &name);
typedef enum { Builtin, UserDefined, All } FunctionType;
- QStringList functionList(FunctionType type);
+ TQStringList functionList(FunctionType type);
signals:
- void signalFunctionAdded(const QString &name);
- void signalFunctionRemoved(const QString &name);
+ void signalFunctionAdded(const TQString &name);
+ void signalFunctionRemoved(const TQString &name);
private:
- FunctionManager(QObject *parent = 0, const char *name = "function manager");
+ FunctionManager(TQObject *tqparent = 0, const char *name = "function manager");
static FunctionManager *m_manager;
functionDict m_dict;
@@ -102,7 +103,7 @@ Abakus::number_t parseString(const char *str);
class Lexer
{
public:
- Lexer(const QString &expr);
+ Lexer(const TQString &expr);
~Lexer();
bool hasNext() const;
@@ -112,7 +113,7 @@ public:
// Can call this after nextType to find the associated string value of the
// token.
- QString tokenValue() const;
+ TQString tokenValue() const;
private:
class Private;