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

#include "../../../../kwordquiz-26.07.90/src/kwqdocumentmodel.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 'kwqdocumentmodel.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 69
#error "This file was generated using the moc from 6.12.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_ZN16KWQDocumentModelE_t {};
} // unnamed namespace

template <> constexpr inline auto KWQDocumentModel::qt_create_metaobjectdata<qt_meta_tag_ZN16KWQDocumentModelE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "KWQDocumentModel",
        "QML.Element",
        "DocumentModel",
        "add",
        "",
        "QUrl",
        "url",
        "addDocument",
        "KEduVocDocument*",
        "document",
        "remove",
        "row",
        "entryChanged",
        "KNSCore::Entry",
        "wrapper",
        "DocumentStatus",
        "NoError",
        "CannotLoadFile",
        "CannotSaveFile"
    };

    QtMocHelpers::UintData qt_methods {
        // Method 'add'
        QtMocHelpers::MethodData<int(const QUrl &)>(3, 4, QMC::AccessPublic, QMetaType::Int, {{
            { 0x80000000 | 5, 6 },
        }}),
        // Method 'addDocument'
        QtMocHelpers::MethodData<void(KEduVocDocument *)>(7, 4, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 8, 9 },
        }}),
        // Method 'remove'
        QtMocHelpers::MethodData<void(const int)>(10, 4, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::Int, 11 },
        }}),
        // Method 'entryChanged'
        QtMocHelpers::MethodData<void(const KNSCore::Entry &)>(12, 4, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 13, 14 },
        }}),
    };
    QtMocHelpers::UintData qt_properties {
    };
    QtMocHelpers::UintData qt_enums {
        // enum 'DocumentStatus'
        QtMocHelpers::EnumData<enum DocumentStatus>(15, 15, QMC::EnumIsScoped).add({
            {   16, DocumentStatus::NoError },
            {   17, DocumentStatus::CannotLoadFile },
            {   18, DocumentStatus::CannotSaveFile },
        }),
    };
    QtMocHelpers::UintData qt_constructors {};
    QtMocHelpers::ClassInfos qt_classinfo({
            {    1,    2 },
    });
    return QtMocHelpers::metaObjectData<KWQDocumentModel, void>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums, qt_constructors, qt_classinfo);
}
Q_CONSTINIT const QMetaObject KWQDocumentModel::staticMetaObject = { {
    QMetaObject::SuperData::link<QAbstractListModel::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN16KWQDocumentModelE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN16KWQDocumentModelE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN16KWQDocumentModelE_t>.metaTypes,
    nullptr
} };

void KWQDocumentModel::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<KWQDocumentModel *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: { int _r = _t->add((*reinterpret_cast<std::add_pointer_t<QUrl>>(_a[1])));
            if (_a[0]) *reinterpret_cast<int*>(_a[0]) = std::move(_r); }  break;
        case 1: _t->addDocument((*reinterpret_cast<std::add_pointer_t<KEduVocDocument*>>(_a[1]))); break;
        case 2: _t->remove((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
        case 3: _t->entryChanged((*reinterpret_cast<std::add_pointer_t<KNSCore::Entry>>(_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< KEduVocDocument* >(); break;
            }
            break;
        }
    }
}

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

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

int KWQDocumentModel::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)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 4;
    }
    return _id;
}
QT_WARNING_POP
