
// Auto generated

#ifndef QSETTINGS_H_WRAPPER
#define QSETTINGS_H_WRAPPER

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

#include "../RJSHelper.h"


#include "RJSWrapperObj.h"

#include <QQmlEngine>

#include "RJSType.h"

#include <QSettings>

// singleton class wrapper for static functions:
class QTJSAPI_EXPORT QSettings_WrapperSingleton: public QObject {
    Q_OBJECT
    QML_INTERFACE

    // constants:


    // static properties:


public:
    //Q_INVOKABLE
    QSettings_WrapperSingleton(RJSApi& h)
        : QObject(),
          handler(h)

    {}



    // static functions:

    // Class: QSettings
    // Function: tr
    // Source: QObject
    // Static: true
    // Parameters: 3
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    tr
    (


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

    )

    ;

    // Class: QSettings
    // Function: setDefaultFormat
    // Source:
    // Static: true
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setDefaultFormat
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QSettings
    // Function: defaultFormat
    // Source:
    // Static: true
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    defaultFormat
    (


    )

    ;

    // Class: QSettings
    // Function: setPath
    // Source:
    // Static: true
    // Parameters: 3
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setPath
    (


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

    )

    ;

#ifndef QT_NO_QOBJECT

#endif


private:
    RJSApi& handler;
    //static QSettings_WrapperSingleton* _singleInstance;

    // constants:

};

// static functions implementation in singleton wrapper:

// wrapper class for QSettings
class QTJSAPI_EXPORT QSettings_Wrapper : public RJSWrapperObj {


    Q_OBJECT
    QML_INTERFACE

    Q_PROPERTY(

        QJSValue
        objectName READ objectName WRITE setObjectName
    )


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

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


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

        // check if pointer points to derrived type:


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

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

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

        return nullptr;

    }

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

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

    // enums:

    enum Status {
        NoError = QSettings::NoError,
        AccessError = QSettings::AccessError,
        FormatError = QSettings::FormatError,

    };
    Q_ENUM(Status)

    enum Format {
        NativeFormat = QSettings::NativeFormat,
        IniFormat = QSettings::IniFormat,
        InvalidFormat = QSettings::InvalidFormat,
        CustomFormat1 = QSettings::CustomFormat1,
        CustomFormat2 = QSettings::CustomFormat2,
        CustomFormat3 = QSettings::CustomFormat3,
        CustomFormat4 = QSettings::CustomFormat4,
        CustomFormat5 = QSettings::CustomFormat5,
        CustomFormat6 = QSettings::CustomFormat6,
        CustomFormat7 = QSettings::CustomFormat7,
        CustomFormat8 = QSettings::CustomFormat8,
        CustomFormat9 = QSettings::CustomFormat9,
        CustomFormat10 = QSettings::CustomFormat10,
        CustomFormat11 = QSettings::CustomFormat11,
        CustomFormat12 = QSettings::CustomFormat12,
        CustomFormat13 = QSettings::CustomFormat13,
        CustomFormat14 = QSettings::CustomFormat14,
        CustomFormat15 = QSettings::CustomFormat15,
        CustomFormat16 = QSettings::CustomFormat16,

    };
    Q_ENUM(Format)

    enum Scope {
        UserScope = QSettings::UserScope,
        SystemScope = QSettings::SystemScope,

    };
    Q_ENUM(Scope)

    /*
    // special constructor used as prototype:

          Q_INVOKABLE
          QSettings_Wrapper(QJSEngine* e);

    */


    // special constructor to wrap existing object:

    //Q_INVOKABLE
    QSettings_Wrapper(RJSApi& h, QSettings* o, bool wrappedCreated);


    // destructor:

    virtual ~QSettings_Wrapper();

    // initialization of signal forwarding

    void initConnections();


    // constructors:

    // Class: QSettings
    // Function:
    // Source:
    // Static: false
    // Parameters: 5
    // preceding Parameters: -1

public:
    Q_INVOKABLE
    QSettings_Wrapper

    (


        // RJSApi:
        QObject* h

        ,

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

    )

    ;

#ifndef QT_NO_QOBJECT

#endif


    // non-static functions:

    // Class: QSettings
    // Function: objectName
    // Source: QObject
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    objectName
    (


    )

    const

    ;

    // Class: QSettings
    // Function: setObjectName
    // Source: QObject
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setObjectName
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QSettings
    // Function: isWidgetType
    // Source: QObject
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    isWidgetType
    (


    )

    const

    ;

    // Class: QSettings
    // Function: isWindowType
    // Source: QObject
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    isWindowType
    (


    )

    const

    ;

    // Class: QSettings
    // Function: signalsBlocked
    // Source: QObject
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    signalsBlocked
    (


    )

    const

    ;

    // Class: QSettings
    // Function: blockSignals
    // Source: QObject
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    blockSignals
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QSettings
    // Function: findChild
    // Source: QObject
    // Static: false
    // Parameters: 2
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    findChild
    (


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

    )

    const

    ;

    // Class: QSettings
    // Function: children
    // Source: QObject
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    children
    (


    )

    const

    ;

    // Class: QSettings
    // Function: setParent
    // Source: QObject
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setParent
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QSettings
    // Function: installEventFilter
    // Source: QObject
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    installEventFilter
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QSettings
    // Function: removeEventFilter
    // Source: QObject
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    removeEventFilter
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QSettings
    // Function: dumpObjectTree
    // Source: QObject
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    dumpObjectTree
    (


    )

    ;

    // Class: QSettings
    // Function: dumpObjectInfo
    // Source: QObject
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    dumpObjectInfo
    (


    )

    ;

    // Class: QSettings
    // Function: setProperty
    // Source: QObject
    // Static: false
    // Parameters: 2
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setProperty
    (


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

    )

    ;

    // Class: QSettings
    // Function: property
    // Source: QObject
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    property
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QSettings
    // Function: dynamicPropertyNames
    // Source: QObject
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    dynamicPropertyNames
    (


    )

    const

    ;

    // Class: QSettings
    // Function: parent
    // Source: QObject
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    parent
    (


    )

    const

    ;

    // Class: QSettings
    // Function: deleteLater
    // Source: QObject
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    deleteLater
    (


    )

    ;

    // Class: QSettings
    // Function: clear
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    clear
    (


    )

    ;

    // Class: QSettings
    // Function: sync
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    sync
    (


    )

    ;

    // Class: QSettings
    // Function: status
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    status
    (


    )

    const

    ;

    // Class: QSettings
    // Function: isAtomicSyncRequired
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    isAtomicSyncRequired
    (


    )

    const

    ;

    // Class: QSettings
    // Function: setAtomicSyncRequired
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setAtomicSyncRequired
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QSettings
    // Function: beginGroup
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    beginGroup
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QSettings
    // Function: endGroup
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    endGroup
    (


    )

    ;

    // Class: QSettings
    // Function: group
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    group
    (


    )

    const

    ;

    // Class: QSettings
    // Function: beginReadArray
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    beginReadArray
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

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

public:
    Q_INVOKABLE

    QJSValue
    beginWriteArray
    (


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

    )

    ;

    // Class: QSettings
    // Function: endArray
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    endArray
    (


    )

    ;

    // Class: QSettings
    // Function: setArrayIndex
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setArrayIndex
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QSettings
    // Function: allKeys
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    allKeys
    (


    )

    const

    ;

    // Class: QSettings
    // Function: childKeys
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    childKeys
    (


    )

    const

    ;

    // Class: QSettings
    // Function: childGroups
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    childGroups
    (


    )

    const

    ;

    // Class: QSettings
    // Function: isWritable
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    isWritable
    (


    )

    const

    ;

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

public:
    Q_INVOKABLE

    QJSValue
    setValue
    (


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

    )

    ;

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

public:
    Q_INVOKABLE

    QJSValue
    value
    (


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

    )

    const

    ;

    // Class: QSettings
    // Function: remove
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    remove
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QSettings
    // Function: contains
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    contains
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QSettings
    // Function: setFallbacksEnabled
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setFallbacksEnabled
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QSettings
    // Function: fallbacksEnabled
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    fallbacksEnabled
    (


    )

    const

    ;

    // Class: QSettings
    // Function: fileName
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    fileName
    (


    )

    const

    ;

    // Class: QSettings
    // Function: format
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    format
    (


    )

    const

    ;

    // Class: QSettings
    // Function: scope
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    scope
    (


    )

    const

    ;

    // Class: QSettings
    // Function: organizationName
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    organizationName
    (


    )

    const

    ;

    // Class: QSettings
    // Function: applicationName
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    applicationName
    (


    )

    const

    ;

#ifndef QT_NO_QOBJECT

#endif

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

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

        return true;

    }

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

        return nullptr;
    }

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



    bool wrappedCreated;

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

public:
    static void registerBasecaster_QSettings(RJSBasecaster_QSettings* bc) {
        basecasters_QSettings.append(bc);
    }

};

Q_DECLARE_METATYPE(QSettings_Wrapper*)

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


#endif

