2024-08-25 04:08:24 +00:00
|
|
|
#include <QMetaObject>
|
|
|
|
#include <QProgressBar>
|
|
|
|
#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 <qprogressbar.h>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qprogressbar.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-10-26 00:46:42 +00:00
|
|
|
QProgressBar* QProgressBar_new(QWidget* parent) {
|
|
|
|
return new QProgressBar(parent);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-26 00:46:42 +00:00
|
|
|
QProgressBar* QProgressBar_new2() {
|
|
|
|
return new QProgressBar();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMetaObject* QProgressBar_MetaObject(const QProgressBar* self) {
|
|
|
|
return (QMetaObject*) self->metaObject();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 22:32:57 +00:00
|
|
|
void* QProgressBar_Metacast(QProgressBar* self, const char* param1) {
|
|
|
|
return self->qt_metacast(param1);
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QProgressBar_Tr(const char* s) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QProgressBar::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 QProgressBar_TrUtf8(const char* s) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QProgressBar::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 QProgressBar_Minimum(const QProgressBar* self) {
|
|
|
|
return self->minimum();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QProgressBar_Maximum(const QProgressBar* self) {
|
|
|
|
return self->maximum();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QProgressBar_Value(const QProgressBar* self) {
|
|
|
|
return self->value();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QProgressBar_Text(const QProgressBar* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
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();
|
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 QProgressBar_SetTextVisible(QProgressBar* self, bool visible) {
|
|
|
|
self->setTextVisible(visible);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QProgressBar_IsTextVisible(const QProgressBar* self) {
|
|
|
|
return self->isTextVisible();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QProgressBar_Alignment(const QProgressBar* 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 QProgressBar_SetAlignment(QProgressBar* self, int alignment) {
|
|
|
|
self->setAlignment(static_cast<Qt::Alignment>(alignment));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QProgressBar_SizeHint(const QProgressBar* 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* QProgressBar_MinimumSizeHint(const QProgressBar* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QSize(self->minimumSizeHint());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QProgressBar_Orientation(const QProgressBar* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
Qt::Orientation _ret = self->orientation();
|
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 QProgressBar_SetInvertedAppearance(QProgressBar* self, bool invert) {
|
|
|
|
self->setInvertedAppearance(invert);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QProgressBar_InvertedAppearance(const QProgressBar* self) {
|
|
|
|
return self->invertedAppearance();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QProgressBar_SetTextDirection(QProgressBar* self, int textDirection) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setTextDirection(static_cast<QProgressBar::Direction>(textDirection));
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QProgressBar_TextDirection(const QProgressBar* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QProgressBar::Direction _ret = self->textDirection();
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
void QProgressBar_SetFormat(QProgressBar* self, struct miqt_string format) {
|
|
|
|
QString format_QString = QString::fromUtf8(format.data, format.len);
|
2024-08-25 04:08:24 +00:00
|
|
|
self->setFormat(format_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QProgressBar_ResetFormat(QProgressBar* self) {
|
|
|
|
self->resetFormat();
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QProgressBar_Format(const QProgressBar* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = self->format();
|
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 QProgressBar_Reset(QProgressBar* self) {
|
|
|
|
self->reset();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QProgressBar_SetRange(QProgressBar* self, int minimum, int maximum) {
|
|
|
|
self->setRange(static_cast<int>(minimum), static_cast<int>(maximum));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QProgressBar_SetMinimum(QProgressBar* self, int minimum) {
|
|
|
|
self->setMinimum(static_cast<int>(minimum));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QProgressBar_SetMaximum(QProgressBar* self, int maximum) {
|
|
|
|
self->setMaximum(static_cast<int>(maximum));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QProgressBar_SetValue(QProgressBar* self, int value) {
|
|
|
|
self->setValue(static_cast<int>(value));
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QProgressBar_SetOrientation(QProgressBar* self, int orientation) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setOrientation(static_cast<Qt::Orientation>(orientation));
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QProgressBar_ValueChanged(QProgressBar* self, int value) {
|
|
|
|
self->valueChanged(static_cast<int>(value));
|
|
|
|
}
|
|
|
|
|
2024-10-13 06:06:06 +00:00
|
|
|
void QProgressBar_connect_ValueChanged(QProgressBar* self, intptr_t slot) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QProgressBar::connect(self, static_cast<void (QProgressBar::*)(int)>(&QProgressBar::valueChanged), self, [=](int value) {
|
2024-09-14 22:29:05 +00:00
|
|
|
int sigval1 = value;
|
|
|
|
miqt_exec_callback_QProgressBar_ValueChanged(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QProgressBar_Tr2(const char* s, const char* c) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QProgressBar::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 QProgressBar_Tr3(const char* s, const char* c, int n) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QProgressBar::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 QProgressBar_TrUtf82(const char* s, const char* c) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QProgressBar::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 QProgressBar_TrUtf83(const char* s, const char* c, int n) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QProgressBar::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 QProgressBar_Delete(QProgressBar* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|