2024-08-25 04:08:24 +00:00
|
|
|
#include <QEvent>
|
|
|
|
#include <QFutureWatcherBase>
|
|
|
|
#include <QMetaObject>
|
|
|
|
#include <QString>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
|
|
|
#include "qfuturewatcher.h"
|
|
|
|
#include "gen_qfuturewatcher.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMetaObject* QFutureWatcherBase_MetaObject(const QFutureWatcherBase* self) {
|
|
|
|
return (QMetaObject*) self->metaObject();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QFutureWatcherBase_Tr(const char* s) {
|
|
|
|
QString _ret = QFutureWatcherBase::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* QFutureWatcherBase_TrUtf8(const char* s) {
|
|
|
|
QString _ret = QFutureWatcherBase::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 QFutureWatcherBase_ProgressValue(const QFutureWatcherBase* self) {
|
|
|
|
return self->progressValue();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QFutureWatcherBase_ProgressMinimum(const QFutureWatcherBase* self) {
|
|
|
|
return self->progressMinimum();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QFutureWatcherBase_ProgressMaximum(const QFutureWatcherBase* self) {
|
|
|
|
return self->progressMaximum();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QFutureWatcherBase_ProgressText(const QFutureWatcherBase* self) {
|
|
|
|
QString _ret = self->progressText();
|
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
|
|
|
bool QFutureWatcherBase_IsStarted(const QFutureWatcherBase* self) {
|
|
|
|
return self->isStarted();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFutureWatcherBase_IsFinished(const QFutureWatcherBase* self) {
|
|
|
|
return self->isFinished();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFutureWatcherBase_IsRunning(const QFutureWatcherBase* self) {
|
|
|
|
return self->isRunning();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFutureWatcherBase_IsCanceled(const QFutureWatcherBase* self) {
|
|
|
|
return self->isCanceled();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFutureWatcherBase_IsPaused(const QFutureWatcherBase* self) {
|
|
|
|
return self->isPaused();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QFutureWatcherBase_WaitForFinished(QFutureWatcherBase* self) {
|
|
|
|
self->waitForFinished();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFutureWatcherBase_SetPendingResultsLimit(QFutureWatcherBase* self, int limit) {
|
|
|
|
self->setPendingResultsLimit(static_cast<int>(limit));
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QFutureWatcherBase_Event(QFutureWatcherBase* self, QEvent* event) {
|
|
|
|
return self->event(event);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFutureWatcherBase_Started(QFutureWatcherBase* self) {
|
|
|
|
self->started();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFutureWatcherBase_connect_Started(QFutureWatcherBase* self, void* slot) {
|
|
|
|
QFutureWatcherBase::connect(self, static_cast<void (QFutureWatcherBase::*)()>(&QFutureWatcherBase::started), self, [=]() {
|
2024-09-14 22:29:05 +00:00
|
|
|
miqt_exec_callback_QFutureWatcherBase_Started(slot);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFutureWatcherBase_Finished(QFutureWatcherBase* self) {
|
|
|
|
self->finished();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFutureWatcherBase_connect_Finished(QFutureWatcherBase* self, void* slot) {
|
|
|
|
QFutureWatcherBase::connect(self, static_cast<void (QFutureWatcherBase::*)()>(&QFutureWatcherBase::finished), self, [=]() {
|
2024-09-14 22:29:05 +00:00
|
|
|
miqt_exec_callback_QFutureWatcherBase_Finished(slot);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFutureWatcherBase_Canceled(QFutureWatcherBase* self) {
|
|
|
|
self->canceled();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFutureWatcherBase_connect_Canceled(QFutureWatcherBase* self, void* slot) {
|
|
|
|
QFutureWatcherBase::connect(self, static_cast<void (QFutureWatcherBase::*)()>(&QFutureWatcherBase::canceled), self, [=]() {
|
2024-09-14 22:29:05 +00:00
|
|
|
miqt_exec_callback_QFutureWatcherBase_Canceled(slot);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFutureWatcherBase_Paused(QFutureWatcherBase* self) {
|
|
|
|
self->paused();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFutureWatcherBase_connect_Paused(QFutureWatcherBase* self, void* slot) {
|
|
|
|
QFutureWatcherBase::connect(self, static_cast<void (QFutureWatcherBase::*)()>(&QFutureWatcherBase::paused), self, [=]() {
|
2024-09-14 22:29:05 +00:00
|
|
|
miqt_exec_callback_QFutureWatcherBase_Paused(slot);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFutureWatcherBase_Resumed(QFutureWatcherBase* self) {
|
|
|
|
self->resumed();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFutureWatcherBase_connect_Resumed(QFutureWatcherBase* self, void* slot) {
|
|
|
|
QFutureWatcherBase::connect(self, static_cast<void (QFutureWatcherBase::*)()>(&QFutureWatcherBase::resumed), self, [=]() {
|
2024-09-14 22:29:05 +00:00
|
|
|
miqt_exec_callback_QFutureWatcherBase_Resumed(slot);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFutureWatcherBase_ResultReadyAt(QFutureWatcherBase* self, int resultIndex) {
|
|
|
|
self->resultReadyAt(static_cast<int>(resultIndex));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFutureWatcherBase_connect_ResultReadyAt(QFutureWatcherBase* self, void* slot) {
|
|
|
|
QFutureWatcherBase::connect(self, static_cast<void (QFutureWatcherBase::*)(int)>(&QFutureWatcherBase::resultReadyAt), self, [=](int resultIndex) {
|
2024-09-14 22:29:05 +00:00
|
|
|
int sigval1 = resultIndex;
|
|
|
|
miqt_exec_callback_QFutureWatcherBase_ResultReadyAt(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFutureWatcherBase_ResultsReadyAt(QFutureWatcherBase* self, int beginIndex, int endIndex) {
|
|
|
|
self->resultsReadyAt(static_cast<int>(beginIndex), static_cast<int>(endIndex));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFutureWatcherBase_connect_ResultsReadyAt(QFutureWatcherBase* self, void* slot) {
|
|
|
|
QFutureWatcherBase::connect(self, static_cast<void (QFutureWatcherBase::*)(int, int)>(&QFutureWatcherBase::resultsReadyAt), self, [=](int beginIndex, int endIndex) {
|
2024-09-14 22:29:05 +00:00
|
|
|
int sigval1 = beginIndex;
|
|
|
|
int sigval2 = endIndex;
|
|
|
|
miqt_exec_callback_QFutureWatcherBase_ResultsReadyAt(slot, sigval1, sigval2);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFutureWatcherBase_ProgressRangeChanged(QFutureWatcherBase* self, int minimum, int maximum) {
|
|
|
|
self->progressRangeChanged(static_cast<int>(minimum), static_cast<int>(maximum));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFutureWatcherBase_connect_ProgressRangeChanged(QFutureWatcherBase* self, void* slot) {
|
|
|
|
QFutureWatcherBase::connect(self, static_cast<void (QFutureWatcherBase::*)(int, int)>(&QFutureWatcherBase::progressRangeChanged), self, [=](int minimum, int maximum) {
|
2024-09-14 22:29:05 +00:00
|
|
|
int sigval1 = minimum;
|
|
|
|
int sigval2 = maximum;
|
|
|
|
miqt_exec_callback_QFutureWatcherBase_ProgressRangeChanged(slot, sigval1, sigval2);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFutureWatcherBase_ProgressValueChanged(QFutureWatcherBase* self, int progressValue) {
|
|
|
|
self->progressValueChanged(static_cast<int>(progressValue));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFutureWatcherBase_connect_ProgressValueChanged(QFutureWatcherBase* self, void* slot) {
|
|
|
|
QFutureWatcherBase::connect(self, static_cast<void (QFutureWatcherBase::*)(int)>(&QFutureWatcherBase::progressValueChanged), self, [=](int progressValue) {
|
2024-09-14 22:29:05 +00:00
|
|
|
int sigval1 = progressValue;
|
|
|
|
miqt_exec_callback_QFutureWatcherBase_ProgressValueChanged(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
void QFutureWatcherBase_ProgressTextChanged(QFutureWatcherBase* self, struct miqt_string* progressText) {
|
|
|
|
QString progressText_QString = QString::fromUtf8(&progressText->data, progressText->len);
|
2024-08-25 04:08:24 +00:00
|
|
|
self->progressTextChanged(progressText_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFutureWatcherBase_connect_ProgressTextChanged(QFutureWatcherBase* self, void* slot) {
|
|
|
|
QFutureWatcherBase::connect(self, static_cast<void (QFutureWatcherBase::*)(const QString&)>(&QFutureWatcherBase::progressTextChanged), self, [=](const QString& progressText) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QString progressText_ret = progressText;
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray progressText_b = progressText_ret.toUtf8();
|
|
|
|
struct miqt_string* sigval1 = miqt_strdup(progressText_b.data(), progressText_b.length());
|
|
|
|
miqt_exec_callback_QFutureWatcherBase_ProgressTextChanged(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFutureWatcherBase_Cancel(QFutureWatcherBase* self) {
|
|
|
|
self->cancel();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFutureWatcherBase_SetPaused(QFutureWatcherBase* self, bool paused) {
|
|
|
|
self->setPaused(paused);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFutureWatcherBase_Pause(QFutureWatcherBase* self) {
|
|
|
|
self->pause();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFutureWatcherBase_Resume(QFutureWatcherBase* self) {
|
|
|
|
self->resume();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFutureWatcherBase_TogglePaused(QFutureWatcherBase* self) {
|
|
|
|
self->togglePaused();
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QFutureWatcherBase_Tr2(const char* s, const char* c) {
|
|
|
|
QString _ret = QFutureWatcherBase::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* QFutureWatcherBase_Tr3(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QFutureWatcherBase::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* QFutureWatcherBase_TrUtf82(const char* s, const char* c) {
|
|
|
|
QString _ret = QFutureWatcherBase::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* QFutureWatcherBase_TrUtf83(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QFutureWatcherBase::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 QFutureWatcherBase_Delete(QFutureWatcherBase* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|