miqt/qt/gen_qcheckbox.cpp

124 lines
3.7 KiB
C++

#include <QCheckBox>
#include <QMetaObject>
#include <QSize>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QWidget>
#include "qcheckbox.h"
#include "gen_qcheckbox.h"
#include "_cgo_export.h"
QCheckBox* QCheckBox_new() {
return new QCheckBox();
}
QCheckBox* QCheckBox_new2(struct miqt_string* text) {
QString text_QString = QString::fromUtf8(&text->data, text->len);
return new QCheckBox(text_QString);
}
QCheckBox* QCheckBox_new3(QWidget* parent) {
return new QCheckBox(parent);
}
QCheckBox* QCheckBox_new4(struct miqt_string* text, QWidget* parent) {
QString text_QString = QString::fromUtf8(&text->data, text->len);
return new QCheckBox(text_QString, parent);
}
QMetaObject* QCheckBox_MetaObject(const QCheckBox* self) {
return (QMetaObject*) self->metaObject();
}
struct miqt_string* QCheckBox_Tr(const char* s) {
QString _ret = QCheckBox::tr(s);
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
return miqt_strdup(_b.data(), _b.length());
}
struct miqt_string* QCheckBox_TrUtf8(const char* s) {
QString _ret = QCheckBox::trUtf8(s);
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
return miqt_strdup(_b.data(), _b.length());
}
QSize* QCheckBox_SizeHint(const QCheckBox* self) {
QSize _ret = self->sizeHint();
// Copy-construct value returned type into heap-allocated copy
return static_cast<QSize*>(new QSize(_ret));
}
QSize* QCheckBox_MinimumSizeHint(const QCheckBox* self) {
QSize _ret = self->minimumSizeHint();
// Copy-construct value returned type into heap-allocated copy
return static_cast<QSize*>(new QSize(_ret));
}
void QCheckBox_SetTristate(QCheckBox* self) {
self->setTristate();
}
bool QCheckBox_IsTristate(const QCheckBox* self) {
return self->isTristate();
}
uintptr_t QCheckBox_CheckState(const QCheckBox* self) {
Qt::CheckState _ret = self->checkState();
return static_cast<uintptr_t>(_ret);
}
void QCheckBox_SetCheckState(QCheckBox* self, uintptr_t state) {
self->setCheckState(static_cast<Qt::CheckState>(state));
}
void QCheckBox_StateChanged(QCheckBox* self, int param1) {
self->stateChanged(static_cast<int>(param1));
}
void QCheckBox_connect_StateChanged(QCheckBox* self, void* slot) {
QCheckBox::connect(self, static_cast<void (QCheckBox::*)(int)>(&QCheckBox::stateChanged), self, [=](int param1) {
int sigval1 = param1;
miqt_exec_callback_QCheckBox_StateChanged(slot, sigval1);
});
}
struct miqt_string* QCheckBox_Tr2(const char* s, const char* c) {
QString _ret = QCheckBox::tr(s, c);
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
return miqt_strdup(_b.data(), _b.length());
}
struct miqt_string* QCheckBox_Tr3(const char* s, const char* c, int n) {
QString _ret = QCheckBox::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();
return miqt_strdup(_b.data(), _b.length());
}
struct miqt_string* QCheckBox_TrUtf82(const char* s, const char* c) {
QString _ret = QCheckBox::trUtf8(s, c);
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
return miqt_strdup(_b.data(), _b.length());
}
struct miqt_string* QCheckBox_TrUtf83(const char* s, const char* c, int n) {
QString _ret = QCheckBox::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();
return miqt_strdup(_b.data(), _b.length());
}
void QCheckBox_SetTristate1(QCheckBox* self, bool y) {
self->setTristate(y);
}
void QCheckBox_Delete(QCheckBox* self) {
delete self;
}