2024-08-25 04:08:24 +00:00
|
|
|
#include <QAbstractSpinBox>
|
|
|
|
#include <QEvent>
|
|
|
|
#include <QMetaObject>
|
|
|
|
#include <QSize>
|
|
|
|
#include <QString>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
|
|
|
#include <QVariant>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QWidget>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "qabstractspinbox.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qabstractspinbox.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
extern void miqt_exec_callback(void* cb, int argc, void* argv);
|
|
|
|
}
|
|
|
|
|
|
|
|
QAbstractSpinBox* QAbstractSpinBox_new() {
|
|
|
|
return new QAbstractSpinBox();
|
|
|
|
}
|
|
|
|
|
|
|
|
QAbstractSpinBox* QAbstractSpinBox_new2(QWidget* parent) {
|
|
|
|
return new QAbstractSpinBox(parent);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMetaObject* QAbstractSpinBox_MetaObject(const QAbstractSpinBox* self) {
|
|
|
|
return (QMetaObject*) self->metaObject();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QAbstractSpinBox_Tr(const char* s, char** _out, int* _out_Strlen) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString ret = QAbstractSpinBox::tr(s);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QAbstractSpinBox_TrUtf8(const char* s, char** _out, int* _out_Strlen) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString ret = QAbstractSpinBox::trUtf8(s);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
uintptr_t QAbstractSpinBox_ButtonSymbols(const QAbstractSpinBox* self) {
|
|
|
|
QAbstractSpinBox::ButtonSymbols ret = self->buttonSymbols();
|
2024-08-29 07:01:51 +00:00
|
|
|
return static_cast<uintptr_t>(ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractSpinBox_SetButtonSymbols(QAbstractSpinBox* self, uintptr_t bs) {
|
|
|
|
self->setButtonSymbols(static_cast<QAbstractSpinBox::ButtonSymbols>(bs));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractSpinBox_SetCorrectionMode(QAbstractSpinBox* self, uintptr_t cm) {
|
|
|
|
self->setCorrectionMode(static_cast<QAbstractSpinBox::CorrectionMode>(cm));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
uintptr_t QAbstractSpinBox_CorrectionMode(const QAbstractSpinBox* self) {
|
|
|
|
QAbstractSpinBox::CorrectionMode ret = self->correctionMode();
|
2024-08-29 07:01:51 +00:00
|
|
|
return static_cast<uintptr_t>(ret);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QAbstractSpinBox_HasAcceptableInput(const QAbstractSpinBox* self) {
|
|
|
|
return self->hasAcceptableInput();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
void QAbstractSpinBox_Text(const QAbstractSpinBox* self, char** _out, int* _out_Strlen) {
|
|
|
|
QString ret = self->text();
|
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
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
void QAbstractSpinBox_SpecialValueText(const QAbstractSpinBox* self, char** _out, int* _out_Strlen) {
|
|
|
|
QString ret = self->specialValueText();
|
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
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractSpinBox_SetSpecialValueText(QAbstractSpinBox* self, const char* txt, size_t txt_Strlen) {
|
|
|
|
QString txt_QString = QString::fromUtf8(txt, txt_Strlen);
|
|
|
|
self->setSpecialValueText(txt_QString);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QAbstractSpinBox_Wrapping(const QAbstractSpinBox* self) {
|
|
|
|
return self->wrapping();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractSpinBox_SetWrapping(QAbstractSpinBox* self, bool w) {
|
|
|
|
self->setWrapping(w);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractSpinBox_SetReadOnly(QAbstractSpinBox* self, bool r) {
|
|
|
|
self->setReadOnly(r);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QAbstractSpinBox_IsReadOnly(const QAbstractSpinBox* self) {
|
|
|
|
return self->isReadOnly();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractSpinBox_SetKeyboardTracking(QAbstractSpinBox* self, bool kt) {
|
|
|
|
self->setKeyboardTracking(kt);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QAbstractSpinBox_KeyboardTracking(const QAbstractSpinBox* self) {
|
|
|
|
return self->keyboardTracking();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractSpinBox_SetAlignment(QAbstractSpinBox* self, int flag) {
|
|
|
|
self->setAlignment(static_cast<Qt::Alignment>(flag));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QAbstractSpinBox_Alignment(const QAbstractSpinBox* self) {
|
|
|
|
Qt::Alignment ret = self->alignment();
|
2024-08-29 07:01:51 +00:00
|
|
|
return static_cast<int>(ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractSpinBox_SetFrame(QAbstractSpinBox* self, bool frame) {
|
|
|
|
self->setFrame(frame);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QAbstractSpinBox_HasFrame(const QAbstractSpinBox* self) {
|
|
|
|
return self->hasFrame();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractSpinBox_SetAccelerated(QAbstractSpinBox* self, bool on) {
|
|
|
|
self->setAccelerated(on);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QAbstractSpinBox_IsAccelerated(const QAbstractSpinBox* self) {
|
|
|
|
return self->isAccelerated();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractSpinBox_SetGroupSeparatorShown(QAbstractSpinBox* self, bool shown) {
|
|
|
|
self->setGroupSeparatorShown(shown);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QAbstractSpinBox_IsGroupSeparatorShown(const QAbstractSpinBox* self) {
|
|
|
|
return self->isGroupSeparatorShown();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QAbstractSpinBox_SizeHint(const QAbstractSpinBox* self) {
|
|
|
|
QSize ret = self->sizeHint();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QSize*>(new QSize(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QAbstractSpinBox_MinimumSizeHint(const QAbstractSpinBox* self) {
|
|
|
|
QSize ret = self->minimumSizeHint();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QSize*>(new QSize(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractSpinBox_InterpretText(QAbstractSpinBox* self) {
|
|
|
|
self->interpretText();
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QAbstractSpinBox_Event(QAbstractSpinBox* self, QEvent* event) {
|
|
|
|
return self->event(event);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QVariant* QAbstractSpinBox_InputMethodQuery(const QAbstractSpinBox* self, uintptr_t param1) {
|
|
|
|
QVariant ret = self->inputMethodQuery(static_cast<Qt::InputMethodQuery>(param1));
|
2024-08-29 07:01:51 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QVariant*>(new QVariant(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
uintptr_t QAbstractSpinBox_Validate(const QAbstractSpinBox* self, const char* input, size_t input_Strlen, int* pos) {
|
2024-08-29 07:01:51 +00:00
|
|
|
QString input_QString = QString::fromUtf8(input, input_Strlen);
|
2024-09-11 05:41:09 +00:00
|
|
|
QValidator::State ret = self->validate(input_QString, static_cast<int&>(*pos));
|
2024-08-29 07:01:51 +00:00
|
|
|
return static_cast<uintptr_t>(ret);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
void QAbstractSpinBox_Fixup(const QAbstractSpinBox* self, const char* input, size_t input_Strlen) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString input_QString = QString::fromUtf8(input, input_Strlen);
|
2024-09-11 05:41:09 +00:00
|
|
|
self->fixup(input_QString);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractSpinBox_StepBy(QAbstractSpinBox* self, int steps) {
|
|
|
|
self->stepBy(static_cast<int>(steps));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractSpinBox_StepUp(QAbstractSpinBox* self) {
|
|
|
|
self->stepUp();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractSpinBox_StepDown(QAbstractSpinBox* self) {
|
|
|
|
self->stepDown();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractSpinBox_SelectAll(QAbstractSpinBox* self) {
|
|
|
|
self->selectAll();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractSpinBox_Clear(QAbstractSpinBox* self) {
|
|
|
|
self->clear();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractSpinBox_EditingFinished(QAbstractSpinBox* self) {
|
|
|
|
self->editingFinished();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractSpinBox_connect_EditingFinished(QAbstractSpinBox* self, void* slot) {
|
|
|
|
QAbstractSpinBox::connect(self, static_cast<void (QAbstractSpinBox::*)()>(&QAbstractSpinBox::editingFinished), self, [=]() {
|
|
|
|
miqt_exec_callback(slot, 0, nullptr);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QAbstractSpinBox_Tr2(const char* s, const char* c, char** _out, int* _out_Strlen) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString ret = QAbstractSpinBox::tr(s, c);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QAbstractSpinBox_Tr3(const char* s, const char* c, int n, char** _out, int* _out_Strlen) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString ret = QAbstractSpinBox::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();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QAbstractSpinBox_TrUtf82(const char* s, const char* c, char** _out, int* _out_Strlen) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString ret = QAbstractSpinBox::trUtf8(s, c);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QAbstractSpinBox_TrUtf83(const char* s, const char* c, int n, char** _out, int* _out_Strlen) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString ret = QAbstractSpinBox::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();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractSpinBox_Delete(QAbstractSpinBox* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|