
// Auto generated

#ifndef QPOLYGON_H_WRAPPER
#define QPOLYGON_H_WRAPPER

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

#include "../RJSHelper.h"


#include "RJSWrapperObj.h"

#include <QTransform>

#include <QRect>

#include <QVariant>

#include <QRectF>

#include <QQmlEngine>

#include "RJSType.h"

#include <QPolygon>

// static functions implementation in singleton wrapper:

// wrapper class for QPolygon
class QTJSAPI_EXPORT QPolygon_Wrapper : public RJSWrapperObj {


    Q_OBJECT
    QML_INTERFACE


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

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


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

        // check if pointer points to derrived type:


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

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

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

        return nullptr;

    }

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

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

    /*
    // special constructor used as prototype:

          Q_INVOKABLE
          QPolygon_Wrapper(QJSEngine* e);

    */


    // special constructor to wrap existing object:

    //Q_INVOKABLE
    QPolygon_Wrapper(RJSApi& h, QPolygon* o, bool wrappedCreated);


    // destructor:

    virtual ~QPolygon_Wrapper();

    // initialization of signal forwarding

    void initConnections();


    // constructors:

    // Class: QPolygon
    // Function:
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE
    QPolygon_Wrapper

    (


        // RJSApi:
        QObject* h

        ,

        const QJSValue&
        a1
        = QJSValue()

    )

    ;


    // non-static functions:

    // Class: QPolygon
    // Function: swap
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    swap
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

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

public:
    Q_INVOKABLE

    QJSValue
    translate
    (


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

    )

    ;

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

public:
    Q_INVOKABLE

    QJSValue
    translated
    (


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

    )

    const

    ;

    // Class: QPolygon
    // Function: boundingRect
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    boundingRect
    (


    )

    const

    ;

    // Class: QPolygon
    // Function: point
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    point
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QPolygon
    // Function: setPoint
    // Source:
    // Static: false
    // Parameters: 3
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setPoint
    (


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

    )

    ;

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

public:
    Q_INVOKABLE

    QJSValue
    containsPoint
    (


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

    )

    const

    ;

    // Class: QPolygon
    // Function: united
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    united
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QPolygon
    // Function: intersected
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    intersected
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QPolygon
    // Function: subtracted
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    subtracted
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QPolygon
    // Function: intersects
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    intersects
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // 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_QPolygon::getIdStatic();
    }

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

        return false;

    }

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

        return nullptr;
    }

    // get wrapped object (const):
    QPolygon* 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:
    QPolygon* wrapped;



    bool wrappedCreated;

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

public:
    static void registerBasecaster_QPolygon(RJSBasecaster_QPolygon* bc) {
        basecasters_QPolygon.append(bc);
    }

};

Q_DECLARE_METATYPE(QPolygon_Wrapper*)

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


#include <QQmlEngine>

#include "RJSType.h"

#include <QPolygonF>

// static functions implementation in singleton wrapper:

// wrapper class for QPolygonF
class QTJSAPI_EXPORT QPolygonF_Wrapper : public RJSWrapperObj {


    Q_OBJECT
    QML_INTERFACE


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

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


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

        // check if pointer points to derrived type:


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

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

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

        return nullptr;

    }

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

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

    /*
    // special constructor used as prototype:

          Q_INVOKABLE
          QPolygonF_Wrapper(QJSEngine* e);

    */


    // special constructor to wrap existing object:

    //Q_INVOKABLE
    QPolygonF_Wrapper(RJSApi& h, QPolygonF* o, bool wrappedCreated);


    // destructor:

    virtual ~QPolygonF_Wrapper();

    // initialization of signal forwarding

    void initConnections();


    // constructors:

    // Class: QPolygonF
    // Function:
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE
    QPolygonF_Wrapper

    (


        // RJSApi:
        QObject* h

        ,

        const QJSValue&
        a1
        = QJSValue()

    )

    ;


    // non-static functions:

    // Class: QPolygonF
    // Function: swap
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    swap
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

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

public:
    Q_INVOKABLE

    QJSValue
    translate
    (


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

    )

    ;

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

public:
    Q_INVOKABLE

    QJSValue
    translated
    (


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

    )

    const

    ;

    // Class: QPolygonF
    // Function: toPolygon
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    toPolygon
    (


    )

    const

    ;

    // Class: QPolygonF
    // Function: isClosed
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    isClosed
    (


    )

    const

    ;

    // Class: QPolygonF
    // Function: boundingRect
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    boundingRect
    (


    )

    const

    ;

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

public:
    Q_INVOKABLE

    QJSValue
    containsPoint
    (


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

    )

    const

    ;

    // Class: QPolygonF
    // Function: united
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    united
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QPolygonF
    // Function: intersected
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    intersected
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QPolygonF
    // Function: subtracted
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    subtracted
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QPolygonF
    // Function: intersects
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    intersects
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // 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_QPolygonF::getIdStatic();
    }

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

        return false;

    }

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

        return nullptr;
    }

    // get wrapped object (const):
    QPolygonF* 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:
    QPolygonF* wrapped;



    bool wrappedCreated;

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

public:
    static void registerBasecaster_QPolygonF(RJSBasecaster_QPolygonF* bc) {
        basecasters_QPolygonF.append(bc);
    }

};

Q_DECLARE_METATYPE(QPolygonF_Wrapper*)

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


#endif

