/****************************************************************************
** Meta object code from reading C++ file 'UpdateModel.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/UpdateModel/UpdateModel.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 'UpdateModel.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_ZN11UpdateModelE_t {};
} // unnamed namespace

template <> constexpr inline auto UpdateModel::qt_create_metaobjectdata<qt_meta_tag_ZN11UpdateModelE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "UpdateModel",
        "hasUpdatesChanged",
        "",
        "hasUpdates",
        "toUpdateChanged",
        "updateSizeChanged",
        "checkAll",
        "uncheckAll",
        "fetchUpdateDetails",
        "row",
        "backend",
        "ResourcesUpdatesModel*",
        "toUpdateCount",
        "totalUpdatesCount",
        "updateSize",
        "Roles",
        "SizeRole",
        "ResourceRole",
        "ResourceProgressRole",
        "ResourceStateRole",
        "ResourceStateIsDoneRole",
        "SectionResourceProgressRole",
        "ChangelogRole",
        "SectionRole",
        "ExtendedRole"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'hasUpdatesChanged'
        QtMocHelpers::SignalData<void(bool)>(1, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::Bool, 3 },
        }}),
        // Signal 'toUpdateChanged'
        QtMocHelpers::SignalData<void()>(4, 2, QMC::AccessPublic, QMetaType::Void),
        // Signal 'updateSizeChanged'
        QtMocHelpers::SignalData<void()>(5, 2, QMC::AccessPublic, QMetaType::Void),
        // Slot 'checkAll'
        QtMocHelpers::SlotData<void()>(6, 2, QMC::AccessPublic, QMetaType::Void),
        // Slot 'uncheckAll'
        QtMocHelpers::SlotData<void()>(7, 2, QMC::AccessPublic, QMetaType::Void),
        // Method 'fetchUpdateDetails'
        QtMocHelpers::MethodData<void(int)>(8, 2, QMC::AccessPublic | QMC::MethodScriptable, QMetaType::Void, {{
            { QMetaType::Int, 9 },
        }}),
    };
    QtMocHelpers::UintData qt_properties {
        // property 'backend'
        QtMocHelpers::PropertyData<ResourcesUpdatesModel*>(10, 0x80000000 | 11, QMC::DefaultPropertyFlags | QMC::Writable | QMC::EnumOrFlag | QMC::StdCppSet),
        // property 'hasUpdates'
        QtMocHelpers::PropertyData<bool>(3, QMetaType::Bool, QMC::DefaultPropertyFlags, 0),
        // property 'toUpdateCount'
        QtMocHelpers::PropertyData<int>(12, QMetaType::Int, QMC::DefaultPropertyFlags, 1),
        // property 'totalUpdatesCount'
        QtMocHelpers::PropertyData<int>(13, QMetaType::Int, QMC::DefaultPropertyFlags, 0),
        // property 'updateSize'
        QtMocHelpers::PropertyData<QString>(14, QMetaType::QString, QMC::DefaultPropertyFlags, 2),
    };
    QtMocHelpers::UintData qt_enums {
        // enum 'Roles'
        QtMocHelpers::EnumData<enum Roles>(15, 15, QMC::EnumFlags{}).add({
            {   16, Roles::SizeRole },
            {   17, Roles::ResourceRole },
            {   18, Roles::ResourceProgressRole },
            {   19, Roles::ResourceStateRole },
            {   20, Roles::ResourceStateIsDoneRole },
            {   21, Roles::SectionResourceProgressRole },
            {   22, Roles::ChangelogRole },
            {   23, Roles::SectionRole },
            {   24, Roles::ExtendedRole },
        }),
    };
    return QtMocHelpers::metaObjectData<UpdateModel, qt_meta_tag_ZN11UpdateModelE_t>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums);
}
Q_CONSTINIT const QMetaObject UpdateModel::staticMetaObject = { {
    QMetaObject::SuperData::link<QAbstractListModel::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN11UpdateModelE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN11UpdateModelE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN11UpdateModelE_t>.metaTypes,
    nullptr
} };

void UpdateModel::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<UpdateModel *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->hasUpdatesChanged((*reinterpret_cast<std::add_pointer_t<bool>>(_a[1]))); break;
        case 1: _t->toUpdateChanged(); break;
        case 2: _t->updateSizeChanged(); break;
        case 3: _t->checkAll(); break;
        case 4: _t->uncheckAll(); break;
        case 5: _t->fetchUpdateDetails((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
        default: ;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (UpdateModel::*)(bool )>(_a, &UpdateModel::hasUpdatesChanged, 0))
            return;
        if (QtMocHelpers::indexOfMethod<void (UpdateModel::*)()>(_a, &UpdateModel::toUpdateChanged, 1))
            return;
        if (QtMocHelpers::indexOfMethod<void (UpdateModel::*)()>(_a, &UpdateModel::updateSizeChanged, 2))
            return;
    }
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<ResourcesUpdatesModel**>(_v) = _t->backend(); break;
        case 1: *reinterpret_cast<bool*>(_v) = _t->hasUpdates(); break;
        case 2: *reinterpret_cast<int*>(_v) = _t->toUpdateCount(); break;
        case 3: *reinterpret_cast<int*>(_v) = _t->totalUpdatesCount(); break;
        case 4: *reinterpret_cast<QString*>(_v) = _t->updateSize(); break;
        default: break;
        }
    }
    if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: _t->setBackend(*reinterpret_cast<ResourcesUpdatesModel**>(_v)); break;
        default: break;
        }
    }
}

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

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

int UpdateModel::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 < 6)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 6;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 6)
            *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
        _id -= 6;
    }
    if (_c == QMetaObject::ReadProperty || _c == QMetaObject::WriteProperty
            || _c == QMetaObject::ResetProperty || _c == QMetaObject::BindableProperty
            || _c == QMetaObject::RegisterPropertyMetaType) {
        qt_static_metacall(this, _c, _id, _a);
        _id -= 5;
    }
    return _id;
}

// SIGNAL 0
void UpdateModel::hasUpdatesChanged(bool _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 0, nullptr, _t1);
}

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

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