// ***** AUTOGENERATED CODE, DO NOT EDIT *****
            // ***** This class is not copyable.
        
        #include "REcmaLinetypeCombo.h"
        #include "RMetaTypes.h"
        #include "../REcmaHelper.h"

        // forwards declarations mapped to includes
        
            
        // 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(createEcma, *proto, 2);
    
    // static methods:
    

    // static properties:
    

    // enum values:
    

    // enum conversions:
    
        
    // init class:
    engine.globalObject().setProperty("RLinetypeCombo",
    ctor, QScriptValue::SkipInEnumeration);
    
    if( protoCreated ){
       delete proto;
    }
    
    }
     QScriptValue REcmaLinetypeCombo::createEcma(QScriptContext* context, QScriptEngine* engine) 
    
    {
    if (context->thisObject().strictlyEquals(
       engine->globalObject())) {
       return REcmaHelper::throwError(
       QString::fromLatin1("RLinetypeCombo(): Did you forget to construct with 'new'?"),
           context);
    }

    QScriptValue result;
        
            // generate constructor variants:
            
    if( context->argumentCount() ==
        0
    ){
    // prepare arguments:
    
    // end of arguments

    // call C++ constructor:
    
            // non-copyable class:
            RLinetypeCombo
                    * cppResult =
                    new
                    RLinetypeCombo
                    ();
                
                    result = engine->newQObject(context->thisObject(), cppResult, QScriptEngine::QtOwnership);
                
    } else 

    if( context->argumentCount() ==
        1
                && (
                
                        context->argument(
                        0
                        ).isQObject()
                        ||
                    
                        context->argument(
                        0
                        ).isNull()
                ) /* type: QWidget * */
            
    ){
    // prepare arguments:
    
            // argument isQObject
            QWidget *
            a0 =
            qobject_cast<
            QWidget *>
            ( context->argument(
            0
            ).
            toQObject()
            );
        
    // end of arguments

    // call C++ constructor:
    
            // non-copyable class:
            RLinetypeCombo
                    * cppResult =
                    new
                    RLinetypeCombo
                    (
                    a0
                    );
                
                    result = engine->newQObject(context->thisObject(), cppResult, QScriptEngine::QtOwnership);
                
    } else 

    {
       return REcmaHelper::throwError(
       QString::fromLatin1("RLinetypeCombo(): no matching constructor found."),
           context);
    }
    
    return result;
    }
    

    // conversion functions for base classes:
     QScriptValue REcmaLinetypeCombo::getQComboBox(QScriptContext *context,
            QScriptEngine *engine)
        
            {
                QComboBox* cppResult =
                    qscriptvalue_cast<RLinetypeCombo*> (context->thisObject());
                QScriptValue result = qScriptValueFromValue(engine, cppResult);
                return result;
            }
            

    // returns class name:
     QScriptValue REcmaLinetypeCombo::getClassName(QScriptContext *context, QScriptEngine *engine) 
        
    {
        return qScriptValueFromValue(engine, QString("RLinetypeCombo"));
    }
    

    // returns all base classes (in case of multiple inheritance):
     QScriptValue REcmaLinetypeCombo::getBaseClasses(QScriptContext *context, QScriptEngine *engine) 
        
    {
        QStringList list;
        
        list.append("QComboBox");
    

        return qScriptValueFromSequence(engine, list);
    }
    

    // properties:
    

    // public methods:
     QScriptValue
        REcmaLinetypeCombo::init
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaLinetypeCombo::init", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaLinetypeCombo::init";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RLinetypeCombo* self = 
                        getSelf("init", context);
                  

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RDocument * */
    
    ){
    // prepare arguments:
    
                    // argument is pointer
                    RDocument * a0 = NULL;

                    a0 = 
                        REcmaHelper::scriptValueTo<RDocument >(
                            context->argument(0)
                        );
                    
                    if (a0==NULL && 
                        !context->argument(0).isNull()) {
                        return REcmaHelper::throwError("RLinetypeCombo: Argument 0 is not of type RDocument *RDocument *.", context);                    
                    }
                
    // end of arguments

    // call C++ function:
    // return type 'void'
    
               self->init(a0);
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RLinetypeCombo.init().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaLinetypeCombo::init", context, engine);
            return result;
        }
         QScriptValue
        REcmaLinetypeCombo::reinit
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaLinetypeCombo::reinit", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaLinetypeCombo::reinit";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RLinetypeCombo* self = 
                        getSelf("reinit", context);
                  

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:
    
    // end of arguments

    // call C++ function:
    // return type 'void'
    
               self->reinit();
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RLinetypeCombo.reinit().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaLinetypeCombo::reinit", context, engine);
            return result;
        }
         QScriptValue
        REcmaLinetypeCombo::getLinetypePattern
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaLinetypeCombo::getLinetypePattern", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaLinetypeCombo::getLinetypePattern";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RLinetypeCombo* self = 
                        getSelf("getLinetypePattern", context);
                  

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:
    
    // end of arguments

    // call C++ function:
    // return type 'RLinetypePattern'
    RLinetypePattern cppResult =
        
               self->getLinetypePattern();
        // return type: RLinetypePattern
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RLinetypeCombo.getLinetypePattern().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaLinetypeCombo::getLinetypePattern", context, engine);
            return result;
        }
         QScriptValue
        REcmaLinetypeCombo::getLinetypePatternAt
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaLinetypeCombo::getLinetypePatternAt", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaLinetypeCombo::getLinetypePatternAt";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RLinetypeCombo* self = 
                        getSelf("getLinetypePatternAt", context);
                  

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isNumber()
        ) /* type: int */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    int
                    a0 =
                    (int)
                    
                    context->argument( 0 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'RLinetypePattern'
    RLinetypePattern cppResult =
        
               self->getLinetypePatternAt(a0);
        // return type: RLinetypePattern
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RLinetypeCombo.getLinetypePatternAt().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaLinetypeCombo::getLinetypePatternAt", context, engine);
            return result;
        }
         QScriptValue
        REcmaLinetypeCombo::setLinetypePattern
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaLinetypeCombo::setLinetypePattern", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaLinetypeCombo::setLinetypePattern";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RLinetypeCombo* self = 
                        getSelf("setLinetypePattern", context);
                  

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isString()
        ) /* type: QString */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    QString
                    a0 =
                    (QString)
                    
                    context->argument( 0 ).
                    toString();
                
    // end of arguments

    // call C++ function:
    // return type 'void'
    
               self->setLinetypePattern(a0);
    } else


        
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RLinetypePattern */
    
    ){
    // prepare arguments:
    
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RLinetypePattern*
                    ap0 =
                    qscriptvalue_cast<
                    RLinetypePattern*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if (ap0 == NULL) {
                           return REcmaHelper::throwError("RLinetypeCombo: Argument 0 is not of type RLinetypePattern.",
                               context);                    
                    }
                    RLinetypePattern 
                    a0 = 
                    *ap0;
                
    // end of arguments

    // call C++ function:
    // return type 'void'
    
               self->setLinetypePattern(a0);
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RLinetypeCombo.setLinetypePattern().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaLinetypeCombo::setLinetypePattern", context, engine);
            return result;
        }
         QScriptValue
        REcmaLinetypeCombo::getOnlyFixed
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaLinetypeCombo::getOnlyFixed", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaLinetypeCombo::getOnlyFixed";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RLinetypeCombo* self = 
                        getSelf("getOnlyFixed", context);
                  

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:
    
    // end of arguments

    // call C++ function:
    // return type 'bool'
    bool cppResult =
        
               self->getOnlyFixed();
        // return type: bool
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RLinetypeCombo.getOnlyFixed().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaLinetypeCombo::getOnlyFixed", context, engine);
            return result;
        }
         QScriptValue
        REcmaLinetypeCombo::setOnlyFixed
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaLinetypeCombo::setOnlyFixed", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaLinetypeCombo::setOnlyFixed";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RLinetypeCombo* self = 
                        getSelf("setOnlyFixed", context);
                  

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    bool
                    a0 =
                    (bool)
                    
                    context->argument( 0 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'void'
    
               self->setOnlyFixed(a0);
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RLinetypeCombo.setOnlyFixed().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaLinetypeCombo::setOnlyFixed", context, engine);
            return result;
        }
         QScriptValue
        REcmaLinetypeCombo::linetypePatternChanged
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaLinetypeCombo::linetypePatternChanged", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaLinetypeCombo::linetypePatternChanged";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RLinetypeCombo* self = 
                        getSelf("linetypePatternChanged", context);
                  

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isNumber()
        ) /* type: int */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    int
                    a0 =
                    (int)
                    
                    context->argument( 0 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'void'
    
               self->linetypePatternChanged(a0);
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RLinetypeCombo.linetypePatternChanged().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaLinetypeCombo::linetypePatternChanged", context, engine);
            return result;
        }
         QScriptValue REcmaLinetypeCombo::toString
    (QScriptContext *context, QScriptEngine *engine)
    
    {

    RLinetypeCombo* self = getSelf("toString", context);
    
    QString result;
    
            result = QString("RLinetypeCombo(0x%1)").arg((unsigned long int)self, 0, 16);
        
    return QScriptValue(result);
    }
     QScriptValue REcmaLinetypeCombo::destroy(QScriptContext *context, QScriptEngine *engine)
    
    {

        RLinetypeCombo* self = getSelf("RLinetypeCombo", context);
        //Q_ASSERT(self!=NULL);
        if (self==NULL) {
            return REcmaHelper::throwError("self is NULL", context);
        }
        
    
        delete self;
        context->thisObject().setData(engine->nullValue());
        context->thisObject().prototype().setData(engine->nullValue());
        context->thisObject().setPrototype(engine->nullValue());
        context->thisObject().setScriptClass(NULL);
        return engine->undefinedValue();
    }
    RLinetypeCombo* REcmaLinetypeCombo::getSelf(const QString& fName, QScriptContext* context)
    
        {
            RLinetypeCombo* self = NULL;

            
                // self could be a normal object (e.g. from an UI file) or
                // an ECMA shell object (made from an ECMA script):
                //self = getSelfShell(fName, context);
                

            //if (self==NULL) {
                self = REcmaHelper::scriptValueTo<RLinetypeCombo >(context->thisObject())
                
                ;
            //}

            if (self == NULL){
                // avoid recursion (toString is used by the backtrace):
                if (fName!="toString") {
                    REcmaHelper::throwError(QString("RLinetypeCombo.%1(): "
                        "This object is not a RLinetypeCombo").arg(fName),
                        context);
                }
                return NULL;
            }

            return self;
        }
        RLinetypeCombo* REcmaLinetypeCombo::getSelfShell(const QString& fName, QScriptContext* context)
    
        {
          RLinetypeCombo* selfBase = getSelf(fName, context);
                RLinetypeCombo* self = dynamic_cast<RLinetypeCombo*>(selfBase);
                //return REcmaHelper::scriptValueTo<RLinetypeCombo >(context->thisObject());
            if(self == NULL){
                REcmaHelper::throwError(QString("RLinetypeCombo.%1(): "
                    "This object is not a RLinetypeCombo").arg(fName),
                    context);
            }

            return self;
            


        }
         void fromScriptValue(const QScriptValue& value,
        RLinetypeCombo*
        &out) {
            QObject* o = value.toQObject();
            out = qobject_cast<
            RLinetypeCombo*>(o);
        }
     QScriptValue toScriptValue(QScriptEngine *engine,
        RLinetypeCombo*
        const &in){
            QScriptValue s = engine->newQObject(in, QScriptEngine::QtOwnership,
            QScriptEngine::PreferExistingWrapperObject);
            /*
            if(s.isNull()){
               REcmaHelper::throwError("This object is null.", engine->currentContext());
            }
            */
            return s;
        }
    