2024-08-25 04:08:24 +00:00
|
|
|
#include <QAbstractState>
|
|
|
|
#include <QAbstractTransition>
|
|
|
|
#include <QHistoryState>
|
|
|
|
#include <QMetaObject>
|
|
|
|
#include <QState>
|
|
|
|
#include <QString>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
|
|
|
#include "qhistorystate.h"
|
|
|
|
#include "gen_qhistorystate.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
QHistoryState* QHistoryState_new() {
|
|
|
|
return new QHistoryState();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QHistoryState* QHistoryState_new2(uintptr_t typeVal) {
|
|
|
|
return new QHistoryState(static_cast<QHistoryState::HistoryType>(typeVal));
|
|
|
|
}
|
|
|
|
|
|
|
|
QHistoryState* QHistoryState_new3(QState* parent) {
|
2024-08-25 04:08:24 +00:00
|
|
|
return new QHistoryState(parent);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QHistoryState* QHistoryState_new4(uintptr_t typeVal, QState* parent) {
|
|
|
|
return new QHistoryState(static_cast<QHistoryState::HistoryType>(typeVal), parent);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMetaObject* QHistoryState_MetaObject(const QHistoryState* self) {
|
|
|
|
return (QMetaObject*) self->metaObject();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QHistoryState_Tr(const char* s) {
|
|
|
|
QString _ret = QHistoryState::tr(s);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QHistoryState_TrUtf8(const char* s) {
|
|
|
|
QString _ret = QHistoryState::trUtf8(s);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QAbstractTransition* QHistoryState_DefaultTransition(const QHistoryState* self) {
|
|
|
|
return self->defaultTransition();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QHistoryState_SetDefaultTransition(QHistoryState* self, QAbstractTransition* transition) {
|
|
|
|
self->setDefaultTransition(transition);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QAbstractState* QHistoryState_DefaultState(const QHistoryState* self) {
|
|
|
|
return self->defaultState();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QHistoryState_SetDefaultState(QHistoryState* self, QAbstractState* state) {
|
|
|
|
self->setDefaultState(state);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
uintptr_t QHistoryState_HistoryType(const QHistoryState* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QHistoryState::HistoryType _ret = self->historyType();
|
|
|
|
return static_cast<uintptr_t>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QHistoryState_SetHistoryType(QHistoryState* self, uintptr_t typeVal) {
|
|
|
|
self->setHistoryType(static_cast<QHistoryState::HistoryType>(typeVal));
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QHistoryState_Tr2(const char* s, const char* c) {
|
|
|
|
QString _ret = QHistoryState::tr(s, c);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QHistoryState_Tr3(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QHistoryState::tr(s, c, static_cast<int>(n));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QHistoryState_TrUtf82(const char* s, const char* c) {
|
|
|
|
QString _ret = QHistoryState::trUtf8(s, c);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QHistoryState_TrUtf83(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QHistoryState::trUtf8(s, c, static_cast<int>(n));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QHistoryState_Delete(QHistoryState* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|