/****************************************************************************
** Meta object code from reading C++ file 'daccountsmanager.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 "../../../include/accounts/daccountsmanager.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 'daccountsmanager.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_ZN3Dtk8Accounts16DAccountsManagerE_t {};
} // unnamed namespace

template <> constexpr inline auto Dtk::Accounts::DAccountsManager::qt_create_metaobjectdata<qt_meta_tag_ZN3Dtk8Accounts16DAccountsManagerE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "Dtk::Accounts::DAccountsManager",
        "UserAdded",
        "",
        "uid",
        "UserDeleted",
        "userList",
        "DExpected<QList<quint64>>",
        "createUser",
        "DExpected<AccountsUserPtr>",
        "name",
        "fullName",
        "DAccountTypes",
        "type",
        "deleteUser",
        "DExpected<void>",
        "rmFiles",
        "findUserByName",
        "findUserById",
        "groups",
        "DExpected<QStringList>",
        "presetGroups",
        "isPasswordValid",
        "DExpected<AccountsValidMsg>",
        "password",
        "isUsernameValid"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'UserAdded'
        QtMocHelpers::SignalData<void(const quint64)>(1, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::ULongLong, 3 },
        }}),
        // Signal 'UserDeleted'
        QtMocHelpers::SignalData<void(const quint64)>(4, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::ULongLong, 3 },
        }}),
        // Slot 'userList'
        QtMocHelpers::SlotData<DExpected<QList<quint64>>() const>(5, 2, QMC::AccessPublic, 0x80000000 | 6),
        // Slot 'createUser'
        QtMocHelpers::SlotData<DExpected<AccountsUserPtr>(const QString &, const QString &, const DAccountTypes &)>(7, 2, QMC::AccessPublic, 0x80000000 | 8, {{
            { QMetaType::QString, 9 }, { QMetaType::QString, 10 }, { 0x80000000 | 11, 12 },
        }}),
        // Slot 'deleteUser'
        QtMocHelpers::SlotData<DExpected<void>(const QString &, const bool)>(13, 2, QMC::AccessPublic, 0x80000000 | 14, {{
            { QMetaType::QString, 9 }, { QMetaType::Bool, 15 },
        }}),
        // Slot 'findUserByName'
        QtMocHelpers::SlotData<DExpected<AccountsUserPtr>(const QString &)>(16, 2, QMC::AccessPublic, 0x80000000 | 8, {{
            { QMetaType::QString, 9 },
        }}),
        // Slot 'findUserById'
        QtMocHelpers::SlotData<DExpected<AccountsUserPtr>(const qint64)>(17, 2, QMC::AccessPublic, 0x80000000 | 8, {{
            { QMetaType::LongLong, 3 },
        }}),
        // Slot 'groups'
        QtMocHelpers::SlotData<DExpected<QStringList>()>(18, 2, QMC::AccessPublic, 0x80000000 | 19),
        // Slot 'presetGroups'
        QtMocHelpers::SlotData<DExpected<QStringList>(const DAccountTypes &)>(20, 2, QMC::AccessPublic, 0x80000000 | 19, {{
            { 0x80000000 | 11, 12 },
        }}),
        // Slot 'isPasswordValid'
        QtMocHelpers::SlotData<DExpected<AccountsValidMsg>(const QString &)>(21, 2, QMC::AccessPublic, 0x80000000 | 22, {{
            { QMetaType::QString, 23 },
        }}),
        // Slot 'isUsernameValid'
        QtMocHelpers::SlotData<DExpected<AccountsValidMsg>(const QString &)>(24, 2, QMC::AccessPublic, 0x80000000 | 22, {{
            { QMetaType::QString, 9 },
        }}),
    };
    QtMocHelpers::UintData qt_properties {
    };
    QtMocHelpers::UintData qt_enums {
    };
    return QtMocHelpers::metaObjectData<DAccountsManager, qt_meta_tag_ZN3Dtk8Accounts16DAccountsManagerE_t>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums);
}
Q_CONSTINIT const QMetaObject Dtk::Accounts::DAccountsManager::staticMetaObject = { {
    QMetaObject::SuperData::link<QObject::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN3Dtk8Accounts16DAccountsManagerE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN3Dtk8Accounts16DAccountsManagerE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN3Dtk8Accounts16DAccountsManagerE_t>.metaTypes,
    nullptr
} };

void Dtk::Accounts::DAccountsManager::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<DAccountsManager *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->UserAdded((*reinterpret_cast<std::add_pointer_t<quint64>>(_a[1]))); break;
        case 1: _t->UserDeleted((*reinterpret_cast<std::add_pointer_t<quint64>>(_a[1]))); break;
        case 2: { DExpected<QList<quint64>> _r = _t->userList();
            if (_a[0]) *reinterpret_cast<DExpected<QList<quint64>>*>(_a[0]) = std::move(_r); }  break;
        case 3: { DExpected<AccountsUserPtr> _r = _t->createUser((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QString>>(_a[2])),(*reinterpret_cast<std::add_pointer_t<DAccountTypes>>(_a[3])));
            if (_a[0]) *reinterpret_cast<DExpected<AccountsUserPtr>*>(_a[0]) = std::move(_r); }  break;
        case 4: { DExpected<void> _r = _t->deleteUser((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<bool>>(_a[2])));
            if (_a[0]) *reinterpret_cast<DExpected<void>*>(_a[0]) = std::move(_r); }  break;
        case 5: { DExpected<AccountsUserPtr> _r = _t->findUserByName((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])));
            if (_a[0]) *reinterpret_cast<DExpected<AccountsUserPtr>*>(_a[0]) = std::move(_r); }  break;
        case 6: { DExpected<AccountsUserPtr> _r = _t->findUserById((*reinterpret_cast<std::add_pointer_t<qint64>>(_a[1])));
            if (_a[0]) *reinterpret_cast<DExpected<AccountsUserPtr>*>(_a[0]) = std::move(_r); }  break;
        case 7: { DExpected<QStringList> _r = _t->groups();
            if (_a[0]) *reinterpret_cast<DExpected<QStringList>*>(_a[0]) = std::move(_r); }  break;
        case 8: { DExpected<QStringList> _r = _t->presetGroups((*reinterpret_cast<std::add_pointer_t<DAccountTypes>>(_a[1])));
            if (_a[0]) *reinterpret_cast<DExpected<QStringList>*>(_a[0]) = std::move(_r); }  break;
        case 9: { DExpected<AccountsValidMsg> _r = _t->isPasswordValid((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])));
            if (_a[0]) *reinterpret_cast<DExpected<AccountsValidMsg>*>(_a[0]) = std::move(_r); }  break;
        case 10: { DExpected<AccountsValidMsg> _r = _t->isUsernameValid((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])));
            if (_a[0]) *reinterpret_cast<DExpected<AccountsValidMsg>*>(_a[0]) = std::move(_r); }  break;
        default: ;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (DAccountsManager::*)(const quint64 )>(_a, &DAccountsManager::UserAdded, 0))
            return;
        if (QtMocHelpers::indexOfMethod<void (DAccountsManager::*)(const quint64 )>(_a, &DAccountsManager::UserDeleted, 1))
            return;
    }
}

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

void *Dtk::Accounts::DAccountsManager::qt_metacast(const char *_clname)
{
    if (!_clname) return nullptr;
    if (!strcmp(_clname, qt_staticMetaObjectStaticContent<qt_meta_tag_ZN3Dtk8Accounts16DAccountsManagerE_t>.strings))
        return static_cast<void*>(this);
    return QObject::qt_metacast(_clname);
}

int Dtk::Accounts::DAccountsManager::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 < 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;
    }
    return _id;
}

// SIGNAL 0
void Dtk::Accounts::DAccountsManager::UserAdded(const quint64 _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 0, nullptr, _t1);
}

// SIGNAL 1
void Dtk::Accounts::DAccountsManager::UserDeleted(const quint64 _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 1, nullptr, _t1);
}
QT_WARNING_POP
