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

template <> constexpr inline auto Dtk::Power::DPowerDevice::qt_create_metaobjectdata<qt_meta_tag_ZN3Dtk5Power12DPowerDeviceE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "Dtk::Power::DPowerDevice",
        "updateTimeChanged",
        "",
        "value",
        "percentageChanged",
        "timeToEmptyChanged",
        "timeToFullChanged",
        "energyRateChanged",
        "energyChanged",
        "iconNameChanged",
        "history",
        "DExpected<PowerHistoryList>",
        "type",
        "timespan",
        "resolution",
        "statistics",
        "DExpected<PowerStatisticList>",
        "refresh",
        "DExpected<void>",
        "hasHistory",
        "hasStatistics",
        "isPresent",
        "isRechargeable",
        "online",
        "powerSupply",
        "capacity",
        "energy",
        "energyEmpty",
        "energyFull",
        "energyFullDesign",
        "energyRate",
        "luminosity",
        "percentage",
        "temperature",
        "voltage",
        "chargeCycles",
        "timeToEmpty",
        "timeToFull",
        "iconName",
        "model",
        "nativePath",
        "serial",
        "vendor",
        "batteryLevel",
        "state",
        "technology",
        "warningLevel",
        "updateTime",
        "deviceName"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'updateTimeChanged'
        QtMocHelpers::SignalData<void(const QDateTime &)>(1, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::QDateTime, 3 },
        }}),
        // Signal 'percentageChanged'
        QtMocHelpers::SignalData<void(const double)>(4, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::Double, 3 },
        }}),
        // Signal 'timeToEmptyChanged'
        QtMocHelpers::SignalData<void(const qint64)>(5, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::LongLong, 3 },
        }}),
        // Signal 'timeToFullChanged'
        QtMocHelpers::SignalData<void(const qint64)>(6, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::LongLong, 3 },
        }}),
        // Signal 'energyRateChanged'
        QtMocHelpers::SignalData<void(const double)>(7, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::Double, 3 },
        }}),
        // Signal 'energyChanged'
        QtMocHelpers::SignalData<void(const double)>(8, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::Double, 3 },
        }}),
        // Signal 'iconNameChanged'
        QtMocHelpers::SignalData<void(const QString &)>(9, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::QString, 3 },
        }}),
        // Slot 'history'
        QtMocHelpers::SlotData<DExpected<PowerHistoryList>(const QString &, const uint, const uint) const>(10, 2, QMC::AccessPublic, 0x80000000 | 11, {{
            { QMetaType::QString, 12 }, { QMetaType::UInt, 13 }, { QMetaType::UInt, 14 },
        }}),
        // Slot 'statistics'
        QtMocHelpers::SlotData<DExpected<PowerStatisticList>(const QString &) const>(15, 2, QMC::AccessPublic, 0x80000000 | 16, {{
            { QMetaType::QString, 12 },
        }}),
        // Slot 'refresh'
        QtMocHelpers::SlotData<DExpected<void>()>(17, 2, QMC::AccessPublic, 0x80000000 | 18),
    };
    QtMocHelpers::UintData qt_properties {
        // property 'hasHistory'
        QtMocHelpers::PropertyData<bool>(19, QMetaType::Bool, QMC::DefaultPropertyFlags),
        // property 'hasStatistics'
        QtMocHelpers::PropertyData<bool>(20, QMetaType::Bool, QMC::DefaultPropertyFlags),
        // property 'isPresent'
        QtMocHelpers::PropertyData<bool>(21, QMetaType::Bool, QMC::DefaultPropertyFlags),
        // property 'isRechargeable'
        QtMocHelpers::PropertyData<bool>(22, QMetaType::Bool, QMC::DefaultPropertyFlags),
        // property 'online'
        QtMocHelpers::PropertyData<bool>(23, QMetaType::Bool, QMC::DefaultPropertyFlags),
        // property 'powerSupply'
        QtMocHelpers::PropertyData<bool>(24, QMetaType::Bool, QMC::DefaultPropertyFlags),
        // property 'capacity'
        QtMocHelpers::PropertyData<double>(25, QMetaType::Double, QMC::DefaultPropertyFlags),
        // property 'energy'
        QtMocHelpers::PropertyData<double>(26, QMetaType::Double, QMC::DefaultPropertyFlags, 5),
        // property 'energyEmpty'
        QtMocHelpers::PropertyData<double>(27, QMetaType::Double, QMC::DefaultPropertyFlags),
        // property 'energyFull'
        QtMocHelpers::PropertyData<double>(28, QMetaType::Double, QMC::DefaultPropertyFlags),
        // property 'energyFullDesign'
        QtMocHelpers::PropertyData<double>(29, QMetaType::Double, QMC::DefaultPropertyFlags),
        // property 'energyRate'
        QtMocHelpers::PropertyData<double>(30, QMetaType::Double, QMC::DefaultPropertyFlags, 4),
        // property 'luminosity'
        QtMocHelpers::PropertyData<double>(31, QMetaType::Double, QMC::DefaultPropertyFlags),
        // property 'percentage'
        QtMocHelpers::PropertyData<double>(32, QMetaType::Double, QMC::DefaultPropertyFlags, 1),
        // property 'temperature'
        QtMocHelpers::PropertyData<double>(33, QMetaType::Double, QMC::DefaultPropertyFlags),
        // property 'voltage'
        QtMocHelpers::PropertyData<double>(34, QMetaType::Double, QMC::DefaultPropertyFlags),
        // property 'chargeCycles'
        QtMocHelpers::PropertyData<uint>(35, QMetaType::UInt, QMC::DefaultPropertyFlags),
        // property 'timeToEmpty'
        QtMocHelpers::PropertyData<qint64>(36, QMetaType::LongLong, QMC::DefaultPropertyFlags, 2),
        // property 'timeToFull'
        QtMocHelpers::PropertyData<qint64>(37, QMetaType::LongLong, QMC::DefaultPropertyFlags, 3),
        // property 'iconName'
        QtMocHelpers::PropertyData<QString>(38, QMetaType::QString, QMC::DefaultPropertyFlags, 6),
        // property 'model'
        QtMocHelpers::PropertyData<QString>(39, QMetaType::QString, QMC::DefaultPropertyFlags),
        // property 'nativePath'
        QtMocHelpers::PropertyData<QString>(40, QMetaType::QString, QMC::DefaultPropertyFlags),
        // property 'serial'
        QtMocHelpers::PropertyData<QString>(41, QMetaType::QString, QMC::DefaultPropertyFlags),
        // property 'vendor'
        QtMocHelpers::PropertyData<QString>(42, QMetaType::QString, QMC::DefaultPropertyFlags),
        // property 'batteryLevel'
        QtMocHelpers::PropertyData<uint>(43, QMetaType::UInt, QMC::DefaultPropertyFlags),
        // property 'state'
        QtMocHelpers::PropertyData<uint>(44, QMetaType::UInt, QMC::DefaultPropertyFlags),
        // property 'technology'
        QtMocHelpers::PropertyData<uint>(45, QMetaType::UInt, QMC::DefaultPropertyFlags),
        // property 'type'
        QtMocHelpers::PropertyData<uint>(12, QMetaType::UInt, QMC::DefaultPropertyFlags),
        // property 'warningLevel'
        QtMocHelpers::PropertyData<uint>(46, QMetaType::UInt, QMC::DefaultPropertyFlags),
        // property 'updateTime'
        QtMocHelpers::PropertyData<QDateTime>(47, QMetaType::QDateTime, QMC::DefaultPropertyFlags, 0),
        // property 'deviceName'
        QtMocHelpers::PropertyData<QString>(48, QMetaType::QString, QMC::DefaultPropertyFlags),
    };
    QtMocHelpers::UintData qt_enums {
    };
    return QtMocHelpers::metaObjectData<DPowerDevice, qt_meta_tag_ZN3Dtk5Power12DPowerDeviceE_t>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums);
}
Q_CONSTINIT const QMetaObject Dtk::Power::DPowerDevice::staticMetaObject = { {
    QMetaObject::SuperData::link<QObject::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN3Dtk5Power12DPowerDeviceE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN3Dtk5Power12DPowerDeviceE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN3Dtk5Power12DPowerDeviceE_t>.metaTypes,
    nullptr
} };

void Dtk::Power::DPowerDevice::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<DPowerDevice *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->updateTimeChanged((*reinterpret_cast<std::add_pointer_t<QDateTime>>(_a[1]))); break;
        case 1: _t->percentageChanged((*reinterpret_cast<std::add_pointer_t<double>>(_a[1]))); break;
        case 2: _t->timeToEmptyChanged((*reinterpret_cast<std::add_pointer_t<qint64>>(_a[1]))); break;
        case 3: _t->timeToFullChanged((*reinterpret_cast<std::add_pointer_t<qint64>>(_a[1]))); break;
        case 4: _t->energyRateChanged((*reinterpret_cast<std::add_pointer_t<double>>(_a[1]))); break;
        case 5: _t->energyChanged((*reinterpret_cast<std::add_pointer_t<double>>(_a[1]))); break;
        case 6: _t->iconNameChanged((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1]))); break;
        case 7: { DExpected<PowerHistoryList> _r = _t->history((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<uint>>(_a[2])),(*reinterpret_cast<std::add_pointer_t<uint>>(_a[3])));
            if (_a[0]) *reinterpret_cast<DExpected<PowerHistoryList>*>(_a[0]) = std::move(_r); }  break;
        case 8: { DExpected<PowerStatisticList> _r = _t->statistics((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])));
            if (_a[0]) *reinterpret_cast<DExpected<PowerStatisticList>*>(_a[0]) = std::move(_r); }  break;
        case 9: { 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 (DPowerDevice::*)(const QDateTime & )>(_a, &DPowerDevice::updateTimeChanged, 0))
            return;
        if (QtMocHelpers::indexOfMethod<void (DPowerDevice::*)(const double )>(_a, &DPowerDevice::percentageChanged, 1))
            return;
        if (QtMocHelpers::indexOfMethod<void (DPowerDevice::*)(const qint64 )>(_a, &DPowerDevice::timeToEmptyChanged, 2))
            return;
        if (QtMocHelpers::indexOfMethod<void (DPowerDevice::*)(const qint64 )>(_a, &DPowerDevice::timeToFullChanged, 3))
            return;
        if (QtMocHelpers::indexOfMethod<void (DPowerDevice::*)(const double )>(_a, &DPowerDevice::energyRateChanged, 4))
            return;
        if (QtMocHelpers::indexOfMethod<void (DPowerDevice::*)(const double )>(_a, &DPowerDevice::energyChanged, 5))
            return;
        if (QtMocHelpers::indexOfMethod<void (DPowerDevice::*)(const QString & )>(_a, &DPowerDevice::iconNameChanged, 6))
            return;
    }
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<bool*>(_v) = _t->hasHistory(); break;
        case 1: *reinterpret_cast<bool*>(_v) = _t->hasStatistics(); break;
        case 2: *reinterpret_cast<bool*>(_v) = _t->isPresent(); break;
        case 3: *reinterpret_cast<bool*>(_v) = _t->isRechargeable(); break;
        case 4: *reinterpret_cast<bool*>(_v) = _t->online(); break;
        case 5: *reinterpret_cast<bool*>(_v) = _t->powerSupply(); break;
        case 6: *reinterpret_cast<double*>(_v) = _t->capacity(); break;
        case 7: *reinterpret_cast<double*>(_v) = _t->energy(); break;
        case 8: *reinterpret_cast<double*>(_v) = _t->energyEmpty(); break;
        case 9: *reinterpret_cast<double*>(_v) = _t->energyFull(); break;
        case 10: *reinterpret_cast<double*>(_v) = _t->energyFullDesign(); break;
        case 11: *reinterpret_cast<double*>(_v) = _t->energyRate(); break;
        case 12: *reinterpret_cast<double*>(_v) = _t->luminosity(); break;
        case 13: *reinterpret_cast<double*>(_v) = _t->percentage(); break;
        case 14: *reinterpret_cast<double*>(_v) = _t->temperature(); break;
        case 15: *reinterpret_cast<double*>(_v) = _t->voltage(); break;
        case 16: *reinterpret_cast<uint*>(_v) = _t->chargeCycles(); break;
        case 17: *reinterpret_cast<qint64*>(_v) = _t->timeToEmpty(); break;
        case 18: *reinterpret_cast<qint64*>(_v) = _t->timeToFull(); break;
        case 19: *reinterpret_cast<QString*>(_v) = _t->iconName(); break;
        case 20: *reinterpret_cast<QString*>(_v) = _t->model(); break;
        case 21: *reinterpret_cast<QString*>(_v) = _t->nativePath(); break;
        case 22: *reinterpret_cast<QString*>(_v) = _t->serial(); break;
        case 23: *reinterpret_cast<QString*>(_v) = _t->vendor(); break;
        case 24: *reinterpret_cast<uint*>(_v) = _t->batteryLevel(); break;
        case 25: *reinterpret_cast<uint*>(_v) = _t->state(); break;
        case 26: *reinterpret_cast<uint*>(_v) = _t->technology(); break;
        case 27: *reinterpret_cast<uint*>(_v) = _t->type(); break;
        case 28: *reinterpret_cast<uint*>(_v) = _t->warningLevel(); break;
        case 29: *reinterpret_cast<QDateTime*>(_v) = _t->updateTime(); break;
        case 30: *reinterpret_cast<QString*>(_v) = _t->deviceName(); break;
        default: break;
        }
    }
}

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

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

int Dtk::Power::DPowerDevice::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 < 10)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 10;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 10)
            *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
        _id -= 10;
    }
    if (_c == QMetaObject::ReadProperty || _c == QMetaObject::WriteProperty
            || _c == QMetaObject::ResetProperty || _c == QMetaObject::BindableProperty
            || _c == QMetaObject::RegisterPropertyMetaType) {
        qt_static_metacall(this, _c, _id, _a);
        _id -= 31;
    }
    return _id;
}

// SIGNAL 0
void Dtk::Power::DPowerDevice::updateTimeChanged(const QDateTime & _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 0, nullptr, _t1);
}

// SIGNAL 1
void Dtk::Power::DPowerDevice::percentageChanged(const double _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 1, nullptr, _t1);
}

// SIGNAL 2
void Dtk::Power::DPowerDevice::timeToEmptyChanged(const qint64 _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 2, nullptr, _t1);
}

// SIGNAL 3
void Dtk::Power::DPowerDevice::timeToFullChanged(const qint64 _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 3, nullptr, _t1);
}

// SIGNAL 4
void Dtk::Power::DPowerDevice::energyRateChanged(const double _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 4, nullptr, _t1);
}

// SIGNAL 5
void Dtk::Power::DPowerDevice::energyChanged(const double _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 5, nullptr, _t1);
}

// SIGNAL 6
void Dtk::Power::DPowerDevice::iconNameChanged(const QString & _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 6, nullptr, _t1);
}
QT_WARNING_POP
