mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 08:58:37 +00:00
102 lines
2.4 KiB
C++
102 lines
2.4 KiB
C++
#include <QDial>
|
|
#include <QMetaObject>
|
|
#include <QSize>
|
|
#include <QString>
|
|
#include <QByteArray>
|
|
#include <cstring>
|
|
#include <QWidget>
|
|
#include <qdial.h>
|
|
#include "gen_qdial.h"
|
|
#include "_cgo_export.h"
|
|
|
|
QDial* QDial_new(QWidget* parent) {
|
|
return new QDial(parent);
|
|
}
|
|
|
|
QDial* QDial_new2() {
|
|
return new QDial();
|
|
}
|
|
|
|
QMetaObject* QDial_MetaObject(const QDial* self) {
|
|
return (QMetaObject*) self->metaObject();
|
|
}
|
|
|
|
void* QDial_Metacast(QDial* self, const char* param1) {
|
|
return self->qt_metacast(param1);
|
|
}
|
|
|
|
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();
|
|
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;
|
|
}
|
|
|
|
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) {
|
|
qreal _ret = self->notchTarget();
|
|
return static_cast<double>(_ret);
|
|
}
|
|
|
|
bool QDial_NotchesVisible(const QDial* self) {
|
|
return self->notchesVisible();
|
|
}
|
|
|
|
QSize* QDial_SizeHint(const QDial* self) {
|
|
return new QSize(self->sizeHint());
|
|
}
|
|
|
|
QSize* QDial_MinimumSizeHint(const QDial* self) {
|
|
return new QSize(self->minimumSizeHint());
|
|
}
|
|
|
|
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();
|
|
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 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();
|
|
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 QDial_Delete(QDial* self) {
|
|
delete self;
|
|
}
|
|
|