#include "gen_qcombobox.h" #include "qcombobox.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include extern "C" { extern void miqt_exec_callback(void* cb, int argc, void* argv); } QComboBox* QComboBox_new() { return new QComboBox(); } QComboBox* QComboBox_new2(QWidget* parent) { return new QComboBox(parent); } QMetaObject* QComboBox_MetaObject(QComboBox* self) { return (QMetaObject*) self->metaObject(); } void QComboBox_Tr(char* s, char** _out, int* _out_Strlen) { QString ret = QComboBox::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(malloc(b.length())); memcpy(*_out, b.data(), b.length()); *_out_Strlen = b.length(); } void QComboBox_TrUtf8(char* s, char** _out, int* _out_Strlen) { QString ret = QComboBox::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(malloc(b.length())); memcpy(*_out, b.data(), b.length()); *_out_Strlen = b.length(); } int QComboBox_MaxVisibleItems(QComboBox* self) { return self->maxVisibleItems(); } void QComboBox_SetMaxVisibleItems(QComboBox* self, int maxItems) { self->setMaxVisibleItems(static_cast(maxItems)); } int QComboBox_Count(QComboBox* self) { return self->count(); } void QComboBox_SetMaxCount(QComboBox* self, int max) { self->setMaxCount(static_cast(max)); } int QComboBox_MaxCount(QComboBox* self) { return self->maxCount(); } bool QComboBox_AutoCompletion(QComboBox* self) { return self->autoCompletion(); } void QComboBox_SetAutoCompletion(QComboBox* self, bool enable) { self->setAutoCompletion(enable); } bool QComboBox_DuplicatesEnabled(QComboBox* self) { return self->duplicatesEnabled(); } void QComboBox_SetDuplicatesEnabled(QComboBox* self, bool enable) { self->setDuplicatesEnabled(enable); } void QComboBox_SetFrame(QComboBox* self, bool frame) { self->setFrame(frame); } bool QComboBox_HasFrame(QComboBox* self) { return self->hasFrame(); } int QComboBox_MinimumContentsLength(QComboBox* self) { return self->minimumContentsLength(); } void QComboBox_SetMinimumContentsLength(QComboBox* self, int characters) { self->setMinimumContentsLength(static_cast(characters)); } QSize* QComboBox_IconSize(QComboBox* self) { QSize ret = self->iconSize(); // Copy-construct value returned type into heap-allocated copy return static_cast(new QSize(ret)); } void QComboBox_SetIconSize(QComboBox* self, QSize* size) { self->setIconSize(*size); } void QComboBox_SetPlaceholderText(QComboBox* self, const char* placeholderText, size_t placeholderText_Strlen) { QString placeholderText_QString = QString::fromUtf8(placeholderText, placeholderText_Strlen); self->setPlaceholderText(placeholderText_QString); } void QComboBox_PlaceholderText(QComboBox* self, char** _out, int* _out_Strlen) { QString ret = self->placeholderText(); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray b = ret.toUtf8(); *_out = static_cast(malloc(b.length())); memcpy(*_out, b.data(), b.length()); *_out_Strlen = b.length(); } bool QComboBox_IsEditable(QComboBox* self) { return self->isEditable(); } void QComboBox_SetEditable(QComboBox* self, bool editable) { self->setEditable(editable); } void QComboBox_SetLineEdit(QComboBox* self, QLineEdit* edit) { self->setLineEdit(edit); } QLineEdit* QComboBox_LineEdit(QComboBox* self) { return self->lineEdit(); } void QComboBox_SetValidator(QComboBox* self, QValidator* v) { self->setValidator(v); } QValidator* QComboBox_Validator(QComboBox* self) { return (QValidator*) self->validator(); } void QComboBox_SetCompleter(QComboBox* self, QCompleter* c) { self->setCompleter(c); } QCompleter* QComboBox_Completer(QComboBox* self) { return self->completer(); } QAbstractItemDelegate* QComboBox_ItemDelegate(QComboBox* self) { return self->itemDelegate(); } void QComboBox_SetItemDelegate(QComboBox* self, QAbstractItemDelegate* delegate) { self->setItemDelegate(delegate); } QAbstractItemModel* QComboBox_Model(QComboBox* self) { return self->model(); } void QComboBox_SetModel(QComboBox* self, QAbstractItemModel* model) { self->setModel(model); } QModelIndex* QComboBox_RootModelIndex(QComboBox* self) { QModelIndex ret = self->rootModelIndex(); // Copy-construct value returned type into heap-allocated copy return static_cast(new QModelIndex(ret)); } void QComboBox_SetRootModelIndex(QComboBox* self, QModelIndex* index) { self->setRootModelIndex(*index); } int QComboBox_ModelColumn(QComboBox* self) { return self->modelColumn(); } void QComboBox_SetModelColumn(QComboBox* self, int visibleColumn) { self->setModelColumn(static_cast(visibleColumn)); } int QComboBox_CurrentIndex(QComboBox* self) { return self->currentIndex(); } void QComboBox_CurrentText(QComboBox* self, char** _out, int* _out_Strlen) { QString ret = self->currentText(); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray b = ret.toUtf8(); *_out = static_cast(malloc(b.length())); memcpy(*_out, b.data(), b.length()); *_out_Strlen = b.length(); } QVariant* QComboBox_CurrentData(QComboBox* self) { QVariant ret = self->currentData(); // Copy-construct value returned type into heap-allocated copy return static_cast(new QVariant(ret)); } void QComboBox_ItemText(QComboBox* self, int index, char** _out, int* _out_Strlen) { QString ret = self->itemText(static_cast(index)); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray b = ret.toUtf8(); *_out = static_cast(malloc(b.length())); memcpy(*_out, b.data(), b.length()); *_out_Strlen = b.length(); } QIcon* QComboBox_ItemIcon(QComboBox* self, int index) { QIcon ret = self->itemIcon(static_cast(index)); // Copy-construct value returned type into heap-allocated copy return static_cast(new QIcon(ret)); } QVariant* QComboBox_ItemData(QComboBox* self, int index) { QVariant ret = self->itemData(static_cast(index)); // Copy-construct value returned type into heap-allocated copy return static_cast(new QVariant(ret)); } void QComboBox_AddItem(QComboBox* self, const char* text, size_t text_Strlen) { QString text_QString = QString::fromUtf8(text, text_Strlen); self->addItem(text_QString); } void QComboBox_AddItem2(QComboBox* self, QIcon* icon, const char* text, size_t text_Strlen) { QString text_QString = QString::fromUtf8(text, text_Strlen); self->addItem(*icon, text_QString); } void QComboBox_AddItems(QComboBox* self, char** texts, uint64_t* texts_Lengths, size_t texts_len) { QList texts_QList; texts_QList.reserve(texts_len); for(size_t i = 0; i < texts_len; ++i) { texts_QList.push_back(QString::fromUtf8(texts[i], texts_Lengths[i])); } self->addItems(texts_QList); } void QComboBox_InsertItem(QComboBox* self, int index, const char* text, size_t text_Strlen) { QString text_QString = QString::fromUtf8(text, text_Strlen); self->insertItem(static_cast(index), text_QString); } void QComboBox_InsertItem2(QComboBox* self, int index, QIcon* icon, const char* text, size_t text_Strlen) { QString text_QString = QString::fromUtf8(text, text_Strlen); self->insertItem(static_cast(index), *icon, text_QString); } void QComboBox_InsertItems(QComboBox* self, int index, char** texts, uint64_t* texts_Lengths, size_t texts_len) { QList texts_QList; texts_QList.reserve(texts_len); for(size_t i = 0; i < texts_len; ++i) { texts_QList.push_back(QString::fromUtf8(texts[i], texts_Lengths[i])); } self->insertItems(static_cast(index), texts_QList); } void QComboBox_InsertSeparator(QComboBox* self, int index) { self->insertSeparator(static_cast(index)); } void QComboBox_RemoveItem(QComboBox* self, int index) { self->removeItem(static_cast(index)); } void QComboBox_SetItemText(QComboBox* self, int index, const char* text, size_t text_Strlen) { QString text_QString = QString::fromUtf8(text, text_Strlen); self->setItemText(static_cast(index), text_QString); } void QComboBox_SetItemIcon(QComboBox* self, int index, QIcon* icon) { self->setItemIcon(static_cast(index), *icon); } void QComboBox_SetItemData(QComboBox* self, int index, QVariant* value) { self->setItemData(static_cast(index), *value); } QAbstractItemView* QComboBox_View(QComboBox* self) { return self->view(); } void QComboBox_SetView(QComboBox* self, QAbstractItemView* itemView) { self->setView(itemView); } QSize* QComboBox_SizeHint(QComboBox* self) { QSize ret = self->sizeHint(); // Copy-construct value returned type into heap-allocated copy return static_cast(new QSize(ret)); } QSize* QComboBox_MinimumSizeHint(QComboBox* self) { QSize ret = self->minimumSizeHint(); // Copy-construct value returned type into heap-allocated copy return static_cast(new QSize(ret)); } void QComboBox_ShowPopup(QComboBox* self) { self->showPopup(); } void QComboBox_HidePopup(QComboBox* self) { self->hidePopup(); } bool QComboBox_Event(QComboBox* self, QEvent* event) { return self->event(event); } void QComboBox_Clear(QComboBox* self) { self->clear(); } void QComboBox_ClearEditText(QComboBox* self) { self->clearEditText(); } void QComboBox_SetEditText(QComboBox* self, const char* text, size_t text_Strlen) { QString text_QString = QString::fromUtf8(text, text_Strlen); self->setEditText(text_QString); } void QComboBox_SetCurrentIndex(QComboBox* self, int index) { self->setCurrentIndex(static_cast(index)); } void QComboBox_SetCurrentText(QComboBox* self, const char* text, size_t text_Strlen) { QString text_QString = QString::fromUtf8(text, text_Strlen); self->setCurrentText(text_QString); } void QComboBox_EditTextChanged(QComboBox* self, const char* param1, size_t param1_Strlen) { QString param1_QString = QString::fromUtf8(param1, param1_Strlen); self->editTextChanged(param1_QString); } void QComboBox_connect_EditTextChanged(QComboBox* self, void* slot) { QComboBox::connect(self, static_cast(&QComboBox::editTextChanged), self, [=](const QString& param1) { miqt_exec_callback(slot, 0, nullptr); }); } void QComboBox_Activated(QComboBox* self, int index) { self->activated(static_cast(index)); } void QComboBox_connect_Activated(QComboBox* self, void* slot) { QComboBox::connect(self, static_cast(&QComboBox::activated), self, [=](int index) { miqt_exec_callback(slot, 0, nullptr); }); } void QComboBox_TextActivated(QComboBox* self, const char* param1, size_t param1_Strlen) { QString param1_QString = QString::fromUtf8(param1, param1_Strlen); self->textActivated(param1_QString); } void QComboBox_connect_TextActivated(QComboBox* self, void* slot) { QComboBox::connect(self, static_cast(&QComboBox::textActivated), self, [=](const QString& param1) { miqt_exec_callback(slot, 0, nullptr); }); } void QComboBox_Highlighted(QComboBox* self, int index) { self->highlighted(static_cast(index)); } void QComboBox_connect_Highlighted(QComboBox* self, void* slot) { QComboBox::connect(self, static_cast(&QComboBox::highlighted), self, [=](int index) { miqt_exec_callback(slot, 0, nullptr); }); } void QComboBox_TextHighlighted(QComboBox* self, const char* param1, size_t param1_Strlen) { QString param1_QString = QString::fromUtf8(param1, param1_Strlen); self->textHighlighted(param1_QString); } void QComboBox_connect_TextHighlighted(QComboBox* self, void* slot) { QComboBox::connect(self, static_cast(&QComboBox::textHighlighted), self, [=](const QString& param1) { miqt_exec_callback(slot, 0, nullptr); }); } void QComboBox_CurrentIndexChanged(QComboBox* self, int index) { self->currentIndexChanged(static_cast(index)); } void QComboBox_connect_CurrentIndexChanged(QComboBox* self, void* slot) { QComboBox::connect(self, static_cast(&QComboBox::currentIndexChanged), self, [=](int index) { miqt_exec_callback(slot, 0, nullptr); }); } void QComboBox_CurrentIndexChangedWithQString(QComboBox* self, const char* param1, size_t param1_Strlen) { QString param1_QString = QString::fromUtf8(param1, param1_Strlen); self->currentIndexChanged(param1_QString); } void QComboBox_connect_CurrentIndexChangedWithQString(QComboBox* self, void* slot) { QComboBox::connect(self, static_cast(&QComboBox::currentIndexChanged), self, [=](const QString& param1) { miqt_exec_callback(slot, 0, nullptr); }); } void QComboBox_CurrentTextChanged(QComboBox* self, const char* param1, size_t param1_Strlen) { QString param1_QString = QString::fromUtf8(param1, param1_Strlen); self->currentTextChanged(param1_QString); } void QComboBox_connect_CurrentTextChanged(QComboBox* self, void* slot) { QComboBox::connect(self, static_cast(&QComboBox::currentTextChanged), self, [=](const QString& param1) { miqt_exec_callback(slot, 0, nullptr); }); } void QComboBox_ActivatedWithQString(QComboBox* self, const char* param1, size_t param1_Strlen) { QString param1_QString = QString::fromUtf8(param1, param1_Strlen); self->activated(param1_QString); } void QComboBox_connect_ActivatedWithQString(QComboBox* self, void* slot) { QComboBox::connect(self, static_cast(&QComboBox::activated), self, [=](const QString& param1) { miqt_exec_callback(slot, 0, nullptr); }); } void QComboBox_HighlightedWithQString(QComboBox* self, const char* param1, size_t param1_Strlen) { QString param1_QString = QString::fromUtf8(param1, param1_Strlen); self->highlighted(param1_QString); } void QComboBox_connect_HighlightedWithQString(QComboBox* self, void* slot) { QComboBox::connect(self, static_cast(&QComboBox::highlighted), self, [=](const QString& param1) { miqt_exec_callback(slot, 0, nullptr); }); } void QComboBox_Tr2(char* s, char* c, char** _out, int* _out_Strlen) { QString ret = QComboBox::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(malloc(b.length())); memcpy(*_out, b.data(), b.length()); *_out_Strlen = b.length(); } void QComboBox_Tr3(char* s, char* c, int n, char** _out, int* _out_Strlen) { QString ret = QComboBox::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(); *_out = static_cast(malloc(b.length())); memcpy(*_out, b.data(), b.length()); *_out_Strlen = b.length(); } void QComboBox_TrUtf82(char* s, char* c, char** _out, int* _out_Strlen) { QString ret = QComboBox::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(malloc(b.length())); memcpy(*_out, b.data(), b.length()); *_out_Strlen = b.length(); } void QComboBox_TrUtf83(char* s, char* c, int n, char** _out, int* _out_Strlen) { QString ret = QComboBox::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(); *_out = static_cast(malloc(b.length())); memcpy(*_out, b.data(), b.length()); *_out_Strlen = b.length(); } QVariant* QComboBox_CurrentData1(QComboBox* self, int role) { QVariant ret = self->currentData(static_cast(role)); // Copy-construct value returned type into heap-allocated copy return static_cast(new QVariant(ret)); } QVariant* QComboBox_ItemData2(QComboBox* self, int index, int role) { QVariant ret = self->itemData(static_cast(index), static_cast(role)); // Copy-construct value returned type into heap-allocated copy return static_cast(new QVariant(ret)); } void QComboBox_AddItem22(QComboBox* self, const char* text, size_t text_Strlen, QVariant* userData) { QString text_QString = QString::fromUtf8(text, text_Strlen); self->addItem(text_QString, *userData); } void QComboBox_AddItem3(QComboBox* self, QIcon* icon, const char* text, size_t text_Strlen, QVariant* userData) { QString text_QString = QString::fromUtf8(text, text_Strlen); self->addItem(*icon, text_QString, *userData); } void QComboBox_InsertItem3(QComboBox* self, int index, const char* text, size_t text_Strlen, QVariant* userData) { QString text_QString = QString::fromUtf8(text, text_Strlen); self->insertItem(static_cast(index), text_QString, *userData); } void QComboBox_InsertItem4(QComboBox* self, int index, QIcon* icon, const char* text, size_t text_Strlen, QVariant* userData) { QString text_QString = QString::fromUtf8(text, text_Strlen); self->insertItem(static_cast(index), *icon, text_QString, *userData); } void QComboBox_SetItemData3(QComboBox* self, int index, QVariant* value, int role) { self->setItemData(static_cast(index), *value, static_cast(role)); } void QComboBox_Delete(QComboBox* self) { delete self; }