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

#include "../../../../marknote-1.5.2/src/sketchhistory.h"
#include <QtCore/qmetatype.h>
#include <QtCore/QList>

#include <QtCore/qtmochelpers.h>

#include <memory>


#include <QtCore/qxptype_traits.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'sketchhistory.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 69
#error "This file was generated using the moc from 6.11.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_ZN6StrokeE_t {};
} // unnamed namespace

template <> constexpr inline auto Stroke::qt_create_metaobjectdata<qt_meta_tag_ZN6StrokeE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "Stroke",
        "points",
        "QList<QVector2D>",
        "color",
        "width",
        "isEraser"
    };

    QtMocHelpers::UintData qt_methods {
    };
    QtMocHelpers::UintData qt_properties {
        // property 'points'
        QtMocHelpers::PropertyData<QList<QVector2D>>(1, 0x80000000 | 2, QMC::DefaultPropertyFlags | QMC::Writable | QMC::EnumOrFlag),
        // property 'color'
        QtMocHelpers::PropertyData<QString>(3, QMetaType::QString, QMC::DefaultPropertyFlags | QMC::Writable),
        // property 'width'
        QtMocHelpers::PropertyData<float>(4, QMetaType::Float, QMC::DefaultPropertyFlags | QMC::Writable),
        // property 'isEraser'
        QtMocHelpers::PropertyData<bool>(5, QMetaType::Bool, QMC::DefaultPropertyFlags | QMC::Writable),
    };
    QtMocHelpers::UintData qt_enums {
    };
    return QtMocHelpers::metaObjectData<Stroke, qt_meta_tag_ZN6StrokeE_t>(QMC::PropertyAccessInStaticMetaCall, qt_stringData,
            qt_methods, qt_properties, qt_enums);
}
Q_CONSTINIT const QMetaObject Stroke::staticMetaObject = { {
    nullptr,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN6StrokeE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN6StrokeE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN6StrokeE_t>.metaTypes,
    nullptr
} };

void Stroke::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = reinterpret_cast<Stroke *>(_o);
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<QList<QVector2D>*>(_v) = _t->points; break;
        case 1: *reinterpret_cast<QString*>(_v) = _t->color; break;
        case 2: *reinterpret_cast<float*>(_v) = _t->width; break;
        case 3: *reinterpret_cast<bool*>(_v) = _t->isEraser; break;
        default: break;
        }
    }
    if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: QtMocHelpers::setProperty(_t->points, *reinterpret_cast<QList<QVector2D>*>(_v)); break;
        case 1: QtMocHelpers::setProperty(_t->color, *reinterpret_cast<QString*>(_v)); break;
        case 2: QtMocHelpers::setProperty(_t->width, *reinterpret_cast<float*>(_v)); break;
        case 3: QtMocHelpers::setProperty(_t->isEraser, *reinterpret_cast<bool*>(_v)); break;
        default: break;
        }
    }
}
namespace {
struct qt_meta_tag_ZN17HistoryControllerE_t {};
} // unnamed namespace

template <> constexpr inline auto HistoryController::qt_create_metaobjectdata<qt_meta_tag_ZN17HistoryControllerE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "HistoryController",
        "QML.Element",
        "auto",
        "undoAvailableChanged",
        "",
        "redoAvailableChanged",
        "submitStroke",
        "QList<QVector2D>",
        "points",
        "color",
        "width",
        "isEraser",
        "undoStroke",
        "redoStroke",
        "Stroke",
        "reset",
        "undoAvailable",
        "redoAvailable"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'undoAvailableChanged'
        QtMocHelpers::SignalData<void()>(3, 4, QMC::AccessPublic, QMetaType::Void),
        // Signal 'redoAvailableChanged'
        QtMocHelpers::SignalData<void()>(5, 4, QMC::AccessPublic, QMetaType::Void),
        // Method 'submitStroke'
        QtMocHelpers::MethodData<void(const QList<QVector2D> &, const QString &, float, bool)>(6, 4, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 7, 8 }, { QMetaType::QString, 9 }, { QMetaType::Float, 10 }, { QMetaType::Bool, 11 },
        }}),
        // Method 'undoStroke'
        QtMocHelpers::MethodData<void()>(12, 4, QMC::AccessPublic, QMetaType::Void),
        // Method 'redoStroke'
        QtMocHelpers::MethodData<Stroke()>(13, 4, QMC::AccessPublic, 0x80000000 | 14),
        // Method 'reset'
        QtMocHelpers::MethodData<void()>(15, 4, QMC::AccessPublic, QMetaType::Void),
    };
    QtMocHelpers::UintData qt_properties {
        // property 'undoAvailable'
        QtMocHelpers::PropertyData<bool>(16, QMetaType::Bool, QMC::DefaultPropertyFlags | QMC::Final, 0),
        // property 'redoAvailable'
        QtMocHelpers::PropertyData<bool>(17, QMetaType::Bool, QMC::DefaultPropertyFlags | QMC::Final, 1),
    };
    QtMocHelpers::UintData qt_enums {
    };
    QtMocHelpers::UintData qt_constructors {};
    QtMocHelpers::ClassInfos qt_classinfo({
            {    1,    2 },
    });
    return QtMocHelpers::metaObjectData<HistoryController, void>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums, qt_constructors, qt_classinfo);
}
Q_CONSTINIT const QMetaObject HistoryController::staticMetaObject = { {
    QMetaObject::SuperData::link<QObject::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN17HistoryControllerE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN17HistoryControllerE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN17HistoryControllerE_t>.metaTypes,
    nullptr
} };

void HistoryController::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<HistoryController *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->undoAvailableChanged(); break;
        case 1: _t->redoAvailableChanged(); break;
        case 2: _t->submitStroke((*reinterpret_cast<std::add_pointer_t<QList<QVector2D>>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QString>>(_a[2])),(*reinterpret_cast<std::add_pointer_t<float>>(_a[3])),(*reinterpret_cast<std::add_pointer_t<bool>>(_a[4]))); break;
        case 3: _t->undoStroke(); break;
        case 4: { Stroke _r = _t->redoStroke();
            if (_a[0]) *reinterpret_cast<Stroke*>(_a[0]) = std::move(_r); }  break;
        case 5: _t->reset(); break;
        default: ;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (HistoryController::*)()>(_a, &HistoryController::undoAvailableChanged, 0))
            return;
        if (QtMocHelpers::indexOfMethod<void (HistoryController::*)()>(_a, &HistoryController::redoAvailableChanged, 1))
            return;
    }
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<bool*>(_v) = _t->isUndoAvailable(); break;
        case 1: *reinterpret_cast<bool*>(_v) = _t->isRedoAvailable(); break;
        default: break;
        }
    }
}

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

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

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

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

// SIGNAL 1
void HistoryController::redoAvailableChanged()
{
    QMetaObject::activate(this, &staticMetaObject, 1, nullptr);
}
QT_WARNING_POP
