2024-08-25 04:08:24 +00:00
|
|
|
#include <QLayout>
|
|
|
|
#include <QLayoutItem>
|
|
|
|
#include <QMargins>
|
|
|
|
#include <QMetaObject>
|
|
|
|
#include <QRect>
|
|
|
|
#include <QSize>
|
|
|
|
#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-10-16 05:07:56 +00:00
|
|
|
#include <qlayout.h>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qlayout.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMetaObject* QLayout_MetaObject(const QLayout* self) {
|
|
|
|
return (QMetaObject*) self->metaObject();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 22:32:57 +00:00
|
|
|
void* QLayout_Metacast(QLayout* self, const char* param1) {
|
|
|
|
return self->qt_metacast(param1);
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QLayout_Tr(const char* s) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QLayout::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();
|
2024-10-18 23:53:33 +00:00
|
|
|
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;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QLayout_TrUtf8(const char* s) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QLayout::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();
|
2024-10-18 23:53:33 +00:00
|
|
|
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;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QLayout_Margin(const QLayout* self) {
|
|
|
|
return self->margin();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QLayout_SetMargin(QLayout* self, int margin) {
|
|
|
|
self->setMargin(static_cast<int>(margin));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QLayout_Spacing(const QLayout* self) {
|
|
|
|
return self->spacing();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QLayout_SetSpacing(QLayout* self, int spacing) {
|
|
|
|
self->setSpacing(static_cast<int>(spacing));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLayout_SetContentsMargins(QLayout* self, int left, int top, int right, int bottom) {
|
|
|
|
self->setContentsMargins(static_cast<int>(left), static_cast<int>(top), static_cast<int>(right), static_cast<int>(bottom));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLayout_SetContentsMarginsWithMargins(QLayout* self, QMargins* margins) {
|
|
|
|
self->setContentsMargins(*margins);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
void QLayout_GetContentsMargins(const QLayout* self, int* left, int* top, int* right, int* bottom) {
|
|
|
|
self->getContentsMargins(static_cast<int*>(left), static_cast<int*>(top), static_cast<int*>(right), static_cast<int*>(bottom));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMargins* QLayout_ContentsMargins(const QLayout* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QMargins(self->contentsMargins());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRect* QLayout_ContentsRect(const QLayout* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QRect(self->contentsRect());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
bool QLayout_SetAlignment(QLayout* self, QWidget* w, int alignment) {
|
|
|
|
return self->setAlignment(w, static_cast<Qt::Alignment>(alignment));
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QLayout_SetAlignment2(QLayout* self, QLayout* l, int alignment) {
|
|
|
|
return self->setAlignment(l, static_cast<Qt::Alignment>(alignment));
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QLayout_SetSizeConstraint(QLayout* self, int sizeConstraint) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setSizeConstraint(static_cast<QLayout::SizeConstraint>(sizeConstraint));
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QLayout_SizeConstraint(const QLayout* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QLayout::SizeConstraint _ret = self->sizeConstraint();
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QLayout_SetMenuBar(QLayout* self, QWidget* w) {
|
|
|
|
self->setMenuBar(w);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QWidget* QLayout_MenuBar(const QLayout* self) {
|
|
|
|
return self->menuBar();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QWidget* QLayout_ParentWidget(const QLayout* self) {
|
|
|
|
return self->parentWidget();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QLayout_Invalidate(QLayout* self) {
|
|
|
|
self->invalidate();
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRect* QLayout_Geometry(const QLayout* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QRect(self->geometry());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool QLayout_Activate(QLayout* self) {
|
|
|
|
return self->activate();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLayout_Update(QLayout* self) {
|
|
|
|
self->update();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLayout_AddWidget(QLayout* self, QWidget* w) {
|
|
|
|
self->addWidget(w);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLayout_AddItem(QLayout* self, QLayoutItem* param1) {
|
|
|
|
self->addItem(param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLayout_RemoveWidget(QLayout* self, QWidget* w) {
|
|
|
|
self->removeWidget(w);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLayout_RemoveItem(QLayout* self, QLayoutItem* param1) {
|
|
|
|
self->removeItem(param1);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QLayout_ExpandingDirections(const QLayout* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
Qt::Orientations _ret = self->expandingDirections();
|
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QLayout_MinimumSize(const QLayout* 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
|
|
|
QSize* QLayout_MaximumSize(const QLayout* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QSize(self->maximumSize());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QLayout_SetGeometry(QLayout* self, QRect* geometry) {
|
|
|
|
self->setGeometry(*geometry);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QLayoutItem* QLayout_ItemAt(const QLayout* self, int index) {
|
|
|
|
return self->itemAt(static_cast<int>(index));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QLayoutItem* QLayout_TakeAt(QLayout* self, int index) {
|
|
|
|
return self->takeAt(static_cast<int>(index));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QLayout_IndexOf(const QLayout* self, QWidget* param1) {
|
|
|
|
return self->indexOf(param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QLayout_IndexOfWithQLayoutItem(const QLayout* self, QLayoutItem* param1) {
|
|
|
|
return self->indexOf(param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QLayout_Count(const QLayout* self) {
|
|
|
|
return self->count();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QLayout_IsEmpty(const QLayout* self) {
|
|
|
|
return self->isEmpty();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QLayout_ControlTypes(const QLayout* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QSizePolicy::ControlTypes _ret = self->controlTypes();
|
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QLayoutItem* QLayout_ReplaceWidget(QLayout* self, QWidget* from, QWidget* to) {
|
|
|
|
return self->replaceWidget(from, to);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QLayout_TotalHeightForWidth(const QLayout* self, int w) {
|
|
|
|
return self->totalHeightForWidth(static_cast<int>(w));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QLayout_TotalMinimumSize(const QLayout* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QSize(self->totalMinimumSize());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QLayout_TotalMaximumSize(const QLayout* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QSize(self->totalMaximumSize());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QLayout_TotalSizeHint(const QLayout* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QSize(self->totalSizeHint());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QLayout* QLayout_Layout(QLayout* self) {
|
|
|
|
return self->layout();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLayout_SetEnabled(QLayout* self, bool enabled) {
|
|
|
|
self->setEnabled(enabled);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QLayout_IsEnabled(const QLayout* self) {
|
|
|
|
return self->isEnabled();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QSize* QLayout_ClosestAcceptableSize(QWidget* w, QSize* s) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QSize(QLayout::closestAcceptableSize(w, *s));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QLayout_Tr2(const char* s, const char* c) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QLayout::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();
|
2024-10-18 23:53:33 +00:00
|
|
|
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;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QLayout_Tr3(const char* s, const char* c, int n) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QLayout::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();
|
2024-10-18 23:53:33 +00:00
|
|
|
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;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QLayout_TrUtf82(const char* s, const char* c) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QLayout::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();
|
2024-10-18 23:53:33 +00:00
|
|
|
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;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QLayout_TrUtf83(const char* s, const char* c, int n) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QLayout::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();
|
2024-10-18 23:53:33 +00:00
|
|
|
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;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QLayoutItem* QLayout_ReplaceWidget3(QLayout* self, QWidget* from, QWidget* to, int options) {
|
|
|
|
return self->replaceWidget(from, to, static_cast<Qt::FindChildOptions>(options));
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QLayout_Delete(QLayout* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|