/****************************************************************************
** Meta object code from reading C++ file 'js_field_p.h'
**
** Created by: The Qt Meta Object Compiler version 69 (Qt 6.11.2)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/

#include "../../../okular-26.08.0/core/script/js_field_p.h"
#include <QtCore/qmetatype.h>

#include <QtCore/qtmochelpers.h>

#include <memory>


#include <QtCore/qxptype_traits.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'js_field_p.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 69
#error "This file was generated using the moc from 6.11.2. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif

#ifndef Q_CONSTINIT
#define Q_CONSTINIT
#endif

QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
QT_WARNING_DISABLE_GCC("-Wuseless-cast")
namespace {
struct qt_meta_tag_ZN6Okular7JSFieldE_t {};
} // unnamed namespace

template <> constexpr inline auto Okular::JSField::qt_create_metaobjectdata<qt_meta_tag_ZN6Okular7JSFieldE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "Okular::JSField",
        "buttonGetIcon",
        "QJSValue",
        "",
        "nFace",
        "buttonSetIcon",
        "oIcon",
        "getItemAt",
        "nIdx",
        "bExportValue",
        "doc",
        "name",
        "readonly",
        "type",
        "value",
        "valueAsString",
        "hidden",
        "display",
        "numItems",
        "currentValueIndices"
    };

    QtMocHelpers::UintData qt_methods {
        // Method 'buttonGetIcon'
        QtMocHelpers::MethodData<QJSValue(int) const>(1, 3, QMC::AccessPublic, 0x80000000 | 2, {{
            { QMetaType::Int, 4 },
        }}),
        // Method 'buttonGetIcon'
        QtMocHelpers::MethodData<QJSValue() const>(1, 3, QMC::AccessPublic | QMC::MethodCloned, 0x80000000 | 2),
        // Method 'buttonSetIcon'
        QtMocHelpers::MethodData<void(const QJSValue &, int)>(5, 3, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 2, 6 }, { QMetaType::Int, 4 },
        }}),
        // Method 'buttonSetIcon'
        QtMocHelpers::MethodData<void(const QJSValue &)>(5, 3, QMC::AccessPublic | QMC::MethodCloned, QMetaType::Void, {{
            { 0x80000000 | 2, 6 },
        }}),
        // Method 'getItemAt'
        QtMocHelpers::MethodData<QJSValue(int, bool)>(7, 3, QMC::AccessPublic, 0x80000000 | 2, {{
            { QMetaType::Int, 8 }, { QMetaType::Bool, 9 },
        }}),
        // Method 'getItemAt'
        QtMocHelpers::MethodData<QJSValue(int)>(7, 3, QMC::AccessPublic | QMC::MethodCloned, 0x80000000 | 2, {{
            { QMetaType::Int, 8 },
        }}),
    };
    QtMocHelpers::UintData qt_properties {
        // property 'doc'
        QtMocHelpers::PropertyData<QJSValue>(10, 0x80000000 | 2, QMC::DefaultPropertyFlags | QMC::EnumOrFlag | QMC::Constant),
        // property 'name'
        QtMocHelpers::PropertyData<QString>(11, QMetaType::QString, QMC::DefaultPropertyFlags | QMC::Constant),
        // property 'readonly'
        QtMocHelpers::PropertyData<bool>(12, QMetaType::Bool, QMC::DefaultPropertyFlags | QMC::Writable | QMC::StdCppSet),
        // property 'type'
        QtMocHelpers::PropertyData<QString>(13, QMetaType::QString, QMC::DefaultPropertyFlags | QMC::Constant),
        // property 'value'
        QtMocHelpers::PropertyData<QJSValue>(14, 0x80000000 | 2, QMC::DefaultPropertyFlags | QMC::Writable | QMC::EnumOrFlag | QMC::StdCppSet),
        // property 'valueAsString'
        QtMocHelpers::PropertyData<QJSValue>(15, 0x80000000 | 2, QMC::DefaultPropertyFlags | QMC::EnumOrFlag),
        // property 'hidden'
        QtMocHelpers::PropertyData<bool>(16, QMetaType::Bool, QMC::DefaultPropertyFlags | QMC::Writable | QMC::StdCppSet),
        // property 'display'
        QtMocHelpers::PropertyData<int>(17, QMetaType::Int, QMC::DefaultPropertyFlags | QMC::Writable | QMC::StdCppSet),
        // property 'numItems'
        QtMocHelpers::PropertyData<QJSValue>(18, 0x80000000 | 2, QMC::DefaultPropertyFlags | QMC::EnumOrFlag | QMC::Constant),
        // property 'currentValueIndices'
        QtMocHelpers::PropertyData<QJSValue>(19, 0x80000000 | 2, QMC::DefaultPropertyFlags | QMC::Writable | QMC::EnumOrFlag | QMC::StdCppSet),
    };
    QtMocHelpers::UintData qt_enums {
    };
    return QtMocHelpers::metaObjectData<JSField, qt_meta_tag_ZN6Okular7JSFieldE_t>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums);
}
Q_CONSTINIT const QMetaObject Okular::JSField::staticMetaObject = { {
    QMetaObject::SuperData::link<QObject::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN6Okular7JSFieldE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN6Okular7JSFieldE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN6Okular7JSFieldE_t>.metaTypes,
    nullptr
} };

void Okular::JSField::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<JSField *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: { QJSValue _r = _t->buttonGetIcon((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])));
            if (_a[0]) *reinterpret_cast<QJSValue*>(_a[0]) = std::move(_r); }  break;
        case 1: { QJSValue _r = _t->buttonGetIcon();
            if (_a[0]) *reinterpret_cast<QJSValue*>(_a[0]) = std::move(_r); }  break;
        case 2: _t->buttonSetIcon((*reinterpret_cast<std::add_pointer_t<QJSValue>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<int>>(_a[2]))); break;
        case 3: _t->buttonSetIcon((*reinterpret_cast<std::add_pointer_t<QJSValue>>(_a[1]))); break;
        case 4: { QJSValue _r = _t->getItemAt((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<bool>>(_a[2])));
            if (_a[0]) *reinterpret_cast<QJSValue*>(_a[0]) = std::move(_r); }  break;
        case 5: { QJSValue _r = _t->getItemAt((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])));
            if (_a[0]) *reinterpret_cast<QJSValue*>(_a[0]) = std::move(_r); }  break;
        default: ;
        }
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        switch (_id) {
        default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
        case 2:
            switch (*reinterpret_cast<int*>(_a[1])) {
            default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
            case 0:
                *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType::fromType< QJSValue >(); break;
            }
            break;
        case 3:
            switch (*reinterpret_cast<int*>(_a[1])) {
            default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
            case 0:
                *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType::fromType< QJSValue >(); break;
            }
            break;
        }
    }
    if (_c == QMetaObject::RegisterPropertyMetaType) {
        switch (_id) {
        default: *reinterpret_cast<int*>(_a[0]) = -1; break;
        case 9:
        case 8:
        case 5:
        case 4:
        case 0:
            *reinterpret_cast<int*>(_a[0]) = qRegisterMetaType< QJSValue >(); break;
        }
    }
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<QJSValue*>(_v) = _t->doc(); break;
        case 1: *reinterpret_cast<QString*>(_v) = _t->name(); break;
        case 2: *reinterpret_cast<bool*>(_v) = _t->readonly(); break;
        case 3: *reinterpret_cast<QString*>(_v) = _t->type(); break;
        case 4: *reinterpret_cast<QJSValue*>(_v) = _t->value(); break;
        case 5: *reinterpret_cast<QJSValue*>(_v) = _t->valueAsString(); break;
        case 6: *reinterpret_cast<bool*>(_v) = _t->hidden(); break;
        case 7: *reinterpret_cast<int*>(_v) = _t->display(); break;
        case 8: *reinterpret_cast<QJSValue*>(_v) = _t->numItems(); break;
        case 9: *reinterpret_cast<QJSValue*>(_v) = _t->currentValueIndices(); break;
        default: break;
        }
    }
    if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 2: _t->setReadonly(*reinterpret_cast<bool*>(_v)); break;
        case 4: _t->setValue(*reinterpret_cast<QJSValue*>(_v)); break;
        case 6: _t->setHidden(*reinterpret_cast<bool*>(_v)); break;
        case 7: _t->setDisplay(*reinterpret_cast<int*>(_v)); break;
        case 9: _t->setCurrentValueIndices(*reinterpret_cast<QJSValue*>(_v)); break;
        default: break;
        }
    }
}

const QMetaObject *Okular::JSField::metaObject() const
{
    return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}

void *Okular::JSField::qt_metacast(const char *_clname)
{
    if (!_clname) return nullptr;
    if (!strcmp(_clname, qt_staticMetaObjectStaticContent<qt_meta_tag_ZN6Okular7JSFieldE_t>.strings))
        return static_cast<void*>(this);
    return QObject::qt_metacast(_clname);
}

int Okular::JSField::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 6)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 6;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 6)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 6;
    }
    if (_c == QMetaObject::ReadProperty || _c == QMetaObject::WriteProperty
            || _c == QMetaObject::ResetProperty || _c == QMetaObject::BindableProperty
            || _c == QMetaObject::RegisterPropertyMetaType) {
        qt_static_metacall(this, _c, _id, _a);
        _id -= 10;
    }
    return _id;
}
QT_WARNING_POP
