-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVenusReadJsonPlugin.cpp
executable file
·48 lines (35 loc) · 1.51 KB
/
VenusReadJsonPlugin.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/***************************************************************************
Copyright 2013 HeartVista Inc. All rights reserved.
Contact: HeartVista, Inc. <[email protected]>
This file is part of the RTHawk system.
$HEARTVISTA_BEGIN_LICENSE$
THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF HEARTVISTA
The copyright notice above does not evidence any
actual or intended publication of such source code.
$HEARTVISTA_END_LICENSE$
***************************************************************************/
#include "VenusReadJsonPlugin.h"
#include "VenusReadJson.h"
QStringList VenusReadJsonPlugin::keys() const
{
QStringList list;
list << QLatin1String("venus");
list << QLatin1String("venus.readJson");
return list;
}
void VenusReadJsonPlugin::initialize( const QString &key, QScriptEngine *engine )
{
if (key == QLatin1String("venus")) {
} else if (key == QLatin1String("venus.readJson")) {
QScriptValue readJsonScriptConstructor = engine->newFunction(readJsonConstructor);
QScriptValue readJsonMeta = engine->newQMetaObject(&VenusReadJson::staticMetaObject, readJsonScriptConstructor);
engine->globalObject().setProperty("VenusReadJson", readJsonMeta);
// QScriptValue rthReadJsonClass = engine->scriptValueFromQMetaObject<VenusReadJson>();
// engine->globalObject().setProperty("VenusReadJson", rthReadJsonClass);
} else {
Q_ASSERT_X(false, "VenusReadJsonPlugin::initialize", qPrintable(key));
}
}
#if (QT_VERSION < 0x050000)
Q_EXPORT_PLUGIN(VenusReadJsonPlugin)
#endif