/****************************************************************************
** Meta object code from reading C++ file 'locationhistorymodel.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 "../../../../../kpublictransport-26.07.90/src/lib/models/locationhistorymodel.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 'locationhistorymodel.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_ZN16KPublicTransport20LocationHistoryModelE_t {};
} // unnamed namespace

template <> constexpr inline auto KPublicTransport::LocationHistoryModel::qt_create_metaobjectdata<qt_meta_tag_ZN16KPublicTransport20LocationHistoryModelE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "KPublicTransport::LocationHistoryModel",
        "addLocation",
        "",
        "KPublicTransport::Location",
        "loc",
        "addPresetLocation",
        "lastUse",
        "useCount",
        "clearPresetLocations",
        "clear",
        "storagePath",
        "importEntry",
        "entry",
        "removeRow",
        "row",
        "QModelIndex",
        "parent",
        "removeRows",
        "count",
        "Role",
        "LocationRole",
        "LocationNameRole",
        "LastUsedRole",
        "UseCountRole",
        "IsRemovableRole"
    };

    QtMocHelpers::UintData qt_methods {
        // Slot 'addLocation'
        QtMocHelpers::SlotData<void(const KPublicTransport::Location &)>(1, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 3, 4 },
        }}),
        // Slot 'addPresetLocation'
        QtMocHelpers::SlotData<void(const KPublicTransport::Location &, const QDateTime &, int)>(5, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 3, 4 }, { QMetaType::QDateTime, 6 }, { QMetaType::Int, 7 },
        }}),
        // Slot 'clearPresetLocations'
        QtMocHelpers::SlotData<void()>(8, 2, QMC::AccessPublic, QMetaType::Void),
        // Slot 'clear'
        QtMocHelpers::SlotData<void()>(9, 2, QMC::AccessPublic, QMetaType::Void),
        // Slot 'storagePath'
        QtMocHelpers::SlotData<QString()>(10, 2, QMC::AccessPublic, QMetaType::QString),
        // Slot 'importEntry'
        QtMocHelpers::SlotData<void(const QByteArray &)>(11, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::QByteArray, 12 },
        }}),
        // Method 'removeRow'
        QtMocHelpers::MethodData<bool(int, const QModelIndex &)>(13, 2, QMC::AccessPublic, QMetaType::Bool, {{
            { QMetaType::Int, 14 }, { 0x80000000 | 15, 16 },
        }}),
        // Method 'removeRow'
        QtMocHelpers::MethodData<bool(int)>(13, 2, QMC::AccessPublic | QMC::MethodCloned, QMetaType::Bool, {{
            { QMetaType::Int, 14 },
        }}),
        // Method 'removeRows'
        QtMocHelpers::MethodData<bool(int, int, const QModelIndex &)>(17, 2, QMC::AccessPublic, QMetaType::Bool, {{
            { QMetaType::Int, 14 }, { QMetaType::Int, 18 }, { 0x80000000 | 15, 16 },
        }}),
        // Method 'removeRows'
        QtMocHelpers::MethodData<bool(int, int)>(17, 2, QMC::AccessPublic | QMC::MethodCloned, QMetaType::Bool, {{
            { QMetaType::Int, 14 }, { QMetaType::Int, 18 },
        }}),
    };
    QtMocHelpers::UintData qt_properties {
    };
    QtMocHelpers::UintData qt_enums {
        // enum 'Role'
        QtMocHelpers::EnumData<enum Role>(19, 19, QMC::EnumFlags{}).add({
            {   20, Role::LocationRole },
            {   21, Role::LocationNameRole },
            {   22, Role::LastUsedRole },
            {   23, Role::UseCountRole },
            {   24, Role::IsRemovableRole },
        }),
    };
    return QtMocHelpers::metaObjectData<LocationHistoryModel, qt_meta_tag_ZN16KPublicTransport20LocationHistoryModelE_t>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums);
}
Q_CONSTINIT const QMetaObject KPublicTransport::LocationHistoryModel::staticMetaObject = { {
    QMetaObject::SuperData::link<QAbstractListModel::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN16KPublicTransport20LocationHistoryModelE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN16KPublicTransport20LocationHistoryModelE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN16KPublicTransport20LocationHistoryModelE_t>.metaTypes,
    nullptr
} };

void KPublicTransport::LocationHistoryModel::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<LocationHistoryModel *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->addLocation((*reinterpret_cast<std::add_pointer_t<KPublicTransport::Location>>(_a[1]))); break;
        case 1: _t->addPresetLocation((*reinterpret_cast<std::add_pointer_t<KPublicTransport::Location>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QDateTime>>(_a[2])),(*reinterpret_cast<std::add_pointer_t<int>>(_a[3]))); break;
        case 2: _t->clearPresetLocations(); break;
        case 3: _t->clear(); break;
        case 4: { QString _r = _t->storagePath();
            if (_a[0]) *reinterpret_cast<QString*>(_a[0]) = std::move(_r); }  break;
        case 5: _t->importEntry((*reinterpret_cast<std::add_pointer_t<QByteArray>>(_a[1]))); break;
        case 6: { bool _r = _t->removeRow((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QModelIndex>>(_a[2])));
            if (_a[0]) *reinterpret_cast<bool*>(_a[0]) = std::move(_r); }  break;
        case 7: { bool _r = _t->removeRow((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])));
            if (_a[0]) *reinterpret_cast<bool*>(_a[0]) = std::move(_r); }  break;
        case 8: { bool _r = _t->removeRows((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<int>>(_a[2])),(*reinterpret_cast<std::add_pointer_t<QModelIndex>>(_a[3])));
            if (_a[0]) *reinterpret_cast<bool*>(_a[0]) = std::move(_r); }  break;
        case 9: { bool _r = _t->removeRows((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<int>>(_a[2])));
            if (_a[0]) *reinterpret_cast<bool*>(_a[0]) = std::move(_r); }  break;
        default: ;
        }
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        switch (_id) {
        default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
        case 0:
            switch (*reinterpret_cast<int*>(_a[1])) {
            default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
            case 0:
                *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType::fromType< KPublicTransport::Location >(); break;
            }
            break;
        case 1:
            switch (*reinterpret_cast<int*>(_a[1])) {
            default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
            case 0:
                *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType::fromType< KPublicTransport::Location >(); break;
            }
            break;
        }
    }
}

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

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

int KPublicTransport::LocationHistoryModel::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 < 10)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 10;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 10)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 10;
    }
    return _id;
}
QT_WARNING_POP
