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

#include "../../../include/power/dpowermanager.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 'dpowermanager.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 69
#error "This file was generated using the moc from 6.10.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_ZN3Dtk5Power13DPowerManagerE_t {};
} // unnamed namespace

template <> constexpr inline auto Dtk::Power::DPowerManager::qt_create_metaobjectdata<qt_meta_tag_ZN3Dtk5Power13DPowerManagerE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "Dtk::Power::DPowerManager",
        "deviceAdded",
        "",
        "name",
        "deviceRemoved",
        "lidIsClosedChanged",
        "value",
        "lidIsPresentChanged",
        "devices",
        "DExpected<QStringList>",
        "criticalAction",
        "DExpected<QString>",
        "refresh",
        "DExpected<void>",
        "lidIsClosed",
        "lidIsPresent",
        "hasBattery",
        "onBattery",
        "supportKbdBacklight",
        "daemonVersion"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'deviceAdded'
        QtMocHelpers::SignalData<void(const QString &)>(1, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::QString, 3 },
        }}),
        // Signal 'deviceRemoved'
        QtMocHelpers::SignalData<void(const QString &)>(4, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::QString, 3 },
        }}),
        // Signal 'lidIsClosedChanged'
        QtMocHelpers::SignalData<void(const bool &)>(5, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::Bool, 6 },
        }}),
        // Signal 'lidIsPresentChanged'
        QtMocHelpers::SignalData<void(const bool &)>(7, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::Bool, 6 },
        }}),
        // Slot 'devices'
        QtMocHelpers::SlotData<DExpected<QStringList>() const>(8, 2, QMC::AccessPublic, 0x80000000 | 9),
        // Slot 'criticalAction'
        QtMocHelpers::SlotData<DExpected<QString>() const>(10, 2, QMC::AccessPublic, 0x80000000 | 11),
        // Slot 'refresh'
        QtMocHelpers::SlotData<DExpected<void>()>(12, 2, QMC::AccessPublic, 0x80000000 | 13),
    };
    QtMocHelpers::UintData qt_properties {
        // property 'lidIsClosed'
        QtMocHelpers::PropertyData<bool>(14, QMetaType::Bool, QMC::DefaultPropertyFlags, 2),
        // property 'lidIsPresent'
        QtMocHelpers::PropertyData<bool>(15, QMetaType::Bool, QMC::DefaultPropertyFlags, 3),
        // property 'hasBattery'
        QtMocHelpers::PropertyData<bool>(16, QMetaType::Bool, QMC::DefaultPropertyFlags),
        // property 'onBattery'
        QtMocHelpers::PropertyData<bool>(17, QMetaType::Bool, QMC::DefaultPropertyFlags),
        // property 'supportKbdBacklight'
        QtMocHelpers::PropertyData<bool>(18, QMetaType::Bool, QMC::DefaultPropertyFlags),
        // property 'daemonVersion'
        QtMocHelpers::PropertyData<QString>(19, QMetaType::QString, QMC::DefaultPropertyFlags),
    };
    QtMocHelpers::UintData qt_enums {
    };
    return QtMocHelpers::metaObjectData<DPowerManager, qt_meta_tag_ZN3Dtk5Power13DPowerManagerE_t>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums);
}
Q_CONSTINIT const QMetaObject Dtk::Power::DPowerManager::staticMetaObject = { {
    QMetaObject::SuperData::link<QObject::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN3Dtk5Power13DPowerManagerE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN3Dtk5Power13DPowerManagerE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN3Dtk5Power13DPowerManagerE_t>.metaTypes,
    nullptr
} };

void Dtk::Power::DPowerManager::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<DPowerManager *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->deviceAdded((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1]))); break;
        case 1: _t->deviceRemoved((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1]))); break;
        case 2: _t->lidIsClosedChanged((*reinterpret_cast<std::add_pointer_t<bool>>(_a[1]))); break;
        case 3: _t->lidIsPresentChanged((*reinterpret_cast<std::add_pointer_t<bool>>(_a[1]))); break;
        case 4: { DExpected<QStringList> _r = _t->devices();
            if (_a[0]) *reinterpret_cast<DExpected<QStringList>*>(_a[0]) = std::move(_r); }  break;
        case 5: { DExpected<QString> _r = _t->criticalAction();
            if (_a[0]) *reinterpret_cast<DExpected<QString>*>(_a[0]) = std::move(_r); }  break;
        case 6: { DExpected<void> _r = _t->refresh();
            if (_a[0]) *reinterpret_cast<DExpected<void>*>(_a[0]) = std::move(_r); }  break;
        default: ;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (DPowerManager::*)(const QString & )>(_a, &DPowerManager::deviceAdded, 0))
            return;
        if (QtMocHelpers::indexOfMethod<void (DPowerManager::*)(const QString & )>(_a, &DPowerManager::deviceRemoved, 1))
            return;
        if (QtMocHelpers::indexOfMethod<void (DPowerManager::*)(const bool & )>(_a, &DPowerManager::lidIsClosedChanged, 2))
            return;
        if (QtMocHelpers::indexOfMethod<void (DPowerManager::*)(const bool & )>(_a, &DPowerManager::lidIsPresentChanged, 3))
            return;
    }
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<bool*>(_v) = _t->lidIsClosed(); break;
        case 1: *reinterpret_cast<bool*>(_v) = _t->lidIsPresent(); break;
        case 2: *reinterpret_cast<bool*>(_v) = _t->hasBattery(); break;
        case 3: *reinterpret_cast<bool*>(_v) = _t->onBattery(); break;
        case 4: *reinterpret_cast<bool*>(_v) = _t->supportKbdBacklight(); break;
        case 5: *reinterpret_cast<QString*>(_v) = _t->daemonVersion(); break;
        default: break;
        }
    }
}

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

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

int Dtk::Power::DPowerManager::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 < 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 -= 6;
    }
    return _id;
}

// SIGNAL 0
void Dtk::Power::DPowerManager::deviceAdded(const QString & _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 0, nullptr, _t1);
}

// SIGNAL 1
void Dtk::Power::DPowerManager::deviceRemoved(const QString & _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 1, nullptr, _t1);
}

// SIGNAL 2
void Dtk::Power::DPowerManager::lidIsClosedChanged(const bool & _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 2, nullptr, _t1);
}

// SIGNAL 3
void Dtk::Power::DPowerManager::lidIsPresentChanged(const bool & _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 3, nullptr, _t1);
}
QT_WARNING_POP
