Showing the changes to libraries/script-engine/src/ScriptEngine.h (1 of 3 files). Show all
Unified · Split
| @@ -20,6 +20,7 @@ · 19 unmodified lines | ||
| 20 | 20 | #include <QtCore/QSet> |
| 21 | 21 | #include <QtCore/QWaitCondition> |
| 22 | 22 | #include <QtCore/QStringList> |
| 23 | +#include <QMetaEnum> | |
| 23 | 24 | |
| 24 | 25 | #include <QtScript/QScriptEngine> |
| 25 | 26 | |
| @@ -230,6 +231,15 @@ public: · 204 unmodified lines | ||
| 230 | 231 | Q_INVOKABLE void registerFunction(const QString& parent, const QString& name, QScriptEngine::FunctionSignature fun, |
| 231 | 232 | int numArguments = -1); |
| 232 | 233 | |
| 234 | + /**jsdoc | |
| 235 | + * @function Script.registerEnum | |
| 236 | + * @param {string} enumName - Name. | |
| 237 | + * @param {object} newEnum - Enumeration to be added | |
| 238 | + * @deprecated This function is deprecated and will be removed. | |
| 239 | + */ | |
| 240 | + /// registers a global enum | |
| 241 | + Q_INVOKABLE void registerEnum(const QString& enumName, QMetaEnum newEnum); | |
| 242 | + | |
| 233 | 243 | /**jsdoc |
| 234 | 244 | * @function Script.registerValue |
| 235 | 245 | * @param {string} name - Name. |