#include #include #include #include #include #include #include #include #include #include "qdialogbuttonbox.h" #include "gen_qdialogbuttonbox.h" #include "_cgo_export.h" QDialogButtonBox* QDialogButtonBox_new() { return new QDialogButtonBox(); } QDialogButtonBox* QDialogButtonBox_new2(uintptr_t orientation) { return new QDialogButtonBox(static_cast(orientation)); } QDialogButtonBox* QDialogButtonBox_new3(int buttons) { return new QDialogButtonBox(static_cast(buttons)); } QDialogButtonBox* QDialogButtonBox_new4(int buttons, uintptr_t orientation) { return new QDialogButtonBox(static_cast(buttons), static_cast(orientation)); } QDialogButtonBox* QDialogButtonBox_new5(QWidget* parent) { return new QDialogButtonBox(parent); } QDialogButtonBox* QDialogButtonBox_new6(uintptr_t orientation, QWidget* parent) { return new QDialogButtonBox(static_cast(orientation), parent); } QDialogButtonBox* QDialogButtonBox_new7(int buttons, QWidget* parent) { return new QDialogButtonBox(static_cast(buttons), parent); } QDialogButtonBox* QDialogButtonBox_new8(int buttons, uintptr_t orientation, QWidget* parent) { return new QDialogButtonBox(static_cast(buttons), static_cast(orientation), parent); } QMetaObject* QDialogButtonBox_MetaObject(const QDialogButtonBox* self) { return (QMetaObject*) self->metaObject(); } struct miqt_string* QDialogButtonBox_Tr(const char* s) { QString _ret = QDialogButtonBox::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* QDialogButtonBox_TrUtf8(const char* s) { QString _ret = QDialogButtonBox::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 QDialogButtonBox_SetOrientation(QDialogButtonBox* self, uintptr_t orientation) { self->setOrientation(static_cast(orientation)); } uintptr_t QDialogButtonBox_Orientation(const QDialogButtonBox* self) { Qt::Orientation _ret = self->orientation(); return static_cast(_ret); } void QDialogButtonBox_AddButton(QDialogButtonBox* self, QAbstractButton* button, uintptr_t role) { self->addButton(button, static_cast(role)); } QPushButton* QDialogButtonBox_AddButton2(QDialogButtonBox* self, struct miqt_string* text, uintptr_t role) { QString text_QString = QString::fromUtf8(&text->data, text->len); return self->addButton(text_QString, static_cast(role)); } QPushButton* QDialogButtonBox_AddButtonWithButton(QDialogButtonBox* self, uintptr_t button) { return self->addButton(static_cast(button)); } void QDialogButtonBox_RemoveButton(QDialogButtonBox* self, QAbstractButton* button) { self->removeButton(button); } void QDialogButtonBox_Clear(QDialogButtonBox* self) { self->clear(); } struct miqt_array* QDialogButtonBox_Buttons(const QDialogButtonBox* self) { QList _ret = self->buttons(); // Convert QList<> from C++ memory to manually-managed C memory QAbstractButton** _arr = static_cast(malloc(sizeof(QAbstractButton*) * _ret.length())); for (size_t i = 0, e = _ret.length(); i < e; ++i) { _arr[i] = _ret[i]; } struct miqt_array* _out = static_cast(malloc(sizeof(struct miqt_array))); _out->len = _ret.length(); _out->data = static_cast(_arr); return _out; } uintptr_t QDialogButtonBox_ButtonRole(const QDialogButtonBox* self, QAbstractButton* button) { QDialogButtonBox::ButtonRole _ret = self->buttonRole(button); return static_cast(_ret); } void QDialogButtonBox_SetStandardButtons(QDialogButtonBox* self, int buttons) { self->setStandardButtons(static_cast(buttons)); } int QDialogButtonBox_StandardButtons(const QDialogButtonBox* self) { QDialogButtonBox::StandardButtons _ret = self->standardButtons(); return static_cast(_ret); } uintptr_t QDialogButtonBox_StandardButton(const QDialogButtonBox* self, QAbstractButton* button) { QDialogButtonBox::StandardButton _ret = self->standardButton(button); return static_cast(_ret); } QPushButton* QDialogButtonBox_Button(const QDialogButtonBox* self, uintptr_t which) { return self->button(static_cast(which)); } void QDialogButtonBox_SetCenterButtons(QDialogButtonBox* self, bool center) { self->setCenterButtons(center); } bool QDialogButtonBox_CenterButtons(const QDialogButtonBox* self) { return self->centerButtons(); } void QDialogButtonBox_Clicked(QDialogButtonBox* self, QAbstractButton* button) { self->clicked(button); } void QDialogButtonBox_connect_Clicked(QDialogButtonBox* self, void* slot) { QDialogButtonBox::connect(self, static_cast(&QDialogButtonBox::clicked), self, [=](QAbstractButton* button) { QAbstractButton* sigval1 = button; miqt_exec_callback_QDialogButtonBox_Clicked(slot, sigval1); }); } void QDialogButtonBox_Accepted(QDialogButtonBox* self) { self->accepted(); } void QDialogButtonBox_connect_Accepted(QDialogButtonBox* self, void* slot) { QDialogButtonBox::connect(self, static_cast(&QDialogButtonBox::accepted), self, [=]() { miqt_exec_callback_QDialogButtonBox_Accepted(slot); }); } void QDialogButtonBox_HelpRequested(QDialogButtonBox* self) { self->helpRequested(); } void QDialogButtonBox_connect_HelpRequested(QDialogButtonBox* self, void* slot) { QDialogButtonBox::connect(self, static_cast(&QDialogButtonBox::helpRequested), self, [=]() { miqt_exec_callback_QDialogButtonBox_HelpRequested(slot); }); } void QDialogButtonBox_Rejected(QDialogButtonBox* self) { self->rejected(); } void QDialogButtonBox_connect_Rejected(QDialogButtonBox* self, void* slot) { QDialogButtonBox::connect(self, static_cast(&QDialogButtonBox::rejected), self, [=]() { miqt_exec_callback_QDialogButtonBox_Rejected(slot); }); } struct miqt_string* QDialogButtonBox_Tr2(const char* s, const char* c) { QString _ret = QDialogButtonBox::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* QDialogButtonBox_Tr3(const char* s, const char* c, int n) { QString _ret = QDialogButtonBox::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* QDialogButtonBox_TrUtf82(const char* s, const char* c) { QString _ret = QDialogButtonBox::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* QDialogButtonBox_TrUtf83(const char* s, const char* c, int n) { QString _ret = QDialogButtonBox::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()); } void QDialogButtonBox_Delete(QDialogButtonBox* self) { delete self; }