mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 08:58:37 +00:00
129 lines
4.0 KiB
C++
129 lines
4.0 KiB
C++
#include <QByteArray>
|
|
#include <QMetaObject>
|
|
#include <QObject>
|
|
#include <QSignalTransition>
|
|
#include <QState>
|
|
#include <QString>
|
|
#include <QByteArray>
|
|
#include <cstring>
|
|
#include <qsignaltransition.h>
|
|
#include "gen_qsignaltransition.h"
|
|
#include "_cgo_export.h"
|
|
|
|
QSignalTransition* QSignalTransition_new() {
|
|
return new QSignalTransition();
|
|
}
|
|
|
|
QSignalTransition* QSignalTransition_new2(QObject* sender, const char* signal) {
|
|
return new QSignalTransition(sender, signal);
|
|
}
|
|
|
|
QSignalTransition* QSignalTransition_new3(QState* sourceState) {
|
|
return new QSignalTransition(sourceState);
|
|
}
|
|
|
|
QSignalTransition* QSignalTransition_new4(QObject* sender, const char* signal, QState* sourceState) {
|
|
return new QSignalTransition(sender, signal, sourceState);
|
|
}
|
|
|
|
QMetaObject* QSignalTransition_MetaObject(const QSignalTransition* self) {
|
|
return (QMetaObject*) self->metaObject();
|
|
}
|
|
|
|
void* QSignalTransition_Metacast(QSignalTransition* self, const char* param1) {
|
|
return self->qt_metacast(param1);
|
|
}
|
|
|
|
struct miqt_string QSignalTransition_Tr(const char* s) {
|
|
QString _ret = QSignalTransition::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 QSignalTransition_TrUtf8(const char* s) {
|
|
QString _ret = QSignalTransition::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* QSignalTransition_SenderObject(const QSignalTransition* self) {
|
|
return self->senderObject();
|
|
}
|
|
|
|
void QSignalTransition_SetSenderObject(QSignalTransition* self, QObject* sender) {
|
|
self->setSenderObject(sender);
|
|
}
|
|
|
|
struct miqt_string QSignalTransition_Signal(const QSignalTransition* self) {
|
|
QByteArray _qb = self->signal();
|
|
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 QSignalTransition_SetSignal(QSignalTransition* self, struct miqt_string signal) {
|
|
QByteArray signal_QByteArray(signal.data, signal.len);
|
|
self->setSignal(signal_QByteArray);
|
|
}
|
|
|
|
struct miqt_string QSignalTransition_Tr2(const char* s, const char* c) {
|
|
QString _ret = QSignalTransition::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 QSignalTransition_Tr3(const char* s, const char* c, int n) {
|
|
QString _ret = QSignalTransition::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 QSignalTransition_TrUtf82(const char* s, const char* c) {
|
|
QString _ret = QSignalTransition::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 QSignalTransition_TrUtf83(const char* s, const char* c, int n) {
|
|
QString _ret = QSignalTransition::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 QSignalTransition_Delete(QSignalTransition* self) {
|
|
delete self;
|
|
}
|
|
|