示例#1
0
                 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;
    }
    
    }
示例#2
0
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;
    }

}
示例#3
0
        // includes for base ecma wrapper classes
         void REcmaTransformation::initEcma(QScriptEngine& engine, QScriptValue* proto 
    
    ) 
    
    {

    bool protoCreated = false;
    if(proto == NULL){
        proto = new QScriptValue(engine.newVariant(qVariantFromValue(
                (RTransformation*) 0)));
        protoCreated = true;
    }

    

    QScriptValue fun;

    // toString:
    REcmaHelper::registerFunction(&engine, proto, toString, "toString");
    

    // destroy:
    REcmaHelper::registerFunction(&engine, proto, destroy, "destroy");
    

    // 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<RTransformation*>(), *proto);

        
    

    QScriptValue ctor = engine.newFunction(createEcma, *proto, 2);
    
    // static methods:
    

    // static properties:
    

    // enum values:
    

    // enum conversions:
    
        
    // init class:
    engine.globalObject().setProperty("RTransformation",
    ctor, QScriptValue::SkipInEnumeration);
    
    if( protoCreated ){
       delete proto;
    }
    
    }
示例#4
0
                 void REcmaRulerQt::initEcma(QScriptEngine& engine, QScriptValue* proto 
    
    ) 
    
    {

    bool protoCreated = false;
    if(proto == NULL){
        proto = new QScriptValue(engine.newVariant(qVariantFromValue(
                (RRulerQt*) 0)));
        protoCreated = true;
    }

    
        // primary base class QFrame:
        
            QScriptValue dpt = engine.defaultPrototype(
                qMetaTypeId<QFrame*>());

            if (dpt.isValid()) {
                proto->setPrototype(dpt);
            }
          
        /*
        REcmaRuler::initEcma(engine, proto);
          REcmaCoordinateListener::initEcma(engine, proto);
          
        */
    

    QScriptValue fun;

    // toString:
    REcmaHelper::registerFunction(&engine, proto, toString, "toString");
    

    // destroy:
    REcmaHelper::registerFunction(&engine, proto, destroy, "destroy");
    
        // conversion for base class QFrame
        REcmaHelper::registerFunction(&engine, proto, getQFrame, "getQFrame");
        
        // conversion for base class RRuler
        REcmaHelper::registerFunction(&engine, proto, getRRuler, "getRRuler");
        
        // 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 RRuler:
        

        // methods of secondary base class RRuler:
        
            REcmaHelper::registerFunction(&engine, proto, setGraphicsView, "setGraphicsView");
            
            REcmaHelper::registerFunction(&engine, proto, getOrientation, "getOrientation");
            

        // properties of secondary base class RCoordinateListener:
        

        // methods of secondary base class RCoordinateListener:
        

    // properties:
    

    // methods:
    
            REcmaHelper::registerFunction(&engine, proto, setOrientation, "setOrientation");
            
            REcmaHelper::registerFunction(&engine, proto, sizeHint, "sizeHint");
            
            REcmaHelper::registerFunction(&engine, proto, paintTick, "paintTick");
            
            REcmaHelper::registerFunction(&engine, proto, getFont, "getFont");
            
            REcmaHelper::registerFunction(&engine, proto, updateViewport, "updateViewport");
            
            REcmaHelper::registerFunction(&engine, proto, updateCoordinate, "updateCoordinate");
            
        engine.setDefaultPrototype(
            qMetaTypeId<RRulerQt*>(), *proto);

        
                        qScriptRegisterMetaType<
                        RRulerQt*>(
                        &engine, toScriptValue, fromScriptValue, *proto);
                    
    

    QScriptValue ctor = engine.newFunction(create, *proto, 2);
    
    // static methods:
    

    // static properties:
    

    // enum values:
    

    // enum conversions:
    
        
    // init class:
    engine.globalObject().setProperty("RRulerQt",
    ctor, QScriptValue::SkipInEnumeration);
    
    if( protoCreated ){
       delete proto;
    }
    
    }
                 void REcmaExportListenerAdapter::initEcma(QScriptEngine& engine, QScriptValue* proto 
    
    ) 
    
    {

    bool protoCreated = false;
    if(proto == NULL){
        proto = new QScriptValue(engine.newVariant(qVariantFromValue(
                (RExportListenerAdapter*) 0)));
        protoCreated = true;
    }

    
        // primary base class QObject:
        
            QScriptValue dpt = engine.defaultPrototype(
                qMetaTypeId<QObject*>());

            if (dpt.isValid()) {
                proto->setPrototype(dpt);
            }
          
        /*
        REcmaExportListener::initEcma(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 RExportListener
        REcmaHelper::registerFunction(&engine, proto, getRExportListener, "getRExportListener");
        

    // 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 RExportListener:
        

        // methods of secondary base class RExportListener:
        

    // properties:
    

    // methods:
    
            REcmaHelper::registerFunction(&engine, proto, preExportEvent, "preExportEvent");
            
            REcmaHelper::registerFunction(&engine, proto, postExportEvent, "postExportEvent");
            
        engine.setDefaultPrototype(
            qMetaTypeId<RExportListenerAdapter*>(), *proto);

        
                        qScriptRegisterMetaType<
                        RExportListenerAdapter*>(
                        &engine, toScriptValue, fromScriptValue, *proto);
                    
    

    QScriptValue ctor = engine.newFunction(createEcma, *proto, 2);
    
    // static methods:
    

    // static properties:
    

    // enum values:
    

    // enum conversions:
    
        
    // init class:
    engine.globalObject().setProperty("RExportListenerAdapter",
    ctor, QScriptValue::SkipInEnumeration);
    
    if( protoCreated ){
       delete proto;
    }
    
    }
示例#6
0
                 void REcmaPointData::initEcma(QScriptEngine& engine, QScriptValue* proto 
    
    ) 
    
    {

    bool protoCreated = false;
    if(proto == NULL){
        proto = new QScriptValue(engine.newVariant(qVariantFromValue(
                (RPointData*) 0)));
        protoCreated = true;
    }

    
        // primary base class REntityData:
        
            QScriptValue dpt = engine.defaultPrototype(
                qMetaTypeId<REntityData*>());

            if (dpt.isValid()) {
                proto->setPrototype(dpt);
            }
          
        /*
        REcmaPoint::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, getPosition, "getPosition");
            
            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<RPointData*>(), *proto);

        
                engine.setDefaultPrototype(qMetaTypeId<
                RPointData
                > (), *proto);
            
    

    QScriptValue ctor = engine.newFunction(createEcma, *proto, 2);
    
    // static methods:
    

    // static properties:
    

    // enum values:
    

    // enum conversions:
    
        
    // init class:
    engine.globalObject().setProperty("RPointData",
    ctor, QScriptValue::SkipInEnumeration);
    
    if( protoCreated ){
       delete proto;
    }
    
    }
示例#7
0
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 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 REcmaPatternListMetric::initEcma(QScriptEngine& engine, QScriptValue* proto 
    
    ) 
    
    {

    bool protoCreated = false;
    if(proto == NULL){
        proto = new QScriptValue(engine.newVariant(qVariantFromValue(
                (RPatternListMetric*) 0)));
        protoCreated = true;
    }

    
        // primary base class RPatternList:
        
            QScriptValue dpt = engine.defaultPrototype(
                qMetaTypeId<RPatternList*>());

            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 RPatternList
        REcmaHelper::registerFunction(&engine, proto, getRPatternList, "getRPatternList");
        

    // 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<RPatternListMetric*>(), *proto);

        
    

    QScriptValue ctor = engine.newFunction(createEcma, *proto, 2);
    
    // static methods:
    
            REcmaHelper::registerFunction(&engine, &ctor, init, "init");
            
            REcmaHelper::registerFunction(&engine, &ctor, uninit, "uninit");
            
            REcmaHelper::registerFunction(&engine, &ctor, getNames, "getNames");
            
            REcmaHelper::registerFunction(&engine, &ctor, get, "get");
            

    // static properties:
    

    // enum values:
    

    // enum conversions:
    
        
    // init class:
    engine.globalObject().setProperty("RPatternListMetric",
    ctor, QScriptValue::SkipInEnumeration);
    
    if( protoCreated ){
       delete proto;
    }
    
    }
示例#10
0
文件: Agent.cpp 项目: digi-chris/hifi
void Agent::run() {
    NodeList* nodeList = NodeList::getInstance();
    nodeList->setOwnerType(NODE_TYPE_AGENT);
    
    const char AGENT_NODE_TYPES_OF_INTEREST[2] = { NODE_TYPE_VOXEL_SERVER, NODE_TYPE_AUDIO_MIXER };
    
    nodeList->setNodeTypesOfInterest(AGENT_NODE_TYPES_OF_INTEREST, sizeof(AGENT_NODE_TYPES_OF_INTEREST));

    nodeList->getNodeSocket()->setBlocking(false);
    
    // figure out the URL for the script for this agent assignment
    QString scriptURLString("http://%1:8080/assignment/%2");
    scriptURLString = scriptURLString.arg(NodeList::getInstance()->getDomainIP().toString(),
                                          uuidStringWithoutCurlyBraces(_uuid));
    
    // setup curl for script download
    CURLcode curlResult;
    
    CURL* curlHandle = curl_easy_init();
    
    // tell curl which file to grab
    curl_easy_setopt(curlHandle, CURLOPT_URL, scriptURLString.toStdString().c_str());
    
    // send the data to the WriteMemoryCallback function
    curl_easy_setopt(curlHandle, CURLOPT_WRITEFUNCTION, writeScriptDataToString);
    
    QString scriptContents;
    
    // pass the scriptContents QString to append data to
    curl_easy_setopt(curlHandle, CURLOPT_WRITEDATA, (void *)&scriptContents);
    
    // send a user agent since some servers will require it
    curl_easy_setopt(curlHandle, CURLOPT_USERAGENT, "libcurl-agent/1.0");
    
    // make sure CURL fails on a 400 code
    curl_easy_setopt(curlHandle, CURLOPT_FAILONERROR, true);
    
    qDebug() << "Downloading script at" << scriptURLString << "\n";
    
    // blocking get for JS file
    curlResult = curl_easy_perform(curlHandle);
  
    if (curlResult == CURLE_OK) {
        // cleanup curl
        curl_easy_cleanup(curlHandle);
        curl_global_cleanup();
        
        QScriptEngine engine;
        
        // register meta-type for glm::vec3 conversions
        qScriptRegisterMetaType(&engine, vec3toScriptValue, vec3FromScriptValue);
        
        QScriptValue agentValue = engine.newQObject(this);
        engine.globalObject().setProperty("Agent", agentValue);
        
        VoxelScriptingInterface voxelScripter;
        QScriptValue voxelScripterValue =  engine.newQObject(&voxelScripter);
        engine.globalObject().setProperty("Voxels", voxelScripterValue);
        
        QScriptValue treeScaleValue = engine.newVariant(QVariant(TREE_SCALE));
        engine.globalObject().setProperty("TREE_SCALE", treeScaleValue);

        // let the VoxelPacketSender know how frequently we plan to call it
        voxelScripter.getVoxelPacketSender()->setProcessCallIntervalHint(INJECT_INTERVAL_USECS);
        
        // hook in a constructor for audio injectorss
        AudioInjector scriptedAudioInjector(BUFFER_LENGTH_SAMPLES_PER_CHANNEL);
        QScriptValue audioInjectorValue = engine.newQObject(&scriptedAudioInjector);
        engine.globalObject().setProperty("AudioInjector", audioInjectorValue);
        
        qDebug() << "Downloaded script:" << scriptContents << "\n";
        QScriptValue result = engine.evaluate(scriptContents);
        qDebug() << "Evaluated script.\n";
        
        if (engine.hasUncaughtException()) {
            int line = engine.uncaughtExceptionLineNumber();
            qDebug() << "Uncaught exception at line" << line << ":" << result.toString() << "\n";
        }
        
        timeval startTime;
        gettimeofday(&startTime, NULL);
        
        timeval lastDomainServerCheckIn = {};
        
        sockaddr_in senderAddress;
        unsigned char receivedData[MAX_PACKET_SIZE];
        ssize_t receivedBytes;
        
        int thisFrame = 0;
        
        NodeList::getInstance()->startSilentNodeRemovalThread();
        
        while (!_shouldStop) {
            
            // if we're not hearing from the domain-server we should stop running
            if (NodeList::getInstance()->getNumNoReplyDomainCheckIns() == MAX_SILENT_DOMAIN_SERVER_CHECK_INS) {
                break;
            }
            
            // send a check in packet to the domain server if DOMAIN_SERVER_CHECK_IN_USECS has elapsed
            if (usecTimestampNow() - usecTimestamp(&lastDomainServerCheckIn) >= DOMAIN_SERVER_CHECK_IN_USECS) {
                gettimeofday(&lastDomainServerCheckIn, NULL);
                NodeList::getInstance()->sendDomainServerCheckIn();
            }
            
            // find the audio-mixer in the NodeList so we can inject audio at it
            Node* audioMixer = NodeList::getInstance()->soloNodeOfType(NODE_TYPE_AUDIO_MIXER);
            
        
            if (audioMixer && audioMixer->getActiveSocket()) {
                emit willSendAudioDataCallback();
            }
            
            int usecToSleep = usecTimestamp(&startTime) + (thisFrame++ * INJECT_INTERVAL_USECS) - usecTimestampNow();
            if (usecToSleep > 0) {
                usleep(usecToSleep);
            }
            
            if (audioMixer && audioMixer->getActiveSocket() && scriptedAudioInjector.hasSamplesToInject()) {
                // we have an audio mixer and samples to inject, send those off
                scriptedAudioInjector.injectAudio(NodeList::getInstance()->getNodeSocket(), audioMixer->getActiveSocket());
                
                // clear out the audio injector so that it doesn't re-send what we just sent
                scriptedAudioInjector.clear();
            }
        
            if (audioMixer && !audioMixer->getActiveSocket()) {
                // don't have an active socket for the audio-mixer, ping it now
                NodeList::getInstance()->pingPublicAndLocalSocketsForInactiveNode(audioMixer);
            }
            
            if (voxelScripter.getVoxelPacketSender()->voxelServersExist()) {
                // allow the scripter's call back to setup visual data
                emit willSendVisualDataCallback();
                
                // release the queue of edit voxel messages.
                voxelScripter.getVoxelPacketSender()->releaseQueuedMessages();
                
                // since we're in non-threaded mode, call process so that the packets are sent
                voxelScripter.getVoxelPacketSender()->process();

            }            
            
            if (engine.hasUncaughtException()) {
                int line = engine.uncaughtExceptionLineNumber();
                qDebug() << "Uncaught exception at line" << line << ":" << engine.uncaughtException().toString() << "\n";
            }

            while (NodeList::getInstance()->getNodeSocket()->receive((sockaddr*) &senderAddress, receivedData, &receivedBytes)
                   && packetVersionMatch(receivedData)) {
                if (receivedData[0] == PACKET_TYPE_VOXEL_JURISDICTION) {
                    voxelScripter.getJurisdictionListener()->queueReceivedPacket((sockaddr&) senderAddress,
                                                                                 receivedData,
                                                                                 receivedBytes);
                } else {
                    NodeList::getInstance()->processNodeData((sockaddr*) &senderAddress, receivedData, receivedBytes);
                }
            }
        }
    
        NodeList::getInstance()->stopSilentNodeRemovalThread(); 
        
    } else {
        // error in curl_easy_perform
        qDebug() << "curl_easy_perform for JS failed:" << curl_easy_strerror(curlResult) << "\n";
        
        // cleanup curl
        curl_easy_cleanup(curlHandle);
        curl_global_cleanup();
    }
}
示例#11
0
                 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;
    }
    
    }
示例#12
0
        // includes for base ecma wrapper classes
         void REcmaImporter::initEcma(QScriptEngine& engine, QScriptValue* proto 
    
    ) 
    
    {

    bool protoCreated = false;
    if(proto == NULL){
        proto = new QScriptValue(engine.newVariant(qVariantFromValue(
                (RImporter*) 0)));
        protoCreated = true;
    }

    

    QScriptValue fun;

    // toString:
    REcmaHelper::registerFunction(&engine, proto, toString, "toString");
    

    // destroy:
    REcmaHelper::registerFunction(&engine, proto, destroy, "destroy");
    

    // 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, startImport, "startImport");
            
            REcmaHelper::registerFunction(&engine, proto, endImport, "endImport");
            
            REcmaHelper::registerFunction(&engine, proto, importObject, "importObject");
            
            REcmaHelper::registerFunction(&engine, proto, setCurrentBlockId, "setCurrentBlockId");
            
            REcmaHelper::registerFunction(&engine, proto, getCurrentBlockId, "getCurrentBlockId");
            
            REcmaHelper::registerFunction(&engine, proto, getDocument, "getDocument");
            
            REcmaHelper::registerFunction(&engine, proto, setDocument, "setDocument");
            
            REcmaHelper::registerFunction(&engine, proto, setKnownVariable, "setKnownVariable");
            
        engine.setDefaultPrototype(
            qMetaTypeId<RImporter*>(), *proto);

        
    

    QScriptValue ctor = engine.newFunction(create, *proto, 2);
    
    // static methods:
    

    // static properties:
    

    // enum values:
    

    // enum conversions:
    
        
    // init class:
    engine.globalObject().setProperty("RImporter",
    ctor, QScriptValue::SkipInEnumeration);
    
    if( protoCreated ){
       delete proto;
    }
    
    }
示例#13
0
        // includes for base ecma wrapper classes
         void REcmaLinetypePattern::init(QScriptEngine& engine, QScriptValue* proto 
    
    ) 
    
    {

    bool protoCreated = false;
    if(proto == NULL){
        proto = new QScriptValue(engine.newVariant(qVariantFromValue(
                (RLinetypePattern*) 0)));
        protoCreated = true;
    }

    

    QScriptValue fun;

    // toString:
    REcmaHelper::registerFunction(&engine, proto, toString, "toString");
    
    // copy:
    REcmaHelper::registerFunction(&engine, proto, copy, "copy");
    

    // destroy:
    REcmaHelper::registerFunction(&engine, proto, destroy, "destroy");
    

    // 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, set, "set");
            
            REcmaHelper::registerFunction(&engine, proto, isValid, "isValid");
            
            REcmaHelper::registerFunction(&engine, proto, getNumDashes, "getNumDashes");
            
            REcmaHelper::registerFunction(&engine, proto, getPatternLength, "getPatternLength");
            
            REcmaHelper::registerFunction(&engine, proto, getDashLengthAt, "getDashLengthAt");
            
            REcmaHelper::registerFunction(&engine, proto, getLargestGap, "getLargestGap");
            
            REcmaHelper::registerFunction(&engine, proto, hasDashAt, "hasDashAt");
            
            REcmaHelper::registerFunction(&engine, proto, getDelta, "getDelta");
            
            REcmaHelper::registerFunction(&engine, proto, isSymmetrical, "isSymmetrical");
            
            REcmaHelper::registerFunction(&engine, proto, scale, "scale");
            
            REcmaHelper::registerFunction(&engine, proto, operator_assign, "operator_assign");
            
            REcmaHelper::registerFunction(&engine, proto, equals, "equals");
            
        engine.setDefaultPrototype(
            qMetaTypeId<RLinetypePattern*>(), *proto);

        
                engine.setDefaultPrototype(qMetaTypeId<
                RLinetypePattern
                > (), *proto);
            
    

    QScriptValue ctor = engine.newFunction(create, *proto, 2);
    
    // static methods:
    

    // static properties:
    

    // enum values:
    

    // enum conversions:
    
        
    // init class:
    engine.globalObject().setProperty("RLinetypePattern",
    ctor, QScriptValue::SkipInEnumeration);
    
    if( protoCreated ){
       delete proto;
    }
    
    }
示例#14
0
                 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;
    }
    
    }
示例#15
0
        // 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;
    }
    
    }
示例#16
0
                 void REcmaDimRotatedData::init(QScriptEngine& engine, QScriptValue* proto 
    
    ) 
    
    {

    bool protoCreated = false;
    if(proto == NULL){
        proto = new QScriptValue(engine.newVariant(qVariantFromValue(
                (RDimRotatedData*) 0)));
        protoCreated = true;
    }

    
        // primary base class RDimLinearData:
        
            QScriptValue dpt = engine.defaultPrototype(
                qMetaTypeId<RDimLinearData*>());

            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 RDimLinearData
        REcmaHelper::registerFunction(&engine, proto, getRDimLinearData, "getRDimLinearData");
        
        // 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, setRotation, "setRotation");
            
            REcmaHelper::registerFunction(&engine, proto, getRotation, "getRotation");
            
            REcmaHelper::registerFunction(&engine, proto, getReferencePoints, "getReferencePoints");
            
            REcmaHelper::registerFunction(&engine, proto, rotate, "rotate");
            
            REcmaHelper::registerFunction(&engine, proto, mirror, "mirror");
            
            REcmaHelper::registerFunction(&engine, proto, getShapes, "getShapes");
            
            REcmaHelper::registerFunction(&engine, proto, getMeasuredValue, "getMeasuredValue");
            
            REcmaHelper::registerFunction(&engine, proto, getAutoLabel, "getAutoLabel");
            
        engine.setDefaultPrototype(
            qMetaTypeId<RDimRotatedData*>(), *proto);

        
    

    QScriptValue ctor = engine.newFunction(create, *proto, 2);
    
    // static methods:
    

    // static properties:
    

    // enum values:
    

    // enum conversions:
    
        
    // init class:
    engine.globalObject().setProperty("RDimRotatedData",
    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;
    }
    
    }
示例#18
0
                 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 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;
    }
    
    }
        // includes for base ecma wrapper classes
         void REcmaSharedPointerDirected::initEcma(QScriptEngine& engine, QScriptValue* proto 
    
    ) 
    
    {

    bool protoCreated = false;
    if(proto == NULL){
        proto = new QScriptValue(engine.newVariant(qVariantFromValue(
                (RDirectedPointer*) 0)));
        protoCreated = true;
    }

    

    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");
    

    // 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, getDirection1, "getDirection1");
            
            REcmaHelper::registerFunction(&engine, proto, getDirection2, "getDirection2");
            
            REcmaHelper::registerFunction(&engine, proto, getSideOfPoint, "getSideOfPoint");
            
            REcmaHelper::registerFunction(&engine, proto, getStartPoint, "getStartPoint");
            
            REcmaHelper::registerFunction(&engine, proto, getEndPoint, "getEndPoint");
            
            REcmaHelper::registerFunction(&engine, proto, getMiddlePoint, "getMiddlePoint");
            
            REcmaHelper::registerFunction(&engine, proto, reverse, "reverse");
            
            REcmaHelper::registerFunction(&engine, proto, trimStartPoint, "trimStartPoint");
            
            REcmaHelper::registerFunction(&engine, proto, trimEndPoint, "trimEndPoint");
            
            REcmaHelper::registerFunction(&engine, proto, getTrimEnd, "getTrimEnd");
            
            REcmaHelper::registerFunction(&engine, proto, getDistanceFromStart, "getDistanceFromStart");
            
        engine.setDefaultPrototype(
            qMetaTypeId<RDirectedPointer>(), *proto);
      
    

    QScriptValue ctor = engine.newFunction(createEcma, *proto, 2);
    
    // static methods:
    

    // static properties:
    

    // enum values:
    

    // enum conversions:
    
        
    // init class:
    engine.globalObject().setProperty("RDirectedPointer",
    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;
    }
    
    }
示例#22
0
        // 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;
    }
    
    }
示例#23
0
                 void REcmaSharedPointerView::initEcma(QScriptEngine& engine, QScriptValue* proto 
    
    ) 
    
    {

    bool protoCreated = false;
    if(proto == NULL){
        proto = new QScriptValue(engine.newVariant(qVariantFromValue(
                (RViewPointer*) 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, clone, "clone");
            
            REcmaHelper::registerFunction(&engine, proto, getName, "getName");
            
            REcmaHelper::registerFunction(&engine, proto, setName, "setName");
            
            REcmaHelper::registerFunction(&engine, proto, getCenterPoint, "getCenterPoint");
            
            REcmaHelper::registerFunction(&engine, proto, setCenterPoint, "setCenterPoint");
            
            REcmaHelper::registerFunction(&engine, proto, getWidth, "getWidth");
            
            REcmaHelper::registerFunction(&engine, proto, setWidth, "setWidth");
            
            REcmaHelper::registerFunction(&engine, proto, getHeight, "getHeight");
            
            REcmaHelper::registerFunction(&engine, proto, setHeight, "setHeight");
            
            REcmaHelper::registerFunction(&engine, proto, getBox, "getBox");
            
            REcmaHelper::registerFunction(&engine, proto, getProperty, "getProperty");
            
            REcmaHelper::registerFunction(&engine, proto, setProperty, "setProperty");
            
            REcmaHelper::registerFunction(&engine, proto, isSelectedForPropertyEditing, "isSelectedForPropertyEditing");
            
        engine.setDefaultPrototype(
            qMetaTypeId<RViewPointer>(), *proto);
      
    

    QScriptValue ctor = engine.newFunction(create, *proto, 2);
    
    // static methods:
    
            REcmaHelper::registerFunction(&engine, &ctor, init, "init");
            

    // static properties:
    
            ctor.setProperty("PropertyName",
                qScriptValueFromValue(&engine, RView::PropertyName),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyCenterPoint",
                qScriptValueFromValue(&engine, RView::PropertyCenterPoint),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyWidth",
                qScriptValueFromValue(&engine, RView::PropertyWidth),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyHeight",
                qScriptValueFromValue(&engine, RView::PropertyHeight),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            

    // enum values:
    

    // enum conversions:
    
        
    // init class:
    engine.globalObject().setProperty("RViewPointer",
    ctor, QScriptValue::SkipInEnumeration);
    
    if( protoCreated ){
       delete proto;
    }
    
    }
示例#24
0
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;
    }

}
示例#25
0
        // 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;
    }
    
    }
示例#26
0
// includes for base ecma wrapper classes
void REcmaSharedPointerObject::init(QScriptEngine& engine, QScriptValue* proto

                                   )

{

    bool protoCreated = false;
    if(proto == NULL) {
        proto = new QScriptValue(engine.newVariant(qVariantFromValue(
                                     (RObjectPointer*) 0)));
        protoCreated = true;
    }



    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");


    // 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, getDocument, "getDocument");

    REcmaHelper::registerFunction(&engine, proto, setDocument, "setDocument");

    REcmaHelper::registerFunction(&engine, proto, getId, "getId");

    REcmaHelper::registerFunction(&engine, proto, getHandle, "getHandle");

    REcmaHelper::registerFunction(&engine, proto, isUndone, "isUndone");

    REcmaHelper::registerFunction(&engine, proto, setUndone, "setUndone");

    REcmaHelper::registerFunction(&engine, proto, getPropertyTypeIds, "getPropertyTypeIds");

    REcmaHelper::registerFunction(&engine, proto, getProperty, "getProperty");

    REcmaHelper::registerFunction(&engine, proto, setProperty, "setProperty");

    REcmaHelper::registerFunction(&engine, proto, hasPropertyType, "hasPropertyType");

    REcmaHelper::registerFunction(&engine, proto, isSelectedForPropertyEditing, "isSelectedForPropertyEditing");

    REcmaHelper::registerFunction(&engine, proto, getCustomProperty, "getCustomProperty");

    REcmaHelper::registerFunction(&engine, proto, setCustomProperty, "setCustomProperty");

    REcmaHelper::registerFunction(&engine, proto, removeCustomProperty, "removeCustomProperty");

    REcmaHelper::registerFunction(&engine, proto, getCustomPropertyKeys, "getCustomPropertyKeys");

    REcmaHelper::registerFunction(&engine, proto, getComplexity, "getComplexity");

    engine.setDefaultPrototype(
        qMetaTypeId<RObjectPointer>(), *proto);



    QScriptValue ctor = engine.newFunction(create, *proto, 2);

    // static methods:

    REcmaHelper::registerFunction(&engine, &ctor, init, "init");


    // static properties:

    ctor.setProperty("INVALID_ID",
                     qScriptValueFromValue(&engine, RObject::INVALID_ID),
                     QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);

    ctor.setProperty("INVALID_HANDLE",
                     qScriptValueFromValue(&engine, RObject::INVALID_HANDLE),
                     QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);

    ctor.setProperty("PropertyCustom",
                     qScriptValueFromValue(&engine, RObject::PropertyCustom),
                     QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);

    ctor.setProperty("PropertyHandle",
                     qScriptValueFromValue(&engine, RObject::PropertyHandle),
                     QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);


    // enum values:


    ctor.setProperty("X",
                     QScriptValue(RObject::X),
                     QScriptValue::ReadOnly);


    ctor.setProperty("Y",
                     QScriptValue(RObject::Y),
                     QScriptValue::ReadOnly);


    ctor.setProperty("Z",
                     QScriptValue(RObject::Z),
                     QScriptValue::ReadOnly);


    // enum conversions:

    qScriptRegisterMetaType<RObject::XYZ>(
        &engine,
        toScriptValueEnumXYZ,
        fromScriptValueEnumXYZ,
        ctor.property(QString::fromLatin1("prototype"))
    );


    // init class:
    engine.globalObject().setProperty("RObjectPointer",
                                      ctor, QScriptValue::SkipInEnumeration);

    if( protoCreated ) {
        delete proto;
    }

}
示例#27
0
                 void REcmaClipboardOperation::init(QScriptEngine& engine, QScriptValue* proto 
    
    ) 
    
    {

    bool protoCreated = false;
    if(proto == NULL){
        proto = new QScriptValue(engine.newVariant(qVariantFromValue(
                (RClipboardOperation*) 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:
    
        engine.setDefaultPrototype(
            qMetaTypeId<RClipboardOperation*>(), *proto);

        
    

    QScriptValue ctor = engine.newFunction(create, *proto, 2);
    
    // static methods:
    

    // static properties:
    

    // enum values:
    

    // enum conversions:
    
        
    // init class:
    engine.globalObject().setProperty("RClipboardOperation",
    ctor, QScriptValue::SkipInEnumeration);
    
    if( protoCreated ){
       delete proto;
    }
    
    }
示例#28
0
// includes for base ecma wrapper classes
void REcmaPluginLoader::init(QScriptEngine& engine, QScriptValue* proto

                            )

{

    bool protoCreated = false;
    if(proto == NULL) {
        proto = new QScriptValue(engine.newVariant(qVariantFromValue(
                                     (RPluginLoader*) 0)));
        protoCreated = true;
    }



    QScriptValue fun;

    // toString:
    REcmaHelper::registerFunction(&engine, proto, toString, "toString");


    // destroy:
    REcmaHelper::registerFunction(&engine, proto, destroy, "destroy");


    // 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<RPluginLoader*>(), *proto);




    QScriptValue ctor = engine.newFunction(create, *proto, 2);

    // static methods:

    REcmaHelper::registerFunction(&engine, &ctor, getPluginSuffix, "getPluginSuffix");

    REcmaHelper::registerFunction(&engine, &ctor, getPluginFiles, "getPluginFiles");

    REcmaHelper::registerFunction(&engine, &ctor, loadPlugins, "loadPlugins");

    REcmaHelper::registerFunction(&engine, &ctor, unloadPlugin, "unloadPlugin");

    REcmaHelper::registerFunction(&engine, &ctor, postInitPlugins, "postInitPlugins");

    REcmaHelper::registerFunction(&engine, &ctor, postInitPlugin, "postInitPlugin");

    REcmaHelper::registerFunction(&engine, &ctor, countPlugins, "countPlugins");

    REcmaHelper::registerFunction(&engine, &ctor, getPluginInfo, "getPluginInfo");

    REcmaHelper::registerFunction(&engine, &ctor, getPluginsPath, "getPluginsPath");


    // static properties:


    // enum values:


    // enum conversions:


    // init class:
    engine.globalObject().setProperty("RPluginLoader",
                                      ctor, QScriptValue::SkipInEnumeration);

    if( protoCreated ) {
        delete proto;
    }

}
                 void REcmaSharedPointerDimAlignedEntity::init(QScriptEngine& engine, QScriptValue* proto 
    
    ) 
    
    {

    bool protoCreated = false;
    if(proto == NULL){
        proto = new QScriptValue(engine.newVariant(qVariantFromValue(
                (RDimAlignedEntityPointer*) 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, setExtensionPoint1, "setExtensionPoint1");
            
            REcmaHelper::registerFunction(&engine, proto, getExtensionPoint1, "getExtensionPoint1");
            
            REcmaHelper::registerFunction(&engine, proto, setExtensionPoint2, "setExtensionPoint2");
            
            REcmaHelper::registerFunction(&engine, proto, getExtensionPoint2, "getExtensionPoint2");
            
        engine.setDefaultPrototype(
            qMetaTypeId<RDimAlignedEntityPointer>(), *proto);
      
    

    QScriptValue ctor = engine.newFunction(create, *proto, 2);
    
    // static methods:
    
            REcmaHelper::registerFunction(&engine, &ctor, init, "init");
            

    // static properties:
    
            ctor.setProperty("PropertyCustom",
                qScriptValueFromValue(&engine, RDimAlignedEntity::PropertyCustom),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyHandle",
                qScriptValueFromValue(&engine, RDimAlignedEntity::PropertyHandle),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyType",
                qScriptValueFromValue(&engine, RDimAlignedEntity::PropertyType),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyBlock",
                qScriptValueFromValue(&engine, RDimAlignedEntity::PropertyBlock),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyLayer",
                qScriptValueFromValue(&engine, RDimAlignedEntity::PropertyLayer),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyLinetype",
                qScriptValueFromValue(&engine, RDimAlignedEntity::PropertyLinetype),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyLineweight",
                qScriptValueFromValue(&engine, RDimAlignedEntity::PropertyLineweight),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyColor",
                qScriptValueFromValue(&engine, RDimAlignedEntity::PropertyColor),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyDrawOrder",
                qScriptValueFromValue(&engine, RDimAlignedEntity::PropertyDrawOrder),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyMiddleOfTextX",
                qScriptValueFromValue(&engine, RDimAlignedEntity::PropertyMiddleOfTextX),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyMiddleOfTextY",
                qScriptValueFromValue(&engine, RDimAlignedEntity::PropertyMiddleOfTextY),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyMiddleOfTextZ",
                qScriptValueFromValue(&engine, RDimAlignedEntity::PropertyMiddleOfTextZ),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyText",
                qScriptValueFromValue(&engine, RDimAlignedEntity::PropertyText),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyUpperTolerance",
                qScriptValueFromValue(&engine, RDimAlignedEntity::PropertyUpperTolerance),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyLowerTolerance",
                qScriptValueFromValue(&engine, RDimAlignedEntity::PropertyLowerTolerance),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyDimensionLinePosX",
                qScriptValueFromValue(&engine, RDimAlignedEntity::PropertyDimensionLinePosX),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyDimensionLinePosY",
                qScriptValueFromValue(&engine, RDimAlignedEntity::PropertyDimensionLinePosY),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyDimensionLinePosZ",
                qScriptValueFromValue(&engine, RDimAlignedEntity::PropertyDimensionLinePosZ),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyExtensionPoint1X",
                qScriptValueFromValue(&engine, RDimAlignedEntity::PropertyExtensionPoint1X),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyExtensionPoint1Y",
                qScriptValueFromValue(&engine, RDimAlignedEntity::PropertyExtensionPoint1Y),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyExtensionPoint1Z",
                qScriptValueFromValue(&engine, RDimAlignedEntity::PropertyExtensionPoint1Z),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyExtensionPoint2X",
                qScriptValueFromValue(&engine, RDimAlignedEntity::PropertyExtensionPoint2X),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyExtensionPoint2Y",
                qScriptValueFromValue(&engine, RDimAlignedEntity::PropertyExtensionPoint2Y),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyExtensionPoint2Z",
                qScriptValueFromValue(&engine, RDimAlignedEntity::PropertyExtensionPoint2Z),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            

    // enum values:
    

    // enum conversions:
    
        
    // init class:
    engine.globalObject().setProperty("RDimAlignedEntityPointer",
    ctor, QScriptValue::SkipInEnumeration);
    
    if( protoCreated ){
       delete proto;
    }
    
    }
示例#30
0
                 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;
    }
    
    }