/****************************************************************************
** Meta object code from reading C++ file 'tasksmodel.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 "../../../../kcron-26.07.80/src/tasksmodel.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 'tasksmodel.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_ZN10TasksModelE_t {};
} // unnamed namespace

template <> constexpr inline auto TasksModel::qt_create_metaobjectdata<qt_meta_tag_ZN10TasksModelE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "TasksModel",
        "addTask",
        "",
        "Task*",
        "task",
        "modifyTask",
        "removeTask",
        "refresh",
        "CTCron*",
        "ctCron",
        "run",
        "create",
        "applyCreate",
        "modify",
        "applyModify",
        "rowCount",
        "QModelIndex",
        "parent",
        "data",
        "QVariant",
        "index",
        "role",
        "setData",
        "value",
        "removeSelected",
        "copy",
        "cut",
        "paste",
        "Roles",
        "CommandRole",
        "UserLoginRole",
        "EnabledRole",
        "CommentRole",
        "CronFormatRole",
        "DescriptionRole"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'addTask'
        QtMocHelpers::SignalData<void(Task *)>(1, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 3, 4 },
        }}),
        // Signal 'modifyTask'
        QtMocHelpers::SignalData<void(Task *)>(5, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 3, 4 },
        }}),
        // Signal 'removeTask'
        QtMocHelpers::SignalData<void(Task *)>(6, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 3, 4 },
        }}),
        // Slot 'refresh'
        QtMocHelpers::SlotData<void(CTCron *)>(7, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 8, 9 },
        }}),
        // Method 'run'
        QtMocHelpers::MethodData<void()>(10, 2, QMC::AccessPublic, QMetaType::Void),
        // Method 'create'
        QtMocHelpers::MethodData<Task *()>(11, 2, QMC::AccessPublic, 0x80000000 | 3),
        // Method 'applyCreate'
        QtMocHelpers::MethodData<void()>(12, 2, QMC::AccessPublic, QMetaType::Void),
        // Method 'modify'
        QtMocHelpers::MethodData<Task *()>(13, 2, QMC::AccessPublic, 0x80000000 | 3),
        // Method 'applyModify'
        QtMocHelpers::MethodData<void()>(14, 2, QMC::AccessPublic, QMetaType::Void),
        // Method 'rowCount'
        QtMocHelpers::MethodData<int(const QModelIndex &) const>(15, 2, QMC::AccessPublic, QMetaType::Int, {{
            { 0x80000000 | 16, 17 },
        }}),
        // Method 'rowCount'
        QtMocHelpers::MethodData<int() const>(15, 2, QMC::AccessPublic | QMC::MethodCloned, QMetaType::Int),
        // Method 'data'
        QtMocHelpers::MethodData<QVariant(const QModelIndex &, int) const>(18, 2, QMC::AccessPublic, 0x80000000 | 19, {{
            { 0x80000000 | 16, 20 }, { QMetaType::Int, 21 },
        }}),
        // Method 'data'
        QtMocHelpers::MethodData<QVariant(const QModelIndex &) const>(18, 2, QMC::AccessPublic | QMC::MethodCloned, 0x80000000 | 19, {{
            { 0x80000000 | 16, 20 },
        }}),
        // Method 'setData'
        QtMocHelpers::MethodData<bool(const QModelIndex &, const QVariant &, int)>(22, 2, QMC::AccessPublic, QMetaType::Bool, {{
            { 0x80000000 | 16, 20 }, { 0x80000000 | 19, 23 }, { QMetaType::Int, 21 },
        }}),
        // Method 'removeSelected'
        QtMocHelpers::MethodData<void()>(24, 2, QMC::AccessPublic, QMetaType::Void),
        // Method 'copy'
        QtMocHelpers::MethodData<void()>(25, 2, QMC::AccessPublic, QMetaType::Void),
        // Method 'cut'
        QtMocHelpers::MethodData<void()>(26, 2, QMC::AccessPublic, QMetaType::Void),
        // Method 'paste'
        QtMocHelpers::MethodData<void()>(27, 2, QMC::AccessPublic, QMetaType::Void),
    };
    QtMocHelpers::UintData qt_properties {
    };
    QtMocHelpers::UintData qt_enums {
        // enum 'Roles'
        QtMocHelpers::EnumData<enum Roles>(28, 28, QMC::EnumFlags{}).add({
            {   29, Roles::CommandRole },
            {   30, Roles::UserLoginRole },
            {   31, Roles::EnabledRole },
            {   32, Roles::CommentRole },
            {   33, Roles::CronFormatRole },
            {   34, Roles::DescriptionRole },
        }),
    };
    return QtMocHelpers::metaObjectData<TasksModel, qt_meta_tag_ZN10TasksModelE_t>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums);
}
Q_CONSTINIT const QMetaObject TasksModel::staticMetaObject = { {
    QMetaObject::SuperData::link<GenericModel::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN10TasksModelE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN10TasksModelE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN10TasksModelE_t>.metaTypes,
    nullptr
} };

void TasksModel::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<TasksModel *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->addTask((*reinterpret_cast<std::add_pointer_t<Task*>>(_a[1]))); break;
        case 1: _t->modifyTask((*reinterpret_cast<std::add_pointer_t<Task*>>(_a[1]))); break;
        case 2: _t->removeTask((*reinterpret_cast<std::add_pointer_t<Task*>>(_a[1]))); break;
        case 3: _t->refresh((*reinterpret_cast<std::add_pointer_t<CTCron*>>(_a[1]))); break;
        case 4: _t->run(); break;
        case 5: { Task* _r = _t->create();
            if (_a[0]) *reinterpret_cast<Task**>(_a[0]) = std::move(_r); }  break;
        case 6: _t->applyCreate(); break;
        case 7: { Task* _r = _t->modify();
            if (_a[0]) *reinterpret_cast<Task**>(_a[0]) = std::move(_r); }  break;
        case 8: _t->applyModify(); break;
        case 9: { int _r = _t->rowCount((*reinterpret_cast<std::add_pointer_t<QModelIndex>>(_a[1])));
            if (_a[0]) *reinterpret_cast<int*>(_a[0]) = std::move(_r); }  break;
        case 10: { int _r = _t->rowCount();
            if (_a[0]) *reinterpret_cast<int*>(_a[0]) = std::move(_r); }  break;
        case 11: { 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 12: { 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 13: { bool _r = _t->setData((*reinterpret_cast<std::add_pointer_t<QModelIndex>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QVariant>>(_a[2])),(*reinterpret_cast<std::add_pointer_t<int>>(_a[3])));
            if (_a[0]) *reinterpret_cast<bool*>(_a[0]) = std::move(_r); }  break;
        case 14: _t->removeSelected(); break;
        case 15: _t->copy(); break;
        case 16: _t->cut(); break;
        case 17: _t->paste(); break;
        default: ;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (TasksModel::*)(Task * )>(_a, &TasksModel::addTask, 0))
            return;
        if (QtMocHelpers::indexOfMethod<void (TasksModel::*)(Task * )>(_a, &TasksModel::modifyTask, 1))
            return;
        if (QtMocHelpers::indexOfMethod<void (TasksModel::*)(Task * )>(_a, &TasksModel::removeTask, 2))
            return;
    }
}

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

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

int TasksModel::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = GenericModel::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 18)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 18;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 18)
            *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
        _id -= 18;
    }
    return _id;
}

// SIGNAL 0
void TasksModel::addTask(Task * _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 0, nullptr, _t1);
}

// SIGNAL 1
void TasksModel::modifyTask(Task * _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 1, nullptr, _t1);
}

// SIGNAL 2
void TasksModel::removeTask(Task * _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 2, nullptr, _t1);
}
QT_WARNING_POP
