/****************************************************************************
** Meta object code from reading C++ file 'dlistview.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/dlistview.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 'dlistview.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_ZN3Dtk6Widget9DListViewE_t {};
} // unnamed namespace

template <> constexpr inline auto Dtk::Widget::DListView::qt_create_metaobjectdata<qt_meta_tag_ZN3Dtk6Widget9DListViewE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "Dtk::Widget::DListView",
        "rowCountChanged",
        "",
        "orientationChanged",
        "Qt::Orientation",
        "orientation",
        "currentChanged",
        "QModelIndex",
        "previous",
        "triggerEdit",
        "index",
        "addItem",
        "QVariant",
        "data",
        "addItems",
        "QVariantList",
        "datas",
        "insertItem",
        "insertItems",
        "removeItem",
        "removeItems",
        "count",
        "addHeaderWidget",
        "QWidget*",
        "widget",
        "removeHeaderWidget",
        "takeHeaderWidget",
        "addFooterWidget",
        "removeFooterWidget",
        "takeFooterWidget",
        "setOrientation",
        "QListView::Flow",
        "flow",
        "wrapping",
        "edit",
        "setBackgroundType",
        "DStyledItemDelegate::BackgroundType",
        "backgroundType",
        "setItemMargins",
        "QMargins",
        "itemMargins",
        "setItemSize",
        "QSize",
        "itemSize",
        "setItemSpacing",
        "spacing",
        "setItemRadius",
        "radius"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'rowCountChanged'
        QtMocHelpers::SignalData<void()>(1, 2, QMC::AccessPublic, QMetaType::Void),
        // Signal 'orientationChanged'
        QtMocHelpers::SignalData<void(Qt::Orientation)>(3, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 4, 5 },
        }}),
        // Signal 'currentChanged'
        QtMocHelpers::SignalData<void(const QModelIndex &)>(6, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 7, 8 },
        }}),
        // Signal 'triggerEdit'
        QtMocHelpers::SignalData<void(const QModelIndex &)>(9, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 7, 10 },
        }}),
        // Slot 'addItem'
        QtMocHelpers::SlotData<bool(const QVariant &)>(11, 2, QMC::AccessPublic, QMetaType::Bool, {{
            { 0x80000000 | 12, 13 },
        }}),
        // Slot 'addItems'
        QtMocHelpers::SlotData<bool(const QVariantList &)>(14, 2, QMC::AccessPublic, QMetaType::Bool, {{
            { 0x80000000 | 15, 16 },
        }}),
        // Slot 'insertItem'
        QtMocHelpers::SlotData<bool(int, const QVariant &)>(17, 2, QMC::AccessPublic, QMetaType::Bool, {{
            { QMetaType::Int, 10 }, { 0x80000000 | 12, 13 },
        }}),
        // Slot 'insertItems'
        QtMocHelpers::SlotData<bool(int, const QVariantList &)>(18, 2, QMC::AccessPublic, QMetaType::Bool, {{
            { QMetaType::Int, 10 }, { 0x80000000 | 15, 16 },
        }}),
        // Slot 'removeItem'
        QtMocHelpers::SlotData<bool(int)>(19, 2, QMC::AccessPublic, QMetaType::Bool, {{
            { QMetaType::Int, 10 },
        }}),
        // Slot 'removeItems'
        QtMocHelpers::SlotData<bool(int, int)>(20, 2, QMC::AccessPublic, QMetaType::Bool, {{
            { QMetaType::Int, 10 }, { QMetaType::Int, 21 },
        }}),
        // Slot 'addHeaderWidget'
        QtMocHelpers::SlotData<int(QWidget *)>(22, 2, QMC::AccessPublic, QMetaType::Int, {{
            { 0x80000000 | 23, 24 },
        }}),
        // Slot 'removeHeaderWidget'
        QtMocHelpers::SlotData<void(int)>(25, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::Int, 10 },
        }}),
        // Slot 'takeHeaderWidget'
        QtMocHelpers::SlotData<QWidget *(int)>(26, 2, QMC::AccessPublic, 0x80000000 | 23, {{
            { QMetaType::Int, 10 },
        }}),
        // Slot 'addFooterWidget'
        QtMocHelpers::SlotData<int(QWidget *)>(27, 2, QMC::AccessPublic, QMetaType::Int, {{
            { 0x80000000 | 23, 24 },
        }}),
        // Slot 'removeFooterWidget'
        QtMocHelpers::SlotData<void(int)>(28, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::Int, 10 },
        }}),
        // Slot 'takeFooterWidget'
        QtMocHelpers::SlotData<QWidget *(int)>(29, 2, QMC::AccessPublic, 0x80000000 | 23, {{
            { QMetaType::Int, 10 },
        }}),
        // Slot 'setOrientation'
        QtMocHelpers::SlotData<void(QListView::Flow, bool)>(30, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 31, 32 }, { QMetaType::Bool, 33 },
        }}),
        // Slot 'edit'
        QtMocHelpers::SlotData<void(const QModelIndex &)>(34, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 7, 10 },
        }}),
        // Slot 'setBackgroundType'
        QtMocHelpers::SlotData<void(DStyledItemDelegate::BackgroundType)>(35, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 36, 37 },
        }}),
        // Slot 'setItemMargins'
        QtMocHelpers::SlotData<void(const QMargins &)>(38, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 39, 40 },
        }}),
        // Slot 'setItemSize'
        QtMocHelpers::SlotData<void(QSize)>(41, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 42, 43 },
        }}),
        // Slot 'setItemSpacing'
        QtMocHelpers::SlotData<void(int)>(44, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::Int, 45 },
        }}),
        // Slot 'setItemRadius'
        QtMocHelpers::SlotData<void(int)>(46, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::Int, 47 },
        }}),
    };
    QtMocHelpers::UintData qt_properties {
        // property 'count'
        QtMocHelpers::PropertyData<int>(21, QMetaType::Int, QMC::DefaultPropertyFlags, 0),
        // property 'orientation'
        QtMocHelpers::PropertyData<Qt::Orientation>(5, 0x80000000 | 4, QMC::DefaultPropertyFlags | QMC::EnumOrFlag, 1),
        // property 'backgroundType'
        QtMocHelpers::PropertyData<DStyledItemDelegate::BackgroundType>(37, 0x80000000 | 36, QMC::DefaultPropertyFlags | QMC::Writable | QMC::EnumOrFlag | QMC::StdCppSet),
        // property 'itemMargins'
        QtMocHelpers::PropertyData<QMargins>(40, 0x80000000 | 39, QMC::DefaultPropertyFlags | QMC::Writable | QMC::EnumOrFlag | QMC::StdCppSet),
        // property 'itemSize'
        QtMocHelpers::PropertyData<QSize>(43, 0x80000000 | 42, QMC::DefaultPropertyFlags | QMC::Writable | QMC::EnumOrFlag | QMC::StdCppSet),
    };
    QtMocHelpers::UintData qt_enums {
    };
    return QtMocHelpers::metaObjectData<DListView, qt_meta_tag_ZN3Dtk6Widget9DListViewE_t>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums);
}
Q_CONSTINIT static const QMetaObject::SuperData qt_meta_extradata_ZN3Dtk6Widget9DListViewE[] = {
    QMetaObject::SuperData::link<Dtk::Widget::DStyledItemDelegate::staticMetaObject>(),
    nullptr
};

Q_CONSTINIT const QMetaObject Dtk::Widget::DListView::staticMetaObject = { {
    QMetaObject::SuperData::link<QListView::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN3Dtk6Widget9DListViewE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN3Dtk6Widget9DListViewE_t>.data,
    qt_static_metacall,
    qt_meta_extradata_ZN3Dtk6Widget9DListViewE,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN3Dtk6Widget9DListViewE_t>.metaTypes,
    nullptr
} };

void Dtk::Widget::DListView::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<DListView *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->rowCountChanged(); break;
        case 1: _t->orientationChanged((*reinterpret_cast<std::add_pointer_t<Qt::Orientation>>(_a[1]))); break;
        case 2: _t->currentChanged((*reinterpret_cast<std::add_pointer_t<QModelIndex>>(_a[1]))); break;
        case 3: _t->triggerEdit((*reinterpret_cast<std::add_pointer_t<QModelIndex>>(_a[1]))); break;
        case 4: { bool _r = _t->addItem((*reinterpret_cast<std::add_pointer_t<QVariant>>(_a[1])));
            if (_a[0]) *reinterpret_cast<bool*>(_a[0]) = std::move(_r); }  break;
        case 5: { bool _r = _t->addItems((*reinterpret_cast<std::add_pointer_t<QVariantList>>(_a[1])));
            if (_a[0]) *reinterpret_cast<bool*>(_a[0]) = std::move(_r); }  break;
        case 6: { bool _r = _t->insertItem((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QVariant>>(_a[2])));
            if (_a[0]) *reinterpret_cast<bool*>(_a[0]) = std::move(_r); }  break;
        case 7: { bool _r = _t->insertItems((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QVariantList>>(_a[2])));
            if (_a[0]) *reinterpret_cast<bool*>(_a[0]) = std::move(_r); }  break;
        case 8: { bool _r = _t->removeItem((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])));
            if (_a[0]) *reinterpret_cast<bool*>(_a[0]) = std::move(_r); }  break;
        case 9: { bool _r = _t->removeItems((*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;
        case 10: { int _r = _t->addHeaderWidget((*reinterpret_cast<std::add_pointer_t<QWidget*>>(_a[1])));
            if (_a[0]) *reinterpret_cast<int*>(_a[0]) = std::move(_r); }  break;
        case 11: _t->removeHeaderWidget((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
        case 12: { QWidget* _r = _t->takeHeaderWidget((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])));
            if (_a[0]) *reinterpret_cast<QWidget**>(_a[0]) = std::move(_r); }  break;
        case 13: { int _r = _t->addFooterWidget((*reinterpret_cast<std::add_pointer_t<QWidget*>>(_a[1])));
            if (_a[0]) *reinterpret_cast<int*>(_a[0]) = std::move(_r); }  break;
        case 14: _t->removeFooterWidget((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
        case 15: { QWidget* _r = _t->takeFooterWidget((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])));
            if (_a[0]) *reinterpret_cast<QWidget**>(_a[0]) = std::move(_r); }  break;
        case 16: _t->setOrientation((*reinterpret_cast<std::add_pointer_t<QListView::Flow>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<bool>>(_a[2]))); break;
        case 17: _t->edit((*reinterpret_cast<std::add_pointer_t<QModelIndex>>(_a[1]))); break;
        case 18: _t->setBackgroundType((*reinterpret_cast<std::add_pointer_t<DStyledItemDelegate::BackgroundType>>(_a[1]))); break;
        case 19: _t->setItemMargins((*reinterpret_cast<std::add_pointer_t<QMargins>>(_a[1]))); break;
        case 20: _t->setItemSize((*reinterpret_cast<std::add_pointer_t<QSize>>(_a[1]))); break;
        case 21: _t->setItemSpacing((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
        case 22: _t->setItemRadius((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
        default: ;
        }
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        switch (_id) {
        default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
        case 10:
            switch (*reinterpret_cast<int*>(_a[1])) {
            default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
            case 0:
                *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType::fromType< QWidget* >(); break;
            }
            break;
        case 13:
            switch (*reinterpret_cast<int*>(_a[1])) {
            default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
            case 0:
                *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType::fromType< QWidget* >(); break;
            }
            break;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (DListView::*)()>(_a, &DListView::rowCountChanged, 0))
            return;
        if (QtMocHelpers::indexOfMethod<void (DListView::*)(Qt::Orientation )>(_a, &DListView::orientationChanged, 1))
            return;
        if (QtMocHelpers::indexOfMethod<void (DListView::*)(const QModelIndex & )>(_a, &DListView::currentChanged, 2))
            return;
        if (QtMocHelpers::indexOfMethod<void (DListView::*)(const QModelIndex & )>(_a, &DListView::triggerEdit, 3))
            return;
    }
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<int*>(_v) = _t->count(); break;
        case 1: *reinterpret_cast<Qt::Orientation*>(_v) = _t->orientation(); break;
        case 2: *reinterpret_cast<DStyledItemDelegate::BackgroundType*>(_v) = _t->backgroundType(); break;
        case 3: *reinterpret_cast<QMargins*>(_v) = _t->itemMargins(); break;
        case 4: *reinterpret_cast<QSize*>(_v) = _t->itemSize(); break;
        default: break;
        }
    }
    if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 2: _t->setBackgroundType(*reinterpret_cast<DStyledItemDelegate::BackgroundType*>(_v)); break;
        case 3: _t->setItemMargins(*reinterpret_cast<QMargins*>(_v)); break;
        case 4: _t->setItemSize(*reinterpret_cast<QSize*>(_v)); break;
        default: break;
        }
    }
}

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

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

int Dtk::Widget::DListView::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QListView::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 23)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 23;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 23)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 23;
    }
    if (_c == QMetaObject::ReadProperty || _c == QMetaObject::WriteProperty
            || _c == QMetaObject::ResetProperty || _c == QMetaObject::BindableProperty
            || _c == QMetaObject::RegisterPropertyMetaType) {
        qt_static_metacall(this, _c, _id, _a);
        _id -= 5;
    }
    return _id;
}

// SIGNAL 0
void Dtk::Widget::DListView::rowCountChanged()
{
    QMetaObject::activate(this, &staticMetaObject, 0, nullptr);
}

// SIGNAL 1
void Dtk::Widget::DListView::orientationChanged(Qt::Orientation _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 1, nullptr, _t1);
}

// SIGNAL 2
void Dtk::Widget::DListView::currentChanged(const QModelIndex & _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 2, nullptr, _t1);
}

// SIGNAL 3
void Dtk::Widget::DListView::triggerEdit(const QModelIndex & _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 3, nullptr, _t1);
}
QT_WARNING_POP
