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

template <> constexpr inline auto Dtk::Widget::DViewItemAction::qt_create_metaobjectdata<qt_meta_tag_ZN3Dtk6Widget15DViewItemActionE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "Dtk::Widget::DViewItemAction"
    };

    QtMocHelpers::UintData qt_methods {
    };
    QtMocHelpers::UintData qt_properties {
    };
    QtMocHelpers::UintData qt_enums {
    };
    return QtMocHelpers::metaObjectData<DViewItemAction, qt_meta_tag_ZN3Dtk6Widget15DViewItemActionE_t>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums);
}
Q_CONSTINIT const QMetaObject Dtk::Widget::DViewItemAction::staticMetaObject = { {
    QMetaObject::SuperData::link<QAction::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN3Dtk6Widget15DViewItemActionE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN3Dtk6Widget15DViewItemActionE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN3Dtk6Widget15DViewItemActionE_t>.metaTypes,
    nullptr
} };

void Dtk::Widget::DViewItemAction::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<DViewItemAction *>(_o);
    (void)_t;
    (void)_c;
    (void)_id;
    (void)_a;
}

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

void *Dtk::Widget::DViewItemAction::qt_metacast(const char *_clname)
{
    if (!_clname) return nullptr;
    if (!strcmp(_clname, qt_staticMetaObjectStaticContent<qt_meta_tag_ZN3Dtk6Widget15DViewItemActionE_t>.strings))
        return static_cast<void*>(this);
    if (!strcmp(_clname, "Core::DObject"))
        return static_cast< Core::DObject*>(this);
    return QAction::qt_metacast(_clname);
}

int Dtk::Widget::DViewItemAction::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QAction::qt_metacall(_c, _id, _a);
    return _id;
}
namespace {
struct qt_meta_tag_ZN3Dtk6Widget19DStyledItemDelegateE_t {};
} // unnamed namespace

template <> constexpr inline auto Dtk::Widget::DStyledItemDelegate::qt_create_metaobjectdata<qt_meta_tag_ZN3Dtk6Widget19DStyledItemDelegateE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "Dtk::Widget::DStyledItemDelegate",
        "setBackgroundType",
        "",
        "BackgroundType",
        "backgroundType",
        "setMargins",
        "QMargins",
        "margins",
        "setItemSize",
        "QSize",
        "itemSize",
        "setItemSpacing",
        "spacing"
    };

    QtMocHelpers::UintData qt_methods {
        // Slot 'setBackgroundType'
        QtMocHelpers::SlotData<void(enum BackgroundType)>(1, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 3, 4 },
        }}),
        // Slot 'setMargins'
        QtMocHelpers::SlotData<void(const QMargins)>(5, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 6, 7 },
        }}),
        // Slot 'setItemSize'
        QtMocHelpers::SlotData<void(QSize)>(8, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 9, 10 },
        }}),
        // Slot 'setItemSpacing'
        QtMocHelpers::SlotData<void(int)>(11, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::Int, 12 },
        }}),
    };
    QtMocHelpers::UintData qt_properties {
        // property 'backgroundType'
        QtMocHelpers::PropertyData<enum BackgroundType>(4, 0x80000000 | 3, QMC::DefaultPropertyFlags | QMC::Writable | QMC::EnumOrFlag | QMC::StdCppSet),
        // property 'margins'
        QtMocHelpers::PropertyData<QMargins>(7, 0x80000000 | 6, QMC::DefaultPropertyFlags | QMC::Writable | QMC::EnumOrFlag | QMC::StdCppSet),
        // property 'itemSize'
        QtMocHelpers::PropertyData<QSize>(10, 0x80000000 | 9, QMC::DefaultPropertyFlags | QMC::Writable | QMC::EnumOrFlag | QMC::StdCppSet),
    };
    QtMocHelpers::UintData qt_enums {
    };
    return QtMocHelpers::metaObjectData<DStyledItemDelegate, qt_meta_tag_ZN3Dtk6Widget19DStyledItemDelegateE_t>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums);
}
Q_CONSTINIT const QMetaObject Dtk::Widget::DStyledItemDelegate::staticMetaObject = { {
    QMetaObject::SuperData::link<QStyledItemDelegate::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN3Dtk6Widget19DStyledItemDelegateE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN3Dtk6Widget19DStyledItemDelegateE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN3Dtk6Widget19DStyledItemDelegateE_t>.metaTypes,
    nullptr
} };

void Dtk::Widget::DStyledItemDelegate::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<DStyledItemDelegate *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->setBackgroundType((*reinterpret_cast<std::add_pointer_t<enum BackgroundType>>(_a[1]))); break;
        case 1: _t->setMargins((*reinterpret_cast<std::add_pointer_t<QMargins>>(_a[1]))); break;
        case 2: _t->setItemSize((*reinterpret_cast<std::add_pointer_t<QSize>>(_a[1]))); break;
        case 3: _t->setItemSpacing((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
        default: ;
        }
    }
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<enum BackgroundType*>(_v) = _t->backgroundType(); break;
        case 1: *reinterpret_cast<QMargins*>(_v) = _t->margins(); break;
        case 2: *reinterpret_cast<QSize*>(_v) = _t->itemSize(); break;
        default: break;
        }
    }
    if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: _t->setBackgroundType(*reinterpret_cast<enum BackgroundType*>(_v)); break;
        case 1: _t->setMargins(*reinterpret_cast<QMargins*>(_v)); break;
        case 2: _t->setItemSize(*reinterpret_cast<QSize*>(_v)); break;
        default: break;
        }
    }
}

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

void *Dtk::Widget::DStyledItemDelegate::qt_metacast(const char *_clname)
{
    if (!_clname) return nullptr;
    if (!strcmp(_clname, qt_staticMetaObjectStaticContent<qt_meta_tag_ZN3Dtk6Widget19DStyledItemDelegateE_t>.strings))
        return static_cast<void*>(this);
    if (!strcmp(_clname, "Core::DObject"))
        return static_cast< Core::DObject*>(this);
    return QStyledItemDelegate::qt_metacast(_clname);
}

int Dtk::Widget::DStyledItemDelegate::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QStyledItemDelegate::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 4)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 4;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 4)
            *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
        _id -= 4;
    }
    if (_c == QMetaObject::ReadProperty || _c == QMetaObject::WriteProperty
            || _c == QMetaObject::ResetProperty || _c == QMetaObject::BindableProperty
            || _c == QMetaObject::RegisterPropertyMetaType) {
        qt_static_metacall(this, _c, _id, _a);
        _id -= 3;
    }
    return _id;
}
QT_WARNING_POP
