#include #include #include #include #include #include #include #include #include #include #include #include #include #include "qcolumnview.h" #include "gen_qcolumnview.h" #include "_cgo_export.h" QColumnView* QColumnView_new() { return new QColumnView(); } QColumnView* QColumnView_new2(QWidget* parent) { return new QColumnView(parent); } QMetaObject* QColumnView_MetaObject(const QColumnView* self) { return (QMetaObject*) self->metaObject(); } struct miqt_string* QColumnView_Tr(const char* s) { QString _ret = QColumnView::tr(s); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); return miqt_strdup(_b.data(), _b.length()); } struct miqt_string* QColumnView_TrUtf8(const char* s) { QString _ret = QColumnView::trUtf8(s); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); return miqt_strdup(_b.data(), _b.length()); } void QColumnView_UpdatePreviewWidget(QColumnView* self, QModelIndex* index) { self->updatePreviewWidget(*index); } void QColumnView_connect_UpdatePreviewWidget(QColumnView* self, void* slot) { QColumnView::connect(self, static_cast(&QColumnView::updatePreviewWidget), self, [=](const QModelIndex& index) { const QModelIndex& index_ret = index; // Cast returned reference into pointer QModelIndex* sigval1 = const_cast(&index_ret); miqt_exec_callback_QColumnView_UpdatePreviewWidget(slot, sigval1); }); } QModelIndex* QColumnView_IndexAt(const QColumnView* self, QPoint* point) { QModelIndex _ret = self->indexAt(*point); // Copy-construct value returned type into heap-allocated copy return static_cast(new QModelIndex(_ret)); } void QColumnView_ScrollTo(QColumnView* self, QModelIndex* index) { self->scrollTo(*index); } QSize* QColumnView_SizeHint(const QColumnView* self) { QSize _ret = self->sizeHint(); // Copy-construct value returned type into heap-allocated copy return static_cast(new QSize(_ret)); } QRect* QColumnView_VisualRect(const QColumnView* self, QModelIndex* index) { QRect _ret = self->visualRect(*index); // Copy-construct value returned type into heap-allocated copy return static_cast(new QRect(_ret)); } void QColumnView_SetModel(QColumnView* self, QAbstractItemModel* model) { self->setModel(model); } void QColumnView_SetSelectionModel(QColumnView* self, QItemSelectionModel* selectionModel) { self->setSelectionModel(selectionModel); } void QColumnView_SetRootIndex(QColumnView* self, QModelIndex* index) { self->setRootIndex(*index); } void QColumnView_SelectAll(QColumnView* self) { self->selectAll(); } void QColumnView_SetResizeGripsVisible(QColumnView* self, bool visible) { self->setResizeGripsVisible(visible); } bool QColumnView_ResizeGripsVisible(const QColumnView* self) { return self->resizeGripsVisible(); } QWidget* QColumnView_PreviewWidget(const QColumnView* self) { return self->previewWidget(); } void QColumnView_SetPreviewWidget(QColumnView* self, QWidget* widget) { self->setPreviewWidget(widget); } void QColumnView_SetColumnWidths(QColumnView* self, struct miqt_array* /* of int */ list) { QList list_QList; list_QList.reserve(list->len); int* list_arr = static_cast(list->data); for(size_t i = 0; i < list->len; ++i) { list_QList.push_back(list_arr[i]); } self->setColumnWidths(list_QList); } struct miqt_array* QColumnView_ColumnWidths(const QColumnView* self) { QList _ret = self->columnWidths(); // Convert QList<> from C++ memory to manually-managed C memory int* _arr = static_cast(malloc(sizeof(int) * _ret.length())); for (size_t i = 0, e = _ret.length(); i < e; ++i) { _arr[i] = _ret[i]; } struct miqt_array* _out = static_cast(malloc(sizeof(struct miqt_array))); _out->len = _ret.length(); _out->data = static_cast(_arr); return _out; } struct miqt_string* QColumnView_Tr2(const char* s, const char* c) { QString _ret = QColumnView::tr(s, c); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); return miqt_strdup(_b.data(), _b.length()); } struct miqt_string* QColumnView_Tr3(const char* s, const char* c, int n) { QString _ret = QColumnView::tr(s, c, static_cast(n)); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); return miqt_strdup(_b.data(), _b.length()); } struct miqt_string* QColumnView_TrUtf82(const char* s, const char* c) { QString _ret = QColumnView::trUtf8(s, c); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); return miqt_strdup(_b.data(), _b.length()); } struct miqt_string* QColumnView_TrUtf83(const char* s, const char* c, int n) { QString _ret = QColumnView::trUtf8(s, c, static_cast(n)); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); return miqt_strdup(_b.data(), _b.length()); } void QColumnView_ScrollTo2(QColumnView* self, QModelIndex* index, uintptr_t hint) { self->scrollTo(*index, static_cast(hint)); } void QColumnView_Delete(QColumnView* self) { delete self; }