miqt/qt/gen_qstackedlayout.cpp

200 lines
6.0 KiB
C++

#include <QLayout>
#include <QLayoutItem>
#include <QMetaObject>
#include <QRect>
#include <QSize>
#include <QStackedLayout>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QWidget>
#include <qstackedlayout.h>
#include "gen_qstackedlayout.h"
#include "_cgo_export.h"
QStackedLayout* QStackedLayout_new(QWidget* parent) {
return new QStackedLayout(parent);
}
QStackedLayout* QStackedLayout_new2() {
return new QStackedLayout();
}
QStackedLayout* QStackedLayout_new3(QLayout* parentLayout) {
return new QStackedLayout(parentLayout);
}
QMetaObject* QStackedLayout_MetaObject(const QStackedLayout* self) {
return (QMetaObject*) self->metaObject();
}
void* QStackedLayout_Metacast(QStackedLayout* self, const char* param1) {
return self->qt_metacast(param1);
}
struct miqt_string QStackedLayout_Tr(const char* s) {
QString _ret = QStackedLayout::tr(s);
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
struct miqt_string QStackedLayout_TrUtf8(const char* s) {
QString _ret = QStackedLayout::trUtf8(s);
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
int QStackedLayout_AddWidget(QStackedLayout* self, QWidget* w) {
return self->addWidget(w);
}
int QStackedLayout_InsertWidget(QStackedLayout* self, int index, QWidget* w) {
return self->insertWidget(static_cast<int>(index), w);
}
QWidget* QStackedLayout_CurrentWidget(const QStackedLayout* self) {
return self->currentWidget();
}
int QStackedLayout_CurrentIndex(const QStackedLayout* self) {
return self->currentIndex();
}
QWidget* QStackedLayout_Widget(const QStackedLayout* self, int param1) {
return self->widget(static_cast<int>(param1));
}
int QStackedLayout_Count(const QStackedLayout* self) {
return self->count();
}
int QStackedLayout_StackingMode(const QStackedLayout* self) {
QStackedLayout::StackingMode _ret = self->stackingMode();
return static_cast<int>(_ret);
}
void QStackedLayout_SetStackingMode(QStackedLayout* self, int stackingMode) {
self->setStackingMode(static_cast<QStackedLayout::StackingMode>(stackingMode));
}
void QStackedLayout_AddItem(QStackedLayout* self, QLayoutItem* item) {
self->addItem(item);
}
QSize* QStackedLayout_SizeHint(const QStackedLayout* self) {
return new QSize(self->sizeHint());
}
QSize* QStackedLayout_MinimumSize(const QStackedLayout* self) {
return new QSize(self->minimumSize());
}
QLayoutItem* QStackedLayout_ItemAt(const QStackedLayout* self, int param1) {
return self->itemAt(static_cast<int>(param1));
}
QLayoutItem* QStackedLayout_TakeAt(QStackedLayout* self, int param1) {
return self->takeAt(static_cast<int>(param1));
}
void QStackedLayout_SetGeometry(QStackedLayout* self, QRect* rect) {
self->setGeometry(*rect);
}
bool QStackedLayout_HasHeightForWidth(const QStackedLayout* self) {
return self->hasHeightForWidth();
}
int QStackedLayout_HeightForWidth(const QStackedLayout* self, int width) {
return self->heightForWidth(static_cast<int>(width));
}
void QStackedLayout_WidgetRemoved(QStackedLayout* self, int index) {
self->widgetRemoved(static_cast<int>(index));
}
void QStackedLayout_connect_WidgetRemoved(QStackedLayout* self, intptr_t slot) {
QStackedLayout::connect(self, static_cast<void (QStackedLayout::*)(int)>(&QStackedLayout::widgetRemoved), self, [=](int index) {
int sigval1 = index;
miqt_exec_callback_QStackedLayout_WidgetRemoved(slot, sigval1);
});
}
void QStackedLayout_CurrentChanged(QStackedLayout* self, int index) {
self->currentChanged(static_cast<int>(index));
}
void QStackedLayout_connect_CurrentChanged(QStackedLayout* self, intptr_t slot) {
QStackedLayout::connect(self, static_cast<void (QStackedLayout::*)(int)>(&QStackedLayout::currentChanged), self, [=](int index) {
int sigval1 = index;
miqt_exec_callback_QStackedLayout_CurrentChanged(slot, sigval1);
});
}
void QStackedLayout_SetCurrentIndex(QStackedLayout* self, int index) {
self->setCurrentIndex(static_cast<int>(index));
}
void QStackedLayout_SetCurrentWidget(QStackedLayout* self, QWidget* w) {
self->setCurrentWidget(w);
}
struct miqt_string QStackedLayout_Tr2(const char* s, const char* c) {
QString _ret = QStackedLayout::tr(s, c);
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
struct miqt_string QStackedLayout_Tr3(const char* s, const char* c, int n) {
QString _ret = QStackedLayout::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();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
struct miqt_string QStackedLayout_TrUtf82(const char* s, const char* c) {
QString _ret = QStackedLayout::trUtf8(s, c);
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
struct miqt_string QStackedLayout_TrUtf83(const char* s, const char* c, int n) {
QString _ret = QStackedLayout::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();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
void QStackedLayout_Delete(QStackedLayout* self) {
delete self;
}