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

#include "../../../../src/workspace/workspacemodel.h"
#include <woutput.h>
#include <output/output.h>
#include "core/rootsurfacecontainer.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 'workspacemodel.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 69
#error "This file was generated using the moc from 6.11.1. 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_ZN14WorkspaceModelE_t {};
} // unnamed namespace

template <> constexpr inline auto WorkspaceModel::qt_create_metaobjectdata<qt_meta_tag_ZN14WorkspaceModelE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "WorkspaceModel",
        "QML.Element",
        "auto",
        "QML.Creatable",
        "false",
        "QML.UncreatableReason",
        "Created only in C++",
        "nameChanged",
        "",
        "indexChanged",
        "visibleChanged",
        "opaqueChanged",
        "latestActiveSurface",
        "SurfaceWrapper*",
        "activePenultimateWindow",
        "findNextActivedSurface",
        "id",
        "name",
        "visible",
        "opaque"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'nameChanged'
        QtMocHelpers::SignalData<void()>(7, 8, QMC::AccessPublic, QMetaType::Void),
        // Signal 'indexChanged'
        QtMocHelpers::SignalData<void()>(9, 8, QMC::AccessPublic, QMetaType::Void),
        // Signal 'visibleChanged'
        QtMocHelpers::SignalData<void()>(10, 8, QMC::AccessPublic, QMetaType::Void),
        // Signal 'opaqueChanged'
        QtMocHelpers::SignalData<void()>(11, 8, QMC::AccessPublic, QMetaType::Void),
        // Method 'latestActiveSurface'
        QtMocHelpers::MethodData<SurfaceWrapper *() const>(12, 8, QMC::AccessPublic, 0x80000000 | 13),
        // Method 'activePenultimateWindow'
        QtMocHelpers::MethodData<SurfaceWrapper *() const>(14, 8, QMC::AccessPublic, 0x80000000 | 13),
        // Method 'findNextActivedSurface'
        QtMocHelpers::MethodData<SurfaceWrapper *() const>(15, 8, QMC::AccessPublic, 0x80000000 | 13),
    };
    QtMocHelpers::UintData qt_properties {
        // property 'id'
        QtMocHelpers::PropertyData<int>(16, QMetaType::Int, QMC::DefaultPropertyFlags | QMC::Constant | QMC::Final),
        // property 'name'
        QtMocHelpers::PropertyData<QString>(17, QMetaType::QString, QMC::DefaultPropertyFlags | QMC::Writable | QMC::StdCppSet | QMC::Final, 0),
        // property 'visible'
        QtMocHelpers::PropertyData<bool>(18, QMetaType::Bool, QMC::DefaultPropertyFlags | QMC::Writable | QMC::StdCppSet | QMC::Final, 2),
        // property 'opaque'
        QtMocHelpers::PropertyData<bool>(19, QMetaType::Bool, QMC::DefaultPropertyFlags | QMC::Writable | QMC::StdCppSet | QMC::Final, 3),
    };
    QtMocHelpers::UintData qt_enums {
    };
    QtMocHelpers::UintData qt_constructors {};
    QtMocHelpers::ClassInfos qt_classinfo({
            {    1,    2 },
            {    3,    4 },
            {    5,    6 },
    });
    return QtMocHelpers::metaObjectData<WorkspaceModel, void>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums, qt_constructors, qt_classinfo);
}
Q_CONSTINIT const QMetaObject WorkspaceModel::staticMetaObject = { {
    QMetaObject::SuperData::link<SurfaceListModel::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN14WorkspaceModelE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN14WorkspaceModelE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN14WorkspaceModelE_t>.metaTypes,
    nullptr
} };

void WorkspaceModel::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<WorkspaceModel *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->nameChanged(); break;
        case 1: _t->indexChanged(); break;
        case 2: _t->visibleChanged(); break;
        case 3: _t->opaqueChanged(); break;
        case 4: { SurfaceWrapper* _r = _t->latestActiveSurface();
            if (_a[0]) *reinterpret_cast<SurfaceWrapper**>(_a[0]) = std::move(_r); }  break;
        case 5: { SurfaceWrapper* _r = _t->activePenultimateWindow();
            if (_a[0]) *reinterpret_cast<SurfaceWrapper**>(_a[0]) = std::move(_r); }  break;
        case 6: { SurfaceWrapper* _r = _t->findNextActivedSurface();
            if (_a[0]) *reinterpret_cast<SurfaceWrapper**>(_a[0]) = std::move(_r); }  break;
        default: ;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (WorkspaceModel::*)()>(_a, &WorkspaceModel::nameChanged, 0))
            return;
        if (QtMocHelpers::indexOfMethod<void (WorkspaceModel::*)()>(_a, &WorkspaceModel::indexChanged, 1))
            return;
        if (QtMocHelpers::indexOfMethod<void (WorkspaceModel::*)()>(_a, &WorkspaceModel::visibleChanged, 2))
            return;
        if (QtMocHelpers::indexOfMethod<void (WorkspaceModel::*)()>(_a, &WorkspaceModel::opaqueChanged, 3))
            return;
    }
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<int*>(_v) = _t->id(); break;
        case 1: *reinterpret_cast<QString*>(_v) = _t->name(); break;
        case 2: *reinterpret_cast<bool*>(_v) = _t->visible(); break;
        case 3: *reinterpret_cast<bool*>(_v) = _t->opaque(); break;
        default: break;
        }
    }
    if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 1: _t->setName(*reinterpret_cast<QString*>(_v)); break;
        case 2: _t->setVisible(*reinterpret_cast<bool*>(_v)); break;
        case 3: _t->setOpaque(*reinterpret_cast<bool*>(_v)); break;
        default: break;
        }
    }
}

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

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

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

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

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

// SIGNAL 2
void WorkspaceModel::visibleChanged()
{
    QMetaObject::activate(this, &staticMetaObject, 2, nullptr);
}

// SIGNAL 3
void WorkspaceModel::opaqueChanged()
{
    QMetaObject::activate(this, &staticMetaObject, 3, nullptr);
}
QT_WARNING_POP
