2024-08-25 04:08:24 +00:00
|
|
|
#include <QMetaObject>
|
|
|
|
#include <QObject>
|
|
|
|
#include <QString>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QTimer>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "qtimer.h"
|
|
|
|
#include "gen_qtimer.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
QTimer* QTimer_new() {
|
|
|
|
return new QTimer();
|
|
|
|
}
|
|
|
|
|
|
|
|
QTimer* QTimer_new2(QObject* parent) {
|
|
|
|
return new QTimer(parent);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMetaObject* QTimer_MetaObject(const QTimer* self) {
|
|
|
|
return (QMetaObject*) self->metaObject();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 22:32:57 +00:00
|
|
|
void* QTimer_Metacast(QTimer* self, const char* param1) {
|
|
|
|
return self->qt_metacast(param1);
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QTimer_Tr(const char* s) {
|
|
|
|
QString _ret = QTimer::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* QTimer_TrUtf8(const char* s) {
|
|
|
|
QString _ret = QTimer::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
|
|
|
bool QTimer_IsActive(const QTimer* self) {
|
|
|
|
return self->isActive();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QTimer_TimerId(const QTimer* self) {
|
|
|
|
return self->timerId();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTimer_SetInterval(QTimer* self, int msec) {
|
|
|
|
self->setInterval(static_cast<int>(msec));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QTimer_Interval(const QTimer* self) {
|
|
|
|
return self->interval();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QTimer_RemainingTime(const QTimer* self) {
|
|
|
|
return self->remainingTime();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QTimer_SetTimerType(QTimer* self, int atype) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setTimerType(static_cast<Qt::TimerType>(atype));
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QTimer_TimerType(const QTimer* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
Qt::TimerType _ret = self->timerType();
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTimer_SetSingleShot(QTimer* self, bool singleShot) {
|
|
|
|
self->setSingleShot(singleShot);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QTimer_IsSingleShot(const QTimer* self) {
|
|
|
|
return self->isSingleShot();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTimer_Start(QTimer* self, int msec) {
|
|
|
|
self->start(static_cast<int>(msec));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTimer_Start2(QTimer* self) {
|
|
|
|
self->start();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTimer_Stop(QTimer* self) {
|
|
|
|
self->stop();
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QTimer_Tr2(const char* s, const char* c) {
|
|
|
|
QString _ret = QTimer::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* QTimer_Tr3(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QTimer::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* QTimer_TrUtf82(const char* s, const char* c) {
|
|
|
|
QString _ret = QTimer::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* QTimer_TrUtf83(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QTimer::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 QTimer_Delete(QTimer* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|