mirror of
https://github.com/mappu/miqt.git
synced 2024-12-23 01:18:37 +00:00
379 lines
13 KiB
C++
379 lines
13 KiB
C++
#include <QGraphicsRotation>
|
|
#include <QGraphicsScale>
|
|
#include <QGraphicsTransform>
|
|
#include <QMatrix4x4>
|
|
#include <QMetaObject>
|
|
#include <QObject>
|
|
#include <QString>
|
|
#include <QByteArray>
|
|
#include <cstring>
|
|
#include <QVector3D>
|
|
#include "qgraphicstransform.h"
|
|
|
|
#include "gen_qgraphicstransform.h"
|
|
|
|
extern "C" {
|
|
extern void miqt_exec_callback(void* cb, int argc, void* argv);
|
|
}
|
|
|
|
QMetaObject* QGraphicsTransform_MetaObject(QGraphicsTransform* self) {
|
|
return (QMetaObject*) const_cast<const QGraphicsTransform*>(self)->metaObject();
|
|
}
|
|
|
|
void QGraphicsTransform_Tr(const char* s, char** _out, int* _out_Strlen) {
|
|
QString ret = QGraphicsTransform::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 QGraphicsTransform_TrUtf8(const char* s, char** _out, int* _out_Strlen) {
|
|
QString ret = QGraphicsTransform::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 QGraphicsTransform_ApplyTo(QGraphicsTransform* self, QMatrix4x4* matrix) {
|
|
const_cast<const QGraphicsTransform*>(self)->applyTo(matrix);
|
|
}
|
|
|
|
void QGraphicsTransform_Tr2(const char* s, const char* c, char** _out, int* _out_Strlen) {
|
|
QString ret = QGraphicsTransform::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 QGraphicsTransform_Tr3(const char* s, const char* c, int n, char** _out, int* _out_Strlen) {
|
|
QString ret = QGraphicsTransform::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 QGraphicsTransform_TrUtf82(const char* s, const char* c, char** _out, int* _out_Strlen) {
|
|
QString ret = QGraphicsTransform::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 QGraphicsTransform_TrUtf83(const char* s, const char* c, int n, char** _out, int* _out_Strlen) {
|
|
QString ret = QGraphicsTransform::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 QGraphicsTransform_Delete(QGraphicsTransform* self) {
|
|
delete self;
|
|
}
|
|
|
|
QGraphicsScale* QGraphicsScale_new() {
|
|
return new QGraphicsScale();
|
|
}
|
|
|
|
QGraphicsScale* QGraphicsScale_new2(QObject* parent) {
|
|
return new QGraphicsScale(parent);
|
|
}
|
|
|
|
QMetaObject* QGraphicsScale_MetaObject(QGraphicsScale* self) {
|
|
return (QMetaObject*) const_cast<const QGraphicsScale*>(self)->metaObject();
|
|
}
|
|
|
|
void QGraphicsScale_Tr(const char* s, char** _out, int* _out_Strlen) {
|
|
QString ret = QGraphicsScale::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 QGraphicsScale_TrUtf8(const char* s, char** _out, int* _out_Strlen) {
|
|
QString ret = QGraphicsScale::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();
|
|
}
|
|
|
|
QVector3D* QGraphicsScale_Origin(QGraphicsScale* self) {
|
|
QVector3D ret = const_cast<const QGraphicsScale*>(self)->origin();
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
return static_cast<QVector3D*>(new QVector3D(ret));
|
|
}
|
|
|
|
void QGraphicsScale_SetOrigin(QGraphicsScale* self, QVector3D* point) {
|
|
self->setOrigin(*point);
|
|
}
|
|
|
|
double QGraphicsScale_XScale(QGraphicsScale* self) {
|
|
return const_cast<const QGraphicsScale*>(self)->xScale();
|
|
}
|
|
|
|
void QGraphicsScale_SetXScale(QGraphicsScale* self, double xScale) {
|
|
self->setXScale(static_cast<qreal>(xScale));
|
|
}
|
|
|
|
double QGraphicsScale_YScale(QGraphicsScale* self) {
|
|
return const_cast<const QGraphicsScale*>(self)->yScale();
|
|
}
|
|
|
|
void QGraphicsScale_SetYScale(QGraphicsScale* self, double yScale) {
|
|
self->setYScale(static_cast<qreal>(yScale));
|
|
}
|
|
|
|
double QGraphicsScale_ZScale(QGraphicsScale* self) {
|
|
return const_cast<const QGraphicsScale*>(self)->zScale();
|
|
}
|
|
|
|
void QGraphicsScale_SetZScale(QGraphicsScale* self, double zScale) {
|
|
self->setZScale(static_cast<qreal>(zScale));
|
|
}
|
|
|
|
void QGraphicsScale_ApplyTo(QGraphicsScale* self, QMatrix4x4* matrix) {
|
|
const_cast<const QGraphicsScale*>(self)->applyTo(matrix);
|
|
}
|
|
|
|
void QGraphicsScale_OriginChanged(QGraphicsScale* self) {
|
|
self->originChanged();
|
|
}
|
|
|
|
void QGraphicsScale_connect_OriginChanged(QGraphicsScale* self, void* slot) {
|
|
QGraphicsScale::connect(self, static_cast<void (QGraphicsScale::*)()>(&QGraphicsScale::originChanged), self, [=]() {
|
|
miqt_exec_callback(slot, 0, nullptr);
|
|
});
|
|
}
|
|
|
|
void QGraphicsScale_XScaleChanged(QGraphicsScale* self) {
|
|
self->xScaleChanged();
|
|
}
|
|
|
|
void QGraphicsScale_connect_XScaleChanged(QGraphicsScale* self, void* slot) {
|
|
QGraphicsScale::connect(self, static_cast<void (QGraphicsScale::*)()>(&QGraphicsScale::xScaleChanged), self, [=]() {
|
|
miqt_exec_callback(slot, 0, nullptr);
|
|
});
|
|
}
|
|
|
|
void QGraphicsScale_YScaleChanged(QGraphicsScale* self) {
|
|
self->yScaleChanged();
|
|
}
|
|
|
|
void QGraphicsScale_connect_YScaleChanged(QGraphicsScale* self, void* slot) {
|
|
QGraphicsScale::connect(self, static_cast<void (QGraphicsScale::*)()>(&QGraphicsScale::yScaleChanged), self, [=]() {
|
|
miqt_exec_callback(slot, 0, nullptr);
|
|
});
|
|
}
|
|
|
|
void QGraphicsScale_ZScaleChanged(QGraphicsScale* self) {
|
|
self->zScaleChanged();
|
|
}
|
|
|
|
void QGraphicsScale_connect_ZScaleChanged(QGraphicsScale* self, void* slot) {
|
|
QGraphicsScale::connect(self, static_cast<void (QGraphicsScale::*)()>(&QGraphicsScale::zScaleChanged), self, [=]() {
|
|
miqt_exec_callback(slot, 0, nullptr);
|
|
});
|
|
}
|
|
|
|
void QGraphicsScale_ScaleChanged(QGraphicsScale* self) {
|
|
self->scaleChanged();
|
|
}
|
|
|
|
void QGraphicsScale_connect_ScaleChanged(QGraphicsScale* self, void* slot) {
|
|
QGraphicsScale::connect(self, static_cast<void (QGraphicsScale::*)()>(&QGraphicsScale::scaleChanged), self, [=]() {
|
|
miqt_exec_callback(slot, 0, nullptr);
|
|
});
|
|
}
|
|
|
|
void QGraphicsScale_Tr2(const char* s, const char* c, char** _out, int* _out_Strlen) {
|
|
QString ret = QGraphicsScale::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 QGraphicsScale_Tr3(const char* s, const char* c, int n, char** _out, int* _out_Strlen) {
|
|
QString ret = QGraphicsScale::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 QGraphicsScale_TrUtf82(const char* s, const char* c, char** _out, int* _out_Strlen) {
|
|
QString ret = QGraphicsScale::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 QGraphicsScale_TrUtf83(const char* s, const char* c, int n, char** _out, int* _out_Strlen) {
|
|
QString ret = QGraphicsScale::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 QGraphicsScale_Delete(QGraphicsScale* self) {
|
|
delete self;
|
|
}
|
|
|
|
QGraphicsRotation* QGraphicsRotation_new() {
|
|
return new QGraphicsRotation();
|
|
}
|
|
|
|
QGraphicsRotation* QGraphicsRotation_new2(QObject* parent) {
|
|
return new QGraphicsRotation(parent);
|
|
}
|
|
|
|
QMetaObject* QGraphicsRotation_MetaObject(QGraphicsRotation* self) {
|
|
return (QMetaObject*) const_cast<const QGraphicsRotation*>(self)->metaObject();
|
|
}
|
|
|
|
void QGraphicsRotation_Tr(const char* s, char** _out, int* _out_Strlen) {
|
|
QString ret = QGraphicsRotation::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 QGraphicsRotation_TrUtf8(const char* s, char** _out, int* _out_Strlen) {
|
|
QString ret = QGraphicsRotation::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();
|
|
}
|
|
|
|
QVector3D* QGraphicsRotation_Origin(QGraphicsRotation* self) {
|
|
QVector3D ret = const_cast<const QGraphicsRotation*>(self)->origin();
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
return static_cast<QVector3D*>(new QVector3D(ret));
|
|
}
|
|
|
|
void QGraphicsRotation_SetOrigin(QGraphicsRotation* self, QVector3D* point) {
|
|
self->setOrigin(*point);
|
|
}
|
|
|
|
double QGraphicsRotation_Angle(QGraphicsRotation* self) {
|
|
return const_cast<const QGraphicsRotation*>(self)->angle();
|
|
}
|
|
|
|
void QGraphicsRotation_SetAngle(QGraphicsRotation* self, double angle) {
|
|
self->setAngle(static_cast<qreal>(angle));
|
|
}
|
|
|
|
QVector3D* QGraphicsRotation_Axis(QGraphicsRotation* self) {
|
|
QVector3D ret = const_cast<const QGraphicsRotation*>(self)->axis();
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
return static_cast<QVector3D*>(new QVector3D(ret));
|
|
}
|
|
|
|
void QGraphicsRotation_SetAxis(QGraphicsRotation* self, QVector3D* axis) {
|
|
self->setAxis(*axis);
|
|
}
|
|
|
|
void QGraphicsRotation_SetAxisWithAxis(QGraphicsRotation* self, uintptr_t axis) {
|
|
self->setAxis(static_cast<Qt::Axis>(axis));
|
|
}
|
|
|
|
void QGraphicsRotation_ApplyTo(QGraphicsRotation* self, QMatrix4x4* matrix) {
|
|
const_cast<const QGraphicsRotation*>(self)->applyTo(matrix);
|
|
}
|
|
|
|
void QGraphicsRotation_OriginChanged(QGraphicsRotation* self) {
|
|
self->originChanged();
|
|
}
|
|
|
|
void QGraphicsRotation_connect_OriginChanged(QGraphicsRotation* self, void* slot) {
|
|
QGraphicsRotation::connect(self, static_cast<void (QGraphicsRotation::*)()>(&QGraphicsRotation::originChanged), self, [=]() {
|
|
miqt_exec_callback(slot, 0, nullptr);
|
|
});
|
|
}
|
|
|
|
void QGraphicsRotation_AngleChanged(QGraphicsRotation* self) {
|
|
self->angleChanged();
|
|
}
|
|
|
|
void QGraphicsRotation_connect_AngleChanged(QGraphicsRotation* self, void* slot) {
|
|
QGraphicsRotation::connect(self, static_cast<void (QGraphicsRotation::*)()>(&QGraphicsRotation::angleChanged), self, [=]() {
|
|
miqt_exec_callback(slot, 0, nullptr);
|
|
});
|
|
}
|
|
|
|
void QGraphicsRotation_AxisChanged(QGraphicsRotation* self) {
|
|
self->axisChanged();
|
|
}
|
|
|
|
void QGraphicsRotation_connect_AxisChanged(QGraphicsRotation* self, void* slot) {
|
|
QGraphicsRotation::connect(self, static_cast<void (QGraphicsRotation::*)()>(&QGraphicsRotation::axisChanged), self, [=]() {
|
|
miqt_exec_callback(slot, 0, nullptr);
|
|
});
|
|
}
|
|
|
|
void QGraphicsRotation_Tr2(const char* s, const char* c, char** _out, int* _out_Strlen) {
|
|
QString ret = QGraphicsRotation::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 QGraphicsRotation_Tr3(const char* s, const char* c, int n, char** _out, int* _out_Strlen) {
|
|
QString ret = QGraphicsRotation::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 QGraphicsRotation_TrUtf82(const char* s, const char* c, char** _out, int* _out_Strlen) {
|
|
QString ret = QGraphicsRotation::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 QGraphicsRotation_TrUtf83(const char* s, const char* c, int n, char** _out, int* _out_Strlen) {
|
|
QString ret = QGraphicsRotation::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 QGraphicsRotation_Delete(QGraphicsRotation* self) {
|
|
delete self;
|
|
}
|
|
|