mirror of
https://github.com/mappu/miqt.git
synced 2025-01-03 14:18:37 +00:00
357 lines
11 KiB
C++
357 lines
11 KiB
C++
|
#include "gen_qboxlayout.h"
|
||
|
#include "qboxlayout.h"
|
||
|
|
||
|
#include <QBoxLayout>
|
||
|
#include <QHBoxLayout>
|
||
|
#include <QLayout>
|
||
|
#include <QLayoutItem>
|
||
|
#include <QMetaObject>
|
||
|
#include <QRect>
|
||
|
#include <QSize>
|
||
|
#include <QSpacerItem>
|
||
|
#include <QString>
|
||
|
#include <QVBoxLayout>
|
||
|
#include <QWidget>
|
||
|
|
||
|
|
||
|
extern "C" {
|
||
|
extern void miqt_exec_callback(void* cb, int argc, void* argv);
|
||
|
}
|
||
|
|
||
|
QMetaObject* QBoxLayout_MetaObject(QBoxLayout* self) {
|
||
|
return (QMetaObject*) self->metaObject();
|
||
|
}
|
||
|
|
||
|
void QBoxLayout_Tr(char* s, char** _out, int* _out_Strlen) {
|
||
|
QString ret = QBoxLayout::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();
|
||
|
}
|
||
|
|
||
|
void QBoxLayout_TrUtf8(char* s, char** _out, int* _out_Strlen) {
|
||
|
QString ret = QBoxLayout::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();
|
||
|
}
|
||
|
|
||
|
void QBoxLayout_AddSpacing(QBoxLayout* self, int size) {
|
||
|
self->addSpacing(static_cast<int>(size));
|
||
|
}
|
||
|
|
||
|
void QBoxLayout_AddStretch(QBoxLayout* self) {
|
||
|
self->addStretch();
|
||
|
}
|
||
|
|
||
|
void QBoxLayout_AddSpacerItem(QBoxLayout* self, QSpacerItem* spacerItem) {
|
||
|
self->addSpacerItem(spacerItem);
|
||
|
}
|
||
|
|
||
|
void QBoxLayout_AddLayout(QBoxLayout* self, QLayout* layout) {
|
||
|
self->addLayout(layout);
|
||
|
}
|
||
|
|
||
|
void QBoxLayout_AddStrut(QBoxLayout* self, int param1) {
|
||
|
self->addStrut(static_cast<int>(param1));
|
||
|
}
|
||
|
|
||
|
void QBoxLayout_AddItem(QBoxLayout* self, QLayoutItem* param1) {
|
||
|
self->addItem(param1);
|
||
|
}
|
||
|
|
||
|
void QBoxLayout_InsertSpacing(QBoxLayout* self, int index, int size) {
|
||
|
self->insertSpacing(static_cast<int>(index), static_cast<int>(size));
|
||
|
}
|
||
|
|
||
|
void QBoxLayout_InsertStretch(QBoxLayout* self, int index) {
|
||
|
self->insertStretch(static_cast<int>(index));
|
||
|
}
|
||
|
|
||
|
void QBoxLayout_InsertSpacerItem(QBoxLayout* self, int index, QSpacerItem* spacerItem) {
|
||
|
self->insertSpacerItem(static_cast<int>(index), spacerItem);
|
||
|
}
|
||
|
|
||
|
void QBoxLayout_InsertLayout(QBoxLayout* self, int index, QLayout* layout) {
|
||
|
self->insertLayout(static_cast<int>(index), layout);
|
||
|
}
|
||
|
|
||
|
void QBoxLayout_InsertItem(QBoxLayout* self, int index, QLayoutItem* param2) {
|
||
|
self->insertItem(static_cast<int>(index), param2);
|
||
|
}
|
||
|
|
||
|
int QBoxLayout_Spacing(QBoxLayout* self) {
|
||
|
return self->spacing();
|
||
|
}
|
||
|
|
||
|
void QBoxLayout_SetSpacing(QBoxLayout* self, int spacing) {
|
||
|
self->setSpacing(static_cast<int>(spacing));
|
||
|
}
|
||
|
|
||
|
bool QBoxLayout_SetStretchFactor(QBoxLayout* self, QWidget* w, int stretch) {
|
||
|
return self->setStretchFactor(w, static_cast<int>(stretch));
|
||
|
}
|
||
|
|
||
|
bool QBoxLayout_SetStretchFactor2(QBoxLayout* self, QLayout* l, int stretch) {
|
||
|
return self->setStretchFactor(l, static_cast<int>(stretch));
|
||
|
}
|
||
|
|
||
|
void QBoxLayout_SetStretch(QBoxLayout* self, int index, int stretch) {
|
||
|
self->setStretch(static_cast<int>(index), static_cast<int>(stretch));
|
||
|
}
|
||
|
|
||
|
int QBoxLayout_Stretch(QBoxLayout* self, int index) {
|
||
|
return self->stretch(static_cast<int>(index));
|
||
|
}
|
||
|
|
||
|
QSize* QBoxLayout_SizeHint(QBoxLayout* self) {
|
||
|
QSize ret = self->sizeHint();
|
||
|
// Copy-construct value returned type into heap-allocated copy
|
||
|
return static_cast<QSize*>(new QSize(ret));
|
||
|
}
|
||
|
|
||
|
QSize* QBoxLayout_MinimumSize(QBoxLayout* self) {
|
||
|
QSize ret = self->minimumSize();
|
||
|
// Copy-construct value returned type into heap-allocated copy
|
||
|
return static_cast<QSize*>(new QSize(ret));
|
||
|
}
|
||
|
|
||
|
QSize* QBoxLayout_MaximumSize(QBoxLayout* self) {
|
||
|
QSize ret = self->maximumSize();
|
||
|
// Copy-construct value returned type into heap-allocated copy
|
||
|
return static_cast<QSize*>(new QSize(ret));
|
||
|
}
|
||
|
|
||
|
bool QBoxLayout_HasHeightForWidth(QBoxLayout* self) {
|
||
|
return self->hasHeightForWidth();
|
||
|
}
|
||
|
|
||
|
int QBoxLayout_HeightForWidth(QBoxLayout* self, int param1) {
|
||
|
return self->heightForWidth(static_cast<int>(param1));
|
||
|
}
|
||
|
|
||
|
int QBoxLayout_MinimumHeightForWidth(QBoxLayout* self, int param1) {
|
||
|
return self->minimumHeightForWidth(static_cast<int>(param1));
|
||
|
}
|
||
|
|
||
|
void QBoxLayout_Invalidate(QBoxLayout* self) {
|
||
|
self->invalidate();
|
||
|
}
|
||
|
|
||
|
QLayoutItem* QBoxLayout_ItemAt(QBoxLayout* self, int param1) {
|
||
|
return self->itemAt(static_cast<int>(param1));
|
||
|
}
|
||
|
|
||
|
QLayoutItem* QBoxLayout_TakeAt(QBoxLayout* self, int param1) {
|
||
|
return self->takeAt(static_cast<int>(param1));
|
||
|
}
|
||
|
|
||
|
int QBoxLayout_Count(QBoxLayout* self) {
|
||
|
return self->count();
|
||
|
}
|
||
|
|
||
|
void QBoxLayout_SetGeometry(QBoxLayout* self, QRect* geometry) {
|
||
|
self->setGeometry(*geometry);
|
||
|
}
|
||
|
|
||
|
void QBoxLayout_Tr2(char* s, char* c, char** _out, int* _out_Strlen) {
|
||
|
QString ret = QBoxLayout::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();
|
||
|
}
|
||
|
|
||
|
void QBoxLayout_Tr3(char* s, char* c, int n, char** _out, int* _out_Strlen) {
|
||
|
QString ret = QBoxLayout::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();
|
||
|
}
|
||
|
|
||
|
void QBoxLayout_TrUtf82(char* s, char* c, char** _out, int* _out_Strlen) {
|
||
|
QString ret = QBoxLayout::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();
|
||
|
}
|
||
|
|
||
|
void QBoxLayout_TrUtf83(char* s, char* c, int n, char** _out, int* _out_Strlen) {
|
||
|
QString ret = QBoxLayout::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();
|
||
|
}
|
||
|
|
||
|
void QBoxLayout_AddStretch1(QBoxLayout* self, int stretch) {
|
||
|
self->addStretch(static_cast<int>(stretch));
|
||
|
}
|
||
|
|
||
|
void QBoxLayout_AddLayout2(QBoxLayout* self, QLayout* layout, int stretch) {
|
||
|
self->addLayout(layout, static_cast<int>(stretch));
|
||
|
}
|
||
|
|
||
|
void QBoxLayout_InsertStretch2(QBoxLayout* self, int index, int stretch) {
|
||
|
self->insertStretch(static_cast<int>(index), static_cast<int>(stretch));
|
||
|
}
|
||
|
|
||
|
void QBoxLayout_InsertLayout3(QBoxLayout* self, int index, QLayout* layout, int stretch) {
|
||
|
self->insertLayout(static_cast<int>(index), layout, static_cast<int>(stretch));
|
||
|
}
|
||
|
|
||
|
void QBoxLayout_Delete(QBoxLayout* self) {
|
||
|
delete self;
|
||
|
}
|
||
|
|
||
|
QHBoxLayout* QHBoxLayout_new() {
|
||
|
return new QHBoxLayout();
|
||
|
}
|
||
|
|
||
|
QHBoxLayout* QHBoxLayout_new2(QWidget* parent) {
|
||
|
return new QHBoxLayout(parent);
|
||
|
}
|
||
|
|
||
|
QMetaObject* QHBoxLayout_MetaObject(QHBoxLayout* self) {
|
||
|
return (QMetaObject*) self->metaObject();
|
||
|
}
|
||
|
|
||
|
void QHBoxLayout_Tr(char* s, char** _out, int* _out_Strlen) {
|
||
|
QString ret = QHBoxLayout::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();
|
||
|
}
|
||
|
|
||
|
void QHBoxLayout_TrUtf8(char* s, char** _out, int* _out_Strlen) {
|
||
|
QString ret = QHBoxLayout::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();
|
||
|
}
|
||
|
|
||
|
void QHBoxLayout_Tr2(char* s, char* c, char** _out, int* _out_Strlen) {
|
||
|
QString ret = QHBoxLayout::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();
|
||
|
}
|
||
|
|
||
|
void QHBoxLayout_Tr3(char* s, char* c, int n, char** _out, int* _out_Strlen) {
|
||
|
QString ret = QHBoxLayout::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();
|
||
|
}
|
||
|
|
||
|
void QHBoxLayout_TrUtf82(char* s, char* c, char** _out, int* _out_Strlen) {
|
||
|
QString ret = QHBoxLayout::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();
|
||
|
}
|
||
|
|
||
|
void QHBoxLayout_TrUtf83(char* s, char* c, int n, char** _out, int* _out_Strlen) {
|
||
|
QString ret = QHBoxLayout::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();
|
||
|
}
|
||
|
|
||
|
void QHBoxLayout_Delete(QHBoxLayout* self) {
|
||
|
delete self;
|
||
|
}
|
||
|
|
||
|
QVBoxLayout* QVBoxLayout_new() {
|
||
|
return new QVBoxLayout();
|
||
|
}
|
||
|
|
||
|
QVBoxLayout* QVBoxLayout_new2(QWidget* parent) {
|
||
|
return new QVBoxLayout(parent);
|
||
|
}
|
||
|
|
||
|
QMetaObject* QVBoxLayout_MetaObject(QVBoxLayout* self) {
|
||
|
return (QMetaObject*) self->metaObject();
|
||
|
}
|
||
|
|
||
|
void QVBoxLayout_Tr(char* s, char** _out, int* _out_Strlen) {
|
||
|
QString ret = QVBoxLayout::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();
|
||
|
}
|
||
|
|
||
|
void QVBoxLayout_TrUtf8(char* s, char** _out, int* _out_Strlen) {
|
||
|
QString ret = QVBoxLayout::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();
|
||
|
}
|
||
|
|
||
|
void QVBoxLayout_Tr2(char* s, char* c, char** _out, int* _out_Strlen) {
|
||
|
QString ret = QVBoxLayout::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();
|
||
|
}
|
||
|
|
||
|
void QVBoxLayout_Tr3(char* s, char* c, int n, char** _out, int* _out_Strlen) {
|
||
|
QString ret = QVBoxLayout::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();
|
||
|
}
|
||
|
|
||
|
void QVBoxLayout_TrUtf82(char* s, char* c, char** _out, int* _out_Strlen) {
|
||
|
QString ret = QVBoxLayout::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();
|
||
|
}
|
||
|
|
||
|
void QVBoxLayout_TrUtf83(char* s, char* c, int n, char** _out, int* _out_Strlen) {
|
||
|
QString ret = QVBoxLayout::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();
|
||
|
}
|
||
|
|
||
|
void QVBoxLayout_Delete(QVBoxLayout* self) {
|
||
|
delete self;
|
||
|
}
|
||
|
|