/****************************************************************************
** Meta object code from reading C++ file 'trainingstats.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 "../../../../ktouch-26.08.0/src/core/trainingstats.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 'trainingstats.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_ZN13TrainingStatsE_t {};
} // unnamed namespace

template <> constexpr inline auto TrainingStats::qt_create_metaobjectdata<qt_meta_tag_ZN13TrainingStatsE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "TrainingStats",
        "statsChanged",
        "",
        "isValidChanged",
        "errorsChanged",
        "update",
        "startTraining",
        "stopTraining",
        "reset",
        "logCharacter",
        "character",
        "EventType",
        "type",
        "charactesTyped",
        "elapsedTime",
        "errorCount",
        "isValid",
        "accuracy",
        "charactersPerMinute",
        "timeIsRunning",
        "CorrectCharacter",
        "IncorrectCharacter"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'statsChanged'
        QtMocHelpers::SignalData<void()>(1, 2, QMC::AccessPublic, QMetaType::Void),
        // Signal 'isValidChanged'
        QtMocHelpers::SignalData<void()>(3, 2, QMC::AccessPublic, QMetaType::Void),
        // Signal 'errorsChanged'
        QtMocHelpers::SignalData<void()>(4, 2, QMC::AccessPublic, QMetaType::Void),
        // Slot 'update'
        QtMocHelpers::SlotData<void()>(5, 2, QMC::AccessPrivate, QMetaType::Void),
        // Method 'startTraining'
        QtMocHelpers::MethodData<void()>(6, 2, QMC::AccessPublic, QMetaType::Void),
        // Method 'stopTraining'
        QtMocHelpers::MethodData<void()>(7, 2, QMC::AccessPublic, QMetaType::Void),
        // Method 'reset'
        QtMocHelpers::MethodData<void()>(8, 2, QMC::AccessPublic, QMetaType::Void),
        // Method 'logCharacter'
        QtMocHelpers::MethodData<void(const QString &, enum EventType)>(9, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::QString, 10 }, { 0x80000000 | 11, 12 },
        }}),
    };
    QtMocHelpers::UintData qt_properties {
        // property 'charactesTyped'
        QtMocHelpers::PropertyData<int>(13, QMetaType::Int, QMC::DefaultPropertyFlags | QMC::Writable, 0),
        // property 'elapsedTime'
        QtMocHelpers::PropertyData<QTime>(14, QMetaType::QTime, QMC::DefaultPropertyFlags | QMC::Writable | QMC::StdCppSet, 0),
        // property 'errorCount'
        QtMocHelpers::PropertyData<int>(15, QMetaType::Int, QMC::DefaultPropertyFlags, 0),
        // property 'isValid'
        QtMocHelpers::PropertyData<bool>(16, QMetaType::Bool, QMC::DefaultPropertyFlags | QMC::Writable | QMC::StdCppSet, 1),
        // property 'accuracy'
        QtMocHelpers::PropertyData<float>(17, QMetaType::Float, QMC::DefaultPropertyFlags, 0),
        // property 'charactersPerMinute'
        QtMocHelpers::PropertyData<int>(18, QMetaType::Int, QMC::DefaultPropertyFlags, 0),
        // property 'timeIsRunning'
        QtMocHelpers::PropertyData<bool>(19, QMetaType::Bool, QMC::DefaultPropertyFlags, 0),
    };
    QtMocHelpers::UintData qt_enums {
        // enum 'EventType'
        QtMocHelpers::EnumData<enum EventType>(11, 11, QMC::EnumFlags{}).add({
            {   20, EventType::CorrectCharacter },
            {   21, EventType::IncorrectCharacter },
        }),
    };
    return QtMocHelpers::metaObjectData<TrainingStats, qt_meta_tag_ZN13TrainingStatsE_t>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums);
}
Q_CONSTINIT const QMetaObject TrainingStats::staticMetaObject = { {
    QMetaObject::SuperData::link<QObject::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN13TrainingStatsE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN13TrainingStatsE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN13TrainingStatsE_t>.metaTypes,
    nullptr
} };

void TrainingStats::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<TrainingStats *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->statsChanged(); break;
        case 1: _t->isValidChanged(); break;
        case 2: _t->errorsChanged(); break;
        case 3: _t->update(); break;
        case 4: _t->startTraining(); break;
        case 5: _t->stopTraining(); break;
        case 6: _t->reset(); break;
        case 7: _t->logCharacter((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<enum EventType>>(_a[2]))); break;
        default: ;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (TrainingStats::*)()>(_a, &TrainingStats::statsChanged, 0))
            return;
        if (QtMocHelpers::indexOfMethod<void (TrainingStats::*)()>(_a, &TrainingStats::isValidChanged, 1))
            return;
        if (QtMocHelpers::indexOfMethod<void (TrainingStats::*)()>(_a, &TrainingStats::errorsChanged, 2))
            return;
    }
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<int*>(_v) = _t->charactesTyped(); break;
        case 1: *reinterpret_cast<QTime*>(_v) = _t->elapsedTime(); break;
        case 2: *reinterpret_cast<int*>(_v) = _t->errorCount(); break;
        case 3: *reinterpret_cast<bool*>(_v) = _t->isValid(); break;
        case 4: *reinterpret_cast<float*>(_v) = _t->accuracy(); break;
        case 5: *reinterpret_cast<int*>(_v) = _t->charactersPerMinute(); break;
        case 6: *reinterpret_cast<bool*>(_v) = _t->timeIsRunning(); break;
        default: break;
        }
    }
    if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: _t->setCharactersTyped(*reinterpret_cast<int*>(_v)); break;
        case 1: _t->setElapsedTime(*reinterpret_cast<QTime*>(_v)); break;
        case 3: _t->setIsValid(*reinterpret_cast<bool*>(_v)); break;
        default: break;
        }
    }
}

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

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

int TrainingStats::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 < 8)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 8;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 8)
            *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
        _id -= 8;
    }
    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 TrainingStats::statsChanged()
{
    QMetaObject::activate(this, &staticMetaObject, 0, nullptr);
}

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

// SIGNAL 2
void TrainingStats::errorsChanged()
{
    QMetaObject::activate(this, &staticMetaObject, 2, nullptr);
}
QT_WARNING_POP
