miqt/qt/gen_qgraphicsproxywidget.cpp

109 lines
3.7 KiB
C++
Raw Normal View History

#include "gen_qgraphicsproxywidget.h"
#include "qgraphicsproxywidget.h"
#include <QGraphicsProxyWidget>
#include <QMetaObject>
#include <QPainter>
#include <QRectF>
#include <QString>
#include <QStyleOptionGraphicsItem>
#include <QWidget>
extern "C" {
extern void miqt_exec_callback(void* cb, int argc, void* argv);
}
QMetaObject* QGraphicsProxyWidget_MetaObject(QGraphicsProxyWidget* self) {
return (QMetaObject*) self->metaObject();
}
void QGraphicsProxyWidget_Tr(char* s, char** _out, int* _out_Strlen) {
QString ret = QGraphicsProxyWidget::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 QGraphicsProxyWidget_TrUtf8(char* s, char** _out, int* _out_Strlen) {
QString ret = QGraphicsProxyWidget::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 QGraphicsProxyWidget_SetWidget(QGraphicsProxyWidget* self, QWidget* widget) {
self->setWidget(widget);
}
QWidget* QGraphicsProxyWidget_Widget(QGraphicsProxyWidget* self) {
return self->widget();
}
QRectF* QGraphicsProxyWidget_SubWidgetRect(QGraphicsProxyWidget* self, QWidget* widget) {
QRectF ret = self->subWidgetRect(widget);
// Copy-construct value returned type into heap-allocated copy
return static_cast<QRectF*>(new QRectF(ret));
}
void QGraphicsProxyWidget_SetGeometry(QGraphicsProxyWidget* self, QRectF* rect) {
self->setGeometry(*rect);
}
void QGraphicsProxyWidget_Paint(QGraphicsProxyWidget* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) {
self->paint(painter, option, widget);
}
int QGraphicsProxyWidget_Type(QGraphicsProxyWidget* self) {
return self->type();
}
QGraphicsProxyWidget* QGraphicsProxyWidget_CreateProxyForChildWidget(QGraphicsProxyWidget* self, QWidget* child) {
return self->createProxyForChildWidget(child);
}
void QGraphicsProxyWidget_Tr2(char* s, char* c, char** _out, int* _out_Strlen) {
QString ret = QGraphicsProxyWidget::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 QGraphicsProxyWidget_Tr3(char* s, char* c, int n, char** _out, int* _out_Strlen) {
QString ret = QGraphicsProxyWidget::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 QGraphicsProxyWidget_TrUtf82(char* s, char* c, char** _out, int* _out_Strlen) {
QString ret = QGraphicsProxyWidget::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 QGraphicsProxyWidget_TrUtf83(char* s, char* c, int n, char** _out, int* _out_Strlen) {
QString ret = QGraphicsProxyWidget::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 QGraphicsProxyWidget_Delete(QGraphicsProxyWidget* self) {
delete self;
}