From 41c30cdf376730a68fcda69b57b1139f143a5543 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Wed, 26 Dec 2018 19:53:20 +0100 Subject: Fix indentation and code-style. --- src/luascript.h | 66 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'src/luascript.h') diff --git a/src/luascript.h b/src/luascript.h index 93478df..c7ea9b7 100644 --- a/src/luascript.h +++ b/src/luascript.h @@ -25,8 +25,7 @@ * along with Pracro; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef __PRACRO_LUASCRIPT_H__ -#define __PRACRO_LUASCRIPT_H__ +#pragma once #include #include @@ -40,54 +39,55 @@ #include -class LUAScript : public QThread { -Q_OBJECT +class LUAScript + : public QThread +{ + Q_OBJECT public: - class Exception { - public: - Exception(std::string m) : msg(m) {} - std::string msg; - }; + class Exception + { + public: + Exception(std::string m) : msg(m) {} + std::string msg; + }; - LUAScript(OutputWindow *out, QString file); - ~LUAScript(); + LUAScript(OutputWindow *out, QString file); + ~LUAScript(); - void init() throw(Exception); - void cleanup(); + void init(); + void cleanup(); - void run(); - void runScript() throw(Exception); + void run(); + void runScript(); - OutputWindow *out; + OutputWindow *out; - void lineChange(int lineno); + void lineChange(int lineno); - void playSound(QString file); + void playSound(QString file); + void sleep(int n); - volatile bool lua_stop; - volatile bool lua_stopped; - QString file; + volatile bool lua_stop; + volatile bool lua_stopped; + QString file; public slots: - void stopScript(); + void stopScript(); signals: - void reset(); - void lineChanged(int lineno); + void reset(); + void lineChanged(int lineno); protected: - lua_State *L; + lua_State *L; private: - std::vector > scripts; - std::map values; + std::vector > scripts; + std::map values; - int top; + int top; - bool running; + bool running; - SoundPlayer player; + SoundPlayer player; }; - - -#endif/*__PRACRO_LUASCRIPT_H__*/ -- cgit v1.2.3