This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-Qt/doric/engine/native_jse.h

24 lines
549 B
C
Raw Normal View History

2021-01-28 17:06:40 +08:00
#ifndef NATIVE_JSE_H
#define NATIVE_JSE_H
#include <QJSEngine>
#include "interface_jse.h"
class NativeJSE : public InterfaceJSE
{
private:
QJSEngine mJSEngine;
public:
NativeJSE();
QString loadJS(QString script, QString source) override;
void injectGlobalJSObject(QString name, QObject *object) override;
void injectGlobalJSFunction(QString name, QObject *function, QString property) override;
2021-02-02 20:42:37 +08:00
QJSValue invokeObject(QString objectName, QString functionName, QVariantList arguments) override;
2021-01-28 17:06:40 +08:00
};
#endif // NATIVE_JSE_H