// This code is auto-generated by Qul's qmltocpp tool from the file 'Dial.qml'
// WARNING! All changes made in this file will be lost!
#include "Dial.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_dial_2Dbackground_2Ddisabled_15345896986866248576_handle;
extern const Qul::Private::RasterBuffer *const qul_rasterBuffer_dial_2Dbackground_3190004907980333205_handle;
extern const Qul::Private::RasterBuffer *const qul_rasterBuffer_dial_2Dprogress_14694211536943410449_handle;
extern const Qul::Private::RasterBuffer *const qul_rasterBuffer_slider_2Dhandle_4014514759752923839_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_6c64ef7660e25f497e4c00fd2d76537710f05601();
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_6c64ef7660e25f497e4c00fd2d76537710f05601();
    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 Dial::item_::item__3986738907_bindingFunctor::operator()(item_ *self) const
{
    (void) self;
    int r8__height = 0;
    int r2_1 = 0;
    bool r2_3 = false;
    QUL_DECL_UNUSED backgroundImg_Image * r2_2 = NULL;
    Qul::qreal r2 = 0.0;
    Qul::qreal r9 = 0.0;
    int r7 = 0;
    // switch (index) {
    // line 85  "Dial.qml"
    r2_1 = self->attached_index.value();
    r7 = r2_1;
    r2_1 = 0;
    r2_3 = r7 == r2_1;
    if (r2_3) goto label_0;;
    r2_1 = 1;
    r2_3 = r7 == r2_1;
    if (r2_3) {
    goto label_1;};
    r2_1 = 2;
    r2_3 = r7 == r2_1;
    if (r2_3) {
    goto label_2;};
    r2_1 = 3;
    r2_3 = r7 == r2_1;
    if (r2_3) goto label_3;;
    {
    goto label_4;};
    label_0:;
    // case 0: return backgroundImg.height - height;
    // line 86  "Dial.qml"
    r2_2 = &self->parentScope->backgroundImg;
    r2_1 = r2_2->height.value();
    r8__height = r2_1;
    r2_1 = self->height.value();
    r2_1 = r8__height - r2_1;
    return r2_1;
    {
    }
    label_1:;
    // case 1: return backgroundImg.height /2 - height;
    // line 87  "Dial.qml"
    r2_2 = &self->parentScope->backgroundImg;
    r2_1 = r2_2->height.value();
    r8__height = r2_1;
    r2_1 = 2;
    r2 = Qul::qreal(r8__height) / r2_1;
    r9 = r2;
    r2_1 = self->height.value();
    r2 = r9 - r2_1;
    return int(r2);
    {
    }
    label_2:;
    // case 2: return 0;
    // line 88  "Dial.qml"
    r2_1 = 0;
    return r2_1;
    label_3:;
    /*
    case 3: return backgroundImg.height /2;
    }
    */
    // line 89  "Dial.qml"
    r2_2 = &self->parentScope->backgroundImg;
    r2_1 = r2_2->height.value();
    r8__height = r2_1;
    r2_1 = 2;
    r2 = Qul::qreal(r8__height) / r2_1;
    return int(r2);
    {
    }
    label_4:;
    // }
    // line 91  "Dial.qml"
    return int();
    
}
int Dial::item_::item__2493429032_bindingFunctor::operator()(item_ *self) const
{
    (void) self;
    Qul::qreal r9 = 0.0;
    int r2_1 = 0;
    bool r2_2 = false;
    QUL_DECL_UNUSED backgroundImg_Image * r2 = NULL;
    QUL_DECL_UNUSED handleImg_Image * r2_5 = NULL;
    Qul::qreal r2_3 = 0.0;
    QUL_DECL_UNUSED Dial * r2_4 = NULL;
    int r10__y = 0;
    Qul::qreal r10__angle = 0.0;
    int r12 = 0;
    int r11 = 0;
    Qul::qreal r11_1 = 0.0;
    bool r8 = false;
    Qul::qreal r7 = 0.0;
    Qul::qreal r13 = 0.0;
    // var quadrantSize = backgroundImg.height/2;
    // line 72  "Dial.qml"
    r2 = &self->parentScope->backgroundImg;
    r2_1 = r2->height.value();
    r10__y = r2_1;
    r2_1 = 2;
    r2_3 = Qul::qreal(r10__y) / r2_1;
    r9 = r2_3;
    // if (control.angle < -180 + index*90) return 0;
    // line 73  "Dial.qml"
    r2_4 = self->parentScope;
    r2_3 = r2_4->angle.value();
    r10__angle = r2_3;
    r11 = -180;
    r2_1 = self->attached_index.value();
    r12 = r2_1;
    r2_1 = 90;
    r2_1 = r12 * r2_1;
    r2_1 = r11 + r2_1;
    r2_2 = r10__angle < r2_1;
    if (!r2_2) goto label_0;;
    r2_1 = 0;
    return r2_1;
    label_0:;
    // if (control.angle > -90 + index*90) return quadrantSize;
    // line 74  "Dial.qml"
    r2_4 = self->parentScope;
    r2_3 = r2_4->angle.value();
    r10__angle = r2_3;
    r11 = -90;
    r2_1 = self->attached_index.value();
    r12 = r2_1;
    r2_1 = 90;
    r2_1 = r12 * r2_1;
    r2_1 = r11 + r2_1;
    r2_2 = r10__angle > r2_1;
    if (!r2_2) goto label_1;;
    r2_3 = r9;
    return int(r2_3);
    label_1:;
    // var low = control.angle + 180 - index*90 < 45
    // line 75  "Dial.qml"
    r2_4 = self->parentScope;
    r2_3 = r2_4->angle.value();
    r10__angle = r2_3;
    r2_1 = 180;
    r2_3 = r10__angle + r2_1;
    r11_1 = r2_3;
    r2_1 = self->attached_index.value();
    r12 = r2_1;
    r2_1 = 90;
    r2_1 = r12 * r2_1;
    r2_3 = r11_1 - r2_1;
    r13 = r2_3;
    r2_1 = 45;
    r2_2 = r13 < r2_1;
    r8 = r2_2;
    // var handlePos = (handleImg.y - backgroundImg.y + handleImg.height/2);
    // line 76  "Dial.qml"
    r2_5 = &self->parentScope->handleImg;
    r2_1 = r2_5->y.value();
    r10__y = r2_1;
    r2 = &self->parentScope->backgroundImg;
    r2_1 = r2->y.value();
    r2_1 = r10__y - r2_1;
    r11 = r2_1;
    r2_5 = &self->parentScope->handleImg;
    r2_1 = r2_5->height.value();
    r12 = r2_1;
    r2_1 = 2;
    r2_3 = Qul::qreal(r12) / r2_1;
    r2_3 = r11 + r2_3;
    r7 = r2_3;
    // switch (index) {
    // line 77  "Dial.qml"
    r2_1 = self->attached_index.value();
    r10__y = r2_1;
    r2_1 = 0;
    r2_2 = r10__y == r2_1;
    if (r2_2) goto label_2;;
    r2_1 = 1;
    r2_2 = r10__y == r2_1;
    if (r2_2) {
    
    #if defined(QUL_CC_IAR)
    #pragma diag_suppress=Pe111 // statement is unreachable
    #endif
    
    #if defined(QUL_CC_GHS)
    #pragma ghs nowarning 111 // statement is unreachable
    #endif
    r11_1 = r11;
    
    #if defined(QUL_CC_IAR)
    #pragma diag_default=Pe111 // statement is unreachable
    #endif
    
    #if defined(QUL_CC_GHS)
    #pragma ghs endnowarning 111 // statement is unreachable
    #endif
    goto label_3;};
    r2_1 = 2;
    r2_2 = r10__y == r2_1;
    if (r2_2) {
    
    #if defined(QUL_CC_IAR)
    #pragma diag_suppress=Pe111 // statement is unreachable
    #endif
    
    #if defined(QUL_CC_GHS)
    #pragma ghs nowarning 111 // statement is unreachable
    #endif
    r11_1 = r11;
    
    #if defined(QUL_CC_IAR)
    #pragma diag_default=Pe111 // statement is unreachable
    #endif
    
    #if defined(QUL_CC_GHS)
    #pragma ghs endnowarning 111 // statement is unreachable
    #endif
    goto label_4;};
    r2_1 = 3;
    r2_2 = r10__y == r2_1;
    if (r2_2) {
    
    #if defined(QUL_CC_IAR)
    #pragma diag_suppress=Pe111 // statement is unreachable
    #endif
    
    #if defined(QUL_CC_GHS)
    #pragma ghs nowarning 111 // statement is unreachable
    #endif
    r11_1 = r11;
    
    #if defined(QUL_CC_IAR)
    #pragma diag_default=Pe111 // statement is unreachable
    #endif
    
    #if defined(QUL_CC_GHS)
    #pragma ghs endnowarning 111 // statement is unreachable
    #endif
    goto label_5;};
    {
    
    #if defined(QUL_CC_IAR)
    #pragma diag_suppress=Pe111 // statement is unreachable
    #endif
    
    #if defined(QUL_CC_GHS)
    #pragma ghs nowarning 111 // statement is unreachable
    #endif
    r11_1 = r11;
    
    #if defined(QUL_CC_IAR)
    #pragma diag_default=Pe111 // statement is unreachable
    #endif
    
    #if defined(QUL_CC_GHS)
    #pragma ghs endnowarning 111 // statement is unreachable
    #endif
    goto label_6;};
    label_2:;
    // case 0: return low ? quadrantSize : quadrantSize*2 - handlePos;
    // line 78  "Dial.qml"
    r2_2 = r8;
    if (!r2_2) goto label_7;;
    r2_3 = r9;
    {
    
    #if defined(QUL_CC_IAR)
    #pragma diag_suppress=Pe111 // statement is unreachable
    #endif
    
    #if defined(QUL_CC_GHS)
    #pragma ghs nowarning 111 // statement is unreachable
    #endif
    r11_1 = r11;
    
    #if defined(QUL_CC_IAR)
    #pragma diag_default=Pe111 // statement is unreachable
    #endif
    
    #if defined(QUL_CC_GHS)
    #pragma ghs endnowarning 111 // statement is unreachable
    #endif
    goto label_8;};
    label_7:;
    r2_1 = 2;
    r2_3 = r9 * r2_1;
    r11_1 = r2_3;
    r2_3 = r7;
    r2_3 = r11_1 - r2_3;
    {
    }
    label_8:;
    return int(r2_3);
    {
    }
    label_3:;
    // case 1: return low ? quadrantSize - handlePos : quadrantSize;
    // line 79  "Dial.qml"
    r2_2 = r8;
    if (!r2_2) goto label_9;;
    r2_3 = r7;
    r2_3 = r9 - r2_3;
    goto label_10;;
    label_9:;
    r2_3 = r9;
    label_10:;
    return int(r2_3);
    {
    }
    label_4:;
    // case 2: return low ? quadrantSize : handlePos;
    // line 80  "Dial.qml"
    r2_2 = r8;
    if (!r2_2) goto label_11;;
    r2_3 = r9;
    goto label_12;;
    label_11:;
    r2_3 = r7;
    label_12:;
    return int(r2_3);
    {
    }
    label_5:;
    /*
    case 3: return low ? handlePos - quadrantSize : quadrantSize;
    }
    */
    // line 81  "Dial.qml"
    r2_2 = r8;
    if (!r2_2) goto label_13;;
    r2_3 = r9;
    r2_3 = r7 - r2_3;
    goto label_14;;
    label_13:;
    r2_3 = r9;
    label_14:;
    return int(r2_3);
    {
    }
    label_6:;
    // }
    // line 83  "Dial.qml"
    return int();
    
}
int Dial::item_::item__290463231_bindingFunctor::operator()(item_ *self) const
{
    (void) self;
    int r8__width = 0;
    int r2 = 0;
    bool r2_2 = false;
    QUL_DECL_UNUSED backgroundImg_Image * r2_1 = NULL;
    Qul::qreal r2_3 = 0.0;
    Qul::qreal r9 = 0.0;
    int r7 = 0;
    // switch (index) {
    // line 63  "Dial.qml"
    r2 = self->attached_index.value();
    r7 = r2;
    r2 = 0;
    r2_2 = r7 == r2;
    if (r2_2) goto label_0;;
    r2 = 1;
    r2_2 = r7 == r2;
    if (r2_2) {
    goto label_1;};
    r2 = 2;
    r2_2 = r7 == r2;
    if (r2_2) goto label_2;;
    r2 = 3;
    r2_2 = r7 == r2;
    if (r2_2) {
    goto label_3;};
    {
    goto label_4;};
    label_0:;
    // case 0: return backgroundImg.width/2 - width;
    // line 64  "Dial.qml"
    r2_1 = &self->parentScope->backgroundImg;
    r2 = r2_1->width.value();
    r8__width = r2;
    r2 = 2;
    r2_3 = Qul::qreal(r8__width) / r2;
    r9 = r2_3;
    r2 = self->width.value();
    r2_3 = r9 - r2;
    return int(r2_3);
    {
    }
    label_1:;
    // case 1: return 0;
    // line 65  "Dial.qml"
    r2 = 0;
    return r2;
    label_2:;
    // case 2: return backgroundImg.width/2;
    // line 66  "Dial.qml"
    r2_1 = &self->parentScope->backgroundImg;
    r2 = r2_1->width.value();
    r8__width = r2;
    r2 = 2;
    r2_3 = Qul::qreal(r8__width) / r2;
    return int(r2_3);
    {
    }
    label_3:;
    /*
    case 3: return backgroundImg.width - width;
    }
    */
    // line 67  "Dial.qml"
    r2_1 = &self->parentScope->backgroundImg;
    r2 = r2_1->width.value();
    r8__width = r2;
    r2 = self->width.value();
    r2 = r8__width - r2;
    return r2;
    {
    }
    label_4:;
    // }
    // line 69  "Dial.qml"
    return int();
    
}
int Dial::item_::item__1918190639_bindingFunctor::operator()(item_ *self) const
{
    (void) self;
    Qul::qreal r9 = 0.0;
    int r2_1 = 0;
    bool r2_2 = false;
    QUL_DECL_UNUSED backgroundImg_Image * r2 = NULL;
    QUL_DECL_UNUSED handleImg_Image * r2_5 = NULL;
    Qul::qreal r2_3 = 0.0;
    QUL_DECL_UNUSED Dial * r2_4 = NULL;
    int r10__x = 0;
    Qul::qreal r10__angle = 0.0;
    int r12 = 0;
    int r11 = 0;
    Qul::qreal r11_1 = 0.0;
    bool r8 = false;
    Qul::qreal r7 = 0.0;
    Qul::qreal r13 = 0.0;
    // var quadrantSize = backgroundImg.width/2;
    // line 50  "Dial.qml"
    r2 = &self->parentScope->backgroundImg;
    r2_1 = r2->width.value();
    r10__x = r2_1;
    r2_1 = 2;
    r2_3 = Qul::qreal(r10__x) / r2_1;
    r9 = r2_3;
    // if (control.angle < -180 + index*90) return 0;
    // line 51  "Dial.qml"
    r2_4 = self->parentScope;
    r2_3 = r2_4->angle.value();
    r10__angle = r2_3;
    r11 = -180;
    r2_1 = self->attached_index.value();
    r12 = r2_1;
    r2_1 = 90;
    r2_1 = r12 * r2_1;
    r2_1 = r11 + r2_1;
    r2_2 = r10__angle < r2_1;
    if (!r2_2) goto label_0;;
    r2_1 = 0;
    return r2_1;
    label_0:;
    // if (control.angle > -90 + index*90) return quadrantSize;
    // line 52  "Dial.qml"
    r2_4 = self->parentScope;
    r2_3 = r2_4->angle.value();
    r10__angle = r2_3;
    r11 = -90;
    r2_1 = self->attached_index.value();
    r12 = r2_1;
    r2_1 = 90;
    r2_1 = r12 * r2_1;
    r2_1 = r11 + r2_1;
    r2_2 = r10__angle > r2_1;
    if (!r2_2) goto label_1;;
    r2_3 = r9;
    return int(r2_3);
    label_1:;
    // var low = control.angle + 180 - index*90 < 45
    // line 53  "Dial.qml"
    r2_4 = self->parentScope;
    r2_3 = r2_4->angle.value();
    r10__angle = r2_3;
    r2_1 = 180;
    r2_3 = r10__angle + r2_1;
    r11_1 = r2_3;
    r2_1 = self->attached_index.value();
    r12 = r2_1;
    r2_1 = 90;
    r2_1 = r12 * r2_1;
    r2_3 = r11_1 - r2_1;
    r13 = r2_3;
    r2_1 = 45;
    r2_2 = r13 < r2_1;
    r8 = r2_2;
    // var handlePos = (handleImg.x - backgroundImg.x + handleImg.width/2);
    // line 54  "Dial.qml"
    r2_5 = &self->parentScope->handleImg;
    r2_1 = r2_5->x.value();
    r10__x = r2_1;
    r2 = &self->parentScope->backgroundImg;
    r2_1 = r2->x.value();
    r2_1 = r10__x - r2_1;
    r11 = r2_1;
    r2_5 = &self->parentScope->handleImg;
    r2_1 = r2_5->width.value();
    r12 = r2_1;
    r2_1 = 2;
    r2_3 = Qul::qreal(r12) / r2_1;
    r2_3 = r11 + r2_3;
    r7 = r2_3;
    // switch (index) {
    // line 55  "Dial.qml"
    r2_1 = self->attached_index.value();
    r10__x = r2_1;
    r2_1 = 0;
    r2_2 = r10__x == r2_1;
    if (r2_2) goto label_2;;
    r2_1 = 1;
    r2_2 = r10__x == r2_1;
    if (r2_2) goto label_3;;
    r2_1 = 2;
    r2_2 = r10__x == r2_1;
    if (r2_2) goto label_4;;
    r2_1 = 3;
    r2_2 = r10__x == r2_1;
    if (r2_2) goto label_5;;
    {
    
    #if defined(QUL_CC_IAR)
    #pragma diag_suppress=Pe111 // statement is unreachable
    #endif
    
    #if defined(QUL_CC_GHS)
    #pragma ghs nowarning 111 // statement is unreachable
    #endif
    r11_1 = r11;
    
    #if defined(QUL_CC_IAR)
    #pragma diag_default=Pe111 // statement is unreachable
    #endif
    
    #if defined(QUL_CC_GHS)
    #pragma ghs endnowarning 111 // statement is unreachable
    #endif
    goto label_6;};
    label_2:;
    // case 0: return low ? quadrantSize - handlePos : quadrantSize;
    // line 56  "Dial.qml"
    r2_2 = r8;
    if (!r2_2) goto label_7;;
    r2_3 = r7;
    r2_3 = r9 - r2_3;
    goto label_8;;
    label_7:;
    r2_3 = r9;
    label_8:;
    return int(r2_3);
    label_3:;
    // case 1: return low ? quadrantSize : handlePos;
    // line 57  "Dial.qml"
    r2_2 = r8;
    if (!r2_2) goto label_9;;
    r2_3 = r9;
    goto label_10;;
    label_9:;
    r2_3 = r7;
    label_10:;
    return int(r2_3);
    label_4:;
    // case 2: return low ? handlePos - quadrantSize : quadrantSize;
    // line 58  "Dial.qml"
    r2_2 = r8;
    if (!r2_2) goto label_11;;
    r2_3 = r9;
    r2_3 = r7 - r2_3;
    goto label_12;;
    label_11:;
    r2_3 = r9;
    label_12:;
    return int(r2_3);
    label_5:;
    /*
    case 3: return low ? quadrantSize : quadrantSize*2 - handlePos;
    }
    */
    // line 59  "Dial.qml"
    r2_2 = r8;
    if (!r2_2) goto label_13;;
    r2_3 = r9;
    {
    
    #if defined(QUL_CC_IAR)
    #pragma diag_suppress=Pe111 // statement is unreachable
    #endif
    
    #if defined(QUL_CC_GHS)
    #pragma ghs nowarning 111 // statement is unreachable
    #endif
    r11_1 = r11;
    
    #if defined(QUL_CC_IAR)
    #pragma diag_default=Pe111 // statement is unreachable
    #endif
    
    #if defined(QUL_CC_GHS)
    #pragma ghs endnowarning 111 // statement is unreachable
    #endif
    goto label_14;};
    label_13:;
    r2_1 = 2;
    r2_3 = r9 * r2_1;
    r11_1 = r2_3;
    r2_3 = r7;
    r2_3 = r11_1 - r2_3;
    {
    }
    label_14:;
    return int(r2_3);
    {
    }
    label_6:;
    // }
    // line 61  "Dial.qml"
    return int();
    
}
bool Dial::item_::item__876045100_bindingFunctor::operator()(item_ *self) const
{
    (void) self;
    bool r2__enabled = false;
    QUL_DECL_UNUSED Dial * r2 = NULL;
    // visible: control.enabled
    // line 48  "Dial.qml"
    r2 = self->parentScope;
    r2__enabled = r2->enabled.value();
    return r2__enabled;
    
}
int Dial::item_::item__3579183226_bindingFunctor::operator()(item_ *self) const
{
    (void) self;
    int r2__height = 0;
    QUL_DECL_UNUSED backgroundImg_Image * r2 = NULL;
    // height: backgroundImg.height
    // line 98  "Dial.qml"
    r2 = &self->parentScope->backgroundImg;
    r2__height = r2->height.value();
    return r2__height;
    
}
int Dial::item_::item__2358637009_bindingFunctor::operator()(item_ *self) const
{
    (void) self;
    int r2__width = 0;
    QUL_DECL_UNUSED backgroundImg_Image * r2 = NULL;
    // width: backgroundImg.width
    // line 97  "Dial.qml"
    r2 = &self->parentScope->backgroundImg;
    r2__width = r2->width.value();
    return r2__width;
    
}
int Dial::item_::item__3459033655_bindingFunctor::operator()(item_ *self) const
{
    (void) self;
    int r2__y = 0;
    QUL_DECL_UNUSED item_* r2 = NULL;
    // y: -parent.y
    // line 96  "Dial.qml"
    r2 = self->image.parent<item_>();
    r2__y = r2->y.value();
    r2__y=-r2__y;
    return r2__y;
    
}
int Dial::item_::item__3687861180_bindingFunctor::operator()(item_ *self) const
{
    (void) self;
    int r2__x = 0;
    QUL_DECL_UNUSED item_* r2 = NULL;
    // x: -parent.x
    // line 95  "Dial.qml"
    r2 = self->image.parent<item_>();
    r2__x = r2->x.value();
    r2__x=-r2__x;
    return r2__x;
    
}

Dial::item_::item_(Dial *parentScope_)

    : ExtraStorage_itemExtraProperties_this_instance(this)
    , parentScope(parentScope_)
    , _y_binding(item__3986738907_bindingFunctor())
    , _height_binding(item__2493429032_bindingFunctor())
    , _x_binding(item__290463231_bindingFunctor())
    , _width_binding(item__1918190639_bindingFunctor())
    , _visible_binding(item__876045100_bindingFunctor())
    , image_height_binding(item__3579183226_bindingFunctor())
    , image_width_binding(item__2358637009_bindingFunctor())
    , image_y_binding(item__3459033655_bindingFunctor())
    , image_x_binding(item__3687861180_bindingFunctor())
{
    _y_binding.init<item_, &item_::_y_binding>(y);
    // y: {
    // line 84  "Dial.qml"
    y.setBinding (&_y_binding);
    _height_binding.init<item_, &item_::_height_binding>(height);
    // height: {
    // line 71  "Dial.qml"
    height.setBinding (&_height_binding);
    _x_binding.init<item_, &item_::_x_binding>(x);
    // x: {
    // line 62  "Dial.qml"
    x.setBinding (&_x_binding);
    _width_binding.init<item_, &item_::_width_binding>(width);
    // width: {
    // line 49  "Dial.qml"
    width.setBinding (&_width_binding);
    _visible_binding.init<item_, &item_::_visible_binding>(visible);
    // visible: control.enabled
    // line 48  "Dial.qml"
    visible.setBinding (&_visible_binding);
    // clip: true;
    // line 47  "Dial.qml"
    itemExtraProperties->clip.setValue(true);
    // Image {
    // line 93  "Dial.qml"
    appendChild(this, &image);
    image_height_binding.init<item_, &item_::image_height_binding>(image.height);
    // height: backgroundImg.height
    // line 98  "Dial.qml"
    image.height.setBinding (&image_height_binding);
    image_width_binding.init<item_, &item_::image_width_binding>(image.width);
    // width: backgroundImg.width
    // line 97  "Dial.qml"
    image.width.setBinding (&image_width_binding);
    image_y_binding.init<item_, &item_::image_y_binding>(image.y);
    // y: -parent.y
    // line 96  "Dial.qml"
    image.y.setBinding (&image_y_binding);
    image_x_binding.init<item_, &item_::image_x_binding>(image.x);
    // x: -parent.x
    // line 95  "Dial.qml"
    image.x.setBinding (&image_x_binding);
    // source: "qrc:/images/dial-progress.png"
    // line 94  "Dial.qml"
    image.source.setValue(Qul::Private::ImagePrivate::fromRasterBuffer(qul_rasterBuffer_dial_2Dprogress_14694211536943410449_handle));
}

Qul::SharedImage Dial::Dial_2823032336_bindingFunctor::operator()(Dial *self) const
{
    (void) self;
    bool r2__enabled = false;
    QUL_DECL_UNUSED Qul::Private::String r2_1;
    QUL_DECL_UNUSED Dial * r2 = NULL;
    // source: !control.enabled ? "qrc:/images/dial-background-disabled.png" : "qrc:/images/dial-background.png"
    // line 41  "Dial.qml"
    r2 = self;
    r2__enabled = r2->enabled.value();
    r2__enabled = !r2__enabled;
    if (!r2__enabled) goto label_0;;
    r2_1 = Qul::Private::String(Qul::Private::ImageIdValue::create("qrc:/images/dial-background-disabled.png", qul_rasterBuffer_dial_2Dbackground_2Ddisabled_15345896986866248576_handle), 40);
    goto label_1;;
    label_0:;
    r2_1 = Qul::Private::String(Qul::Private::ImageIdValue::create("qrc:/images/dial-background.png", qul_rasterBuffer_dial_2Dbackground_3190004907980333205_handle), 31);
    label_1:;
    return Qul::Private::findImageForString(r2_1);
    
}
int Dial::Dial_2113370248_bindingFunctor::operator()(Dial *self) const
{
    (void) self;
    int r8 = 0;
    int r2_2 = 0;
    Qul::qreal r2_1 = 0.0;
    QUL_DECL_UNUSED Dial * r2 = NULL;
    int r7__height = 0;
    // y: (parent.height - height) / 2
    // line 40  "Dial.qml"
    r2 = self->backgroundImg.parent<Dial >();
    r2_2 = r2->height.value();
    r7__height = r2_2;
    r2_2 = self->backgroundImg.height.value();
    r2_2 = r7__height - r2_2;
    r8 = r2_2;
    r2_2 = 2;
    r2_1 = Qul::qreal(r8) / r2_2;
    return int(r2_1);
    
}
int Dial::Dial_1817330643_bindingFunctor::operator()(Dial *self) const
{
    (void) self;
    int r8 = 0;
    int r2_2 = 0;
    Qul::qreal r2_1 = 0.0;
    QUL_DECL_UNUSED Dial * r2 = NULL;
    int r7__width = 0;
    // x: (parent.width - width) / 2
    // line 39  "Dial.qml"
    r2 = self->backgroundImg.parent<Dial >();
    r2_2 = r2->width.value();
    r7__width = r2_2;
    r2_2 = self->backgroundImg.width.value();
    r2_2 = r7__width - r2_2;
    r8 = r2_2;
    r2_2 = 2;
    r2_1 = Qul::qreal(r8) / r2_2;
    return int(r2_1);
    
}
Qul::qreal Dial::Dial_2264598102_bindingFunctor::operator()(Dial *self) const
{
    (void) self;
    Qul::qreal r8 = 0.0;
    int r2_3 = 0;
    Qul::qreal r2_1 = 0.0;
    QUL_DECL_UNUSED Dial * r2 = NULL;
    QUL_DECL_UNUSED Qul::Private::Builtins::Math * r2_2 = NULL;
    Qul::qreal r9__PI = 0.0;
    Qul::qreal r7__angle = 0.0;
    // readonly property real angleRadians: (control.angle - 90) * (Math.PI / 180)
    // line 34  "Dial.qml"
    r2 = self;
    r2_1 = r2->angle.value();
    r7__angle = r2_1;
    r2_3 = 90;
    r2_1 = r7__angle - r2_3;
    r8 = r2_1;
    r2_2 = &Qul::Private::Builtins::Math ::instance();
    r2_1 = r2_2->PI.value();
    r9__PI = r2_1;
    r2_3 = 180;
    r2_1 = Qul::qreal(r9__PI) / r2_3;
    r2_1 = r8 * r2_1;
    return r2_1;
    
}
int Dial::Dial_400761508_bindingFunctor::operator()(Dial *self) const
{
    (void) self;
    Qul::qreal r8 = 0.0;
    int r2__height = 0;
    Qul::qreal r2_1 = 0.0;
    QUL_DECL_UNUSED Dial * r2 = NULL;
    QUL_DECL_UNUSED Qul::Private::Builtins::Math * r2_3 = NULL;
    Qul::qreal r9 = 0.0;
    int r10 = 0;
    QUL_DECL_UNUSED Qul::Private::Builtins::Math * r11 = NULL;
    Qul::qreal r14 = 0.0;
    int r7__height = 0;
    // y: (control.height / 2) - 15 + (95 * Math.sin(angleRadians))
    // line 32  "Dial.qml"
    r2 = self;
    r2__height = r2->height.value();
    r7__height = r2__height;
    r2__height = 2;
    r2_1 = Qul::qreal(r7__height) / r2__height;
    r8 = r2_1;
    r2__height = 15;
    r2_1 = r8 - r2__height;
    r9 = r2_1;
    r10 = 95;
    r2_3 = &Qul::Private::Builtins::Math ::instance();
    r11 = r2_3;
    r2_1 = self->handleImg.angleRadians.value();
    r14 = r2_1;
    r2_1 = r11->sin(r14);
    r2_1 = r10 * r2_1;
    r2_1 = r9 + r2_1;
    return int(r2_1);
    
}
int Dial::Dial_1937770403_bindingFunctor::operator()(Dial *self) const
{
    (void) self;
    Qul::qreal r8 = 0.0;
    int r2__width = 0;
    Qul::qreal r2_1 = 0.0;
    QUL_DECL_UNUSED Dial * r2 = NULL;
    QUL_DECL_UNUSED Qul::Private::Builtins::Math * r2_3 = NULL;
    Qul::qreal r9 = 0.0;
    int r10 = 0;
    QUL_DECL_UNUSED Qul::Private::Builtins::Math * r11 = NULL;
    Qul::qreal r14 = 0.0;
    int r7__width = 0;
    // x: (control.width / 2) - 21 + (95 * Math.cos(angleRadians))
    // line 31  "Dial.qml"
    r2 = self;
    r2__width = r2->width.value();
    r7__width = r2__width;
    r2__width = 2;
    r2_1 = Qul::qreal(r7__width) / r2__width;
    r8 = r2_1;
    r2__width = 21;
    r2_1 = r8 - r2__width;
    r9 = r2_1;
    r10 = 95;
    r2_3 = &Qul::Private::Builtins::Math ::instance();
    r11 = r2_3;
    r2_1 = self->handleImg.angleRadians.value();
    r14 = r2_1;
    r2_1 = r11->cos(r14);
    r2_1 = r10 * r2_1;
    r2_1 = r9 + r2_1;
    return int(r2_1);
    
}
int Dial::Dial_1979022036_bindingFunctor::operator()(Dial *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;
    // implicitHeight: Math.max((background ? background.implicitHeight : 0) + topInset + bottomInset,
    // line 12  "Dial.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->implicitHeight.value();
    goto label_1;;
    label_0:;
    r2_2 = 0;
    label_1:;
    r12 = r2_2;
    r2_2 = self->topInset.value();
    r2_2 = r12 + r2_2;
    r13 = r2_2;
    r2_2 = self->bottomInset.value();
    r2_2 = r13 + r2_2;
    r10 = r2_2;
    // (contentItem ? contentItem.implicitHeight : 0) + topPadding + bottomPadding)
    // line 13  "Dial.qml"
    r2_3 = self->contentItem.value();
    if (!r2_3) goto label_2;;
    r2_3 = self->contentItem.value();
    r2_2 = r2_3->itemExtraProperties->implicitHeight.value();
    goto label_3;;
    label_2:;
    r2_2 = 0;
    label_3:;
    r12 = r2_2;
    r2_2 = self->topPadding.value();
    r2_2 = r12 + r2_2;
    r13 = r2_2;
    r2_2 = self->bottomPadding.value();
    r2_2 = r13 + r2_2;
    r11 = r2_2;
    r2_1 = r7->max(r10, r11);
    return int(r2_1);
    
}
int Dial::Dial_3988550022_bindingFunctor::operator()(Dial *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 10  "Dial.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 11  "Dial.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);
    
}

Dial::Dial()

    : ExtraStorage_itemExtraProperties_this_instance(this)
    , repeater(this)
    , ExtraStorage_itemExtraProperties_backgroundImg_instance(&backgroundImg)
    , ExtraStorage_itemExtraProperties_handleImg_instance(&handleImg)
    , backgroundImg_source_binding(Dial_2823032336_bindingFunctor())
    , backgroundImg_y_binding(Dial_2113370248_bindingFunctor())
    , backgroundImg_x_binding(Dial_1817330643_bindingFunctor())
    , handleImg_angleRadians_binding(Dial_2264598102_bindingFunctor())
    , handleImg_y_binding(Dial_400761508_bindingFunctor())
    , handleImg_x_binding(Dial_1937770403_bindingFunctor())
    , _implicitHeight_binding(Dial_1979022036_bindingFunctor())
    , _implicitWidth_binding(Dial_3988550022_bindingFunctor())
{
#if __cplusplus < 201103L
    // bottomInset: DefaultStyle.inset
    // line 23  "Dial.qml"
    bottomInset.setValue(5);
    // rightInset: DefaultStyle.inset
    // line 22  "Dial.qml"
    rightInset.setValue(5);
    // topInset: DefaultStyle.inset
    // line 21  "Dial.qml"
    topInset.setValue(5);
    // leftInset: DefaultStyle.inset
    // line 20  "Dial.qml"
    leftInset.setValue(5);
    // bottomPadding: DefaultStyle.padding
    // line 18  "Dial.qml"
    bottomPadding.setValue(5);
    // topPadding: DefaultStyle.padding
    // line 17  "Dial.qml"
    topPadding.setValue(5);
    // rightPadding: DefaultStyle.padding
    // line 16  "Dial.qml"
    rightPadding.setValue(5);
    // leftPadding: DefaultStyle.padding
    // line 15  "Dial.qml"
    leftPadding.setValue(5);
#else
    using OffsetType14508472848368190223 = Qul::Private::Choose<uint16_t, uint32_t, (UINT16_MAX >
        Qul::Private::Max<offsetof(Dial, bottomInset) / 4,
        Qul::Private::Max<offsetof(Dial, rightInset) / 4,
        Qul::Private::Max<offsetof(Dial, topInset) / 4,
        Qul::Private::Max<offsetof(Dial, leftInset) / 4,
        Qul::Private::Max<offsetof(Dial, bottomPadding) / 4,
        Qul::Private::Max<offsetof(Dial, topPadding) / 4,
        Qul::Private::Max<offsetof(Dial, rightPadding) / 4,
        Qul::Private::Max<offsetof(Dial, leftPadding) / 4,
        0
        >::V>::V>::V>::V>::V>::V>::V>::V
        )>::Type;
    OffsetType14508472848368190223 propertyOffsets14508472848368190223[] = {
        std::is_same<decltype(bottomInset), Qul::Property<int>>::value ? (offsetof(Dial, bottomInset) / 4) : std::numeric_limits<OffsetType14508472848368190223>::max(),
        std::is_same<decltype(rightInset), Qul::Property<int>>::value ? (offsetof(Dial, rightInset) / 4) : std::numeric_limits<OffsetType14508472848368190223>::max(),
        std::is_same<decltype(topInset), Qul::Property<int>>::value ? (offsetof(Dial, topInset) / 4) : std::numeric_limits<OffsetType14508472848368190223>::max(),
        std::is_same<decltype(leftInset), Qul::Property<int>>::value ? (offsetof(Dial, leftInset) / 4) : std::numeric_limits<OffsetType14508472848368190223>::max(),
        std::is_same<decltype(bottomPadding), Qul::Property<int>>::value ? (offsetof(Dial, bottomPadding) / 4) : std::numeric_limits<OffsetType14508472848368190223>::max(),
        std::is_same<decltype(topPadding), Qul::Property<int>>::value ? (offsetof(Dial, topPadding) / 4) : std::numeric_limits<OffsetType14508472848368190223>::max(),
        std::is_same<decltype(rightPadding), Qul::Property<int>>::value ? (offsetof(Dial, rightPadding) / 4) : std::numeric_limits<OffsetType14508472848368190223>::max(),
        std::is_same<decltype(leftPadding), Qul::Property<int>>::value ? (offsetof(Dial, leftPadding) / 4) : std::numeric_limits<OffsetType14508472848368190223>::max(),
    };
    static constexpr int8_t propertyValues14508472848368190223[] = {
        // bottomInset: DefaultStyle.inset
        // line 23  "Dial.qml"
        5,
        // rightInset: DefaultStyle.inset
        // line 22  "Dial.qml"
        5,
        // topInset: DefaultStyle.inset
        // line 21  "Dial.qml"
        5,
        // leftInset: DefaultStyle.inset
        // line 20  "Dial.qml"
        5,
        // bottomPadding: DefaultStyle.padding
        // line 18  "Dial.qml"
        5,
        // topPadding: DefaultStyle.padding
        // line 17  "Dial.qml"
        5,
        // rightPadding: DefaultStyle.padding
        // line 16  "Dial.qml"
        5,
        // leftPadding: DefaultStyle.padding
        // line 15  "Dial.qml"
        5,
    };
    Qul::Private::initializeProperties<int>(this, propertyOffsets14508472848368190223, propertyValues14508472848368190223,
        sizeof(propertyOffsets14508472848368190223) / sizeof(propertyOffsets14508472848368190223[0]));
    // bottomInset: DefaultStyle.inset
    // line 23  "Dial.qml"
    if (!std::is_same<decltype(bottomInset), Qul::Property<int>>::value)
        bottomInset.setValue(5);
    // rightInset: DefaultStyle.inset
    // line 22  "Dial.qml"
    if (!std::is_same<decltype(rightInset), Qul::Property<int>>::value)
        rightInset.setValue(5);
    // topInset: DefaultStyle.inset
    // line 21  "Dial.qml"
    if (!std::is_same<decltype(topInset), Qul::Property<int>>::value)
        topInset.setValue(5);
    // leftInset: DefaultStyle.inset
    // line 20  "Dial.qml"
    if (!std::is_same<decltype(leftInset), Qul::Property<int>>::value)
        leftInset.setValue(5);
    // bottomPadding: DefaultStyle.padding
    // line 18  "Dial.qml"
    if (!std::is_same<decltype(bottomPadding), Qul::Property<int>>::value)
        bottomPadding.setValue(5);
    // topPadding: DefaultStyle.padding
    // line 17  "Dial.qml"
    if (!std::is_same<decltype(topPadding), Qul::Property<int>>::value)
        topPadding.setValue(5);
    // rightPadding: DefaultStyle.padding
    // line 16  "Dial.qml"
    if (!std::is_same<decltype(rightPadding), Qul::Property<int>>::value)
        rightPadding.setValue(5);
    // leftPadding: DefaultStyle.padding
    // line 15  "Dial.qml"
    if (!std::is_same<decltype(leftPadding), Qul::Property<int>>::value)
        leftPadding.setValue(5);
#endif
    backgroundImg_source_binding.init<Dial, &Dial::backgroundImg_source_binding>(backgroundImg.source);
    // source: !control.enabled ? "qrc:/images/dial-background-disabled.png" : "qrc:/images/dial-background.png"
    // line 41  "Dial.qml"
    backgroundImg.source.setBinding (&backgroundImg_source_binding);
    backgroundImg_y_binding.init<Dial, &Dial::backgroundImg_y_binding>(backgroundImg.y);
    // y: (parent.height - height) / 2
    // line 40  "Dial.qml"
    backgroundImg.y.setBinding (&backgroundImg_y_binding);
    backgroundImg_x_binding.init<Dial, &Dial::backgroundImg_x_binding>(backgroundImg.x);
    // x: (parent.width - width) / 2
    // line 39  "Dial.qml"
    backgroundImg.x.setBinding (&backgroundImg_x_binding);
    // Repeater {
    // line 43  "Dial.qml"
    appendChild(&this->backgroundImg, &repeater);
    // model: 4 // One for each quadrant
    // line 44  "Dial.qml"
    repeater.model.setValue(&static_model_Dial);
    // background: Image {
    // line 37  "Dial.qml"
    background.setValue(&backgroundImg);
    handleImg_angleRadians_binding.init<Dial, &Dial::handleImg_angleRadians_binding>(handleImg.angleRadians);
    // readonly property real angleRadians: (control.angle - 90) * (Math.PI / 180)
    // line 34  "Dial.qml"
    handleImg.angleRadians.setBinding (&handleImg_angleRadians_binding);
    // source: "qrc:/images/slider-handle.png"
    // line 33  "Dial.qml"
    handleImg.source.setValue(Qul::Private::ImagePrivate::fromRasterBuffer(qul_rasterBuffer_slider_2Dhandle_4014514759752923839_handle));
    handleImg_y_binding.init<Dial, &Dial::handleImg_y_binding>(handleImg.y);
    // y: (control.height / 2) - 15 + (95 * Math.sin(angleRadians))
    // line 32  "Dial.qml"
    handleImg.y.setBinding (&handleImg_y_binding);
    handleImg_x_binding.init<Dial, &Dial::handleImg_x_binding>(handleImg.x);
    // x: (control.width / 2) - 21 + (95 * Math.cos(angleRadians))
    // line 31  "Dial.qml"
    handleImg.x.setBinding (&handleImg_x_binding);
    // handle: Image {
    // line 25  "Dial.qml"
    handle.setValue(&handleImg);
    _implicitHeight_binding.init<Dial, &Dial::_implicitHeight_binding>(itemExtraProperties->implicitHeight);
    // implicitHeight: Math.max((background ? background.implicitHeight : 0) + topInset + bottomInset,
    // line 12  "Dial.qml"
    itemExtraProperties->implicitHeight.setBinding (&_implicitHeight_binding);
    _implicitWidth_binding.init<Dial, &Dial::_implicitWidth_binding>(itemExtraProperties->implicitWidth);
    // implicitWidth: Math.max((background ? background.implicitWidth : 0) + leftInset + rightInset,
    // line 10  "Dial.qml"
    itemExtraProperties->implicitWidth.setBinding (&_implicitWidth_binding);
}

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