2018-04-29 18:59:41 +02:00
|
|
|
// Created via CMake from template jsdefs.h.in
|
2017-03-14 23:24:10 +01:00
|
|
|
// WARNING! Any changes to this file will be overwritten by the next CMake run!
|
|
|
|
|
|
|
|
#ifndef TAGEDITOR_JAVA_SCRIPT_DEFINES
|
|
|
|
#define TAGEDITOR_JAVA_SCRIPT_DEFINES
|
2016-01-09 02:56:56 +01:00
|
|
|
|
|
|
|
#include <QtGlobal>
|
|
|
|
|
2016-04-21 23:55:22 +02:00
|
|
|
#if defined(TAGEDITOR_USE_JSENGINE)
|
2016-01-09 02:56:56 +01:00
|
|
|
# define TAGEDITOR_JS_ENGINE QJSEngine
|
|
|
|
# define TAGEDITOR_JS_VALUE QJSValue
|
|
|
|
# define TAGEDITOR_JS_READONLY
|
|
|
|
# define TAGEDITOR_JS_UNDELETABLE
|
|
|
|
# define TAGEDITOR_JS_QOBJECT(engine, obj) engine.newQObject(obj)
|
|
|
|
# define TAGEDITOR_JS_INT(value) value.toInt()
|
|
|
|
# define TAGEDITOR_JS_IS_VALID_PROG(program) (!program.isError() && program.isCallable())
|
2016-04-21 23:55:22 +02:00
|
|
|
#elif defined(TAGEDITOR_USE_SCRIPT)
|
2016-01-09 02:56:56 +01:00
|
|
|
# define TAGEDITOR_JS_ENGINE QScriptEngine
|
|
|
|
# define TAGEDITOR_JS_VALUE QScriptValue
|
|
|
|
# define TAGEDITOR_JS_READONLY ,QScriptValue::ReadOnly
|
|
|
|
# define TAGEDITOR_JS_UNDELETABLE ,QScriptValue::Undeletable
|
|
|
|
# define TAGEDITOR_JS_QOBJECT(engine, obj) engine.newQObject(obj, QScriptEngine::ScriptOwnership)
|
|
|
|
# define TAGEDITOR_JS_INT(value) value.toInt32()
|
|
|
|
# define TAGEDITOR_JS_IS_VALID_PROG(program) (!program.isError() && program.isFunction())
|
2018-04-29 18:59:41 +02:00
|
|
|
#elif !defined(TAGEDITOR_NO_JSENGINE)
|
2017-03-14 23:24:10 +01:00
|
|
|
# error "No definition for JavaScript provider present."
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef TAGEDITOR_JS_ENGINE
|
|
|
|
QT_FORWARD_DECLARE_CLASS(TAGEDITOR_JS_ENGINE)
|
|
|
|
#endif
|
|
|
|
#ifdef TAGEDITOR_JS_VALUE
|
|
|
|
QT_FORWARD_DECLARE_CLASS(TAGEDITOR_JS_VALUE)
|
2016-01-09 02:56:56 +01:00
|
|
|
#endif
|
|
|
|
|
2017-03-14 23:24:10 +01:00
|
|
|
#endif // TAGEDITOR_JAVA_SCRIPT_DEFINES
|