miqt/qt/gen_qdial.cpp

110 lines
3.0 KiB
C++
Raw Normal View History

#include <QDial>
#include <QMetaObject>
#include <QSize>
#include <QString>
2024-08-29 07:01:51 +00:00
#include <QByteArray>
#include <cstring>
#include <QWidget>
2024-08-29 07:01:51 +00:00
#include "qdial.h"
#include "gen_qdial.h"
#include "_cgo_export.h"
QDial* QDial_new() {
return new QDial();
}
QDial* QDial_new2(QWidget* parent) {
return new QDial(parent);
}
QMetaObject* QDial_MetaObject(const QDial* self) {
return (QMetaObject*) self->metaObject();
}
struct miqt_string* QDial_Tr(const char* s) {
QString _ret = QDial::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* QDial_TrUtf8(const char* s) {
QString _ret = QDial::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());
}
bool QDial_Wrapping(const QDial* self) {
return self->wrapping();
}
int QDial_NotchSize(const QDial* self) {
return self->notchSize();
}
void QDial_SetNotchTarget(QDial* self, double target) {
self->setNotchTarget(static_cast<double>(target));
}
double QDial_NotchTarget(const QDial* self) {
return self->notchTarget();
}
bool QDial_NotchesVisible(const QDial* self) {
return self->notchesVisible();
}
QSize* QDial_SizeHint(const QDial* self) {
QSize _ret = self->sizeHint();
// Copy-construct value returned type into heap-allocated copy
return static_cast<QSize*>(new QSize(_ret));
}
QSize* QDial_MinimumSizeHint(const QDial* self) {
QSize _ret = self->minimumSizeHint();
// Copy-construct value returned type into heap-allocated copy
return static_cast<QSize*>(new QSize(_ret));
}
void QDial_SetNotchesVisible(QDial* self, bool visible) {
self->setNotchesVisible(visible);
}
void QDial_SetWrapping(QDial* self, bool on) {
self->setWrapping(on);
}
struct miqt_string* QDial_Tr2(const char* s, const char* c) {
QString _ret = QDial::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* QDial_Tr3(const char* s, const char* c, int n) {
QString _ret = QDial::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* QDial_TrUtf82(const char* s, const char* c) {
QString _ret = QDial::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* QDial_TrUtf83(const char* s, const char* c, int n) {
QString _ret = QDial::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 QDial_Delete(QDial* self) {
delete self;
}