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

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

template <> constexpr inline auto UserModel::qt_create_metaobjectdata<qt_meta_tag_ZN9UserModelE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "UserModel",
        "QML.Element",
        "QML.Singleton",
        "true",
        "currentUserNameChanged",
        "",
        "updateTranslations",
        "locale",
        "countChanged",
        "userLoggedIn",
        "username",
        "sessionId",
        "onUserAdded",
        "uid",
        "onUserDeleted",
        "data",
        "QVariant",
        "QModelIndex",
        "index",
        "role",
        "get",
        "tryAddNssUser",
        "userName",
        "currentUserName",
        "lastIndex",
        "lastUser",
        "count",
        "containsAllUsers",
        "UserRoles",
        "NameRole",
        "RealNameRole",
        "HomeDirRole",
        "IconRole",
        "NoPasswordRole",
        "LoggedInRole",
        "IdentityRole",
        "PasswordHintRole",
        "LocaleRole"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'currentUserNameChanged'
        QtMocHelpers::SignalData<void()>(4, 5, QMC::AccessPublic, QMetaType::Void),
        // Signal 'updateTranslations'
        QtMocHelpers::SignalData<void(const QLocale &)>(6, 5, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::QLocale, 7 },
        }}),
        // Signal 'countChanged'
        QtMocHelpers::SignalData<void()>(8, 5, QMC::AccessPublic, QMetaType::Void),
        // Signal 'userLoggedIn'
        QtMocHelpers::SignalData<void(const QString &, int)>(9, 5, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::QString, 10 }, { QMetaType::Int, 11 },
        }}),
        // Slot 'onUserAdded'
        QtMocHelpers::SlotData<void(quint64)>(12, 5, QMC::AccessPrivate, QMetaType::Void, {{
            { QMetaType::ULongLong, 13 },
        }}),
        // Slot 'onUserDeleted'
        QtMocHelpers::SlotData<void(quint64)>(14, 5, QMC::AccessPrivate, QMetaType::Void, {{
            { QMetaType::ULongLong, 13 },
        }}),
        // Method 'data'
        QtMocHelpers::MethodData<QVariant(const QModelIndex &, int) const>(15, 5, QMC::AccessPublic, 0x80000000 | 16, {{
            { 0x80000000 | 17, 18 }, { QMetaType::Int, 19 },
        }}),
        // Method 'data'
        QtMocHelpers::MethodData<QVariant(const QModelIndex &) const>(15, 5, QMC::AccessPublic | QMC::MethodCloned, 0x80000000 | 16, {{
            { 0x80000000 | 17, 18 },
        }}),
        // Method 'get'
        QtMocHelpers::MethodData<QVariant(const QString &) const>(20, 5, QMC::AccessPublic, 0x80000000 | 16, {{
            { QMetaType::QString, 10 },
        }}),
        // Method 'get'
        QtMocHelpers::MethodData<QVariant(int) const>(20, 5, QMC::AccessPublic, 0x80000000 | 16, {{
            { QMetaType::Int, 18 },
        }}),
        // Method 'tryAddNssUser'
        QtMocHelpers::MethodData<bool(const QString &)>(21, 5, QMC::AccessPublic, QMetaType::Bool, {{
            { QMetaType::QString, 22 },
        }}),
    };
    QtMocHelpers::UintData qt_properties {
        // property 'currentUserName'
        QtMocHelpers::PropertyData<QString>(23, QMetaType::QString, QMC::DefaultPropertyFlags | QMC::Writable | QMC::StdCppSet, 0),
        // property 'lastIndex'
        QtMocHelpers::PropertyData<int>(24, QMetaType::Int, QMC::DefaultPropertyFlags | QMC::Constant),
        // property 'lastUser'
        QtMocHelpers::PropertyData<QString>(25, QMetaType::QString, QMC::DefaultPropertyFlags | QMC::Constant),
        // property 'count'
        QtMocHelpers::PropertyData<int>(26, QMetaType::Int, QMC::DefaultPropertyFlags, 2),
        // property 'containsAllUsers'
        QtMocHelpers::PropertyData<bool>(27, QMetaType::Bool, QMC::DefaultPropertyFlags | QMC::Constant),
    };
    QtMocHelpers::UintData qt_enums {
        // enum 'UserRoles'
        QtMocHelpers::EnumData<enum UserRoles>(28, 28, QMC::EnumFlags{}).add({
            {   29, UserRoles::NameRole },
            {   30, UserRoles::RealNameRole },
            {   31, UserRoles::HomeDirRole },
            {   32, UserRoles::IconRole },
            {   33, UserRoles::NoPasswordRole },
            {   34, UserRoles::LoggedInRole },
            {   35, UserRoles::IdentityRole },
            {   36, UserRoles::PasswordHintRole },
            {   37, UserRoles::LocaleRole },
        }),
    };
    QtMocHelpers::UintData qt_constructors {};
    QtMocHelpers::ClassInfos qt_classinfo({
            {    1,    0 },
            {    2,    3 },
    });
    return QtMocHelpers::metaObjectData<UserModel, void>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums, qt_constructors, qt_classinfo);
}
Q_CONSTINIT const QMetaObject UserModel::staticMetaObject = { {
    QMetaObject::SuperData::link<QAbstractListModel::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN9UserModelE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN9UserModelE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN9UserModelE_t>.metaTypes,
    nullptr
} };

void UserModel::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<UserModel *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->currentUserNameChanged(); break;
        case 1: _t->updateTranslations((*reinterpret_cast<std::add_pointer_t<QLocale>>(_a[1]))); break;
        case 2: _t->countChanged(); break;
        case 3: _t->userLoggedIn((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<int>>(_a[2]))); break;
        case 4: _t->onUserAdded((*reinterpret_cast<std::add_pointer_t<quint64>>(_a[1]))); break;
        case 5: _t->onUserDeleted((*reinterpret_cast<std::add_pointer_t<quint64>>(_a[1]))); break;
        case 6: { QVariant _r = _t->data((*reinterpret_cast<std::add_pointer_t<QModelIndex>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<int>>(_a[2])));
            if (_a[0]) *reinterpret_cast<QVariant*>(_a[0]) = std::move(_r); }  break;
        case 7: { QVariant _r = _t->data((*reinterpret_cast<std::add_pointer_t<QModelIndex>>(_a[1])));
            if (_a[0]) *reinterpret_cast<QVariant*>(_a[0]) = std::move(_r); }  break;
        case 8: { QVariant _r = _t->get((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])));
            if (_a[0]) *reinterpret_cast<QVariant*>(_a[0]) = std::move(_r); }  break;
        case 9: { QVariant _r = _t->get((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])));
            if (_a[0]) *reinterpret_cast<QVariant*>(_a[0]) = std::move(_r); }  break;
        case 10: { bool _r = _t->tryAddNssUser((*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::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (UserModel::*)()>(_a, &UserModel::currentUserNameChanged, 0))
            return;
        if (QtMocHelpers::indexOfMethod<void (UserModel::*)(const QLocale & )>(_a, &UserModel::updateTranslations, 1))
            return;
        if (QtMocHelpers::indexOfMethod<void (UserModel::*)()>(_a, &UserModel::countChanged, 2))
            return;
        if (QtMocHelpers::indexOfMethod<void (UserModel::*)(const QString & , int )>(_a, &UserModel::userLoggedIn, 3))
            return;
    }
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<QString*>(_v) = _t->currentUserName(); break;
        case 1: *reinterpret_cast<int*>(_v) = _t->lastIndex(); break;
        case 2: *reinterpret_cast<QString*>(_v) = _t->lastUser(); break;
        case 3: *reinterpret_cast<int*>(_v) = _t->rowCount(); break;
        case 4: *reinterpret_cast<bool*>(_v) = _t->containsAllUsers(); break;
        default: break;
        }
    }
    if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: _t->setCurrentUserName(*reinterpret_cast<QString*>(_v)); break;
        default: break;
        }
    }
}

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

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

int UserModel::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 < 11)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 11;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 11)
            *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
        _id -= 11;
    }
    if (_c == QMetaObject::ReadProperty || _c == QMetaObject::WriteProperty
            || _c == QMetaObject::ResetProperty || _c == QMetaObject::BindableProperty
            || _c == QMetaObject::RegisterPropertyMetaType) {
        qt_static_metacall(this, _c, _id, _a);
        _id -= 5;
    }
    return _id;
}

// SIGNAL 0
void UserModel::currentUserNameChanged()
{
    QMetaObject::activate(this, &staticMetaObject, 0, nullptr);
}

// SIGNAL 1
void UserModel::updateTranslations(const QLocale & _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 1, nullptr, _t1);
}

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

// SIGNAL 3
void UserModel::userLoggedIn(const QString & _t1, int _t2)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 3, nullptr, _t1, _t2);
}
QT_WARNING_POP
