2024-08-25 04:08:24 +00:00
|
|
|
#include <QIcon>
|
|
|
|
#include <QMenu>
|
|
|
|
#include <QMetaObject>
|
|
|
|
#include <QPushButton>
|
|
|
|
#include <QSize>
|
|
|
|
#include <QString>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QWidget>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "qpushbutton.h"
|
|
|
|
#include "gen_qpushbutton.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
QPushButton* QPushButton_new() {
|
|
|
|
return new QPushButton();
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
QPushButton* QPushButton_new2(struct miqt_string* text) {
|
|
|
|
QString text_QString = QString::fromUtf8(&text->data, text->len);
|
2024-08-25 04:08:24 +00:00
|
|
|
return new QPushButton(text_QString);
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
QPushButton* QPushButton_new3(QIcon* icon, struct miqt_string* text) {
|
|
|
|
QString text_QString = QString::fromUtf8(&text->data, text->len);
|
2024-08-25 04:08:24 +00:00
|
|
|
return new QPushButton(*icon, text_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
QPushButton* QPushButton_new4(QWidget* parent) {
|
|
|
|
return new QPushButton(parent);
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
QPushButton* QPushButton_new5(struct miqt_string* text, QWidget* parent) {
|
|
|
|
QString text_QString = QString::fromUtf8(&text->data, text->len);
|
2024-08-25 04:08:24 +00:00
|
|
|
return new QPushButton(text_QString, parent);
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
QPushButton* QPushButton_new6(QIcon* icon, struct miqt_string* text, QWidget* parent) {
|
|
|
|
QString text_QString = QString::fromUtf8(&text->data, text->len);
|
2024-08-25 04:08:24 +00:00
|
|
|
return new QPushButton(*icon, text_QString, parent);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMetaObject* QPushButton_MetaObject(const QPushButton* self) {
|
|
|
|
return (QMetaObject*) self->metaObject();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 22:32:57 +00:00
|
|
|
void* QPushButton_Metacast(QPushButton* self, const char* param1) {
|
|
|
|
return self->qt_metacast(param1);
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QPushButton_Tr(const char* s) {
|
|
|
|
QString _ret = QPushButton::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* QPushButton_TrUtf8(const char* s) {
|
|
|
|
QString _ret = QPushButton::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-11 05:41:09 +00:00
|
|
|
QSize* QPushButton_SizeHint(const QPushButton* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QSize(self->sizeHint());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QPushButton_MinimumSizeHint(const QPushButton* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QSize(self->minimumSizeHint());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QPushButton_AutoDefault(const QPushButton* self) {
|
|
|
|
return self->autoDefault();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QPushButton_SetAutoDefault(QPushButton* self, bool autoDefault) {
|
|
|
|
self->setAutoDefault(autoDefault);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QPushButton_IsDefault(const QPushButton* self) {
|
|
|
|
return self->isDefault();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QPushButton_SetDefault(QPushButton* self, bool defaultVal) {
|
|
|
|
self->setDefault(defaultVal);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPushButton_SetMenu(QPushButton* self, QMenu* menu) {
|
|
|
|
self->setMenu(menu);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMenu* QPushButton_Menu(const QPushButton* self) {
|
|
|
|
return self->menu();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QPushButton_SetFlat(QPushButton* self, bool flat) {
|
|
|
|
self->setFlat(flat);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QPushButton_IsFlat(const QPushButton* self) {
|
|
|
|
return self->isFlat();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QPushButton_ShowMenu(QPushButton* self) {
|
|
|
|
self->showMenu();
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QPushButton_Tr2(const char* s, const char* c) {
|
|
|
|
QString _ret = QPushButton::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* QPushButton_Tr3(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QPushButton::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* QPushButton_TrUtf82(const char* s, const char* c) {
|
|
|
|
QString _ret = QPushButton::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* QPushButton_TrUtf83(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QPushButton::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 QPushButton_Delete(QPushButton* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|