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

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

template <> constexpr inline auto MxcImageRunnable::qt_create_metaobjectdata<qt_meta_tag_ZN16MxcImageRunnableE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "MxcImageRunnable",
        "done",
        "",
        "QImage",
        "image",
        "error"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'done'
        QtMocHelpers::SignalData<void(QImage)>(1, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 3, 4 },
        }}),
        // Signal 'error'
        QtMocHelpers::SignalData<void(QString)>(5, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::QString, 5 },
        }}),
    };
    QtMocHelpers::UintData qt_properties {
    };
    QtMocHelpers::UintData qt_enums {
    };
    return QtMocHelpers::metaObjectData<MxcImageRunnable, qt_meta_tag_ZN16MxcImageRunnableE_t>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums);
}
Q_CONSTINIT const QMetaObject MxcImageRunnable::staticMetaObject = { {
    QMetaObject::SuperData::link<QObject::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN16MxcImageRunnableE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN16MxcImageRunnableE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN16MxcImageRunnableE_t>.metaTypes,
    nullptr
} };

void MxcImageRunnable::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<MxcImageRunnable *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->done((*reinterpret_cast<std::add_pointer_t<QImage>>(_a[1]))); break;
        case 1: _t->error((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1]))); break;
        default: ;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (MxcImageRunnable::*)(QImage )>(_a, &MxcImageRunnable::done, 0))
            return;
        if (QtMocHelpers::indexOfMethod<void (MxcImageRunnable::*)(QString )>(_a, &MxcImageRunnable::error, 1))
            return;
    }
}

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

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

int MxcImageRunnable::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 2)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 2;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 2)
            *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
        _id -= 2;
    }
    return _id;
}

// SIGNAL 0
void MxcImageRunnable::done(QImage _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 0, nullptr, _t1);
}

// SIGNAL 1
void MxcImageRunnable::error(QString _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 1, nullptr, _t1);
}
namespace {
struct qt_meta_tag_ZN16MxcImageProviderE_t {};
} // unnamed namespace

template <> constexpr inline auto MxcImageProvider::qt_create_metaobjectdata<qt_meta_tag_ZN16MxcImageProviderE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "MxcImageProvider",
        "requestImageResponse",
        "QQuickImageResponse*",
        "",
        "id",
        "QSize",
        "requestedSize",
        "addEncryptionInfo",
        "mtx::crypto::EncryptedFile",
        "info",
        "download",
        "std::function<void(QString,QSize,QImage,QString)>",
        "then",
        "crop",
        "radius"
    };

    QtMocHelpers::UintData qt_methods {
        // Slot 'requestImageResponse'
        QtMocHelpers::SlotData<QQuickImageResponse *(const QString &, const QSize &)>(1, 3, QMC::AccessPublic, 0x80000000 | 2, {{
            { QMetaType::QString, 4 }, { 0x80000000 | 5, 6 },
        }}),
        // Slot 'addEncryptionInfo'
        QtMocHelpers::SlotData<void(const mtx::crypto::EncryptedFile &)>(7, 3, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 8, 9 },
        }}),
        // Slot 'download'
        QtMocHelpers::SlotData<void(const QString &, const QSize &, std::function<void(QString,QSize,QImage,QString)>, bool, double)>(10, 3, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::QString, 4 }, { 0x80000000 | 5, 6 }, { 0x80000000 | 11, 12 }, { QMetaType::Bool, 13 },
            { QMetaType::Double, 14 },
        }}),
        // Slot 'download'
        QtMocHelpers::SlotData<void(const QString &, const QSize &, std::function<void(QString,QSize,QImage,QString)>, bool)>(10, 3, QMC::AccessPublic | QMC::MethodCloned, QMetaType::Void, {{
            { QMetaType::QString, 4 }, { 0x80000000 | 5, 6 }, { 0x80000000 | 11, 12 }, { QMetaType::Bool, 13 },
        }}),
        // Slot 'download'
        QtMocHelpers::SlotData<void(const QString &, const QSize &, std::function<void(QString,QSize,QImage,QString)>)>(10, 3, QMC::AccessPublic | QMC::MethodCloned, QMetaType::Void, {{
            { QMetaType::QString, 4 }, { 0x80000000 | 5, 6 }, { 0x80000000 | 11, 12 },
        }}),
    };
    QtMocHelpers::UintData qt_properties {
    };
    QtMocHelpers::UintData qt_enums {
    };
    return QtMocHelpers::metaObjectData<MxcImageProvider, qt_meta_tag_ZN16MxcImageProviderE_t>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums);
}
Q_CONSTINIT const QMetaObject MxcImageProvider::staticMetaObject = { {
    QMetaObject::SuperData::link<QQuickAsyncImageProvider::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN16MxcImageProviderE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN16MxcImageProviderE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN16MxcImageProviderE_t>.metaTypes,
    nullptr
} };

void MxcImageProvider::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<MxcImageProvider *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: { QQuickImageResponse* _r = _t->requestImageResponse((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QSize>>(_a[2])));
            if (_a[0]) *reinterpret_cast<QQuickImageResponse**>(_a[0]) = std::move(_r); }  break;
        case 1: _t->addEncryptionInfo((*reinterpret_cast<std::add_pointer_t<mtx::crypto::EncryptedFile>>(_a[1]))); break;
        case 2: _t->download((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QSize>>(_a[2])),(*reinterpret_cast<std::add_pointer_t<std::function<void(QString,QSize,QImage,QString)>>>(_a[3])),(*reinterpret_cast<std::add_pointer_t<bool>>(_a[4])),(*reinterpret_cast<std::add_pointer_t<double>>(_a[5]))); break;
        case 3: _t->download((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QSize>>(_a[2])),(*reinterpret_cast<std::add_pointer_t<std::function<void(QString,QSize,QImage,QString)>>>(_a[3])),(*reinterpret_cast<std::add_pointer_t<bool>>(_a[4]))); break;
        case 4: _t->download((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QSize>>(_a[2])),(*reinterpret_cast<std::add_pointer_t<std::function<void(QString,QSize,QImage,QString)>>>(_a[3]))); break;
        default: ;
        }
    }
}

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

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

int MxcImageProvider::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QQuickAsyncImageProvider::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 5)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 5;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 5)
            *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
        _id -= 5;
    }
    return _id;
}
QT_WARNING_POP
