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

#include "../../../../../neochat-26.07.80/src/rooms/models/roomtreemodel.h"
#include <QtNetwork/QSslError>
#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 'roomtreemodel.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 69
#error "This file was generated using the moc from 6.12.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_ZN13RoomTreeModelE_t {};
} // unnamed namespace

template <> constexpr inline auto RoomTreeModel::qt_create_metaobjectdata<qt_meta_tag_ZN13RoomTreeModelE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "RoomTreeModel",
        "QML.Element",
        "auto",
        "connectionChanged",
        "",
        "invalidateSort",
        "indexForRoom",
        "QModelIndex",
        "NeoChatRoom*",
        "room",
        "connection",
        "NeoChatConnection*",
        "EventRoles",
        "DisplayNameRole",
        "AvatarRole",
        "CanonicalAliasRole",
        "TopicRole",
        "CategoryRole",
        "ContextNotificationCountRole",
        "HasHighlightNotificationsRole",
        "JoinStateRole",
        "CurrentRoomRole",
        "SubtitleTextRole",
        "AvatarImageRole",
        "RoomIdRole",
        "IsSpaceRole",
        "IsChildSpaceRole",
        "ReplacementIdRole",
        "IsDirectChat",
        "DelegateTypeRole",
        "IconRole",
        "RoomTypeRole",
        "NotificationCountRole"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'connectionChanged'
        QtMocHelpers::SignalData<void()>(3, 4, QMC::AccessPublic, QMetaType::Void),
        // Signal 'invalidateSort'
        QtMocHelpers::SignalData<void()>(5, 4, QMC::AccessPublic, QMetaType::Void),
        // Method 'indexForRoom'
        QtMocHelpers::MethodData<QModelIndex(NeoChatRoom *) const>(6, 4, QMC::AccessPublic, 0x80000000 | 7, {{
            { 0x80000000 | 8, 9 },
        }}),
    };
    QtMocHelpers::UintData qt_properties {
        // property 'connection'
        QtMocHelpers::PropertyData<NeoChatConnection*>(10, 0x80000000 | 11, QMC::DefaultPropertyFlags | QMC::Writable | QMC::EnumOrFlag | QMC::StdCppSet, 0),
    };
    QtMocHelpers::UintData qt_enums {
        // enum 'EventRoles'
        QtMocHelpers::EnumData<enum EventRoles>(12, 12, QMC::EnumFlags{}).add({
            {   13, EventRoles::DisplayNameRole },
            {   14, EventRoles::AvatarRole },
            {   15, EventRoles::CanonicalAliasRole },
            {   16, EventRoles::TopicRole },
            {   17, EventRoles::CategoryRole },
            {   18, EventRoles::ContextNotificationCountRole },
            {   19, EventRoles::HasHighlightNotificationsRole },
            {   20, EventRoles::JoinStateRole },
            {   21, EventRoles::CurrentRoomRole },
            {   22, EventRoles::SubtitleTextRole },
            {   23, EventRoles::AvatarImageRole },
            {   24, EventRoles::RoomIdRole },
            {   25, EventRoles::IsSpaceRole },
            {   26, EventRoles::IsChildSpaceRole },
            {   27, EventRoles::ReplacementIdRole },
            {   28, EventRoles::IsDirectChat },
            {   29, EventRoles::DelegateTypeRole },
            {   30, EventRoles::IconRole },
            {   31, EventRoles::RoomTypeRole },
            {   32, EventRoles::NotificationCountRole },
        }),
    };
    QtMocHelpers::UintData qt_constructors {};
    QtMocHelpers::ClassInfos qt_classinfo({
            {    1,    2 },
    });
    return QtMocHelpers::metaObjectData<RoomTreeModel, void>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums, qt_constructors, qt_classinfo);
}
Q_CONSTINIT const QMetaObject RoomTreeModel::staticMetaObject = { {
    QMetaObject::SuperData::link<QAbstractItemModel::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN13RoomTreeModelE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN13RoomTreeModelE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN13RoomTreeModelE_t>.metaTypes,
    nullptr
} };

void RoomTreeModel::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<RoomTreeModel *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->connectionChanged(); break;
        case 1: _t->invalidateSort(); break;
        case 2: { QModelIndex _r = _t->indexForRoom((*reinterpret_cast<std::add_pointer_t<NeoChatRoom*>>(_a[1])));
            if (_a[0]) *reinterpret_cast<QModelIndex*>(_a[0]) = std::move(_r); }  break;
        default: ;
        }
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        switch (_id) {
        default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
        case 2:
            switch (*reinterpret_cast<int*>(_a[1])) {
            default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
            case 0:
                *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType::fromType< NeoChatRoom* >(); break;
            }
            break;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (RoomTreeModel::*)()>(_a, &RoomTreeModel::connectionChanged, 0))
            return;
        if (QtMocHelpers::indexOfMethod<void (RoomTreeModel::*)()>(_a, &RoomTreeModel::invalidateSort, 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 *RoomTreeModel::metaObject() const
{
    return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}

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

int RoomTreeModel::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QAbstractItemModel::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 3)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 3;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 3)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 3;
    }
    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 RoomTreeModel::connectionChanged()
{
    QMetaObject::activate(this, &staticMetaObject, 0, nullptr);
}

// SIGNAL 1
void RoomTreeModel::invalidateSort()
{
    QMetaObject::activate(this, &staticMetaObject, 1, nullptr);
}
QT_WARNING_POP
