2024-08-25 04:08:24 +00:00
|
|
|
#include <QMetaObject>
|
|
|
|
#include <QStatusBar>
|
|
|
|
#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 <qstatusbar.h>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qstatusbar.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
QStatusBar* QStatusBar_new() {
|
|
|
|
return new QStatusBar();
|
|
|
|
}
|
|
|
|
|
|
|
|
QStatusBar* QStatusBar_new2(QWidget* parent) {
|
|
|
|
return new QStatusBar(parent);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMetaObject* QStatusBar_MetaObject(const QStatusBar* self) {
|
|
|
|
return (QMetaObject*) self->metaObject();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 22:32:57 +00:00
|
|
|
void* QStatusBar_Metacast(QStatusBar* self, const char* param1) {
|
|
|
|
return self->qt_metacast(param1);
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QStatusBar_Tr(const char* s) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QStatusBar::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 QStatusBar_TrUtf8(const char* s) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QStatusBar::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
|
|
|
}
|
|
|
|
|
|
|
|
void QStatusBar_AddWidget(QStatusBar* self, QWidget* widget) {
|
|
|
|
self->addWidget(widget);
|
|
|
|
}
|
|
|
|
|
|
|
|
int QStatusBar_InsertWidget(QStatusBar* self, int index, QWidget* widget) {
|
|
|
|
return self->insertWidget(static_cast<int>(index), widget);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QStatusBar_AddPermanentWidget(QStatusBar* self, QWidget* widget) {
|
|
|
|
self->addPermanentWidget(widget);
|
|
|
|
}
|
|
|
|
|
|
|
|
int QStatusBar_InsertPermanentWidget(QStatusBar* self, int index, QWidget* widget) {
|
|
|
|
return self->insertPermanentWidget(static_cast<int>(index), widget);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QStatusBar_RemoveWidget(QStatusBar* self, QWidget* widget) {
|
|
|
|
self->removeWidget(widget);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QStatusBar_SetSizeGripEnabled(QStatusBar* self, bool sizeGripEnabled) {
|
|
|
|
self->setSizeGripEnabled(sizeGripEnabled);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QStatusBar_IsSizeGripEnabled(const QStatusBar* self) {
|
|
|
|
return self->isSizeGripEnabled();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QStatusBar_CurrentMessage(const QStatusBar* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = self->currentMessage();
|
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 QStatusBar_ShowMessage(QStatusBar* self, struct miqt_string text) {
|
|
|
|
QString text_QString = QString::fromUtf8(text.data, text.len);
|
2024-08-25 04:08:24 +00:00
|
|
|
self->showMessage(text_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QStatusBar_ClearMessage(QStatusBar* self) {
|
|
|
|
self->clearMessage();
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
void QStatusBar_MessageChanged(QStatusBar* self, struct miqt_string text) {
|
|
|
|
QString text_QString = QString::fromUtf8(text.data, text.len);
|
2024-08-25 04:08:24 +00:00
|
|
|
self->messageChanged(text_QString);
|
|
|
|
}
|
|
|
|
|
2024-10-13 06:06:06 +00:00
|
|
|
void QStatusBar_connect_MessageChanged(QStatusBar* self, intptr_t slot) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QStatusBar::connect(self, static_cast<void (QStatusBar::*)(const QString&)>(&QStatusBar::messageChanged), self, [=](const QString& text) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QString text_ret = text;
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray text_b = text_ret.toUtf8();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string text_ms;
|
|
|
|
text_ms.len = text_b.length();
|
|
|
|
text_ms.data = static_cast<char*>(malloc(text_ms.len));
|
|
|
|
memcpy(text_ms.data, text_b.data(), text_ms.len);
|
|
|
|
struct miqt_string sigval1 = text_ms;
|
2024-09-14 22:29:05 +00:00
|
|
|
miqt_exec_callback_QStatusBar_MessageChanged(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QStatusBar_Tr2(const char* s, const char* c) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QStatusBar::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 QStatusBar_Tr3(const char* s, const char* c, int n) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QStatusBar::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 QStatusBar_TrUtf82(const char* s, const char* c) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QStatusBar::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 QStatusBar_TrUtf83(const char* s, const char* c, int n) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QStatusBar::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 QStatusBar_AddWidget2(QStatusBar* self, QWidget* widget, int stretch) {
|
|
|
|
self->addWidget(widget, static_cast<int>(stretch));
|
|
|
|
}
|
|
|
|
|
|
|
|
int QStatusBar_InsertWidget3(QStatusBar* self, int index, QWidget* widget, int stretch) {
|
|
|
|
return self->insertWidget(static_cast<int>(index), widget, static_cast<int>(stretch));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QStatusBar_AddPermanentWidget2(QStatusBar* self, QWidget* widget, int stretch) {
|
|
|
|
self->addPermanentWidget(widget, static_cast<int>(stretch));
|
|
|
|
}
|
|
|
|
|
|
|
|
int QStatusBar_InsertPermanentWidget3(QStatusBar* self, int index, QWidget* widget, int stretch) {
|
|
|
|
return self->insertPermanentWidget(static_cast<int>(index), widget, static_cast<int>(stretch));
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
void QStatusBar_ShowMessage2(QStatusBar* self, struct miqt_string text, int timeout) {
|
|
|
|
QString text_QString = QString::fromUtf8(text.data, text.len);
|
2024-08-25 04:08:24 +00:00
|
|
|
self->showMessage(text_QString, static_cast<int>(timeout));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QStatusBar_Delete(QStatusBar* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|