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

#include "../../../../../../../artikulate-26.04.0/src/org/kde/artikulate/phrasemodel.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 'phrasemodel.h' 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_ZN11PhraseModelE_t {};
} // unnamed namespace

template <> constexpr inline auto PhraseModel::qt_create_metaobjectdata<qt_meta_tag_ZN11PhraseModelE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "PhraseModel",
        "QML.Element",
        "auto",
        "phraseChanged",
        "",
        "index",
        "courseChanged",
        "typeChanged",
        "onPhraseAboutToBeAdded",
        "std::shared_ptr<IPhrase>",
        "phrase",
        "onPhraseAdded",
        "onPhraseAboutToBeRemoved",
        "onPhrasesRemoved",
        "onPhraseChanged",
        "onUnitAboutToBeAdded",
        "std::shared_ptr<Unit>",
        "unit",
        "onUnitAdded",
        "onUnitsAboutToBeRemoved",
        "first",
        "last",
        "onUnitsRemoved",
        "onUnitChanged",
        "isPhrase",
        "QModelIndex",
        "IPhrase*",
        "Unit*",
        "indexPhrase",
        "Phrase*",
        "indexUnit",
        "isUnit",
        "course",
        "ICourse*"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'phraseChanged'
        QtMocHelpers::SignalData<void(int)>(3, 4, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::Int, 5 },
        }}),
        // Signal 'courseChanged'
        QtMocHelpers::SignalData<void()>(6, 4, QMC::AccessPublic, QMetaType::Void),
        // Signal 'typeChanged'
        QtMocHelpers::SignalData<void()>(7, 4, QMC::AccessPublic, QMetaType::Void),
        // Slot 'onPhraseAboutToBeAdded'
        QtMocHelpers::SlotData<void(std::shared_ptr<IPhrase>, int)>(8, 4, QMC::AccessPrivate, QMetaType::Void, {{
            { 0x80000000 | 9, 10 }, { QMetaType::Int, 5 },
        }}),
        // Slot 'onPhraseAdded'
        QtMocHelpers::SlotData<void()>(11, 4, QMC::AccessPrivate, QMetaType::Void),
        // Slot 'onPhraseAboutToBeRemoved'
        QtMocHelpers::SlotData<void(int)>(12, 4, QMC::AccessPrivate, QMetaType::Void, {{
            { QMetaType::Int, 5 },
        }}),
        // Slot 'onPhrasesRemoved'
        QtMocHelpers::SlotData<void()>(13, 4, QMC::AccessPrivate, QMetaType::Void),
        // Slot 'onPhraseChanged'
        QtMocHelpers::SlotData<void(QObject *)>(14, 4, QMC::AccessPrivate, QMetaType::Void, {{
            { QMetaType::QObjectStar, 10 },
        }}),
        // Slot 'onUnitAboutToBeAdded'
        QtMocHelpers::SlotData<void(std::shared_ptr<Unit>, int)>(15, 4, QMC::AccessPrivate, QMetaType::Void, {{
            { 0x80000000 | 16, 17 }, { QMetaType::Int, 5 },
        }}),
        // Slot 'onUnitAdded'
        QtMocHelpers::SlotData<void()>(18, 4, QMC::AccessPrivate, QMetaType::Void),
        // Slot 'onUnitsAboutToBeRemoved'
        QtMocHelpers::SlotData<void(int, int)>(19, 4, QMC::AccessPrivate, QMetaType::Void, {{
            { QMetaType::Int, 20 }, { QMetaType::Int, 21 },
        }}),
        // Slot 'onUnitsRemoved'
        QtMocHelpers::SlotData<void()>(22, 4, QMC::AccessPrivate, QMetaType::Void),
        // Slot 'onUnitChanged'
        QtMocHelpers::SlotData<void(int)>(23, 4, QMC::AccessPrivate, QMetaType::Void, {{
            { QMetaType::Int, 5 },
        }}),
        // Method 'isPhrase'
        QtMocHelpers::MethodData<bool(const QModelIndex &) const>(24, 4, QMC::AccessPublic, QMetaType::Bool, {{
            { 0x80000000 | 25, 5 },
        }}),
        // Method 'phrase'
        QtMocHelpers::MethodData<IPhrase *(const QModelIndex &) const>(10, 4, QMC::AccessPublic, 0x80000000 | 26, {{
            { 0x80000000 | 25, 5 },
        }}),
        // Method 'unit'
        QtMocHelpers::MethodData<Unit *(const QModelIndex &) const>(17, 4, QMC::AccessPublic, 0x80000000 | 27, {{
            { 0x80000000 | 25, 5 },
        }}),
        // Method 'indexPhrase'
        QtMocHelpers::MethodData<QModelIndex(Phrase *) const>(28, 4, QMC::AccessPublic, 0x80000000 | 25, {{
            { 0x80000000 | 29, 10 },
        }}),
        // Method 'indexUnit'
        QtMocHelpers::MethodData<QModelIndex(Unit *) const>(30, 4, QMC::AccessPublic, 0x80000000 | 25, {{
            { 0x80000000 | 27, 17 },
        }}),
        // Method 'isUnit'
        QtMocHelpers::MethodData<bool(const QModelIndex &) const>(31, 4, QMC::AccessPublic, QMetaType::Bool, {{
            { 0x80000000 | 25, 5 },
        }}),
    };
    QtMocHelpers::UintData qt_properties {
        // property 'course'
        QtMocHelpers::PropertyData<ICourse*>(32, 0x80000000 | 33, QMC::DefaultPropertyFlags | QMC::Writable | QMC::EnumOrFlag | QMC::StdCppSet, 1),
    };
    QtMocHelpers::UintData qt_enums {
    };
    QtMocHelpers::UintData qt_constructors {};
    QtMocHelpers::ClassInfos qt_classinfo({
            {    1,    2 },
    });
    return QtMocHelpers::metaObjectData<PhraseModel, void>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums, qt_constructors, qt_classinfo);
}
Q_CONSTINIT const QMetaObject PhraseModel::staticMetaObject = { {
    QMetaObject::SuperData::link<QAbstractItemModel::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN11PhraseModelE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN11PhraseModelE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN11PhraseModelE_t>.metaTypes,
    nullptr
} };

void PhraseModel::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<PhraseModel *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->phraseChanged((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
        case 1: _t->courseChanged(); break;
        case 2: _t->typeChanged(); break;
        case 3: _t->onPhraseAboutToBeAdded((*reinterpret_cast<std::add_pointer_t<std::shared_ptr<IPhrase>>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<int>>(_a[2]))); break;
        case 4: _t->onPhraseAdded(); break;
        case 5: _t->onPhraseAboutToBeRemoved((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
        case 6: _t->onPhrasesRemoved(); break;
        case 7: _t->onPhraseChanged((*reinterpret_cast<std::add_pointer_t<QObject*>>(_a[1]))); break;
        case 8: _t->onUnitAboutToBeAdded((*reinterpret_cast<std::add_pointer_t<std::shared_ptr<Unit>>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<int>>(_a[2]))); break;
        case 9: _t->onUnitAdded(); break;
        case 10: _t->onUnitsAboutToBeRemoved((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<int>>(_a[2]))); break;
        case 11: _t->onUnitsRemoved(); break;
        case 12: _t->onUnitChanged((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
        case 13: { bool _r = _t->isPhrase((*reinterpret_cast<std::add_pointer_t<QModelIndex>>(_a[1])));
            if (_a[0]) *reinterpret_cast<bool*>(_a[0]) = std::move(_r); }  break;
        case 14: { IPhrase* _r = _t->phrase((*reinterpret_cast<std::add_pointer_t<QModelIndex>>(_a[1])));
            if (_a[0]) *reinterpret_cast<IPhrase**>(_a[0]) = std::move(_r); }  break;
        case 15: { Unit* _r = _t->unit((*reinterpret_cast<std::add_pointer_t<QModelIndex>>(_a[1])));
            if (_a[0]) *reinterpret_cast<Unit**>(_a[0]) = std::move(_r); }  break;
        case 16: { QModelIndex _r = _t->indexPhrase((*reinterpret_cast<std::add_pointer_t<Phrase*>>(_a[1])));
            if (_a[0]) *reinterpret_cast<QModelIndex*>(_a[0]) = std::move(_r); }  break;
        case 17: { QModelIndex _r = _t->indexUnit((*reinterpret_cast<std::add_pointer_t<Unit*>>(_a[1])));
            if (_a[0]) *reinterpret_cast<QModelIndex*>(_a[0]) = std::move(_r); }  break;
        case 18: { bool _r = _t->isUnit((*reinterpret_cast<std::add_pointer_t<QModelIndex>>(_a[1])));
            if (_a[0]) *reinterpret_cast<bool*>(_a[0]) = std::move(_r); }  break;
        default: ;
        }
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        switch (_id) {
        default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
        case 16:
            switch (*reinterpret_cast<int*>(_a[1])) {
            default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
            case 0:
                *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType::fromType< Phrase* >(); break;
            }
            break;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (PhraseModel::*)(int )>(_a, &PhraseModel::phraseChanged, 0))
            return;
        if (QtMocHelpers::indexOfMethod<void (PhraseModel::*)()>(_a, &PhraseModel::courseChanged, 1))
            return;
        if (QtMocHelpers::indexOfMethod<void (PhraseModel::*)()>(_a, &PhraseModel::typeChanged, 2))
            return;
    }
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<ICourse**>(_v) = _t->course(); break;
        default: break;
        }
    }
    if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: _t->setCourse(*reinterpret_cast<ICourse**>(_v)); break;
        default: break;
        }
    }
}

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

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

int PhraseModel::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QAbstractItemModel::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 19)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 19;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 19)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 19;
    }
    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 PhraseModel::phraseChanged(int _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 0, nullptr, _t1);
}

// SIGNAL 1
void PhraseModel::courseChanged()
{
    QMetaObject::activate(this, &staticMetaObject, 1, nullptr);
}

// SIGNAL 2
void PhraseModel::typeChanged()
{
    QMetaObject::activate(this, &staticMetaObject, 2, nullptr);
}
QT_WARNING_POP
