/****************************************************************************
** Meta object code from reading C++ file 'resourcemodel.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 "../../../../ktouch-26.08.0/src/models/resourcemodel.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 'resourcemodel.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_ZN13ResourceModelE_t {};
} // unnamed namespace

template <> constexpr inline auto ResourceModel::qt_create_metaobjectdata<qt_meta_tag_ZN13ResourceModelE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "ResourceModel",
        "dataIndexChanged",
        "",
        "onCourseAboutToBeAdded",
        "DataIndexCourse*",
        "course",
        "index",
        "onCoursesAboutToBeRemoved",
        "first",
        "last",
        "onKeyboardLayoutAboutToBeAdded",
        "DataIndexKeyboardLayout*",
        "keyboardLayout",
        "onKeyboardLayoutsAboutToBeRemoved",
        "onResourceAdded",
        "onResourceRemoved",
        "emitDataChanged",
        "row",
        "dataIndex",
        "DataIndex*",
        "ResourceItemTypes",
        "ResourceItemType",
        "None",
        "CourseItem",
        "KeyboardLayoutItem",
        "AdditionalRoles",
        "ResourceTypeRole",
        "DataRole",
        "KeyboardLayoutNameRole",
        "PathRole",
        "IndexRole",
        "SourceRole"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'dataIndexChanged'
        QtMocHelpers::SignalData<void()>(1, 2, QMC::AccessPublic, QMetaType::Void),
        // Slot 'onCourseAboutToBeAdded'
        QtMocHelpers::SlotData<void(DataIndexCourse *, int)>(3, 2, QMC::AccessPrivate, QMetaType::Void, {{
            { 0x80000000 | 4, 5 }, { QMetaType::Int, 6 },
        }}),
        // Slot 'onCoursesAboutToBeRemoved'
        QtMocHelpers::SlotData<void(int, int)>(7, 2, QMC::AccessPrivate, QMetaType::Void, {{
            { QMetaType::Int, 8 }, { QMetaType::Int, 9 },
        }}),
        // Slot 'onKeyboardLayoutAboutToBeAdded'
        QtMocHelpers::SlotData<void(DataIndexKeyboardLayout *, int)>(10, 2, QMC::AccessPrivate, QMetaType::Void, {{
            { 0x80000000 | 11, 12 }, { QMetaType::Int, 6 },
        }}),
        // Slot 'onKeyboardLayoutsAboutToBeRemoved'
        QtMocHelpers::SlotData<void(int, int)>(13, 2, QMC::AccessPrivate, QMetaType::Void, {{
            { QMetaType::Int, 8 }, { QMetaType::Int, 9 },
        }}),
        // Slot 'onResourceAdded'
        QtMocHelpers::SlotData<void()>(14, 2, QMC::AccessPrivate, QMetaType::Void),
        // Slot 'onResourceRemoved'
        QtMocHelpers::SlotData<void()>(15, 2, QMC::AccessPrivate, QMetaType::Void),
        // Slot 'emitDataChanged'
        QtMocHelpers::SlotData<void(int)>(16, 2, QMC::AccessPrivate, QMetaType::Void, {{
            { QMetaType::Int, 17 },
        }}),
    };
    QtMocHelpers::UintData qt_properties {
        // property 'dataIndex'
        QtMocHelpers::PropertyData<DataIndex*>(18, 0x80000000 | 19, QMC::DefaultPropertyFlags | QMC::Writable | QMC::EnumOrFlag | QMC::StdCppSet, 0),
    };
    QtMocHelpers::UintData qt_enums {
        // enum 'ResourceItemTypes'
        QtMocHelpers::EnumData<ResourceItemTypes>(20, 21, QMC::EnumFlags{}).add({
            {   22, ResourceItemType::None },
            {   23, ResourceItemType::CourseItem },
            {   24, ResourceItemType::KeyboardLayoutItem },
        }),
        // enum 'AdditionalRoles'
        QtMocHelpers::EnumData<enum AdditionalRoles>(25, 25, QMC::EnumFlags{}).add({
            {   26, AdditionalRoles::ResourceTypeRole },
            {   27, AdditionalRoles::DataRole },
            {   28, AdditionalRoles::KeyboardLayoutNameRole },
            {   29, AdditionalRoles::PathRole },
            {   30, AdditionalRoles::IndexRole },
            {   31, AdditionalRoles::SourceRole },
        }),
    };
    return QtMocHelpers::metaObjectData<ResourceModel, qt_meta_tag_ZN13ResourceModelE_t>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums);
}
Q_CONSTINIT const QMetaObject ResourceModel::staticMetaObject = { {
    QMetaObject::SuperData::link<QAbstractListModel::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN13ResourceModelE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN13ResourceModelE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN13ResourceModelE_t>.metaTypes,
    nullptr
} };

void ResourceModel::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<ResourceModel *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->dataIndexChanged(); break;
        case 1: _t->onCourseAboutToBeAdded((*reinterpret_cast<std::add_pointer_t<DataIndexCourse*>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<int>>(_a[2]))); break;
        case 2: _t->onCoursesAboutToBeRemoved((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<int>>(_a[2]))); break;
        case 3: _t->onKeyboardLayoutAboutToBeAdded((*reinterpret_cast<std::add_pointer_t<DataIndexKeyboardLayout*>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<int>>(_a[2]))); break;
        case 4: _t->onKeyboardLayoutsAboutToBeRemoved((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<int>>(_a[2]))); break;
        case 5: _t->onResourceAdded(); break;
        case 6: _t->onResourceRemoved(); break;
        case 7: _t->emitDataChanged((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
        default: ;
        }
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        switch (_id) {
        default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
        case 1:
            switch (*reinterpret_cast<int*>(_a[1])) {
            default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
            case 0:
                *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType::fromType< DataIndexCourse* >(); 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< DataIndexKeyboardLayout* >(); break;
            }
            break;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (ResourceModel::*)()>(_a, &ResourceModel::dataIndexChanged, 0))
            return;
    }
    if (_c == QMetaObject::RegisterPropertyMetaType) {
        switch (_id) {
        default: *reinterpret_cast<int*>(_a[0]) = -1; break;
        case 0:
            *reinterpret_cast<int*>(_a[0]) = qRegisterMetaType< DataIndex* >(); break;
        }
    }
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<DataIndex**>(_v) = _t->dataIndex(); break;
        default: break;
        }
    }
    if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: _t->setDataIndex(*reinterpret_cast<DataIndex**>(_v)); break;
        default: break;
        }
    }
}

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

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

int ResourceModel::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 < 8)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 8;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 8)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 8;
    }
    if (_c == QMetaObject::ReadProperty || _c == QMetaObject::WriteProperty
            || _c == QMetaObject::ResetProperty || _c == QMetaObject::BindableProperty
            || _c == QMetaObject::RegisterPropertyMetaType) {
        qt_static_metacall(this, _c, _id, _a);
        _id -= 1;
    }
    return _id;
}

// SIGNAL 0
void ResourceModel::dataIndexChanged()
{
    QMetaObject::activate(this, &staticMetaObject, 0, nullptr);
}
QT_WARNING_POP
