/****************************************************************************
** Meta object code from reading C++ file 'drivelistmodel.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 "../../../rpi-imager/src/drivelistmodel.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 'drivelistmodel.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_ZN14DriveListModelE_t {};
} // unnamed namespace

template <> constexpr inline auto DriveListModel::qt_create_metaobjectdata<qt_meta_tag_ZN14DriveListModelE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "DriveListModel",
        "QML.Element",
        "auto",
        "QML.Creatable",
        "false",
        "QML.UncreatableReason",
        "Created by C++",
        "deviceRemoved",
        "",
        "device",
        "eventDriveListPoll",
        "durationMs",
        "connectedRpibootChipsChanged",
        "chips",
        "lastErrorChanged",
        "enumerationError",
        "errorMessage",
        "rpibootDeviceDetected",
        "deviceId",
        "uint8_t",
        "busNumber",
        "deviceAddress",
        "QList<uint8_t>",
        "portPath",
        "uint16_t",
        "productId",
        "processDriveList",
        "std::vector<Drivelist::DeviceDescriptor>",
        "l",
        "getChildDevices",
        "lastError"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'deviceRemoved'
        QtMocHelpers::SignalData<void(const QString &)>(7, 8, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::QString, 9 },
        }}),
        // Signal 'eventDriveListPoll'
        QtMocHelpers::SignalData<void(quint32)>(10, 8, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::UInt, 11 },
        }}),
        // Signal 'connectedRpibootChipsChanged'
        QtMocHelpers::SignalData<void(const QStringList &)>(12, 8, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::QStringList, 13 },
        }}),
        // Signal 'lastErrorChanged'
        QtMocHelpers::SignalData<void()>(14, 8, QMC::AccessPublic, QMetaType::Void),
        // Signal 'enumerationError'
        QtMocHelpers::SignalData<void(const QString &)>(15, 8, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::QString, 16 },
        }}),
        // Signal 'rpibootDeviceDetected'
        QtMocHelpers::SignalData<void(const QString &, uint8_t, uint8_t, const QList<uint8_t> &, uint16_t)>(17, 8, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::QString, 18 }, { 0x80000000 | 19, 20 }, { 0x80000000 | 19, 21 }, { 0x80000000 | 22, 23 },
            { 0x80000000 | 24, 25 },
        }}),
        // Slot 'processDriveList'
        QtMocHelpers::SlotData<void(std::vector<Drivelist::DeviceDescriptor>)>(26, 8, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 27, 28 },
        }}),
        // Method 'getChildDevices'
        QtMocHelpers::MethodData<QStringList(const QString &) const>(29, 8, QMC::AccessPublic, QMetaType::QStringList, {{
            { QMetaType::QString, 9 },
        }}),
    };
    QtMocHelpers::UintData qt_properties {
        // property 'lastError'
        QtMocHelpers::PropertyData<QString>(30, QMetaType::QString, QMC::DefaultPropertyFlags, 3),
    };
    QtMocHelpers::UintData qt_enums {
    };
    QtMocHelpers::UintData qt_constructors {};
    QtMocHelpers::ClassInfos qt_classinfo({
            {    1,    2 },
            {    3,    4 },
            {    5,    6 },
    });
    return QtMocHelpers::metaObjectData<DriveListModel, void>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums, qt_constructors, qt_classinfo);
}
Q_CONSTINIT const QMetaObject DriveListModel::staticMetaObject = { {
    QMetaObject::SuperData::link<QAbstractListModel::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN14DriveListModelE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN14DriveListModelE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN14DriveListModelE_t>.metaTypes,
    nullptr
} };

void DriveListModel::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<DriveListModel *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->deviceRemoved((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1]))); break;
        case 1: _t->eventDriveListPoll((*reinterpret_cast<std::add_pointer_t<quint32>>(_a[1]))); break;
        case 2: _t->connectedRpibootChipsChanged((*reinterpret_cast<std::add_pointer_t<QStringList>>(_a[1]))); break;
        case 3: _t->lastErrorChanged(); break;
        case 4: _t->enumerationError((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1]))); break;
        case 5: _t->rpibootDeviceDetected((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<uint8_t>>(_a[2])),(*reinterpret_cast<std::add_pointer_t<uint8_t>>(_a[3])),(*reinterpret_cast<std::add_pointer_t<QList<uint8_t>>>(_a[4])),(*reinterpret_cast<std::add_pointer_t<uint16_t>>(_a[5]))); break;
        case 6: _t->processDriveList((*reinterpret_cast<std::add_pointer_t<std::vector<Drivelist::DeviceDescriptor>>>(_a[1]))); break;
        case 7: { QStringList _r = _t->getChildDevices((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])));
            if (_a[0]) *reinterpret_cast<QStringList*>(_a[0]) = std::move(_r); }  break;
        default: ;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (DriveListModel::*)(const QString & )>(_a, &DriveListModel::deviceRemoved, 0))
            return;
        if (QtMocHelpers::indexOfMethod<void (DriveListModel::*)(quint32 )>(_a, &DriveListModel::eventDriveListPoll, 1))
            return;
        if (QtMocHelpers::indexOfMethod<void (DriveListModel::*)(const QStringList & )>(_a, &DriveListModel::connectedRpibootChipsChanged, 2))
            return;
        if (QtMocHelpers::indexOfMethod<void (DriveListModel::*)()>(_a, &DriveListModel::lastErrorChanged, 3))
            return;
        if (QtMocHelpers::indexOfMethod<void (DriveListModel::*)(const QString & )>(_a, &DriveListModel::enumerationError, 4))
            return;
        if (QtMocHelpers::indexOfMethod<void (DriveListModel::*)(const QString & , uint8_t , uint8_t , const QList<uint8_t> & , uint16_t )>(_a, &DriveListModel::rpibootDeviceDetected, 5))
            return;
    }
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<QString*>(_v) = _t->lastError(); break;
        default: break;
        }
    }
}

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

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

int DriveListModel::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 < 8)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 8;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 8)
            *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
        _id -= 8;
    }
    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 DriveListModel::deviceRemoved(const QString & _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 0, nullptr, _t1);
}

// SIGNAL 1
void DriveListModel::eventDriveListPoll(quint32 _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 1, nullptr, _t1);
}

// SIGNAL 2
void DriveListModel::connectedRpibootChipsChanged(const QStringList & _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 2, nullptr, _t1);
}

// SIGNAL 3
void DriveListModel::lastErrorChanged()
{
    QMetaObject::activate(this, &staticMetaObject, 3, nullptr);
}

// SIGNAL 4
void DriveListModel::enumerationError(const QString & _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 4, nullptr, _t1);
}

// SIGNAL 5
void DriveListModel::rpibootDeviceDetected(const QString & _t1, uint8_t _t2, uint8_t _t3, const QList<uint8_t> & _t4, uint16_t _t5)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 5, nullptr, _t1, _t2, _t3, _t4, _t5);
}
QT_WARNING_POP
