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

#include "../../../../tokodon-26.07.90/src/datatypes/attachment.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 'attachment.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 69
#error "This file was generated using the moc from 6.12.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_ZN10AttachmentE_t {};
} // unnamed namespace

template <> constexpr inline auto Attachment::qt_create_metaobjectdata<qt_meta_tag_ZN10AttachmentE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "Attachment",
        "QML.Element",
        "auto",
        "QML.Creatable",
        "false",
        "QML.UncreatableReason",
        "Access via Post",
        "focusXChanged",
        "",
        "focusYChanged",
        "copyToClipboard",
        "id",
        "attachmentType",
        "AttachmentType",
        "type",
        "previewUrl",
        "source",
        "remoteUrl",
        "caption",
        "tempSource",
        "QUrl",
        "sourceWidth",
        "sourceHeight",
        "focusX",
        "focusY",
        "attributes",
        "QJsonObject",
        "Unknown",
        "Image",
        "GifV",
        "Video",
        "Audio"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'focusXChanged'
        QtMocHelpers::SignalData<void()>(7, 8, QMC::AccessPublic, QMetaType::Void),
        // Signal 'focusYChanged'
        QtMocHelpers::SignalData<void()>(9, 8, QMC::AccessPublic, QMetaType::Void),
        // Method 'copyToClipboard'
        QtMocHelpers::MethodData<void()>(10, 8, QMC::AccessPublic, QMetaType::Void),
    };
    QtMocHelpers::UintData qt_properties {
        // property 'id'
        QtMocHelpers::PropertyData<QString>(11, QMetaType::QString, QMC::DefaultPropertyFlags | QMC::Constant),
        // property 'attachmentType'
        QtMocHelpers::PropertyData<enum AttachmentType>(12, 0x80000000 | 13, QMC::DefaultPropertyFlags | QMC::EnumOrFlag | QMC::Constant),
        // property 'type'
        QtMocHelpers::PropertyData<int>(14, QMetaType::Int, QMC::DefaultPropertyFlags | QMC::Constant),
        // property 'previewUrl'
        QtMocHelpers::PropertyData<QString>(15, QMetaType::QString, QMC::DefaultPropertyFlags | QMC::Constant),
        // property 'source'
        QtMocHelpers::PropertyData<QString>(16, QMetaType::QString, QMC::DefaultPropertyFlags | QMC::Constant),
        // property 'remoteUrl'
        QtMocHelpers::PropertyData<QString>(17, QMetaType::QString, QMC::DefaultPropertyFlags | QMC::Constant),
        // property 'caption'
        QtMocHelpers::PropertyData<QString>(18, QMetaType::QString, QMC::DefaultPropertyFlags | QMC::Constant),
        // property 'tempSource'
        QtMocHelpers::PropertyData<QUrl>(19, 0x80000000 | 20, QMC::DefaultPropertyFlags | QMC::EnumOrFlag | QMC::Constant),
        // property 'sourceWidth'
        QtMocHelpers::PropertyData<int>(21, QMetaType::Int, QMC::DefaultPropertyFlags | QMC::Constant),
        // property 'sourceHeight'
        QtMocHelpers::PropertyData<int>(22, QMetaType::Int, QMC::DefaultPropertyFlags | QMC::Constant),
        // property 'focusX'
        QtMocHelpers::PropertyData<double>(23, QMetaType::Double, QMC::DefaultPropertyFlags | QMC::Writable | QMC::StdCppSet, 0),
        // property 'focusY'
        QtMocHelpers::PropertyData<double>(24, QMetaType::Double, QMC::DefaultPropertyFlags | QMC::Writable | QMC::StdCppSet, 1),
        // property 'attributes'
        QtMocHelpers::PropertyData<QJsonObject>(25, 0x80000000 | 26, QMC::DefaultPropertyFlags | QMC::EnumOrFlag),
    };
    QtMocHelpers::UintData qt_enums {
        // enum 'AttachmentType'
        QtMocHelpers::EnumData<enum AttachmentType>(13, 13, QMC::EnumFlags{}).add({
            {   27, AttachmentType::Unknown },
            {   28, AttachmentType::Image },
            {   29, AttachmentType::GifV },
            {   30, AttachmentType::Video },
            {   31, AttachmentType::Audio },
        }),
    };
    QtMocHelpers::UintData qt_constructors {};
    QtMocHelpers::ClassInfos qt_classinfo({
            {    1,    2 },
            {    3,    4 },
            {    5,    6 },
    });
    return QtMocHelpers::metaObjectData<Attachment, void>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums, qt_constructors, qt_classinfo);
}
Q_CONSTINIT const QMetaObject Attachment::staticMetaObject = { {
    QMetaObject::SuperData::link<QObject::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN10AttachmentE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN10AttachmentE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN10AttachmentE_t>.metaTypes,
    nullptr
} };

void Attachment::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<Attachment *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->focusXChanged(); break;
        case 1: _t->focusYChanged(); break;
        case 2: _t->copyToClipboard(); break;
        default: ;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (Attachment::*)()>(_a, &Attachment::focusXChanged, 0))
            return;
        if (QtMocHelpers::indexOfMethod<void (Attachment::*)()>(_a, &Attachment::focusYChanged, 1))
            return;
    }
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<QString*>(_v) = _t->m_id; break;
        case 1: *reinterpret_cast<enum AttachmentType*>(_v) = _t->m_type; break;
        case 2: *reinterpret_cast<int*>(_v) = _t->isVideo(); break;
        case 3: *reinterpret_cast<QString*>(_v) = _t->m_preview_url; break;
        case 4: *reinterpret_cast<QString*>(_v) = _t->m_url; break;
        case 5: *reinterpret_cast<QString*>(_v) = _t->m_remote_url; break;
        case 6: *reinterpret_cast<QString*>(_v) = _t->description(); break;
        case 7: *reinterpret_cast<QUrl*>(_v) = _t->tempSource(); break;
        case 8: *reinterpret_cast<int*>(_v) = _t->m_sourceWidth; break;
        case 9: *reinterpret_cast<int*>(_v) = _t->m_sourceHeight; break;
        case 10: *reinterpret_cast<double*>(_v) = _t->focusX(); break;
        case 11: *reinterpret_cast<double*>(_v) = _t->focusY(); break;
        case 12: *reinterpret_cast<QJsonObject*>(_v) = _t->attributes(); break;
        default: break;
        }
    }
    if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 10: _t->setFocusX(*reinterpret_cast<double*>(_v)); break;
        case 11: _t->setFocusY(*reinterpret_cast<double*>(_v)); break;
        default: break;
        }
    }
}

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

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

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

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

// SIGNAL 1
void Attachment::focusYChanged()
{
    QMetaObject::activate(this, &staticMetaObject, 1, nullptr);
}
QT_WARNING_POP
