// This code is auto-generated by Qul's qmltocpp tool from the file 'Switch.qml'
// WARNING! All changes made in this file will be lost!
#include "Switch.h"
#include <qul/private/graphicsdevice.h>
#include <qul/private/filecache.h>

#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Winvalid-offsetof"
#endif

extern const Qul::Private::RasterBuffer *const qul_rasterBuffer_switch_2Dbg_12628494062263596380_handle;
extern const Qul::Private::RasterBuffer *const qul_rasterBuffer_switch_2Di_18398203682163942849_handle;
extern const Qul::Private::RasterBuffer *const qul_rasterBuffer_switch_2Do_16909354190531363769_handle;
extern const Qul::Private::RasterBuffer *const qul_rasterBuffer_switch_2Dhandle_3494590952183651764_handle;
static const Qul::Private::String qulCurrentFileDir(".", 1);
namespace QtQuick {
namespace Controls {
namespace StyleDefault {
extern Qul::Private::Items::ItemBase *loaderItemAllocator(const Qul::Private::String &uri, const Qul::Private::String &currentFileDir);

} // namespace QtQuick
} // namespace Controls
} // namespace StyleDefault
namespace Qul { namespace Private {
Qul::Property<int> &translationIndexProperty_main();
extern uint32_t qul_translation_base_offset_f40278181024b4f55c8aa477d95d080512c7e8a2();
extern const char *qul_translation_string(int lang, uint32_t base, int entry);
}}

namespace QtQuick {
namespace Controls {
namespace StyleDefault {

namespace {
#if defined(QUL_CC_IAR)
#pragma diag_suppress=Pe177 // declared but never referenced
#elif defined(QUL_CC_GNU)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-function"
#endif
static Qul::Property<int> &translationIndexProperty() { return Qul::Private::translationIndexProperty_main(); }
static int translationIndex() { return translationIndexProperty().value(); }
static const char *qul_translation(int entry) {
    const uint32_t base_offset = Qul::Private::qul_translation_base_offset_f40278181024b4f55c8aa477d95d080512c7e8a2();
    return Qul::Private::qul_translation_string(translationIndex(), base_offset, entry);
}
#if defined(QUL_CC_IAR)
#pragma diag_default=Pe177 // declared but never referenced
#elif defined(QUL_CC_GNU)
#pragma GCC diagnostic pop
#endif
}


int Switch::Switch_3401498431_bindingFunctor::operator()(Switch *self) const
{
    (void) self;
    int r2_1 = 0;
    QUL_DECL_UNUSED Switch * r2 = NULL;
    QUL_DECL_UNUSED Qul::Private::Items::ItemBase * r2__indicator = NULL;
    int r7__indicator_width = 0;
    // implicitWidth: control.indicator ? control.indicator.width + control.spacing : 0
    // line 72  "Switch.qml"
    r2 = self;
    r2__indicator = r2->indicator.value();
    if (!r2__indicator) {
    goto label_0;};
    r2 = self;
    r2__indicator = r2->indicator.value();
    r2_1 = r2__indicator->width.value();
    r7__indicator_width = r2_1;
    r2 = self;
    r2_1 = r2->spacing.value();
    r2_1 = r7__indicator_width + r2_1;
    goto label_1;;
    {
    }
    label_0:;
    r2_1 = 0;
    label_1:;
    return r2_1;
    
}
int Switch::anchor_functor::operator()(Switch *self, int _switch_index) const
{
    int properties[2] = {};

    switch(_switch_index) {
    case 0: properties[0] = self->row.height.value(); properties[1] = self->text_.height.value();  break;
    case 1: properties[0] = self->colorizedimage.height.value(); properties[1] = self->image.height.value();  break;
    case 2: properties[0] = self->colorizedimage.height.value(); properties[1] = self->image_2.height.value();  break;
    case 3: properties[0] = self->colorizedimage.height.value(); properties[1] = self->image_3.height.value();  break;
    }

    switch(_switch_index) {
    case 3: return int((int(properties[0]) + 1)/2 + (5) - ((properties[1])/2.0));
    case 0:
    case 1:
    case 2: return int((int(properties[0]) + 1)/2 - ((properties[1])/2.0));
    }
    return 0;
}

Qul::PlatformInterface::Rgba32 Switch::Switch_231443548_bindingFunctor::operator()(Switch *self) const
{
    (void) self;
    QUL_DECL_UNUSED Qul::PlatformInterface::Rgba32 r2__disabledTextColor;
    bool r2__enabled = false;
    QUL_DECL_UNUSED  ::QtQuick::Controls::StyleDefault::DefaultStyle * r2_3 = NULL;
    QUL_DECL_UNUSED Switch * r2 = NULL;
    // color: control.enabled ? DefaultStyle.textColor : DefaultStyle.disabledTextColor
    // line 78  "Switch.qml"
    r2 = self;
    r2__enabled = r2->enabled.value();
    if (!r2__enabled) goto label_0;;
    r2_3 = & ::QtQuick::Controls::StyleDefault::DefaultStyle ::instance();
    r2__disabledTextColor = r2_3->textColor.value();
    goto label_1;;
    label_0:;
    r2_3 = & ::QtQuick::Controls::StyleDefault::DefaultStyle ::instance();
    r2__disabledTextColor = r2_3->disabledTextColor.value();
    label_1:;
    return r2__disabledTextColor;
    
}
Qul::Private::FontPointer Switch::Switch_3537330082_bindingFunctor::operator()(Switch *self) const
{
    (void) self;
    QUL_DECL_UNUSED Qul::Private::FontPointer r2__font;
    QUL_DECL_UNUSED Switch * r2 = NULL;
    // font: control.font
    // line 77  "Switch.qml"
    r2 = self;
    r2__font = r2->font.value();
    return r2__font;
    
}
Qul::Private::String Switch::Switch_65258397_bindingFunctor::operator()(Switch *self) const
{
    (void) self;
    QUL_DECL_UNUSED Qul::Private::String r2__text;
    QUL_DECL_UNUSED Switch * r2 = NULL;
    // text: control.text
    // line 76  "Switch.qml"
    r2 = self;
    r2__text = r2->text.value();
    return r2__text;
    
}
Qul::PlatformInterface::Rgba32 Switch::Switch_1821255934_bindingFunctor::operator()(Switch *self) const
{
    (void) self;
    bool r2 = false;
    QUL_DECL_UNUSED Qul::Private::String r2_1;
    // color: checked ? "#5ae0aa" : "#c4c9cc"
    // line 36  "Switch.qml"
    r2 = self->checked.value();
    if (!r2) goto label_0;;
    r2_1 = Qul::Private::String(Qul::Private::ColorIdString("#5ae0aa", 7, 0xff5ae0aa));
    goto label_1;;
    label_0:;
    r2_1 = Qul::Private::String(Qul::Private::ColorIdString("#c4c9cc", 7, 0xffc4c9cc));
    label_1:;
    return (r2_1).toRgba32();
    
}
int Switch::Switch_4178335260_bindingFunctor::operator()(Switch *self) const
{
    (void) self;
    int r8__availableHeight = 0;
    int r2_2 = 0;
    Qul::qreal r2_1 = 0.0;
    QUL_DECL_UNUSED Switch * r2 = NULL;
    int r9 = 0;
    int r7__topPadding = 0;
    // y: control.topPadding + (control.availableHeight - height) / 2
    // line 35  "Switch.qml"
    r2 = self;
    r2_2 = r2->topPadding.value();
    r7__topPadding = r2_2;
    r2 = self;
    r2_2 = r2->availableHeight.value();
    r8__availableHeight = r2_2;
    r2_2 = self->colorizedimage.height.value();
    r2_2 = r8__availableHeight - r2_2;
    r9 = r2_2;
    r2_2 = 2;
    r2_1 = Qul::qreal(r9) / r2_2;
    r2_1 = r7__topPadding + r2_1;
    return int(r2_1);
    
}
int Switch::Switch_793844985_bindingFunctor::operator()(Switch *self) const
{
    (void) self;
    int r2__leftPadding = 0;
    QUL_DECL_UNUSED Switch * r2 = NULL;
    // x: control.leftPadding
    // line 34  "Switch.qml"
    r2 = self;
    r2__leftPadding = r2->leftPadding.value();
    return r2__leftPadding;
    
}
int Switch::Switch_3337328763_bindingFunctor::operator()(Switch *self) const
{
    (void) self;
    Qul::qreal r8 = 0.0;
    QUL_DECL_UNUSED colorizedimage_ColorizedImage * r2 = NULL;
    int r2_2 = 0;
    Qul::qreal r2_1 = 0.0;
    int r9 = 0;
    int r7__width = 0;
    // x: parent.width * 0.25 - width / 2
    // line 41  "Switch.qml"
    r2 = self->image.parent<colorizedimage_ColorizedImage >();
    r2_2 = r2->width.value();
    r7__width = r2_2;
    r2_1 = 0.25000000000000000;
    r2_1 = r7__width * r2_1;
    r8 = r2_1;
    r2_2 = self->image.width.value();
    r9 = r2_2;
    r2_2 = 2;
    r2_1 = Qul::qreal(r9) / r2_2;
    r2_1 = r8 - r2_1;
    return int(r2_1);
    
}
int Switch::Switch_545044895_bindingFunctor::operator()(Switch *self) const
{
    (void) self;
    Qul::qreal r8 = 0.0;
    QUL_DECL_UNUSED colorizedimage_ColorizedImage * r2 = NULL;
    int r2_2 = 0;
    Qul::qreal r2_1 = 0.0;
    int r9 = 0;
    int r7__width = 0;
    // x: parent.width * 0.75 - width / 2
    // line 46  "Switch.qml"
    r2 = self->image_2.parent<colorizedimage_ColorizedImage >();
    r2_2 = r2->width.value();
    r7__width = r2_2;
    r2_1 = 0.75000000000000000;
    r2_1 = r7__width * r2_1;
    r8 = r2_1;
    r2_2 = self->image_2.width.value();
    r9 = r2_2;
    r2_2 = 2;
    r2_1 = Qul::qreal(r9) / r2_2;
    r2_1 = r8 - r2_1;
    return int(r2_1);
    
}
int Switch::Switch_1970666359_bindingFunctor::operator()(Switch *self) const
{
    (void) self;
    int r19 = 0;
    QUL_DECL_UNUSED Qul::Private::Builtins::Math * r7 = NULL;
    Qul::qreal r16 = 0.0;
    int r2_1 = 0;
    QUL_DECL_UNUSED colorizedimage_ColorizedImage * r2_3 = NULL;
    Qul::qreal r2__visualPosition = 0.0;
    QUL_DECL_UNUSED Qul::Private::Builtins::Math * r2 = NULL;
    QUL_DECL_UNUSED Switch * r2_4 = NULL;
    int r10 = 0;
    QUL_DECL_UNUSED Qul::Private::Builtins::Math * r12 = NULL;
    int r17__width = 0;
    Qul::qreal r17__visualPosition = 0.0;
    int r15 = 0;
    Qul::qreal r11 = 0.0;
    int r18 = 0;
    Qul::qreal r18_1 = 0.0;
    // x: Math.max(-8, Math.min((parent.width - width) + 8,
    // line 54  "Switch.qml"
    r2 = &Qul::Private::Builtins::Math ::instance();
    r7 = r2;
    r10 = -8;
    r2 = &Qul::Private::Builtins::Math ::instance();
    r12 = r2;
    r2_3 = self->image_3.parent<colorizedimage_ColorizedImage >();
    r2_1 = r2_3->width.value();
    r17__width = r2_1;
    r2_1 = self->image_3.width.value();
    r2_1 = r17__width - r2_1;
    r18 = r2_1;
    r2_1 = 8;
    r2_1 = r18 + r2_1;
    r15 = r2_1;
    r2_4 = self;
    r2__visualPosition = r2_4->visualPosition.value();
    r17__visualPosition = r2__visualPosition;
    r2_3 = self->image_3.parent<colorizedimage_ColorizedImage >();
    r2_1 = r2_3->width.value();
    r2__visualPosition = r17__visualPosition * r2_1;
    r18_1 = r2__visualPosition;
    r2_1 = self->image_3.width.value();
    r19 = r2_1;
    r2_1 = 2;
    r2__visualPosition = Qul::qreal(r19) / r2_1;
    r2__visualPosition = r18_1 - r2__visualPosition;
    r16 = r2__visualPosition;
    r2__visualPosition = r12->min(r15, r16);
    r11 = r2__visualPosition;
    r2__visualPosition = r7->max(r10, r11);
    // control.visualPosition * parent.width - (width / 2)))
    // line 55  "Switch.qml"
    return int(r2__visualPosition);
    
}
int Switch::Switch_471296976_bindingFunctor::operator()(Switch *self) const
{
    (void) self;
    QUL_DECL_UNUSED Qul::Private::Builtins::Math * r7 = NULL;
    int r13 = 0;
    int r16 = 0;
    int r2_1 = 0;
    Qul::qreal r2_3 = 0.0;
    QUL_DECL_UNUSED Qul::Private::Builtins::Math * r2 = NULL;
    QUL_DECL_UNUSED Qul::Private::Items::ItemBase * r2_2 = NULL;
    int r10 = 0;
    int r12_1 = 0;
    QUL_DECL_UNUSED Qul::Private::Builtins::Math * r12 = NULL;
    int r17 = 0;
    int r15 = 0;
    Qul::qreal r11 = 0.0;
    int r18 = 0;
    // implicitHeight: Math.max((background ? background.implicitHeight : 0) + topInset + bottomInset,
    // line 17  "Switch.qml"
    r2 = &Qul::Private::Builtins::Math ::instance();
    r7 = r2;
    r2_2 = self->background.value();
    if (!r2_2) goto label_0;;
    r2_2 = self->background.value();
    r2_1 = r2_2->itemExtraProperties->implicitHeight.value();
    goto label_1;;
    label_0:;
    r2_1 = 0;
    label_1:;
    r12_1 = r2_1;
    r2_1 = self->topInset.value();
    r2_1 = r12_1 + r2_1;
    r13 = r2_1;
    r2_1 = self->bottomInset.value();
    r2_1 = r13 + r2_1;
    r10 = r2_1;
    r2 = &Qul::Private::Builtins::Math ::instance();
    r12 = r2;
    // Math.max((contentItem ? contentItem.implicitHeight : 0) + topPadding + bottomPadding,
    // line 18  "Switch.qml"
    r2_2 = self->contentItem.value();
    if (!r2_2) goto label_2;;
    r2_2 = self->contentItem.value();
    r2_1 = r2_2->itemExtraProperties->implicitHeight.value();
    goto label_3;;
    label_2:;
    r2_1 = 0;
    label_3:;
    r17 = r2_1;
    r2_1 = self->topPadding.value();
    r2_1 = r17 + r2_1;
    r18 = r2_1;
    r2_1 = self->bottomPadding.value();
    r2_1 = r18 + r2_1;
    r15 = r2_1;
    // (indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding))
    // line 19  "Switch.qml"
    r2_2 = self->indicator.value();
    if (!r2_2) goto label_4;;
    r2_2 = self->indicator.value();
    r2_1 = r2_2->itemExtraProperties->implicitHeight.value();
    goto label_5;;
    label_4:;
    r2_1 = 0;
    label_5:;
    r17 = r2_1;
    r2_1 = self->topPadding.value();
    r2_1 = r17 + r2_1;
    r18 = r2_1;
    r2_1 = self->bottomPadding.value();
    r2_1 = r18 + r2_1;
    r16 = r2_1;
    r2_3 = r12->max(r15, r16);
    r11 = r2_3;
    r2_3 = r7->max(r10, r11);
    return int(r2_3);
    
}
int Switch::Switch_3988550022_bindingFunctor::operator()(Switch *self) const
{
    (void) self;
    int r2_2 = 0;
    Qul::qreal r2_1 = 0.0;
    QUL_DECL_UNUSED Qul::Private::Builtins::Math * r2 = NULL;
    QUL_DECL_UNUSED Qul::Private::Items::ItemBase * r2_3 = NULL;
    int r10 = 0;
    int r12 = 0;
    int r11 = 0;
    QUL_DECL_UNUSED Qul::Private::Builtins::Math * r7 = NULL;
    int r13 = 0;
    // implicitWidth: Math.max((background ? background.implicitWidth : 0) + leftInset + rightInset,
    // line 11  "Switch.qml"
    r2 = &Qul::Private::Builtins::Math ::instance();
    r7 = r2;
    r2_3 = self->background.value();
    if (!r2_3) goto label_0;;
    r2_3 = self->background.value();
    r2_2 = r2_3->itemExtraProperties->implicitWidth.value();
    goto label_1;;
    label_0:;
    r2_2 = 0;
    label_1:;
    r12 = r2_2;
    r2_2 = self->leftInset.value();
    r2_2 = r12 + r2_2;
    r13 = r2_2;
    r2_2 = self->rightInset.value();
    r2_2 = r13 + r2_2;
    r10 = r2_2;
    // (contentItem ? contentItem.implicitWidth : 0) + leftPadding + rightPadding)
    // line 12  "Switch.qml"
    r2_3 = self->contentItem.value();
    if (!r2_3) goto label_2;;
    r2_3 = self->contentItem.value();
    r2_2 = r2_3->itemExtraProperties->implicitWidth.value();
    goto label_3;;
    label_2:;
    r2_2 = 0;
    label_3:;
    r12 = r2_2;
    r2_2 = self->leftPadding.value();
    r2_2 = r12 + r2_2;
    r13 = r2_2;
    r2_2 = self->rightPadding.value();
    r2_2 = r13 + r2_2;
    r11 = r2_2;
    r2_1 = r7->max(r10, r11);
    return int(r2_1);
    
}

Switch::Switch()

    : image_2_y_anchor_binding(anchor_functor())
    , text__y_anchor_binding(anchor_functor())
    , image_3_y_anchor_binding(anchor_functor())
    , image_y_anchor_binding(anchor_functor())
    , ExtraStorage_itemExtraProperties_this_instance(this)
    , ExtraStorage_itemExtraProperties_item__2_instance(&item__2)
    , ExtraStorage_itemExtraProperties_colorizedimage_instance(&colorizedimage)
    , ExtraStorage_itemExtraProperties_row_instance(&row)
    , ExtraStorage_itemExtraProperties_item__instance(&item_)
    , colorizedimage_x_binding(Switch_793844985_bindingFunctor())
    , image_2_x_binding(Switch_545044895_bindingFunctor())
    , image_x_binding(Switch_3337328763_bindingFunctor())
    , colorizedimage_y_binding(Switch_4178335260_bindingFunctor())
    , colorizedimage_color_binding(Switch_1821255934_bindingFunctor())
    , text__text_binding(Switch_65258397_bindingFunctor())
    , image_3_x_binding(Switch_1970666359_bindingFunctor())
    , font_font_binding(Switch_3537330082_bindingFunctor())
    , text__color_binding(Switch_231443548_bindingFunctor())
    , item__2_implicitWidth_binding(Switch_3401498431_bindingFunctor())
    , _implicitHeight_binding(Switch_471296976_bindingFunctor())
    , _implicitWidth_binding(Switch_3988550022_bindingFunctor())
{
#if __cplusplus < 201103L
    // Behavior on x { NumberAnimation { duration: 150 } }
    // line 59  "Switch.qml"
    numberanimation.duration.setValue(150);
    // spacing: 10
    // line 31  "Switch.qml"
    spacing.setValue(10);
    // bottomInset: DefaultStyle.inset
    // line 29  "Switch.qml"
    bottomInset.setValue(5);
    // rightInset: DefaultStyle.inset
    // line 28  "Switch.qml"
    rightInset.setValue(5);
    // topInset: DefaultStyle.inset
    // line 27  "Switch.qml"
    topInset.setValue(5);
    // leftInset: DefaultStyle.inset
    // line 26  "Switch.qml"
    leftInset.setValue(5);
    // bottomPadding: DefaultStyle.padding
    // line 24  "Switch.qml"
    bottomPadding.setValue(5);
    // topPadding: DefaultStyle.padding
    // line 23  "Switch.qml"
    topPadding.setValue(5);
    // rightPadding: DefaultStyle.padding
    // line 22  "Switch.qml"
    rightPadding.setValue(5);
    // leftPadding: DefaultStyle.padding
    // line 21  "Switch.qml"
    leftPadding.setValue(5);
#else
    using OffsetType14508472848368190223 = Qul::Private::Choose<uint16_t, uint32_t, (UINT16_MAX >
        Qul::Private::Max<offsetof(Switch, numberanimation.duration) / 4,
        Qul::Private::Max<offsetof(Switch, spacing) / 4,
        Qul::Private::Max<offsetof(Switch, bottomInset) / 4,
        Qul::Private::Max<offsetof(Switch, rightInset) / 4,
        Qul::Private::Max<offsetof(Switch, topInset) / 4,
        Qul::Private::Max<offsetof(Switch, leftInset) / 4,
        Qul::Private::Max<offsetof(Switch, bottomPadding) / 4,
        Qul::Private::Max<offsetof(Switch, topPadding) / 4,
        Qul::Private::Max<offsetof(Switch, rightPadding) / 4,
        Qul::Private::Max<offsetof(Switch, leftPadding) / 4,
        0
        >::V>::V>::V>::V>::V>::V>::V>::V>::V>::V
        )>::Type;
    OffsetType14508472848368190223 propertyOffsets14508472848368190223[] = {
        std::is_same<decltype(numberanimation.duration), Qul::Property<int>>::value ? (offsetof(Switch, numberanimation.duration) / 4) : std::numeric_limits<OffsetType14508472848368190223>::max(),
        std::is_same<decltype(spacing), Qul::Property<int>>::value ? (offsetof(Switch, spacing) / 4) : std::numeric_limits<OffsetType14508472848368190223>::max(),
        std::is_same<decltype(bottomInset), Qul::Property<int>>::value ? (offsetof(Switch, bottomInset) / 4) : std::numeric_limits<OffsetType14508472848368190223>::max(),
        std::is_same<decltype(rightInset), Qul::Property<int>>::value ? (offsetof(Switch, rightInset) / 4) : std::numeric_limits<OffsetType14508472848368190223>::max(),
        std::is_same<decltype(topInset), Qul::Property<int>>::value ? (offsetof(Switch, topInset) / 4) : std::numeric_limits<OffsetType14508472848368190223>::max(),
        std::is_same<decltype(leftInset), Qul::Property<int>>::value ? (offsetof(Switch, leftInset) / 4) : std::numeric_limits<OffsetType14508472848368190223>::max(),
        std::is_same<decltype(bottomPadding), Qul::Property<int>>::value ? (offsetof(Switch, bottomPadding) / 4) : std::numeric_limits<OffsetType14508472848368190223>::max(),
        std::is_same<decltype(topPadding), Qul::Property<int>>::value ? (offsetof(Switch, topPadding) / 4) : std::numeric_limits<OffsetType14508472848368190223>::max(),
        std::is_same<decltype(rightPadding), Qul::Property<int>>::value ? (offsetof(Switch, rightPadding) / 4) : std::numeric_limits<OffsetType14508472848368190223>::max(),
        std::is_same<decltype(leftPadding), Qul::Property<int>>::value ? (offsetof(Switch, leftPadding) / 4) : std::numeric_limits<OffsetType14508472848368190223>::max(),
    };
    static constexpr uint8_t propertyValues14508472848368190223[] = {
        // Behavior on x { NumberAnimation { duration: 150 } }
        // line 59  "Switch.qml"
        150,
        // spacing: 10
        // line 31  "Switch.qml"
        10,
        // bottomInset: DefaultStyle.inset
        // line 29  "Switch.qml"
        5,
        // rightInset: DefaultStyle.inset
        // line 28  "Switch.qml"
        5,
        // topInset: DefaultStyle.inset
        // line 27  "Switch.qml"
        5,
        // leftInset: DefaultStyle.inset
        // line 26  "Switch.qml"
        5,
        // bottomPadding: DefaultStyle.padding
        // line 24  "Switch.qml"
        5,
        // topPadding: DefaultStyle.padding
        // line 23  "Switch.qml"
        5,
        // rightPadding: DefaultStyle.padding
        // line 22  "Switch.qml"
        5,
        // leftPadding: DefaultStyle.padding
        // line 21  "Switch.qml"
        5,
    };
    Qul::Private::initializeProperties<int>(this, propertyOffsets14508472848368190223, propertyValues14508472848368190223,
        sizeof(propertyOffsets14508472848368190223) / sizeof(propertyOffsets14508472848368190223[0]));
    // Behavior on x { NumberAnimation { duration: 150 } }
    // line 59  "Switch.qml"
    if (!std::is_same<decltype(numberanimation.duration), Qul::Property<int>>::value)
        numberanimation.duration.setValue(150);
    // spacing: 10
    // line 31  "Switch.qml"
    if (!std::is_same<decltype(spacing), Qul::Property<int>>::value)
        spacing.setValue(10);
    // bottomInset: DefaultStyle.inset
    // line 29  "Switch.qml"
    if (!std::is_same<decltype(bottomInset), Qul::Property<int>>::value)
        bottomInset.setValue(5);
    // rightInset: DefaultStyle.inset
    // line 28  "Switch.qml"
    if (!std::is_same<decltype(rightInset), Qul::Property<int>>::value)
        rightInset.setValue(5);
    // topInset: DefaultStyle.inset
    // line 27  "Switch.qml"
    if (!std::is_same<decltype(topInset), Qul::Property<int>>::value)
        topInset.setValue(5);
    // leftInset: DefaultStyle.inset
    // line 26  "Switch.qml"
    if (!std::is_same<decltype(leftInset), Qul::Property<int>>::value)
        leftInset.setValue(5);
    // bottomPadding: DefaultStyle.padding
    // line 24  "Switch.qml"
    if (!std::is_same<decltype(bottomPadding), Qul::Property<int>>::value)
        bottomPadding.setValue(5);
    // topPadding: DefaultStyle.padding
    // line 23  "Switch.qml"
    if (!std::is_same<decltype(topPadding), Qul::Property<int>>::value)
        topPadding.setValue(5);
    // rightPadding: DefaultStyle.padding
    // line 22  "Switch.qml"
    if (!std::is_same<decltype(rightPadding), Qul::Property<int>>::value)
        rightPadding.setValue(5);
    // leftPadding: DefaultStyle.padding
    // line 21  "Switch.qml"
    if (!std::is_same<decltype(leftPadding), Qul::Property<int>>::value)
        leftPadding.setValue(5);
#endif
    // Item {
    // line 71  "Switch.qml"
    appendChild(&this->row, &item__2);
    item__2_implicitWidth_binding.init<Switch, &Switch::item__2_implicitWidth_binding>(item__2.itemExtraProperties->implicitWidth);
    // implicitWidth: control.indicator ? control.indicator.width + control.spacing : 0
    // line 72  "Switch.qml"
    item__2.itemExtraProperties->implicitWidth.setBinding (&item__2_implicitWidth_binding);
    // Text {
    // line 75  "Switch.qml"
    appendChild(&this->row, &text_);
    text__y_anchor_binding.init<Switch, &Switch::text__y_anchor_binding, 0>(text_.y);
    text_.y.setBinding(&text__y_anchor_binding);
    text__color_binding.init<Switch, &Switch::text__color_binding>(text_.color);
    // color: control.enabled ? DefaultStyle.textColor : DefaultStyle.disabledTextColor
    // line 78  "Switch.qml"
    text_.color.setBinding (&text__color_binding);
    font_font_binding.init<Switch, &Switch::font_font_binding>(text_.font);
    // font: control.font
    // line 77  "Switch.qml"
    text_.font.setBinding (&font_font_binding);
    text__text_binding.init<Switch, &Switch::text__text_binding>(text_.text);
    // text: control.text
    // line 76  "Switch.qml"
    text_.text.setBinding (&text__text_binding);
    // contentItem: Row {
    // line 70  "Switch.qml"
    contentItem.setValue(&row);
    // implicitHeight: 42
    // line 66  "Switch.qml"
    item_.itemExtraProperties->implicitHeight.setValue(42);
    // implicitWidth: 100
    // line 65  "Switch.qml"
    item_.itemExtraProperties->implicitWidth.setValue(100);
    // background: Item {
    // line 64  "Switch.qml"
    background.setValue(&item_);
    // source: "qrc:/images/switch-bg.png"
    // line 37  "Switch.qml"
    colorizedimage.source.setValue(Qul::Private::ImagePrivate::fromRasterBuffer(qul_rasterBuffer_switch_2Dbg_12628494062263596380_handle));
    colorizedimage_color_binding.init<Switch, &Switch::colorizedimage_color_binding>(colorizedimage.color);
    // color: checked ? "#5ae0aa" : "#c4c9cc"
    // line 36  "Switch.qml"
    colorizedimage.color.setBinding (&colorizedimage_color_binding);
    colorizedimage_y_binding.init<Switch, &Switch::colorizedimage_y_binding>(colorizedimage.y);
    // y: control.topPadding + (control.availableHeight - height) / 2
    // line 35  "Switch.qml"
    colorizedimage.y.setBinding (&colorizedimage_y_binding);
    colorizedimage_x_binding.init<Switch, &Switch::colorizedimage_x_binding>(colorizedimage.x);
    // x: control.leftPadding
    // line 34  "Switch.qml"
    colorizedimage.x.setBinding (&colorizedimage_x_binding);
    // Image {
    // line 40  "Switch.qml"
    appendChild(&this->colorizedimage, &image);
    image_y_anchor_binding.init<Switch, &Switch::image_y_anchor_binding, 1>(image.y);
    image.y.setBinding(&image_y_anchor_binding);
    // source: "qrc:/images/switch-i.png"
    // line 42  "Switch.qml"
    image.source.setValue(Qul::Private::ImagePrivate::fromRasterBuffer(qul_rasterBuffer_switch_2Di_18398203682163942849_handle));
    image_x_binding.init<Switch, &Switch::image_x_binding>(image.x);
    // x: parent.width * 0.25 - width / 2
    // line 41  "Switch.qml"
    image.x.setBinding (&image_x_binding);
    // Image {
    // line 45  "Switch.qml"
    appendChild(&this->colorizedimage, &image_2);
    image_2_y_anchor_binding.init<Switch, &Switch::image_2_y_anchor_binding, 2>(image_2.y);
    image_2.y.setBinding(&image_2_y_anchor_binding);
    // source: "qrc:/images/switch-o.png"
    // line 47  "Switch.qml"
    image_2.source.setValue(Qul::Private::ImagePrivate::fromRasterBuffer(qul_rasterBuffer_switch_2Do_16909354190531363769_handle));
    image_2_x_binding.init<Switch, &Switch::image_2_x_binding>(image_2.x);
    // x: parent.width * 0.75 - width / 2
    // line 46  "Switch.qml"
    image_2.x.setBinding (&image_2_x_binding);
    // Image {
    // line 51  "Switch.qml"
    appendChild(&this->colorizedimage, &image_3);
    // Behavior on x { NumberAnimation { duration: 150 } }
    // line 59  "Switch.qml"
    appendChild(&this->behavior, &numberanimation);
    image_3_y_anchor_binding.init<Switch, &Switch::image_3_y_anchor_binding, 3>(image_3.y);
    image_3.y.setBinding(&image_3_y_anchor_binding);
    image_3_x_binding.init<Switch, &Switch::image_3_x_binding>(image_3.x);
    // x: Math.max(-8, Math.min((parent.width - width) + 8,
    // line 54  "Switch.qml"
    image_3.x.setBinding (&image_3_x_binding);
    // source: "qrc:/images/switch-handle.png"
    // line 52  "Switch.qml"
    image_3.source.setValue(Qul::Private::ImagePrivate::fromRasterBuffer(qul_rasterBuffer_switch_2Dhandle_3494590952183651764_handle));
    // indicator: ColorizedImage {
    // line 33  "Switch.qml"
    indicator.setValue(&colorizedimage);
    _implicitHeight_binding.init<Switch, &Switch::_implicitHeight_binding>(itemExtraProperties->implicitHeight);
    // implicitHeight: Math.max((background ? background.implicitHeight : 0) + topInset + bottomInset,
    // line 17  "Switch.qml"
    itemExtraProperties->implicitHeight.setBinding (&_implicitHeight_binding);
    _implicitWidth_binding.init<Switch, &Switch::_implicitWidth_binding>(itemExtraProperties->implicitWidth);
    // implicitWidth: Math.max((background ? background.implicitWidth : 0) + leftInset + rightInset,
    // line 11  "Switch.qml"
    itemExtraProperties->implicitWidth.setBinding (&_implicitWidth_binding);
    // Behavior on x { NumberAnimation { duration: 150 } }
    // line 59  "Switch.qml"
    behavior.on(&image_3.x);
}

} // namespace QtQuick
} // namespace Controls
} // namespace StyleDefault
