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