/****************************************************************************
** Meta object code from reading C++ file 'messagecontentmodel.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/messagecontent/models/messagecontentmodel.h"
#include <QtGui/qtextcursor.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 'messagecontentmodel.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_ZN19MessageContentModelE_t {};
} // unnamed namespace

template <> constexpr inline auto MessageContentModel::qt_create_metaobjectdata<qt_meta_tag_ZN19MessageContentModelE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "MessageContentModel",
        "QML.Element",
        "auto",
        "QML.Creatable",
        "false",
        "QML.UncreatableReason",
        "",
        "roomChanged",
        "NeoChatRoom*",
        "oldRoom",
        "newRoom",
        "authorChanged",
        "componentsUpdated",
        "eventId",
        "author",
        "NeochatRoomMember*",
        "toggleSpoiler",
        "QModelIndex",
        "index",
        "hideMedia",
        "showMedia",
        "isMediaHidden",
        "room",
        "Roles",
        "ComponentTypeRole",
        "BlockRole",
        "EventIdRole",
        "DateTimeRole",
        "AuthorRole",
        "ReplyContentModelRole",
        "ThreadRootRole",
        "EditableRole",
        "CurrentFocusRole",
        "MediaHiddenRole"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'roomChanged'
        QtMocHelpers::SignalData<void(NeoChatRoom *, NeoChatRoom *)>(7, 6, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 8, 9 }, { 0x80000000 | 8, 10 },
        }}),
        // Signal 'authorChanged'
        QtMocHelpers::SignalData<void()>(11, 6, QMC::AccessPublic, QMetaType::Void),
        // Signal 'componentsUpdated'
        QtMocHelpers::SignalData<void()>(12, 6, QMC::AccessPublic, QMetaType::Void),
        // Method 'eventId'
        QtMocHelpers::MethodData<QString() const>(13, 6, QMC::AccessPublic, QMetaType::QString),
        // Method 'author'
        QtMocHelpers::MethodData<NeochatRoomMember *() const>(14, 6, QMC::AccessPublic, 0x80000000 | 15),
        // Method 'toggleSpoiler'
        QtMocHelpers::MethodData<void(QModelIndex)>(16, 6, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 17, 18 },
        }}),
        // Method 'hideMedia'
        QtMocHelpers::MethodData<void()>(19, 6, QMC::AccessPublic, QMetaType::Void),
        // Method 'showMedia'
        QtMocHelpers::MethodData<void()>(20, 6, QMC::AccessPublic, QMetaType::Void),
        // Method 'isMediaHidden'
        QtMocHelpers::MethodData<bool()>(21, 6, QMC::AccessPublic, QMetaType::Bool),
    };
    QtMocHelpers::UintData qt_properties {
        // property 'room'
        QtMocHelpers::PropertyData<NeoChatRoom*>(22, 0x80000000 | 8, QMC::DefaultPropertyFlags | QMC::Writable | QMC::EnumOrFlag | QMC::StdCppSet, 0),
        // property 'author'
        QtMocHelpers::PropertyData<NeochatRoomMember*>(14, 0x80000000 | 15, QMC::DefaultPropertyFlags | QMC::EnumOrFlag, 1),
        // property 'eventId'
        QtMocHelpers::PropertyData<QString>(13, QMetaType::QString, QMC::DefaultPropertyFlags | QMC::Constant),
    };
    QtMocHelpers::UintData qt_enums {
        // enum 'Roles'
        QtMocHelpers::EnumData<enum Roles>(23, 23, QMC::EnumFlags{}).add({
            {   24, Roles::ComponentTypeRole },
            {   25, Roles::BlockRole },
            {   26, Roles::EventIdRole },
            {   27, Roles::DateTimeRole },
            {   28, Roles::AuthorRole },
            {   29, Roles::ReplyContentModelRole },
            {   30, Roles::ThreadRootRole },
            {   31, Roles::EditableRole },
            {   32, Roles::CurrentFocusRole },
            {   33, Roles::MediaHiddenRole },
        }),
    };
    QtMocHelpers::UintData qt_constructors {};
    QtMocHelpers::ClassInfos qt_classinfo({
            {    1,    2 },
            {    3,    4 },
            {    5,    6 },
    });
    return QtMocHelpers::metaObjectData<MessageContentModel, void>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums, qt_constructors, qt_classinfo);
}
Q_CONSTINIT const QMetaObject MessageContentModel::staticMetaObject = { {
    QMetaObject::SuperData::link<QAbstractListModel::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN19MessageContentModelE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN19MessageContentModelE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN19MessageContentModelE_t>.metaTypes,
    nullptr
} };

void MessageContentModel::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<MessageContentModel *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->roomChanged((*reinterpret_cast<std::add_pointer_t<NeoChatRoom*>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<NeoChatRoom*>>(_a[2]))); break;
        case 1: _t->authorChanged(); break;
        case 2: _t->componentsUpdated(); break;
        case 3: { QString _r = _t->eventId();
            if (_a[0]) *reinterpret_cast<QString*>(_a[0]) = std::move(_r); }  break;
        case 4: { NeochatRoomMember* _r = _t->author();
            if (_a[0]) *reinterpret_cast<NeochatRoomMember**>(_a[0]) = std::move(_r); }  break;
        case 5: _t->toggleSpoiler((*reinterpret_cast<std::add_pointer_t<QModelIndex>>(_a[1]))); break;
        case 6: _t->hideMedia(); break;
        case 7: _t->showMedia(); break;
        case 8: { bool _r = _t->isMediaHidden();
            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;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (MessageContentModel::*)(NeoChatRoom * , NeoChatRoom * )>(_a, &MessageContentModel::roomChanged, 0))
            return;
        if (QtMocHelpers::indexOfMethod<void (MessageContentModel::*)()>(_a, &MessageContentModel::authorChanged, 1))
            return;
        if (QtMocHelpers::indexOfMethod<void (MessageContentModel::*)()>(_a, &MessageContentModel::componentsUpdated, 2))
            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;
        case 1:
            *reinterpret_cast<int*>(_a[0]) = qRegisterMetaType< NeochatRoomMember* >(); break;
        }
    }
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<NeoChatRoom**>(_v) = _t->room(); break;
        case 1: *reinterpret_cast<NeochatRoomMember**>(_v) = _t->author(); break;
        case 2: *reinterpret_cast<QString*>(_v) = _t->eventId(); 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 *MessageContentModel::metaObject() const
{
    return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}

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

int MessageContentModel::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 -= 3;
    }
    return _id;
}

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

// SIGNAL 1
void MessageContentModel::authorChanged()
{
    QMetaObject::activate(this, &staticMetaObject, 1, nullptr);
}

// SIGNAL 2
void MessageContentModel::componentsUpdated()
{
    QMetaObject::activate(this, &staticMetaObject, 2, nullptr);
}
QT_WARNING_POP
