
// Auto generated

#ifndef QTEXTLAYOUT_H_WRAPPER
#define QTEXTLAYOUT_H_WRAPPER

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

#include "../RJSHelper.h"


#include "RJSWrapperObj.h"

#include <QFont>

#include <QRawFont>

#include <QRect>

#include <QRegion>

#include <QTextFormat>

#include <QPalette>

#include <QPainter>

#include <QPaintDevice>

#include <QTextFormat>

#include <QTextLine>

#include <QTextBlock>

#include <QTextOption>

#include <QQmlEngine>

#include "RJSType.h"

#include <QTextLayout>

// static functions implementation in singleton wrapper:

// wrapper class for QTextLayout
class QTJSAPI_EXPORT QTextLayout_Wrapper : public RJSWrapperObj {


    Q_OBJECT
    QML_INTERFACE


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

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


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

        // check if pointer points to derrived type:


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

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

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

        return nullptr;

    }

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

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

    /*
    // special constructor used as prototype:

          Q_INVOKABLE
          QTextLayout_Wrapper(QJSEngine* e);

    */


    // special constructor to wrap existing object:

    //Q_INVOKABLE
    QTextLayout_Wrapper(RJSApi& h, QTextLayout* o, bool wrappedCreated);

    // special constructor to wrap existing object from shared pointer:

    //Q_INVOKABLE
    QTextLayout_Wrapper(RJSApi& h, QSharedPointer<QTextLayout> o);


    // destructor:

    virtual ~QTextLayout_Wrapper();

    // initialization of signal forwarding

    void initConnections();


    // constructors:

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

public:
    Q_INVOKABLE
    QTextLayout_Wrapper

    (


        // RJSApi:
        QObject* h

        ,

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

    )

    ;

#ifndef QT_NO_RAWFONT

#endif

#if !defined(QT_NO_RAWFONT)

#endif


    // non-static functions:

    // Class: QTextLayout
    // Function: setFont
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setFont
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QTextLayout
    // Function: font
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    font
    (


    )

    const

    ;

#ifndef QT_NO_RAWFONT

#endif

    // Class: QTextLayout
    // Function: setText
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setText
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QTextLayout
    // Function: text
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    text
    (


    )

    const

    ;

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

public:
    Q_INVOKABLE

    QJSValue
    setPreeditArea
    (


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

    )

    ;

    // Class: QTextLayout
    // Function: preeditAreaPosition
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    preeditAreaPosition
    (


    )

    const

    ;

    // Class: QTextLayout
    // Function: preeditAreaText
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    preeditAreaText
    (


    )

    const

    ;

    // Class: QTextLayout
    // Function: clearFormats
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    clearFormats
    (


    )

    ;

    // Class: QTextLayout
    // Function: setCacheEnabled
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setCacheEnabled
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QTextLayout
    // Function: cacheEnabled
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    cacheEnabled
    (


    )

    const

    ;

    // Class: QTextLayout
    // Function: setCursorMoveStyle
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setCursorMoveStyle
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QTextLayout
    // Function: cursorMoveStyle
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    cursorMoveStyle
    (


    )

    const

    ;

    // Class: QTextLayout
    // Function: beginLayout
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    beginLayout
    (


    )

    ;

    // Class: QTextLayout
    // Function: endLayout
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    endLayout
    (


    )

    ;

    // Class: QTextLayout
    // Function: clearLayout
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    clearLayout
    (


    )

    ;

    // Class: QTextLayout
    // Function: lineCount
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    lineCount
    (


    )

    const

    ;

    // Class: QTextLayout
    // Function: isValidCursorPosition
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    isValidCursorPosition
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

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

public:
    Q_INVOKABLE

    QJSValue
    nextCursorPosition
    (


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

    )

    const

    ;

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

public:
    Q_INVOKABLE

    QJSValue
    previousCursorPosition
    (


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

    )

    const

    ;

    // Class: QTextLayout
    // Function: leftCursorPosition
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    leftCursorPosition
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QTextLayout
    // Function: rightCursorPosition
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    rightCursorPosition
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QTextLayout
    // Function: drawCursor
    // Source:
    // Static: false
    // Parameters: 4
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    drawCursor
    (


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

    )

    const

    ;

    // Class: QTextLayout
    // Function: position
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    position
    (


    )

    const

    ;

    // Class: QTextLayout
    // Function: setPosition
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setPosition
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

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

public:
    Q_INVOKABLE

    QJSValue
    boundingRect
    (


    )

    const

    ;

    // Class: QTextLayout
    // Function: minimumWidth
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    minimumWidth
    (


    )

    const

    ;

    // Class: QTextLayout
    // Function: maximumWidth
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    maximumWidth
    (


    )

    const

    ;

#if !defined(QT_NO_RAWFONT)

#endif

    // Class: QTextLayout
    // Function: setFlags
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setFlags
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

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

            delete wrapped;

            wrapped = nullptr;
        }

        if (!spWrapped.isNull()) {
            spWrapped = 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_QTextLayout::getIdStatic();
    }

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

        return true;

    }

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

        else if (!spWrapped.isNull()) {
            return spWrapped.data();
        }

        return nullptr;
    }

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

        else if (!spWrapped.isNull()) {
            return spWrapped.data();
        }

        return nullptr;
    }

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

        else if (!spWrapped.isNull()) {
            return spWrapped.data();
        }

        return nullptr;
    }


    // get wrapped object as QSharedPointer:
    virtual QSharedPointer<QTextLayout> getWrappedSp() {
        if (!spWrapped.isNull()) {
            return spWrapped;
        }
        if (wrapped!=nullptr) {
            qWarning() << "wrapper does not wrap a QSharedPointer<QTextLayout> but a regular pointer";
            return QSharedPointer<QTextLayout>();
        }
        return QSharedPointer<QTextLayout>();
    }

    bool hasWrappedSp() const {
        return !spWrapped.isNull() && spWrapped.data()!=nullptr;
    }


    bool hasWrapped() const {
        return wrapped!=nullptr

               || (!spWrapped.isNull() && spWrapped.data()!=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;
        }

        if (!spWrapped.isNull() && spWrapped.data()!=nullptr) {
            return (unsigned long long int)spWrapped.data();
        }

        return (unsigned long long int)0;
    }



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



private:
    // wrapped object:
    QTextLayout* wrapped;


    // wrapped object as shared pointer:
    QSharedPointer<QTextLayout> spWrapped;


    bool wrappedCreated;

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

public:
    static void registerBasecaster_QTextLayout(RJSBasecaster_QTextLayout* bc) {
        basecasters_QTextLayout.append(bc);
    }

};

Q_DECLARE_METATYPE(QTextLayout_Wrapper*)

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


#endif

