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", qScriptValueFromValue(&engine, RCircleEntity::PropertyType), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyBlock", qScriptValueFromValue(&engine, RCircleEntity::PropertyBlock), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyLayer", qScriptValueFromValue(&engine, RCircleEntity::PropertyLayer), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyLinetype", qScriptValueFromValue(&engine, RCircleEntity::PropertyLinetype), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyLineweight", qScriptValueFromValue(&engine, RCircleEntity::PropertyLineweight), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyColor", qScriptValueFromValue(&engine, RCircleEntity::PropertyColor), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyDrawOrder", qScriptValueFromValue(&engine, RCircleEntity::PropertyDrawOrder), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyCenterX", qScriptValueFromValue(&engine, RCircleEntity::PropertyCenterX), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyCenterY", qScriptValueFromValue(&engine, RCircleEntity::PropertyCenterY), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyCenterZ", qScriptValueFromValue(&engine, RCircleEntity::PropertyCenterZ), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyRadius", qScriptValueFromValue(&engine, RCircleEntity::PropertyRadius), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyDiameter", qScriptValueFromValue(&engine, RCircleEntity::PropertyDiameter), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyCircumference", qScriptValueFromValue(&engine, RCircleEntity::PropertyCircumference), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyArea", qScriptValueFromValue(&engine, RCircleEntity::PropertyArea), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); // enum values: // enum conversions: // init class: engine.globalObject().setProperty("RCircleEntityPointer", ctor, QScriptValue::SkipInEnumeration); if( protoCreated ){ delete proto; } }
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); ctor.setProperty("PropertyBlock", qScriptValueFromValue(&engine, RDimLinearEntity::PropertyBlock), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyLayer", qScriptValueFromValue(&engine, RDimLinearEntity::PropertyLayer), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyLinetype", qScriptValueFromValue(&engine, RDimLinearEntity::PropertyLinetype), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyLineweight", qScriptValueFromValue(&engine, RDimLinearEntity::PropertyLineweight), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyColor", qScriptValueFromValue(&engine, RDimLinearEntity::PropertyColor), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyDrawOrder", qScriptValueFromValue(&engine, RDimLinearEntity::PropertyDrawOrder), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyMiddleOfTextX", qScriptValueFromValue(&engine, RDimLinearEntity::PropertyMiddleOfTextX), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyMiddleOfTextY", qScriptValueFromValue(&engine, RDimLinearEntity::PropertyMiddleOfTextY), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyMiddleOfTextZ", qScriptValueFromValue(&engine, RDimLinearEntity::PropertyMiddleOfTextZ), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyText", qScriptValueFromValue(&engine, RDimLinearEntity::PropertyText), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyUpperTolerance", qScriptValueFromValue(&engine, RDimLinearEntity::PropertyUpperTolerance), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyLowerTolerance", qScriptValueFromValue(&engine, RDimLinearEntity::PropertyLowerTolerance), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyDimensionLinePosX", qScriptValueFromValue(&engine, RDimLinearEntity::PropertyDimensionLinePosX), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyDimensionLinePosY", qScriptValueFromValue(&engine, RDimLinearEntity::PropertyDimensionLinePosY), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyDimensionLinePosZ", qScriptValueFromValue(&engine, RDimLinearEntity::PropertyDimensionLinePosZ), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyExtensionPoint1X", qScriptValueFromValue(&engine, RDimLinearEntity::PropertyExtensionPoint1X), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyExtensionPoint1Y", qScriptValueFromValue(&engine, RDimLinearEntity::PropertyExtensionPoint1Y), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyExtensionPoint1Z", qScriptValueFromValue(&engine, RDimLinearEntity::PropertyExtensionPoint1Z), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyExtensionPoint2X", qScriptValueFromValue(&engine, RDimLinearEntity::PropertyExtensionPoint2X), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyExtensionPoint2Y", qScriptValueFromValue(&engine, RDimLinearEntity::PropertyExtensionPoint2Y), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyExtensionPoint2Z", qScriptValueFromValue(&engine, RDimLinearEntity::PropertyExtensionPoint2Z), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); // enum values: // enum conversions: // init class: engine.globalObject().setProperty("RDimLinearEntity", ctor, QScriptValue::SkipInEnumeration); if( protoCreated ){ delete proto; } }
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 ) ; _q_function.setData(QScriptValue(engine, prev)); //REcmaHelper::shellFunctionEnd("REcmaShellSnapDistance::snapEntity", engine); return res; }
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); QScriptValue ctor = engine.newFunction(create, *proto, 2); // static methods: // static properties: // enum values: // enum conversions: // init class: engine.globalObject().setProperty("RDimDiametricData", ctor, QScriptValue::SkipInEnumeration); if( protoCreated ){ delete proto; } }
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; } }
// 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 ){ delete proto; } }
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); QScriptValue ctor = engine.newFunction(createEcma, *proto, 2); // static methods: // static properties: // enum values: // enum conversions: // init class: engine.globalObject().setProperty("RLineData", ctor, QScriptValue::SkipInEnumeration); if( protoCreated ) { delete proto; } }
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), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyHandle", qScriptValueFromValue(&engine, RDimDiametricEntity::PropertyHandle), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyProtected", qScriptValueFromValue(&engine, RDimDiametricEntity::PropertyProtected), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyType", qScriptValueFromValue(&engine, RDimDiametricEntity::PropertyType), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyBlock", qScriptValueFromValue(&engine, RDimDiametricEntity::PropertyBlock), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyLayer", qScriptValueFromValue(&engine, RDimDiametricEntity::PropertyLayer), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyLinetype", qScriptValueFromValue(&engine, RDimDiametricEntity::PropertyLinetype), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyLinetypeScale", qScriptValueFromValue(&engine, RDimDiametricEntity::PropertyLinetypeScale), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyLineweight", qScriptValueFromValue(&engine, RDimDiametricEntity::PropertyLineweight), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyColor", qScriptValueFromValue(&engine, RDimDiametricEntity::PropertyColor), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyDisplayedColor", qScriptValueFromValue(&engine, RDimDiametricEntity::PropertyDisplayedColor), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyDrawOrder", qScriptValueFromValue(&engine, RDimDiametricEntity::PropertyDrawOrder), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyMiddleOfTextX", qScriptValueFromValue(&engine, RDimDiametricEntity::PropertyMiddleOfTextX), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyMiddleOfTextY", qScriptValueFromValue(&engine, RDimDiametricEntity::PropertyMiddleOfTextY), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyMiddleOfTextZ", qScriptValueFromValue(&engine, RDimDiametricEntity::PropertyMiddleOfTextZ), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyText", qScriptValueFromValue(&engine, RDimDiametricEntity::PropertyText), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyUpperTolerance", qScriptValueFromValue(&engine, RDimDiametricEntity::PropertyUpperTolerance), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyLowerTolerance", qScriptValueFromValue(&engine, RDimDiametricEntity::PropertyLowerTolerance), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyMeasuredValue", qScriptValueFromValue(&engine, RDimDiametricEntity::PropertyMeasuredValue), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyLinearFactor", qScriptValueFromValue(&engine, RDimDiametricEntity::PropertyLinearFactor), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyDimScale", qScriptValueFromValue(&engine, RDimDiametricEntity::PropertyDimScale), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyAutoTextPos", qScriptValueFromValue(&engine, RDimDiametricEntity::PropertyAutoTextPos), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyFontName", qScriptValueFromValue(&engine, RDimDiametricEntity::PropertyFontName), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyChordPointX", qScriptValueFromValue(&engine, RDimDiametricEntity::PropertyChordPointX), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyChordPointY", qScriptValueFromValue(&engine, RDimDiametricEntity::PropertyChordPointY), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyChordPointZ", qScriptValueFromValue(&engine, RDimDiametricEntity::PropertyChordPointZ), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyFarChordPointX", qScriptValueFromValue(&engine, RDimDiametricEntity::PropertyFarChordPointX), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyFarChordPointY", qScriptValueFromValue(&engine, RDimDiametricEntity::PropertyFarChordPointY), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyFarChordPointZ", qScriptValueFromValue(&engine, RDimDiametricEntity::PropertyFarChordPointZ), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); // enum values: // enum conversions: // init class: engine.globalObject().setProperty("RDimDiametricEntityPointer", ctor, QScriptValue::SkipInEnumeration); if( protoCreated ) { delete proto; } }
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 ) { delete proto; } }
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; } }
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); ctor.setProperty("AngleLength", QScriptValue(RRestrictAngleLength::AngleLength), QScriptValue::ReadOnly); // enum conversions: qScriptRegisterMetaType<RRestrictAngleLength::AngleLengthMode>( &engine, toScriptValueEnumAngleLengthMode, fromScriptValueEnumAngleLengthMode, ctor.property(QString::fromLatin1("prototype")) ); // init class: engine.globalObject().setProperty("RRestrictAngleLength", ctor, QScriptValue::SkipInEnumeration); if( protoCreated ){ delete proto; } }
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: // enum conversions: // init class: engine.globalObject().setProperty("RLeaderData", ctor, QScriptValue::SkipInEnumeration); if( protoCreated ){ delete proto; } }
void REcmaSharedPointerRay::initEcma(QScriptEngine& engine, QScriptValue* proto ) { bool protoCreated = false; if(proto == NULL){ proto = new QScriptValue(engine.newVariant(qVariantFromValue( (RRayPointer*) 0))); protoCreated = true; } // primary base class RXLine: proto->setPrototype(engine.defaultPrototype( qMetaTypeId<RXLinePointer>())); /* */ 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 RXLine REcmaHelper::registerFunction(&engine, proto, getRXLine, "getRXLine"); // conversion for base class RShape REcmaHelper::registerFunction(&engine, proto, getRShape, "getRShape"); // conversion for base class RDirected REcmaHelper::registerFunction(&engine, proto, getRDirected, "getRDirected"); // 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, trimEndPoint, "trimEndPoint"); REcmaHelper::registerFunction(&engine, proto, getPointsWithDistanceToEnd, "getPointsWithDistanceToEnd"); REcmaHelper::registerFunction(&engine, proto, reverse, "reverse"); REcmaHelper::registerFunction(&engine, proto, getClippedLine, "getClippedLine"); REcmaHelper::registerFunction(&engine, proto, getVectorTo, "getVectorTo"); REcmaHelper::registerFunction(&engine, proto, stretch, "stretch"); engine.setDefaultPrototype( qMetaTypeId<RRayPointer>(), *proto); QScriptValue ctor = engine.newFunction(createEcma, *proto, 2); // static methods: // static properties: // enum values: // enum conversions: // init class: engine.globalObject().setProperty("RRayPointer", ctor, QScriptValue::SkipInEnumeration); if( protoCreated ){ delete proto; } }
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: // enum values: // enum conversions: // init class: engine.globalObject().setProperty("ROrthoGrid", ctor, QScriptValue::SkipInEnumeration); if( protoCreated ){ delete proto; } }
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: // enum conversions: // init class: engine.globalObject().setProperty("RMdiChildQt", ctor, QScriptValue::SkipInEnumeration); if( protoCreated ) { delete proto; } }
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", qScriptValueFromValue(&engine, RLinetype::PropertyName), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); // enum values: // enum conversions: // init class: engine.globalObject().setProperty("RLinetypePointer", ctor, QScriptValue::SkipInEnumeration); if( protoCreated ){ delete proto; } }
void REcmaSharedPointerAttributeDefinitionData::init(QScriptEngine& engine, QScriptValue* proto ) { bool protoCreated = false; if(proto == NULL){ proto = new QScriptValue(engine.newVariant(qVariantFromValue( (RAttributeDefinitionDataPointer*) 0))); protoCreated = true; } // primary base class RTextBasedData: proto->setPrototype(engine.defaultPrototype( qMetaTypeId<RTextBasedDataPointer>())); /* */ 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 RTextBasedData REcmaHelper::registerFunction(&engine, proto, getRTextBasedData, "getRTextBasedData"); // conversion for base class REntityData REcmaHelper::registerFunction(&engine, proto, getREntityData, "getREntityData"); // conversion for base class RPainterPathSource REcmaHelper::registerFunction(&engine, proto, getRPainterPathSource, "getRPainterPathSource"); // 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, getTag, "getTag"); REcmaHelper::registerFunction(&engine, proto, setTag, "setTag"); REcmaHelper::registerFunction(&engine, proto, getPrompt, "getPrompt"); REcmaHelper::registerFunction(&engine, proto, setPrompt, "setPrompt"); REcmaHelper::registerFunction(&engine, proto, getRenderedText, "getRenderedText"); engine.setDefaultPrototype( qMetaTypeId<RAttributeDefinitionDataPointer>(), *proto); QScriptValue ctor = engine.newFunction(create, *proto, 2); // static methods: // static properties: // enum values: // enum conversions: // init class: engine.globalObject().setProperty("RAttributeDefinitionDataPointer", ctor, QScriptValue::SkipInEnumeration); if( protoCreated ){ delete proto; } }
void REcmaRefPoint::initEcma(QScriptEngine& engine, QScriptValue* proto ) { bool protoCreated = false; if(proto == NULL){ proto = new QScriptValue(engine.newVariant(qVariantFromValue( (RRefPoint*) 0))); protoCreated = true; } // primary base class RVector: QScriptValue dpt = engine.defaultPrototype( qMetaTypeId<RVector*>()); 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 RVector REcmaHelper::registerFunction(&engine, proto, getRVector, "getRVector"); // 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, isSecondary, "isSecondary"); REcmaHelper::registerFunction(&engine, proto, setSecondary, "setSecondary"); REcmaHelper::registerFunction(&engine, proto, isIgnore, "isIgnore"); REcmaHelper::registerFunction(&engine, proto, setIgnore, "setIgnore"); REcmaHelper::registerFunction(&engine, proto, isCenter, "isCenter"); REcmaHelper::registerFunction(&engine, proto, setCenter, "setCenter"); REcmaHelper::registerFunction(&engine, proto, isStart, "isStart"); REcmaHelper::registerFunction(&engine, proto, setStart, "setStart"); REcmaHelper::registerFunction(&engine, proto, isEnd, "isEnd"); REcmaHelper::registerFunction(&engine, proto, setEnd, "setEnd"); REcmaHelper::registerFunction(&engine, proto, setFlag, "setFlag"); REcmaHelper::registerFunction(&engine, proto, getFlag, "getFlag"); REcmaHelper::registerFunction(&engine, proto, getFlags, "getFlags"); REcmaHelper::registerFunction(&engine, proto, setFlags, "setFlags"); engine.setDefaultPrototype( qMetaTypeId<RRefPoint*>(), *proto); engine.setDefaultPrototype(qMetaTypeId< RRefPoint > (), *proto); QScriptValue ctor = engine.newFunction(createEcma, *proto, 2); // static methods: REcmaHelper::registerFunction(&engine, &ctor, toVectorList, "toVectorList"); REcmaHelper::registerFunction(&engine, &ctor, toRefPointList, "toRefPointList"); // static properties: // enum values: ctor.setProperty("NoFlags", QScriptValue(RRefPoint::NoFlags), QScriptValue::ReadOnly); ctor.setProperty("Secondary", QScriptValue(RRefPoint::Secondary), QScriptValue::ReadOnly); ctor.setProperty("Center", QScriptValue(RRefPoint::Center), QScriptValue::ReadOnly); ctor.setProperty("Ignore", QScriptValue(RRefPoint::Ignore), QScriptValue::ReadOnly); ctor.setProperty("Start", QScriptValue(RRefPoint::Start), QScriptValue::ReadOnly); ctor.setProperty("End", QScriptValue(RRefPoint::End), QScriptValue::ReadOnly); // enum conversions: qScriptRegisterMetaType<RRefPoint::Flag>( &engine, toScriptValueEnumFlag, fromScriptValueEnumFlag, ctor.property(QString::fromLatin1("prototype")) ); // init class: engine.globalObject().setProperty("RRefPoint", ctor, QScriptValue::SkipInEnumeration); if( protoCreated ){ delete proto; } }
void REcmaTextEntity::initEcma(QScriptEngine& engine, QScriptValue* proto ) { bool protoCreated = false; if(proto == NULL) { proto = new QScriptValue(engine.newVariant(qVariantFromValue( (RTextEntity*) 0))); protoCreated = true; } // primary base class RTextBasedEntity: QScriptValue dpt = engine.defaultPrototype( qMetaTypeId<RTextBasedEntity*>()); 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 RTextBasedEntity REcmaHelper::registerFunction(&engine, proto, getRTextBasedEntity, "getRTextBasedEntity"); // 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, getData, "getData"); REcmaHelper::registerFunction(&engine, proto, setData, "setData"); engine.setDefaultPrototype( qMetaTypeId<RTextEntity*>(), *proto); QScriptValue ctor = engine.newFunction(create, *proto, 2); // static methods: REcmaHelper::registerFunction(&engine, &ctor, init, "init"); REcmaHelper::registerFunction(&engine, &ctor, getStaticPropertyTypeIds, "getStaticPropertyTypeIds"); // static properties: ctor.setProperty("PropertyCustom", qScriptValueFromValue(&engine, RTextEntity::PropertyCustom), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyHandle", qScriptValueFromValue(&engine, RTextEntity::PropertyHandle), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyProtected", qScriptValueFromValue(&engine, RTextEntity::PropertyProtected), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyType", qScriptValueFromValue(&engine, RTextEntity::PropertyType), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyBlock", qScriptValueFromValue(&engine, RTextEntity::PropertyBlock), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyLayer", qScriptValueFromValue(&engine, RTextEntity::PropertyLayer), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyLinetype", qScriptValueFromValue(&engine, RTextEntity::PropertyLinetype), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyLinetypeScale", qScriptValueFromValue(&engine, RTextEntity::PropertyLinetypeScale), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyLineweight", qScriptValueFromValue(&engine, RTextEntity::PropertyLineweight), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyColor", qScriptValueFromValue(&engine, RTextEntity::PropertyColor), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyDisplayedColor", qScriptValueFromValue(&engine, RTextEntity::PropertyDisplayedColor), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyDrawOrder", qScriptValueFromValue(&engine, RTextEntity::PropertyDrawOrder), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertySimple", qScriptValueFromValue(&engine, RTextEntity::PropertySimple), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyPositionX", qScriptValueFromValue(&engine, RTextEntity::PropertyPositionX), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyPositionY", qScriptValueFromValue(&engine, RTextEntity::PropertyPositionY), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyPositionZ", qScriptValueFromValue(&engine, RTextEntity::PropertyPositionZ), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyText", qScriptValueFromValue(&engine, RTextEntity::PropertyText), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyPlainText", qScriptValueFromValue(&engine, RTextEntity::PropertyPlainText), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyFontName", qScriptValueFromValue(&engine, RTextEntity::PropertyFontName), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyHeight", qScriptValueFromValue(&engine, RTextEntity::PropertyHeight), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyAngle", qScriptValueFromValue(&engine, RTextEntity::PropertyAngle), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyXScale", qScriptValueFromValue(&engine, RTextEntity::PropertyXScale), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyBold", qScriptValueFromValue(&engine, RTextEntity::PropertyBold), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyItalic", qScriptValueFromValue(&engine, RTextEntity::PropertyItalic), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyLineSpacingFactor", qScriptValueFromValue(&engine, RTextEntity::PropertyLineSpacingFactor), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyHAlign", qScriptValueFromValue(&engine, RTextEntity::PropertyHAlign), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyVAlign", qScriptValueFromValue(&engine, RTextEntity::PropertyVAlign), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); // enum values: // enum conversions: // init class: engine.globalObject().setProperty("RTextEntity", ctor, QScriptValue::SkipInEnumeration); if( protoCreated ) { delete proto; } }
// includes for base ecma wrapper classes void REcmaMathLineEdit::initEcma(QScriptEngine& engine, QScriptValue* proto ) { bool protoCreated = false; if(proto == NULL){ proto = new QScriptValue(engine.newVariant(qVariantFromValue( (RMathLineEdit*) 0))); protoCreated = true; } // primary base class QLineEdit: QScriptValue dpt = engine.defaultPrototype( qMetaTypeId<QLineEdit*>()); 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 QLineEdit REcmaHelper::registerFunction(&engine, proto, getQLineEdit, "getQLineEdit"); // 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, isAngle, "isAngle"); REcmaHelper::registerFunction(&engine, proto, setAngle, "setAngle"); REcmaHelper::registerFunction(&engine, proto, isInteger, "isInteger"); REcmaHelper::registerFunction(&engine, proto, setInteger, "setInteger"); REcmaHelper::registerFunction(&engine, proto, setValue, "setValue"); REcmaHelper::registerFunction(&engine, proto, getValue, "getValue"); REcmaHelper::registerFunction(&engine, proto, getError, "getError"); REcmaHelper::registerFunction(&engine, proto, clearError, "clearError"); REcmaHelper::registerFunction(&engine, proto, isValid, "isValid"); REcmaHelper::registerFunction(&engine, proto, setToolTip, "setToolTip"); REcmaHelper::registerFunction(&engine, proto, slotTextChanged, "slotTextChanged"); REcmaHelper::registerFunction(&engine, proto, slotTextEdited, "slotTextEdited"); engine.setDefaultPrototype( qMetaTypeId<RMathLineEdit*>(), *proto); qScriptRegisterMetaType< RMathLineEdit*>( &engine, toScriptValue, fromScriptValue, *proto); QScriptValue ctor = engine.newFunction(createEcma, *proto, 2); // static methods: // static properties: // enum values: // enum conversions: // init class: engine.globalObject().setProperty("RMathLineEdit", ctor, QScriptValue::SkipInEnumeration); if( protoCreated ){ delete proto; } }
void REcmaWheelEvent::initEcma(QScriptEngine& engine, QScriptValue* proto ) { bool protoCreated = false; if(proto == NULL){ proto = new QScriptValue(engine.newVariant(qVariantFromValue( (RWheelEvent*) 0))); protoCreated = true; } // primary base class QWheelEvent: QScriptValue dpt = engine.defaultPrototype( qMetaTypeId<QWheelEvent*>()); if (dpt.isValid()) { proto->setPrototype(dpt); } /* REcmaInputEvent::initEcma(engine, proto); */ QScriptValue fun; // toString: REcmaHelper::registerFunction(&engine, proto, toString, "toString"); // destroy: REcmaHelper::registerFunction(&engine, proto, destroy, "destroy"); // conversion for base class QWheelEvent REcmaHelper::registerFunction(&engine, proto, getQWheelEvent, "getQWheelEvent"); // conversion for base class RInputEvent REcmaHelper::registerFunction(&engine, proto, getRInputEvent, "getRInputEvent"); // 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 RInputEvent: // methods of secondary base class RInputEvent: REcmaHelper::registerFunction(&engine, proto, getModelPosition, "getModelPosition"); REcmaHelper::registerFunction(&engine, proto, setModelPosition, "setModelPosition"); REcmaHelper::registerFunction(&engine, proto, setScreenPosition, "setScreenPosition"); REcmaHelper::registerFunction(&engine, proto, getScreenPosition, "getScreenPosition"); REcmaHelper::registerFunction(&engine, proto, getGraphicsView, "getGraphicsView"); REcmaHelper::registerFunction(&engine, proto, getGraphicsScene, "getGraphicsScene"); REcmaHelper::registerFunction(&engine, proto, isValid, "isValid"); // properties: // methods: engine.setDefaultPrototype( qMetaTypeId<RWheelEvent*>(), *proto); QScriptValue ctor = engine.newFunction(createEcma, *proto, 2); // static methods: // static properties: // enum values: // enum conversions: // init class: engine.globalObject().setProperty("RWheelEvent", ctor, QScriptValue::SkipInEnumeration); if( protoCreated ){ delete proto; } }
void REcmaBlock::initEcma(QScriptEngine& engine, QScriptValue* proto ) { bool protoCreated = false; if(proto == NULL) { proto = new QScriptValue(engine.newVariant(qVariantFromValue( (RBlock*) 0))); protoCreated = true; } // primary base class RObject: QScriptValue dpt = engine.defaultPrototype( qMetaTypeId<RObject*>()); 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 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, getType, "getType"); REcmaHelper::registerFunction(&engine, proto, clone, "clone"); REcmaHelper::registerFunction(&engine, proto, getName, "getName"); REcmaHelper::registerFunction(&engine, proto, setName, "setName"); REcmaHelper::registerFunction(&engine, proto, isFrozen, "isFrozen"); REcmaHelper::registerFunction(&engine, proto, setFrozen, "setFrozen"); REcmaHelper::registerFunction(&engine, proto, isAnonymous, "isAnonymous"); REcmaHelper::registerFunction(&engine, proto, setAnonymous, "setAnonymous"); REcmaHelper::registerFunction(&engine, proto, setOrigin, "setOrigin"); REcmaHelper::registerFunction(&engine, proto, getOrigin, "getOrigin"); REcmaHelper::registerFunction(&engine, proto, getProperty, "getProperty"); REcmaHelper::registerFunction(&engine, proto, setProperty, "setProperty"); REcmaHelper::registerFunction(&engine, proto, isSelectedForPropertyEditing, "isSelectedForPropertyEditing"); engine.setDefaultPrototype( qMetaTypeId<RBlock*>(), *proto); QScriptValue ctor = engine.newFunction(createEcma, *proto, 2); // static methods: REcmaHelper::registerFunction(&engine, &ctor, init, "init"); // static properties: ctor.setProperty("PropertyCustom", qScriptValueFromValue(&engine, RBlock::PropertyCustom), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyName", qScriptValueFromValue(&engine, RBlock::PropertyName), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyFrozen", qScriptValueFromValue(&engine, RBlock::PropertyFrozen), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("modelSpaceName", qScriptValueFromValue(&engine, RBlock::modelSpaceName), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); // enum values: // enum conversions: // init class: engine.globalObject().setProperty("RBlock", ctor, QScriptValue::SkipInEnumeration); if( protoCreated ) { delete proto; } }
void REcmaSharedPointerUcs::initEcma(QScriptEngine& engine, QScriptValue* proto ) { bool protoCreated = false; if(proto == NULL){ proto = new QScriptValue(engine.newVariant(qVariantFromValue( (RUcsPointer*) 0))); protoCreated = true; } // primary base class RObject: proto->setPrototype(engine.defaultPrototype( qMetaTypeId<RObjectPointer>())); /* */ 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 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, getType, "getType"); REcmaHelper::registerFunction(&engine, proto, clone, "clone"); REcmaHelper::registerFunction(&engine, proto, isSelectedForPropertyEditing, "isSelectedForPropertyEditing"); REcmaHelper::registerFunction(&engine, proto, getProperty, "getProperty"); REcmaHelper::registerFunction(&engine, proto, setProperty, "setProperty"); REcmaHelper::registerFunction(&engine, proto, setOrigin, "setOrigin"); REcmaHelper::registerFunction(&engine, proto, setXAxisDirection, "setXAxisDirection"); REcmaHelper::registerFunction(&engine, proto, setYAxisDirection, "setYAxisDirection"); REcmaHelper::registerFunction(&engine, proto, getZAxisDirection, "getZAxisDirection"); REcmaHelper::registerFunction(&engine, proto, mapFromUcs, "mapFromUcs"); REcmaHelper::registerFunction(&engine, proto, mapToUcs, "mapToUcs"); engine.setDefaultPrototype( qMetaTypeId<RUcsPointer>(), *proto); QScriptValue ctor = engine.newFunction(createEcma, *proto, 2); // static methods: REcmaHelper::registerFunction(&engine, &ctor, init, "init"); // static properties: ctor.setProperty("PropertyName", qScriptValueFromValue(&engine, RUcs::PropertyName), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyOriginX", qScriptValueFromValue(&engine, RUcs::PropertyOriginX), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyOriginY", qScriptValueFromValue(&engine, RUcs::PropertyOriginY), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyOriginZ", qScriptValueFromValue(&engine, RUcs::PropertyOriginZ), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyXAxisDirectionX", qScriptValueFromValue(&engine, RUcs::PropertyXAxisDirectionX), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyXAxisDirectionY", qScriptValueFromValue(&engine, RUcs::PropertyXAxisDirectionY), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyXAxisDirectionZ", qScriptValueFromValue(&engine, RUcs::PropertyXAxisDirectionZ), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyYAxisDirectionX", qScriptValueFromValue(&engine, RUcs::PropertyYAxisDirectionX), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyYAxisDirectionY", qScriptValueFromValue(&engine, RUcs::PropertyYAxisDirectionY), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); ctor.setProperty("PropertyYAxisDirectionZ", qScriptValueFromValue(&engine, RUcs::PropertyYAxisDirectionZ), QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); // enum values: // enum conversions: // init class: engine.globalObject().setProperty("RUcsPointer", ctor, QScriptValue::SkipInEnumeration); if( protoCreated ){ delete proto; } }
// includes for base ecma wrapper classes void REcmaWebView::initEcma(QScriptEngine& engine, QScriptValue* proto ) { bool protoCreated = false; if(proto == NULL){ proto = new QScriptValue(engine.newVariant(qVariantFromValue( (RWebView*) 0))); protoCreated = true; } // primary base class QWebView: QScriptValue dpt = engine.defaultPrototype( qMetaTypeId<QWebView*>()); 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 QWebView REcmaHelper::registerFunction(&engine, proto, getQWebView, "getQWebView"); // 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, sizeHint, "sizeHint"); REcmaHelper::registerFunction(&engine, proto, minimumSizeHint, "minimumSizeHint"); engine.setDefaultPrototype( qMetaTypeId<RWebView*>(), *proto); qScriptRegisterMetaType< RWebView*>( &engine, toScriptValue, fromScriptValue, *proto); QScriptValue ctor = engine.newFunction(create, *proto, 2); // static methods: // static properties: // enum values: // enum conversions: // init class: engine.globalObject().setProperty("RWebView", ctor, QScriptValue::SkipInEnumeration); if( protoCreated ){ delete proto; } }
void REcmaPasteOperation::init(QScriptEngine& engine, QScriptValue* proto ) { bool protoCreated = false; if(proto == NULL){ proto = new QScriptValue(engine.newVariant(qVariantFromValue( (RPasteOperation*) 0))); protoCreated = true; } // primary base class RClipboardOperation: QScriptValue dpt = engine.defaultPrototype( qMetaTypeId<RClipboardOperation*>()); 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 RClipboardOperation REcmaHelper::registerFunction(&engine, proto, getRClipboardOperation, "getRClipboardOperation"); // 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, setOffset, "setOffset"); REcmaHelper::registerFunction(&engine, proto, getOffset, "getOffset"); REcmaHelper::registerFunction(&engine, proto, setScale, "setScale"); REcmaHelper::registerFunction(&engine, proto, getScale, "getScale"); REcmaHelper::registerFunction(&engine, proto, setRotation, "setRotation"); REcmaHelper::registerFunction(&engine, proto, getRotation, "getRotation"); REcmaHelper::registerFunction(&engine, proto, setFlipHorizontal, "setFlipHorizontal"); REcmaHelper::registerFunction(&engine, proto, getFlipHorizontal, "getFlipHorizontal"); REcmaHelper::registerFunction(&engine, proto, setFlipVertical, "setFlipVertical"); REcmaHelper::registerFunction(&engine, proto, getFlipVertical, "getFlipVertical"); REcmaHelper::registerFunction(&engine, proto, setToCurrentLayer, "setToCurrentLayer"); REcmaHelper::registerFunction(&engine, proto, getToCurrentLayer, "getToCurrentLayer"); REcmaHelper::registerFunction(&engine, proto, setOverwriteLayers, "setOverwriteLayers"); REcmaHelper::registerFunction(&engine, proto, getOverwriteLayers, "getOverwriteLayers"); REcmaHelper::registerFunction(&engine, proto, setOverwriteBlocks, "setOverwriteBlocks"); REcmaHelper::registerFunction(&engine, proto, getOverwriteBlocks, "getOverwriteBlocks"); REcmaHelper::registerFunction(&engine, proto, setBlockName, "setBlockName"); REcmaHelper::registerFunction(&engine, proto, getBlockName, "getBlockName"); REcmaHelper::registerFunction(&engine, proto, apply, "apply"); REcmaHelper::registerFunction(&engine, proto, getBoundary, "getBoundary"); engine.setDefaultPrototype( qMetaTypeId<RPasteOperation*>(), *proto); QScriptValue ctor = engine.newFunction(create, *proto, 2); // static methods: // static properties: // enum values: // enum conversions: // init class: engine.globalObject().setProperty("RPasteOperation", ctor, QScriptValue::SkipInEnumeration); if( protoCreated ){ delete proto; } }
void REcmaFileExporterAdapter::init(QScriptEngine& engine, QScriptValue* proto ) { bool protoCreated = false; if(proto == NULL){ proto = new QScriptValue(engine.newVariant(qVariantFromValue( (RFileExporterAdapter*) 0))); protoCreated = true; } // primary base class RFileExporter: QScriptValue dpt = engine.defaultPrototype( qMetaTypeId<RFileExporter*>()); 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 RFileExporter REcmaHelper::registerFunction(&engine, proto, getRFileExporter, "getRFileExporter"); // conversion for base class RExporter REcmaHelper::registerFunction(&engine, proto, getRExporter, "getRExporter"); // 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, getCorrectedFileName, "getCorrectedFileName"); REcmaHelper::registerFunction(&engine, proto, exportFile, "exportFile"); REcmaHelper::registerFunction(&engine, proto, exportPoint, "exportPoint"); REcmaHelper::registerFunction(&engine, proto, exportArcSegment, "exportArcSegment"); REcmaHelper::registerFunction(&engine, proto, exportLineSegment, "exportLineSegment"); REcmaHelper::registerFunction(&engine, proto, exportTriangle, "exportTriangle"); REcmaHelper::registerFunction(&engine, proto, getPatternFactor, "getPatternFactor"); engine.setDefaultPrototype( qMetaTypeId<RFileExporterAdapter*>(), *proto); QScriptValue ctor = engine.newFunction(create, *proto, 2); // static methods: // static properties: // enum values: // enum conversions: // init class: engine.globalObject().setProperty("RFileExporterAdapter", ctor, QScriptValue::SkipInEnumeration); if( protoCreated ){ delete proto; } }
void REcmaSnapEnd::initEcma(QScriptEngine& engine, QScriptValue* proto ) { bool protoCreated = false; if(proto == NULL){ proto = new QScriptValue(engine.newVariant(qVariantFromValue( (RSnapEnd*) 0))); protoCreated = true; } // primary base class RSnapEntityBase: QScriptValue dpt = engine.defaultPrototype( qMetaTypeId<RSnapEntityBase*>()); 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 RSnapEntityBase REcmaHelper::registerFunction(&engine, proto, getRSnapEntityBase, "getRSnapEntityBase"); // conversion for base class RSnap REcmaHelper::registerFunction(&engine, proto, getRSnap, "getRSnap"); // get class name REcmaHelper::registerFunction(&engine, proto, getClassName, "getClassName"); // conversion to all base classes (multiple inheritance): REcmaHelper::registerFunction(&engine, proto, getBaseClasses, "getBaseClasses"); // properties: // methods: engine.setDefaultPrototype( qMetaTypeId<RSnapEnd*>(), *proto); QScriptValue ctor = engine.newFunction(createEcma, *proto, 2); // static methods: // static properties: // enum values: // enum conversions: // init class: engine.globalObject().setProperty("RSnapEnd", ctor, QScriptValue::SkipInEnumeration); if( protoCreated ){ delete proto; } }
void REcmaNavigationAction::initEcma(QScriptEngine& engine, QScriptValue* proto ) { bool protoCreated = false; if(proto == NULL){ proto = new QScriptValue(engine.newVariant(qVariantFromValue( (RNavigationAction*) 0))); protoCreated = true; } // primary base class RActionAdapter: QScriptValue dpt = engine.defaultPrototype( qMetaTypeId<RActionAdapter*>()); 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 RActionAdapter REcmaHelper::registerFunction(&engine, proto, getRActionAdapter, "getRActionAdapter"); // conversion for base class RAction REcmaHelper::registerFunction(&engine, proto, getRAction, "getRAction"); // 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, mousePressEvent, "mousePressEvent"); REcmaHelper::registerFunction(&engine, proto, mouseReleaseEvent, "mouseReleaseEvent"); REcmaHelper::registerFunction(&engine, proto, mouseMoveEvent, "mouseMoveEvent"); engine.setDefaultPrototype( qMetaTypeId<RNavigationAction*>(), *proto); QScriptValue ctor = engine.newFunction(create, *proto, 2); // static methods: // static properties: // enum values: // enum conversions: // init class: engine.globalObject().setProperty("RNavigationAction", ctor, QScriptValue::SkipInEnumeration); if( protoCreated ){ delete proto; } }