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

template <> constexpr inline auto CompletionModel::qt_create_metaobjectdata<qt_meta_tag_ZN15CompletionModelE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "CompletionModel",
        "QML.Element",
        "auto",
        "textItemChanged",
        "",
        "roomListModelChanged",
        "userListModelChanged",
        "isCompletingChanged",
        "ignoreCurrentCompletion",
        "insertCompletion",
        "text",
        "QUrl",
        "link",
        "textItem",
        "ChatTextItemHelper*",
        "roomListModel",
        "RoomListModel*",
        "userListModel",
        "UserFilterModel*",
        "isCompleting",
        "AutoCompletionType",
        "User",
        "Room",
        "Emoji",
        "Command",
        "None",
        "Roles",
        "DisplayNameRole",
        "SubtitleRole",
        "IconNameRole",
        "ReplacedTextRole",
        "HRefRole"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'textItemChanged'
        QtMocHelpers::SignalData<void()>(3, 4, QMC::AccessPublic, QMetaType::Void),
        // Signal 'roomListModelChanged'
        QtMocHelpers::SignalData<void()>(5, 4, QMC::AccessPublic, QMetaType::Void),
        // Signal 'userListModelChanged'
        QtMocHelpers::SignalData<void()>(6, 4, QMC::AccessPublic, QMetaType::Void),
        // Signal 'isCompletingChanged'
        QtMocHelpers::SignalData<void()>(7, 4, QMC::AccessPublic, QMetaType::Void),
        // Method 'ignoreCurrentCompletion'
        QtMocHelpers::MethodData<void()>(8, 4, QMC::AccessPublic, QMetaType::Void),
        // Method 'insertCompletion'
        QtMocHelpers::MethodData<void(const QString &, const QUrl &)>(9, 4, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::QString, 10 }, { 0x80000000 | 11, 12 },
        }}),
    };
    QtMocHelpers::UintData qt_properties {
        // property 'textItem'
        QtMocHelpers::PropertyData<ChatTextItemHelper*>(13, 0x80000000 | 14, QMC::DefaultPropertyFlags | QMC::Writable | QMC::EnumOrFlag | QMC::StdCppSet, 0),
        // property 'roomListModel'
        QtMocHelpers::PropertyData<RoomListModel*>(15, 0x80000000 | 16, QMC::DefaultPropertyFlags | QMC::Writable | QMC::EnumOrFlag | QMC::StdCppSet, 1),
        // property 'userListModel'
        QtMocHelpers::PropertyData<UserFilterModel*>(17, 0x80000000 | 18, QMC::DefaultPropertyFlags | QMC::Writable | QMC::EnumOrFlag, 2),
        // property 'isCompleting'
        QtMocHelpers::PropertyData<bool>(19, QMetaType::Bool, QMC::DefaultPropertyFlags, 3),
    };
    QtMocHelpers::UintData qt_enums {
        // enum 'AutoCompletionType'
        QtMocHelpers::EnumData<enum AutoCompletionType>(20, 20, QMC::EnumFlags{}).add({
            {   21, AutoCompletionType::User },
            {   22, AutoCompletionType::Room },
            {   23, AutoCompletionType::Emoji },
            {   24, AutoCompletionType::Command },
            {   25, AutoCompletionType::None },
        }),
        // enum 'Roles'
        QtMocHelpers::EnumData<enum Roles>(26, 26, QMC::EnumFlags{}).add({
            {   27, Roles::DisplayNameRole },
            {   28, Roles::SubtitleRole },
            {   29, Roles::IconNameRole },
            {   30, Roles::ReplacedTextRole },
            {   31, Roles::HRefRole },
        }),
    };
    QtMocHelpers::UintData qt_constructors {};
    QtMocHelpers::ClassInfos qt_classinfo({
            {    1,    2 },
    });
    return QtMocHelpers::metaObjectData<CompletionModel, void>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums, qt_constructors, qt_classinfo);
}
Q_CONSTINIT const QMetaObject CompletionModel::staticMetaObject = { {
    QMetaObject::SuperData::link<QAbstractListModel::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN15CompletionModelE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN15CompletionModelE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN15CompletionModelE_t>.metaTypes,
    nullptr
} };

void CompletionModel::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<CompletionModel *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->textItemChanged(); break;
        case 1: _t->roomListModelChanged(); break;
        case 2: _t->userListModelChanged(); break;
        case 3: _t->isCompletingChanged(); break;
        case 4: _t->ignoreCurrentCompletion(); break;
        case 5: _t->insertCompletion((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QUrl>>(_a[2]))); break;
        default: ;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (CompletionModel::*)()>(_a, &CompletionModel::textItemChanged, 0))
            return;
        if (QtMocHelpers::indexOfMethod<void (CompletionModel::*)()>(_a, &CompletionModel::roomListModelChanged, 1))
            return;
        if (QtMocHelpers::indexOfMethod<void (CompletionModel::*)()>(_a, &CompletionModel::userListModelChanged, 2))
            return;
        if (QtMocHelpers::indexOfMethod<void (CompletionModel::*)()>(_a, &CompletionModel::isCompletingChanged, 3))
            return;
    }
    if (_c == QMetaObject::RegisterPropertyMetaType) {
        switch (_id) {
        default: *reinterpret_cast<int*>(_a[0]) = -1; break;
        case 0:
            *reinterpret_cast<int*>(_a[0]) = qRegisterMetaType< ChatTextItemHelper* >(); break;
        }
    }
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<ChatTextItemHelper**>(_v) = _t->textItem(); break;
        case 1: *reinterpret_cast<RoomListModel**>(_v) = _t->roomListModel(); break;
        case 2: *reinterpret_cast<UserFilterModel**>(_v) = _t->userListModel(); break;
        case 3: *reinterpret_cast<bool*>(_v) = _t->isCompleting(); break;
        default: break;
        }
    }
    if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: _t->setTextItem(*reinterpret_cast<ChatTextItemHelper**>(_v)); break;
        case 1: _t->setRoomListModel(*reinterpret_cast<RoomListModel**>(_v)); break;
        case 2: _t->setUserFilterModel(*reinterpret_cast<UserFilterModel**>(_v)); break;
        default: break;
        }
    }
}

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

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

int CompletionModel::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 < 6)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 6;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 6)
            *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
        _id -= 6;
    }
    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 CompletionModel::textItemChanged()
{
    QMetaObject::activate(this, &staticMetaObject, 0, nullptr);
}

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

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

// SIGNAL 3
void CompletionModel::isCompletingChanged()
{
    QMetaObject::activate(this, &staticMetaObject, 3, nullptr);
}
QT_WARNING_POP
