/****************************************************************************
** Meta object code from reading C++ file 'SourcesModel.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 "../../../../discover-6.7.3/libdiscover/resources/SourcesModel.h"
#include <QtCore/qmetatype.h>
#include <QtCore/QList>

#include <QtCore/qtmochelpers.h>

#include <memory>


#include <QtCore/qxptype_traits.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'SourcesModel.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_ZN12SourcesModelE_t {};
} // unnamed namespace

template <> constexpr inline auto SourcesModel::qt_create_metaobjectdata<qt_meta_tag_ZN12SourcesModelE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "SourcesModel",
        "sourcesChanged",
        "",
        "showingNow",
        "sourcesBackendByName",
        "AbstractSourcesBackend*",
        "name",
        "sources",
        "QList<AbstractSourcesBackend*>",
        "Roles",
        "SourceNameRole",
        "SourcesBackend",
        "ResourcesBackend",
        "EnabledRole"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'sourcesChanged'
        QtMocHelpers::SignalData<void()>(1, 2, QMC::AccessPublic, QMetaType::Void),
        // Signal 'showingNow'
        QtMocHelpers::SignalData<void()>(3, 2, QMC::AccessPublic, QMetaType::Void),
        // Method 'sourcesBackendByName'
        QtMocHelpers::MethodData<AbstractSourcesBackend *(const QString &) const>(4, 2, QMC::AccessPublic | QMC::MethodScriptable, 0x80000000 | 5, {{
            { QMetaType::QString, 6 },
        }}),
    };
    QtMocHelpers::UintData qt_properties {
        // property 'sources'
        QtMocHelpers::PropertyData<QList<AbstractSourcesBackend*>>(7, 0x80000000 | 8, QMC::DefaultPropertyFlags | QMC::EnumOrFlag, 0),
    };
    QtMocHelpers::UintData qt_enums {
        // enum 'Roles'
        QtMocHelpers::EnumData<enum Roles>(9, 9, QMC::EnumFlags{}).add({
            {   10, Roles::SourceNameRole },
            {   11, Roles::SourcesBackend },
            {   12, Roles::ResourcesBackend },
            {   13, Roles::EnabledRole },
        }),
    };
    return QtMocHelpers::metaObjectData<SourcesModel, qt_meta_tag_ZN12SourcesModelE_t>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums);
}
Q_CONSTINIT const QMetaObject SourcesModel::staticMetaObject = { {
    QMetaObject::SuperData::link<QConcatenateTablesProxyModel::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN12SourcesModelE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN12SourcesModelE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN12SourcesModelE_t>.metaTypes,
    nullptr
} };

void SourcesModel::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<SourcesModel *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->sourcesChanged(); break;
        case 1: _t->showingNow(); break;
        case 2: { AbstractSourcesBackend* _r = _t->sourcesBackendByName((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])));
            if (_a[0]) *reinterpret_cast<AbstractSourcesBackend**>(_a[0]) = std::move(_r); }  break;
        default: ;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (SourcesModel::*)()>(_a, &SourcesModel::sourcesChanged, 0))
            return;
        if (QtMocHelpers::indexOfMethod<void (SourcesModel::*)()>(_a, &SourcesModel::showingNow, 1))
            return;
    }
    if (_c == QMetaObject::RegisterPropertyMetaType) {
        switch (_id) {
        default: *reinterpret_cast<int*>(_a[0]) = -1; break;
        case 0:
            *reinterpret_cast<int*>(_a[0]) = qRegisterMetaType< QList<AbstractSourcesBackend*> >(); break;
        }
    }
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<QList<AbstractSourcesBackend*>*>(_v) = _t->sources(); break;
        default: break;
        }
    }
}

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

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

int SourcesModel::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QConcatenateTablesProxyModel::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 3)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 3;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 3)
            *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
        _id -= 3;
    }
    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 SourcesModel::sourcesChanged()
{
    QMetaObject::activate(this, &staticMetaObject, 0, nullptr);
}

// SIGNAL 1
void SourcesModel::showingNow()
{
    QMetaObject::activate(this, &staticMetaObject, 1, nullptr);
}
QT_WARNING_POP
