#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "gen_qabstractitemmodel.h" #include "_cgo_export.h" void QModelIndex_new(QModelIndex** outptr_QModelIndex) { QModelIndex* ret = new QModelIndex(); *outptr_QModelIndex = ret; } void QModelIndex_new2(QModelIndex* param1, QModelIndex** outptr_QModelIndex) { QModelIndex* ret = new QModelIndex(*param1); *outptr_QModelIndex = ret; } int QModelIndex_Row(const QModelIndex* self) { return self->row(); } int QModelIndex_Column(const QModelIndex* self) { return self->column(); } uintptr_t QModelIndex_InternalId(const QModelIndex* self) { quintptr _ret = self->internalId(); return static_cast(_ret); } void* QModelIndex_InternalPointer(const QModelIndex* self) { return self->internalPointer(); } QModelIndex* QModelIndex_Parent(const QModelIndex* self) { return new QModelIndex(self->parent()); } QModelIndex* QModelIndex_Sibling(const QModelIndex* self, int row, int column) { return new QModelIndex(self->sibling(static_cast(row), static_cast(column))); } QModelIndex* QModelIndex_SiblingAtColumn(const QModelIndex* self, int column) { return new QModelIndex(self->siblingAtColumn(static_cast(column))); } QModelIndex* QModelIndex_SiblingAtRow(const QModelIndex* self, int row) { return new QModelIndex(self->siblingAtRow(static_cast(row))); } QModelIndex* QModelIndex_Child(const QModelIndex* self, int row, int column) { return new QModelIndex(self->child(static_cast(row), static_cast(column))); } QVariant* QModelIndex_Data(const QModelIndex* self) { return new QVariant(self->data()); } int QModelIndex_Flags(const QModelIndex* self) { Qt::ItemFlags _ret = self->flags(); return static_cast(_ret); } QAbstractItemModel* QModelIndex_Model(const QModelIndex* self) { return (QAbstractItemModel*) self->model(); } bool QModelIndex_IsValid(const QModelIndex* self) { return self->isValid(); } bool QModelIndex_OperatorEqual(const QModelIndex* self, QModelIndex* other) { return (*self == *other); } bool QModelIndex_OperatorNotEqual(const QModelIndex* self, QModelIndex* other) { return (*self != *other); } bool QModelIndex_OperatorLesser(const QModelIndex* self, QModelIndex* other) { return (*self < *other); } QVariant* QModelIndex_Data1(const QModelIndex* self, int role) { return new QVariant(self->data(static_cast(role))); } void QModelIndex_Delete(QModelIndex* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); } else { delete self; } } void QPersistentModelIndex_new(QPersistentModelIndex** outptr_QPersistentModelIndex) { QPersistentModelIndex* ret = new QPersistentModelIndex(); *outptr_QPersistentModelIndex = ret; } void QPersistentModelIndex_new2(QModelIndex* index, QPersistentModelIndex** outptr_QPersistentModelIndex) { QPersistentModelIndex* ret = new QPersistentModelIndex(*index); *outptr_QPersistentModelIndex = ret; } void QPersistentModelIndex_new3(QPersistentModelIndex* other, QPersistentModelIndex** outptr_QPersistentModelIndex) { QPersistentModelIndex* ret = new QPersistentModelIndex(*other); *outptr_QPersistentModelIndex = ret; } bool QPersistentModelIndex_OperatorLesser(const QPersistentModelIndex* self, QPersistentModelIndex* other) { return (*self < *other); } bool QPersistentModelIndex_OperatorEqual(const QPersistentModelIndex* self, QPersistentModelIndex* other) { return (*self == *other); } bool QPersistentModelIndex_OperatorNotEqual(const QPersistentModelIndex* self, QPersistentModelIndex* other) { return (*self != *other); } void QPersistentModelIndex_OperatorAssign(QPersistentModelIndex* self, QPersistentModelIndex* other) { self->operator=(*other); } void QPersistentModelIndex_Swap(QPersistentModelIndex* self, QPersistentModelIndex* other) { self->swap(*other); } bool QPersistentModelIndex_OperatorEqualWithOther(const QPersistentModelIndex* self, QModelIndex* other) { return (*self == *other); } bool QPersistentModelIndex_OperatorNotEqualWithOther(const QPersistentModelIndex* self, QModelIndex* other) { return (*self != *other); } void QPersistentModelIndex_OperatorAssignWithOther(QPersistentModelIndex* self, QModelIndex* other) { self->operator=(*other); } int QPersistentModelIndex_Row(const QPersistentModelIndex* self) { return self->row(); } int QPersistentModelIndex_Column(const QPersistentModelIndex* self) { return self->column(); } void* QPersistentModelIndex_InternalPointer(const QPersistentModelIndex* self) { return self->internalPointer(); } uintptr_t QPersistentModelIndex_InternalId(const QPersistentModelIndex* self) { quintptr _ret = self->internalId(); return static_cast(_ret); } QModelIndex* QPersistentModelIndex_Parent(const QPersistentModelIndex* self) { return new QModelIndex(self->parent()); } QModelIndex* QPersistentModelIndex_Sibling(const QPersistentModelIndex* self, int row, int column) { return new QModelIndex(self->sibling(static_cast(row), static_cast(column))); } QModelIndex* QPersistentModelIndex_Child(const QPersistentModelIndex* self, int row, int column) { return new QModelIndex(self->child(static_cast(row), static_cast(column))); } QVariant* QPersistentModelIndex_Data(const QPersistentModelIndex* self) { return new QVariant(self->data()); } int QPersistentModelIndex_Flags(const QPersistentModelIndex* self) { Qt::ItemFlags _ret = self->flags(); return static_cast(_ret); } QAbstractItemModel* QPersistentModelIndex_Model(const QPersistentModelIndex* self) { return (QAbstractItemModel*) self->model(); } bool QPersistentModelIndex_IsValid(const QPersistentModelIndex* self) { return self->isValid(); } QVariant* QPersistentModelIndex_Data1(const QPersistentModelIndex* self, int role) { return new QVariant(self->data(static_cast(role))); } void QPersistentModelIndex_Delete(QPersistentModelIndex* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); } else { delete self; } } QMetaObject* QAbstractItemModel_MetaObject(const QAbstractItemModel* self) { return (QMetaObject*) self->metaObject(); } void* QAbstractItemModel_Metacast(QAbstractItemModel* self, const char* param1) { return self->qt_metacast(param1); } struct miqt_string QAbstractItemModel_Tr(const char* s) { QString _ret = QAbstractItemModel::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 QAbstractItemModel_TrUtf8(const char* s) { QString _ret = QAbstractItemModel::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; } bool QAbstractItemModel_HasIndex(const QAbstractItemModel* self, int row, int column) { return self->hasIndex(static_cast(row), static_cast(column)); } QModelIndex* QAbstractItemModel_Index(const QAbstractItemModel* self, int row, int column, QModelIndex* parent) { return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); } QModelIndex* QAbstractItemModel_Parent(const QAbstractItemModel* self, QModelIndex* child) { return new QModelIndex(self->parent(*child)); } QModelIndex* QAbstractItemModel_Sibling(const QAbstractItemModel* self, int row, int column, QModelIndex* idx) { return new QModelIndex(self->sibling(static_cast(row), static_cast(column), *idx)); } int QAbstractItemModel_RowCount(const QAbstractItemModel* self, QModelIndex* parent) { return self->rowCount(*parent); } int QAbstractItemModel_ColumnCount(const QAbstractItemModel* self, QModelIndex* parent) { return self->columnCount(*parent); } bool QAbstractItemModel_HasChildren(const QAbstractItemModel* self, QModelIndex* parent) { return self->hasChildren(*parent); } QVariant* QAbstractItemModel_Data(const QAbstractItemModel* self, QModelIndex* index, int role) { return new QVariant(self->data(*index, static_cast(role))); } bool QAbstractItemModel_SetData(QAbstractItemModel* self, QModelIndex* index, QVariant* value, int role) { return self->setData(*index, *value, static_cast(role)); } QVariant* QAbstractItemModel_HeaderData(const QAbstractItemModel* self, int section, int orientation, int role) { return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); } bool QAbstractItemModel_SetHeaderData(QAbstractItemModel* self, int section, int orientation, QVariant* value, int role) { return self->setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); } struct miqt_map /* of int to QVariant* */ QAbstractItemModel_ItemData(const QAbstractItemModel* self, QModelIndex* index) { QMap _ret = self->itemData(*index); // Convert QMap<> from C++ memory to manually-managed C memory int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); QVariant** _varr = static_cast(malloc(sizeof(QVariant*) * _ret.size())); int _ctr = 0; for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { _karr[_ctr] = _itr->first; _varr[_ctr] = new QVariant(_itr->second); _ctr++; } struct miqt_map _out; _out.len = _ret.size(); _out.keys = static_cast(_karr); _out.values = static_cast(_varr); return _out; } bool QAbstractItemModel_SetItemData(QAbstractItemModel* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { QMap roles_QMap; int* roles_karr = static_cast(roles.keys); QVariant** roles_varr = static_cast(roles.values); for(size_t i = 0; i < roles.len; ++i) { roles_QMap[static_cast(roles_karr[i])] = *(roles_varr[i]); } return self->setItemData(*index, roles_QMap); } struct miqt_array /* of struct miqt_string */ QAbstractItemModel_MimeTypes(const QAbstractItemModel* self) { QStringList _ret = self->mimeTypes(); // Convert QList<> 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(); struct miqt_string _lv_ms; _lv_ms.len = _lv_b.length(); _lv_ms.data = static_cast(malloc(_lv_ms.len)); memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); _arr[i] = _lv_ms; } struct miqt_array _out; _out.len = _ret.length(); _out.data = static_cast(_arr); return _out; } QMimeData* QAbstractItemModel_MimeData(const QAbstractItemModel* self, struct miqt_array /* of QModelIndex* */ indexes) { QModelIndexList 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 QAbstractItemModel_CanDropMimeData(const QAbstractItemModel* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { return self->canDropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); } bool QAbstractItemModel_DropMimeData(QAbstractItemModel* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { return self->dropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); } int QAbstractItemModel_SupportedDropActions(const QAbstractItemModel* self) { Qt::DropActions _ret = self->supportedDropActions(); return static_cast(_ret); } int QAbstractItemModel_SupportedDragActions(const QAbstractItemModel* self) { Qt::DropActions _ret = self->supportedDragActions(); return static_cast(_ret); } bool QAbstractItemModel_InsertRows(QAbstractItemModel* self, int row, int count, QModelIndex* parent) { return self->insertRows(static_cast(row), static_cast(count), *parent); } bool QAbstractItemModel_InsertColumns(QAbstractItemModel* self, int column, int count, QModelIndex* parent) { return self->insertColumns(static_cast(column), static_cast(count), *parent); } bool QAbstractItemModel_RemoveRows(QAbstractItemModel* self, int row, int count, QModelIndex* parent) { return self->removeRows(static_cast(row), static_cast(count), *parent); } bool QAbstractItemModel_RemoveColumns(QAbstractItemModel* self, int column, int count, QModelIndex* parent) { return self->removeColumns(static_cast(column), static_cast(count), *parent); } bool QAbstractItemModel_MoveRows(QAbstractItemModel* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { return self->moveRows(*sourceParent, static_cast(sourceRow), static_cast(count), *destinationParent, static_cast(destinationChild)); } bool QAbstractItemModel_MoveColumns(QAbstractItemModel* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { return self->moveColumns(*sourceParent, static_cast(sourceColumn), static_cast(count), *destinationParent, static_cast(destinationChild)); } bool QAbstractItemModel_InsertRow(QAbstractItemModel* self, int row) { return self->insertRow(static_cast(row)); } bool QAbstractItemModel_InsertColumn(QAbstractItemModel* self, int column) { return self->insertColumn(static_cast(column)); } bool QAbstractItemModel_RemoveRow(QAbstractItemModel* self, int row) { return self->removeRow(static_cast(row)); } bool QAbstractItemModel_RemoveColumn(QAbstractItemModel* self, int column) { return self->removeColumn(static_cast(column)); } bool QAbstractItemModel_MoveRow(QAbstractItemModel* self, QModelIndex* sourceParent, int sourceRow, QModelIndex* destinationParent, int destinationChild) { return self->moveRow(*sourceParent, static_cast(sourceRow), *destinationParent, static_cast(destinationChild)); } bool QAbstractItemModel_MoveColumn(QAbstractItemModel* self, QModelIndex* sourceParent, int sourceColumn, QModelIndex* destinationParent, int destinationChild) { return self->moveColumn(*sourceParent, static_cast(sourceColumn), *destinationParent, static_cast(destinationChild)); } void QAbstractItemModel_FetchMore(QAbstractItemModel* self, QModelIndex* parent) { self->fetchMore(*parent); } bool QAbstractItemModel_CanFetchMore(const QAbstractItemModel* self, QModelIndex* parent) { return self->canFetchMore(*parent); } int QAbstractItemModel_Flags(const QAbstractItemModel* self, QModelIndex* index) { Qt::ItemFlags _ret = self->flags(*index); return static_cast(_ret); } void QAbstractItemModel_Sort(QAbstractItemModel* self, int column, int order) { self->sort(static_cast(column), static_cast(order)); } QModelIndex* QAbstractItemModel_Buddy(const QAbstractItemModel* self, QModelIndex* index) { return new QModelIndex(self->buddy(*index)); } struct miqt_array /* of QModelIndex* */ QAbstractItemModel_Match(const QAbstractItemModel* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { QModelIndexList _ret = self->match(*start, static_cast(role), *value, static_cast(hits), static_cast(flags)); // Convert QList<> from C++ memory to manually-managed C memory QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); for (size_t i = 0, e = _ret.length(); i < e; ++i) { _arr[i] = new QModelIndex(_ret[i]); } struct miqt_array _out; _out.len = _ret.length(); _out.data = static_cast(_arr); return _out; } QSize* QAbstractItemModel_Span(const QAbstractItemModel* self, QModelIndex* index) { return new QSize(self->span(*index)); } struct miqt_map /* of int to struct miqt_string */ QAbstractItemModel_RoleNames(const QAbstractItemModel* self) { QHash _ret = self->roleNames(); // Convert QMap<> from C++ memory to manually-managed C memory int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); struct miqt_string* _varr = static_cast(malloc(sizeof(struct miqt_string) * _ret.size())); int _ctr = 0; for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { _karr[_ctr] = _itr->first; QByteArray _hashval_qb = _itr->second; struct miqt_string _hashval_ms; _hashval_ms.len = _hashval_qb.length(); _hashval_ms.data = static_cast(malloc(_hashval_ms.len)); memcpy(_hashval_ms.data, _hashval_qb.data(), _hashval_ms.len); _varr[_ctr] = _hashval_ms; _ctr++; } struct miqt_map _out; _out.len = _ret.size(); _out.keys = static_cast(_karr); _out.values = static_cast(_varr); return _out; } bool QAbstractItemModel_CheckIndex(const QAbstractItemModel* self, QModelIndex* index) { return self->checkIndex(*index); } void QAbstractItemModel_DataChanged(QAbstractItemModel* self, QModelIndex* topLeft, QModelIndex* bottomRight) { self->dataChanged(*topLeft, *bottomRight); } void QAbstractItemModel_connect_DataChanged(QAbstractItemModel* self, intptr_t slot) { QAbstractItemModel::connect(self, static_cast&)>(&QAbstractItemModel::dataChanged), self, [=](const QModelIndex& topLeft, const QModelIndex& bottomRight) { const QModelIndex& topLeft_ret = topLeft; // Cast returned reference into pointer QModelIndex* sigval1 = const_cast(&topLeft_ret); const QModelIndex& bottomRight_ret = bottomRight; // Cast returned reference into pointer QModelIndex* sigval2 = const_cast(&bottomRight_ret); miqt_exec_callback_QAbstractItemModel_DataChanged(slot, sigval1, sigval2); }); } void QAbstractItemModel_HeaderDataChanged(QAbstractItemModel* self, int orientation, int first, int last) { self->headerDataChanged(static_cast(orientation), static_cast(first), static_cast(last)); } void QAbstractItemModel_connect_HeaderDataChanged(QAbstractItemModel* self, intptr_t slot) { QAbstractItemModel::connect(self, static_cast(&QAbstractItemModel::headerDataChanged), self, [=](Qt::Orientation orientation, int first, int last) { Qt::Orientation orientation_ret = orientation; int sigval1 = static_cast(orientation_ret); int sigval2 = first; int sigval3 = last; miqt_exec_callback_QAbstractItemModel_HeaderDataChanged(slot, sigval1, sigval2, sigval3); }); } void QAbstractItemModel_LayoutChanged(QAbstractItemModel* self) { self->layoutChanged(); } void QAbstractItemModel_connect_LayoutChanged(QAbstractItemModel* self, intptr_t slot) { QAbstractItemModel::connect(self, static_cast&, QAbstractItemModel::LayoutChangeHint)>(&QAbstractItemModel::layoutChanged), self, [=]() { miqt_exec_callback_QAbstractItemModel_LayoutChanged(slot); }); } void QAbstractItemModel_LayoutAboutToBeChanged(QAbstractItemModel* self) { self->layoutAboutToBeChanged(); } void QAbstractItemModel_connect_LayoutAboutToBeChanged(QAbstractItemModel* self, intptr_t slot) { QAbstractItemModel::connect(self, static_cast&, QAbstractItemModel::LayoutChangeHint)>(&QAbstractItemModel::layoutAboutToBeChanged), self, [=]() { miqt_exec_callback_QAbstractItemModel_LayoutAboutToBeChanged(slot); }); } bool QAbstractItemModel_Submit(QAbstractItemModel* self) { return self->submit(); } void QAbstractItemModel_Revert(QAbstractItemModel* self) { self->revert(); } struct miqt_string QAbstractItemModel_Tr2(const char* s, const char* c) { QString _ret = QAbstractItemModel::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 QAbstractItemModel_Tr3(const char* s, const char* c, int n) { QString _ret = QAbstractItemModel::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 QAbstractItemModel_TrUtf82(const char* s, const char* c) { QString _ret = QAbstractItemModel::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 QAbstractItemModel_TrUtf83(const char* s, const char* c, int n) { QString _ret = QAbstractItemModel::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; } bool QAbstractItemModel_HasIndex3(const QAbstractItemModel* self, int row, int column, QModelIndex* parent) { return self->hasIndex(static_cast(row), static_cast(column), *parent); } bool QAbstractItemModel_InsertRow2(QAbstractItemModel* self, int row, QModelIndex* parent) { return self->insertRow(static_cast(row), *parent); } bool QAbstractItemModel_InsertColumn2(QAbstractItemModel* self, int column, QModelIndex* parent) { return self->insertColumn(static_cast(column), *parent); } bool QAbstractItemModel_RemoveRow2(QAbstractItemModel* self, int row, QModelIndex* parent) { return self->removeRow(static_cast(row), *parent); } bool QAbstractItemModel_RemoveColumn2(QAbstractItemModel* self, int column, QModelIndex* parent) { return self->removeColumn(static_cast(column), *parent); } bool QAbstractItemModel_CheckIndex2(const QAbstractItemModel* self, QModelIndex* index, int options) { return self->checkIndex(*index, static_cast(options)); } void QAbstractItemModel_DataChanged3(QAbstractItemModel* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { QVector roles_QList; roles_QList.reserve(roles.len); int* roles_arr = static_cast(roles.data); for(size_t i = 0; i < roles.len; ++i) { roles_QList.push_back(static_cast(roles_arr[i])); } self->dataChanged(*topLeft, *bottomRight, roles_QList); } void QAbstractItemModel_connect_DataChanged3(QAbstractItemModel* self, intptr_t slot) { QAbstractItemModel::connect(self, static_cast&)>(&QAbstractItemModel::dataChanged), self, [=](const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles) { const QModelIndex& topLeft_ret = topLeft; // Cast returned reference into pointer QModelIndex* sigval1 = const_cast(&topLeft_ret); const QModelIndex& bottomRight_ret = bottomRight; // Cast returned reference into pointer QModelIndex* sigval2 = const_cast(&bottomRight_ret); const QVector& roles_ret = roles; // Convert QList<> from C++ memory to manually-managed C memory int* roles_arr = static_cast(malloc(sizeof(int) * roles_ret.length())); for (size_t i = 0, e = roles_ret.length(); i < e; ++i) { roles_arr[i] = roles_ret[i]; } struct miqt_array roles_out; roles_out.len = roles_ret.length(); roles_out.data = static_cast(roles_arr); struct miqt_array /* of int */ sigval3 = roles_out; miqt_exec_callback_QAbstractItemModel_DataChanged3(slot, sigval1, sigval2, sigval3); }); } void QAbstractItemModel_LayoutChanged1(QAbstractItemModel* self, struct miqt_array /* of QPersistentModelIndex* */ parents) { QList parents_QList; parents_QList.reserve(parents.len); QPersistentModelIndex** parents_arr = static_cast(parents.data); for(size_t i = 0; i < parents.len; ++i) { parents_QList.push_back(*(parents_arr[i])); } self->layoutChanged(parents_QList); } void QAbstractItemModel_connect_LayoutChanged1(QAbstractItemModel* self, intptr_t slot) { QAbstractItemModel::connect(self, static_cast&, QAbstractItemModel::LayoutChangeHint)>(&QAbstractItemModel::layoutChanged), self, [=](const QList& parents) { const QList& parents_ret = parents; // Convert QList<> from C++ memory to manually-managed C memory QPersistentModelIndex** parents_arr = static_cast(malloc(sizeof(QPersistentModelIndex*) * parents_ret.length())); for (size_t i = 0, e = parents_ret.length(); i < e; ++i) { parents_arr[i] = new QPersistentModelIndex(parents_ret[i]); } struct miqt_array parents_out; parents_out.len = parents_ret.length(); parents_out.data = static_cast(parents_arr); struct miqt_array /* of QPersistentModelIndex* */ sigval1 = parents_out; miqt_exec_callback_QAbstractItemModel_LayoutChanged1(slot, sigval1); }); } void QAbstractItemModel_LayoutChanged2(QAbstractItemModel* self, struct miqt_array /* of QPersistentModelIndex* */ parents, int hint) { QList parents_QList; parents_QList.reserve(parents.len); QPersistentModelIndex** parents_arr = static_cast(parents.data); for(size_t i = 0; i < parents.len; ++i) { parents_QList.push_back(*(parents_arr[i])); } self->layoutChanged(parents_QList, static_cast(hint)); } void QAbstractItemModel_connect_LayoutChanged2(QAbstractItemModel* self, intptr_t slot) { QAbstractItemModel::connect(self, static_cast&, QAbstractItemModel::LayoutChangeHint)>(&QAbstractItemModel::layoutChanged), self, [=](const QList& parents, QAbstractItemModel::LayoutChangeHint hint) { const QList& parents_ret = parents; // Convert QList<> from C++ memory to manually-managed C memory QPersistentModelIndex** parents_arr = static_cast(malloc(sizeof(QPersistentModelIndex*) * parents_ret.length())); for (size_t i = 0, e = parents_ret.length(); i < e; ++i) { parents_arr[i] = new QPersistentModelIndex(parents_ret[i]); } struct miqt_array parents_out; parents_out.len = parents_ret.length(); parents_out.data = static_cast(parents_arr); struct miqt_array /* of QPersistentModelIndex* */ sigval1 = parents_out; QAbstractItemModel::LayoutChangeHint hint_ret = hint; int sigval2 = static_cast(hint_ret); miqt_exec_callback_QAbstractItemModel_LayoutChanged2(slot, sigval1, sigval2); }); } void QAbstractItemModel_LayoutAboutToBeChanged1(QAbstractItemModel* self, struct miqt_array /* of QPersistentModelIndex* */ parents) { QList parents_QList; parents_QList.reserve(parents.len); QPersistentModelIndex** parents_arr = static_cast(parents.data); for(size_t i = 0; i < parents.len; ++i) { parents_QList.push_back(*(parents_arr[i])); } self->layoutAboutToBeChanged(parents_QList); } void QAbstractItemModel_connect_LayoutAboutToBeChanged1(QAbstractItemModel* self, intptr_t slot) { QAbstractItemModel::connect(self, static_cast&, QAbstractItemModel::LayoutChangeHint)>(&QAbstractItemModel::layoutAboutToBeChanged), self, [=](const QList& parents) { const QList& parents_ret = parents; // Convert QList<> from C++ memory to manually-managed C memory QPersistentModelIndex** parents_arr = static_cast(malloc(sizeof(QPersistentModelIndex*) * parents_ret.length())); for (size_t i = 0, e = parents_ret.length(); i < e; ++i) { parents_arr[i] = new QPersistentModelIndex(parents_ret[i]); } struct miqt_array parents_out; parents_out.len = parents_ret.length(); parents_out.data = static_cast(parents_arr); struct miqt_array /* of QPersistentModelIndex* */ sigval1 = parents_out; miqt_exec_callback_QAbstractItemModel_LayoutAboutToBeChanged1(slot, sigval1); }); } void QAbstractItemModel_LayoutAboutToBeChanged2(QAbstractItemModel* self, struct miqt_array /* of QPersistentModelIndex* */ parents, int hint) { QList parents_QList; parents_QList.reserve(parents.len); QPersistentModelIndex** parents_arr = static_cast(parents.data); for(size_t i = 0; i < parents.len; ++i) { parents_QList.push_back(*(parents_arr[i])); } self->layoutAboutToBeChanged(parents_QList, static_cast(hint)); } void QAbstractItemModel_connect_LayoutAboutToBeChanged2(QAbstractItemModel* self, intptr_t slot) { QAbstractItemModel::connect(self, static_cast&, QAbstractItemModel::LayoutChangeHint)>(&QAbstractItemModel::layoutAboutToBeChanged), self, [=](const QList& parents, QAbstractItemModel::LayoutChangeHint hint) { const QList& parents_ret = parents; // Convert QList<> from C++ memory to manually-managed C memory QPersistentModelIndex** parents_arr = static_cast(malloc(sizeof(QPersistentModelIndex*) * parents_ret.length())); for (size_t i = 0, e = parents_ret.length(); i < e; ++i) { parents_arr[i] = new QPersistentModelIndex(parents_ret[i]); } struct miqt_array parents_out; parents_out.len = parents_ret.length(); parents_out.data = static_cast(parents_arr); struct miqt_array /* of QPersistentModelIndex* */ sigval1 = parents_out; QAbstractItemModel::LayoutChangeHint hint_ret = hint; int sigval2 = static_cast(hint_ret); miqt_exec_callback_QAbstractItemModel_LayoutAboutToBeChanged2(slot, sigval1, sigval2); }); } void QAbstractItemModel_Delete(QAbstractItemModel* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); } else { delete self; } } QMetaObject* QAbstractTableModel_MetaObject(const QAbstractTableModel* self) { return (QMetaObject*) self->metaObject(); } void* QAbstractTableModel_Metacast(QAbstractTableModel* self, const char* param1) { return self->qt_metacast(param1); } struct miqt_string QAbstractTableModel_Tr(const char* s) { QString _ret = QAbstractTableModel::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 QAbstractTableModel_TrUtf8(const char* s) { QString _ret = QAbstractTableModel::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; } QModelIndex* QAbstractTableModel_Index(const QAbstractTableModel* self, int row, int column, QModelIndex* parent) { return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); } QModelIndex* QAbstractTableModel_Sibling(const QAbstractTableModel* self, int row, int column, QModelIndex* idx) { return new QModelIndex(self->sibling(static_cast(row), static_cast(column), *idx)); } bool QAbstractTableModel_DropMimeData(QAbstractTableModel* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { return self->dropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); } int QAbstractTableModel_Flags(const QAbstractTableModel* self, QModelIndex* index) { Qt::ItemFlags _ret = self->flags(*index); return static_cast(_ret); } struct miqt_string QAbstractTableModel_Tr2(const char* s, const char* c) { QString _ret = QAbstractTableModel::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 QAbstractTableModel_Tr3(const char* s, const char* c, int n) { QString _ret = QAbstractTableModel::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 QAbstractTableModel_TrUtf82(const char* s, const char* c) { QString _ret = QAbstractTableModel::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 QAbstractTableModel_TrUtf83(const char* s, const char* c, int n) { QString _ret = QAbstractTableModel::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 QAbstractTableModel_Delete(QAbstractTableModel* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); } else { delete self; } } QMetaObject* QAbstractListModel_MetaObject(const QAbstractListModel* self) { return (QMetaObject*) self->metaObject(); } void* QAbstractListModel_Metacast(QAbstractListModel* self, const char* param1) { return self->qt_metacast(param1); } struct miqt_string QAbstractListModel_Tr(const char* s) { QString _ret = QAbstractListModel::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 QAbstractListModel_TrUtf8(const char* s) { QString _ret = QAbstractListModel::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; } QModelIndex* QAbstractListModel_Index(const QAbstractListModel* self, int row, int column, QModelIndex* parent) { return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); } QModelIndex* QAbstractListModel_Sibling(const QAbstractListModel* self, int row, int column, QModelIndex* idx) { return new QModelIndex(self->sibling(static_cast(row), static_cast(column), *idx)); } bool QAbstractListModel_DropMimeData(QAbstractListModel* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { return self->dropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); } int QAbstractListModel_Flags(const QAbstractListModel* self, QModelIndex* index) { Qt::ItemFlags _ret = self->flags(*index); return static_cast(_ret); } struct miqt_string QAbstractListModel_Tr2(const char* s, const char* c) { QString _ret = QAbstractListModel::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 QAbstractListModel_Tr3(const char* s, const char* c, int n) { QString _ret = QAbstractListModel::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 QAbstractListModel_TrUtf82(const char* s, const char* c) { QString _ret = QAbstractListModel::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 QAbstractListModel_TrUtf83(const char* s, const char* c, int n) { QString _ret = QAbstractListModel::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 QAbstractListModel_Delete(QAbstractListModel* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); } else { delete self; } }