// This code is auto-generated by Qul's qmltocpp tool from the file 'CustomListView2.qml' // WARNING! All changes made in this file will be lost! #include "CustomListView2.h" #include #include static const Qul::Private::String qulCurrentFileDir(".", 1); extern Qul::Private::Items::ItemBase *loaderItemAllocator(const Qul::Private::String &uri, const Qul::Private::String ¤tFileDir); namespace Qul { namespace Private { Qul::Property &translationIndexProperty_da39a3ee5e6b4b0d3255bfef95601890afd80709(); extern const uint32_t *qul_translation_offsets_a365ea7a4bd46a5cb2ab0defc702faafa32b71f5(); extern const uint8_t *qul_translations_a365ea7a4bd46a5cb2ab0defc702faafa32b71f5(); }} 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 &translationIndexProperty() { return Qul::Private::translationIndexProperty_da39a3ee5e6b4b0d3255bfef95601890afd80709(); } static int translationIndex() { return translationIndexProperty().value(); } static const char *qul_translation(int entry) { const size_t translationLanguageCount = 1; const uint32_t *offsets = Qul::Private::qul_translation_offsets_a365ea7a4bd46a5cb2ab0defc702faafa32b71f5(); const uint8_t *translations = Qul::Private::qul_translations_a365ea7a4bd46a5cb2ab0defc702faafa32b71f5(); return reinterpret_cast(&translations[offsets[entry * translationLanguageCount + translationIndex()]]); } #if defined(QUL_CC_IAR) #pragma diag_default=Pe177 // declared but never referenced #elif defined(QUL_CC_GNU) #pragma GCC diagnostic pop #endif } Qul::Private::String CustomListView2::text_::text__1581703168_bindingFunctor::operator()(text_ *self) const { (void) self; QUL_DECL_UNUSED Qul::Private::String r2; // text: word // line 12 "CustomListView2.qml" r2 = self->attached_model.value().word.value(); return r2; } CustomListView2::text_::text_(CustomListView2 *parentScope_) : parentScope(parentScope_) , _text_binding(text__1581703168_bindingFunctor()) { _text_binding.init(text); // text: word // line 12 "CustomListView2.qml" text.setBinding (&_text_binding); } Qul::Private::String listview_model_0_word_binding() { QUL_DECL_UNUSED Qul::Private::String r2; // ListElement {word: qsTr("hello2")} // line 7 "CustomListView2.qml" r2 = qul_translation(0); return r2; } Qul::Private::String listview_model_1_word_binding() { QUL_DECL_UNUSED Qul::Private::String r2; // ListElement {word: qsTr("world2")} // line 8 "CustomListView2.qml" r2 = qul_translation(1); return r2; } namespace { struct listview_model_struct { CustomListView2::listmodel_Element modelData[2]; Qul::Private::StaticModel model; listview_model_struct() : model(modelData) { init(); } void init() { modelData[0] = CustomListView2::listmodel_Element( listview_model_0_word_binding() ); modelData[1] = CustomListView2::listmodel_Element( listview_model_1_word_binding() ); } }; listview_model_struct& listview_model_getter() { static listview_model_struct data; return data; }; struct updater_listview_model { void operator()(int /*index*/) const { listview_model_struct& data = listview_model_getter(); data.init(); data.model.modelReset(); } }; #if defined(QUL_CC_IAR) #pragma diag_suppress=Pe177 // declared but never referenced #endif static Qul::Private::ChangedEvent updaterevent_listview_model(updater_listview_model(), &translationIndexProperty()); #if defined(QUL_CC_IAR) #pragma diag_default=Pe177 // declared but never referenced #endif } int CustomListView2::listview_width_anchor_bindingFunctor::operator()(CustomListView2 *self) const { return int(self->width.value()); } int CustomListView2::listview_height_anchor_bindingFunctor::operator()(CustomListView2 *self) const { return int(self->height.value()); } CustomListView2::CustomListView2() : Qul::Private::Items::ItemBase ::ExtraStorage_itemExtraProperties(this) , listview_model(listview_model_getter().model) , listview(this) , listview_width_anchor_binding(listview_width_anchor_bindingFunctor()) , listview_height_anchor_binding(listview_height_anchor_bindingFunctor()) { // ListView { // line 4 "CustomListView2.qml" appendChild(this, &listview); // model: ListModel { // line 6 "CustomListView2.qml" listview.model.setValue(&listview_model); listview.x.setValue(int()); listview_width_anchor_binding.init(listview.width); listview.width.setBinding(&listview_width_anchor_binding); listview.y.setValue(int()); listview_height_anchor_binding.init(listview.height); listview.height.setBinding(&listview_height_anchor_binding); }