/****************************************************************************
** Meta object code from reading C++ file 'messagemodel.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.90/src/timeline/models/messagemodel.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 'messagemodel.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_ZN12MessageModelE_t {};
} // unnamed namespace

template <> constexpr inline auto MessageModel::qt_create_metaobjectdata<qt_meta_tag_ZN12MessageModelE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "MessageModel",
        "QML.Element",
        "auto",
        "QML.Creatable",
        "false",
        "QML.UncreatableReason",
        "",
        "roomAboutToChange",
        "NeoChatRoom*",
        "oldRoom",
        "newRoom",
        "roomChanged",
        "readMarkerAdded",
        "readMarkerIndexChanged",
        "modelAboutToReset",
        "modelResetComplete",
        "newEventAdded",
        "const Quotient::RoomEvent*",
        "event",
        "newLocalUserEventAdded",
        "selectionChanged",
        "indexForEventId",
        "QModelIndex",
        "eventId",
        "findEvent",
        "isMessageSelected",
        "toggleMessageSelection",
        "getFormattedSelectedMessages",
        "deleteSelectedMessages",
        "reason",
        "clearSelectedMessages",
        "hideMedia",
        "showMedia",
        "isMediaHidden",
        "room",
        "readMarkerIndex",
        "QPersistentModelIndex",
        "selectedMessageCount",
        "canDeleteSelectedMessages",
        "EventRoles",
        "DelegateTypeRole",
        "EventIdRole",
        "DateTimeRole",
        "AuthorRole",
        "HighlightRole",
        "SpecialMarksRole",
        "ProgressInfoRole",
        "GenericDisplayRole",
        "IsMediaRole",
        "ContentModelRole",
        "IsThreadedRole",
        "ThreadRootRole",
        "IsPollRole",
        "ShowSectionRole",
        "ReadMarkersRole",
        "ShowReadMarkersRole",
        "VerifiedRole",
        "AuthorDisplayNameRole",
        "IsRedactedRole",
        "IsPendingRole",
        "IsEditableRole",
        "ShowAuthorRole",
        "EventTypeRole",
        "RoomRole",
        "IsSelectedRole",
        "LastRole"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'roomAboutToChange'
        QtMocHelpers::SignalData<void(NeoChatRoom *, NeoChatRoom *)>(7, 6, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 8, 9 }, { 0x80000000 | 8, 10 },
        }}),
        // Signal 'roomChanged'
        QtMocHelpers::SignalData<void(NeoChatRoom *, NeoChatRoom *)>(11, 6, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 8, 9 }, { 0x80000000 | 8, 10 },
        }}),
        // Signal 'readMarkerAdded'
        QtMocHelpers::SignalData<void()>(12, 6, QMC::AccessPublic, QMetaType::Void),
        // Signal 'readMarkerIndexChanged'
        QtMocHelpers::SignalData<void()>(13, 6, QMC::AccessPublic, QMetaType::Void),
        // Signal 'modelAboutToReset'
        QtMocHelpers::SignalData<void()>(14, 6, QMC::AccessPublic, QMetaType::Void),
        // Signal 'modelResetComplete'
        QtMocHelpers::SignalData<void()>(15, 6, QMC::AccessPublic, QMetaType::Void),
        // Signal 'newEventAdded'
        QtMocHelpers::SignalData<void(const Quotient::RoomEvent *)>(16, 6, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 17, 18 },
        }}),
        // Signal 'newLocalUserEventAdded'
        QtMocHelpers::SignalData<void()>(19, 6, QMC::AccessPublic, QMetaType::Void),
        // Signal 'selectionChanged'
        QtMocHelpers::SignalData<void()>(20, 6, QMC::AccessPublic, QMetaType::Void),
        // Method 'indexForEventId'
        QtMocHelpers::MethodData<QModelIndex(const QString &) const>(21, 6, QMC::AccessPublic, 0x80000000 | 22, {{
            { QMetaType::QString, 23 },
        }}),
        // Method 'findEvent'
        QtMocHelpers::MethodData<const Quotient::RoomEvent *(const QString &) const>(24, 6, QMC::AccessPublic, 0x80000000 | 17, {{
            { QMetaType::QString, 23 },
        }}),
        // Method 'isMessageSelected'
        QtMocHelpers::MethodData<bool(const QString &) const>(25, 6, QMC::AccessPublic, QMetaType::Bool, {{
            { QMetaType::QString, 23 },
        }}),
        // Method 'toggleMessageSelection'
        QtMocHelpers::MethodData<void(const QString &)>(26, 6, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::QString, 23 },
        }}),
        // Method 'getFormattedSelectedMessages'
        QtMocHelpers::MethodData<QString() const>(27, 6, QMC::AccessPublic, QMetaType::QString),
        // Method 'deleteSelectedMessages'
        QtMocHelpers::MethodData<void(const QString &)>(28, 6, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::QString, 29 },
        }}),
        // Method 'deleteSelectedMessages'
        QtMocHelpers::MethodData<void()>(28, 6, QMC::AccessPublic | QMC::MethodCloned, QMetaType::Void),
        // Method 'clearSelectedMessages'
        QtMocHelpers::MethodData<void()>(30, 6, QMC::AccessPublic, QMetaType::Void),
        // Method 'hideMedia'
        QtMocHelpers::MethodData<void(const QString &)>(31, 6, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::QString, 23 },
        }}),
        // Method 'showMedia'
        QtMocHelpers::MethodData<void(const QString &)>(32, 6, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::QString, 23 },
        }}),
        // Method 'isMediaHidden'
        QtMocHelpers::MethodData<bool(const QString &)>(33, 6, QMC::AccessPublic, QMetaType::Bool, {{
            { QMetaType::QString, 23 },
        }}),
    };
    QtMocHelpers::UintData qt_properties {
        // property 'room'
        QtMocHelpers::PropertyData<NeoChatRoom*>(34, 0x80000000 | 8, QMC::DefaultPropertyFlags | QMC::Writable | QMC::EnumOrFlag | QMC::StdCppSet, 1),
        // property 'readMarkerIndex'
        QtMocHelpers::PropertyData<QPersistentModelIndex>(35, 0x80000000 | 36, QMC::DefaultPropertyFlags | QMC::EnumOrFlag, 3),
        // property 'selectedMessageCount'
        QtMocHelpers::PropertyData<int>(37, QMetaType::Int, QMC::DefaultPropertyFlags, 8),
        // property 'canDeleteSelectedMessages'
        QtMocHelpers::PropertyData<bool>(38, QMetaType::Bool, QMC::DefaultPropertyFlags, 8),
    };
    QtMocHelpers::UintData qt_enums {
        // enum 'EventRoles'
        QtMocHelpers::EnumData<enum EventRoles>(39, 39, QMC::EnumFlags{}).add({
            {   40, EventRoles::DelegateTypeRole },
            {   41, EventRoles::EventIdRole },
            {   42, EventRoles::DateTimeRole },
            {   43, EventRoles::AuthorRole },
            {   44, EventRoles::HighlightRole },
            {   45, EventRoles::SpecialMarksRole },
            {   46, EventRoles::ProgressInfoRole },
            {   47, EventRoles::GenericDisplayRole },
            {   48, EventRoles::IsMediaRole },
            {   49, EventRoles::ContentModelRole },
            {   50, EventRoles::IsThreadedRole },
            {   51, EventRoles::ThreadRootRole },
            {   52, EventRoles::IsPollRole },
            {   53, EventRoles::ShowSectionRole },
            {   54, EventRoles::ReadMarkersRole },
            {   55, EventRoles::ShowReadMarkersRole },
            {   56, EventRoles::VerifiedRole },
            {   57, EventRoles::AuthorDisplayNameRole },
            {   58, EventRoles::IsRedactedRole },
            {   59, EventRoles::IsPendingRole },
            {   60, EventRoles::IsEditableRole },
            {   61, EventRoles::ShowAuthorRole },
            {   62, EventRoles::EventTypeRole },
            {   63, EventRoles::RoomRole },
            {   64, EventRoles::IsSelectedRole },
            {   65, EventRoles::LastRole },
        }),
    };
    QtMocHelpers::UintData qt_constructors {};
    QtMocHelpers::ClassInfos qt_classinfo({
            {    1,    2 },
            {    3,    4 },
            {    5,    6 },
    });
    return QtMocHelpers::metaObjectData<MessageModel, void>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums, qt_constructors, qt_classinfo);
}
Q_CONSTINIT const QMetaObject MessageModel::staticMetaObject = { {
    QMetaObject::SuperData::link<QAbstractListModel::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN12MessageModelE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN12MessageModelE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN12MessageModelE_t>.metaTypes,
    nullptr
} };

void MessageModel::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<MessageModel *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->roomAboutToChange((*reinterpret_cast<std::add_pointer_t<NeoChatRoom*>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<NeoChatRoom*>>(_a[2]))); break;
        case 1: _t->roomChanged((*reinterpret_cast<std::add_pointer_t<NeoChatRoom*>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<NeoChatRoom*>>(_a[2]))); break;
        case 2: _t->readMarkerAdded(); break;
        case 3: _t->readMarkerIndexChanged(); break;
        case 4: _t->modelAboutToReset(); break;
        case 5: _t->modelResetComplete(); break;
        case 6: _t->newEventAdded((*reinterpret_cast<std::add_pointer_t<const Quotient::RoomEvent*>>(_a[1]))); break;
        case 7: _t->newLocalUserEventAdded(); break;
        case 8: _t->selectionChanged(); break;
        case 9: { QModelIndex _r = _t->indexForEventId((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])));
            if (_a[0]) *reinterpret_cast<QModelIndex*>(_a[0]) = std::move(_r); }  break;
        case 10: { const Quotient::RoomEvent* _r = _t->findEvent((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])));
            if (_a[0]) *reinterpret_cast<const Quotient::RoomEvent**>(_a[0]) = std::move(_r); }  break;
        case 11: { bool _r = _t->isMessageSelected((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])));
            if (_a[0]) *reinterpret_cast<bool*>(_a[0]) = std::move(_r); }  break;
        case 12: _t->toggleMessageSelection((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1]))); break;
        case 13: { QString _r = _t->getFormattedSelectedMessages();
            if (_a[0]) *reinterpret_cast<QString*>(_a[0]) = std::move(_r); }  break;
        case 14: _t->deleteSelectedMessages((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1]))); break;
        case 15: _t->deleteSelectedMessages(); break;
        case 16: _t->clearSelectedMessages(); break;
        case 17: _t->hideMedia((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1]))); break;
        case 18: _t->showMedia((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1]))); break;
        case 19: { bool _r = _t->isMediaHidden((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])));
            if (_a[0]) *reinterpret_cast<bool*>(_a[0]) = std::move(_r); }  break;
        default: ;
        }
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        switch (_id) {
        default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
        case 0:
            switch (*reinterpret_cast<int*>(_a[1])) {
            default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
            case 1:
            case 0:
                *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType::fromType< NeoChatRoom* >(); break;
            }
            break;
        case 1:
            switch (*reinterpret_cast<int*>(_a[1])) {
            default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
            case 1:
            case 0:
                *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType::fromType< NeoChatRoom* >(); break;
            }
            break;
        case 6:
            switch (*reinterpret_cast<int*>(_a[1])) {
            default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
            case 0:
                *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType::fromType< const Quotient::RoomEvent* >(); break;
            }
            break;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (MessageModel::*)(NeoChatRoom * , NeoChatRoom * )>(_a, &MessageModel::roomAboutToChange, 0))
            return;
        if (QtMocHelpers::indexOfMethod<void (MessageModel::*)(NeoChatRoom * , NeoChatRoom * )>(_a, &MessageModel::roomChanged, 1))
            return;
        if (QtMocHelpers::indexOfMethod<void (MessageModel::*)()>(_a, &MessageModel::readMarkerAdded, 2))
            return;
        if (QtMocHelpers::indexOfMethod<void (MessageModel::*)()>(_a, &MessageModel::readMarkerIndexChanged, 3))
            return;
        if (QtMocHelpers::indexOfMethod<void (MessageModel::*)()>(_a, &MessageModel::modelAboutToReset, 4))
            return;
        if (QtMocHelpers::indexOfMethod<void (MessageModel::*)()>(_a, &MessageModel::modelResetComplete, 5))
            return;
        if (QtMocHelpers::indexOfMethod<void (MessageModel::*)(const Quotient::RoomEvent * )>(_a, &MessageModel::newEventAdded, 6))
            return;
        if (QtMocHelpers::indexOfMethod<void (MessageModel::*)()>(_a, &MessageModel::newLocalUserEventAdded, 7))
            return;
        if (QtMocHelpers::indexOfMethod<void (MessageModel::*)()>(_a, &MessageModel::selectionChanged, 8))
            return;
    }
    if (_c == QMetaObject::RegisterPropertyMetaType) {
        switch (_id) {
        default: *reinterpret_cast<int*>(_a[0]) = -1; break;
        case 0:
            *reinterpret_cast<int*>(_a[0]) = qRegisterMetaType< NeoChatRoom* >(); break;
        }
    }
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<NeoChatRoom**>(_v) = _t->room(); break;
        case 1: *reinterpret_cast<QPersistentModelIndex*>(_v) = _t->readMarkerIndex(); break;
        case 2: *reinterpret_cast<int*>(_v) = _t->selectedMessageCount(); break;
        case 3: *reinterpret_cast<bool*>(_v) = _t->canDeleteSelectedMessages(); break;
        default: break;
        }
    }
    if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: _t->setRoom(*reinterpret_cast<NeoChatRoom**>(_v)); break;
        default: break;
        }
    }
}

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

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

int MessageModel::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 < 20)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 20;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 20)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 20;
    }
    if (_c == QMetaObject::ReadProperty || _c == QMetaObject::WriteProperty
            || _c == QMetaObject::ResetProperty || _c == QMetaObject::BindableProperty
            || _c == QMetaObject::RegisterPropertyMetaType) {
        qt_static_metacall(this, _c, _id, _a);
        _id -= 4;
    }
    return _id;
}

// SIGNAL 0
void MessageModel::roomAboutToChange(NeoChatRoom * _t1, NeoChatRoom * _t2)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 0, nullptr, _t1, _t2);
}

// SIGNAL 1
void MessageModel::roomChanged(NeoChatRoom * _t1, NeoChatRoom * _t2)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 1, nullptr, _t1, _t2);
}

// SIGNAL 2
void MessageModel::readMarkerAdded()
{
    QMetaObject::activate(this, &staticMetaObject, 2, nullptr);
}

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

// SIGNAL 4
void MessageModel::modelAboutToReset()
{
    QMetaObject::activate(this, &staticMetaObject, 4, nullptr);
}

// SIGNAL 5
void MessageModel::modelResetComplete()
{
    QMetaObject::activate(this, &staticMetaObject, 5, nullptr);
}

// SIGNAL 6
void MessageModel::newEventAdded(const Quotient::RoomEvent * _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 6, nullptr, _t1);
}

// SIGNAL 7
void MessageModel::newLocalUserEventAdded()
{
    QMetaObject::activate(this, &staticMetaObject, 7, nullptr);
}

// SIGNAL 8
void MessageModel::selectionChanged()
{
    QMetaObject::activate(this, &staticMetaObject, 8, nullptr);
}
QT_WARNING_POP
