2024-08-25 04:08:24 +00:00
|
|
|
#include <QGridLayout>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QLayout>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QLayoutItem>
|
|
|
|
#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-08-29 07:01:51 +00:00
|
|
|
#include "qgridlayout.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qgridlayout.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
extern void miqt_exec_callback(void* cb, int argc, void* argv);
|
|
|
|
}
|
|
|
|
|
|
|
|
QGridLayout* QGridLayout_new(QWidget* parent) {
|
|
|
|
return new QGridLayout(parent);
|
|
|
|
}
|
|
|
|
|
|
|
|
QGridLayout* QGridLayout_new2() {
|
|
|
|
return new QGridLayout();
|
|
|
|
}
|
|
|
|
|
|
|
|
QMetaObject* QGridLayout_MetaObject(QGridLayout* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return (QMetaObject*) const_cast<const QGridLayout*>(self)->metaObject();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QGridLayout_Tr(const char* s, char** _out, int* _out_Strlen) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString ret = QGridLayout::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<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QGridLayout_TrUtf8(const char* s, char** _out, int* _out_Strlen) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString ret = QGridLayout::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<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
|
|
|
QSize* QGridLayout_SizeHint(QGridLayout* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
QSize ret = const_cast<const QGridLayout*>(self)->sizeHint();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QSize*>(new QSize(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
QSize* QGridLayout_MinimumSize(QGridLayout* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
QSize ret = const_cast<const QGridLayout*>(self)->minimumSize();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QSize*>(new QSize(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
QSize* QGridLayout_MaximumSize(QGridLayout* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
QSize ret = const_cast<const QGridLayout*>(self)->maximumSize();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QSize*>(new QSize(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QGridLayout_SetHorizontalSpacing(QGridLayout* self, int spacing) {
|
|
|
|
self->setHorizontalSpacing(static_cast<int>(spacing));
|
|
|
|
}
|
|
|
|
|
|
|
|
int QGridLayout_HorizontalSpacing(QGridLayout* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QGridLayout*>(self)->horizontalSpacing();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QGridLayout_SetVerticalSpacing(QGridLayout* self, int spacing) {
|
|
|
|
self->setVerticalSpacing(static_cast<int>(spacing));
|
|
|
|
}
|
|
|
|
|
|
|
|
int QGridLayout_VerticalSpacing(QGridLayout* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QGridLayout*>(self)->verticalSpacing();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QGridLayout_SetSpacing(QGridLayout* self, int spacing) {
|
|
|
|
self->setSpacing(static_cast<int>(spacing));
|
|
|
|
}
|
|
|
|
|
|
|
|
int QGridLayout_Spacing(QGridLayout* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QGridLayout*>(self)->spacing();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QGridLayout_SetRowStretch(QGridLayout* self, int row, int stretch) {
|
|
|
|
self->setRowStretch(static_cast<int>(row), static_cast<int>(stretch));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QGridLayout_SetColumnStretch(QGridLayout* self, int column, int stretch) {
|
|
|
|
self->setColumnStretch(static_cast<int>(column), static_cast<int>(stretch));
|
|
|
|
}
|
|
|
|
|
|
|
|
int QGridLayout_RowStretch(QGridLayout* self, int row) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QGridLayout*>(self)->rowStretch(static_cast<int>(row));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int QGridLayout_ColumnStretch(QGridLayout* self, int column) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QGridLayout*>(self)->columnStretch(static_cast<int>(column));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QGridLayout_SetRowMinimumHeight(QGridLayout* self, int row, int minSize) {
|
|
|
|
self->setRowMinimumHeight(static_cast<int>(row), static_cast<int>(minSize));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QGridLayout_SetColumnMinimumWidth(QGridLayout* self, int column, int minSize) {
|
|
|
|
self->setColumnMinimumWidth(static_cast<int>(column), static_cast<int>(minSize));
|
|
|
|
}
|
|
|
|
|
|
|
|
int QGridLayout_RowMinimumHeight(QGridLayout* self, int row) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QGridLayout*>(self)->rowMinimumHeight(static_cast<int>(row));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int QGridLayout_ColumnMinimumWidth(QGridLayout* self, int column) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QGridLayout*>(self)->columnMinimumWidth(static_cast<int>(column));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int QGridLayout_ColumnCount(QGridLayout* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QGridLayout*>(self)->columnCount();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int QGridLayout_RowCount(QGridLayout* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QGridLayout*>(self)->rowCount();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QRect* QGridLayout_CellRect(QGridLayout* self, int row, int column) {
|
2024-08-29 07:01:51 +00:00
|
|
|
QRect ret = const_cast<const QGridLayout*>(self)->cellRect(static_cast<int>(row), static_cast<int>(column));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QRect*>(new QRect(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QGridLayout_HasHeightForWidth(QGridLayout* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QGridLayout*>(self)->hasHeightForWidth();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int QGridLayout_HeightForWidth(QGridLayout* self, int param1) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QGridLayout*>(self)->heightForWidth(static_cast<int>(param1));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int QGridLayout_MinimumHeightForWidth(QGridLayout* self, int param1) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QGridLayout*>(self)->minimumHeightForWidth(static_cast<int>(param1));
|
|
|
|
}
|
|
|
|
|
|
|
|
int QGridLayout_ExpandingDirections(QGridLayout* self) {
|
|
|
|
Qt::Orientations ret = const_cast<const QGridLayout*>(self)->expandingDirections();
|
|
|
|
return static_cast<int>(ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QGridLayout_Invalidate(QGridLayout* self) {
|
|
|
|
self->invalidate();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QGridLayout_AddWidget(QGridLayout* self, QWidget* w) {
|
|
|
|
self->addWidget(w);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QGridLayout_AddWidget2(QGridLayout* self, QWidget* param1, int row, int column) {
|
|
|
|
self->addWidget(param1, static_cast<int>(row), static_cast<int>(column));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QGridLayout_AddWidget3(QGridLayout* self, QWidget* param1, int row, int column, int rowSpan, int columnSpan) {
|
|
|
|
self->addWidget(param1, static_cast<int>(row), static_cast<int>(column), static_cast<int>(rowSpan), static_cast<int>(columnSpan));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QGridLayout_AddLayout(QGridLayout* self, QLayout* param1, int row, int column) {
|
|
|
|
self->addLayout(param1, static_cast<int>(row), static_cast<int>(column));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QGridLayout_AddLayout2(QGridLayout* self, QLayout* param1, int row, int column, int rowSpan, int columnSpan) {
|
|
|
|
self->addLayout(param1, static_cast<int>(row), static_cast<int>(column), static_cast<int>(rowSpan), static_cast<int>(columnSpan));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QGridLayout_SetOriginCorner(QGridLayout* self, uintptr_t originCorner) {
|
|
|
|
self->setOriginCorner(static_cast<Qt::Corner>(originCorner));
|
|
|
|
}
|
|
|
|
|
|
|
|
uintptr_t QGridLayout_OriginCorner(QGridLayout* self) {
|
|
|
|
Qt::Corner ret = const_cast<const QGridLayout*>(self)->originCorner();
|
|
|
|
return static_cast<uintptr_t>(ret);
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
QLayoutItem* QGridLayout_ItemAt(QGridLayout* self, int index) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QGridLayout*>(self)->itemAt(static_cast<int>(index));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QLayoutItem* QGridLayout_ItemAtPosition(QGridLayout* self, int row, int column) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QGridLayout*>(self)->itemAtPosition(static_cast<int>(row), static_cast<int>(column));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QLayoutItem* QGridLayout_TakeAt(QGridLayout* self, int index) {
|
|
|
|
return self->takeAt(static_cast<int>(index));
|
|
|
|
}
|
|
|
|
|
|
|
|
int QGridLayout_Count(QGridLayout* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QGridLayout*>(self)->count();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QGridLayout_SetGeometry(QGridLayout* self, QRect* geometry) {
|
|
|
|
self->setGeometry(*geometry);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QGridLayout_AddItem(QGridLayout* self, QLayoutItem* item, int row, int column) {
|
|
|
|
self->addItem(item, static_cast<int>(row), static_cast<int>(column));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QGridLayout_SetDefaultPositioning(QGridLayout* self, int n, uintptr_t orient) {
|
|
|
|
self->setDefaultPositioning(static_cast<int>(n), static_cast<Qt::Orientation>(orient));
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QGridLayout_GetItemPosition(QGridLayout* self, int idx, int* row, int* column, int* rowSpan, int* columnSpan) {
|
2024-08-29 07:01:51 +00:00
|
|
|
const_cast<const QGridLayout*>(self)->getItemPosition(static_cast<int>(idx), static_cast<int*>(row), static_cast<int*>(column), static_cast<int*>(rowSpan), static_cast<int*>(columnSpan));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QGridLayout_Tr2(const char* s, const char* c, char** _out, int* _out_Strlen) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString ret = QGridLayout::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<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QGridLayout_Tr3(const char* s, const char* c, int n, char** _out, int* _out_Strlen) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString ret = QGridLayout::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();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QGridLayout_TrUtf82(const char* s, const char* c, char** _out, int* _out_Strlen) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString ret = QGridLayout::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<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QGridLayout_TrUtf83(const char* s, const char* c, int n, char** _out, int* _out_Strlen) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString ret = QGridLayout::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();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QGridLayout_AddWidget4(QGridLayout* self, QWidget* param1, int row, int column, int param4) {
|
|
|
|
self->addWidget(param1, static_cast<int>(row), static_cast<int>(column), static_cast<Qt::Alignment>(param4));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QGridLayout_AddWidget6(QGridLayout* self, QWidget* param1, int row, int column, int rowSpan, int columnSpan, int param6) {
|
|
|
|
self->addWidget(param1, static_cast<int>(row), static_cast<int>(column), static_cast<int>(rowSpan), static_cast<int>(columnSpan), static_cast<Qt::Alignment>(param6));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QGridLayout_AddLayout4(QGridLayout* self, QLayout* param1, int row, int column, int param4) {
|
|
|
|
self->addLayout(param1, static_cast<int>(row), static_cast<int>(column), static_cast<Qt::Alignment>(param4));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QGridLayout_AddLayout6(QGridLayout* self, QLayout* param1, int row, int column, int rowSpan, int columnSpan, int param6) {
|
|
|
|
self->addLayout(param1, static_cast<int>(row), static_cast<int>(column), static_cast<int>(rowSpan), static_cast<int>(columnSpan), static_cast<Qt::Alignment>(param6));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QGridLayout_AddItem4(QGridLayout* self, QLayoutItem* item, int row, int column, int rowSpan) {
|
|
|
|
self->addItem(item, static_cast<int>(row), static_cast<int>(column), static_cast<int>(rowSpan));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QGridLayout_AddItem5(QGridLayout* self, QLayoutItem* item, int row, int column, int rowSpan, int columnSpan) {
|
|
|
|
self->addItem(item, static_cast<int>(row), static_cast<int>(column), static_cast<int>(rowSpan), static_cast<int>(columnSpan));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QGridLayout_AddItem6(QGridLayout* self, QLayoutItem* item, int row, int column, int rowSpan, int columnSpan, int param6) {
|
|
|
|
self->addItem(item, static_cast<int>(row), static_cast<int>(column), static_cast<int>(rowSpan), static_cast<int>(columnSpan), static_cast<Qt::Alignment>(param6));
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QGridLayout_Delete(QGridLayout* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|