/****************************************************************************
** Meta object code from reading C++ file 'roomlistmodel.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 "../../../../../neochat-26.04.3/src/libneochat/models/roomlistmodel.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 'roomlistmodel.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_ZN13RoomListModelE_t {};
} // unnamed namespace

template <> constexpr inline auto RoomListModel::qt_create_metaobjectdata<qt_meta_tag_ZN13RoomListModelE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "RoomListModel",
        "QML.Element",
        "auto",
        "connectionChanged",
        "",
        "roomAdded",
        "NeoChatRoom*",
        "_t1",
        "doResetModel",
        "doAddRoom",
        "Quotient::Room*",
        "room",
        "updateRoom",
        "prev",
        "deleteRoom",
        "refresh",
        "QList<int>",
        "roles",
        "rowCount",
        "QModelIndex",
        "parent",
        "roomAt",
        "row",
        "rowForRoom",
        "roomByAliasOrId",
        "aliasOrId",
        "connection",
        "NeoChatConnection*",
        "EventRoles",
        "DisplayNameRole",
        "EscapedDisplayNameRole",
        "AvatarRole",
        "CanonicalAliasRole",
        "TopicRole",
        "CategoryRole",
        "ContextNotificationCountRole",
        "HasHighlightNotificationsRole",
        "JoinStateRole",
        "CurrentRoomRole",
        "SubtitleTextRole",
        "AvatarImageRole",
        "RoomIdRole",
        "IsSpaceRole",
        "IsChildSpaceRole",
        "ReplacementIdRole",
        "IsDirectChat",
        "NotificationCountRole",
        "RoomTypeRole"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'connectionChanged'
        QtMocHelpers::SignalData<void()>(3, 4, QMC::AccessPublic, QMetaType::Void),
        // Signal 'roomAdded'
        QtMocHelpers::SignalData<void(NeoChatRoom *)>(5, 4, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 6, 7 },
        }}),
        // Slot 'doResetModel'
        QtMocHelpers::SlotData<void()>(8, 4, QMC::AccessPrivate, QMetaType::Void),
        // Slot 'doAddRoom'
        QtMocHelpers::SlotData<void(Quotient::Room *)>(9, 4, QMC::AccessPrivate, QMetaType::Void, {{
            { 0x80000000 | 10, 11 },
        }}),
        // Slot 'updateRoom'
        QtMocHelpers::SlotData<void(Quotient::Room *, Quotient::Room *)>(12, 4, QMC::AccessPrivate, QMetaType::Void, {{
            { 0x80000000 | 10, 11 }, { 0x80000000 | 10, 13 },
        }}),
        // Slot 'deleteRoom'
        QtMocHelpers::SlotData<void(Quotient::Room *)>(14, 4, QMC::AccessPrivate, QMetaType::Void, {{
            { 0x80000000 | 10, 11 },
        }}),
        // Slot 'refresh'
        QtMocHelpers::SlotData<void(NeoChatRoom *, const QList<int> &)>(15, 4, QMC::AccessPrivate, QMetaType::Void, {{
            { 0x80000000 | 6, 11 }, { 0x80000000 | 16, 17 },
        }}),
        // Slot 'refresh'
        QtMocHelpers::SlotData<void(NeoChatRoom *)>(15, 4, QMC::AccessPrivate | QMC::MethodCloned, QMetaType::Void, {{
            { 0x80000000 | 6, 11 },
        }}),
        // Method 'rowCount'
        QtMocHelpers::MethodData<int(const QModelIndex &) const>(18, 4, QMC::AccessPublic, QMetaType::Int, {{
            { 0x80000000 | 19, 20 },
        }}),
        // Method 'rowCount'
        QtMocHelpers::MethodData<int() const>(18, 4, QMC::AccessPublic | QMC::MethodCloned, QMetaType::Int),
        // Method 'roomAt'
        QtMocHelpers::MethodData<NeoChatRoom *(int) const>(21, 4, QMC::AccessPublic, 0x80000000 | 6, {{
            { QMetaType::Int, 22 },
        }}),
        // Method 'rowForRoom'
        QtMocHelpers::MethodData<int(NeoChatRoom *) const>(23, 4, QMC::AccessPublic, QMetaType::Int, {{
            { 0x80000000 | 6, 11 },
        }}),
        // Method 'roomByAliasOrId'
        QtMocHelpers::MethodData<NeoChatRoom *(const QString &)>(24, 4, QMC::AccessPublic, 0x80000000 | 6, {{
            { QMetaType::QString, 25 },
        }}),
    };
    QtMocHelpers::UintData qt_properties {
        // property 'connection'
        QtMocHelpers::PropertyData<NeoChatConnection*>(26, 0x80000000 | 27, QMC::DefaultPropertyFlags | QMC::Writable | QMC::EnumOrFlag | QMC::StdCppSet, 0),
    };
    QtMocHelpers::UintData qt_enums {
        // enum 'EventRoles'
        QtMocHelpers::EnumData<enum EventRoles>(28, 28, QMC::EnumFlags{}).add({
            {   29, EventRoles::DisplayNameRole },
            {   30, EventRoles::EscapedDisplayNameRole },
            {   31, EventRoles::AvatarRole },
            {   32, EventRoles::CanonicalAliasRole },
            {   33, EventRoles::TopicRole },
            {   34, EventRoles::CategoryRole },
            {   35, EventRoles::ContextNotificationCountRole },
            {   36, EventRoles::HasHighlightNotificationsRole },
            {   37, EventRoles::JoinStateRole },
            {   38, EventRoles::CurrentRoomRole },
            {   39, EventRoles::SubtitleTextRole },
            {   40, EventRoles::AvatarImageRole },
            {   41, EventRoles::RoomIdRole },
            {   42, EventRoles::IsSpaceRole },
            {   43, EventRoles::IsChildSpaceRole },
            {   44, EventRoles::ReplacementIdRole },
            {   45, EventRoles::IsDirectChat },
            {   46, EventRoles::NotificationCountRole },
            {   47, EventRoles::RoomTypeRole },
        }),
    };
    QtMocHelpers::UintData qt_constructors {};
    QtMocHelpers::ClassInfos qt_classinfo({
            {    1,    2 },
    });
    return QtMocHelpers::metaObjectData<RoomListModel, void>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums, qt_constructors, qt_classinfo);
}
Q_CONSTINIT const QMetaObject RoomListModel::staticMetaObject = { {
    QMetaObject::SuperData::link<QAbstractListModel::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN13RoomListModelE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN13RoomListModelE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN13RoomListModelE_t>.metaTypes,
    nullptr
} };

void RoomListModel::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<RoomListModel *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->connectionChanged(); break;
        case 1: _t->roomAdded((*reinterpret_cast<std::add_pointer_t<NeoChatRoom*>>(_a[1]))); break;
        case 2: _t->doResetModel(); break;
        case 3: _t->doAddRoom((*reinterpret_cast<std::add_pointer_t<Quotient::Room*>>(_a[1]))); break;
        case 4: _t->updateRoom((*reinterpret_cast<std::add_pointer_t<Quotient::Room*>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<Quotient::Room*>>(_a[2]))); break;
        case 5: _t->deleteRoom((*reinterpret_cast<std::add_pointer_t<Quotient::Room*>>(_a[1]))); break;
        case 6: _t->refresh((*reinterpret_cast<std::add_pointer_t<NeoChatRoom*>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QList<int>>>(_a[2]))); break;
        case 7: _t->refresh((*reinterpret_cast<std::add_pointer_t<NeoChatRoom*>>(_a[1]))); break;
        case 8: { 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 9: { int _r = _t->rowCount();
            if (_a[0]) *reinterpret_cast<int*>(_a[0]) = std::move(_r); }  break;
        case 10: { NeoChatRoom* _r = _t->roomAt((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])));
            if (_a[0]) *reinterpret_cast<NeoChatRoom**>(_a[0]) = std::move(_r); }  break;
        case 11: { int _r = _t->rowForRoom((*reinterpret_cast<std::add_pointer_t<NeoChatRoom*>>(_a[1])));
            if (_a[0]) *reinterpret_cast<int*>(_a[0]) = std::move(_r); }  break;
        case 12: { NeoChatRoom* _r = _t->roomByAliasOrId((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])));
            if (_a[0]) *reinterpret_cast<NeoChatRoom**>(_a[0]) = std::move(_r); }  break;
        default: ;
        }
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        switch (_id) {
        default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
        case 6:
            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 (RoomListModel::*)()>(_a, &RoomListModel::connectionChanged, 0))
            return;
        if (QtMocHelpers::indexOfMethod<void (RoomListModel::*)(NeoChatRoom * )>(_a, &RoomListModel::roomAdded, 1))
            return;
    }
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<NeoChatConnection**>(_v) = _t->connection(); break;
        default: break;
        }
    }
    if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: _t->setConnection(*reinterpret_cast<NeoChatConnection**>(_v)); break;
        default: break;
        }
    }
}

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

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

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

// SIGNAL 1
void RoomListModel::roomAdded(NeoChatRoom * _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 1, nullptr, _t1);
}
QT_WARNING_POP
