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

        // forwards declarations mapped to includes
        
            
        // includes for base ecma wrapper classes
         void REcmaColorCombo::initEcma(QScriptEngine& engine, QScriptValue* proto 
    
    ) 
    
    {

    bool protoCreated = false;
    if(proto == NULL){
        proto = new QScriptValue(engine.newVariant(qVariantFromValue(
                (RColorCombo*) 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, getColor, "getColor");
            
            REcmaHelper::registerFunction(&engine, proto, setColor, "setColor");
            
            REcmaHelper::registerFunction(&engine, proto, init, "init");
            
            REcmaHelper::registerFunction(&engine, proto, getOnlyFixed, "getOnlyFixed");
            
            REcmaHelper::registerFunction(&engine, proto, setOnlyFixed, "setOnlyFixed");
            
            REcmaHelper::registerFunction(&engine, proto, getShowAlphaChannel, "getShowAlphaChannel");
            
            REcmaHelper::registerFunction(&engine, proto, setShowAlphaChannel, "setShowAlphaChannel");
            
            REcmaHelper::registerFunction(&engine, proto, colorChanged, "colorChanged");
            
        engine.setDefaultPrototype(
            qMetaTypeId<RColorCombo*>(), *proto);

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

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

    // static properties:
    

    // enum values:
    

    // enum conversions:
    
        
    // init class:
    engine.globalObject().setProperty("RColorCombo",
    ctor, QScriptValue::SkipInEnumeration);
    
    if( protoCreated ){
       delete proto;
    }
    
    }
     QScriptValue REcmaColorCombo::createEcma(QScriptContext* context, QScriptEngine* engine) 
    
    {
    if (context->thisObject().strictlyEquals(
       engine->globalObject())) {
       return REcmaHelper::throwError(
       QString::fromLatin1("RColorCombo(): 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:
            RColorCombo
                    * cppResult =
                    new
                    RColorCombo
                    ();
                
                    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:
            RColorCombo
                    * cppResult =
                    new
                    RColorCombo
                    (
                    a0
                    );
                
                    result = engine->newQObject(context->thisObject(), cppResult, QScriptEngine::QtOwnership);
                
    } else 

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

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

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

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

        return qScriptValueFromSequence(engine, list);
    }
    

    // properties:
    

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

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RColorCombo* self = 
                        getSelf("getColor", 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 'RColor'
    RColor cppResult =
        
               self->getColor();
        // return type: RColor
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


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

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RColorCombo* self = 
                        getSelf("setColor", 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: RColor */
    
    ){
    // prepare arguments:
    
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RColor*
                    ap0 =
                    qscriptvalue_cast<
                    RColor*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if (ap0 == NULL) {
                           return REcmaHelper::throwError("RColorCombo: Argument 0 is not of type RColor.",
                               context);                    
                    }
                    RColor 
                    a0 = 
                    *ap0;
                
    // end of arguments

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


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

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RColorCombo* self = 
                        getSelf("init", 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->init();
    } else


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

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RColorCombo* 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 RColorCombo.getOnlyFixed().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaColorCombo::getOnlyFixed", context, engine);
            return result;
        }
         QScriptValue
        REcmaColorCombo::setOnlyFixed
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaColorCombo::setOnlyFixed", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaColorCombo::setOnlyFixed";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RColorCombo* 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 RColorCombo.setOnlyFixed().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaColorCombo::setOnlyFixed", context, engine);
            return result;
        }
         QScriptValue
        REcmaColorCombo::getShowAlphaChannel
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaColorCombo::getShowAlphaChannel", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaColorCombo::getShowAlphaChannel";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RColorCombo* self = 
                        getSelf("getShowAlphaChannel", 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->getShowAlphaChannel();
        // return type: bool
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RColorCombo* self = 
                        getSelf("setShowAlphaChannel", 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->setShowAlphaChannel(a0);
    } else


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

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RColorCombo* self = 
                        getSelf("colorChanged", 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->colorChanged(a0);
    } else


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

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

        RColorCombo* self = getSelf("RColorCombo", 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();
    }
    RColorCombo* REcmaColorCombo::getSelf(const QString& fName, QScriptContext* context)
    
        {
            RColorCombo* 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<RColorCombo >(context->thisObject())
                
                ;
            //}

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

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

            return self;
            


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