miqt/qt/gen_qabstractitemview.cpp

454 lines
16 KiB
C++

#include <QAbstractItemDelegate>
#include <QAbstractItemModel>
#include <QAbstractItemView>
#include <QItemSelectionModel>
#include <QMetaObject>
#include <QModelIndex>
#include <QPoint>
#include <QRect>
#include <QSize>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QVariant>
#include <QWidget>
#include "qabstractitemview.h"
#include "gen_qabstractitemview.h"
#include "_cgo_export.h"
QMetaObject* QAbstractItemView_MetaObject(const QAbstractItemView* self) {
return (QMetaObject*) self->metaObject();
}
void* QAbstractItemView_Metacast(QAbstractItemView* self, const char* param1) {
return self->qt_metacast(param1);
}
struct miqt_string* QAbstractItemView_Tr(const char* s) {
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();
return miqt_strdup(_b.data(), _b.length());
}
struct miqt_string* QAbstractItemView_TrUtf8(const char* s) {
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();
return miqt_strdup(_b.data(), _b.length());
}
void QAbstractItemView_SetModel(QAbstractItemView* self, QAbstractItemModel* model) {
self->setModel(model);
}
QAbstractItemModel* QAbstractItemView_Model(const QAbstractItemView* self) {
return self->model();
}
void QAbstractItemView_SetSelectionModel(QAbstractItemView* self, QItemSelectionModel* selectionModel) {
self->setSelectionModel(selectionModel);
}
QItemSelectionModel* QAbstractItemView_SelectionModel(const QAbstractItemView* self) {
return self->selectionModel();
}
void QAbstractItemView_SetItemDelegate(QAbstractItemView* self, QAbstractItemDelegate* delegate) {
self->setItemDelegate(delegate);
}
QAbstractItemDelegate* QAbstractItemView_ItemDelegate(const QAbstractItemView* self) {
return self->itemDelegate();
}
void QAbstractItemView_SetSelectionMode(QAbstractItemView* self, int mode) {
self->setSelectionMode(static_cast<QAbstractItemView::SelectionMode>(mode));
}
int QAbstractItemView_SelectionMode(const QAbstractItemView* self) {
QAbstractItemView::SelectionMode _ret = self->selectionMode();
return static_cast<int>(_ret);
}
void QAbstractItemView_SetSelectionBehavior(QAbstractItemView* self, int behavior) {
self->setSelectionBehavior(static_cast<QAbstractItemView::SelectionBehavior>(behavior));
}
int QAbstractItemView_SelectionBehavior(const QAbstractItemView* self) {
QAbstractItemView::SelectionBehavior _ret = self->selectionBehavior();
return static_cast<int>(_ret);
}
QModelIndex* QAbstractItemView_CurrentIndex(const QAbstractItemView* self) {
return new QModelIndex(self->currentIndex());
}
QModelIndex* QAbstractItemView_RootIndex(const QAbstractItemView* self) {
return new QModelIndex(self->rootIndex());
}
void QAbstractItemView_SetEditTriggers(QAbstractItemView* self, int triggers) {
self->setEditTriggers(static_cast<QAbstractItemView::EditTriggers>(triggers));
}
int QAbstractItemView_EditTriggers(const QAbstractItemView* self) {
QAbstractItemView::EditTriggers _ret = self->editTriggers();
return static_cast<int>(_ret);
}
void QAbstractItemView_SetVerticalScrollMode(QAbstractItemView* self, int mode) {
self->setVerticalScrollMode(static_cast<QAbstractItemView::ScrollMode>(mode));
}
int QAbstractItemView_VerticalScrollMode(const QAbstractItemView* self) {
QAbstractItemView::ScrollMode _ret = self->verticalScrollMode();
return static_cast<int>(_ret);
}
void QAbstractItemView_ResetVerticalScrollMode(QAbstractItemView* self) {
self->resetVerticalScrollMode();
}
void QAbstractItemView_SetHorizontalScrollMode(QAbstractItemView* self, int mode) {
self->setHorizontalScrollMode(static_cast<QAbstractItemView::ScrollMode>(mode));
}
int QAbstractItemView_HorizontalScrollMode(const QAbstractItemView* self) {
QAbstractItemView::ScrollMode _ret = self->horizontalScrollMode();
return static_cast<int>(_ret);
}
void QAbstractItemView_ResetHorizontalScrollMode(QAbstractItemView* self) {
self->resetHorizontalScrollMode();
}
void QAbstractItemView_SetAutoScroll(QAbstractItemView* self, bool enable) {
self->setAutoScroll(enable);
}
bool QAbstractItemView_HasAutoScroll(const QAbstractItemView* self) {
return self->hasAutoScroll();
}
void QAbstractItemView_SetAutoScrollMargin(QAbstractItemView* self, int margin) {
self->setAutoScrollMargin(static_cast<int>(margin));
}
int QAbstractItemView_AutoScrollMargin(const QAbstractItemView* self) {
return self->autoScrollMargin();
}
void QAbstractItemView_SetTabKeyNavigation(QAbstractItemView* self, bool enable) {
self->setTabKeyNavigation(enable);
}
bool QAbstractItemView_TabKeyNavigation(const QAbstractItemView* self) {
return self->tabKeyNavigation();
}
void QAbstractItemView_SetDropIndicatorShown(QAbstractItemView* self, bool enable) {
self->setDropIndicatorShown(enable);
}
bool QAbstractItemView_ShowDropIndicator(const QAbstractItemView* self) {
return self->showDropIndicator();
}
void QAbstractItemView_SetDragEnabled(QAbstractItemView* self, bool enable) {
self->setDragEnabled(enable);
}
bool QAbstractItemView_DragEnabled(const QAbstractItemView* self) {
return self->dragEnabled();
}
void QAbstractItemView_SetDragDropOverwriteMode(QAbstractItemView* self, bool overwrite) {
self->setDragDropOverwriteMode(overwrite);
}
bool QAbstractItemView_DragDropOverwriteMode(const QAbstractItemView* self) {
return self->dragDropOverwriteMode();
}
void QAbstractItemView_SetDragDropMode(QAbstractItemView* self, int behavior) {
self->setDragDropMode(static_cast<QAbstractItemView::DragDropMode>(behavior));
}
int QAbstractItemView_DragDropMode(const QAbstractItemView* self) {
QAbstractItemView::DragDropMode _ret = self->dragDropMode();
return static_cast<int>(_ret);
}
void QAbstractItemView_SetDefaultDropAction(QAbstractItemView* self, int dropAction) {
self->setDefaultDropAction(static_cast<Qt::DropAction>(dropAction));
}
int QAbstractItemView_DefaultDropAction(const QAbstractItemView* self) {
Qt::DropAction _ret = self->defaultDropAction();
return static_cast<int>(_ret);
}
void QAbstractItemView_SetAlternatingRowColors(QAbstractItemView* self, bool enable) {
self->setAlternatingRowColors(enable);
}
bool QAbstractItemView_AlternatingRowColors(const QAbstractItemView* self) {
return self->alternatingRowColors();
}
void QAbstractItemView_SetIconSize(QAbstractItemView* self, QSize* size) {
self->setIconSize(*size);
}
QSize* QAbstractItemView_IconSize(const QAbstractItemView* self) {
return new QSize(self->iconSize());
}
void QAbstractItemView_SetTextElideMode(QAbstractItemView* self, int mode) {
self->setTextElideMode(static_cast<Qt::TextElideMode>(mode));
}
int QAbstractItemView_TextElideMode(const QAbstractItemView* self) {
Qt::TextElideMode _ret = self->textElideMode();
return static_cast<int>(_ret);
}
void QAbstractItemView_KeyboardSearch(QAbstractItemView* self, struct miqt_string* search) {
QString search_QString = QString::fromUtf8(&search->data, search->len);
self->keyboardSearch(search_QString);
}
QRect* QAbstractItemView_VisualRect(const QAbstractItemView* self, QModelIndex* index) {
return new QRect(self->visualRect(*index));
}
void QAbstractItemView_ScrollTo(QAbstractItemView* self, QModelIndex* index) {
self->scrollTo(*index);
}
QModelIndex* QAbstractItemView_IndexAt(const QAbstractItemView* self, QPoint* point) {
return new QModelIndex(self->indexAt(*point));
}
QSize* QAbstractItemView_SizeHintForIndex(const QAbstractItemView* self, QModelIndex* index) {
return new QSize(self->sizeHintForIndex(*index));
}
int QAbstractItemView_SizeHintForRow(const QAbstractItemView* self, int row) {
return self->sizeHintForRow(static_cast<int>(row));
}
int QAbstractItemView_SizeHintForColumn(const QAbstractItemView* self, int column) {
return self->sizeHintForColumn(static_cast<int>(column));
}
void QAbstractItemView_OpenPersistentEditor(QAbstractItemView* self, QModelIndex* index) {
self->openPersistentEditor(*index);
}
void QAbstractItemView_ClosePersistentEditor(QAbstractItemView* self, QModelIndex* index) {
self->closePersistentEditor(*index);
}
bool QAbstractItemView_IsPersistentEditorOpen(const QAbstractItemView* self, QModelIndex* index) {
return self->isPersistentEditorOpen(*index);
}
void QAbstractItemView_SetIndexWidget(QAbstractItemView* self, QModelIndex* index, QWidget* widget) {
self->setIndexWidget(*index, widget);
}
QWidget* QAbstractItemView_IndexWidget(const QAbstractItemView* self, QModelIndex* index) {
return self->indexWidget(*index);
}
void QAbstractItemView_SetItemDelegateForRow(QAbstractItemView* self, int row, QAbstractItemDelegate* delegate) {
self->setItemDelegateForRow(static_cast<int>(row), delegate);
}
QAbstractItemDelegate* QAbstractItemView_ItemDelegateForRow(const QAbstractItemView* self, int row) {
return self->itemDelegateForRow(static_cast<int>(row));
}
void QAbstractItemView_SetItemDelegateForColumn(QAbstractItemView* self, int column, QAbstractItemDelegate* delegate) {
self->setItemDelegateForColumn(static_cast<int>(column), delegate);
}
QAbstractItemDelegate* QAbstractItemView_ItemDelegateForColumn(const QAbstractItemView* self, int column) {
return self->itemDelegateForColumn(static_cast<int>(column));
}
QAbstractItemDelegate* QAbstractItemView_ItemDelegateWithIndex(const QAbstractItemView* self, QModelIndex* index) {
return self->itemDelegate(*index);
}
QVariant* QAbstractItemView_InputMethodQuery(const QAbstractItemView* self, int query) {
return new QVariant(self->inputMethodQuery(static_cast<Qt::InputMethodQuery>(query)));
}
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) {
const QModelIndex& index_ret = index;
// Cast returned reference into pointer
QModelIndex* sigval1 = const_cast<QModelIndex*>(&index_ret);
miqt_exec_callback_QAbstractItemView_Pressed(slot, sigval1);
});
}
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) {
const QModelIndex& index_ret = index;
// Cast returned reference into pointer
QModelIndex* sigval1 = const_cast<QModelIndex*>(&index_ret);
miqt_exec_callback_QAbstractItemView_Clicked(slot, sigval1);
});
}
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) {
const QModelIndex& index_ret = index;
// Cast returned reference into pointer
QModelIndex* sigval1 = const_cast<QModelIndex*>(&index_ret);
miqt_exec_callback_QAbstractItemView_DoubleClicked(slot, sigval1);
});
}
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) {
const QModelIndex& index_ret = index;
// Cast returned reference into pointer
QModelIndex* sigval1 = const_cast<QModelIndex*>(&index_ret);
miqt_exec_callback_QAbstractItemView_Activated(slot, sigval1);
});
}
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) {
const QModelIndex& index_ret = index;
// Cast returned reference into pointer
QModelIndex* sigval1 = const_cast<QModelIndex*>(&index_ret);
miqt_exec_callback_QAbstractItemView_Entered(slot, sigval1);
});
}
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_QAbstractItemView_ViewportEntered(slot);
});
}
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) {
const QSize& size_ret = size;
// Cast returned reference into pointer
QSize* sigval1 = const_cast<QSize*>(&size_ret);
miqt_exec_callback_QAbstractItemView_IconSizeChanged(slot, sigval1);
});
}
struct miqt_string* QAbstractItemView_Tr2(const char* s, const char* c) {
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();
return miqt_strdup(_b.data(), _b.length());
}
struct miqt_string* QAbstractItemView_Tr3(const char* s, const char* c, int n) {
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();
return miqt_strdup(_b.data(), _b.length());
}
struct miqt_string* QAbstractItemView_TrUtf82(const char* s, const char* c) {
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();
return miqt_strdup(_b.data(), _b.length());
}
struct miqt_string* QAbstractItemView_TrUtf83(const char* s, const char* c, int n) {
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();
return miqt_strdup(_b.data(), _b.length());
}
void QAbstractItemView_ScrollTo2(QAbstractItemView* self, QModelIndex* index, int hint) {
self->scrollTo(*index, static_cast<QAbstractItemView::ScrollHint>(hint));
}
void QAbstractItemView_Delete(QAbstractItemView* self) {
delete self;
}