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

#include "../../../../../src/private/dobjectmodelproxy_p.h"
#include <QtNetwork/QSslError>
#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 'dobjectmodelproxy_p.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 69
#error "This file was generated using the moc from 6.11.1. 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_ZN3Dtk5Quick16ObjectModelProxyE_t {};
} // unnamed namespace

template <> constexpr inline auto Dtk::Quick::ObjectModelProxy::qt_create_metaobjectdata<qt_meta_tag_ZN3Dtk5Quick16ObjectModelProxyE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "Dtk::Quick::ObjectModelProxy",
        "QML.Element",
        "ObjectModelProxy",
        "filterAcceptsItemChanged",
        "",
        "update",
        "get",
        "i",
        "mapToSource",
        "mapFromSource",
        "syncDataFromItem",
        "sourceModel",
        "QQmlObjectModel*",
        "filterAcceptsItem",
        "QJSValue"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'filterAcceptsItemChanged'
        QtMocHelpers::SignalData<void()>(3, 4, QMC::AccessPublic, QMetaType::Void),
        // Slot 'update'
        QtMocHelpers::SlotData<void()>(5, 4, QMC::AccessPublic, QMetaType::Void),
        // Slot 'get'
        QtMocHelpers::SlotData<QObject *(const int) const>(6, 4, QMC::AccessPublic, QMetaType::QObjectStar, {{
            { QMetaType::Int, 7 },
        }}),
        // Slot 'mapToSource'
        QtMocHelpers::SlotData<int(const int) const>(8, 4, QMC::AccessPublic, QMetaType::Int, {{
            { QMetaType::Int, 7 },
        }}),
        // Slot 'mapFromSource'
        QtMocHelpers::SlotData<int(const int) const>(9, 4, QMC::AccessPublic, QMetaType::Int, {{
            { QMetaType::Int, 7 },
        }}),
        // Slot 'syncDataFromItem'
        QtMocHelpers::SlotData<void()>(10, 4, QMC::AccessPrivate, QMetaType::Void),
    };
    QtMocHelpers::UintData qt_properties {
        // property 'sourceModel'
        QtMocHelpers::PropertyData<QQmlObjectModel*>(11, 0x80000000 | 12, QMC::DefaultPropertyFlags | QMC::Writable | QMC::EnumOrFlag | QMC::StdCppSet),
        // property 'filterAcceptsItem'
        QtMocHelpers::PropertyData<QJSValue>(13, 0x80000000 | 14, QMC::DefaultPropertyFlags | QMC::Writable | QMC::EnumOrFlag | QMC::StdCppSet, 0),
    };
    QtMocHelpers::UintData qt_enums {
    };
    QtMocHelpers::UintData qt_constructors {};
    QtMocHelpers::ClassInfos qt_classinfo({
            {    1,    2 },
    });
    return QtMocHelpers::metaObjectData<ObjectModelProxy, void>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums, qt_constructors, qt_classinfo);
}
Q_CONSTINIT const QMetaObject Dtk::Quick::ObjectModelProxy::staticMetaObject = { {
    QMetaObject::SuperData::link<QQmlInstanceModel::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN3Dtk5Quick16ObjectModelProxyE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN3Dtk5Quick16ObjectModelProxyE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN3Dtk5Quick16ObjectModelProxyE_t>.metaTypes,
    nullptr
} };

void Dtk::Quick::ObjectModelProxy::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<ObjectModelProxy *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->filterAcceptsItemChanged(); break;
        case 1: _t->update(); break;
        case 2: { QObject* _r = _t->get((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])));
            if (_a[0]) *reinterpret_cast<QObject**>(_a[0]) = std::move(_r); }  break;
        case 3: { int _r = _t->mapToSource((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])));
            if (_a[0]) *reinterpret_cast<int*>(_a[0]) = std::move(_r); }  break;
        case 4: { int _r = _t->mapFromSource((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])));
            if (_a[0]) *reinterpret_cast<int*>(_a[0]) = std::move(_r); }  break;
        case 5: _t->syncDataFromItem(); break;
        default: ;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (ObjectModelProxy::*)()>(_a, &ObjectModelProxy::filterAcceptsItemChanged, 0))
            return;
    }
    if (_c == QMetaObject::RegisterPropertyMetaType) {
        switch (_id) {
        default: *reinterpret_cast<int*>(_a[0]) = -1; break;
        case 1:
            *reinterpret_cast<int*>(_a[0]) = qRegisterMetaType< QJSValue >(); break;
        case 0:
            *reinterpret_cast<int*>(_a[0]) = qRegisterMetaType< QQmlObjectModel* >(); break;
        }
    }
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<QQmlObjectModel**>(_v) = _t->sourceModel(); break;
        case 1: *reinterpret_cast<QJSValue*>(_v) = _t->filterAcceptsItem(); break;
        default: break;
        }
    }
    if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: _t->setSourceModel(*reinterpret_cast<QQmlObjectModel**>(_v)); break;
        case 1: _t->setFilterAcceptsItem(*reinterpret_cast<QJSValue*>(_v)); break;
        default: break;
        }
    }
}

const QMetaObject *Dtk::Quick::ObjectModelProxy::metaObject() const
{
    return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}

void *Dtk::Quick::ObjectModelProxy::qt_metacast(const char *_clname)
{
    if (!_clname) return nullptr;
    if (!strcmp(_clname, qt_staticMetaObjectStaticContent<qt_meta_tag_ZN3Dtk5Quick16ObjectModelProxyE_t>.strings))
        return static_cast<void*>(this);
    return QQmlInstanceModel::qt_metacast(_clname);
}

int Dtk::Quick::ObjectModelProxy::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QQmlInstanceModel::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)
            *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
        _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 -= 2;
    }
    return _id;
}

// SIGNAL 0
void Dtk::Quick::ObjectModelProxy::filterAcceptsItemChanged()
{
    QMetaObject::activate(this, &staticMetaObject, 0, nullptr);
}
QT_WARNING_POP
