2024-08-25 04:08:24 +00:00
|
|
|
#include <QBrush>
|
|
|
|
#include <QColor>
|
|
|
|
#include <QDataStream>
|
|
|
|
#include <QFont>
|
|
|
|
#include <QIcon>
|
|
|
|
#include <QItemSelectionModel>
|
|
|
|
#include <QList>
|
|
|
|
#include <QMetaObject>
|
|
|
|
#include <QPoint>
|
|
|
|
#include <QRect>
|
|
|
|
#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 <QTreeWidget>
|
|
|
|
#include <QTreeWidgetItem>
|
|
|
|
#include <QVariant>
|
|
|
|
#include <QWidget>
|
2024-10-16 05:07:56 +00:00
|
|
|
#include <qtreewidget.h>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qtreewidget.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
QTreeWidgetItem* QTreeWidgetItem_new() {
|
|
|
|
return new QTreeWidgetItem();
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
QTreeWidgetItem* QTreeWidgetItem_new2(struct miqt_array* /* of struct miqt_string */ strings) {
|
2024-10-16 05:07:56 +00:00
|
|
|
QStringList strings_QList;
|
2024-09-14 22:29:05 +00:00
|
|
|
strings_QList.reserve(strings->len);
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string* strings_arr = static_cast<struct miqt_string*>(strings->data);
|
2024-09-14 22:29:05 +00:00
|
|
|
for(size_t i = 0; i < strings->len; ++i) {
|
2024-10-18 23:53:33 +00:00
|
|
|
QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len);
|
2024-09-17 07:43:35 +00:00
|
|
|
strings_QList.push_back(strings_arr_i_QString);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
return new QTreeWidgetItem(strings_QList);
|
|
|
|
}
|
|
|
|
|
|
|
|
QTreeWidgetItem* QTreeWidgetItem_new3(QTreeWidget* treeview) {
|
|
|
|
return new QTreeWidgetItem(treeview);
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
QTreeWidgetItem* QTreeWidgetItem_new4(QTreeWidget* treeview, struct miqt_array* /* of struct miqt_string */ strings) {
|
2024-10-16 05:07:56 +00:00
|
|
|
QStringList strings_QList;
|
2024-09-14 22:29:05 +00:00
|
|
|
strings_QList.reserve(strings->len);
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string* strings_arr = static_cast<struct miqt_string*>(strings->data);
|
2024-09-14 22:29:05 +00:00
|
|
|
for(size_t i = 0; i < strings->len; ++i) {
|
2024-10-18 23:53:33 +00:00
|
|
|
QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len);
|
2024-09-17 07:43:35 +00:00
|
|
|
strings_QList.push_back(strings_arr_i_QString);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
return new QTreeWidgetItem(treeview, strings_QList);
|
|
|
|
}
|
|
|
|
|
|
|
|
QTreeWidgetItem* QTreeWidgetItem_new5(QTreeWidget* treeview, QTreeWidgetItem* after) {
|
|
|
|
return new QTreeWidgetItem(treeview, after);
|
|
|
|
}
|
|
|
|
|
|
|
|
QTreeWidgetItem* QTreeWidgetItem_new6(QTreeWidgetItem* parent) {
|
|
|
|
return new QTreeWidgetItem(parent);
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
QTreeWidgetItem* QTreeWidgetItem_new7(QTreeWidgetItem* parent, struct miqt_array* /* of struct miqt_string */ strings) {
|
2024-10-16 05:07:56 +00:00
|
|
|
QStringList strings_QList;
|
2024-09-14 22:29:05 +00:00
|
|
|
strings_QList.reserve(strings->len);
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string* strings_arr = static_cast<struct miqt_string*>(strings->data);
|
2024-09-14 22:29:05 +00:00
|
|
|
for(size_t i = 0; i < strings->len; ++i) {
|
2024-10-18 23:53:33 +00:00
|
|
|
QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len);
|
2024-09-17 07:43:35 +00:00
|
|
|
strings_QList.push_back(strings_arr_i_QString);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
return new QTreeWidgetItem(parent, strings_QList);
|
|
|
|
}
|
|
|
|
|
|
|
|
QTreeWidgetItem* QTreeWidgetItem_new8(QTreeWidgetItem* parent, QTreeWidgetItem* after) {
|
|
|
|
return new QTreeWidgetItem(parent, after);
|
|
|
|
}
|
|
|
|
|
|
|
|
QTreeWidgetItem* QTreeWidgetItem_new9(QTreeWidgetItem* other) {
|
|
|
|
return new QTreeWidgetItem(*other);
|
|
|
|
}
|
|
|
|
|
|
|
|
QTreeWidgetItem* QTreeWidgetItem_new10(int typeVal) {
|
|
|
|
return new QTreeWidgetItem(static_cast<int>(typeVal));
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
QTreeWidgetItem* QTreeWidgetItem_new11(struct miqt_array* /* of struct miqt_string */ strings, int typeVal) {
|
2024-10-16 05:07:56 +00:00
|
|
|
QStringList strings_QList;
|
2024-09-14 22:29:05 +00:00
|
|
|
strings_QList.reserve(strings->len);
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string* strings_arr = static_cast<struct miqt_string*>(strings->data);
|
2024-09-14 22:29:05 +00:00
|
|
|
for(size_t i = 0; i < strings->len; ++i) {
|
2024-10-18 23:53:33 +00:00
|
|
|
QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len);
|
2024-09-17 07:43:35 +00:00
|
|
|
strings_QList.push_back(strings_arr_i_QString);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
return new QTreeWidgetItem(strings_QList, static_cast<int>(typeVal));
|
|
|
|
}
|
|
|
|
|
|
|
|
QTreeWidgetItem* QTreeWidgetItem_new12(QTreeWidget* treeview, int typeVal) {
|
|
|
|
return new QTreeWidgetItem(treeview, static_cast<int>(typeVal));
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
QTreeWidgetItem* QTreeWidgetItem_new13(QTreeWidget* treeview, struct miqt_array* /* of struct miqt_string */ strings, int typeVal) {
|
2024-10-16 05:07:56 +00:00
|
|
|
QStringList strings_QList;
|
2024-09-14 22:29:05 +00:00
|
|
|
strings_QList.reserve(strings->len);
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string* strings_arr = static_cast<struct miqt_string*>(strings->data);
|
2024-09-14 22:29:05 +00:00
|
|
|
for(size_t i = 0; i < strings->len; ++i) {
|
2024-10-18 23:53:33 +00:00
|
|
|
QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len);
|
2024-09-17 07:43:35 +00:00
|
|
|
strings_QList.push_back(strings_arr_i_QString);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
return new QTreeWidgetItem(treeview, strings_QList, static_cast<int>(typeVal));
|
|
|
|
}
|
|
|
|
|
|
|
|
QTreeWidgetItem* QTreeWidgetItem_new14(QTreeWidget* treeview, QTreeWidgetItem* after, int typeVal) {
|
|
|
|
return new QTreeWidgetItem(treeview, after, static_cast<int>(typeVal));
|
|
|
|
}
|
|
|
|
|
|
|
|
QTreeWidgetItem* QTreeWidgetItem_new15(QTreeWidgetItem* parent, int typeVal) {
|
|
|
|
return new QTreeWidgetItem(parent, static_cast<int>(typeVal));
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
QTreeWidgetItem* QTreeWidgetItem_new16(QTreeWidgetItem* parent, struct miqt_array* /* of struct miqt_string */ strings, int typeVal) {
|
2024-10-16 05:07:56 +00:00
|
|
|
QStringList strings_QList;
|
2024-09-14 22:29:05 +00:00
|
|
|
strings_QList.reserve(strings->len);
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string* strings_arr = static_cast<struct miqt_string*>(strings->data);
|
2024-09-14 22:29:05 +00:00
|
|
|
for(size_t i = 0; i < strings->len; ++i) {
|
2024-10-18 23:53:33 +00:00
|
|
|
QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len);
|
2024-09-17 07:43:35 +00:00
|
|
|
strings_QList.push_back(strings_arr_i_QString);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
return new QTreeWidgetItem(parent, strings_QList, static_cast<int>(typeVal));
|
|
|
|
}
|
|
|
|
|
|
|
|
QTreeWidgetItem* QTreeWidgetItem_new17(QTreeWidgetItem* parent, QTreeWidgetItem* after, int typeVal) {
|
|
|
|
return new QTreeWidgetItem(parent, after, static_cast<int>(typeVal));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QTreeWidgetItem* QTreeWidgetItem_Clone(const QTreeWidgetItem* self) {
|
|
|
|
return self->clone();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QTreeWidget* QTreeWidgetItem_TreeWidget(const QTreeWidgetItem* self) {
|
|
|
|
return self->treeWidget();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidgetItem_SetSelected(QTreeWidgetItem* self, bool selectVal) {
|
|
|
|
self->setSelected(selectVal);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QTreeWidgetItem_IsSelected(const QTreeWidgetItem* self) {
|
|
|
|
return self->isSelected();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidgetItem_SetHidden(QTreeWidgetItem* self, bool hide) {
|
|
|
|
self->setHidden(hide);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QTreeWidgetItem_IsHidden(const QTreeWidgetItem* self) {
|
|
|
|
return self->isHidden();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidgetItem_SetExpanded(QTreeWidgetItem* self, bool expand) {
|
|
|
|
self->setExpanded(expand);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QTreeWidgetItem_IsExpanded(const QTreeWidgetItem* self) {
|
|
|
|
return self->isExpanded();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidgetItem_SetFirstColumnSpanned(QTreeWidgetItem* self, bool span) {
|
|
|
|
self->setFirstColumnSpanned(span);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QTreeWidgetItem_IsFirstColumnSpanned(const QTreeWidgetItem* self) {
|
|
|
|
return self->isFirstColumnSpanned();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidgetItem_SetDisabled(QTreeWidgetItem* self, bool disabled) {
|
|
|
|
self->setDisabled(disabled);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QTreeWidgetItem_IsDisabled(const QTreeWidgetItem* self) {
|
|
|
|
return self->isDisabled();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QTreeWidgetItem_SetChildIndicatorPolicy(QTreeWidgetItem* self, int policy) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setChildIndicatorPolicy(static_cast<QTreeWidgetItem::ChildIndicatorPolicy>(policy));
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QTreeWidgetItem_ChildIndicatorPolicy(const QTreeWidgetItem* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QTreeWidgetItem::ChildIndicatorPolicy _ret = self->childIndicatorPolicy();
|
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
|
|
|
int QTreeWidgetItem_Flags(const QTreeWidgetItem* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
Qt::ItemFlags _ret = self->flags();
|
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidgetItem_SetFlags(QTreeWidgetItem* self, int flags) {
|
|
|
|
self->setFlags(static_cast<Qt::ItemFlags>(flags));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QTreeWidgetItem_Text(const QTreeWidgetItem* self, int column) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = self->text(static_cast<int>(column));
|
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();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
void QTreeWidgetItem_SetText(QTreeWidgetItem* self, int column, struct miqt_string text) {
|
|
|
|
QString text_QString = QString::fromUtf8(text.data, text.len);
|
2024-08-25 04:08:24 +00:00
|
|
|
self->setText(static_cast<int>(column), text_QString);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QIcon* QTreeWidgetItem_Icon(const QTreeWidgetItem* self, int column) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QIcon(self->icon(static_cast<int>(column)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidgetItem_SetIcon(QTreeWidgetItem* self, int column, QIcon* icon) {
|
|
|
|
self->setIcon(static_cast<int>(column), *icon);
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QTreeWidgetItem_StatusTip(const QTreeWidgetItem* self, int column) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = self->statusTip(static_cast<int>(column));
|
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();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
void QTreeWidgetItem_SetStatusTip(QTreeWidgetItem* self, int column, struct miqt_string statusTip) {
|
|
|
|
QString statusTip_QString = QString::fromUtf8(statusTip.data, statusTip.len);
|
2024-08-25 04:08:24 +00:00
|
|
|
self->setStatusTip(static_cast<int>(column), statusTip_QString);
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QTreeWidgetItem_ToolTip(const QTreeWidgetItem* self, int column) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = self->toolTip(static_cast<int>(column));
|
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();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
void QTreeWidgetItem_SetToolTip(QTreeWidgetItem* self, int column, struct miqt_string toolTip) {
|
|
|
|
QString toolTip_QString = QString::fromUtf8(toolTip.data, toolTip.len);
|
2024-08-25 04:08:24 +00:00
|
|
|
self->setToolTip(static_cast<int>(column), toolTip_QString);
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QTreeWidgetItem_WhatsThis(const QTreeWidgetItem* self, int column) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = self->whatsThis(static_cast<int>(column));
|
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();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
void QTreeWidgetItem_SetWhatsThis(QTreeWidgetItem* self, int column, struct miqt_string whatsThis) {
|
|
|
|
QString whatsThis_QString = QString::fromUtf8(whatsThis.data, whatsThis.len);
|
2024-08-25 04:08:24 +00:00
|
|
|
self->setWhatsThis(static_cast<int>(column), whatsThis_QString);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QFont* QTreeWidgetItem_Font(const QTreeWidgetItem* self, int column) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QFont(self->font(static_cast<int>(column)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidgetItem_SetFont(QTreeWidgetItem* self, int column, QFont* font) {
|
|
|
|
self->setFont(static_cast<int>(column), *font);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QTreeWidgetItem_TextAlignment(const QTreeWidgetItem* self, int column) {
|
|
|
|
return self->textAlignment(static_cast<int>(column));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidgetItem_SetTextAlignment(QTreeWidgetItem* self, int column, int alignment) {
|
|
|
|
self->setTextAlignment(static_cast<int>(column), static_cast<int>(alignment));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QColor* QTreeWidgetItem_BackgroundColor(const QTreeWidgetItem* self, int column) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QColor(self->backgroundColor(static_cast<int>(column)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidgetItem_SetBackgroundColor(QTreeWidgetItem* self, int column, QColor* color) {
|
|
|
|
self->setBackgroundColor(static_cast<int>(column), *color);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBrush* QTreeWidgetItem_Background(const QTreeWidgetItem* self, int column) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QBrush(self->background(static_cast<int>(column)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidgetItem_SetBackground(QTreeWidgetItem* self, int column, QBrush* brush) {
|
|
|
|
self->setBackground(static_cast<int>(column), *brush);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QColor* QTreeWidgetItem_TextColor(const QTreeWidgetItem* self, int column) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QColor(self->textColor(static_cast<int>(column)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidgetItem_SetTextColor(QTreeWidgetItem* self, int column, QColor* color) {
|
|
|
|
self->setTextColor(static_cast<int>(column), *color);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBrush* QTreeWidgetItem_Foreground(const QTreeWidgetItem* self, int column) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QBrush(self->foreground(static_cast<int>(column)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidgetItem_SetForeground(QTreeWidgetItem* self, int column, QBrush* brush) {
|
|
|
|
self->setForeground(static_cast<int>(column), *brush);
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QTreeWidgetItem_CheckState(const QTreeWidgetItem* self, int column) {
|
2024-09-14 22:29:05 +00:00
|
|
|
Qt::CheckState _ret = self->checkState(static_cast<int>(column));
|
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 QTreeWidgetItem_SetCheckState(QTreeWidgetItem* self, int column, int state) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setCheckState(static_cast<int>(column), static_cast<Qt::CheckState>(state));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QTreeWidgetItem_SizeHint(const QTreeWidgetItem* self, int column) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QSize(self->sizeHint(static_cast<int>(column)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidgetItem_SetSizeHint(QTreeWidgetItem* self, int column, QSize* size) {
|
|
|
|
self->setSizeHint(static_cast<int>(column), *size);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QVariant* QTreeWidgetItem_Data(const QTreeWidgetItem* self, int column, int role) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QVariant(self->data(static_cast<int>(column), static_cast<int>(role)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidgetItem_SetData(QTreeWidgetItem* self, int column, int role, QVariant* value) {
|
|
|
|
self->setData(static_cast<int>(column), static_cast<int>(role), *value);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QTreeWidgetItem_OperatorLesser(const QTreeWidgetItem* self, QTreeWidgetItem* other) {
|
|
|
|
return self->operator<(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidgetItem_Read(QTreeWidgetItem* self, QDataStream* in) {
|
|
|
|
self->read(*in);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
void QTreeWidgetItem_Write(const QTreeWidgetItem* self, QDataStream* out) {
|
|
|
|
self->write(*out);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidgetItem_OperatorAssign(QTreeWidgetItem* self, QTreeWidgetItem* other) {
|
|
|
|
self->operator=(*other);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QTreeWidgetItem* QTreeWidgetItem_Parent(const QTreeWidgetItem* self) {
|
|
|
|
return self->parent();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QTreeWidgetItem* QTreeWidgetItem_Child(const QTreeWidgetItem* self, int index) {
|
|
|
|
return self->child(static_cast<int>(index));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QTreeWidgetItem_ChildCount(const QTreeWidgetItem* self) {
|
|
|
|
return self->childCount();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QTreeWidgetItem_ColumnCount(const QTreeWidgetItem* self) {
|
|
|
|
return self->columnCount();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QTreeWidgetItem_IndexOfChild(const QTreeWidgetItem* self, QTreeWidgetItem* child) {
|
|
|
|
return self->indexOfChild(child);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidgetItem_AddChild(QTreeWidgetItem* self, QTreeWidgetItem* child) {
|
|
|
|
self->addChild(child);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidgetItem_InsertChild(QTreeWidgetItem* self, int index, QTreeWidgetItem* child) {
|
|
|
|
self->insertChild(static_cast<int>(index), child);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidgetItem_RemoveChild(QTreeWidgetItem* self, QTreeWidgetItem* child) {
|
|
|
|
self->removeChild(child);
|
|
|
|
}
|
|
|
|
|
|
|
|
QTreeWidgetItem* QTreeWidgetItem_TakeChild(QTreeWidgetItem* self, int index) {
|
|
|
|
return self->takeChild(static_cast<int>(index));
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
void QTreeWidgetItem_AddChildren(QTreeWidgetItem* self, struct miqt_array* /* of QTreeWidgetItem* */ children) {
|
2024-10-16 05:07:56 +00:00
|
|
|
QList<QTreeWidgetItem *> children_QList;
|
2024-09-14 22:29:05 +00:00
|
|
|
children_QList.reserve(children->len);
|
|
|
|
QTreeWidgetItem** children_arr = static_cast<QTreeWidgetItem**>(children->data);
|
|
|
|
for(size_t i = 0; i < children->len; ++i) {
|
|
|
|
children_QList.push_back(children_arr[i]);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
self->addChildren(children_QList);
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
void QTreeWidgetItem_InsertChildren(QTreeWidgetItem* self, int index, struct miqt_array* /* of QTreeWidgetItem* */ children) {
|
2024-10-16 05:07:56 +00:00
|
|
|
QList<QTreeWidgetItem *> children_QList;
|
2024-09-14 22:29:05 +00:00
|
|
|
children_QList.reserve(children->len);
|
|
|
|
QTreeWidgetItem** children_arr = static_cast<QTreeWidgetItem**>(children->data);
|
|
|
|
for(size_t i = 0; i < children->len; ++i) {
|
|
|
|
children_QList.push_back(children_arr[i]);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
self->insertChildren(static_cast<int>(index), children_QList);
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_array* QTreeWidgetItem_TakeChildren(QTreeWidgetItem* self) {
|
2024-09-18 00:12:02 +00:00
|
|
|
QList<QTreeWidgetItem *> _ret = self->takeChildren();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QList<> from C++ memory to manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QTreeWidgetItem** _arr = static_cast<QTreeWidgetItem**>(malloc(sizeof(QTreeWidgetItem*) * _ret.length()));
|
|
|
|
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
|
|
|
_arr[i] = _ret[i];
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
|
|
|
_out->len = _ret.length();
|
|
|
|
_out->data = static_cast<void*>(_arr);
|
|
|
|
return _out;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QTreeWidgetItem_Type(const QTreeWidgetItem* self) {
|
|
|
|
return self->type();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QTreeWidgetItem_SortChildren(QTreeWidgetItem* self, int column, int order) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->sortChildren(static_cast<int>(column), static_cast<Qt::SortOrder>(order));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidgetItem_Delete(QTreeWidgetItem* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|
2024-10-26 00:46:42 +00:00
|
|
|
QTreeWidget* QTreeWidget_new(QWidget* parent) {
|
|
|
|
return new QTreeWidget(parent);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-26 00:46:42 +00:00
|
|
|
QTreeWidget* QTreeWidget_new2() {
|
|
|
|
return new QTreeWidget();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMetaObject* QTreeWidget_MetaObject(const QTreeWidget* self) {
|
|
|
|
return (QMetaObject*) self->metaObject();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 22:32:57 +00:00
|
|
|
void* QTreeWidget_Metacast(QTreeWidget* self, const char* param1) {
|
|
|
|
return self->qt_metacast(param1);
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QTreeWidget_Tr(const char* s) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QTreeWidget::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();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QTreeWidget_TrUtf8(const char* s) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QTreeWidget::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();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QTreeWidget_ColumnCount(const QTreeWidget* self) {
|
|
|
|
return self->columnCount();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidget_SetColumnCount(QTreeWidget* self, int columns) {
|
|
|
|
self->setColumnCount(static_cast<int>(columns));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QTreeWidgetItem* QTreeWidget_InvisibleRootItem(const QTreeWidget* self) {
|
|
|
|
return self->invisibleRootItem();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QTreeWidgetItem* QTreeWidget_TopLevelItem(const QTreeWidget* self, int index) {
|
|
|
|
return self->topLevelItem(static_cast<int>(index));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QTreeWidget_TopLevelItemCount(const QTreeWidget* self) {
|
|
|
|
return self->topLevelItemCount();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidget_InsertTopLevelItem(QTreeWidget* self, int index, QTreeWidgetItem* item) {
|
|
|
|
self->insertTopLevelItem(static_cast<int>(index), item);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidget_AddTopLevelItem(QTreeWidget* self, QTreeWidgetItem* item) {
|
|
|
|
self->addTopLevelItem(item);
|
|
|
|
}
|
|
|
|
|
|
|
|
QTreeWidgetItem* QTreeWidget_TakeTopLevelItem(QTreeWidget* self, int index) {
|
|
|
|
return self->takeTopLevelItem(static_cast<int>(index));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QTreeWidget_IndexOfTopLevelItem(const QTreeWidget* self, QTreeWidgetItem* item) {
|
|
|
|
return self->indexOfTopLevelItem(item);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
void QTreeWidget_InsertTopLevelItems(QTreeWidget* self, int index, struct miqt_array* /* of QTreeWidgetItem* */ items) {
|
2024-10-16 05:07:56 +00:00
|
|
|
QList<QTreeWidgetItem *> items_QList;
|
2024-09-14 22:29:05 +00:00
|
|
|
items_QList.reserve(items->len);
|
|
|
|
QTreeWidgetItem** items_arr = static_cast<QTreeWidgetItem**>(items->data);
|
|
|
|
for(size_t i = 0; i < items->len; ++i) {
|
|
|
|
items_QList.push_back(items_arr[i]);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
self->insertTopLevelItems(static_cast<int>(index), items_QList);
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
void QTreeWidget_AddTopLevelItems(QTreeWidget* self, struct miqt_array* /* of QTreeWidgetItem* */ items) {
|
2024-10-16 05:07:56 +00:00
|
|
|
QList<QTreeWidgetItem *> items_QList;
|
2024-09-14 22:29:05 +00:00
|
|
|
items_QList.reserve(items->len);
|
|
|
|
QTreeWidgetItem** items_arr = static_cast<QTreeWidgetItem**>(items->data);
|
|
|
|
for(size_t i = 0; i < items->len; ++i) {
|
|
|
|
items_QList.push_back(items_arr[i]);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
self->addTopLevelItems(items_QList);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QTreeWidgetItem* QTreeWidget_HeaderItem(const QTreeWidget* self) {
|
|
|
|
return self->headerItem();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidget_SetHeaderItem(QTreeWidget* self, QTreeWidgetItem* item) {
|
|
|
|
self->setHeaderItem(item);
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
void QTreeWidget_SetHeaderLabels(QTreeWidget* self, struct miqt_array* /* of struct miqt_string */ labels) {
|
2024-10-16 05:07:56 +00:00
|
|
|
QStringList labels_QList;
|
2024-09-14 22:29:05 +00:00
|
|
|
labels_QList.reserve(labels->len);
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string* labels_arr = static_cast<struct miqt_string*>(labels->data);
|
2024-09-14 22:29:05 +00:00
|
|
|
for(size_t i = 0; i < labels->len; ++i) {
|
2024-10-18 23:53:33 +00:00
|
|
|
QString labels_arr_i_QString = QString::fromUtf8(labels_arr[i].data, labels_arr[i].len);
|
2024-09-17 07:43:35 +00:00
|
|
|
labels_QList.push_back(labels_arr_i_QString);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
self->setHeaderLabels(labels_QList);
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
void QTreeWidget_SetHeaderLabel(QTreeWidget* self, struct miqt_string label) {
|
|
|
|
QString label_QString = QString::fromUtf8(label.data, label.len);
|
2024-08-25 04:08:24 +00:00
|
|
|
self->setHeaderLabel(label_QString);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QTreeWidgetItem* QTreeWidget_CurrentItem(const QTreeWidget* self) {
|
|
|
|
return self->currentItem();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QTreeWidget_CurrentColumn(const QTreeWidget* self) {
|
|
|
|
return self->currentColumn();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidget_SetCurrentItem(QTreeWidget* self, QTreeWidgetItem* item) {
|
|
|
|
self->setCurrentItem(item);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidget_SetCurrentItem2(QTreeWidget* self, QTreeWidgetItem* item, int column) {
|
|
|
|
self->setCurrentItem(item, static_cast<int>(column));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QTreeWidget_SetCurrentItem3(QTreeWidget* self, QTreeWidgetItem* item, int column, int command) {
|
|
|
|
self->setCurrentItem(item, static_cast<int>(column), static_cast<QItemSelectionModel::SelectionFlags>(command));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QTreeWidgetItem* QTreeWidget_ItemAt(const QTreeWidget* self, QPoint* p) {
|
|
|
|
return self->itemAt(*p);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QTreeWidgetItem* QTreeWidget_ItemAt2(const QTreeWidget* self, int x, int y) {
|
|
|
|
return self->itemAt(static_cast<int>(x), static_cast<int>(y));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRect* QTreeWidget_VisualItemRect(const QTreeWidget* self, QTreeWidgetItem* item) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QRect(self->visualItemRect(item));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QTreeWidget_SortColumn(const QTreeWidget* self) {
|
|
|
|
return self->sortColumn();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QTreeWidget_SortItems(QTreeWidget* self, int column, int order) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->sortItems(static_cast<int>(column), static_cast<Qt::SortOrder>(order));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidget_EditItem(QTreeWidget* self, QTreeWidgetItem* item) {
|
|
|
|
self->editItem(item);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidget_OpenPersistentEditor(QTreeWidget* self, QTreeWidgetItem* item) {
|
|
|
|
self->openPersistentEditor(item);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidget_ClosePersistentEditor(QTreeWidget* self, QTreeWidgetItem* item) {
|
|
|
|
self->closePersistentEditor(item);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QTreeWidget_IsPersistentEditorOpen(const QTreeWidget* self, QTreeWidgetItem* item) {
|
|
|
|
return self->isPersistentEditorOpen(item);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QWidget* QTreeWidget_ItemWidget(const QTreeWidget* self, QTreeWidgetItem* item, int column) {
|
|
|
|
return self->itemWidget(item, static_cast<int>(column));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidget_SetItemWidget(QTreeWidget* self, QTreeWidgetItem* item, int column, QWidget* widget) {
|
|
|
|
self->setItemWidget(item, static_cast<int>(column), widget);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidget_RemoveItemWidget(QTreeWidget* self, QTreeWidgetItem* item, int column) {
|
|
|
|
self->removeItemWidget(item, static_cast<int>(column));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QTreeWidget_IsItemSelected(const QTreeWidget* self, QTreeWidgetItem* item) {
|
|
|
|
return self->isItemSelected(item);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidget_SetItemSelected(QTreeWidget* self, QTreeWidgetItem* item, bool selectVal) {
|
|
|
|
self->setItemSelected(item, selectVal);
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_array* QTreeWidget_SelectedItems(const QTreeWidget* self) {
|
2024-09-18 00:12:02 +00:00
|
|
|
QList<QTreeWidgetItem *> _ret = self->selectedItems();
|
2024-08-29 07:01:51 +00:00
|
|
|
// Convert QList<> from C++ memory to manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QTreeWidgetItem** _arr = static_cast<QTreeWidgetItem**>(malloc(sizeof(QTreeWidgetItem*) * _ret.length()));
|
|
|
|
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
|
|
|
_arr[i] = _ret[i];
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
|
|
|
_out->len = _ret.length();
|
|
|
|
_out->data = static_cast<void*>(_arr);
|
|
|
|
return _out;
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_array* QTreeWidget_FindItems(const QTreeWidget* self, struct miqt_string text, int flags) {
|
|
|
|
QString text_QString = QString::fromUtf8(text.data, text.len);
|
2024-09-18 00:12:02 +00:00
|
|
|
QList<QTreeWidgetItem *> _ret = self->findItems(text_QString, static_cast<Qt::MatchFlags>(flags));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QList<> from C++ memory to manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QTreeWidgetItem** _arr = static_cast<QTreeWidgetItem**>(malloc(sizeof(QTreeWidgetItem*) * _ret.length()));
|
|
|
|
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
|
|
|
_arr[i] = _ret[i];
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
|
|
|
_out->len = _ret.length();
|
|
|
|
_out->data = static_cast<void*>(_arr);
|
|
|
|
return _out;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QTreeWidget_IsItemHidden(const QTreeWidget* self, QTreeWidgetItem* item) {
|
|
|
|
return self->isItemHidden(item);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidget_SetItemHidden(QTreeWidget* self, QTreeWidgetItem* item, bool hide) {
|
|
|
|
self->setItemHidden(item, hide);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QTreeWidget_IsItemExpanded(const QTreeWidget* self, QTreeWidgetItem* item) {
|
|
|
|
return self->isItemExpanded(item);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidget_SetItemExpanded(QTreeWidget* self, QTreeWidgetItem* item, bool expand) {
|
|
|
|
self->setItemExpanded(item, expand);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QTreeWidget_IsFirstItemColumnSpanned(const QTreeWidget* self, QTreeWidgetItem* item) {
|
|
|
|
return self->isFirstItemColumnSpanned(item);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidget_SetFirstItemColumnSpanned(QTreeWidget* self, QTreeWidgetItem* item, bool span) {
|
|
|
|
self->setFirstItemColumnSpanned(item, span);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QTreeWidgetItem* QTreeWidget_ItemAbove(const QTreeWidget* self, QTreeWidgetItem* item) {
|
|
|
|
return self->itemAbove(item);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QTreeWidgetItem* QTreeWidget_ItemBelow(const QTreeWidget* self, QTreeWidgetItem* item) {
|
|
|
|
return self->itemBelow(item);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidget_SetSelectionModel(QTreeWidget* self, QItemSelectionModel* selectionModel) {
|
|
|
|
self->setSelectionModel(selectionModel);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QTreeWidget_ScrollToItem(QTreeWidget* self, QTreeWidgetItem* item) {
|
|
|
|
self->scrollToItem(item);
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QTreeWidget_ExpandItem(QTreeWidget* self, QTreeWidgetItem* item) {
|
|
|
|
self->expandItem(item);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidget_CollapseItem(QTreeWidget* self, QTreeWidgetItem* item) {
|
|
|
|
self->collapseItem(item);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidget_Clear(QTreeWidget* self) {
|
|
|
|
self->clear();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidget_ItemPressed(QTreeWidget* self, QTreeWidgetItem* item, int column) {
|
|
|
|
self->itemPressed(item, static_cast<int>(column));
|
|
|
|
}
|
|
|
|
|
2024-10-13 06:06:06 +00:00
|
|
|
void QTreeWidget_connect_ItemPressed(QTreeWidget* self, intptr_t slot) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QTreeWidget::connect(self, static_cast<void (QTreeWidget::*)(QTreeWidgetItem*, int)>(&QTreeWidget::itemPressed), self, [=](QTreeWidgetItem* item, int column) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QTreeWidgetItem* sigval1 = item;
|
|
|
|
int sigval2 = column;
|
|
|
|
miqt_exec_callback_QTreeWidget_ItemPressed(slot, sigval1, sigval2);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidget_ItemClicked(QTreeWidget* self, QTreeWidgetItem* item, int column) {
|
|
|
|
self->itemClicked(item, static_cast<int>(column));
|
|
|
|
}
|
|
|
|
|
2024-10-13 06:06:06 +00:00
|
|
|
void QTreeWidget_connect_ItemClicked(QTreeWidget* self, intptr_t slot) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QTreeWidget::connect(self, static_cast<void (QTreeWidget::*)(QTreeWidgetItem*, int)>(&QTreeWidget::itemClicked), self, [=](QTreeWidgetItem* item, int column) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QTreeWidgetItem* sigval1 = item;
|
|
|
|
int sigval2 = column;
|
|
|
|
miqt_exec_callback_QTreeWidget_ItemClicked(slot, sigval1, sigval2);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidget_ItemDoubleClicked(QTreeWidget* self, QTreeWidgetItem* item, int column) {
|
|
|
|
self->itemDoubleClicked(item, static_cast<int>(column));
|
|
|
|
}
|
|
|
|
|
2024-10-13 06:06:06 +00:00
|
|
|
void QTreeWidget_connect_ItemDoubleClicked(QTreeWidget* self, intptr_t slot) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QTreeWidget::connect(self, static_cast<void (QTreeWidget::*)(QTreeWidgetItem*, int)>(&QTreeWidget::itemDoubleClicked), self, [=](QTreeWidgetItem* item, int column) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QTreeWidgetItem* sigval1 = item;
|
|
|
|
int sigval2 = column;
|
|
|
|
miqt_exec_callback_QTreeWidget_ItemDoubleClicked(slot, sigval1, sigval2);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidget_ItemActivated(QTreeWidget* self, QTreeWidgetItem* item, int column) {
|
|
|
|
self->itemActivated(item, static_cast<int>(column));
|
|
|
|
}
|
|
|
|
|
2024-10-13 06:06:06 +00:00
|
|
|
void QTreeWidget_connect_ItemActivated(QTreeWidget* self, intptr_t slot) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QTreeWidget::connect(self, static_cast<void (QTreeWidget::*)(QTreeWidgetItem*, int)>(&QTreeWidget::itemActivated), self, [=](QTreeWidgetItem* item, int column) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QTreeWidgetItem* sigval1 = item;
|
|
|
|
int sigval2 = column;
|
|
|
|
miqt_exec_callback_QTreeWidget_ItemActivated(slot, sigval1, sigval2);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidget_ItemEntered(QTreeWidget* self, QTreeWidgetItem* item, int column) {
|
|
|
|
self->itemEntered(item, static_cast<int>(column));
|
|
|
|
}
|
|
|
|
|
2024-10-13 06:06:06 +00:00
|
|
|
void QTreeWidget_connect_ItemEntered(QTreeWidget* self, intptr_t slot) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QTreeWidget::connect(self, static_cast<void (QTreeWidget::*)(QTreeWidgetItem*, int)>(&QTreeWidget::itemEntered), self, [=](QTreeWidgetItem* item, int column) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QTreeWidgetItem* sigval1 = item;
|
|
|
|
int sigval2 = column;
|
|
|
|
miqt_exec_callback_QTreeWidget_ItemEntered(slot, sigval1, sigval2);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidget_ItemChanged(QTreeWidget* self, QTreeWidgetItem* item, int column) {
|
|
|
|
self->itemChanged(item, static_cast<int>(column));
|
|
|
|
}
|
|
|
|
|
2024-10-13 06:06:06 +00:00
|
|
|
void QTreeWidget_connect_ItemChanged(QTreeWidget* self, intptr_t slot) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QTreeWidget::connect(self, static_cast<void (QTreeWidget::*)(QTreeWidgetItem*, int)>(&QTreeWidget::itemChanged), self, [=](QTreeWidgetItem* item, int column) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QTreeWidgetItem* sigval1 = item;
|
|
|
|
int sigval2 = column;
|
|
|
|
miqt_exec_callback_QTreeWidget_ItemChanged(slot, sigval1, sigval2);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidget_ItemExpanded(QTreeWidget* self, QTreeWidgetItem* item) {
|
|
|
|
self->itemExpanded(item);
|
|
|
|
}
|
|
|
|
|
2024-10-13 06:06:06 +00:00
|
|
|
void QTreeWidget_connect_ItemExpanded(QTreeWidget* self, intptr_t slot) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QTreeWidget::connect(self, static_cast<void (QTreeWidget::*)(QTreeWidgetItem*)>(&QTreeWidget::itemExpanded), self, [=](QTreeWidgetItem* item) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QTreeWidgetItem* sigval1 = item;
|
|
|
|
miqt_exec_callback_QTreeWidget_ItemExpanded(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidget_ItemCollapsed(QTreeWidget* self, QTreeWidgetItem* item) {
|
|
|
|
self->itemCollapsed(item);
|
|
|
|
}
|
|
|
|
|
2024-10-13 06:06:06 +00:00
|
|
|
void QTreeWidget_connect_ItemCollapsed(QTreeWidget* self, intptr_t slot) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QTreeWidget::connect(self, static_cast<void (QTreeWidget::*)(QTreeWidgetItem*)>(&QTreeWidget::itemCollapsed), self, [=](QTreeWidgetItem* item) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QTreeWidgetItem* sigval1 = item;
|
|
|
|
miqt_exec_callback_QTreeWidget_ItemCollapsed(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidget_CurrentItemChanged(QTreeWidget* self, QTreeWidgetItem* current, QTreeWidgetItem* previous) {
|
|
|
|
self->currentItemChanged(current, previous);
|
|
|
|
}
|
|
|
|
|
2024-10-13 06:06:06 +00:00
|
|
|
void QTreeWidget_connect_CurrentItemChanged(QTreeWidget* self, intptr_t slot) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QTreeWidget::connect(self, static_cast<void (QTreeWidget::*)(QTreeWidgetItem*, QTreeWidgetItem*)>(&QTreeWidget::currentItemChanged), self, [=](QTreeWidgetItem* current, QTreeWidgetItem* previous) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QTreeWidgetItem* sigval1 = current;
|
|
|
|
QTreeWidgetItem* sigval2 = previous;
|
|
|
|
miqt_exec_callback_QTreeWidget_CurrentItemChanged(slot, sigval1, sigval2);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidget_ItemSelectionChanged(QTreeWidget* self) {
|
|
|
|
self->itemSelectionChanged();
|
|
|
|
}
|
|
|
|
|
2024-10-13 06:06:06 +00:00
|
|
|
void QTreeWidget_connect_ItemSelectionChanged(QTreeWidget* self, intptr_t slot) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QTreeWidget::connect(self, static_cast<void (QTreeWidget::*)()>(&QTreeWidget::itemSelectionChanged), self, [=]() {
|
2024-09-14 22:29:05 +00:00
|
|
|
miqt_exec_callback_QTreeWidget_ItemSelectionChanged(slot);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QTreeWidget_Tr2(const char* s, const char* c) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QTreeWidget::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();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QTreeWidget_Tr3(const char* s, const char* c, int n) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QTreeWidget::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();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QTreeWidget_TrUtf82(const char* s, const char* c) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QTreeWidget::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();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QTreeWidget_TrUtf83(const char* s, const char* c, int n) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QTreeWidget::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();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidget_EditItem2(QTreeWidget* self, QTreeWidgetItem* item, int column) {
|
|
|
|
self->editItem(item, static_cast<int>(column));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidget_OpenPersistentEditor2(QTreeWidget* self, QTreeWidgetItem* item, int column) {
|
|
|
|
self->openPersistentEditor(item, static_cast<int>(column));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTreeWidget_ClosePersistentEditor2(QTreeWidget* self, QTreeWidgetItem* item, int column) {
|
|
|
|
self->closePersistentEditor(item, static_cast<int>(column));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QTreeWidget_IsPersistentEditorOpen2(const QTreeWidget* self, QTreeWidgetItem* item, int column) {
|
|
|
|
return self->isPersistentEditorOpen(item, static_cast<int>(column));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_array* QTreeWidget_FindItems3(const QTreeWidget* self, struct miqt_string text, int flags, int column) {
|
|
|
|
QString text_QString = QString::fromUtf8(text.data, text.len);
|
2024-09-18 00:12:02 +00:00
|
|
|
QList<QTreeWidgetItem *> _ret = self->findItems(text_QString, static_cast<Qt::MatchFlags>(flags), static_cast<int>(column));
|
2024-08-29 07:01:51 +00:00
|
|
|
// Convert QList<> from C++ memory to manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QTreeWidgetItem** _arr = static_cast<QTreeWidgetItem**>(malloc(sizeof(QTreeWidgetItem*) * _ret.length()));
|
|
|
|
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
|
|
|
_arr[i] = _ret[i];
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
|
|
|
_out->len = _ret.length();
|
|
|
|
_out->data = static_cast<void*>(_arr);
|
|
|
|
return _out;
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QTreeWidget_ScrollToItem2(QTreeWidget* self, QTreeWidgetItem* item, int hint) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->scrollToItem(item, static_cast<QAbstractItemView::ScrollHint>(hint));
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QTreeWidget_Delete(QTreeWidget* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|