2024-08-25 04:08:24 +00:00
|
|
|
#include <QAbstractItemDelegate>
|
|
|
|
#include <QAbstractItemModel>
|
|
|
|
#include <QAbstractItemView>
|
|
|
|
#include <QItemSelectionModel>
|
|
|
|
#include <QMetaObject>
|
|
|
|
#include <QModelIndex>
|
|
|
|
#include <QPoint>
|
|
|
|
#include <QRect>
|
|
|
|
#include <QSize>
|
|
|
|
#include <QString>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
|
|
|
#include <QVariant>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QWidget>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "qabstractitemview.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qabstractitemview.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
extern void miqt_exec_callback(void* cb, int argc, void* argv);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMetaObject* QAbstractItemView_MetaObject(const QAbstractItemView* self) {
|
|
|
|
return (QMetaObject*) self->metaObject();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QAbstractItemView_Tr(const char* s, char** _out, int* _out_Strlen) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString ret = QAbstractItemView::tr(s);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QAbstractItemView_TrUtf8(const char* s, char** _out, int* _out_Strlen) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString ret = QAbstractItemView::trUtf8(s);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_SetModel(QAbstractItemView* self, QAbstractItemModel* model) {
|
|
|
|
self->setModel(model);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QAbstractItemModel* QAbstractItemView_Model(const QAbstractItemView* self) {
|
|
|
|
return self->model();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_SetSelectionModel(QAbstractItemView* self, QItemSelectionModel* selectionModel) {
|
|
|
|
self->setSelectionModel(selectionModel);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QItemSelectionModel* QAbstractItemView_SelectionModel(const QAbstractItemView* self) {
|
|
|
|
return self->selectionModel();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_SetItemDelegate(QAbstractItemView* self, QAbstractItemDelegate* delegate) {
|
|
|
|
self->setItemDelegate(delegate);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QAbstractItemDelegate* QAbstractItemView_ItemDelegate(const QAbstractItemView* self) {
|
|
|
|
return self->itemDelegate();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_SetSelectionMode(QAbstractItemView* self, uintptr_t mode) {
|
|
|
|
self->setSelectionMode(static_cast<QAbstractItemView::SelectionMode>(mode));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
uintptr_t QAbstractItemView_SelectionMode(const QAbstractItemView* self) {
|
|
|
|
QAbstractItemView::SelectionMode ret = self->selectionMode();
|
2024-08-29 07:01:51 +00:00
|
|
|
return static_cast<uintptr_t>(ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_SetSelectionBehavior(QAbstractItemView* self, uintptr_t behavior) {
|
|
|
|
self->setSelectionBehavior(static_cast<QAbstractItemView::SelectionBehavior>(behavior));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
uintptr_t QAbstractItemView_SelectionBehavior(const QAbstractItemView* self) {
|
|
|
|
QAbstractItemView::SelectionBehavior ret = self->selectionBehavior();
|
2024-08-29 07:01:51 +00:00
|
|
|
return static_cast<uintptr_t>(ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QModelIndex* QAbstractItemView_CurrentIndex(const QAbstractItemView* self) {
|
|
|
|
QModelIndex ret = self->currentIndex();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QModelIndex*>(new QModelIndex(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QModelIndex* QAbstractItemView_RootIndex(const QAbstractItemView* self) {
|
|
|
|
QModelIndex ret = self->rootIndex();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QModelIndex*>(new QModelIndex(ret));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QAbstractItemView_SetEditTriggers(QAbstractItemView* self, int triggers) {
|
|
|
|
self->setEditTriggers(static_cast<QAbstractItemView::EditTriggers>(triggers));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QAbstractItemView_EditTriggers(const QAbstractItemView* self) {
|
|
|
|
QAbstractItemView::EditTriggers ret = self->editTriggers();
|
2024-08-29 07:01:51 +00:00
|
|
|
return static_cast<int>(ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_SetVerticalScrollMode(QAbstractItemView* self, uintptr_t mode) {
|
|
|
|
self->setVerticalScrollMode(static_cast<QAbstractItemView::ScrollMode>(mode));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
uintptr_t QAbstractItemView_VerticalScrollMode(const QAbstractItemView* self) {
|
|
|
|
QAbstractItemView::ScrollMode ret = self->verticalScrollMode();
|
2024-08-29 07:01:51 +00:00
|
|
|
return static_cast<uintptr_t>(ret);
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QAbstractItemView_ResetVerticalScrollMode(QAbstractItemView* self) {
|
|
|
|
self->resetVerticalScrollMode();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QAbstractItemView_SetHorizontalScrollMode(QAbstractItemView* self, uintptr_t mode) {
|
|
|
|
self->setHorizontalScrollMode(static_cast<QAbstractItemView::ScrollMode>(mode));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
uintptr_t QAbstractItemView_HorizontalScrollMode(const QAbstractItemView* self) {
|
|
|
|
QAbstractItemView::ScrollMode ret = self->horizontalScrollMode();
|
2024-08-29 07:01:51 +00:00
|
|
|
return static_cast<uintptr_t>(ret);
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QAbstractItemView_ResetHorizontalScrollMode(QAbstractItemView* self) {
|
|
|
|
self->resetHorizontalScrollMode();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_SetAutoScroll(QAbstractItemView* self, bool enable) {
|
|
|
|
self->setAutoScroll(enable);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QAbstractItemView_HasAutoScroll(const QAbstractItemView* self) {
|
|
|
|
return self->hasAutoScroll();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_SetAutoScrollMargin(QAbstractItemView* self, int margin) {
|
|
|
|
self->setAutoScrollMargin(static_cast<int>(margin));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QAbstractItemView_AutoScrollMargin(const QAbstractItemView* self) {
|
|
|
|
return self->autoScrollMargin();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_SetTabKeyNavigation(QAbstractItemView* self, bool enable) {
|
|
|
|
self->setTabKeyNavigation(enable);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QAbstractItemView_TabKeyNavigation(const QAbstractItemView* self) {
|
|
|
|
return self->tabKeyNavigation();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_SetDropIndicatorShown(QAbstractItemView* self, bool enable) {
|
|
|
|
self->setDropIndicatorShown(enable);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QAbstractItemView_ShowDropIndicator(const QAbstractItemView* self) {
|
|
|
|
return self->showDropIndicator();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_SetDragEnabled(QAbstractItemView* self, bool enable) {
|
|
|
|
self->setDragEnabled(enable);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QAbstractItemView_DragEnabled(const QAbstractItemView* self) {
|
|
|
|
return self->dragEnabled();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_SetDragDropOverwriteMode(QAbstractItemView* self, bool overwrite) {
|
|
|
|
self->setDragDropOverwriteMode(overwrite);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QAbstractItemView_DragDropOverwriteMode(const QAbstractItemView* self) {
|
|
|
|
return self->dragDropOverwriteMode();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_SetDragDropMode(QAbstractItemView* self, uintptr_t behavior) {
|
|
|
|
self->setDragDropMode(static_cast<QAbstractItemView::DragDropMode>(behavior));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
uintptr_t QAbstractItemView_DragDropMode(const QAbstractItemView* self) {
|
|
|
|
QAbstractItemView::DragDropMode ret = self->dragDropMode();
|
2024-08-29 07:01:51 +00:00
|
|
|
return static_cast<uintptr_t>(ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_SetDefaultDropAction(QAbstractItemView* self, uintptr_t dropAction) {
|
|
|
|
self->setDefaultDropAction(static_cast<Qt::DropAction>(dropAction));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
uintptr_t QAbstractItemView_DefaultDropAction(const QAbstractItemView* self) {
|
|
|
|
Qt::DropAction ret = self->defaultDropAction();
|
2024-08-29 07:01:51 +00:00
|
|
|
return static_cast<uintptr_t>(ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_SetAlternatingRowColors(QAbstractItemView* self, bool enable) {
|
|
|
|
self->setAlternatingRowColors(enable);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QAbstractItemView_AlternatingRowColors(const QAbstractItemView* self) {
|
|
|
|
return self->alternatingRowColors();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_SetIconSize(QAbstractItemView* self, QSize* size) {
|
|
|
|
self->setIconSize(*size);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QAbstractItemView_IconSize(const QAbstractItemView* self) {
|
|
|
|
QSize ret = self->iconSize();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QSize*>(new QSize(ret));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QAbstractItemView_SetTextElideMode(QAbstractItemView* self, uintptr_t mode) {
|
|
|
|
self->setTextElideMode(static_cast<Qt::TextElideMode>(mode));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
uintptr_t QAbstractItemView_TextElideMode(const QAbstractItemView* self) {
|
|
|
|
Qt::TextElideMode ret = self->textElideMode();
|
2024-08-29 07:01:51 +00:00
|
|
|
return static_cast<uintptr_t>(ret);
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QAbstractItemView_KeyboardSearch(QAbstractItemView* self, const char* search, size_t search_Strlen) {
|
|
|
|
QString search_QString = QString::fromUtf8(search, search_Strlen);
|
|
|
|
self->keyboardSearch(search_QString);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRect* QAbstractItemView_VisualRect(const QAbstractItemView* self, QModelIndex* index) {
|
|
|
|
QRect ret = self->visualRect(*index);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QRect*>(new QRect(ret));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QAbstractItemView_ScrollTo(QAbstractItemView* self, QModelIndex* index) {
|
|
|
|
self->scrollTo(*index);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QModelIndex* QAbstractItemView_IndexAt(const QAbstractItemView* self, QPoint* point) {
|
|
|
|
QModelIndex ret = self->indexAt(*point);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QModelIndex*>(new QModelIndex(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QAbstractItemView_SizeHintForIndex(const QAbstractItemView* self, QModelIndex* index) {
|
|
|
|
QSize ret = self->sizeHintForIndex(*index);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QSize*>(new QSize(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QAbstractItemView_SizeHintForRow(const QAbstractItemView* self, int row) {
|
|
|
|
return self->sizeHintForRow(static_cast<int>(row));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QAbstractItemView_SizeHintForColumn(const QAbstractItemView* self, int column) {
|
|
|
|
return self->sizeHintForColumn(static_cast<int>(column));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_OpenPersistentEditor(QAbstractItemView* self, QModelIndex* index) {
|
|
|
|
self->openPersistentEditor(*index);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_ClosePersistentEditor(QAbstractItemView* self, QModelIndex* index) {
|
|
|
|
self->closePersistentEditor(*index);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QAbstractItemView_IsPersistentEditorOpen(const QAbstractItemView* self, QModelIndex* index) {
|
|
|
|
return self->isPersistentEditorOpen(*index);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_SetIndexWidget(QAbstractItemView* self, QModelIndex* index, QWidget* widget) {
|
|
|
|
self->setIndexWidget(*index, widget);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QWidget* QAbstractItemView_IndexWidget(const QAbstractItemView* self, QModelIndex* index) {
|
|
|
|
return self->indexWidget(*index);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_SetItemDelegateForRow(QAbstractItemView* self, int row, QAbstractItemDelegate* delegate) {
|
|
|
|
self->setItemDelegateForRow(static_cast<int>(row), delegate);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QAbstractItemDelegate* QAbstractItemView_ItemDelegateForRow(const QAbstractItemView* self, int row) {
|
|
|
|
return self->itemDelegateForRow(static_cast<int>(row));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_SetItemDelegateForColumn(QAbstractItemView* self, int column, QAbstractItemDelegate* delegate) {
|
|
|
|
self->setItemDelegateForColumn(static_cast<int>(column), delegate);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QAbstractItemDelegate* QAbstractItemView_ItemDelegateForColumn(const QAbstractItemView* self, int column) {
|
|
|
|
return self->itemDelegateForColumn(static_cast<int>(column));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QAbstractItemDelegate* QAbstractItemView_ItemDelegateWithIndex(const QAbstractItemView* self, QModelIndex* index) {
|
|
|
|
return self->itemDelegate(*index);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QVariant* QAbstractItemView_InputMethodQuery(const QAbstractItemView* self, uintptr_t query) {
|
|
|
|
QVariant ret = self->inputMethodQuery(static_cast<Qt::InputMethodQuery>(query));
|
2024-08-29 07:01:51 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QVariant*>(new QVariant(ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_Reset(QAbstractItemView* self) {
|
|
|
|
self->reset();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_SetRootIndex(QAbstractItemView* self, QModelIndex* index) {
|
|
|
|
self->setRootIndex(*index);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_DoItemsLayout(QAbstractItemView* self) {
|
|
|
|
self->doItemsLayout();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_SelectAll(QAbstractItemView* self) {
|
|
|
|
self->selectAll();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_Edit(QAbstractItemView* self, QModelIndex* index) {
|
|
|
|
self->edit(*index);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_ClearSelection(QAbstractItemView* self) {
|
|
|
|
self->clearSelection();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_SetCurrentIndex(QAbstractItemView* self, QModelIndex* index) {
|
|
|
|
self->setCurrentIndex(*index);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_ScrollToTop(QAbstractItemView* self) {
|
|
|
|
self->scrollToTop();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_ScrollToBottom(QAbstractItemView* self) {
|
|
|
|
self->scrollToBottom();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_Update(QAbstractItemView* self, QModelIndex* index) {
|
|
|
|
self->update(*index);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_Pressed(QAbstractItemView* self, QModelIndex* index) {
|
|
|
|
self->pressed(*index);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_connect_Pressed(QAbstractItemView* self, void* slot) {
|
|
|
|
QAbstractItemView::connect(self, static_cast<void (QAbstractItemView::*)(const QModelIndex&)>(&QAbstractItemView::pressed), self, [=](const QModelIndex& index) {
|
|
|
|
miqt_exec_callback(slot, 0, nullptr);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_Clicked(QAbstractItemView* self, QModelIndex* index) {
|
|
|
|
self->clicked(*index);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_connect_Clicked(QAbstractItemView* self, void* slot) {
|
|
|
|
QAbstractItemView::connect(self, static_cast<void (QAbstractItemView::*)(const QModelIndex&)>(&QAbstractItemView::clicked), self, [=](const QModelIndex& index) {
|
|
|
|
miqt_exec_callback(slot, 0, nullptr);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_DoubleClicked(QAbstractItemView* self, QModelIndex* index) {
|
|
|
|
self->doubleClicked(*index);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_connect_DoubleClicked(QAbstractItemView* self, void* slot) {
|
|
|
|
QAbstractItemView::connect(self, static_cast<void (QAbstractItemView::*)(const QModelIndex&)>(&QAbstractItemView::doubleClicked), self, [=](const QModelIndex& index) {
|
|
|
|
miqt_exec_callback(slot, 0, nullptr);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_Activated(QAbstractItemView* self, QModelIndex* index) {
|
|
|
|
self->activated(*index);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_connect_Activated(QAbstractItemView* self, void* slot) {
|
|
|
|
QAbstractItemView::connect(self, static_cast<void (QAbstractItemView::*)(const QModelIndex&)>(&QAbstractItemView::activated), self, [=](const QModelIndex& index) {
|
|
|
|
miqt_exec_callback(slot, 0, nullptr);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_Entered(QAbstractItemView* self, QModelIndex* index) {
|
|
|
|
self->entered(*index);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_connect_Entered(QAbstractItemView* self, void* slot) {
|
|
|
|
QAbstractItemView::connect(self, static_cast<void (QAbstractItemView::*)(const QModelIndex&)>(&QAbstractItemView::entered), self, [=](const QModelIndex& index) {
|
|
|
|
miqt_exec_callback(slot, 0, nullptr);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_ViewportEntered(QAbstractItemView* self) {
|
|
|
|
self->viewportEntered();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_connect_ViewportEntered(QAbstractItemView* self, void* slot) {
|
|
|
|
QAbstractItemView::connect(self, static_cast<void (QAbstractItemView::*)()>(&QAbstractItemView::viewportEntered), self, [=]() {
|
|
|
|
miqt_exec_callback(slot, 0, nullptr);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_IconSizeChanged(QAbstractItemView* self, QSize* size) {
|
|
|
|
self->iconSizeChanged(*size);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractItemView_connect_IconSizeChanged(QAbstractItemView* self, void* slot) {
|
|
|
|
QAbstractItemView::connect(self, static_cast<void (QAbstractItemView::*)(const QSize&)>(&QAbstractItemView::iconSizeChanged), self, [=](const QSize& size) {
|
|
|
|
miqt_exec_callback(slot, 0, nullptr);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QAbstractItemView_Tr2(const char* s, const char* c, char** _out, int* _out_Strlen) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString ret = QAbstractItemView::tr(s, c);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QAbstractItemView_Tr3(const char* s, const char* c, int n, char** _out, int* _out_Strlen) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString ret = QAbstractItemView::tr(s, c, static_cast<int>(n));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QAbstractItemView_TrUtf82(const char* s, const char* c, char** _out, int* _out_Strlen) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString ret = QAbstractItemView::trUtf8(s, c);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QAbstractItemView_TrUtf83(const char* s, const char* c, int n, char** _out, int* _out_Strlen) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString ret = QAbstractItemView::trUtf8(s, c, static_cast<int>(n));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QAbstractItemView_ScrollTo2(QAbstractItemView* self, QModelIndex* index, uintptr_t hint) {
|
|
|
|
self->scrollTo(*index, static_cast<QAbstractItemView::ScrollHint>(hint));
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QAbstractItemView_Delete(QAbstractItemView* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|