#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "qstandarditemmodel.h" #include "gen_qstandarditemmodel.h" #include "_cgo_export.h" QStandardItem* QStandardItem_new() { return new QStandardItem(); } QStandardItem* QStandardItem_new2(struct miqt_string* text) { QString text_QString = QString::fromUtf8(&text->data, text->len); return new QStandardItem(text_QString); } QStandardItem* QStandardItem_new3(QIcon* icon, struct miqt_string* text) { QString text_QString = QString::fromUtf8(&text->data, text->len); return new QStandardItem(*icon, text_QString); } QStandardItem* QStandardItem_new4(int rows) { return new QStandardItem(static_cast(rows)); } QStandardItem* QStandardItem_new5(int rows, int columns) { return new QStandardItem(static_cast(rows), static_cast(columns)); } QVariant* QStandardItem_Data(const QStandardItem* self) { QVariant _ret = self->data(); // Copy-construct value returned type into heap-allocated copy return static_cast(new QVariant(_ret)); } void QStandardItem_SetData(QStandardItem* self, QVariant* value) { self->setData(*value); } void QStandardItem_ClearData(QStandardItem* self) { self->clearData(); } struct miqt_string* QStandardItem_Text(const QStandardItem* self) { QString _ret = self->text(); // 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 QStandardItem_SetText(QStandardItem* self, struct miqt_string* text) { QString text_QString = QString::fromUtf8(&text->data, text->len); self->setText(text_QString); } QIcon* QStandardItem_Icon(const QStandardItem* self) { QIcon _ret = self->icon(); // Copy-construct value returned type into heap-allocated copy return static_cast(new QIcon(_ret)); } void QStandardItem_SetIcon(QStandardItem* self, QIcon* icon) { self->setIcon(*icon); } struct miqt_string* QStandardItem_ToolTip(const QStandardItem* self) { QString _ret = self->toolTip(); // 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 QStandardItem_SetToolTip(QStandardItem* self, struct miqt_string* toolTip) { QString toolTip_QString = QString::fromUtf8(&toolTip->data, toolTip->len); self->setToolTip(toolTip_QString); } struct miqt_string* QStandardItem_StatusTip(const QStandardItem* self) { QString _ret = self->statusTip(); // 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 QStandardItem_SetStatusTip(QStandardItem* self, struct miqt_string* statusTip) { QString statusTip_QString = QString::fromUtf8(&statusTip->data, statusTip->len); self->setStatusTip(statusTip_QString); } struct miqt_string* QStandardItem_WhatsThis(const QStandardItem* self) { QString _ret = self->whatsThis(); // 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 QStandardItem_SetWhatsThis(QStandardItem* self, struct miqt_string* whatsThis) { QString whatsThis_QString = QString::fromUtf8(&whatsThis->data, whatsThis->len); self->setWhatsThis(whatsThis_QString); } QSize* QStandardItem_SizeHint(const QStandardItem* self) { QSize _ret = self->sizeHint(); // Copy-construct value returned type into heap-allocated copy return static_cast(new QSize(_ret)); } void QStandardItem_SetSizeHint(QStandardItem* self, QSize* sizeHint) { self->setSizeHint(*sizeHint); } QFont* QStandardItem_Font(const QStandardItem* self) { QFont _ret = self->font(); // Copy-construct value returned type into heap-allocated copy return static_cast(new QFont(_ret)); } void QStandardItem_SetFont(QStandardItem* self, QFont* font) { self->setFont(*font); } int QStandardItem_TextAlignment(const QStandardItem* self) { Qt::Alignment _ret = self->textAlignment(); return static_cast(_ret); } void QStandardItem_SetTextAlignment(QStandardItem* self, int textAlignment) { self->setTextAlignment(static_cast(textAlignment)); } QBrush* QStandardItem_Background(const QStandardItem* self) { QBrush _ret = self->background(); // Copy-construct value returned type into heap-allocated copy return static_cast(new QBrush(_ret)); } void QStandardItem_SetBackground(QStandardItem* self, QBrush* brush) { self->setBackground(*brush); } QBrush* QStandardItem_Foreground(const QStandardItem* self) { QBrush _ret = self->foreground(); // Copy-construct value returned type into heap-allocated copy return static_cast(new QBrush(_ret)); } void QStandardItem_SetForeground(QStandardItem* self, QBrush* brush) { self->setForeground(*brush); } uintptr_t QStandardItem_CheckState(const QStandardItem* self) { Qt::CheckState _ret = self->checkState(); return static_cast(_ret); } void QStandardItem_SetCheckState(QStandardItem* self, uintptr_t checkState) { self->setCheckState(static_cast(checkState)); } struct miqt_string* QStandardItem_AccessibleText(const QStandardItem* self) { QString _ret = self->accessibleText(); // 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 QStandardItem_SetAccessibleText(QStandardItem* self, struct miqt_string* accessibleText) { QString accessibleText_QString = QString::fromUtf8(&accessibleText->data, accessibleText->len); self->setAccessibleText(accessibleText_QString); } struct miqt_string* QStandardItem_AccessibleDescription(const QStandardItem* self) { QString _ret = self->accessibleDescription(); // 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 QStandardItem_SetAccessibleDescription(QStandardItem* self, struct miqt_string* accessibleDescription) { QString accessibleDescription_QString = QString::fromUtf8(&accessibleDescription->data, accessibleDescription->len); self->setAccessibleDescription(accessibleDescription_QString); } int QStandardItem_Flags(const QStandardItem* self) { Qt::ItemFlags _ret = self->flags(); return static_cast(_ret); } void QStandardItem_SetFlags(QStandardItem* self, int flags) { self->setFlags(static_cast(flags)); } bool QStandardItem_IsEnabled(const QStandardItem* self) { return self->isEnabled(); } void QStandardItem_SetEnabled(QStandardItem* self, bool enabled) { self->setEnabled(enabled); } bool QStandardItem_IsEditable(const QStandardItem* self) { return self->isEditable(); } void QStandardItem_SetEditable(QStandardItem* self, bool editable) { self->setEditable(editable); } bool QStandardItem_IsSelectable(const QStandardItem* self) { return self->isSelectable(); } void QStandardItem_SetSelectable(QStandardItem* self, bool selectable) { self->setSelectable(selectable); } bool QStandardItem_IsCheckable(const QStandardItem* self) { return self->isCheckable(); } void QStandardItem_SetCheckable(QStandardItem* self, bool checkable) { self->setCheckable(checkable); } bool QStandardItem_IsAutoTristate(const QStandardItem* self) { return self->isAutoTristate(); } void QStandardItem_SetAutoTristate(QStandardItem* self, bool tristate) { self->setAutoTristate(tristate); } bool QStandardItem_IsUserTristate(const QStandardItem* self) { return self->isUserTristate(); } void QStandardItem_SetUserTristate(QStandardItem* self, bool tristate) { self->setUserTristate(tristate); } bool QStandardItem_IsTristate(const QStandardItem* self) { return self->isTristate(); } void QStandardItem_SetTristate(QStandardItem* self, bool tristate) { self->setTristate(tristate); } bool QStandardItem_IsDragEnabled(const QStandardItem* self) { return self->isDragEnabled(); } void QStandardItem_SetDragEnabled(QStandardItem* self, bool dragEnabled) { self->setDragEnabled(dragEnabled); } bool QStandardItem_IsDropEnabled(const QStandardItem* self) { return self->isDropEnabled(); } void QStandardItem_SetDropEnabled(QStandardItem* self, bool dropEnabled) { self->setDropEnabled(dropEnabled); } QStandardItem* QStandardItem_Parent(const QStandardItem* self) { return self->parent(); } int QStandardItem_Row(const QStandardItem* self) { return self->row(); } int QStandardItem_Column(const QStandardItem* self) { return self->column(); } QModelIndex* QStandardItem_Index(const QStandardItem* self) { QModelIndex _ret = self->index(); // Copy-construct value returned type into heap-allocated copy return static_cast(new QModelIndex(_ret)); } QStandardItemModel* QStandardItem_Model(const QStandardItem* self) { return self->model(); } int QStandardItem_RowCount(const QStandardItem* self) { return self->rowCount(); } void QStandardItem_SetRowCount(QStandardItem* self, int rows) { self->setRowCount(static_cast(rows)); } int QStandardItem_ColumnCount(const QStandardItem* self) { return self->columnCount(); } void QStandardItem_SetColumnCount(QStandardItem* self, int columns) { self->setColumnCount(static_cast(columns)); } bool QStandardItem_HasChildren(const QStandardItem* self) { return self->hasChildren(); } QStandardItem* QStandardItem_Child(const QStandardItem* self, int row) { return self->child(static_cast(row)); } void QStandardItem_SetChild(QStandardItem* self, int row, int column, QStandardItem* item) { self->setChild(static_cast(row), static_cast(column), item); } void QStandardItem_SetChild2(QStandardItem* self, int row, QStandardItem* item) { self->setChild(static_cast(row), item); } void QStandardItem_InsertRow(QStandardItem* self, int row, struct miqt_array* /* of QStandardItem* */ items) { QList items_QList; items_QList.reserve(items->len); QStandardItem** items_arr = static_cast(items->data); for(size_t i = 0; i < items->len; ++i) { items_QList.push_back(items_arr[i]); } self->insertRow(static_cast(row), items_QList); } void QStandardItem_InsertColumn(QStandardItem* self, int column, struct miqt_array* /* of QStandardItem* */ items) { QList items_QList; items_QList.reserve(items->len); QStandardItem** items_arr = static_cast(items->data); for(size_t i = 0; i < items->len; ++i) { items_QList.push_back(items_arr[i]); } self->insertColumn(static_cast(column), items_QList); } void QStandardItem_InsertRows(QStandardItem* self, int row, struct miqt_array* /* of QStandardItem* */ items) { QList items_QList; items_QList.reserve(items->len); QStandardItem** items_arr = static_cast(items->data); for(size_t i = 0; i < items->len; ++i) { items_QList.push_back(items_arr[i]); } self->insertRows(static_cast(row), items_QList); } void QStandardItem_InsertRows2(QStandardItem* self, int row, int count) { self->insertRows(static_cast(row), static_cast(count)); } void QStandardItem_InsertColumns(QStandardItem* self, int column, int count) { self->insertColumns(static_cast(column), static_cast(count)); } void QStandardItem_RemoveRow(QStandardItem* self, int row) { self->removeRow(static_cast(row)); } void QStandardItem_RemoveColumn(QStandardItem* self, int column) { self->removeColumn(static_cast(column)); } void QStandardItem_RemoveRows(QStandardItem* self, int row, int count) { self->removeRows(static_cast(row), static_cast(count)); } void QStandardItem_RemoveColumns(QStandardItem* self, int column, int count) { self->removeColumns(static_cast(column), static_cast(count)); } void QStandardItem_AppendRow(QStandardItem* self, struct miqt_array* /* of QStandardItem* */ items) { QList items_QList; items_QList.reserve(items->len); QStandardItem** items_arr = static_cast(items->data); for(size_t i = 0; i < items->len; ++i) { items_QList.push_back(items_arr[i]); } self->appendRow(items_QList); } void QStandardItem_AppendRows(QStandardItem* self, struct miqt_array* /* of QStandardItem* */ items) { QList items_QList; items_QList.reserve(items->len); QStandardItem** items_arr = static_cast(items->data); for(size_t i = 0; i < items->len; ++i) { items_QList.push_back(items_arr[i]); } self->appendRows(items_QList); } void QStandardItem_AppendColumn(QStandardItem* self, struct miqt_array* /* of QStandardItem* */ items) { QList items_QList; items_QList.reserve(items->len); QStandardItem** items_arr = static_cast(items->data); for(size_t i = 0; i < items->len; ++i) { items_QList.push_back(items_arr[i]); } self->appendColumn(items_QList); } void QStandardItem_InsertRow2(QStandardItem* self, int row, QStandardItem* item) { self->insertRow(static_cast(row), item); } void QStandardItem_AppendRowWithItem(QStandardItem* self, QStandardItem* item) { self->appendRow(item); } QStandardItem* QStandardItem_TakeChild(QStandardItem* self, int row) { return self->takeChild(static_cast(row)); } struct miqt_array* QStandardItem_TakeRow(QStandardItem* self, int row) { QList _ret = self->takeRow(static_cast(row)); // Convert QList<> from C++ memory to manually-managed C memory QStandardItem** _arr = static_cast(malloc(sizeof(QStandardItem*) * _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_array* QStandardItem_TakeColumn(QStandardItem* self, int column) { QList _ret = self->takeColumn(static_cast(column)); // Convert QList<> from C++ memory to manually-managed C memory QStandardItem** _arr = static_cast(malloc(sizeof(QStandardItem*) * _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; } void QStandardItem_SortChildren(QStandardItem* self, int column) { self->sortChildren(static_cast(column)); } QStandardItem* QStandardItem_Clone(const QStandardItem* self) { return self->clone(); } int QStandardItem_Type(const QStandardItem* self) { return self->type(); } void QStandardItem_Read(QStandardItem* self, QDataStream* in) { self->read(*in); } void QStandardItem_Write(const QStandardItem* self, QDataStream* out) { self->write(*out); } bool QStandardItem_OperatorLesser(const QStandardItem* self, QStandardItem* other) { return self->operator<(*other); } QVariant* QStandardItem_Data1(const QStandardItem* self, int role) { QVariant _ret = self->data(static_cast(role)); // Copy-construct value returned type into heap-allocated copy return static_cast(new QVariant(_ret)); } void QStandardItem_SetData2(QStandardItem* self, QVariant* value, int role) { self->setData(*value, static_cast(role)); } QStandardItem* QStandardItem_Child2(const QStandardItem* self, int row, int column) { return self->child(static_cast(row), static_cast(column)); } QStandardItem* QStandardItem_TakeChild2(QStandardItem* self, int row, int column) { return self->takeChild(static_cast(row), static_cast(column)); } void QStandardItem_SortChildren2(QStandardItem* self, int column, uintptr_t order) { self->sortChildren(static_cast(column), static_cast(order)); } void QStandardItem_Delete(QStandardItem* self) { delete self; } QStandardItemModel* QStandardItemModel_new() { return new QStandardItemModel(); } QStandardItemModel* QStandardItemModel_new2(int rows, int columns) { return new QStandardItemModel(static_cast(rows), static_cast(columns)); } QStandardItemModel* QStandardItemModel_new3(QObject* parent) { return new QStandardItemModel(parent); } QStandardItemModel* QStandardItemModel_new4(int rows, int columns, QObject* parent) { return new QStandardItemModel(static_cast(rows), static_cast(columns), parent); } QMetaObject* QStandardItemModel_MetaObject(const QStandardItemModel* self) { return (QMetaObject*) self->metaObject(); } struct miqt_string* QStandardItemModel_Tr(const char* s) { QString _ret = QStandardItemModel::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* QStandardItemModel_TrUtf8(const char* s) { QString _ret = QStandardItemModel::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()); } QModelIndex* QStandardItemModel_Index(const QStandardItemModel* self, int row, int column) { QModelIndex _ret = self->index(static_cast(row), static_cast(column)); // Copy-construct value returned type into heap-allocated copy return static_cast(new QModelIndex(_ret)); } QModelIndex* QStandardItemModel_Parent(const QStandardItemModel* self, QModelIndex* child) { QModelIndex _ret = self->parent(*child); // Copy-construct value returned type into heap-allocated copy return static_cast(new QModelIndex(_ret)); } int QStandardItemModel_RowCount(const QStandardItemModel* self) { return self->rowCount(); } int QStandardItemModel_ColumnCount(const QStandardItemModel* self) { return self->columnCount(); } bool QStandardItemModel_HasChildren(const QStandardItemModel* self) { return self->hasChildren(); } QModelIndex* QStandardItemModel_Sibling(const QStandardItemModel* self, int row, int column, QModelIndex* idx) { QModelIndex _ret = self->sibling(static_cast(row), static_cast(column), *idx); // Copy-construct value returned type into heap-allocated copy return static_cast(new QModelIndex(_ret)); } QVariant* QStandardItemModel_Data(const QStandardItemModel* self, QModelIndex* index) { QVariant _ret = self->data(*index); // Copy-construct value returned type into heap-allocated copy return static_cast(new QVariant(_ret)); } bool QStandardItemModel_SetData(QStandardItemModel* self, QModelIndex* index, QVariant* value) { return self->setData(*index, *value); } bool QStandardItemModel_ClearItemData(QStandardItemModel* self, QModelIndex* index) { return self->clearItemData(*index); } QVariant* QStandardItemModel_HeaderData(const QStandardItemModel* self, int section, uintptr_t orientation) { QVariant _ret = self->headerData(static_cast(section), static_cast(orientation)); // Copy-construct value returned type into heap-allocated copy return static_cast(new QVariant(_ret)); } bool QStandardItemModel_SetHeaderData(QStandardItemModel* self, int section, uintptr_t orientation, QVariant* value) { return self->setHeaderData(static_cast(section), static_cast(orientation), *value); } bool QStandardItemModel_InsertRows(QStandardItemModel* self, int row, int count) { return self->insertRows(static_cast(row), static_cast(count)); } bool QStandardItemModel_InsertColumns(QStandardItemModel* self, int column, int count) { return self->insertColumns(static_cast(column), static_cast(count)); } bool QStandardItemModel_RemoveRows(QStandardItemModel* self, int row, int count) { return self->removeRows(static_cast(row), static_cast(count)); } bool QStandardItemModel_RemoveColumns(QStandardItemModel* self, int column, int count) { return self->removeColumns(static_cast(column), static_cast(count)); } int QStandardItemModel_Flags(const QStandardItemModel* self, QModelIndex* index) { Qt::ItemFlags _ret = self->flags(*index); return static_cast(_ret); } int QStandardItemModel_SupportedDropActions(const QStandardItemModel* self) { Qt::DropActions _ret = self->supportedDropActions(); return static_cast(_ret); } void QStandardItemModel_Clear(QStandardItemModel* self) { self->clear(); } void QStandardItemModel_Sort(QStandardItemModel* self, int column) { self->sort(static_cast(column)); } QStandardItem* QStandardItemModel_ItemFromIndex(const QStandardItemModel* self, QModelIndex* index) { return self->itemFromIndex(*index); } QModelIndex* QStandardItemModel_IndexFromItem(const QStandardItemModel* self, QStandardItem* item) { QModelIndex _ret = self->indexFromItem(item); // Copy-construct value returned type into heap-allocated copy return static_cast(new QModelIndex(_ret)); } QStandardItem* QStandardItemModel_Item(const QStandardItemModel* self, int row) { return self->item(static_cast(row)); } void QStandardItemModel_SetItem(QStandardItemModel* self, int row, int column, QStandardItem* item) { self->setItem(static_cast(row), static_cast(column), item); } void QStandardItemModel_SetItem2(QStandardItemModel* self, int row, QStandardItem* item) { self->setItem(static_cast(row), item); } QStandardItem* QStandardItemModel_InvisibleRootItem(const QStandardItemModel* self) { return self->invisibleRootItem(); } QStandardItem* QStandardItemModel_HorizontalHeaderItem(const QStandardItemModel* self, int column) { return self->horizontalHeaderItem(static_cast(column)); } void QStandardItemModel_SetHorizontalHeaderItem(QStandardItemModel* self, int column, QStandardItem* item) { self->setHorizontalHeaderItem(static_cast(column), item); } QStandardItem* QStandardItemModel_VerticalHeaderItem(const QStandardItemModel* self, int row) { return self->verticalHeaderItem(static_cast(row)); } void QStandardItemModel_SetVerticalHeaderItem(QStandardItemModel* self, int row, QStandardItem* item) { self->setVerticalHeaderItem(static_cast(row), item); } void QStandardItemModel_SetHorizontalHeaderLabels(QStandardItemModel* self, struct miqt_array* /* of struct miqt_string* */ labels) { QList labels_QList; labels_QList.reserve(labels->len); miqt_string** labels_arr = static_cast(labels->data); for(size_t i = 0; i < labels->len; ++i) { labels_QList.push_back(QString::fromUtf8(& labels_arr[i]->data, labels_arr[i]->len)); } self->setHorizontalHeaderLabels(labels_QList); } void QStandardItemModel_SetVerticalHeaderLabels(QStandardItemModel* self, struct miqt_array* /* of struct miqt_string* */ labels) { QList labels_QList; labels_QList.reserve(labels->len); miqt_string** labels_arr = static_cast(labels->data); for(size_t i = 0; i < labels->len; ++i) { labels_QList.push_back(QString::fromUtf8(& labels_arr[i]->data, labels_arr[i]->len)); } self->setVerticalHeaderLabels(labels_QList); } void QStandardItemModel_SetRowCount(QStandardItemModel* self, int rows) { self->setRowCount(static_cast(rows)); } void QStandardItemModel_SetColumnCount(QStandardItemModel* self, int columns) { self->setColumnCount(static_cast(columns)); } void QStandardItemModel_AppendRow(QStandardItemModel* self, struct miqt_array* /* of QStandardItem* */ items) { QList items_QList; items_QList.reserve(items->len); QStandardItem** items_arr = static_cast(items->data); for(size_t i = 0; i < items->len; ++i) { items_QList.push_back(items_arr[i]); } self->appendRow(items_QList); } void QStandardItemModel_AppendColumn(QStandardItemModel* self, struct miqt_array* /* of QStandardItem* */ items) { QList items_QList; items_QList.reserve(items->len); QStandardItem** items_arr = static_cast(items->data); for(size_t i = 0; i < items->len; ++i) { items_QList.push_back(items_arr[i]); } self->appendColumn(items_QList); } void QStandardItemModel_AppendRowWithItem(QStandardItemModel* self, QStandardItem* item) { self->appendRow(item); } void QStandardItemModel_InsertRow(QStandardItemModel* self, int row, struct miqt_array* /* of QStandardItem* */ items) { QList items_QList; items_QList.reserve(items->len); QStandardItem** items_arr = static_cast(items->data); for(size_t i = 0; i < items->len; ++i) { items_QList.push_back(items_arr[i]); } self->insertRow(static_cast(row), items_QList); } void QStandardItemModel_InsertColumn(QStandardItemModel* self, int column, struct miqt_array* /* of QStandardItem* */ items) { QList items_QList; items_QList.reserve(items->len); QStandardItem** items_arr = static_cast(items->data); for(size_t i = 0; i < items->len; ++i) { items_QList.push_back(items_arr[i]); } self->insertColumn(static_cast(column), items_QList); } void QStandardItemModel_InsertRow2(QStandardItemModel* self, int row, QStandardItem* item) { self->insertRow(static_cast(row), item); } bool QStandardItemModel_InsertRowWithRow(QStandardItemModel* self, int row) { return self->insertRow(static_cast(row)); } bool QStandardItemModel_InsertColumnWithColumn(QStandardItemModel* self, int column) { return self->insertColumn(static_cast(column)); } QStandardItem* QStandardItemModel_TakeItem(QStandardItemModel* self, int row) { return self->takeItem(static_cast(row)); } struct miqt_array* QStandardItemModel_TakeRow(QStandardItemModel* self, int row) { QList _ret = self->takeRow(static_cast(row)); // Convert QList<> from C++ memory to manually-managed C memory QStandardItem** _arr = static_cast(malloc(sizeof(QStandardItem*) * _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_array* QStandardItemModel_TakeColumn(QStandardItemModel* self, int column) { QList _ret = self->takeColumn(static_cast(column)); // Convert QList<> from C++ memory to manually-managed C memory QStandardItem** _arr = static_cast(malloc(sizeof(QStandardItem*) * _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; } QStandardItem* QStandardItemModel_TakeHorizontalHeaderItem(QStandardItemModel* self, int column) { return self->takeHorizontalHeaderItem(static_cast(column)); } QStandardItem* QStandardItemModel_TakeVerticalHeaderItem(QStandardItemModel* self, int row) { return self->takeVerticalHeaderItem(static_cast(row)); } QStandardItem* QStandardItemModel_ItemPrototype(const QStandardItemModel* self) { return (QStandardItem*) self->itemPrototype(); } void QStandardItemModel_SetItemPrototype(QStandardItemModel* self, QStandardItem* item) { self->setItemPrototype(item); } struct miqt_array* QStandardItemModel_FindItems(const QStandardItemModel* self, struct miqt_string* text) { QString text_QString = QString::fromUtf8(&text->data, text->len); QList _ret = self->findItems(text_QString); // Convert QList<> from C++ memory to manually-managed C memory QStandardItem** _arr = static_cast(malloc(sizeof(QStandardItem*) * _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; } int QStandardItemModel_SortRole(const QStandardItemModel* self) { return self->sortRole(); } void QStandardItemModel_SetSortRole(QStandardItemModel* self, int role) { self->setSortRole(static_cast(role)); } struct miqt_array* QStandardItemModel_MimeTypes(const QStandardItemModel* self) { QStringList _ret = self->mimeTypes(); // Convert QStringList from C++ memory to manually-managed C memory struct miqt_string** _arr = static_cast(malloc(sizeof(struct miqt_string*) * _ret.length())); for (size_t i = 0, e = _ret.length(); i < e; ++i) { QString _lv_ret = _ret[i]; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _lv_b = _lv_ret.toUtf8(); _arr[i] = miqt_strdup(_lv_b.data(), _lv_b.length()); } struct miqt_array* _out = static_cast(malloc(sizeof(struct miqt_array))); _out->len = _ret.length(); _out->data = static_cast(_arr); return _out; } QMimeData* QStandardItemModel_MimeData(const QStandardItemModel* self, struct miqt_array* /* of QModelIndex* */ indexes) { QList indexes_QList; indexes_QList.reserve(indexes->len); QModelIndex** indexes_arr = static_cast(indexes->data); for(size_t i = 0; i < indexes->len; ++i) { indexes_QList.push_back(*(indexes_arr[i])); } return self->mimeData(indexes_QList); } bool QStandardItemModel_DropMimeData(QStandardItemModel* self, QMimeData* data, uintptr_t action, int row, int column, QModelIndex* parent) { return self->dropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); } void QStandardItemModel_ItemChanged(QStandardItemModel* self, QStandardItem* item) { self->itemChanged(item); } void QStandardItemModel_connect_ItemChanged(QStandardItemModel* self, void* slot) { QStandardItemModel::connect(self, static_cast(&QStandardItemModel::itemChanged), self, [=](QStandardItem* item) { QStandardItem* sigval1 = item; miqt_exec_callback_QStandardItemModel_ItemChanged(slot, sigval1); }); } struct miqt_string* QStandardItemModel_Tr2(const char* s, const char* c) { QString _ret = QStandardItemModel::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* QStandardItemModel_Tr3(const char* s, const char* c, int n) { QString _ret = QStandardItemModel::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* QStandardItemModel_TrUtf82(const char* s, const char* c) { QString _ret = QStandardItemModel::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* QStandardItemModel_TrUtf83(const char* s, const char* c, int n) { QString _ret = QStandardItemModel::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()); } QModelIndex* QStandardItemModel_Index3(const QStandardItemModel* self, int row, int column, QModelIndex* parent) { QModelIndex _ret = self->index(static_cast(row), static_cast(column), *parent); // Copy-construct value returned type into heap-allocated copy return static_cast(new QModelIndex(_ret)); } int QStandardItemModel_RowCount1(const QStandardItemModel* self, QModelIndex* parent) { return self->rowCount(*parent); } int QStandardItemModel_ColumnCount1(const QStandardItemModel* self, QModelIndex* parent) { return self->columnCount(*parent); } bool QStandardItemModel_HasChildren1(const QStandardItemModel* self, QModelIndex* parent) { return self->hasChildren(*parent); } QVariant* QStandardItemModel_Data2(const QStandardItemModel* self, QModelIndex* index, int role) { QVariant _ret = self->data(*index, static_cast(role)); // Copy-construct value returned type into heap-allocated copy return static_cast(new QVariant(_ret)); } bool QStandardItemModel_SetData3(QStandardItemModel* self, QModelIndex* index, QVariant* value, int role) { return self->setData(*index, *value, static_cast(role)); } QVariant* QStandardItemModel_HeaderData3(const QStandardItemModel* self, int section, uintptr_t orientation, int role) { QVariant _ret = self->headerData(static_cast(section), static_cast(orientation), static_cast(role)); // Copy-construct value returned type into heap-allocated copy return static_cast(new QVariant(_ret)); } bool QStandardItemModel_SetHeaderData4(QStandardItemModel* self, int section, uintptr_t orientation, QVariant* value, int role) { return self->setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); } bool QStandardItemModel_InsertRows3(QStandardItemModel* self, int row, int count, QModelIndex* parent) { return self->insertRows(static_cast(row), static_cast(count), *parent); } bool QStandardItemModel_InsertColumns3(QStandardItemModel* self, int column, int count, QModelIndex* parent) { return self->insertColumns(static_cast(column), static_cast(count), *parent); } bool QStandardItemModel_RemoveRows3(QStandardItemModel* self, int row, int count, QModelIndex* parent) { return self->removeRows(static_cast(row), static_cast(count), *parent); } bool QStandardItemModel_RemoveColumns3(QStandardItemModel* self, int column, int count, QModelIndex* parent) { return self->removeColumns(static_cast(column), static_cast(count), *parent); } void QStandardItemModel_Sort2(QStandardItemModel* self, int column, uintptr_t order) { self->sort(static_cast(column), static_cast(order)); } QStandardItem* QStandardItemModel_Item2(const QStandardItemModel* self, int row, int column) { return self->item(static_cast(row), static_cast(column)); } bool QStandardItemModel_InsertRow22(QStandardItemModel* self, int row, QModelIndex* parent) { return self->insertRow(static_cast(row), *parent); } bool QStandardItemModel_InsertColumn2(QStandardItemModel* self, int column, QModelIndex* parent) { return self->insertColumn(static_cast(column), *parent); } QStandardItem* QStandardItemModel_TakeItem2(QStandardItemModel* self, int row, int column) { return self->takeItem(static_cast(row), static_cast(column)); } struct miqt_array* QStandardItemModel_FindItems2(const QStandardItemModel* self, struct miqt_string* text, int flags) { QString text_QString = QString::fromUtf8(&text->data, text->len); QList _ret = self->findItems(text_QString, static_cast(flags)); // Convert QList<> from C++ memory to manually-managed C memory QStandardItem** _arr = static_cast(malloc(sizeof(QStandardItem*) * _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_array* QStandardItemModel_FindItems3(const QStandardItemModel* self, struct miqt_string* text, int flags, int column) { QString text_QString = QString::fromUtf8(&text->data, text->len); QList _ret = self->findItems(text_QString, static_cast(flags), static_cast(column)); // Convert QList<> from C++ memory to manually-managed C memory QStandardItem** _arr = static_cast(malloc(sizeof(QStandardItem*) * _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; } void QStandardItemModel_Delete(QStandardItemModel* self) { delete self; }