summaryrefslogtreecommitdiff
path: root/client/lua.h
diff options
context:
space:
mode:
authordeva <deva>2010-08-12 10:57:04 +0000
committerdeva <deva>2010-08-12 10:57:04 +0000
commitd9338083192084613e5530b02710b796252d342b (patch)
treee0ec2b36e0de62328e5fd5d3b597f6ee71d1b18f /client/lua.h
parentdbab8458dcce186e7eb7a114a83f759d7db5445a (diff)
New scripting system part2.
Diffstat (limited to 'client/lua.h')
-rw-r--r--client/lua.h18
1 files changed, 5 insertions, 13 deletions
diff --git a/client/lua.h b/client/lua.h
index d12bc6e..d10aeb2 100644
--- a/client/lua.h
+++ b/client/lua.h
@@ -31,24 +31,17 @@
#include <lauxlib.h>
#include <QString>
+#include <QVector>
-#include "widgets/widget.h"
-
-class MacroWindow;
-
+class Widget;
class LUA {
public:
- LUA(QVector< Widget *> *widgets, QVector< Widget *> *auxwidgets = NULL);
+ LUA(Widget **rootwidget);
~LUA();
- bool runValidator(QString program, Widget *widget, QString name, QString value);
QString runParser(QString program);
- QString getValue(QString name);
- void setValue(QString name, QString value);
- void enable(QString name);
- void disable(QString name);
- void setVisible(QString name, bool value);
+ bool runScript(QString script, Widget *widget, QString name = "");
void error(QString message);
@@ -56,8 +49,7 @@ public:
private:
lua_State *L;
- QVector< Widget *> *widgets;
- QVector< Widget *> *auxwidgets;
+ Widget **rootwidget;
};
#endif/*__PRACRO_LUA_H__*/