2024-08-25 04:08:24 +00:00
|
|
|
#include <QFont>
|
|
|
|
#include <QSizeF>
|
|
|
|
#include <QStaticText>
|
|
|
|
#include <QString>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QTextOption>
|
|
|
|
#include <QTransform>
|
2024-10-16 05:07:56 +00:00
|
|
|
#include <qstatictext.h>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qstatictext.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
QStaticText* QStaticText_new() {
|
|
|
|
return new QStaticText();
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
QStaticText* QStaticText_new2(struct miqt_string* text) {
|
|
|
|
QString text_QString = QString::fromUtf8(&text->data, text->len);
|
2024-08-25 04:08:24 +00:00
|
|
|
return new QStaticText(text_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
QStaticText* QStaticText_new3(QStaticText* other) {
|
|
|
|
return new QStaticText(*other);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QStaticText_OperatorAssign(QStaticText* self, QStaticText* param1) {
|
|
|
|
self->operator=(*param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QStaticText_Swap(QStaticText* self, QStaticText* other) {
|
|
|
|
self->swap(*other);
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
void QStaticText_SetText(QStaticText* 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* QStaticText_Text(const QStaticText* 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-18 00:12:02 +00:00
|
|
|
void QStaticText_SetTextFormat(QStaticText* self, int textFormat) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setTextFormat(static_cast<Qt::TextFormat>(textFormat));
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QStaticText_TextFormat(const QStaticText* 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-08-25 04:08:24 +00:00
|
|
|
void QStaticText_SetTextWidth(QStaticText* self, double textWidth) {
|
|
|
|
self->setTextWidth(static_cast<qreal>(textWidth));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QStaticText_TextWidth(const QStaticText* self) {
|
2024-09-18 00:12:02 +00:00
|
|
|
qreal _ret = self->textWidth();
|
|
|
|
return static_cast<double>(_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QStaticText_SetTextOption(QStaticText* self, QTextOption* textOption) {
|
|
|
|
self->setTextOption(*textOption);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QTextOption* QStaticText_TextOption(const QStaticText* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QTextOption(self->textOption());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSizeF* QStaticText_Size(const QStaticText* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QSizeF(self->size());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QStaticText_Prepare(QStaticText* self) {
|
|
|
|
self->prepare();
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QStaticText_SetPerformanceHint(QStaticText* self, int performanceHint) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setPerformanceHint(static_cast<QStaticText::PerformanceHint>(performanceHint));
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QStaticText_PerformanceHint(const QStaticText* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QStaticText::PerformanceHint _ret = self->performanceHint();
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QStaticText_OperatorEqual(const QStaticText* self, QStaticText* param1) {
|
|
|
|
return self->operator==(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QStaticText_OperatorNotEqual(const QStaticText* self, QStaticText* param1) {
|
|
|
|
return self->operator!=(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QStaticText_Prepare1(QStaticText* self, QTransform* matrix) {
|
|
|
|
self->prepare(*matrix);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QStaticText_Prepare2(QStaticText* self, QTransform* matrix, QFont* font) {
|
|
|
|
self->prepare(*matrix, *font);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QStaticText_Delete(QStaticText* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|