/****************************************************************************
** Meta object code from reading C++ file 'powerinterface.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 "../../../../../dde-control-center/src/plugin-power/operation/powerinterface.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 'powerinterface.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_ZN14PowerInterfaceE_t {};
} // unnamed namespace

template <> constexpr inline auto PowerInterface::qt_create_metaobjectdata<qt_meta_tag_ZN14PowerInterfaceE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "PowerInterface",
        "powerModelChanged",
        "",
        "PowerModel*",
        "model",
        "powerWorkerChanged",
        "PowerWorker*",
        "worker",
        "indexByValueOnModel",
        "QAbstractListModel*",
        "targetValue",
        "indexByValueOnMap",
        "QVariantList",
        "dataMap",
        "platformName",
        "powerLidModel",
        "PowerOperatorModel*",
        "powerPressModel",
        "batteryLidModel",
        "batteryPressModel"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'powerModelChanged'
        QtMocHelpers::SignalData<void(PowerModel *)>(1, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 3, 4 },
        }}),
        // Signal 'powerWorkerChanged'
        QtMocHelpers::SignalData<void(PowerWorker *)>(5, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 6, 7 },
        }}),
        // Method 'indexByValueOnModel'
        QtMocHelpers::MethodData<int(QAbstractListModel *, int)>(8, 2, QMC::AccessPublic, QMetaType::Int, {{
            { 0x80000000 | 9, 4 }, { QMetaType::Int, 10 },
        }}),
        // Method 'indexByValueOnMap'
        QtMocHelpers::MethodData<int(const QVariantList &, int)>(11, 2, QMC::AccessPublic, QMetaType::Int, {{
            { 0x80000000 | 12, 13 }, { QMetaType::Int, 10 },
        }}),
        // Method 'platformName'
        QtMocHelpers::MethodData<QString()>(14, 2, QMC::AccessPublic, QMetaType::QString),
    };
    QtMocHelpers::UintData qt_properties {
        // property 'model'
        QtMocHelpers::PropertyData<PowerModel*>(4, 0x80000000 | 3, QMC::DefaultPropertyFlags | QMC::EnumOrFlag, 0),
        // property 'worker'
        QtMocHelpers::PropertyData<PowerWorker*>(7, 0x80000000 | 6, QMC::DefaultPropertyFlags | QMC::EnumOrFlag, 1),
        // property 'powerLidModel'
        QtMocHelpers::PropertyData<PowerOperatorModel*>(15, 0x80000000 | 16, QMC::DefaultPropertyFlags | QMC::EnumOrFlag | QMC::Constant),
        // property 'powerPressModel'
        QtMocHelpers::PropertyData<PowerOperatorModel*>(17, 0x80000000 | 16, QMC::DefaultPropertyFlags | QMC::EnumOrFlag | QMC::Constant),
        // property 'batteryLidModel'
        QtMocHelpers::PropertyData<PowerOperatorModel*>(18, 0x80000000 | 16, QMC::DefaultPropertyFlags | QMC::EnumOrFlag | QMC::Constant),
        // property 'batteryPressModel'
        QtMocHelpers::PropertyData<PowerOperatorModel*>(19, 0x80000000 | 16, QMC::DefaultPropertyFlags | QMC::EnumOrFlag | QMC::Constant),
    };
    QtMocHelpers::UintData qt_enums {
    };
    return QtMocHelpers::metaObjectData<PowerInterface, qt_meta_tag_ZN14PowerInterfaceE_t>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums);
}
Q_CONSTINIT const QMetaObject PowerInterface::staticMetaObject = { {
    QMetaObject::SuperData::link<QObject::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN14PowerInterfaceE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN14PowerInterfaceE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN14PowerInterfaceE_t>.metaTypes,
    nullptr
} };

void PowerInterface::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<PowerInterface *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->powerModelChanged((*reinterpret_cast<std::add_pointer_t<PowerModel*>>(_a[1]))); break;
        case 1: _t->powerWorkerChanged((*reinterpret_cast<std::add_pointer_t<PowerWorker*>>(_a[1]))); break;
        case 2: { int _r = _t->indexByValueOnModel((*reinterpret_cast<std::add_pointer_t<QAbstractListModel*>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<int>>(_a[2])));
            if (_a[0]) *reinterpret_cast<int*>(_a[0]) = std::move(_r); }  break;
        case 3: { int _r = _t->indexByValueOnMap((*reinterpret_cast<std::add_pointer_t<QVariantList>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<int>>(_a[2])));
            if (_a[0]) *reinterpret_cast<int*>(_a[0]) = std::move(_r); }  break;
        case 4: { QString _r = _t->platformName();
            if (_a[0]) *reinterpret_cast<QString*>(_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< PowerModel* >(); 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< PowerWorker* >(); break;
            }
            break;
        case 2:
            switch (*reinterpret_cast<int*>(_a[1])) {
            default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
            case 0:
                *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType::fromType< QAbstractListModel* >(); break;
            }
            break;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (PowerInterface::*)(PowerModel * )>(_a, &PowerInterface::powerModelChanged, 0))
            return;
        if (QtMocHelpers::indexOfMethod<void (PowerInterface::*)(PowerWorker * )>(_a, &PowerInterface::powerWorkerChanged, 1))
            return;
    }
    if (_c == QMetaObject::RegisterPropertyMetaType) {
        switch (_id) {
        default: *reinterpret_cast<int*>(_a[0]) = -1; break;
        case 0:
            *reinterpret_cast<int*>(_a[0]) = qRegisterMetaType< PowerModel* >(); break;
        case 5:
        case 4:
        case 3:
        case 2:
            *reinterpret_cast<int*>(_a[0]) = qRegisterMetaType< PowerOperatorModel* >(); break;
        case 1:
            *reinterpret_cast<int*>(_a[0]) = qRegisterMetaType< PowerWorker* >(); break;
        }
    }
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<PowerModel**>(_v) = _t->getModel(); break;
        case 1: *reinterpret_cast<PowerWorker**>(_v) = _t->getWorker(); break;
        case 2: *reinterpret_cast<PowerOperatorModel**>(_v) = _t->m_powerLidClosedOperatorModel; break;
        case 3: *reinterpret_cast<PowerOperatorModel**>(_v) = _t->m_powerPressedOperatorModel; break;
        case 4: *reinterpret_cast<PowerOperatorModel**>(_v) = _t->m_batteryLidClosedOperatorModel; break;
        case 5: *reinterpret_cast<PowerOperatorModel**>(_v) = _t->m_batteryPressedOperatorModel; break;
        default: break;
        }
    }
}

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

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

int PowerInterface::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 < 5)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 5;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 5)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 5;
    }
    if (_c == QMetaObject::ReadProperty || _c == QMetaObject::WriteProperty
            || _c == QMetaObject::ResetProperty || _c == QMetaObject::BindableProperty
            || _c == QMetaObject::RegisterPropertyMetaType) {
        qt_static_metacall(this, _c, _id, _a);
        _id -= 6;
    }
    return _id;
}

// SIGNAL 0
void PowerInterface::powerModelChanged(PowerModel * _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 0, nullptr, _t1);
}

// SIGNAL 1
void PowerInterface::powerWorkerChanged(PowerWorker * _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 1, nullptr, _t1);
}
QT_WARNING_POP
