#include #include #include #include #include #include #include #include #include #include #include #include "qidentityproxymodel.h" #include "gen_qidentityproxymodel.h" #include "_cgo_export.h" QIdentityProxyModel* QIdentityProxyModel_new() { return new QIdentityProxyModel(); } QIdentityProxyModel* QIdentityProxyModel_new2(QObject* parent) { return new QIdentityProxyModel(parent); } QMetaObject* QIdentityProxyModel_MetaObject(const QIdentityProxyModel* self) { return (QMetaObject*) self->metaObject(); } struct miqt_string* QIdentityProxyModel_Tr(const char* s) { QString _ret = QIdentityProxyModel::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* QIdentityProxyModel_TrUtf8(const char* s) { QString _ret = QIdentityProxyModel::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()); } int QIdentityProxyModel_ColumnCount(const QIdentityProxyModel* self) { return self->columnCount(); } QModelIndex* QIdentityProxyModel_Index(const QIdentityProxyModel* 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* QIdentityProxyModel_MapFromSource(const QIdentityProxyModel* self, QModelIndex* sourceIndex) { QModelIndex _ret = self->mapFromSource(*sourceIndex); // Copy-construct value returned type into heap-allocated copy return static_cast(new QModelIndex(_ret)); } QModelIndex* QIdentityProxyModel_MapToSource(const QIdentityProxyModel* self, QModelIndex* proxyIndex) { QModelIndex _ret = self->mapToSource(*proxyIndex); // Copy-construct value returned type into heap-allocated copy return static_cast(new QModelIndex(_ret)); } QModelIndex* QIdentityProxyModel_Parent(const QIdentityProxyModel* self, QModelIndex* child) { QModelIndex _ret = self->parent(*child); // Copy-construct value returned type into heap-allocated copy return static_cast(new QModelIndex(_ret)); } int QIdentityProxyModel_RowCount(const QIdentityProxyModel* self) { return self->rowCount(); } QVariant* QIdentityProxyModel_HeaderData(const QIdentityProxyModel* 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 QIdentityProxyModel_DropMimeData(QIdentityProxyModel* 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); } QModelIndex* QIdentityProxyModel_Sibling(const QIdentityProxyModel* 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)); } struct miqt_array* QIdentityProxyModel_Match(const QIdentityProxyModel* self, QModelIndex* start, int role, QVariant* value) { QModelIndexList _ret = self->match(*start, static_cast(role), *value); // Convert QList<> from C++ memory to manually-managed C memory of copy-constructed pointers 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 = static_cast(malloc(sizeof(struct miqt_array))); _out->len = _ret.length(); _out->data = static_cast(_arr); return _out; } void QIdentityProxyModel_SetSourceModel(QIdentityProxyModel* self, QAbstractItemModel* sourceModel) { self->setSourceModel(sourceModel); } bool QIdentityProxyModel_InsertColumns(QIdentityProxyModel* self, int column, int count) { return self->insertColumns(static_cast(column), static_cast(count)); } bool QIdentityProxyModel_InsertRows(QIdentityProxyModel* self, int row, int count) { return self->insertRows(static_cast(row), static_cast(count)); } bool QIdentityProxyModel_RemoveColumns(QIdentityProxyModel* self, int column, int count) { return self->removeColumns(static_cast(column), static_cast(count)); } bool QIdentityProxyModel_RemoveRows(QIdentityProxyModel* self, int row, int count) { return self->removeRows(static_cast(row), static_cast(count)); } bool QIdentityProxyModel_MoveRows(QIdentityProxyModel* 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 QIdentityProxyModel_MoveColumns(QIdentityProxyModel* 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)); } struct miqt_string* QIdentityProxyModel_Tr2(const char* s, const char* c) { QString _ret = QIdentityProxyModel::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* QIdentityProxyModel_Tr3(const char* s, const char* c, int n) { QString _ret = QIdentityProxyModel::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* QIdentityProxyModel_TrUtf82(const char* s, const char* c) { QString _ret = QIdentityProxyModel::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* QIdentityProxyModel_TrUtf83(const char* s, const char* c, int n) { QString _ret = QIdentityProxyModel::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()); } int QIdentityProxyModel_ColumnCount1(const QIdentityProxyModel* self, QModelIndex* parent) { return self->columnCount(*parent); } QModelIndex* QIdentityProxyModel_Index3(const QIdentityProxyModel* 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 QIdentityProxyModel_RowCount1(const QIdentityProxyModel* self, QModelIndex* parent) { return self->rowCount(*parent); } QVariant* QIdentityProxyModel_HeaderData3(const QIdentityProxyModel* 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)); } struct miqt_array* QIdentityProxyModel_Match4(const QIdentityProxyModel* self, QModelIndex* start, int role, QVariant* value, int hits) { QModelIndexList _ret = self->match(*start, static_cast(role), *value, static_cast(hits)); // Convert QList<> from C++ memory to manually-managed C memory of copy-constructed pointers 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 = static_cast(malloc(sizeof(struct miqt_array))); _out->len = _ret.length(); _out->data = static_cast(_arr); return _out; } struct miqt_array* QIdentityProxyModel_Match5(const QIdentityProxyModel* 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 of copy-constructed pointers 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 = static_cast(malloc(sizeof(struct miqt_array))); _out->len = _ret.length(); _out->data = static_cast(_arr); return _out; } bool QIdentityProxyModel_InsertColumns3(QIdentityProxyModel* self, int column, int count, QModelIndex* parent) { return self->insertColumns(static_cast(column), static_cast(count), *parent); } bool QIdentityProxyModel_InsertRows3(QIdentityProxyModel* self, int row, int count, QModelIndex* parent) { return self->insertRows(static_cast(row), static_cast(count), *parent); } bool QIdentityProxyModel_RemoveColumns3(QIdentityProxyModel* self, int column, int count, QModelIndex* parent) { return self->removeColumns(static_cast(column), static_cast(count), *parent); } bool QIdentityProxyModel_RemoveRows3(QIdentityProxyModel* self, int row, int count, QModelIndex* parent) { return self->removeRows(static_cast(row), static_cast(count), *parent); } void QIdentityProxyModel_Delete(QIdentityProxyModel* self) { delete self; }