mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 08:58:37 +00:00
409 lines
14 KiB
C++
409 lines
14 KiB
C++
#include <QDoubleSpinBox>
|
|
#include <QMetaObject>
|
|
#include <QSpinBox>
|
|
#include <QString>
|
|
#include <QByteArray>
|
|
#include <cstring>
|
|
#include <QWidget>
|
|
#include "qspinbox.h"
|
|
#include "gen_qspinbox.h"
|
|
#include "_cgo_export.h"
|
|
|
|
QSpinBox* QSpinBox_new() {
|
|
return new QSpinBox();
|
|
}
|
|
|
|
QSpinBox* QSpinBox_new2(QWidget* parent) {
|
|
return new QSpinBox(parent);
|
|
}
|
|
|
|
QMetaObject* QSpinBox_MetaObject(const QSpinBox* self) {
|
|
return (QMetaObject*) self->metaObject();
|
|
}
|
|
|
|
void* QSpinBox_Metacast(QSpinBox* self, const char* param1) {
|
|
return self->qt_metacast(param1);
|
|
}
|
|
|
|
struct miqt_string* QSpinBox_Tr(const char* s) {
|
|
QString _ret = QSpinBox::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* QSpinBox_TrUtf8(const char* s) {
|
|
QString _ret = QSpinBox::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());
|
|
}
|
|
|
|
int QSpinBox_Value(const QSpinBox* self) {
|
|
return self->value();
|
|
}
|
|
|
|
struct miqt_string* QSpinBox_Prefix(const QSpinBox* self) {
|
|
QString _ret = self->prefix();
|
|
// 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 QSpinBox_SetPrefix(QSpinBox* self, struct miqt_string* prefix) {
|
|
QString prefix_QString = QString::fromUtf8(&prefix->data, prefix->len);
|
|
self->setPrefix(prefix_QString);
|
|
}
|
|
|
|
struct miqt_string* QSpinBox_Suffix(const QSpinBox* self) {
|
|
QString _ret = self->suffix();
|
|
// 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 QSpinBox_SetSuffix(QSpinBox* self, struct miqt_string* suffix) {
|
|
QString suffix_QString = QString::fromUtf8(&suffix->data, suffix->len);
|
|
self->setSuffix(suffix_QString);
|
|
}
|
|
|
|
struct miqt_string* QSpinBox_CleanText(const QSpinBox* self) {
|
|
QString _ret = self->cleanText();
|
|
// 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());
|
|
}
|
|
|
|
int QSpinBox_SingleStep(const QSpinBox* self) {
|
|
return self->singleStep();
|
|
}
|
|
|
|
void QSpinBox_SetSingleStep(QSpinBox* self, int val) {
|
|
self->setSingleStep(static_cast<int>(val));
|
|
}
|
|
|
|
int QSpinBox_Minimum(const QSpinBox* self) {
|
|
return self->minimum();
|
|
}
|
|
|
|
void QSpinBox_SetMinimum(QSpinBox* self, int min) {
|
|
self->setMinimum(static_cast<int>(min));
|
|
}
|
|
|
|
int QSpinBox_Maximum(const QSpinBox* self) {
|
|
return self->maximum();
|
|
}
|
|
|
|
void QSpinBox_SetMaximum(QSpinBox* self, int max) {
|
|
self->setMaximum(static_cast<int>(max));
|
|
}
|
|
|
|
void QSpinBox_SetRange(QSpinBox* self, int min, int max) {
|
|
self->setRange(static_cast<int>(min), static_cast<int>(max));
|
|
}
|
|
|
|
int QSpinBox_StepType(const QSpinBox* self) {
|
|
QAbstractSpinBox::StepType _ret = self->stepType();
|
|
return static_cast<int>(_ret);
|
|
}
|
|
|
|
void QSpinBox_SetStepType(QSpinBox* self, int stepType) {
|
|
self->setStepType(static_cast<QAbstractSpinBox::StepType>(stepType));
|
|
}
|
|
|
|
int QSpinBox_DisplayIntegerBase(const QSpinBox* self) {
|
|
return self->displayIntegerBase();
|
|
}
|
|
|
|
void QSpinBox_SetDisplayIntegerBase(QSpinBox* self, int base) {
|
|
self->setDisplayIntegerBase(static_cast<int>(base));
|
|
}
|
|
|
|
void QSpinBox_SetValue(QSpinBox* self, int val) {
|
|
self->setValue(static_cast<int>(val));
|
|
}
|
|
|
|
void QSpinBox_ValueChanged(QSpinBox* self, int param1) {
|
|
self->valueChanged(static_cast<int>(param1));
|
|
}
|
|
|
|
void QSpinBox_connect_ValueChanged(QSpinBox* self, void* slot) {
|
|
QSpinBox::connect(self, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), self, [=](int param1) {
|
|
int sigval1 = param1;
|
|
miqt_exec_callback_QSpinBox_ValueChanged(slot, sigval1);
|
|
});
|
|
}
|
|
|
|
void QSpinBox_TextChanged(QSpinBox* self, struct miqt_string* param1) {
|
|
QString param1_QString = QString::fromUtf8(¶m1->data, param1->len);
|
|
self->textChanged(param1_QString);
|
|
}
|
|
|
|
void QSpinBox_connect_TextChanged(QSpinBox* self, void* slot) {
|
|
QSpinBox::connect(self, static_cast<void (QSpinBox::*)(const QString&)>(&QSpinBox::textChanged), self, [=](const QString& param1) {
|
|
const QString param1_ret = param1;
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
QByteArray param1_b = param1_ret.toUtf8();
|
|
struct miqt_string* sigval1 = miqt_strdup(param1_b.data(), param1_b.length());
|
|
miqt_exec_callback_QSpinBox_TextChanged(slot, sigval1);
|
|
});
|
|
}
|
|
|
|
void QSpinBox_ValueChangedWithQString(QSpinBox* self, struct miqt_string* param1) {
|
|
QString param1_QString = QString::fromUtf8(¶m1->data, param1->len);
|
|
self->valueChanged(param1_QString);
|
|
}
|
|
|
|
void QSpinBox_connect_ValueChangedWithQString(QSpinBox* self, void* slot) {
|
|
QSpinBox::connect(self, static_cast<void (QSpinBox::*)(const QString&)>(&QSpinBox::valueChanged), self, [=](const QString& param1) {
|
|
const QString param1_ret = param1;
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
QByteArray param1_b = param1_ret.toUtf8();
|
|
struct miqt_string* sigval1 = miqt_strdup(param1_b.data(), param1_b.length());
|
|
miqt_exec_callback_QSpinBox_ValueChangedWithQString(slot, sigval1);
|
|
});
|
|
}
|
|
|
|
struct miqt_string* QSpinBox_Tr2(const char* s, const char* c) {
|
|
QString _ret = QSpinBox::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* QSpinBox_Tr3(const char* s, const char* c, int n) {
|
|
QString _ret = QSpinBox::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* QSpinBox_TrUtf82(const char* s, const char* c) {
|
|
QString _ret = QSpinBox::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* QSpinBox_TrUtf83(const char* s, const char* c, int n) {
|
|
QString _ret = QSpinBox::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 QSpinBox_Delete(QSpinBox* self) {
|
|
delete self;
|
|
}
|
|
|
|
QDoubleSpinBox* QDoubleSpinBox_new() {
|
|
return new QDoubleSpinBox();
|
|
}
|
|
|
|
QDoubleSpinBox* QDoubleSpinBox_new2(QWidget* parent) {
|
|
return new QDoubleSpinBox(parent);
|
|
}
|
|
|
|
QMetaObject* QDoubleSpinBox_MetaObject(const QDoubleSpinBox* self) {
|
|
return (QMetaObject*) self->metaObject();
|
|
}
|
|
|
|
void* QDoubleSpinBox_Metacast(QDoubleSpinBox* self, const char* param1) {
|
|
return self->qt_metacast(param1);
|
|
}
|
|
|
|
struct miqt_string* QDoubleSpinBox_Tr(const char* s) {
|
|
QString _ret = QDoubleSpinBox::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* QDoubleSpinBox_TrUtf8(const char* s) {
|
|
QString _ret = QDoubleSpinBox::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());
|
|
}
|
|
|
|
double QDoubleSpinBox_Value(const QDoubleSpinBox* self) {
|
|
return self->value();
|
|
}
|
|
|
|
struct miqt_string* QDoubleSpinBox_Prefix(const QDoubleSpinBox* self) {
|
|
QString _ret = self->prefix();
|
|
// 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 QDoubleSpinBox_SetPrefix(QDoubleSpinBox* self, struct miqt_string* prefix) {
|
|
QString prefix_QString = QString::fromUtf8(&prefix->data, prefix->len);
|
|
self->setPrefix(prefix_QString);
|
|
}
|
|
|
|
struct miqt_string* QDoubleSpinBox_Suffix(const QDoubleSpinBox* self) {
|
|
QString _ret = self->suffix();
|
|
// 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 QDoubleSpinBox_SetSuffix(QDoubleSpinBox* self, struct miqt_string* suffix) {
|
|
QString suffix_QString = QString::fromUtf8(&suffix->data, suffix->len);
|
|
self->setSuffix(suffix_QString);
|
|
}
|
|
|
|
struct miqt_string* QDoubleSpinBox_CleanText(const QDoubleSpinBox* self) {
|
|
QString _ret = self->cleanText();
|
|
// 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());
|
|
}
|
|
|
|
double QDoubleSpinBox_SingleStep(const QDoubleSpinBox* self) {
|
|
return self->singleStep();
|
|
}
|
|
|
|
void QDoubleSpinBox_SetSingleStep(QDoubleSpinBox* self, double val) {
|
|
self->setSingleStep(static_cast<double>(val));
|
|
}
|
|
|
|
double QDoubleSpinBox_Minimum(const QDoubleSpinBox* self) {
|
|
return self->minimum();
|
|
}
|
|
|
|
void QDoubleSpinBox_SetMinimum(QDoubleSpinBox* self, double min) {
|
|
self->setMinimum(static_cast<double>(min));
|
|
}
|
|
|
|
double QDoubleSpinBox_Maximum(const QDoubleSpinBox* self) {
|
|
return self->maximum();
|
|
}
|
|
|
|
void QDoubleSpinBox_SetMaximum(QDoubleSpinBox* self, double max) {
|
|
self->setMaximum(static_cast<double>(max));
|
|
}
|
|
|
|
void QDoubleSpinBox_SetRange(QDoubleSpinBox* self, double min, double max) {
|
|
self->setRange(static_cast<double>(min), static_cast<double>(max));
|
|
}
|
|
|
|
int QDoubleSpinBox_StepType(const QDoubleSpinBox* self) {
|
|
QAbstractSpinBox::StepType _ret = self->stepType();
|
|
return static_cast<int>(_ret);
|
|
}
|
|
|
|
void QDoubleSpinBox_SetStepType(QDoubleSpinBox* self, int stepType) {
|
|
self->setStepType(static_cast<QAbstractSpinBox::StepType>(stepType));
|
|
}
|
|
|
|
int QDoubleSpinBox_Decimals(const QDoubleSpinBox* self) {
|
|
return self->decimals();
|
|
}
|
|
|
|
void QDoubleSpinBox_SetDecimals(QDoubleSpinBox* self, int prec) {
|
|
self->setDecimals(static_cast<int>(prec));
|
|
}
|
|
|
|
int QDoubleSpinBox_Validate(const QDoubleSpinBox* self, struct miqt_string* input, int* pos) {
|
|
QString input_QString = QString::fromUtf8(&input->data, input->len);
|
|
QValidator::State _ret = self->validate(input_QString, static_cast<int&>(*pos));
|
|
return static_cast<int>(_ret);
|
|
}
|
|
|
|
double QDoubleSpinBox_ValueFromText(const QDoubleSpinBox* self, struct miqt_string* text) {
|
|
QString text_QString = QString::fromUtf8(&text->data, text->len);
|
|
return self->valueFromText(text_QString);
|
|
}
|
|
|
|
struct miqt_string* QDoubleSpinBox_TextFromValue(const QDoubleSpinBox* self, double val) {
|
|
QString _ret = self->textFromValue(static_cast<double>(val));
|
|
// 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 QDoubleSpinBox_Fixup(const QDoubleSpinBox* self, struct miqt_string* str) {
|
|
QString str_QString = QString::fromUtf8(&str->data, str->len);
|
|
self->fixup(str_QString);
|
|
}
|
|
|
|
void QDoubleSpinBox_SetValue(QDoubleSpinBox* self, double val) {
|
|
self->setValue(static_cast<double>(val));
|
|
}
|
|
|
|
void QDoubleSpinBox_ValueChanged(QDoubleSpinBox* self, double param1) {
|
|
self->valueChanged(static_cast<double>(param1));
|
|
}
|
|
|
|
void QDoubleSpinBox_connect_ValueChanged(QDoubleSpinBox* self, void* slot) {
|
|
QDoubleSpinBox::connect(self, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged), self, [=](double param1) {
|
|
double sigval1 = param1;
|
|
miqt_exec_callback_QDoubleSpinBox_ValueChanged(slot, sigval1);
|
|
});
|
|
}
|
|
|
|
void QDoubleSpinBox_TextChanged(QDoubleSpinBox* self, struct miqt_string* param1) {
|
|
QString param1_QString = QString::fromUtf8(¶m1->data, param1->len);
|
|
self->textChanged(param1_QString);
|
|
}
|
|
|
|
void QDoubleSpinBox_connect_TextChanged(QDoubleSpinBox* self, void* slot) {
|
|
QDoubleSpinBox::connect(self, static_cast<void (QDoubleSpinBox::*)(const QString&)>(&QDoubleSpinBox::textChanged), self, [=](const QString& param1) {
|
|
const QString param1_ret = param1;
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
QByteArray param1_b = param1_ret.toUtf8();
|
|
struct miqt_string* sigval1 = miqt_strdup(param1_b.data(), param1_b.length());
|
|
miqt_exec_callback_QDoubleSpinBox_TextChanged(slot, sigval1);
|
|
});
|
|
}
|
|
|
|
void QDoubleSpinBox_ValueChangedWithQString(QDoubleSpinBox* self, struct miqt_string* param1) {
|
|
QString param1_QString = QString::fromUtf8(¶m1->data, param1->len);
|
|
self->valueChanged(param1_QString);
|
|
}
|
|
|
|
void QDoubleSpinBox_connect_ValueChangedWithQString(QDoubleSpinBox* self, void* slot) {
|
|
QDoubleSpinBox::connect(self, static_cast<void (QDoubleSpinBox::*)(const QString&)>(&QDoubleSpinBox::valueChanged), self, [=](const QString& param1) {
|
|
const QString param1_ret = param1;
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
QByteArray param1_b = param1_ret.toUtf8();
|
|
struct miqt_string* sigval1 = miqt_strdup(param1_b.data(), param1_b.length());
|
|
miqt_exec_callback_QDoubleSpinBox_ValueChangedWithQString(slot, sigval1);
|
|
});
|
|
}
|
|
|
|
struct miqt_string* QDoubleSpinBox_Tr2(const char* s, const char* c) {
|
|
QString _ret = QDoubleSpinBox::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* QDoubleSpinBox_Tr3(const char* s, const char* c, int n) {
|
|
QString _ret = QDoubleSpinBox::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* QDoubleSpinBox_TrUtf82(const char* s, const char* c) {
|
|
QString _ret = QDoubleSpinBox::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* QDoubleSpinBox_TrUtf83(const char* s, const char* c, int n) {
|
|
QString _ret = QDoubleSpinBox::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 QDoubleSpinBox_Delete(QDoubleSpinBox* self) {
|
|
delete self;
|
|
}
|
|
|