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

#include "qml_material/model/snake_model.hpp"
#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 'snake_model.hpp' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 69
#error "This file was generated using the moc from 6.11.0. 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_ZN12qml_material14SnakeModelItemE_t {};
} // unnamed namespace

template <> constexpr inline auto qml_material::SnakeModelItem::qt_create_metaobjectdata<qt_meta_tag_ZN12qml_material14SnakeModelItemE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "qml_material::SnakeModelItem",
        "sid",
        "text",
        "duration",
        "flag",
        "Enum::ToastFlags",
        "action"
    };

    QtMocHelpers::UintData qt_methods {
    };
    QtMocHelpers::UintData qt_properties {
        // property 'sid'
        QtMocHelpers::PropertyData<qint32>(1, QMetaType::Int, QMC::DefaultPropertyFlags | QMC::Writable | QMC::Final),
        // property 'text'
        QtMocHelpers::PropertyData<QString>(2, QMetaType::QString, QMC::DefaultPropertyFlags | QMC::Writable | QMC::Final),
        // property 'duration'
        QtMocHelpers::PropertyData<qint32>(3, QMetaType::Int, QMC::DefaultPropertyFlags | QMC::Writable | QMC::Final),
        // property 'flag'
        QtMocHelpers::PropertyData<Enum::ToastFlags>(4, 0x80000000 | 5, QMC::DefaultPropertyFlags | QMC::Writable | QMC::EnumOrFlag | QMC::Final),
        // property 'action'
        QtMocHelpers::PropertyData<QObject*>(6, QMetaType::QObjectStar, QMC::DefaultPropertyFlags | QMC::Writable | QMC::Final),
    };
    QtMocHelpers::UintData qt_enums {
    };
    return QtMocHelpers::metaObjectData<SnakeModelItem, qt_meta_tag_ZN12qml_material14SnakeModelItemE_t>(QMC::PropertyAccessInStaticMetaCall, qt_stringData,
            qt_methods, qt_properties, qt_enums);
}
Q_CONSTINIT static const QMetaObject::SuperData qt_meta_extradata_ZN12qml_material14SnakeModelItemE[] = {
    QMetaObject::SuperData::link<qml_material::Enum::staticMetaObject>(),
    nullptr
};

Q_CONSTINIT const QMetaObject qml_material::SnakeModelItem::staticMetaObject = { {
    nullptr,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN12qml_material14SnakeModelItemE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN12qml_material14SnakeModelItemE_t>.data,
    qt_static_metacall,
    qt_meta_extradata_ZN12qml_material14SnakeModelItemE,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN12qml_material14SnakeModelItemE_t>.metaTypes,
    nullptr
} };

void qml_material::SnakeModelItem::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = reinterpret_cast<SnakeModelItem *>(_o);
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<qint32*>(_v) = _t->id; break;
        case 1: *reinterpret_cast<QString*>(_v) = _t->text; break;
        case 2: *reinterpret_cast<qint32*>(_v) = _t->duration; break;
        case 3: *reinterpret_cast<Enum::ToastFlags*>(_v) = _t->flag; break;
        case 4: *reinterpret_cast<QObject**>(_v) = _t->action; break;
        default: break;
        }
    }
    if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: QtMocHelpers::setProperty(_t->id, *reinterpret_cast<qint32*>(_v)); break;
        case 1: QtMocHelpers::setProperty(_t->text, *reinterpret_cast<QString*>(_v)); break;
        case 2: QtMocHelpers::setProperty(_t->duration, *reinterpret_cast<qint32*>(_v)); break;
        case 3: QtMocHelpers::setProperty(_t->flag, *reinterpret_cast<Enum::ToastFlags*>(_v)); break;
        case 4: QtMocHelpers::setProperty(_t->action, *reinterpret_cast<QObject**>(_v)); break;
        default: break;
        }
    }
}
namespace {
struct qt_meta_tag_ZN12qml_material10SnakeModelE_t {};
} // unnamed namespace

template <> constexpr inline auto qml_material::SnakeModel::qt_create_metaobjectdata<qt_meta_tag_ZN12qml_material10SnakeModelE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "qml_material::SnakeModel",
        "QML.Element",
        "auto",
        "showSnake",
        "",
        "SnakeModelItem",
        "removeById",
        "id",
        "onRemovePriv",
        "QModelIndex",
        "parent",
        "first",
        "last",
        "createSnake"
    };

    QtMocHelpers::UintData qt_methods {
        // Slot 'showSnake'
        QtMocHelpers::SlotData<void(const SnakeModelItem &)>(3, 4, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 5, 4 },
        }}),
        // Slot 'removeById'
        QtMocHelpers::SlotData<void(qint32)>(6, 4, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::Int, 7 },
        }}),
        // Slot 'onRemovePriv'
        QtMocHelpers::SlotData<void(const QModelIndex &, int, int)>(8, 4, QMC::AccessPrivate, QMetaType::Void, {{
            { 0x80000000 | 9, 10 }, { QMetaType::Int, 11 }, { QMetaType::Int, 12 },
        }}),
        // Method 'createSnake'
        QtMocHelpers::MethodData<SnakeModelItem()>(13, 4, QMC::AccessPublic, 0x80000000 | 5),
    };
    QtMocHelpers::UintData qt_properties {
    };
    QtMocHelpers::UintData qt_enums {
    };
    QtMocHelpers::UintData qt_constructors {};
    QtMocHelpers::ClassInfos qt_classinfo({
            {    1,    2 },
    });
    return QtMocHelpers::metaObjectData<SnakeModel, void>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums, qt_constructors, qt_classinfo);
}
Q_CONSTINIT const QMetaObject qml_material::SnakeModel::staticMetaObject = { {
    QMetaObject::SuperData::link<QAbstractListModel::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN12qml_material10SnakeModelE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN12qml_material10SnakeModelE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN12qml_material10SnakeModelE_t>.metaTypes,
    nullptr
} };

void qml_material::SnakeModel::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<SnakeModel *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->showSnake((*reinterpret_cast<std::add_pointer_t<SnakeModelItem>>(_a[1]))); break;
        case 1: _t->removeById((*reinterpret_cast<std::add_pointer_t<qint32>>(_a[1]))); break;
        case 2: _t->onRemovePriv((*reinterpret_cast<std::add_pointer_t<QModelIndex>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<int>>(_a[2])),(*reinterpret_cast<std::add_pointer_t<int>>(_a[3]))); break;
        case 3: { SnakeModelItem _r = _t->createSnake();
            if (_a[0]) *reinterpret_cast<SnakeModelItem*>(_a[0]) = std::move(_r); }  break;
        default: ;
        }
    }
}

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

void *qml_material::SnakeModel::qt_metacast(const char *_clname)
{
    if (!_clname) return nullptr;
    if (!strcmp(_clname, qt_staticMetaObjectStaticContent<qt_meta_tag_ZN12qml_material10SnakeModelE_t>.strings))
        return static_cast<void*>(this);
    return QAbstractListModel::qt_metacast(_clname);
}

int qml_material::SnakeModel::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QAbstractListModel::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 4)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 4;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 4)
            *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
        _id -= 4;
    }
    return _id;
}
QT_WARNING_POP
