2024-08-25 04:08:24 +00:00
|
|
|
#include <QAbstractItemModel>
|
|
|
|
#include <QItemSelectionModel>
|
|
|
|
#include <QItemSelectionRange>
|
|
|
|
#include <QList>
|
|
|
|
#include <QMetaObject>
|
|
|
|
#include <QModelIndex>
|
|
|
|
#include <QObject>
|
|
|
|
#include <QPersistentModelIndex>
|
|
|
|
#include <QString>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
|
|
|
#include "qitemselectionmodel.h"
|
|
|
|
#include "gen_qitemselectionmodel.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
QItemSelectionRange* QItemSelectionRange_new() {
|
|
|
|
return new QItemSelectionRange();
|
|
|
|
}
|
|
|
|
|
|
|
|
QItemSelectionRange* QItemSelectionRange_new2(QItemSelectionRange* other) {
|
|
|
|
return new QItemSelectionRange(*other);
|
|
|
|
}
|
|
|
|
|
|
|
|
QItemSelectionRange* QItemSelectionRange_new3(QModelIndex* topL, QModelIndex* bottomR) {
|
|
|
|
return new QItemSelectionRange(*topL, *bottomR);
|
|
|
|
}
|
|
|
|
|
|
|
|
QItemSelectionRange* QItemSelectionRange_new4(QModelIndex* index) {
|
|
|
|
return new QItemSelectionRange(*index);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QItemSelectionRange_OperatorAssign(QItemSelectionRange* self, QItemSelectionRange* other) {
|
|
|
|
self->operator=(*other);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QItemSelectionRange_Swap(QItemSelectionRange* self, QItemSelectionRange* other) {
|
|
|
|
self->swap(*other);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QItemSelectionRange_Top(const QItemSelectionRange* self) {
|
|
|
|
return self->top();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QItemSelectionRange_Left(const QItemSelectionRange* self) {
|
|
|
|
return self->left();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QItemSelectionRange_Bottom(const QItemSelectionRange* self) {
|
|
|
|
return self->bottom();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QItemSelectionRange_Right(const QItemSelectionRange* self) {
|
|
|
|
return self->right();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QItemSelectionRange_Width(const QItemSelectionRange* self) {
|
|
|
|
return self->width();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QItemSelectionRange_Height(const QItemSelectionRange* self) {
|
|
|
|
return self->height();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPersistentModelIndex* QItemSelectionRange_TopLeft(const QItemSelectionRange* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QPersistentModelIndex& _ret = self->topLeft();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return const_cast<QPersistentModelIndex*>(&_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPersistentModelIndex* QItemSelectionRange_BottomRight(const QItemSelectionRange* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QPersistentModelIndex& _ret = self->bottomRight();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return const_cast<QPersistentModelIndex*>(&_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QModelIndex* QItemSelectionRange_Parent(const QItemSelectionRange* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QModelIndex(self->parent());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QAbstractItemModel* QItemSelectionRange_Model(const QItemSelectionRange* self) {
|
|
|
|
return (QAbstractItemModel*) self->model();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QItemSelectionRange_Contains(const QItemSelectionRange* self, QModelIndex* index) {
|
|
|
|
return self->contains(*index);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QItemSelectionRange_Contains2(const QItemSelectionRange* self, int row, int column, QModelIndex* parentIndex) {
|
|
|
|
return self->contains(static_cast<int>(row), static_cast<int>(column), *parentIndex);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QItemSelectionRange_Intersects(const QItemSelectionRange* self, QItemSelectionRange* other) {
|
|
|
|
return self->intersects(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QItemSelectionRange* QItemSelectionRange_Intersected(const QItemSelectionRange* self, QItemSelectionRange* other) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QItemSelectionRange(self->intersected(*other));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QItemSelectionRange_OperatorEqual(const QItemSelectionRange* self, QItemSelectionRange* other) {
|
|
|
|
return self->operator==(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QItemSelectionRange_OperatorNotEqual(const QItemSelectionRange* self, QItemSelectionRange* other) {
|
|
|
|
return self->operator!=(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QItemSelectionRange_OperatorLesser(const QItemSelectionRange* self, QItemSelectionRange* other) {
|
|
|
|
return self->operator<(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QItemSelectionRange_IsValid(const QItemSelectionRange* self) {
|
|
|
|
return self->isValid();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QItemSelectionRange_IsEmpty(const QItemSelectionRange* self) {
|
|
|
|
return self->isEmpty();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_array* QItemSelectionRange_Indexes(const QItemSelectionRange* self) {
|
|
|
|
QModelIndexList _ret = self->indexes();
|
2024-09-17 06:29:11 +00:00
|
|
|
// Convert QList<> from C++ memory to manually-managed C memory
|
|
|
|
QModelIndex** _arr = static_cast<QModelIndex**>(malloc(sizeof(QModelIndex*) * _ret.length()));
|
2024-09-14 22:29:05 +00:00
|
|
|
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
|
|
|
_arr[i] = new QModelIndex(_ret[i]);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
|
|
|
_out->len = _ret.length();
|
|
|
|
_out->data = static_cast<void*>(_arr);
|
|
|
|
return _out;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QItemSelectionRange_Delete(QItemSelectionRange* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|
|
|
|
QItemSelectionModel* QItemSelectionModel_new() {
|
|
|
|
return new QItemSelectionModel();
|
|
|
|
}
|
|
|
|
|
|
|
|
QItemSelectionModel* QItemSelectionModel_new2(QAbstractItemModel* model, QObject* parent) {
|
|
|
|
return new QItemSelectionModel(model, parent);
|
|
|
|
}
|
|
|
|
|
|
|
|
QItemSelectionModel* QItemSelectionModel_new3(QAbstractItemModel* model) {
|
|
|
|
return new QItemSelectionModel(model);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMetaObject* QItemSelectionModel_MetaObject(const QItemSelectionModel* self) {
|
|
|
|
return (QMetaObject*) self->metaObject();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QItemSelectionModel_Tr(const char* s) {
|
|
|
|
QString _ret = QItemSelectionModel::tr(s);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QItemSelectionModel_TrUtf8(const char* s) {
|
|
|
|
QString _ret = QItemSelectionModel::trUtf8(s);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QModelIndex* QItemSelectionModel_CurrentIndex(const QItemSelectionModel* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QModelIndex(self->currentIndex());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QItemSelectionModel_IsSelected(const QItemSelectionModel* self, QModelIndex* index) {
|
|
|
|
return self->isSelected(*index);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QItemSelectionModel_IsRowSelected(const QItemSelectionModel* self, int row) {
|
|
|
|
return self->isRowSelected(static_cast<int>(row));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QItemSelectionModel_IsColumnSelected(const QItemSelectionModel* self, int column) {
|
|
|
|
return self->isColumnSelected(static_cast<int>(column));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QItemSelectionModel_RowIntersectsSelection(const QItemSelectionModel* self, int row) {
|
|
|
|
return self->rowIntersectsSelection(static_cast<int>(row));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QItemSelectionModel_ColumnIntersectsSelection(const QItemSelectionModel* self, int column) {
|
|
|
|
return self->columnIntersectsSelection(static_cast<int>(column));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QItemSelectionModel_HasSelection(const QItemSelectionModel* self) {
|
|
|
|
return self->hasSelection();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_array* QItemSelectionModel_SelectedIndexes(const QItemSelectionModel* self) {
|
|
|
|
QModelIndexList _ret = self->selectedIndexes();
|
2024-09-17 06:29:11 +00:00
|
|
|
// Convert QList<> from C++ memory to manually-managed C memory
|
|
|
|
QModelIndex** _arr = static_cast<QModelIndex**>(malloc(sizeof(QModelIndex*) * _ret.length()));
|
2024-09-14 22:29:05 +00:00
|
|
|
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
|
|
|
_arr[i] = new QModelIndex(_ret[i]);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
|
|
|
_out->len = _ret.length();
|
|
|
|
_out->data = static_cast<void*>(_arr);
|
|
|
|
return _out;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_array* QItemSelectionModel_SelectedRows(const QItemSelectionModel* self) {
|
|
|
|
QModelIndexList _ret = self->selectedRows();
|
2024-09-17 06:29:11 +00:00
|
|
|
// Convert QList<> from C++ memory to manually-managed C memory
|
|
|
|
QModelIndex** _arr = static_cast<QModelIndex**>(malloc(sizeof(QModelIndex*) * _ret.length()));
|
2024-09-14 22:29:05 +00:00
|
|
|
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
|
|
|
_arr[i] = new QModelIndex(_ret[i]);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
|
|
|
_out->len = _ret.length();
|
|
|
|
_out->data = static_cast<void*>(_arr);
|
|
|
|
return _out;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_array* QItemSelectionModel_SelectedColumns(const QItemSelectionModel* self) {
|
|
|
|
QModelIndexList _ret = self->selectedColumns();
|
2024-09-17 06:29:11 +00:00
|
|
|
// Convert QList<> from C++ memory to manually-managed C memory
|
|
|
|
QModelIndex** _arr = static_cast<QModelIndex**>(malloc(sizeof(QModelIndex*) * _ret.length()));
|
2024-09-14 22:29:05 +00:00
|
|
|
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
|
|
|
_arr[i] = new QModelIndex(_ret[i]);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
|
|
|
_out->len = _ret.length();
|
|
|
|
_out->data = static_cast<void*>(_arr);
|
|
|
|
return _out;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QAbstractItemModel* QItemSelectionModel_Model(const QItemSelectionModel* self) {
|
|
|
|
return (QAbstractItemModel*) self->model();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QAbstractItemModel* QItemSelectionModel_Model2(QItemSelectionModel* self) {
|
|
|
|
return self->model();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QItemSelectionModel_SetModel(QItemSelectionModel* self, QAbstractItemModel* model) {
|
|
|
|
self->setModel(model);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QItemSelectionModel_SetCurrentIndex(QItemSelectionModel* self, QModelIndex* index, int command) {
|
|
|
|
self->setCurrentIndex(*index, static_cast<QItemSelectionModel::SelectionFlags>(command));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QItemSelectionModel_Select(QItemSelectionModel* self, QModelIndex* index, int command) {
|
|
|
|
self->select(*index, static_cast<QItemSelectionModel::SelectionFlags>(command));
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QItemSelectionModel_Clear(QItemSelectionModel* self) {
|
|
|
|
self->clear();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QItemSelectionModel_Reset(QItemSelectionModel* self) {
|
|
|
|
self->reset();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QItemSelectionModel_ClearSelection(QItemSelectionModel* self) {
|
|
|
|
self->clearSelection();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QItemSelectionModel_ClearCurrentIndex(QItemSelectionModel* self) {
|
|
|
|
self->clearCurrentIndex();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QItemSelectionModel_CurrentChanged(QItemSelectionModel* self, QModelIndex* current, QModelIndex* previous) {
|
|
|
|
self->currentChanged(*current, *previous);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QItemSelectionModel_connect_CurrentChanged(QItemSelectionModel* self, void* slot) {
|
|
|
|
QItemSelectionModel::connect(self, static_cast<void (QItemSelectionModel::*)(const QModelIndex&, const QModelIndex&)>(&QItemSelectionModel::currentChanged), self, [=](const QModelIndex& current, const QModelIndex& previous) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QModelIndex& current_ret = current;
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
QModelIndex* sigval1 = const_cast<QModelIndex*>(¤t_ret);
|
|
|
|
const QModelIndex& previous_ret = previous;
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
QModelIndex* sigval2 = const_cast<QModelIndex*>(&previous_ret);
|
|
|
|
miqt_exec_callback_QItemSelectionModel_CurrentChanged(slot, sigval1, sigval2);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QItemSelectionModel_CurrentRowChanged(QItemSelectionModel* self, QModelIndex* current, QModelIndex* previous) {
|
|
|
|
self->currentRowChanged(*current, *previous);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QItemSelectionModel_connect_CurrentRowChanged(QItemSelectionModel* self, void* slot) {
|
|
|
|
QItemSelectionModel::connect(self, static_cast<void (QItemSelectionModel::*)(const QModelIndex&, const QModelIndex&)>(&QItemSelectionModel::currentRowChanged), self, [=](const QModelIndex& current, const QModelIndex& previous) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QModelIndex& current_ret = current;
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
QModelIndex* sigval1 = const_cast<QModelIndex*>(¤t_ret);
|
|
|
|
const QModelIndex& previous_ret = previous;
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
QModelIndex* sigval2 = const_cast<QModelIndex*>(&previous_ret);
|
|
|
|
miqt_exec_callback_QItemSelectionModel_CurrentRowChanged(slot, sigval1, sigval2);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QItemSelectionModel_CurrentColumnChanged(QItemSelectionModel* self, QModelIndex* current, QModelIndex* previous) {
|
|
|
|
self->currentColumnChanged(*current, *previous);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QItemSelectionModel_connect_CurrentColumnChanged(QItemSelectionModel* self, void* slot) {
|
|
|
|
QItemSelectionModel::connect(self, static_cast<void (QItemSelectionModel::*)(const QModelIndex&, const QModelIndex&)>(&QItemSelectionModel::currentColumnChanged), self, [=](const QModelIndex& current, const QModelIndex& previous) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QModelIndex& current_ret = current;
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
QModelIndex* sigval1 = const_cast<QModelIndex*>(¤t_ret);
|
|
|
|
const QModelIndex& previous_ret = previous;
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
QModelIndex* sigval2 = const_cast<QModelIndex*>(&previous_ret);
|
|
|
|
miqt_exec_callback_QItemSelectionModel_CurrentColumnChanged(slot, sigval1, sigval2);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QItemSelectionModel_ModelChanged(QItemSelectionModel* self, QAbstractItemModel* model) {
|
|
|
|
self->modelChanged(model);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QItemSelectionModel_connect_ModelChanged(QItemSelectionModel* self, void* slot) {
|
|
|
|
QItemSelectionModel::connect(self, static_cast<void (QItemSelectionModel::*)(QAbstractItemModel*)>(&QItemSelectionModel::modelChanged), self, [=](QAbstractItemModel* model) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QAbstractItemModel* sigval1 = model;
|
|
|
|
miqt_exec_callback_QItemSelectionModel_ModelChanged(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QItemSelectionModel_Tr2(const char* s, const char* c) {
|
|
|
|
QString _ret = QItemSelectionModel::tr(s, c);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QItemSelectionModel_Tr3(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QItemSelectionModel::tr(s, c, static_cast<int>(n));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QItemSelectionModel_TrUtf82(const char* s, const char* c) {
|
|
|
|
QString _ret = QItemSelectionModel::trUtf8(s, c);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QItemSelectionModel_TrUtf83(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QItemSelectionModel::trUtf8(s, c, static_cast<int>(n));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QItemSelectionModel_IsRowSelected2(const QItemSelectionModel* self, int row, QModelIndex* parent) {
|
|
|
|
return self->isRowSelected(static_cast<int>(row), *parent);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QItemSelectionModel_IsColumnSelected2(const QItemSelectionModel* self, int column, QModelIndex* parent) {
|
|
|
|
return self->isColumnSelected(static_cast<int>(column), *parent);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QItemSelectionModel_RowIntersectsSelection2(const QItemSelectionModel* self, int row, QModelIndex* parent) {
|
|
|
|
return self->rowIntersectsSelection(static_cast<int>(row), *parent);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QItemSelectionModel_ColumnIntersectsSelection2(const QItemSelectionModel* self, int column, QModelIndex* parent) {
|
|
|
|
return self->columnIntersectsSelection(static_cast<int>(column), *parent);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_array* QItemSelectionModel_SelectedRows1(const QItemSelectionModel* self, int column) {
|
|
|
|
QModelIndexList _ret = self->selectedRows(static_cast<int>(column));
|
2024-09-17 06:29:11 +00:00
|
|
|
// Convert QList<> from C++ memory to manually-managed C memory
|
|
|
|
QModelIndex** _arr = static_cast<QModelIndex**>(malloc(sizeof(QModelIndex*) * _ret.length()));
|
2024-09-14 22:29:05 +00:00
|
|
|
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
|
|
|
_arr[i] = new QModelIndex(_ret[i]);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
|
|
|
_out->len = _ret.length();
|
|
|
|
_out->data = static_cast<void*>(_arr);
|
|
|
|
return _out;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_array* QItemSelectionModel_SelectedColumns1(const QItemSelectionModel* self, int row) {
|
|
|
|
QModelIndexList _ret = self->selectedColumns(static_cast<int>(row));
|
2024-09-17 06:29:11 +00:00
|
|
|
// Convert QList<> from C++ memory to manually-managed C memory
|
|
|
|
QModelIndex** _arr = static_cast<QModelIndex**>(malloc(sizeof(QModelIndex*) * _ret.length()));
|
2024-09-14 22:29:05 +00:00
|
|
|
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
|
|
|
_arr[i] = new QModelIndex(_ret[i]);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
|
|
|
_out->len = _ret.length();
|
|
|
|
_out->data = static_cast<void*>(_arr);
|
|
|
|
return _out;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QItemSelectionModel_Delete(QItemSelectionModel* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|