/****************************************************************************
** Meta object code from reading C++ file 'matrixroomsmodel.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 "../../../../../itinerary-26.04.0/src/matrix/matrixroomsmodel.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 'matrixroomsmodel.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_ZN16MatrixRoomsModelE_t {};
} // unnamed namespace

template <> constexpr inline auto MatrixRoomsModel::qt_create_metaobjectdata<qt_meta_tag_ZN16MatrixRoomsModelE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "MatrixRoomsModel",
        "QML.Element",
        "auto",
        "QML.Creatable",
        "false",
        "QML.UncreatableReason",
        "",
        "connectionChanged",
        "doAddRoom",
        "Quotient::Room*",
        "room",
        "updateRoom",
        "prev",
        "deleteRoom",
        "refresh",
        "QList<int>",
        "roles",
        "roomAt",
        "row",
        "rowCount",
        "QModelIndex",
        "parent",
        "connection",
        "Quotient::Connection*",
        "EventRoles",
        "DisplayNameRole",
        "AvatarImageRole",
        "AvatarRole",
        "CanonicalAliasRole",
        "TopicRole",
        "IdRole",
        "CategoryRole",
        "RoomType",
        "InvitedRoom",
        "FavoriteRoom",
        "DirectChatRoom",
        "RegularRoom",
        "LowPriorityRoom",
        "Space"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'connectionChanged'
        QtMocHelpers::SignalData<void()>(7, 6, QMC::AccessPublic, QMetaType::Void),
        // Slot 'doAddRoom'
        QtMocHelpers::SlotData<void(Quotient::Room *)>(8, 6, QMC::AccessPrivate, QMetaType::Void, {{
            { 0x80000000 | 9, 10 },
        }}),
        // Slot 'updateRoom'
        QtMocHelpers::SlotData<void(Quotient::Room *, Quotient::Room *)>(11, 6, QMC::AccessPrivate, QMetaType::Void, {{
            { 0x80000000 | 9, 10 }, { 0x80000000 | 9, 12 },
        }}),
        // Slot 'deleteRoom'
        QtMocHelpers::SlotData<void(Quotient::Room *)>(13, 6, QMC::AccessPrivate, QMetaType::Void, {{
            { 0x80000000 | 9, 10 },
        }}),
        // Slot 'refresh'
        QtMocHelpers::SlotData<void(Quotient::Room *, const QList<int> &)>(14, 6, QMC::AccessPrivate, QMetaType::Void, {{
            { 0x80000000 | 9, 10 }, { 0x80000000 | 15, 16 },
        }}),
        // Slot 'refresh'
        QtMocHelpers::SlotData<void(Quotient::Room *)>(14, 6, QMC::AccessPrivate | QMC::MethodCloned, QMetaType::Void, {{
            { 0x80000000 | 9, 10 },
        }}),
        // Method 'roomAt'
        QtMocHelpers::MethodData<Quotient::Room *(int) const>(17, 6, QMC::AccessPublic, 0x80000000 | 9, {{
            { QMetaType::Int, 18 },
        }}),
        // Method 'rowCount'
        QtMocHelpers::MethodData<int(const QModelIndex &) const>(19, 6, QMC::AccessPublic, QMetaType::Int, {{
            { 0x80000000 | 20, 21 },
        }}),
        // Method 'rowCount'
        QtMocHelpers::MethodData<int() const>(19, 6, QMC::AccessPublic | QMC::MethodCloned, QMetaType::Int),
    };
    QtMocHelpers::UintData qt_properties {
        // property 'connection'
        QtMocHelpers::PropertyData<Quotient::Connection*>(22, 0x80000000 | 23, QMC::DefaultPropertyFlags | QMC::Writable | QMC::EnumOrFlag | QMC::StdCppSet, 0),
    };
    QtMocHelpers::UintData qt_enums {
        // enum 'EventRoles'
        QtMocHelpers::EnumData<enum EventRoles>(24, 24, QMC::EnumFlags{}).add({
            {   25, EventRoles::DisplayNameRole },
            {   26, EventRoles::AvatarImageRole },
            {   27, EventRoles::AvatarRole },
            {   28, EventRoles::CanonicalAliasRole },
            {   29, EventRoles::TopicRole },
            {   30, EventRoles::IdRole },
            {   31, EventRoles::CategoryRole },
        }),
        // enum 'RoomType'
        QtMocHelpers::EnumData<enum RoomType>(32, 32, QMC::EnumFlags{}).add({
            {   33, RoomType::InvitedRoom },
            {   34, RoomType::FavoriteRoom },
            {   35, RoomType::DirectChatRoom },
            {   36, RoomType::RegularRoom },
            {   37, RoomType::LowPriorityRoom },
            {   38, RoomType::Space },
        }),
    };
    QtMocHelpers::UintData qt_constructors {};
    QtMocHelpers::ClassInfos qt_classinfo({
            {    1,    2 },
            {    3,    4 },
            {    5,    6 },
    });
    return QtMocHelpers::metaObjectData<MatrixRoomsModel, void>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums, qt_constructors, qt_classinfo);
}
Q_CONSTINIT const QMetaObject MatrixRoomsModel::staticMetaObject = { {
    QMetaObject::SuperData::link<QAbstractListModel::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN16MatrixRoomsModelE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN16MatrixRoomsModelE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN16MatrixRoomsModelE_t>.metaTypes,
    nullptr
} };

void MatrixRoomsModel::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<MatrixRoomsModel *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->connectionChanged(); break;
        case 1: _t->doAddRoom((*reinterpret_cast<std::add_pointer_t<Quotient::Room*>>(_a[1]))); break;
        case 2: _t->updateRoom((*reinterpret_cast<std::add_pointer_t<Quotient::Room*>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<Quotient::Room*>>(_a[2]))); break;
        case 3: _t->deleteRoom((*reinterpret_cast<std::add_pointer_t<Quotient::Room*>>(_a[1]))); break;
        case 4: _t->refresh((*reinterpret_cast<std::add_pointer_t<Quotient::Room*>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QList<int>>>(_a[2]))); break;
        case 5: _t->refresh((*reinterpret_cast<std::add_pointer_t<Quotient::Room*>>(_a[1]))); break;
        case 6: { Quotient::Room* _r = _t->roomAt((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])));
            if (_a[0]) *reinterpret_cast<Quotient::Room**>(_a[0]) = std::move(_r); }  break;
        case 7: { int _r = _t->rowCount((*reinterpret_cast<std::add_pointer_t<QModelIndex>>(_a[1])));
            if (_a[0]) *reinterpret_cast<int*>(_a[0]) = std::move(_r); }  break;
        case 8: { int _r = _t->rowCount();
            if (_a[0]) *reinterpret_cast<int*>(_a[0]) = std::move(_r); }  break;
        default: ;
        }
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        switch (_id) {
        default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
        case 4:
            switch (*reinterpret_cast<int*>(_a[1])) {
            default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
            case 1:
                *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType::fromType< QList<int> >(); break;
            }
            break;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (MatrixRoomsModel::*)()>(_a, &MatrixRoomsModel::connectionChanged, 0))
            return;
    }
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<Quotient::Connection**>(_v) = _t->connection(); break;
        default: break;
        }
    }
    if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: _t->setConnection(*reinterpret_cast<Quotient::Connection**>(_v)); break;
        default: break;
        }
    }
}

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

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

int MatrixRoomsModel::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 < 9)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 9;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 9)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 9;
    }
    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 MatrixRoomsModel::connectionChanged()
{
    QMetaObject::activate(this, &staticMetaObject, 0, nullptr);
}
QT_WARNING_POP
