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

#include "../../../libQuotient/Quotient/user.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 'user.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 69
#error "This file was generated using the moc from 6.11.1. 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_ZN8Quotient4UserE_t {};
} // unnamed namespace

template <> constexpr inline auto Quotient::User::qt_create_metaobjectdata<qt_meta_tag_ZN8Quotient4UserE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "Quotient::User",
        "defaultNameChanged",
        "",
        "defaultAvatarChanged",
        "rename",
        "newName",
        "Room*",
        "r",
        "removeAvatar",
        "requestDirectChat",
        "ignore",
        "unmarkIgnore",
        "isIgnored",
        "load",
        "setAvatar",
        "fileName",
        "QIODevice*",
        "source",
        "id",
        "isGuest",
        "name",
        "displayName",
        "fullName",
        "avatarMediaId",
        "avatarUrl",
        "QUrl"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'defaultNameChanged'
        QtMocHelpers::SignalData<void()>(1, 2, QMC::AccessPublic, QMetaType::Void),
        // Signal 'defaultAvatarChanged'
        QtMocHelpers::SignalData<void()>(3, 2, QMC::AccessPublic, QMetaType::Void),
        // Slot 'rename'
        QtMocHelpers::SlotData<void(const QString &)>(4, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::QString, 5 },
        }}),
        // Slot 'rename'
        QtMocHelpers::SlotData<void(const QString &, Room *)>(4, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::QString, 5 }, { 0x80000000 | 6, 7 },
        }}),
        // Slot 'removeAvatar'
        QtMocHelpers::SlotData<void() const>(8, 2, QMC::AccessPublic, QMetaType::Void),
        // Slot 'requestDirectChat'
        QtMocHelpers::SlotData<void()>(9, 2, QMC::AccessPublic, QMetaType::Void),
        // Slot 'ignore'
        QtMocHelpers::SlotData<void() const>(10, 2, QMC::AccessPublic, QMetaType::Void),
        // Slot 'unmarkIgnore'
        QtMocHelpers::SlotData<void() const>(11, 2, QMC::AccessPublic, QMetaType::Void),
        // Slot 'isIgnored'
        QtMocHelpers::SlotData<bool() const>(12, 2, QMC::AccessPublic, QMetaType::Bool),
        // Slot 'load'
        QtMocHelpers::SlotData<void()>(13, 2, QMC::AccessPublic, QMetaType::Void),
        // Method 'setAvatar'
        QtMocHelpers::MethodData<bool(const QString &)>(14, 2, QMC::AccessPublic, QMetaType::Bool, {{
            { QMetaType::QString, 15 },
        }}),
        // Method 'setAvatar'
        QtMocHelpers::MethodData<bool(QIODevice *)>(14, 2, QMC::AccessPublic, QMetaType::Bool, {{
            { 0x80000000 | 16, 17 },
        }}),
    };
    QtMocHelpers::UintData qt_properties {
        // property 'id'
        QtMocHelpers::PropertyData<QString>(18, QMetaType::QString, QMC::DefaultPropertyFlags | QMC::Constant),
        // property 'isGuest'
        QtMocHelpers::PropertyData<bool>(19, QMetaType::Bool, QMC::DefaultPropertyFlags | QMC::Constant),
        // property 'name'
        QtMocHelpers::PropertyData<QString>(20, QMetaType::QString, QMC::DefaultPropertyFlags, 0),
        // property 'displayName'
        QtMocHelpers::PropertyData<QString>(21, QMetaType::QString, QMC::Readable | QMC::Designable | QMC::Scriptable, 0),
        // property 'fullName'
        QtMocHelpers::PropertyData<QString>(22, QMetaType::QString, QMC::Readable | QMC::Designable | QMC::Scriptable, 0),
        // property 'avatarMediaId'
        QtMocHelpers::PropertyData<QString>(23, QMetaType::QString, QMC::Readable | QMC::Designable | QMC::Scriptable, 1),
        // property 'avatarUrl'
        QtMocHelpers::PropertyData<QUrl>(24, 0x80000000 | 25, QMC::DefaultPropertyFlags | QMC::EnumOrFlag, 1),
    };
    QtMocHelpers::UintData qt_enums {
    };
    return QtMocHelpers::metaObjectData<User, qt_meta_tag_ZN8Quotient4UserE_t>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums);
}
Q_CONSTINIT const QMetaObject Quotient::User::staticMetaObject = { {
    QMetaObject::SuperData::link<QObject::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN8Quotient4UserE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN8Quotient4UserE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN8Quotient4UserE_t>.metaTypes,
    nullptr
} };

void Quotient::User::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<User *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->defaultNameChanged(); break;
        case 1: _t->defaultAvatarChanged(); break;
        case 2: _t->rename((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1]))); break;
        case 3: _t->rename((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<Room*>>(_a[2]))); break;
        case 4: _t->removeAvatar(); break;
        case 5: _t->requestDirectChat(); break;
        case 6: _t->ignore(); break;
        case 7: _t->unmarkIgnore(); break;
        case 8: { bool _r = _t->isIgnored();
            if (_a[0]) *reinterpret_cast<bool*>(_a[0]) = std::move(_r); }  break;
        case 9: _t->load(); break;
        case 10: { bool _r = _t->setAvatar((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])));
            if (_a[0]) *reinterpret_cast<bool*>(_a[0]) = std::move(_r); }  break;
        case 11: { bool _r = _t->setAvatar((*reinterpret_cast<std::add_pointer_t<QIODevice*>>(_a[1])));
            if (_a[0]) *reinterpret_cast<bool*>(_a[0]) = std::move(_r); }  break;
        default: ;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (User::*)()>(_a, &User::defaultNameChanged, 0))
            return;
        if (QtMocHelpers::indexOfMethod<void (User::*)()>(_a, &User::defaultAvatarChanged, 1))
            return;
    }
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<QString*>(_v) = _t->id(); break;
        case 1: *reinterpret_cast<bool*>(_v) = _t->isGuest(); break;
        case 2: *reinterpret_cast<QString*>(_v) = _t->name(); break;
        case 3: *reinterpret_cast<QString*>(_v) = _t->displayname(); break;
        case 4: *reinterpret_cast<QString*>(_v) = _t->fullName(); break;
        case 5: *reinterpret_cast<QString*>(_v) = _t->avatarMediaId(); break;
        case 6: *reinterpret_cast<QUrl*>(_v) = _t->avatarUrl(); break;
        default: break;
        }
    }
}

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

void *Quotient::User::qt_metacast(const char *_clname)
{
    if (!_clname) return nullptr;
    if (!strcmp(_clname, qt_staticMetaObjectStaticContent<qt_meta_tag_ZN8Quotient4UserE_t>.strings))
        return static_cast<void*>(this);
    return QObject::qt_metacast(_clname);
}

int Quotient::User::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 12)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 12;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 12)
            *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
        _id -= 12;
    }
    if (_c == QMetaObject::ReadProperty || _c == QMetaObject::WriteProperty
            || _c == QMetaObject::ResetProperty || _c == QMetaObject::BindableProperty
            || _c == QMetaObject::RegisterPropertyMetaType) {
        qt_static_metacall(this, _c, _id, _a);
        _id -= 7;
    }
    return _id;
}

// SIGNAL 0
void Quotient::User::defaultNameChanged()
{
    QMetaObject::activate(this, &staticMetaObject, 0, nullptr);
}

// SIGNAL 1
void Quotient::User::defaultAvatarChanged()
{
    QMetaObject::activate(this, &staticMetaObject, 1, nullptr);
}
QT_WARNING_POP
