2024-08-25 04:08:24 +00:00
|
|
|
#include <QAbstractButton>
|
|
|
|
#include <QButtonGroup>
|
|
|
|
#include <QIcon>
|
|
|
|
#include <QKeySequence>
|
|
|
|
#include <QMetaObject>
|
|
|
|
#include <QSize>
|
|
|
|
#include <QString>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
|
|
|
#include "qabstractbutton.h"
|
|
|
|
#include "gen_qabstractbutton.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMetaObject* QAbstractButton_MetaObject(const QAbstractButton* self) {
|
|
|
|
return (QMetaObject*) self->metaObject();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QAbstractButton_Tr(const char* s) {
|
|
|
|
QString _ret = QAbstractButton::tr(s);
|
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
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QAbstractButton_TrUtf8(const char* s) {
|
|
|
|
QString _ret = QAbstractButton::trUtf8(s);
|
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
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
void QAbstractButton_SetText(QAbstractButton* self, struct miqt_string* text) {
|
|
|
|
QString text_QString = QString::fromUtf8(&text->data, text->len);
|
2024-08-25 04:08:24 +00:00
|
|
|
self->setText(text_QString);
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QAbstractButton_Text(const QAbstractButton* self) {
|
|
|
|
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
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractButton_SetIcon(QAbstractButton* self, QIcon* icon) {
|
|
|
|
self->setIcon(*icon);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QIcon* QAbstractButton_Icon(const QAbstractButton* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QIcon _ret = self->icon();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QIcon*>(new QIcon(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QAbstractButton_IconSize(const QAbstractButton* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QSize _ret = self->iconSize();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QSize*>(new QSize(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractButton_SetShortcut(QAbstractButton* self, QKeySequence* key) {
|
|
|
|
self->setShortcut(*key);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QKeySequence* QAbstractButton_Shortcut(const QAbstractButton* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QKeySequence _ret = self->shortcut();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QKeySequence*>(new QKeySequence(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractButton_SetCheckable(QAbstractButton* self, bool checkable) {
|
|
|
|
self->setCheckable(checkable);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QAbstractButton_IsCheckable(const QAbstractButton* self) {
|
|
|
|
return self->isCheckable();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QAbstractButton_IsChecked(const QAbstractButton* self) {
|
|
|
|
return self->isChecked();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractButton_SetDown(QAbstractButton* self, bool down) {
|
|
|
|
self->setDown(down);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QAbstractButton_IsDown(const QAbstractButton* self) {
|
|
|
|
return self->isDown();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractButton_SetAutoRepeat(QAbstractButton* self, bool autoRepeat) {
|
|
|
|
self->setAutoRepeat(autoRepeat);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QAbstractButton_AutoRepeat(const QAbstractButton* self) {
|
|
|
|
return self->autoRepeat();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractButton_SetAutoRepeatDelay(QAbstractButton* self, int autoRepeatDelay) {
|
|
|
|
self->setAutoRepeatDelay(static_cast<int>(autoRepeatDelay));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QAbstractButton_AutoRepeatDelay(const QAbstractButton* self) {
|
|
|
|
return self->autoRepeatDelay();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractButton_SetAutoRepeatInterval(QAbstractButton* self, int autoRepeatInterval) {
|
|
|
|
self->setAutoRepeatInterval(static_cast<int>(autoRepeatInterval));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QAbstractButton_AutoRepeatInterval(const QAbstractButton* self) {
|
|
|
|
return self->autoRepeatInterval();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractButton_SetAutoExclusive(QAbstractButton* self, bool autoExclusive) {
|
|
|
|
self->setAutoExclusive(autoExclusive);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QAbstractButton_AutoExclusive(const QAbstractButton* self) {
|
|
|
|
return self->autoExclusive();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QButtonGroup* QAbstractButton_Group(const QAbstractButton* self) {
|
|
|
|
return self->group();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractButton_SetIconSize(QAbstractButton* self, QSize* size) {
|
|
|
|
self->setIconSize(*size);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractButton_AnimateClick(QAbstractButton* self) {
|
|
|
|
self->animateClick();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractButton_Click(QAbstractButton* self) {
|
|
|
|
self->click();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractButton_Toggle(QAbstractButton* self) {
|
|
|
|
self->toggle();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractButton_SetChecked(QAbstractButton* self, bool checked) {
|
|
|
|
self->setChecked(checked);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractButton_Pressed(QAbstractButton* self) {
|
|
|
|
self->pressed();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractButton_connect_Pressed(QAbstractButton* self, void* slot) {
|
|
|
|
QAbstractButton::connect(self, static_cast<void (QAbstractButton::*)()>(&QAbstractButton::pressed), self, [=]() {
|
2024-09-14 22:29:05 +00:00
|
|
|
miqt_exec_callback_QAbstractButton_Pressed(slot);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractButton_Released(QAbstractButton* self) {
|
|
|
|
self->released();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractButton_connect_Released(QAbstractButton* self, void* slot) {
|
|
|
|
QAbstractButton::connect(self, static_cast<void (QAbstractButton::*)()>(&QAbstractButton::released), self, [=]() {
|
2024-09-14 22:29:05 +00:00
|
|
|
miqt_exec_callback_QAbstractButton_Released(slot);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractButton_Clicked(QAbstractButton* self) {
|
|
|
|
self->clicked();
|
|
|
|
}
|
|
|
|
|
2024-09-07 03:31:00 +00:00
|
|
|
void QAbstractButton_connect_Clicked(QAbstractButton* self, void* slot) {
|
|
|
|
QAbstractButton::connect(self, static_cast<void (QAbstractButton::*)(bool)>(&QAbstractButton::clicked), self, [=]() {
|
2024-09-14 22:29:05 +00:00
|
|
|
miqt_exec_callback_QAbstractButton_Clicked(slot);
|
2024-09-07 03:31:00 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QAbstractButton_Toggled(QAbstractButton* self, bool checked) {
|
|
|
|
self->toggled(checked);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractButton_connect_Toggled(QAbstractButton* self, void* slot) {
|
|
|
|
QAbstractButton::connect(self, static_cast<void (QAbstractButton::*)(bool)>(&QAbstractButton::toggled), self, [=](bool checked) {
|
2024-09-14 22:29:05 +00:00
|
|
|
bool sigval1 = checked;
|
|
|
|
miqt_exec_callback_QAbstractButton_Toggled(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QAbstractButton_Tr2(const char* s, const char* c) {
|
|
|
|
QString _ret = QAbstractButton::tr(s, c);
|
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
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QAbstractButton_Tr3(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QAbstractButton::tr(s, c, static_cast<int>(n));
|
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
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QAbstractButton_TrUtf82(const char* s, const char* c) {
|
|
|
|
QString _ret = QAbstractButton::trUtf8(s, c);
|
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
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QAbstractButton_TrUtf83(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QAbstractButton::trUtf8(s, c, static_cast<int>(n));
|
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
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractButton_AnimateClick1(QAbstractButton* self, int msec) {
|
|
|
|
self->animateClick(static_cast<int>(msec));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractButton_Clicked1(QAbstractButton* self, bool checked) {
|
|
|
|
self->clicked(checked);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractButton_connect_Clicked1(QAbstractButton* self, void* slot) {
|
|
|
|
QAbstractButton::connect(self, static_cast<void (QAbstractButton::*)(bool)>(&QAbstractButton::clicked), self, [=](bool checked) {
|
2024-09-14 22:29:05 +00:00
|
|
|
bool sigval1 = checked;
|
|
|
|
miqt_exec_callback_QAbstractButton_Clicked1(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractButton_Delete(QAbstractButton* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|