#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "gen_qcolumnview.h" #include "_cgo_export.h" QColumnView* QColumnView_new(QWidget* parent) { return new QColumnView(parent); } QColumnView* QColumnView_new2() { return new QColumnView(); } QMetaObject* QColumnView_MetaObject(const QColumnView* self) { return (QMetaObject*) self->metaObject(); } void* QColumnView_Metacast(QColumnView* self, const char* param1) { return self->qt_metacast(param1); } 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(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } 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(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } void QColumnView_UpdatePreviewWidget(QColumnView* self, QModelIndex* index) { self->updatePreviewWidget(*index); } void QColumnView_connect_UpdatePreviewWidget(QColumnView* self, intptr_t 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) { return new QModelIndex(self->indexAt(*point)); } void QColumnView_ScrollTo(QColumnView* self, QModelIndex* index) { self->scrollTo(*index); } QSize* QColumnView_SizeHint(const QColumnView* self) { return new QSize(self->sizeHint()); } QRect* QColumnView_VisualRect(const QColumnView* self, QModelIndex* index) { return new QRect(self->visualRect(*index)); } 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(static_cast(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; _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(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } 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(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } 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(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } 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(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } void QColumnView_ScrollTo2(QColumnView* self, QModelIndex* index, int hint) { self->scrollTo(*index, static_cast(hint)); } void QColumnView_Delete(QColumnView* self) { delete self; }