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

#include "../../../nheko/src/timeline/CommunitiesModel.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 'CommunitiesModel.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 69
#error "This file was generated using the moc from 6.10.2. 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_ZN24FilteredCommunitiesModelE_t {};
} // unnamed namespace

template <> constexpr inline auto FilteredCommunitiesModel::qt_create_metaobjectdata<qt_meta_tag_ZN24FilteredCommunitiesModelE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "FilteredCommunitiesModel",
        "QML.Element",
        "auto",
        "QML.Creatable",
        "false",
        "QML.UncreatableReason",
        "Use Communities.filtered() to create a FilteredCommunitiesModel"
    };

    QtMocHelpers::UintData qt_methods {
    };
    QtMocHelpers::UintData qt_properties {
    };
    QtMocHelpers::UintData qt_enums {
    };
    QtMocHelpers::UintData qt_constructors {};
    QtMocHelpers::ClassInfos qt_classinfo({
            {    1,    2 },
            {    3,    4 },
            {    5,    6 },
    });
    return QtMocHelpers::metaObjectData<FilteredCommunitiesModel, void>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums, qt_constructors, qt_classinfo);
}
Q_CONSTINIT const QMetaObject FilteredCommunitiesModel::staticMetaObject = { {
    QMetaObject::SuperData::link<QSortFilterProxyModel::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN24FilteredCommunitiesModelE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN24FilteredCommunitiesModelE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN24FilteredCommunitiesModelE_t>.metaTypes,
    nullptr
} };

void FilteredCommunitiesModel::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<FilteredCommunitiesModel *>(_o);
    (void)_t;
    (void)_c;
    (void)_id;
    (void)_a;
}

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

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

int FilteredCommunitiesModel::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QSortFilterProxyModel::qt_metacall(_c, _id, _a);
    return _id;
}
namespace {
struct qt_meta_tag_ZN9SpaceItemE_t {};
} // unnamed namespace

template <> constexpr inline auto SpaceItem::qt_create_metaobjectdata<qt_meta_tag_ZN9SpaceItemE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "SpaceItem",
        "roomid",
        "name",
        "treeIndex",
        "childValid",
        "parentValid",
        "canonical",
        "canEditParent",
        "canEditChild"
    };

    QtMocHelpers::UintData qt_methods {
    };
    QtMocHelpers::UintData qt_properties {
        // property 'roomid'
        QtMocHelpers::PropertyData<QString>(1, QMetaType::QString, QMC::DefaultPropertyFlags | QMC::Constant),
        // property 'name'
        QtMocHelpers::PropertyData<QString>(2, QMetaType::QString, QMC::DefaultPropertyFlags | QMC::Constant),
        // property 'treeIndex'
        QtMocHelpers::PropertyData<int>(3, QMetaType::Int, QMC::DefaultPropertyFlags | QMC::Constant),
        // property 'childValid'
        QtMocHelpers::PropertyData<bool>(4, QMetaType::Bool, QMC::DefaultPropertyFlags | QMC::Constant),
        // property 'parentValid'
        QtMocHelpers::PropertyData<bool>(5, QMetaType::Bool, QMC::DefaultPropertyFlags | QMC::Constant),
        // property 'canonical'
        QtMocHelpers::PropertyData<bool>(6, QMetaType::Bool, QMC::DefaultPropertyFlags | QMC::Constant),
        // property 'canEditParent'
        QtMocHelpers::PropertyData<bool>(7, QMetaType::Bool, QMC::DefaultPropertyFlags | QMC::Constant),
        // property 'canEditChild'
        QtMocHelpers::PropertyData<bool>(8, QMetaType::Bool, QMC::DefaultPropertyFlags | QMC::Constant),
    };
    QtMocHelpers::UintData qt_enums {
    };
    return QtMocHelpers::metaObjectData<SpaceItem, qt_meta_tag_ZN9SpaceItemE_t>(QMC::PropertyAccessInStaticMetaCall, qt_stringData,
            qt_methods, qt_properties, qt_enums);
}
Q_CONSTINIT const QMetaObject SpaceItem::staticMetaObject = { {
    nullptr,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN9SpaceItemE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN9SpaceItemE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN9SpaceItemE_t>.metaTypes,
    nullptr
} };

void SpaceItem::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = reinterpret_cast<SpaceItem *>(_o);
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<QString*>(_v) = _t->roomid; break;
        case 1: *reinterpret_cast<QString*>(_v) = _t->name; break;
        case 2: *reinterpret_cast<int*>(_v) = _t->treeIndex; break;
        case 3: *reinterpret_cast<bool*>(_v) = _t->childValid; break;
        case 4: *reinterpret_cast<bool*>(_v) = _t->parentValid; break;
        case 5: *reinterpret_cast<bool*>(_v) = _t->canonical; break;
        case 6: *reinterpret_cast<bool*>(_v) = _t->canEditParent; break;
        case 7: *reinterpret_cast<bool*>(_v) = _t->canEditChild; break;
        default: break;
        }
    }
}
namespace {
struct qt_meta_tag_ZN16CommunitiesModelE_t {};
} // unnamed namespace

template <> constexpr inline auto CommunitiesModel::qt_create_metaobjectdata<qt_meta_tag_ZN16CommunitiesModelE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "CommunitiesModel",
        "QML.Element",
        "Communities",
        "QML.Singleton",
        "true",
        "currentTagIdChanged",
        "",
        "tagId",
        "hiddenTagsChanged",
        "tagsChanged",
        "containsSubspacesChanged",
        "initializeSidebar",
        "sync",
        "mtx::responses::Sync",
        "sync_",
        "clear",
        "currentTagId",
        "setCurrentTagId",
        "trySwitchToSpace",
        "spaceId",
        "resetCurrentTagId",
        "tags",
        "tagsWithDefault",
        "toggleTagId",
        "toggleTagMute",
        "filtered",
        "FilteredCommunitiesModel*",
        "spaceChildrenListFromIndex",
        "QVariantList",
        "room",
        "idx",
        "updateSpaceStatus",
        "space",
        "setParent",
        "setChild",
        "canonical",
        "containsSubspaces"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'currentTagIdChanged'
        QtMocHelpers::SignalData<void(QString)>(5, 6, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::QString, 7 },
        }}),
        // Signal 'hiddenTagsChanged'
        QtMocHelpers::SignalData<void()>(8, 6, QMC::AccessPublic, QMetaType::Void),
        // Signal 'tagsChanged'
        QtMocHelpers::SignalData<void()>(9, 6, QMC::AccessPublic, QMetaType::Void),
        // Signal 'containsSubspacesChanged'
        QtMocHelpers::SignalData<void()>(10, 6, QMC::AccessPublic, QMetaType::Void),
        // Slot 'initializeSidebar'
        QtMocHelpers::SlotData<void()>(11, 6, QMC::AccessPublic, QMetaType::Void),
        // Slot 'sync'
        QtMocHelpers::SlotData<void(const mtx::responses::Sync &)>(12, 6, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 13, 14 },
        }}),
        // Slot 'clear'
        QtMocHelpers::SlotData<void()>(15, 6, QMC::AccessPublic, QMetaType::Void),
        // Slot 'currentTagId'
        QtMocHelpers::SlotData<QString() const>(16, 6, QMC::AccessPublic, QMetaType::QString),
        // Slot 'setCurrentTagId'
        QtMocHelpers::SlotData<void(const QString &)>(17, 6, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::QString, 7 },
        }}),
        // Slot 'trySwitchToSpace'
        QtMocHelpers::SlotData<bool(const QString &)>(18, 6, QMC::AccessPublic, QMetaType::Bool, {{
            { QMetaType::QString, 19 },
        }}),
        // Slot 'resetCurrentTagId'
        QtMocHelpers::SlotData<void()>(20, 6, QMC::AccessPublic, QMetaType::Void),
        // Slot 'tags'
        QtMocHelpers::SlotData<QStringList() const>(21, 6, QMC::AccessPublic, QMetaType::QStringList),
        // Slot 'tagsWithDefault'
        QtMocHelpers::SlotData<QStringList() const>(22, 6, QMC::AccessPublic, QMetaType::QStringList),
        // Slot 'toggleTagId'
        QtMocHelpers::SlotData<void(QString)>(23, 6, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::QString, 7 },
        }}),
        // Slot 'toggleTagMute'
        QtMocHelpers::SlotData<void(QString)>(24, 6, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::QString, 7 },
        }}),
        // Slot 'filtered'
        QtMocHelpers::SlotData<FilteredCommunitiesModel *()>(25, 6, QMC::AccessPublic, 0x80000000 | 26),
        // Method 'spaceChildrenListFromIndex'
        QtMocHelpers::MethodData<QVariantList(const QString &, int) const>(27, 6, QMC::AccessPublic, 0x80000000 | 28, {{
            { QMetaType::QString, 29 }, { QMetaType::Int, 30 },
        }}),
        // Method 'spaceChildrenListFromIndex'
        QtMocHelpers::MethodData<QVariantList(const QString &) const>(27, 6, QMC::AccessPublic | QMC::MethodCloned, 0x80000000 | 28, {{
            { QMetaType::QString, 29 },
        }}),
        // Method 'updateSpaceStatus'
        QtMocHelpers::MethodData<void(QString, QString, bool, bool, bool) const>(31, 6, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::QString, 32 }, { QMetaType::QString, 29 }, { QMetaType::Bool, 33 }, { QMetaType::Bool, 34 },
            { QMetaType::Bool, 35 },
        }}),
    };
    QtMocHelpers::UintData qt_properties {
        // property 'currentTagId'
        QtMocHelpers::PropertyData<QString>(16, QMetaType::QString, QMC::DefaultPropertyFlags | QMC::Writable | QMC::Resettable | QMC::StdCppSet, 0),
        // property 'tags'
        QtMocHelpers::PropertyData<QStringList>(21, QMetaType::QStringList, QMC::DefaultPropertyFlags, 2),
        // property 'tagsWithDefault'
        QtMocHelpers::PropertyData<QStringList>(22, QMetaType::QStringList, QMC::DefaultPropertyFlags, 2),
        // property 'containsSubspaces'
        QtMocHelpers::PropertyData<bool>(36, QMetaType::Bool, QMC::DefaultPropertyFlags, 3),
    };
    QtMocHelpers::UintData qt_enums {
    };
    QtMocHelpers::UintData qt_constructors {};
    QtMocHelpers::ClassInfos qt_classinfo({
            {    1,    2 },
            {    3,    4 },
    });
    return QtMocHelpers::metaObjectData<CommunitiesModel, void>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums, qt_constructors, qt_classinfo);
}
Q_CONSTINIT const QMetaObject CommunitiesModel::staticMetaObject = { {
    QMetaObject::SuperData::link<QAbstractListModel::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN16CommunitiesModelE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN16CommunitiesModelE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN16CommunitiesModelE_t>.metaTypes,
    nullptr
} };

void CommunitiesModel::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<CommunitiesModel *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->currentTagIdChanged((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1]))); break;
        case 1: _t->hiddenTagsChanged(); break;
        case 2: _t->tagsChanged(); break;
        case 3: _t->containsSubspacesChanged(); break;
        case 4: _t->initializeSidebar(); break;
        case 5: _t->sync((*reinterpret_cast<std::add_pointer_t<mtx::responses::Sync>>(_a[1]))); break;
        case 6: _t->clear(); break;
        case 7: { QString _r = _t->currentTagId();
            if (_a[0]) *reinterpret_cast<QString*>(_a[0]) = std::move(_r); }  break;
        case 8: _t->setCurrentTagId((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1]))); break;
        case 9: { bool _r = _t->trySwitchToSpace((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])));
            if (_a[0]) *reinterpret_cast<bool*>(_a[0]) = std::move(_r); }  break;
        case 10: _t->resetCurrentTagId(); break;
        case 11: { QStringList _r = _t->tags();
            if (_a[0]) *reinterpret_cast<QStringList*>(_a[0]) = std::move(_r); }  break;
        case 12: { QStringList _r = _t->tagsWithDefault();
            if (_a[0]) *reinterpret_cast<QStringList*>(_a[0]) = std::move(_r); }  break;
        case 13: _t->toggleTagId((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1]))); break;
        case 14: _t->toggleTagMute((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1]))); break;
        case 15: { FilteredCommunitiesModel* _r = _t->filtered();
            if (_a[0]) *reinterpret_cast<FilteredCommunitiesModel**>(_a[0]) = std::move(_r); }  break;
        case 16: { QVariantList _r = _t->spaceChildrenListFromIndex((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<int>>(_a[2])));
            if (_a[0]) *reinterpret_cast<QVariantList*>(_a[0]) = std::move(_r); }  break;
        case 17: { QVariantList _r = _t->spaceChildrenListFromIndex((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])));
            if (_a[0]) *reinterpret_cast<QVariantList*>(_a[0]) = std::move(_r); }  break;
        case 18: _t->updateSpaceStatus((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QString>>(_a[2])),(*reinterpret_cast<std::add_pointer_t<bool>>(_a[3])),(*reinterpret_cast<std::add_pointer_t<bool>>(_a[4])),(*reinterpret_cast<std::add_pointer_t<bool>>(_a[5]))); break;
        default: ;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (CommunitiesModel::*)(QString )>(_a, &CommunitiesModel::currentTagIdChanged, 0))
            return;
        if (QtMocHelpers::indexOfMethod<void (CommunitiesModel::*)()>(_a, &CommunitiesModel::hiddenTagsChanged, 1))
            return;
        if (QtMocHelpers::indexOfMethod<void (CommunitiesModel::*)()>(_a, &CommunitiesModel::tagsChanged, 2))
            return;
        if (QtMocHelpers::indexOfMethod<void (CommunitiesModel::*)()>(_a, &CommunitiesModel::containsSubspacesChanged, 3))
            return;
    }
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<QString*>(_v) = _t->currentTagId(); break;
        case 1: *reinterpret_cast<QStringList*>(_v) = _t->tags(); break;
        case 2: *reinterpret_cast<QStringList*>(_v) = _t->tagsWithDefault(); break;
        case 3: *reinterpret_cast<bool*>(_v) = _t->containsSubspaces(); break;
        default: break;
        }
    }
    if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: _t->setCurrentTagId(*reinterpret_cast<QString*>(_v)); break;
        default: break;
        }
    }
    if (_c == QMetaObject::ResetProperty) {
        switch (_id) {
        case 0: _t->resetCurrentTagId(); break;
        default: break;
        }
    }
}

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

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

int CommunitiesModel::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 < 19)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 19;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 19)
            *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
        _id -= 19;
    }
    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 CommunitiesModel::currentTagIdChanged(QString _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 0, nullptr, _t1);
}

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

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

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