
// Auto generated

#ifndef QSIZE_H_WRAPPER
#define QSIZE_H_WRAPPER

// include header:
//#include "header_h.h"

#include "../RJSHelper.h"


#include "RJSWrapperObj.h"

#include <QQmlEngine>

#include "RJSType.h"

#include <QSize>

// static functions implementation in singleton wrapper:

// wrapper class for QSize
class QTJSAPI_EXPORT QSize_Wrapper : public RJSWrapperObj {


    Q_OBJECT
    QML_INTERFACE


private:
    // disable copy constructor:
    QSize_Wrapper(const QSize_Wrapper&);

public:
    // initialization of QSize:
    static void init(RJSApi& handler);


    static QSize* castToBase(void* vp, /*RJSType ID*/ int t) {

        // check if pointer points to derrived type:


        // hook for modules to cast from other types to base QSize:
        for (int i=0; i<basecasters_QSize.length(); i++) {
            RJSBasecaster_QSize* basecaster = basecasters_QSize[i];
            QSize* ret = basecaster->castToBase(t, vp);
            if (ret!=nullptr) {
                return ret;
            }
        }

        // object is a pointer to base class QSize:
        if (t==RJSType_QSize::getIdStatic()) {
            return (QSize*)vp;
        }

        qWarning() << "QSize_Wrapper::castToBase: type not found: " << RJSHelper::getTypeName(t);

        return nullptr;

    }

    static QSize* getWrappedBase(RJSWrapper* wrapper) {
        int t = wrapper->getWrappedType();
        void* vp = wrapper->getWrappedVoid();
        if (vp==nullptr) {
            //qWarning() << "getWrapped_QSize*: wrapper wraps NULL";
        }

        QSize* ret = castToBase(vp, t);
        if (ret==nullptr && vp!=nullptr) {
            qWarning() << "QSize*_Wrapper::getWrappedBase: extracted type " << t << "from wrapper is NULL";
        }
        return ret;
    }

    /*
    // special constructor used as prototype:

          Q_INVOKABLE
          QSize_Wrapper(QJSEngine* e);

    */


    // special constructor to wrap existing object:

    //Q_INVOKABLE
    QSize_Wrapper(RJSApi& h, QSize* o, bool wrappedCreated);


    // destructor:

    virtual ~QSize_Wrapper();

    // initialization of signal forwarding

    void initConnections();


    // constructors:

    // Class: QSize
    // Function:
    // Source:
    // Static: false
    // Parameters: 2
    // preceding Parameters: -1

public:
    Q_INVOKABLE
    QSize_Wrapper

    (


        // RJSApi:
        QObject* h

        ,

        const QJSValue&
        a1
        = QJSValue()
          ,
        const QJSValue&
        a2
        = QJSValue()

    )

    ;


    // non-static functions:

    // Class: QSize
    // Function: isNull
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    isNull
    (


    )

    const

    ;

    // Class: QSize
    // Function: isEmpty
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    isEmpty
    (


    )

    const

    ;

    // Class: QSize
    // Function: isValid
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    isValid
    (


    )

    const

    ;

    // Class: QSize
    // Function: width
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    width
    (


    )

    const

    ;

    // Class: QSize
    // Function: height
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    height
    (


    )

    const

    ;

    // Class: QSize
    // Function: setWidth
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setWidth
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QSize
    // Function: setHeight
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setHeight
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QSize
    // Function: transpose
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    transpose
    (


    )

    ;

    // Class: QSize
    // Function: transposed
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    transposed
    (


    )

    const

    ;

    // Class: QSize
    // Function: scale
    // Source:
    // Static: false
    // Parameters: 3
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    scale
    (


        const QJSValue&
        a1
        = QJSValue()
          ,
        const QJSValue&
        a2
        = QJSValue()
          ,
        const QJSValue&
        a3
        = QJSValue()

    )

    ;

    // Class: QSize
    // Function: scaled
    // Source:
    // Static: false
    // Parameters: 3
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    scaled
    (


        const QJSValue&
        a1
        = QJSValue()
          ,
        const QJSValue&
        a2
        = QJSValue()
          ,
        const QJSValue&
        a3
        = QJSValue()

    )

    const

    ;

    // Class: QSize
    // Function: expandedTo
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    expandedTo
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QSize
    // Function: boundedTo
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    boundedTo
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QSize
    // Function: grownBy
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    grownBy
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QSize
    // Function: shrunkBy
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    shrunkBy
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QSize
    // Function: rwidth
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    rwidth
    (


    )

    ;

    // Class: QSize
    // Function: rheight
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    rheight
    (


    )

    ;

    // destroy function for non-copyable objects:
    Q_INVOKABLE void destr() {
        if (wrapped!=nullptr) {

            delete wrapped;

            wrapped = nullptr;
        }

    }


    //public:
    // set engine:
    //Q_INVOKABLE void setHandler(RJSApi* h) {
    //  RJSWrapperObj::setHandler(h);
    //}


    // member functions for static properties, forward to static function



    // protected overwritten functions / events and their public invokable counterparts:

public:

    // get type of wrapped object:
    Q_INVOKABLE
    virtual /*RJSType ID*/ int getWrappedType() const {
        return RJSType_QSize::getIdStatic();
    }

    // return true if wrapped object is owned by C++ (not deleted):
    Q_INVOKABLE
    virtual bool isCppOwnership() const {

        return false;

    }

    // get wrapped object:
    QSize* getWrapped() {
        if (wrapped!=nullptr) {
            return wrapped;
        }

        return nullptr;
    }

    // get wrapped object (const):
    QSize* getWrapped() const {
        if (wrapped!=nullptr) {
            return wrapped;
        }

        return nullptr;
    }

    // get wrapped object as void*:
    virtual void* getWrappedVoid() {
        if (wrapped!=nullptr) {
            return wrapped;
        }

        return nullptr;
    }



    bool hasWrapped() const {
        return wrapped!=nullptr

               ;
    }

    Q_INVOKABLE
    bool isNullWrapper() const {
        return !hasWrapped();
    }

    Q_INVOKABLE
    unsigned long long int getAddress() const {
        if (wrapped!=nullptr) {
            return (unsigned long long int)wrapped;
        }

        return (unsigned long long int)0;
    }



    //public slots:
    //void slotDestroyed(QObject* obj) {
    //  qDebug() << "destroying QObject:" << (long int)obj;
    //}



private:
    // wrapped object:
    QSize* wrapped;



    bool wrappedCreated;

private:
    // list of registered base casters for this wrapper class:
    static QList<RJSBasecaster_QSize*> basecasters_QSize;

public:
    static void registerBasecaster_QSize(RJSBasecaster_QSize* bc) {
        basecasters_QSize.append(bc);
    }

};

Q_DECLARE_METATYPE(QSize_Wrapper*)

Q_DECLARE_INTERFACE(QSize_Wrapper, "org.qcad.QSize_Wrapper")


#include <QQmlEngine>

#include "RJSType.h"

#include <QSizeF>

// static functions implementation in singleton wrapper:

// wrapper class for QSizeF
class QTJSAPI_EXPORT QSizeF_Wrapper : public RJSWrapperObj {


    Q_OBJECT
    QML_INTERFACE


private:
    // disable copy constructor:
    QSizeF_Wrapper(const QSizeF_Wrapper&);

public:
    // initialization of QSizeF:
    static void init(RJSApi& handler);


    static QSizeF* castToBase(void* vp, /*RJSType ID*/ int t) {

        // check if pointer points to derrived type:


        // hook for modules to cast from other types to base QSizeF:
        for (int i=0; i<basecasters_QSizeF.length(); i++) {
            RJSBasecaster_QSizeF* basecaster = basecasters_QSizeF[i];
            QSizeF* ret = basecaster->castToBase(t, vp);
            if (ret!=nullptr) {
                return ret;
            }
        }

        // object is a pointer to base class QSizeF:
        if (t==RJSType_QSizeF::getIdStatic()) {
            return (QSizeF*)vp;
        }

        qWarning() << "QSizeF_Wrapper::castToBase: type not found: " << RJSHelper::getTypeName(t);

        return nullptr;

    }

    static QSizeF* getWrappedBase(RJSWrapper* wrapper) {
        int t = wrapper->getWrappedType();
        void* vp = wrapper->getWrappedVoid();
        if (vp==nullptr) {
            //qWarning() << "getWrapped_QSizeF*: wrapper wraps NULL";
        }

        QSizeF* ret = castToBase(vp, t);
        if (ret==nullptr && vp!=nullptr) {
            qWarning() << "QSizeF*_Wrapper::getWrappedBase: extracted type " << t << "from wrapper is NULL";
        }
        return ret;
    }

    /*
    // special constructor used as prototype:

          Q_INVOKABLE
          QSizeF_Wrapper(QJSEngine* e);

    */


    // special constructor to wrap existing object:

    //Q_INVOKABLE
    QSizeF_Wrapper(RJSApi& h, QSizeF* o, bool wrappedCreated);


    // destructor:

    virtual ~QSizeF_Wrapper();

    // initialization of signal forwarding

    void initConnections();


    // constructors:

    // Class: QSizeF
    // Function:
    // Source:
    // Static: false
    // Parameters: 2
    // preceding Parameters: -1

public:
    Q_INVOKABLE
    QSizeF_Wrapper

    (


        // RJSApi:
        QObject* h

        ,

        const QJSValue&
        a1
        = QJSValue()
          ,
        const QJSValue&
        a2
        = QJSValue()

    )

    ;


    // non-static functions:

    // Class: QSizeF
    // Function: isNull
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    isNull
    (


    )

    const

    ;

    // Class: QSizeF
    // Function: isEmpty
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    isEmpty
    (


    )

    const

    ;

    // Class: QSizeF
    // Function: isValid
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    isValid
    (


    )

    const

    ;

    // Class: QSizeF
    // Function: width
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    width
    (


    )

    const

    ;

    // Class: QSizeF
    // Function: height
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    height
    (


    )

    const

    ;

    // Class: QSizeF
    // Function: setWidth
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setWidth
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QSizeF
    // Function: setHeight
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setHeight
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QSizeF
    // Function: transpose
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    transpose
    (


    )

    ;

    // Class: QSizeF
    // Function: transposed
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    transposed
    (


    )

    const

    ;

    // Class: QSizeF
    // Function: scale
    // Source:
    // Static: false
    // Parameters: 3
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    scale
    (


        const QJSValue&
        a1
        = QJSValue()
          ,
        const QJSValue&
        a2
        = QJSValue()
          ,
        const QJSValue&
        a3
        = QJSValue()

    )

    ;

    // Class: QSizeF
    // Function: scaled
    // Source:
    // Static: false
    // Parameters: 3
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    scaled
    (


        const QJSValue&
        a1
        = QJSValue()
          ,
        const QJSValue&
        a2
        = QJSValue()
          ,
        const QJSValue&
        a3
        = QJSValue()

    )

    const

    ;

    // Class: QSizeF
    // Function: expandedTo
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    expandedTo
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QSizeF
    // Function: boundedTo
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    boundedTo
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QSizeF
    // Function: grownBy
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    grownBy
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QSizeF
    // Function: shrunkBy
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    shrunkBy
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QSizeF
    // Function: rwidth
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    rwidth
    (


    )

    ;

    // Class: QSizeF
    // Function: rheight
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    rheight
    (


    )

    ;

    // Class: QSizeF
    // Function: toSize
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    toSize
    (


    )

    const

    ;

    // destroy function for non-copyable objects:
    Q_INVOKABLE void destr() {
        if (wrapped!=nullptr) {

            delete wrapped;

            wrapped = nullptr;
        }

    }


    //public:
    // set engine:
    //Q_INVOKABLE void setHandler(RJSApi* h) {
    //  RJSWrapperObj::setHandler(h);
    //}


    // member functions for static properties, forward to static function



    // protected overwritten functions / events and their public invokable counterparts:

public:

    // get type of wrapped object:
    Q_INVOKABLE
    virtual /*RJSType ID*/ int getWrappedType() const {
        return RJSType_QSizeF::getIdStatic();
    }

    // return true if wrapped object is owned by C++ (not deleted):
    Q_INVOKABLE
    virtual bool isCppOwnership() const {

        return false;

    }

    // get wrapped object:
    QSizeF* getWrapped() {
        if (wrapped!=nullptr) {
            return wrapped;
        }

        return nullptr;
    }

    // get wrapped object (const):
    QSizeF* getWrapped() const {
        if (wrapped!=nullptr) {
            return wrapped;
        }

        return nullptr;
    }

    // get wrapped object as void*:
    virtual void* getWrappedVoid() {
        if (wrapped!=nullptr) {
            return wrapped;
        }

        return nullptr;
    }



    bool hasWrapped() const {
        return wrapped!=nullptr

               ;
    }

    Q_INVOKABLE
    bool isNullWrapper() const {
        return !hasWrapped();
    }

    Q_INVOKABLE
    unsigned long long int getAddress() const {
        if (wrapped!=nullptr) {
            return (unsigned long long int)wrapped;
        }

        return (unsigned long long int)0;
    }



    //public slots:
    //void slotDestroyed(QObject* obj) {
    //  qDebug() << "destroying QObject:" << (long int)obj;
    //}



private:
    // wrapped object:
    QSizeF* wrapped;



    bool wrappedCreated;

private:
    // list of registered base casters for this wrapper class:
    static QList<RJSBasecaster_QSizeF*> basecasters_QSizeF;

public:
    static void registerBasecaster_QSizeF(RJSBasecaster_QSizeF* bc) {
        basecasters_QSizeF.append(bc);
    }

};

Q_DECLARE_METATYPE(QSizeF_Wrapper*)

Q_DECLARE_INTERFACE(QSizeF_Wrapper, "org.qcad.QSizeF_Wrapper")


#endif

