本文整理汇总了C++中QScriptEngine::defaultPrototype方法的典型用法代码示例。如果您正苦于以下问题:C++ QScriptEngine::defaultPrototype方法的具体用法?C++ QScriptEngine::defaultPrototype怎么用?C++ QScriptEngine::defaultPrototype使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QScriptEngine
的用法示例。
在下文中一共展示了QScriptEngine::defaultPrototype方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
void REcmaSharedPointerCircleEntity::init(QScriptEngine& engine, QScriptValue* proto
)
{
bool protoCreated = false;
if(proto == NULL){
proto = new QScriptValue(engine.newVariant(qVariantFromValue(
(RCircleEntityPointer*) 0)));
protoCreated = true;
}
// primary base class REntity:
proto->setPrototype(engine.defaultPrototype(
qMetaTypeId<REntityPointer>()));
/*
*/
QScriptValue fun;
// toString:
REcmaHelper::registerFunction(&engine, proto, toString, "toString");
// shared pointer support:
REcmaHelper::registerFunction(&engine, proto, data, "data");
REcmaHelper::registerFunction(&engine, proto, isNull, "isNull");
// destroy:
REcmaHelper::registerFunction(&engine, proto, destroy, "destroy");
// conversion for base class REntity
REcmaHelper::registerFunction(&engine, proto, getREntity, "getREntity");
// conversion for base class RObject
REcmaHelper::registerFunction(&engine, proto, getRObject, "getRObject");
// get class name
REcmaHelper::registerFunction(&engine, proto, getClassName, "getClassName");
// conversion to all base classes (multiple inheritance):
REcmaHelper::registerFunction(&engine, proto, getBaseClasses, "getBaseClasses");
// properties:
// methods:
REcmaHelper::registerFunction(&engine, proto, clone, "clone");
REcmaHelper::registerFunction(&engine, proto, getType, "getType");
REcmaHelper::registerFunction(&engine, proto, setProperty, "setProperty");
REcmaHelper::registerFunction(&engine, proto, getProperty, "getProperty");
REcmaHelper::registerFunction(&engine, proto, exportEntity, "exportEntity");
REcmaHelper::registerFunction(&engine, proto, getData, "getData");
REcmaHelper::registerFunction(&engine, proto, getCenter, "getCenter");
REcmaHelper::registerFunction(&engine, proto, getRadius, "getRadius");
REcmaHelper::registerFunction(&engine, proto, setRadius, "setRadius");
engine.setDefaultPrototype(
qMetaTypeId<RCircleEntityPointer>(), *proto);
QScriptValue ctor = engine.newFunction(create, *proto, 2);
// static methods:
REcmaHelper::registerFunction(&engine, &ctor, init, "init");
// static properties:
ctor.setProperty("PropertyCustom",
qScriptValueFromValue(&engine, RCircleEntity::PropertyCustom),
QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
ctor.setProperty("PropertyHandle",
qScriptValueFromValue(&engine, RCircleEntity::PropertyHandle),
QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
ctor.setProperty("PropertyType",
//.........这里部分代码省略.........
示例2: init
void REcmaDimLinearEntity::init(QScriptEngine& engine, QScriptValue* proto
)
{
bool protoCreated = false;
if(proto == NULL){
proto = new QScriptValue(engine.newVariant(qVariantFromValue(
(RDimLinearEntity*) 0)));
protoCreated = true;
}
// primary base class RDimensionEntity:
QScriptValue dpt = engine.defaultPrototype(
qMetaTypeId<RDimensionEntity*>());
if (dpt.isValid()) {
proto->setPrototype(dpt);
}
/*
*/
QScriptValue fun;
// toString:
REcmaHelper::registerFunction(&engine, proto, toString, "toString");
// destroy:
REcmaHelper::registerFunction(&engine, proto, destroy, "destroy");
// conversion for base class RDimensionEntity
REcmaHelper::registerFunction(&engine, proto, getRDimensionEntity, "getRDimensionEntity");
// conversion for base class REntity
REcmaHelper::registerFunction(&engine, proto, getREntity, "getREntity");
// conversion for base class RObject
REcmaHelper::registerFunction(&engine, proto, getRObject, "getRObject");
// get class name
REcmaHelper::registerFunction(&engine, proto, getClassName, "getClassName");
// conversion to all base classes (multiple inheritance):
REcmaHelper::registerFunction(&engine, proto, getBaseClasses, "getBaseClasses");
// properties:
// methods:
REcmaHelper::registerFunction(&engine, proto, setProperty, "setProperty");
REcmaHelper::registerFunction(&engine, proto, getProperty, "getProperty");
REcmaHelper::registerFunction(&engine, proto, getData, "getData");
REcmaHelper::registerFunction(&engine, proto, setExtensionPoint1, "setExtensionPoint1");
REcmaHelper::registerFunction(&engine, proto, getExtensionPoint1, "getExtensionPoint1");
REcmaHelper::registerFunction(&engine, proto, setExtensionPoint2, "setExtensionPoint2");
REcmaHelper::registerFunction(&engine, proto, getExtensionPoint2, "getExtensionPoint2");
engine.setDefaultPrototype(
qMetaTypeId<RDimLinearEntity*>(), *proto);
QScriptValue ctor = engine.newFunction(create, *proto, 2);
// static methods:
REcmaHelper::registerFunction(&engine, &ctor, init, "init");
// static properties:
ctor.setProperty("PropertyCustom",
qScriptValueFromValue(&engine, RDimLinearEntity::PropertyCustom),
QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
ctor.setProperty("PropertyHandle",
qScriptValueFromValue(&engine, RDimLinearEntity::PropertyHandle),
QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
ctor.setProperty("PropertyType",
qScriptValueFromValue(&engine, RDimLinearEntity::PropertyType),
QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
//.........这里部分代码省略.........
示例3: RVector
QList < RVector > REcmaShellSnapDistance::snapEntity(
QSharedPointer < REntity > entity, const RVector & point, const RBox & queryBox, RGraphicsView & view
) {
QScriptEngine* engine = __qtscript_self.engine();
//REcmaHelper::shellFunctionStart("REcmaShellSnapDistance::snapEntity", engine);
QScriptValue _q_function = __qtscript_self.property("snapEntity");
if (!_q_function.isFunction() ||
QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) ||
QTSCRIPT_IS_FUNCTION_IN_CALL(_q_function)
/* function might have more arguments than expected:
|| _q_function.property("length").toInt32()!=4*/
/*|| (__qtscript_self.propertyFlags("atEnd") & QScriptValue::QObjectMember)*/
) {
//QString cppSig = "RSnapDistance::snapEntity";
// re-enable recursion for calls from C++ into ECMAScript functions
// leave it marked as generated though if appropriate:
quint32 prev = _q_function.data().toUInt32();
//if (cppSig!="RGraphicsViewQt::event") {
_q_function.setData(QScriptValue(engine, prev & 0xFFFF0000));
//}
QList < RVector > ret =
RSnapDistance::snapEntity(
entity, point, queryBox, view
);
// block recursion again:
_q_function.setData(QScriptValue(engine, prev));
//REcmaHelper::shellFunctionEnd("REcmaShellSnapDistance::snapEntity", engine);
return ret;
}
// prevent recursion if script implementation calls base implementation
// mark function as 'in call':
quint32 prev = _q_function.data().toUInt32();
_q_function.setData(QScriptValue(engine, uint(prev | 0x0000B000)));
// temporary make protected function scriptable, only from the context of this function call:
QScriptValue proto = engine->defaultPrototype(qMetaTypeId<RSnapDistance*>());
REcmaHelper::registerFunction(engine, &proto, snapEntity, "snapEntity");
QList < RVector > res;
REcmaHelper::fromScriptValue(engine,
_q_function.call(__qtscript_self,
QScriptValueList()
// type: QSharedPointer < REntity >, copyable: false
<< qScriptValueFromValue(engine,
entity
)
// type: RVector &, copyable: true
<< qScriptValueFromValue(engine,
// const reference argument - make a new object:
new RVector(point)
)
// type: RBox &, copyable: true
<< qScriptValueFromValue(engine,
// const reference argument - make a new object:
new RBox(queryBox)
)
// type: RGraphicsView &, copyable: false
<< qScriptValueFromValue(engine,
&view
)
)
, res
)
//.........这里部分代码省略.........
示例4: initEcma
void REcmaDimDiametricData::initEcma(QScriptEngine& engine, QScriptValue* proto
)
{
bool protoCreated = false;
if(proto == NULL){
proto = new QScriptValue(engine.newVariant(qVariantFromValue(
(RDimDiametricData*) 0)));
protoCreated = true;
}
// primary base class RDimensionData:
QScriptValue dpt = engine.defaultPrototype(
qMetaTypeId<RDimensionData*>());
if (dpt.isValid()) {
proto->setPrototype(dpt);
}
/*
*/
QScriptValue fun;
// toString:
REcmaHelper::registerFunction(&engine, proto, toString, "toString");
// copy:
REcmaHelper::registerFunction(&engine, proto, copy, "copy");
// destroy:
REcmaHelper::registerFunction(&engine, proto, destroy, "destroy");
// conversion for base class RDimensionData
REcmaHelper::registerFunction(&engine, proto, getRDimensionData, "getRDimensionData");
// conversion for base class REntityData
REcmaHelper::registerFunction(&engine, proto, getREntityData, "getREntityData");
// get class name
REcmaHelper::registerFunction(&engine, proto, getClassName, "getClassName");
// conversion to all base classes (multiple inheritance):
REcmaHelper::registerFunction(&engine, proto, getBaseClasses, "getBaseClasses");
// properties:
// methods:
REcmaHelper::registerFunction(&engine, proto, isValid, "isValid");
REcmaHelper::registerFunction(&engine, proto, setChordPoint, "setChordPoint");
REcmaHelper::registerFunction(&engine, proto, getChordPoint, "getChordPoint");
REcmaHelper::registerFunction(&engine, proto, setFarChordPoint, "setFarChordPoint");
REcmaHelper::registerFunction(&engine, proto, getFarChordPoint, "getFarChordPoint");
REcmaHelper::registerFunction(&engine, proto, getReferencePoints, "getReferencePoints");
REcmaHelper::registerFunction(&engine, proto, moveReferencePoint, "moveReferencePoint");
REcmaHelper::registerFunction(&engine, proto, move, "move");
REcmaHelper::registerFunction(&engine, proto, rotate, "rotate");
REcmaHelper::registerFunction(&engine, proto, scale, "scale");
REcmaHelper::registerFunction(&engine, proto, mirror, "mirror");
REcmaHelper::registerFunction(&engine, proto, getShapes, "getShapes");
REcmaHelper::registerFunction(&engine, proto, getMeasuredValue, "getMeasuredValue");
REcmaHelper::registerFunction(&engine, proto, getAutoLabel, "getAutoLabel");
REcmaHelper::registerFunction(&engine, proto, updateTextData, "updateTextData");
engine.setDefaultPrototype(
qMetaTypeId<RDimDiametricData*>(), *proto);
engine.setDefaultPrototype(qMetaTypeId<
RDimDiametricData
> (), *proto);
//.........这里部分代码省略.........
示例5: init
void REcmaCoordinateListenerAdapter::init(QScriptEngine& engine, QScriptValue* proto
)
{
bool protoCreated = false;
if(proto == NULL){
proto = new QScriptValue(engine.newVariant(qVariantFromValue(
(RCoordinateListenerAdapter*) 0)));
protoCreated = true;
}
// primary base class QObject:
QScriptValue dpt = engine.defaultPrototype(
qMetaTypeId<QObject*>());
if (dpt.isValid()) {
proto->setPrototype(dpt);
}
/*
REcmaCoordinateListener::init(engine, proto);
*/
QScriptValue fun;
// toString:
REcmaHelper::registerFunction(&engine, proto, toString, "toString");
// destroy:
REcmaHelper::registerFunction(&engine, proto, destroy, "destroy");
// conversion for base class QObject
REcmaHelper::registerFunction(&engine, proto, getQObject, "getQObject");
// conversion for base class RCoordinateListener
REcmaHelper::registerFunction(&engine, proto, getRCoordinateListener, "getRCoordinateListener");
// get class name
REcmaHelper::registerFunction(&engine, proto, getClassName, "getClassName");
// conversion to all base classes (multiple inheritance):
REcmaHelper::registerFunction(&engine, proto, getBaseClasses, "getBaseClasses");
// properties of secondary base class RCoordinateListener:
// methods of secondary base class RCoordinateListener:
// properties:
// methods:
REcmaHelper::registerFunction(&engine, proto, updateCoordinate, "updateCoordinate");
engine.setDefaultPrototype(
qMetaTypeId<RCoordinateListenerAdapter*>(), *proto);
qScriptRegisterMetaType<
RCoordinateListenerAdapter*>(
&engine, toScriptValue, fromScriptValue, *proto);
QScriptValue ctor = engine.newFunction(create, *proto, 2);
// static methods:
// static properties:
// enum values:
// enum conversions:
// init class:
engine.globalObject().setProperty("RCoordinateListenerAdapter",
ctor, QScriptValue::SkipInEnumeration);
if( protoCreated ){
delete proto;
}
}
示例6: initEcma
// includes for base ecma wrapper classes
void REcmaLinetypeCombo::initEcma(QScriptEngine& engine, QScriptValue* proto
)
{
bool protoCreated = false;
if(proto == NULL){
proto = new QScriptValue(engine.newVariant(qVariantFromValue(
(RLinetypeCombo*) 0)));
protoCreated = true;
}
// primary base class QComboBox:
QScriptValue dpt = engine.defaultPrototype(
qMetaTypeId<QComboBox*>());
if (dpt.isValid()) {
proto->setPrototype(dpt);
}
/*
*/
QScriptValue fun;
// toString:
REcmaHelper::registerFunction(&engine, proto, toString, "toString");
// destroy:
REcmaHelper::registerFunction(&engine, proto, destroy, "destroy");
// conversion for base class QComboBox
REcmaHelper::registerFunction(&engine, proto, getQComboBox, "getQComboBox");
// get class name
REcmaHelper::registerFunction(&engine, proto, getClassName, "getClassName");
// conversion to all base classes (multiple inheritance):
REcmaHelper::registerFunction(&engine, proto, getBaseClasses, "getBaseClasses");
// properties:
// methods:
REcmaHelper::registerFunction(&engine, proto, init, "init");
REcmaHelper::registerFunction(&engine, proto, reinit, "reinit");
REcmaHelper::registerFunction(&engine, proto, getLinetypePattern, "getLinetypePattern");
REcmaHelper::registerFunction(&engine, proto, getLinetypePatternAt, "getLinetypePatternAt");
REcmaHelper::registerFunction(&engine, proto, setLinetypePattern, "setLinetypePattern");
REcmaHelper::registerFunction(&engine, proto, getOnlyFixed, "getOnlyFixed");
REcmaHelper::registerFunction(&engine, proto, setOnlyFixed, "setOnlyFixed");
REcmaHelper::registerFunction(&engine, proto, linetypePatternChanged, "linetypePatternChanged");
engine.setDefaultPrototype(
qMetaTypeId<RLinetypeCombo*>(), *proto);
qScriptRegisterMetaType<
RLinetypeCombo*>(
&engine, toScriptValue, fromScriptValue, *proto);
QScriptValue ctor = engine.newFunction(create, *proto, 2);
// static methods:
// static properties:
// enum values:
// enum conversions:
// init class:
engine.globalObject().setProperty("RLinetypeCombo",
ctor, QScriptValue::SkipInEnumeration);
if( protoCreated ){
//.........这里部分代码省略.........
示例7: initEcma
void REcmaLineData::initEcma(QScriptEngine& engine, QScriptValue* proto
)
{
bool protoCreated = false;
if(proto == NULL) {
proto = new QScriptValue(engine.newVariant(qVariantFromValue(
(RLineData*) 0)));
protoCreated = true;
}
// primary base class REntityData:
QScriptValue dpt = engine.defaultPrototype(
qMetaTypeId<REntityData*>());
if (dpt.isValid()) {
proto->setPrototype(dpt);
}
/*
REcmaLine::initEcma(engine, proto);
*/
QScriptValue fun;
// toString:
REcmaHelper::registerFunction(&engine, proto, toString, "toString");
// copy:
REcmaHelper::registerFunction(&engine, proto, copy, "copy");
// destroy:
REcmaHelper::registerFunction(&engine, proto, destroy, "destroy");
// conversion for base class REntityData
REcmaHelper::registerFunction(&engine, proto, getREntityData, "getREntityData");
// get class name
REcmaHelper::registerFunction(&engine, proto, getClassName, "getClassName");
// conversion to all base classes (multiple inheritance):
REcmaHelper::registerFunction(&engine, proto, getBaseClasses, "getBaseClasses");
// properties:
// methods:
REcmaHelper::registerFunction(&engine, proto, getLine, "getLine");
REcmaHelper::registerFunction(&engine, proto, getHull, "getHull");
REcmaHelper::registerFunction(&engine, proto, getStartPoint, "getStartPoint");
REcmaHelper::registerFunction(&engine, proto, getEndPoint, "getEndPoint");
REcmaHelper::registerFunction(&engine, proto, getAngle, "getAngle");
REcmaHelper::registerFunction(&engine, proto, getDirection1, "getDirection1");
REcmaHelper::registerFunction(&engine, proto, getDirection2, "getDirection2");
REcmaHelper::registerFunction(&engine, proto, reverse, "reverse");
REcmaHelper::registerFunction(&engine, proto, getTrimEnd, "getTrimEnd");
REcmaHelper::registerFunction(&engine, proto, trimStartPoint, "trimStartPoint");
REcmaHelper::registerFunction(&engine, proto, trimEndPoint, "trimEndPoint");
REcmaHelper::registerFunction(&engine, proto, getSideOfPoint, "getSideOfPoint");
REcmaHelper::registerFunction(&engine, proto, getReferencePoints, "getReferencePoints");
REcmaHelper::registerFunction(&engine, proto, moveReferencePoint, "moveReferencePoint");
REcmaHelper::registerFunction(&engine, proto, castToShape, "castToShape");
REcmaHelper::registerFunction(&engine, proto, getShapes, "getShapes");
engine.setDefaultPrototype(
qMetaTypeId<RLineData*>(), *proto);
engine.setDefaultPrototype(qMetaTypeId<
RLineData
> (), *proto);
//.........这里部分代码省略.........
示例8: initEcma
void REcmaSharedPointerDimDiametricEntity::initEcma(QScriptEngine& engine, QScriptValue* proto
)
{
bool protoCreated = false;
if(proto == NULL) {
proto = new QScriptValue(engine.newVariant(qVariantFromValue(
(RDimDiametricEntityPointer*) 0)));
protoCreated = true;
}
// primary base class RDimensionEntity:
proto->setPrototype(engine.defaultPrototype(
qMetaTypeId<RDimensionEntityPointer>()));
/*
*/
QScriptValue fun;
// toString:
REcmaHelper::registerFunction(&engine, proto, toString, "toString");
// shared pointer support:
REcmaHelper::registerFunction(&engine, proto, data, "data");
REcmaHelper::registerFunction(&engine, proto, isNull, "isNull");
// destroy:
REcmaHelper::registerFunction(&engine, proto, destroy, "destroy");
// conversion for base class RDimensionEntity
REcmaHelper::registerFunction(&engine, proto, getRDimensionEntity, "getRDimensionEntity");
// conversion for base class REntity
REcmaHelper::registerFunction(&engine, proto, getREntity, "getREntity");
// conversion for base class RObject
REcmaHelper::registerFunction(&engine, proto, getRObject, "getRObject");
// get class name
REcmaHelper::registerFunction(&engine, proto, getClassName, "getClassName");
// conversion to all base classes (multiple inheritance):
REcmaHelper::registerFunction(&engine, proto, getBaseClasses, "getBaseClasses");
// properties:
// methods:
REcmaHelper::registerFunction(&engine, proto, clone, "clone");
REcmaHelper::registerFunction(&engine, proto, getType, "getType");
REcmaHelper::registerFunction(&engine, proto, setProperty, "setProperty");
REcmaHelper::registerFunction(&engine, proto, getProperty, "getProperty");
REcmaHelper::registerFunction(&engine, proto, getData, "getData");
REcmaHelper::registerFunction(&engine, proto, setData, "setData");
REcmaHelper::registerFunction(&engine, proto, setChordPoint, "setChordPoint");
REcmaHelper::registerFunction(&engine, proto, getChordPoint, "getChordPoint");
REcmaHelper::registerFunction(&engine, proto, setFarChordPoint, "setFarChordPoint");
REcmaHelper::registerFunction(&engine, proto, getFarChordPoint, "getFarChordPoint");
engine.setDefaultPrototype(
qMetaTypeId<RDimDiametricEntityPointer>(), *proto);
QScriptValue ctor = engine.newFunction(createEcma, *proto, 2);
// static methods:
REcmaHelper::registerFunction(&engine, &ctor, init, "init");
REcmaHelper::registerFunction(&engine, &ctor, getStaticPropertyTypeIds, "getStaticPropertyTypeIds");
// static properties:
ctor.setProperty("PropertyCustom",
qScriptValueFromValue(&engine, RDimDiametricEntity::PropertyCustom),
//.........这里部分代码省略.........
示例9: initEcma
void REcmaAddObjectsOperation::initEcma(QScriptEngine& engine, QScriptValue* proto
)
{
bool protoCreated = false;
if(proto == NULL) {
proto = new QScriptValue(engine.newVariant(qVariantFromValue(
(RAddObjectsOperation*) 0)));
protoCreated = true;
}
// primary base class ROperation:
QScriptValue dpt = engine.defaultPrototype(
qMetaTypeId<ROperation*>());
if (dpt.isValid()) {
proto->setPrototype(dpt);
}
/*
*/
QScriptValue fun;
// toString:
REcmaHelper::registerFunction(&engine, proto, toString, "toString");
// destroy:
REcmaHelper::registerFunction(&engine, proto, destroy, "destroy");
// conversion for base class ROperation
REcmaHelper::registerFunction(&engine, proto, getROperation, "getROperation");
// conversion for base class RRequireHeap
REcmaHelper::registerFunction(&engine, proto, getRRequireHeap, "getRRequireHeap");
// get class name
REcmaHelper::registerFunction(&engine, proto, getClassName, "getClassName");
// conversion to all base classes (multiple inheritance):
REcmaHelper::registerFunction(&engine, proto, getBaseClasses, "getBaseClasses");
// properties:
// methods:
REcmaHelper::registerFunction(&engine, proto, replaceObject, "replaceObject");
REcmaHelper::registerFunction(&engine, proto, getObject, "getObject");
REcmaHelper::registerFunction(&engine, proto, endCycle, "endCycle");
REcmaHelper::registerFunction(&engine, proto, addObject, "addObject");
REcmaHelper::registerFunction(&engine, proto, deleteObject, "deleteObject");
REcmaHelper::registerFunction(&engine, proto, apply, "apply");
REcmaHelper::registerFunction(&engine, proto, getPreviewCounter, "getPreviewCounter");
REcmaHelper::registerFunction(&engine, proto, setLimitPreview, "setLimitPreview");
REcmaHelper::registerFunction(&engine, proto, isEmpty, "isEmpty");
engine.setDefaultPrototype(
qMetaTypeId<RAddObjectsOperation*>(), *proto);
QScriptValue ctor = engine.newFunction(createEcma, *proto, 2);
// static methods:
// static properties:
// enum values:
// enum conversions:
// init class:
engine.globalObject().setProperty("RAddObjectsOperation",
ctor, QScriptValue::SkipInEnumeration);
if( protoCreated ) {
//.........这里部分代码省略.........
示例10: initEcma
void REcmaSpatialIndexNavel::initEcma(QScriptEngine& engine, QScriptValue* proto
)
{
bool protoCreated = false;
if(proto == NULL){
proto = new QScriptValue(engine.newVariant(qVariantFromValue(
(RSpatialIndexNavel*) 0)));
protoCreated = true;
}
// primary base class RSpatialIndex:
QScriptValue dpt = engine.defaultPrototype(
qMetaTypeId<RSpatialIndex*>());
if (dpt.isValid()) {
proto->setPrototype(dpt);
}
/*
*/
QScriptValue fun;
// toString:
REcmaHelper::registerFunction(&engine, proto, toString, "toString");
// destroy:
REcmaHelper::registerFunction(&engine, proto, destroy, "destroy");
// conversion for base class RSpatialIndex
REcmaHelper::registerFunction(&engine, proto, getRSpatialIndex, "getRSpatialIndex");
// conversion for base class RRequireHeap
REcmaHelper::registerFunction(&engine, proto, getRRequireHeap, "getRRequireHeap");
// get class name
REcmaHelper::registerFunction(&engine, proto, getClassName, "getClassName");
// conversion to all base classes (multiple inheritance):
REcmaHelper::registerFunction(&engine, proto, getBaseClasses, "getBaseClasses");
// properties:
// methods:
REcmaHelper::registerFunction(&engine, proto, clear, "clear");
REcmaHelper::registerFunction(&engine, proto, bulkLoad, "bulkLoad");
REcmaHelper::registerFunction(&engine, proto, addToIndex, "addToIndex");
REcmaHelper::registerFunction(&engine, proto, removeFromIndex, "removeFromIndex");
REcmaHelper::registerFunction(&engine, proto, queryIntersected, "queryIntersected");
REcmaHelper::registerFunction(&engine, proto, queryIntersectedSimple, "queryIntersectedSimple");
REcmaHelper::registerFunction(&engine, proto, queryContained, "queryContained");
REcmaHelper::registerFunction(&engine, proto, queryNearestNeighbor, "queryNearestNeighbor");
engine.setDefaultPrototype(
qMetaTypeId<RSpatialIndexNavel*>(), *proto);
QScriptValue ctor = engine.newFunction(create, *proto, 2);
// static methods:
// static properties:
// enum values:
// enum conversions:
// init class:
engine.globalObject().setProperty("RSpatialIndexNavel",
ctor, QScriptValue::SkipInEnumeration);
if( protoCreated ){
delete proto;
}
//.........这里部分代码省略.........
示例11: initEcma
void REcmaRestrictAngleLength::initEcma(QScriptEngine& engine, QScriptValue* proto
)
{
bool protoCreated = false;
if(proto == NULL){
proto = new QScriptValue(engine.newVariant(qVariantFromValue(
(RRestrictAngleLength*) 0)));
protoCreated = true;
}
// primary base class RSnapRestriction:
QScriptValue dpt = engine.defaultPrototype(
qMetaTypeId<RSnapRestriction*>());
if (dpt.isValid()) {
proto->setPrototype(dpt);
}
/*
*/
QScriptValue fun;
// toString:
REcmaHelper::registerFunction(&engine, proto, toString, "toString");
// destroy:
REcmaHelper::registerFunction(&engine, proto, destroy, "destroy");
// conversion for base class RSnapRestriction
REcmaHelper::registerFunction(&engine, proto, getRSnapRestriction, "getRSnapRestriction");
// get class name
REcmaHelper::registerFunction(&engine, proto, getClassName, "getClassName");
// conversion to all base classes (multiple inheritance):
REcmaHelper::registerFunction(&engine, proto, getBaseClasses, "getBaseClasses");
// properties:
// methods:
REcmaHelper::registerFunction(&engine, proto, restrictSnap, "restrictSnap");
REcmaHelper::registerFunction(&engine, proto, setBaseAngle, "setBaseAngle");
REcmaHelper::registerFunction(&engine, proto, setAngle, "setAngle");
REcmaHelper::registerFunction(&engine, proto, setBaseLength, "setBaseLength");
REcmaHelper::registerFunction(&engine, proto, setLength, "setLength");
REcmaHelper::registerFunction(&engine, proto, setRestrictAngle, "setRestrictAngle");
REcmaHelper::registerFunction(&engine, proto, setRestrictLength, "setRestrictLength");
engine.setDefaultPrototype(
qMetaTypeId<RRestrictAngleLength*>(), *proto);
QScriptValue ctor = engine.newFunction(createEcma, *proto, 2);
// static methods:
// static properties:
// enum values:
ctor.setProperty("None",
QScriptValue(RRestrictAngleLength::None),
QScriptValue::ReadOnly);
ctor.setProperty("Angle",
QScriptValue(RRestrictAngleLength::Angle),
QScriptValue::ReadOnly);
ctor.setProperty("Length",
QScriptValue(RRestrictAngleLength::Length),
QScriptValue::ReadOnly);
//.........这里部分代码省略.........
示例12: init
void REcmaLeaderData::init(QScriptEngine& engine, QScriptValue* proto
)
{
bool protoCreated = false;
if(proto == NULL){
proto = new QScriptValue(engine.newVariant(qVariantFromValue(
(RLeaderData*) 0)));
protoCreated = true;
}
// primary base class REntityData:
QScriptValue dpt = engine.defaultPrototype(
qMetaTypeId<REntityData*>());
if (dpt.isValid()) {
proto->setPrototype(dpt);
}
/*
REcmaPolyline::init(engine, proto);
*/
QScriptValue fun;
// toString:
REcmaHelper::registerFunction(&engine, proto, toString, "toString");
// destroy:
REcmaHelper::registerFunction(&engine, proto, destroy, "destroy");
// conversion for base class REntityData
REcmaHelper::registerFunction(&engine, proto, getREntityData, "getREntityData");
// get class name
REcmaHelper::registerFunction(&engine, proto, getClassName, "getClassName");
// conversion to all base classes (multiple inheritance):
REcmaHelper::registerFunction(&engine, proto, getBaseClasses, "getBaseClasses");
// properties:
// methods:
REcmaHelper::registerFunction(&engine, proto, castToShape, "castToShape");
REcmaHelper::registerFunction(&engine, proto, getDimasz, "getDimasz");
REcmaHelper::registerFunction(&engine, proto, getDimscale, "getDimscale");
REcmaHelper::registerFunction(&engine, proto, setArrowHead, "setArrowHead");
REcmaHelper::registerFunction(&engine, proto, hasArrowHead, "hasArrowHead");
REcmaHelper::registerFunction(&engine, proto, getEndPoint, "getEndPoint");
REcmaHelper::registerFunction(&engine, proto, getStartPoint, "getStartPoint");
REcmaHelper::registerFunction(&engine, proto, countVertices, "countVertices");
REcmaHelper::registerFunction(&engine, proto, countSegments, "countSegments");
REcmaHelper::registerFunction(&engine, proto, appendVertex, "appendVertex");
REcmaHelper::registerFunction(&engine, proto, getReferencePoints, "getReferencePoints");
REcmaHelper::registerFunction(&engine, proto, moveReferencePoint, "moveReferencePoint");
REcmaHelper::registerFunction(&engine, proto, getExploded, "getExploded");
REcmaHelper::registerFunction(&engine, proto, getShapes, "getShapes");
REcmaHelper::registerFunction(&engine, proto, getArrowShape, "getArrowShape");
engine.setDefaultPrototype(
qMetaTypeId<RLeaderData*>(), *proto);
QScriptValue ctor = engine.newFunction(create, *proto, 2);
// static methods:
// static properties:
// enum values:
//.........这里部分代码省略.........
示例13: initEcma
void REcmaOrthoGrid::initEcma(QScriptEngine& engine, QScriptValue* proto
)
{
bool protoCreated = false;
if(proto == NULL){
proto = new QScriptValue(engine.newVariant(qVariantFromValue(
(ROrthoGrid*) 0)));
protoCreated = true;
}
// primary base class RGrid:
QScriptValue dpt = engine.defaultPrototype(
qMetaTypeId<RGrid*>());
if (dpt.isValid()) {
proto->setPrototype(dpt);
}
/*
*/
QScriptValue fun;
// toString:
REcmaHelper::registerFunction(&engine, proto, toString, "toString");
// destroy:
REcmaHelper::registerFunction(&engine, proto, destroy, "destroy");
// conversion for base class RGrid
REcmaHelper::registerFunction(&engine, proto, getRGrid, "getRGrid");
// get class name
REcmaHelper::registerFunction(&engine, proto, getClassName, "getClassName");
// conversion to all base classes (multiple inheritance):
REcmaHelper::registerFunction(&engine, proto, getBaseClasses, "getBaseClasses");
// properties:
// methods:
REcmaHelper::registerFunction(&engine, proto, clearCache, "clearCache");
REcmaHelper::registerFunction(&engine, proto, snapToGrid, "snapToGrid");
REcmaHelper::registerFunction(&engine, proto, update, "update");
REcmaHelper::registerFunction(&engine, proto, paint, "paint");
REcmaHelper::registerFunction(&engine, proto, paintMetaGrid, "paintMetaGrid");
REcmaHelper::registerFunction(&engine, proto, paintGridLines, "paintGridLines");
REcmaHelper::registerFunction(&engine, proto, paintGridPoints, "paintGridPoints");
REcmaHelper::registerFunction(&engine, proto, paintCursor, "paintCursor");
REcmaHelper::registerFunction(&engine, proto, paintRuler, "paintRuler");
REcmaHelper::registerFunction(&engine, proto, getInfoText, "getInfoText");
REcmaHelper::registerFunction(&engine, proto, getIdealSpacing, "getIdealSpacing");
REcmaHelper::registerFunction(&engine, proto, isIsometric, "isIsometric");
REcmaHelper::registerFunction(&engine, proto, setIsometric, "setIsometric");
REcmaHelper::registerFunction(&engine, proto, getProjection, "getProjection");
REcmaHelper::registerFunction(&engine, proto, setProjection, "setProjection");
engine.setDefaultPrototype(
qMetaTypeId<ROrthoGrid*>(), *proto);
QScriptValue ctor = engine.newFunction(createEcma, *proto, 2);
// static methods:
REcmaHelper::registerFunction(&engine, &ctor, getIdealGridSpacing, "getIdealGridSpacing");
REcmaHelper::registerFunction(&engine, &ctor, isFractionalFormat, "isFractionalFormat");
// static properties:
//.........这里部分代码省略.........
示例14: initEcma
void REcmaMdiChildQt::initEcma(QScriptEngine& engine, QScriptValue* proto
)
{
bool protoCreated = false;
if(proto == NULL) {
proto = new QScriptValue(engine.newVariant(qVariantFromValue(
(RMdiChildQt*) 0)));
protoCreated = true;
}
// primary base class QMdiSubWindow:
QScriptValue dpt = engine.defaultPrototype(
qMetaTypeId<QMdiSubWindow*>());
if (dpt.isValid()) {
proto->setPrototype(dpt);
}
/*
REcmaModifiedListener::initEcma(engine, proto);
*/
QScriptValue fun;
// toString:
REcmaHelper::registerFunction(&engine, proto, toString, "toString");
// destroy:
REcmaHelper::registerFunction(&engine, proto, destroy, "destroy");
// conversion for base class QMdiSubWindow
REcmaHelper::registerFunction(&engine, proto, getQMdiSubWindow, "getQMdiSubWindow");
// conversion for base class RModifiedListener
REcmaHelper::registerFunction(&engine, proto, getRModifiedListener, "getRModifiedListener");
// get class name
REcmaHelper::registerFunction(&engine, proto, getClassName, "getClassName");
// conversion to all base classes (multiple inheritance):
REcmaHelper::registerFunction(&engine, proto, getBaseClasses, "getBaseClasses");
// properties of secondary base class RModifiedListener:
// methods of secondary base class RModifiedListener:
// properties:
// methods:
REcmaHelper::registerFunction(&engine, proto, setDocumentInterface, "setDocumentInterface");
REcmaHelper::registerFunction(&engine, proto, getDocumentInterface, "getDocumentInterface");
REcmaHelper::registerFunction(&engine, proto, getDocument, "getDocument");
REcmaHelper::registerFunction(&engine, proto, getLastKnownViewWithFocus, "getLastKnownViewWithFocus");
REcmaHelper::registerFunction(&engine, proto, updateModifiedListener, "updateModifiedListener");
REcmaHelper::registerFunction(&engine, proto, setCloseEventRejected, "setCloseEventRejected");
REcmaHelper::registerFunction(&engine, proto, setCloseEventAccepted, "setCloseEventAccepted");
REcmaHelper::registerFunction(&engine, proto, isCloseEventAccepted, "isCloseEventAccepted");
engine.setDefaultPrototype(
qMetaTypeId<RMdiChildQt*>(), *proto);
qScriptRegisterMetaType<
RMdiChildQt*>(
&engine, toScriptValue, fromScriptValue, *proto);
QScriptValue ctor = engine.newFunction(createEcma, *proto, 2);
// static methods:
// static properties:
// enum values:
//.........这里部分代码省略.........
示例15: init
void REcmaSharedPointerLinetype::init(QScriptEngine& engine, QScriptValue* proto
)
{
bool protoCreated = false;
if(proto == NULL){
proto = new QScriptValue(engine.newVariant(qVariantFromValue(
(RLinetypePointer*) 0)));
protoCreated = true;
}
// primary base class RObject:
proto->setPrototype(engine.defaultPrototype(
qMetaTypeId<RObjectPointer>()));
/*
*/
QScriptValue fun;
// toString:
REcmaHelper::registerFunction(&engine, proto, toString, "toString");
// copy:
REcmaHelper::registerFunction(&engine, proto, copy, "copy");
// shared pointer support:
REcmaHelper::registerFunction(&engine, proto, data, "data");
REcmaHelper::registerFunction(&engine, proto, isNull, "isNull");
// destroy:
REcmaHelper::registerFunction(&engine, proto, destroy, "destroy");
// conversion for base class RObject
REcmaHelper::registerFunction(&engine, proto, getRObject, "getRObject");
// get class name
REcmaHelper::registerFunction(&engine, proto, getClassName, "getClassName");
// conversion to all base classes (multiple inheritance):
REcmaHelper::registerFunction(&engine, proto, getBaseClasses, "getBaseClasses");
// properties:
// methods:
REcmaHelper::registerFunction(&engine, proto, clone, "clone");
REcmaHelper::registerFunction(&engine, proto, getName, "getName");
REcmaHelper::registerFunction(&engine, proto, setName, "setName");
REcmaHelper::registerFunction(&engine, proto, isValid, "isValid");
REcmaHelper::registerFunction(&engine, proto, getProperty, "getProperty");
REcmaHelper::registerFunction(&engine, proto, setProperty, "setProperty");
REcmaHelper::registerFunction(&engine, proto, isSelectedForPropertyEditing, "isSelectedForPropertyEditing");
REcmaHelper::registerFunction(&engine, proto, equals, "equals");
REcmaHelper::registerFunction(&engine, proto, operator_not_assign, "operator_not_assign");
REcmaHelper::registerFunction(&engine, proto, operator_less, "operator_less");
engine.setDefaultPrototype(
qMetaTypeId<RLinetypePointer>(), *proto);
QScriptValue ctor = engine.newFunction(create, *proto, 2);
// static methods:
REcmaHelper::registerFunction(&engine, &ctor, init, "init");
REcmaHelper::registerFunction(&engine, &ctor, getList, "getList");
REcmaHelper::registerFunction(&engine, &ctor, getIcon, "getIcon");
REcmaHelper::registerFunction(&engine, &ctor, getTitle, "getTitle");
// static properties:
ctor.setProperty("PropertyName",
//.........这里部分代码省略.........