2024-08-25 04:08:24 +00:00
|
|
|
#include <QLabel>
|
|
|
|
#include <QMetaObject>
|
|
|
|
#include <QMovie>
|
|
|
|
#include <QPicture>
|
|
|
|
#include <QPixmap>
|
|
|
|
#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-10-16 05:07:56 +00:00
|
|
|
#include <qlabel.h>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qlabel.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QLabel* QLabel_new() {
|
|
|
|
return new QLabel();
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
QLabel* QLabel_new2(struct miqt_string* text) {
|
|
|
|
QString text_QString = QString::fromUtf8(&text->data, text->len);
|
2024-08-29 07:01:51 +00:00
|
|
|
return new QLabel(text_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
QLabel* QLabel_new3(QWidget* parent) {
|
|
|
|
return new QLabel(parent);
|
|
|
|
}
|
|
|
|
|
|
|
|
QLabel* QLabel_new4(QWidget* parent, int f) {
|
|
|
|
return new QLabel(parent, static_cast<Qt::WindowFlags>(f));
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
QLabel* QLabel_new5(struct miqt_string* text, QWidget* parent) {
|
|
|
|
QString text_QString = QString::fromUtf8(&text->data, text->len);
|
2024-08-29 07:01:51 +00:00
|
|
|
return new QLabel(text_QString, parent);
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
QLabel* QLabel_new6(struct miqt_string* text, QWidget* parent, int f) {
|
|
|
|
QString text_QString = QString::fromUtf8(&text->data, text->len);
|
2024-08-29 07:01:51 +00:00
|
|
|
return new QLabel(text_QString, parent, static_cast<Qt::WindowFlags>(f));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMetaObject* QLabel_MetaObject(const QLabel* self) {
|
|
|
|
return (QMetaObject*) self->metaObject();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 22:32:57 +00:00
|
|
|
void* QLabel_Metacast(QLabel* self, const char* param1) {
|
|
|
|
return self->qt_metacast(param1);
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QLabel_Tr(const char* s) {
|
|
|
|
QString _ret = QLabel::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* QLabel_TrUtf8(const char* s) {
|
|
|
|
QString _ret = QLabel::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
|
|
|
struct miqt_string* QLabel_Text(const QLabel* 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
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPixmap* QLabel_Pixmap(const QLabel* self) {
|
|
|
|
return (QPixmap*) self->pixmap();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QPixmap* QLabel_PixmapWithQtReturnByValueConstant(const QLabel* self, int param1) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPixmap(self->pixmap(static_cast<Qt::ReturnByValueConstant>(param1)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPicture* QLabel_Picture(const QLabel* self) {
|
|
|
|
return (QPicture*) self->picture();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QPicture* QLabel_PictureWithQtReturnByValueConstant(const QLabel* self, int param1) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPicture(self->picture(static_cast<Qt::ReturnByValueConstant>(param1)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMovie* QLabel_Movie(const QLabel* self) {
|
|
|
|
return self->movie();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QLabel_TextFormat(const QLabel* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
Qt::TextFormat _ret = self->textFormat();
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QLabel_SetTextFormat(QLabel* self, int textFormat) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setTextFormat(static_cast<Qt::TextFormat>(textFormat));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QLabel_Alignment(const QLabel* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
Qt::Alignment _ret = self->alignment();
|
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QLabel_SetAlignment(QLabel* self, int alignment) {
|
|
|
|
self->setAlignment(static_cast<Qt::Alignment>(alignment));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QLabel_SetWordWrap(QLabel* self, bool on) {
|
|
|
|
self->setWordWrap(on);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QLabel_WordWrap(const QLabel* self) {
|
|
|
|
return self->wordWrap();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QLabel_Indent(const QLabel* self) {
|
|
|
|
return self->indent();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QLabel_SetIndent(QLabel* self, int indent) {
|
|
|
|
self->setIndent(static_cast<int>(indent));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QLabel_Margin(const QLabel* self) {
|
|
|
|
return self->margin();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QLabel_SetMargin(QLabel* self, int margin) {
|
|
|
|
self->setMargin(static_cast<int>(margin));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QLabel_HasScaledContents(const QLabel* self) {
|
|
|
|
return self->hasScaledContents();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QLabel_SetScaledContents(QLabel* self, bool scaledContents) {
|
|
|
|
self->setScaledContents(scaledContents);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QLabel_SizeHint(const QLabel* 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* QLabel_MinimumSizeHint(const QLabel* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QSize(self->minimumSizeHint());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QLabel_SetBuddy(QLabel* self, QWidget* buddy) {
|
|
|
|
self->setBuddy(buddy);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QWidget* QLabel_Buddy(const QLabel* self) {
|
|
|
|
return self->buddy();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QLabel_HeightForWidth(const QLabel* self, int param1) {
|
|
|
|
return self->heightForWidth(static_cast<int>(param1));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QLabel_OpenExternalLinks(const QLabel* self) {
|
|
|
|
return self->openExternalLinks();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QLabel_SetOpenExternalLinks(QLabel* self, bool open) {
|
|
|
|
self->setOpenExternalLinks(open);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QLabel_SetTextInteractionFlags(QLabel* self, int flags) {
|
|
|
|
self->setTextInteractionFlags(static_cast<Qt::TextInteractionFlags>(flags));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QLabel_TextInteractionFlags(const QLabel* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
Qt::TextInteractionFlags _ret = self->textInteractionFlags();
|
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QLabel_SetSelection(QLabel* self, int param1, int param2) {
|
|
|
|
self->setSelection(static_cast<int>(param1), static_cast<int>(param2));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QLabel_HasSelectedText(const QLabel* self) {
|
|
|
|
return self->hasSelectedText();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QLabel_SelectedText(const QLabel* self) {
|
|
|
|
QString _ret = self->selectedText();
|
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
|
|
|
int QLabel_SelectionStart(const QLabel* self) {
|
|
|
|
return self->selectionStart();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
void QLabel_SetText(QLabel* 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);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLabel_SetPixmap(QLabel* self, QPixmap* pixmap) {
|
|
|
|
self->setPixmap(*pixmap);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLabel_SetPicture(QLabel* self, QPicture* picture) {
|
|
|
|
self->setPicture(*picture);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLabel_SetMovie(QLabel* self, QMovie* movie) {
|
|
|
|
self->setMovie(movie);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLabel_SetNum(QLabel* self, int num) {
|
|
|
|
self->setNum(static_cast<int>(num));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLabel_SetNumWithNum(QLabel* self, double num) {
|
|
|
|
self->setNum(static_cast<double>(num));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLabel_Clear(QLabel* self) {
|
|
|
|
self->clear();
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
void QLabel_LinkActivated(QLabel* self, struct miqt_string* link) {
|
|
|
|
QString link_QString = QString::fromUtf8(&link->data, link->len);
|
2024-08-25 04:08:24 +00:00
|
|
|
self->linkActivated(link_QString);
|
|
|
|
}
|
|
|
|
|
2024-10-13 06:06:06 +00:00
|
|
|
void QLabel_connect_LinkActivated(QLabel* self, intptr_t slot) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QLabel::connect(self, static_cast<void (QLabel::*)(const QString&)>(&QLabel::linkActivated), self, [=](const QString& link) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QString link_ret = link;
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray link_b = link_ret.toUtf8();
|
|
|
|
struct miqt_string* sigval1 = miqt_strdup(link_b.data(), link_b.length());
|
|
|
|
miqt_exec_callback_QLabel_LinkActivated(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
void QLabel_LinkHovered(QLabel* self, struct miqt_string* link) {
|
|
|
|
QString link_QString = QString::fromUtf8(&link->data, link->len);
|
2024-08-25 04:08:24 +00:00
|
|
|
self->linkHovered(link_QString);
|
|
|
|
}
|
|
|
|
|
2024-10-13 06:06:06 +00:00
|
|
|
void QLabel_connect_LinkHovered(QLabel* self, intptr_t slot) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QLabel::connect(self, static_cast<void (QLabel::*)(const QString&)>(&QLabel::linkHovered), self, [=](const QString& link) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QString link_ret = link;
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray link_b = link_ret.toUtf8();
|
|
|
|
struct miqt_string* sigval1 = miqt_strdup(link_b.data(), link_b.length());
|
|
|
|
miqt_exec_callback_QLabel_LinkHovered(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QLabel_Tr2(const char* s, const char* c) {
|
|
|
|
QString _ret = QLabel::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* QLabel_Tr3(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QLabel::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* QLabel_TrUtf82(const char* s, const char* c) {
|
|
|
|
QString _ret = QLabel::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* QLabel_TrUtf83(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QLabel::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 QLabel_Delete(QLabel* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|