2024-08-25 04:08:24 +00:00
|
|
|
#include <QMetaObject>
|
|
|
|
#include <QString>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QTextBlock>
|
|
|
|
#include <QTextDocument>
|
|
|
|
#include <QTextList>
|
|
|
|
#include <QTextListFormat>
|
2024-10-16 05:07:56 +00:00
|
|
|
#include <qtextlist.h>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qtextlist.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
QTextList* QTextList_new(QTextDocument* doc) {
|
|
|
|
return new QTextList(doc);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMetaObject* QTextList_MetaObject(const QTextList* self) {
|
|
|
|
return (QMetaObject*) self->metaObject();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 22:32:57 +00:00
|
|
|
void* QTextList_Metacast(QTextList* self, const char* param1) {
|
|
|
|
return self->qt_metacast(param1);
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QTextList_Tr(const char* s) {
|
|
|
|
QString _ret = QTextList::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* QTextList_TrUtf8(const char* s) {
|
|
|
|
QString _ret = QTextList::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
|
|
|
int QTextList_Count(const QTextList* self) {
|
|
|
|
return self->count();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QTextList_IsEmpty(const QTextList* self) {
|
|
|
|
return self->isEmpty();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QTextBlock* QTextList_Item(const QTextList* self, int i) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QTextBlock(self->item(static_cast<int>(i)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QTextList_ItemNumber(const QTextList* self, QTextBlock* param1) {
|
|
|
|
return self->itemNumber(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QTextList_ItemText(const QTextList* self, QTextBlock* param1) {
|
|
|
|
QString _ret = self->itemText(*param1);
|
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 QTextList_RemoveItem(QTextList* self, int i) {
|
|
|
|
self->removeItem(static_cast<int>(i));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTextList_Remove(QTextList* self, QTextBlock* param1) {
|
|
|
|
self->remove(*param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTextList_Add(QTextList* self, QTextBlock* block) {
|
|
|
|
self->add(*block);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTextList_SetFormat(QTextList* self, QTextListFormat* format) {
|
|
|
|
self->setFormat(*format);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QTextListFormat* QTextList_Format(const QTextList* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QTextListFormat(self->format());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QTextList_Tr2(const char* s, const char* c) {
|
|
|
|
QString _ret = QTextList::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* QTextList_Tr3(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QTextList::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* QTextList_TrUtf82(const char* s, const char* c) {
|
|
|
|
QString _ret = QTextList::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* QTextList_TrUtf83(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QTextList::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 QTextList_Delete(QTextList* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|