/****************************************************************************
** Meta object code from reading C++ file 'ResourceModel.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 "../../../../PrismLauncher-11.0.2/launcher/ui/pages/modplatform/ResourceModel.h"
#include <QtNetwork/QSslPreSharedKeyAuthenticator>
#include <QtNetwork/QSslError>
#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.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_ZN16ResourceDownload13ResourceModelE_t {};
} // unnamed namespace

template <> constexpr inline auto ResourceDownload::ResourceModel::qt_create_metaobjectdata<qt_meta_tag_ZN16ResourceDownload13ResourceModelE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "ResourceDownload::ResourceModel",
        "versionListUpdated",
        "",
        "QModelIndex",
        "index",
        "projectInfoUpdated",
        "fetchMore",
        "parent",
        "canFetchMore",
        "setSearchTerm",
        "term",
        "createSearchArguments",
        "ResourceAPI::SearchArgs",
        "createVersionsArguments",
        "ResourceAPI::VersionSearchArgs",
        "createInfoArguments",
        "ResourceAPI::ProjectInfoArgs",
        "search",
        "loadEntry",
        "refresh",
        "getIcon",
        "std::optional<QIcon>",
        "QModelIndex&",
        "QUrl",
        "addPack",
        "ModPlatform::IndexedPack::Ptr",
        "pack",
        "ModPlatform::IndexedVersion&",
        "version",
        "ResourceFolderModel*",
        "packs",
        "is_indexed",
        "removePack",
        "rem",
        "selectedPacks",
        "QList<DownloadTaskPtr>",
        "search_term"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'versionListUpdated'
        QtMocHelpers::SignalData<void(const QModelIndex &)>(1, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 3, 4 },
        }}),
        // Signal 'projectInfoUpdated'
        QtMocHelpers::SignalData<void(const QModelIndex &)>(5, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 3, 4 },
        }}),
        // Slot 'fetchMore'
        QtMocHelpers::SlotData<void(const QModelIndex &)>(6, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 3, 7 },
        }}),
        // Slot 'canFetchMore'
        QtMocHelpers::SlotData<bool(const QModelIndex &) const>(8, 2, QMC::AccessPublic, QMetaType::Bool, {{
            { 0x80000000 | 3, 7 },
        }}),
        // Slot 'setSearchTerm'
        QtMocHelpers::SlotData<void(QString)>(9, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::QString, 10 },
        }}),
        // Slot 'createSearchArguments'
        QtMocHelpers::SlotData<ResourceAPI::SearchArgs()>(11, 2, QMC::AccessPublic, 0x80000000 | 12),
        // Slot 'createVersionsArguments'
        QtMocHelpers::SlotData<ResourceAPI::VersionSearchArgs(const QModelIndex &)>(13, 2, QMC::AccessPublic, 0x80000000 | 14, {{
            { 0x80000000 | 3, 2 },
        }}),
        // Slot 'createInfoArguments'
        QtMocHelpers::SlotData<ResourceAPI::ProjectInfoArgs(const QModelIndex &)>(15, 2, QMC::AccessPublic, 0x80000000 | 16, {{
            { 0x80000000 | 3, 2 },
        }}),
        // Slot 'search'
        QtMocHelpers::SlotData<void()>(17, 2, QMC::AccessPublic, QMetaType::Void),
        // Slot 'loadEntry'
        QtMocHelpers::SlotData<void(const QModelIndex &)>(18, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 3, 2 },
        }}),
        // Slot 'refresh'
        QtMocHelpers::SlotData<void()>(19, 2, QMC::AccessPublic, QMetaType::Void),
        // Slot 'getIcon'
        QtMocHelpers::SlotData<std::optional<QIcon>(QModelIndex &, const QUrl &)>(20, 2, QMC::AccessPublic, 0x80000000 | 21, {{
            { 0x80000000 | 22, 2 }, { 0x80000000 | 23, 2 },
        }}),
        // Slot 'addPack'
        QtMocHelpers::SlotData<void(ModPlatform::IndexedPack::Ptr, ModPlatform::IndexedVersion &, ResourceFolderModel *, bool)>(24, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 25, 26 }, { 0x80000000 | 27, 28 }, { 0x80000000 | 29, 30 }, { QMetaType::Bool, 31 },
        }}),
        // Slot 'addPack'
        QtMocHelpers::SlotData<void(ModPlatform::IndexedPack::Ptr, ModPlatform::IndexedVersion &, ResourceFolderModel *)>(24, 2, QMC::AccessPublic | QMC::MethodCloned, QMetaType::Void, {{
            { 0x80000000 | 25, 26 }, { 0x80000000 | 27, 28 }, { 0x80000000 | 29, 30 },
        }}),
        // Slot 'removePack'
        QtMocHelpers::SlotData<void(const QString &)>(32, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::QString, 33 },
        }}),
        // Slot 'selectedPacks'
        QtMocHelpers::SlotData<QList<DownloadTaskPtr>()>(34, 2, QMC::AccessPublic, 0x80000000 | 35),
    };
    QtMocHelpers::UintData qt_properties {
        // property 'search_term'
        QtMocHelpers::PropertyData<QString>(36, QMetaType::QString, QMC::DefaultPropertyFlags | QMC::Writable),
    };
    QtMocHelpers::UintData qt_enums {
    };
    return QtMocHelpers::metaObjectData<ResourceModel, qt_meta_tag_ZN16ResourceDownload13ResourceModelE_t>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums);
}
Q_CONSTINIT const QMetaObject ResourceDownload::ResourceModel::staticMetaObject = { {
    QMetaObject::SuperData::link<QAbstractListModel::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN16ResourceDownload13ResourceModelE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN16ResourceDownload13ResourceModelE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN16ResourceDownload13ResourceModelE_t>.metaTypes,
    nullptr
} };

void ResourceDownload::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->versionListUpdated((*reinterpret_cast<std::add_pointer_t<QModelIndex>>(_a[1]))); break;
        case 1: _t->projectInfoUpdated((*reinterpret_cast<std::add_pointer_t<QModelIndex>>(_a[1]))); break;
        case 2: _t->fetchMore((*reinterpret_cast<std::add_pointer_t<QModelIndex>>(_a[1]))); break;
        case 3: { bool _r = _t->canFetchMore((*reinterpret_cast<std::add_pointer_t<QModelIndex>>(_a[1])));
            if (_a[0]) *reinterpret_cast<bool*>(_a[0]) = std::move(_r); }  break;
        case 4: _t->setSearchTerm((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1]))); break;
        case 5: { ResourceAPI::SearchArgs _r = _t->createSearchArguments();
            if (_a[0]) *reinterpret_cast<ResourceAPI::SearchArgs*>(_a[0]) = std::move(_r); }  break;
        case 6: { ResourceAPI::VersionSearchArgs _r = _t->createVersionsArguments((*reinterpret_cast<std::add_pointer_t<QModelIndex>>(_a[1])));
            if (_a[0]) *reinterpret_cast<ResourceAPI::VersionSearchArgs*>(_a[0]) = std::move(_r); }  break;
        case 7: { ResourceAPI::ProjectInfoArgs _r = _t->createInfoArguments((*reinterpret_cast<std::add_pointer_t<QModelIndex>>(_a[1])));
            if (_a[0]) *reinterpret_cast<ResourceAPI::ProjectInfoArgs*>(_a[0]) = std::move(_r); }  break;
        case 8: _t->search(); break;
        case 9: _t->loadEntry((*reinterpret_cast<std::add_pointer_t<QModelIndex>>(_a[1]))); break;
        case 10: _t->refresh(); break;
        case 11: { std::optional<QIcon> _r = _t->getIcon((*reinterpret_cast<std::add_pointer_t<QModelIndex&>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QUrl>>(_a[2])));
            if (_a[0]) *reinterpret_cast<std::optional<QIcon>*>(_a[0]) = std::move(_r); }  break;
        case 12: _t->addPack((*reinterpret_cast<std::add_pointer_t<ModPlatform::IndexedPack::Ptr>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<ModPlatform::IndexedVersion&>>(_a[2])),(*reinterpret_cast<std::add_pointer_t<ResourceFolderModel*>>(_a[3])),(*reinterpret_cast<std::add_pointer_t<bool>>(_a[4]))); break;
        case 13: _t->addPack((*reinterpret_cast<std::add_pointer_t<ModPlatform::IndexedPack::Ptr>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<ModPlatform::IndexedVersion&>>(_a[2])),(*reinterpret_cast<std::add_pointer_t<ResourceFolderModel*>>(_a[3]))); break;
        case 14: _t->removePack((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1]))); break;
        case 15: { QList<DownloadTaskPtr> _r = _t->selectedPacks();
            if (_a[0]) *reinterpret_cast<QList<DownloadTaskPtr>*>(_a[0]) = std::move(_r); }  break;
        default: ;
        }
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        switch (_id) {
        default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
        case 12:
            switch (*reinterpret_cast<int*>(_a[1])) {
            default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
            case 0:
                *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType::fromType< ModPlatform::IndexedPack::Ptr >(); break;
            }
            break;
        case 13:
            switch (*reinterpret_cast<int*>(_a[1])) {
            default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
            case 0:
                *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType::fromType< ModPlatform::IndexedPack::Ptr >(); break;
            }
            break;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (ResourceModel::*)(const QModelIndex & )>(_a, &ResourceModel::versionListUpdated, 0))
            return;
        if (QtMocHelpers::indexOfMethod<void (ResourceModel::*)(const QModelIndex & )>(_a, &ResourceModel::projectInfoUpdated, 1))
            return;
    }
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<QString*>(_v) = _t->m_search_term; break;
        default: break;
        }
    }
    if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: _t->setSearchTerm(*reinterpret_cast<QString*>(_v)); break;
        default: break;
        }
    }
}

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

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

int ResourceDownload::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 < 16)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 16;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 16)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 16;
    }
    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 ResourceDownload::ResourceModel::versionListUpdated(const QModelIndex & _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 0, nullptr, _t1);
}

// SIGNAL 1
void ResourceDownload::ResourceModel::projectInfoUpdated(const QModelIndex & _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 1, nullptr, _t1);
}
QT_WARNING_POP
