mirror of
https://github.com/mappu/miqt.git
synced 2024-12-23 01:18:37 +00:00
130 lines
4.3 KiB
C++
130 lines
4.3 KiB
C++
#include <QByteArray>
|
|
#include <QMetaObject>
|
|
#include <QObject>
|
|
#include <QPropertyAnimation>
|
|
#include <QString>
|
|
#include <QByteArray>
|
|
#include <cstring>
|
|
#include <qpropertyanimation.h>
|
|
#include "gen_qpropertyanimation.h"
|
|
#include "_cgo_export.h"
|
|
|
|
QPropertyAnimation* QPropertyAnimation_new() {
|
|
return new QPropertyAnimation();
|
|
}
|
|
|
|
QPropertyAnimation* QPropertyAnimation_new2(QObject* target, struct miqt_string propertyName) {
|
|
QByteArray propertyName_QByteArray(propertyName.data, propertyName.len);
|
|
return new QPropertyAnimation(target, propertyName_QByteArray);
|
|
}
|
|
|
|
QPropertyAnimation* QPropertyAnimation_new3(QObject* parent) {
|
|
return new QPropertyAnimation(parent);
|
|
}
|
|
|
|
QPropertyAnimation* QPropertyAnimation_new4(QObject* target, struct miqt_string propertyName, QObject* parent) {
|
|
QByteArray propertyName_QByteArray(propertyName.data, propertyName.len);
|
|
return new QPropertyAnimation(target, propertyName_QByteArray, parent);
|
|
}
|
|
|
|
QMetaObject* QPropertyAnimation_MetaObject(const QPropertyAnimation* self) {
|
|
return (QMetaObject*) self->metaObject();
|
|
}
|
|
|
|
void* QPropertyAnimation_Metacast(QPropertyAnimation* self, const char* param1) {
|
|
return self->qt_metacast(param1);
|
|
}
|
|
|
|
struct miqt_string QPropertyAnimation_Tr(const char* s) {
|
|
QString _ret = QPropertyAnimation::tr(s);
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
QByteArray _b = _ret.toUtf8();
|
|
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;
|
|
}
|
|
|
|
struct miqt_string QPropertyAnimation_TrUtf8(const char* s) {
|
|
QString _ret = QPropertyAnimation::trUtf8(s);
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
QByteArray _b = _ret.toUtf8();
|
|
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;
|
|
}
|
|
|
|
QObject* QPropertyAnimation_TargetObject(const QPropertyAnimation* self) {
|
|
return self->targetObject();
|
|
}
|
|
|
|
void QPropertyAnimation_SetTargetObject(QPropertyAnimation* self, QObject* target) {
|
|
self->setTargetObject(target);
|
|
}
|
|
|
|
struct miqt_string QPropertyAnimation_PropertyName(const QPropertyAnimation* self) {
|
|
QByteArray _qb = self->propertyName();
|
|
struct miqt_string _ms;
|
|
_ms.len = _qb.length();
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
memcpy(_ms.data, _qb.data(), _ms.len);
|
|
return _ms;
|
|
}
|
|
|
|
void QPropertyAnimation_SetPropertyName(QPropertyAnimation* self, struct miqt_string propertyName) {
|
|
QByteArray propertyName_QByteArray(propertyName.data, propertyName.len);
|
|
self->setPropertyName(propertyName_QByteArray);
|
|
}
|
|
|
|
struct miqt_string QPropertyAnimation_Tr2(const char* s, const char* c) {
|
|
QString _ret = QPropertyAnimation::tr(s, c);
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
QByteArray _b = _ret.toUtf8();
|
|
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;
|
|
}
|
|
|
|
struct miqt_string QPropertyAnimation_Tr3(const char* s, const char* c, int n) {
|
|
QString _ret = QPropertyAnimation::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();
|
|
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;
|
|
}
|
|
|
|
struct miqt_string QPropertyAnimation_TrUtf82(const char* s, const char* c) {
|
|
QString _ret = QPropertyAnimation::trUtf8(s, c);
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
QByteArray _b = _ret.toUtf8();
|
|
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;
|
|
}
|
|
|
|
struct miqt_string QPropertyAnimation_TrUtf83(const char* s, const char* c, int n) {
|
|
QString _ret = QPropertyAnimation::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();
|
|
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;
|
|
}
|
|
|
|
void QPropertyAnimation_Delete(QPropertyAnimation* self) {
|
|
delete self;
|
|
}
|
|
|