2024-08-25 04:08:24 +00:00
|
|
|
#include <QCalendar>
|
|
|
|
#include <QDate>
|
|
|
|
#include <QDateTime>
|
|
|
|
#include <QString>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QTime>
|
|
|
|
#include <QTimeZone>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "qdatetime.h"
|
|
|
|
#include "gen_qdatetime.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
QDate* QDate_new() {
|
|
|
|
return new QDate();
|
|
|
|
}
|
|
|
|
|
|
|
|
QDate* QDate_new2(int y, int m, int d) {
|
|
|
|
return new QDate(static_cast<int>(y), static_cast<int>(m), static_cast<int>(d));
|
|
|
|
}
|
|
|
|
|
|
|
|
QDate* QDate_new3(int y, int m, int d, QCalendar* cal) {
|
|
|
|
return new QDate(static_cast<int>(y), static_cast<int>(m), static_cast<int>(d), *cal);
|
|
|
|
}
|
|
|
|
|
|
|
|
QDate* QDate_new4(QDate* param1) {
|
|
|
|
return new QDate(*param1);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QDate_IsNull(const QDate* self) {
|
|
|
|
return self->isNull();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QDate_IsValid(const QDate* self) {
|
|
|
|
return self->isValid();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QDate_Year(const QDate* self) {
|
|
|
|
return self->year();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QDate_Month(const QDate* self) {
|
|
|
|
return self->month();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QDate_Day(const QDate* self) {
|
|
|
|
return self->day();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QDate_DayOfWeek(const QDate* self) {
|
|
|
|
return self->dayOfWeek();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QDate_DayOfYear(const QDate* self) {
|
|
|
|
return self->dayOfYear();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QDate_DaysInMonth(const QDate* self) {
|
|
|
|
return self->daysInMonth();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QDate_DaysInYear(const QDate* self) {
|
|
|
|
return self->daysInYear();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QDate_WeekNumber(const QDate* self) {
|
|
|
|
return self->weekNumber();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QDate_YearWithCal(const QDate* self, QCalendar* cal) {
|
|
|
|
return self->year(*cal);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QDate_MonthWithCal(const QDate* self, QCalendar* cal) {
|
|
|
|
return self->month(*cal);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QDate_DayWithCal(const QDate* self, QCalendar* cal) {
|
|
|
|
return self->day(*cal);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QDate_DayOfWeekWithCal(const QDate* self, QCalendar* cal) {
|
|
|
|
return self->dayOfWeek(*cal);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QDate_DayOfYearWithCal(const QDate* self, QCalendar* cal) {
|
|
|
|
return self->dayOfYear(*cal);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QDate_DaysInMonthWithCal(const QDate* self, QCalendar* cal) {
|
|
|
|
return self->daysInMonth(*cal);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QDate_DaysInYearWithCal(const QDate* self, QCalendar* cal) {
|
|
|
|
return self->daysInYear(*cal);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QDateTime* QDate_StartOfDay(const QDate* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = self->startOfDay();
|
2024-08-29 07:01:51 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QDateTime* QDate_EndOfDay(const QDate* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = self->endOfDay();
|
2024-08-29 07:01:51 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QDateTime* QDate_StartOfDayWithZone(const QDate* self, QTimeZone* zone) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = self->startOfDay(*zone);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QDateTime* QDate_EndOfDayWithZone(const QDate* self, QTimeZone* zone) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = self->endOfDay(*zone);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QDate_ShortMonthName(int month) {
|
|
|
|
QString _ret = QDate::shortMonthName(static_cast<int>(month));
|
2024-08-29 07:01:51 +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-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QDate_ShortDayName(int weekday) {
|
|
|
|
QString _ret = QDate::shortDayName(static_cast<int>(weekday));
|
2024-08-29 07:01:51 +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-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QDate_LongMonthName(int month) {
|
|
|
|
QString _ret = QDate::longMonthName(static_cast<int>(month));
|
2024-08-29 07:01:51 +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-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QDate_LongDayName(int weekday) {
|
|
|
|
QString _ret = QDate::longDayName(static_cast<int>(weekday));
|
2024-08-29 07:01:51 +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-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QDate_ToString(const QDate* self) {
|
|
|
|
QString _ret = self->toString();
|
2024-08-29 07:01:51 +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-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QDate_ToString2(const QDate* self, uintptr_t format, QCalendar* cal) {
|
|
|
|
QString _ret = self->toString(static_cast<Qt::DateFormat>(format), *cal);
|
2024-08-29 07:01:51 +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-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QDate_ToStringWithFormat(const QDate* self, struct miqt_string* format) {
|
|
|
|
QString format_QString = QString::fromUtf8(&format->data, format->len);
|
|
|
|
QString _ret = self->toString(format_QString);
|
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* QDate_ToString3(const QDate* self, struct miqt_string* format, QCalendar* cal) {
|
|
|
|
QString format_QString = QString::fromUtf8(&format->data, format->len);
|
|
|
|
QString _ret = self->toString(format_QString, *cal);
|
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
|
|
|
}
|
|
|
|
|
|
|
|
bool QDate_SetDate(QDate* self, int year, int month, int day) {
|
|
|
|
return self->setDate(static_cast<int>(year), static_cast<int>(month), static_cast<int>(day));
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QDate_SetDate2(QDate* self, int year, int month, int day, QCalendar* cal) {
|
|
|
|
return self->setDate(static_cast<int>(year), static_cast<int>(month), static_cast<int>(day), *cal);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDate_GetDate(QDate* self, int* year, int* month, int* day) {
|
|
|
|
self->getDate(static_cast<int*>(year), static_cast<int*>(month), static_cast<int*>(day));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
void QDate_GetDate2(const QDate* self, int* year, int* month, int* day) {
|
|
|
|
self->getDate(static_cast<int*>(year), static_cast<int*>(month), static_cast<int*>(day));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QDate* QDate_AddDays(const QDate* self, long long days) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDate _ret = self->addDays(static_cast<qint64>(days));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDate*>(new QDate(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QDate* QDate_AddMonths(const QDate* self, int months) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDate _ret = self->addMonths(static_cast<int>(months));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDate*>(new QDate(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QDate* QDate_AddYears(const QDate* self, int years) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDate _ret = self->addYears(static_cast<int>(years));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDate*>(new QDate(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QDate* QDate_AddMonths2(const QDate* self, int months, QCalendar* cal) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDate _ret = self->addMonths(static_cast<int>(months), *cal);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDate*>(new QDate(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QDate* QDate_AddYears2(const QDate* self, int years, QCalendar* cal) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDate _ret = self->addYears(static_cast<int>(years), *cal);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDate*>(new QDate(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
long long QDate_DaysTo(const QDate* self, QDate* param1) {
|
|
|
|
return self->daysTo(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QDate_OperatorEqual(const QDate* self, QDate* other) {
|
|
|
|
return self->operator==(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QDate_OperatorNotEqual(const QDate* self, QDate* other) {
|
|
|
|
return self->operator!=(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QDate_OperatorLesser(const QDate* self, QDate* other) {
|
|
|
|
return self->operator<(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QDate_OperatorLesserOrEqual(const QDate* self, QDate* other) {
|
|
|
|
return self->operator<=(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QDate_OperatorGreater(const QDate* self, QDate* other) {
|
|
|
|
return self->operator>(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QDate_OperatorGreaterOrEqual(const QDate* self, QDate* other) {
|
|
|
|
return self->operator>=(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QDate* QDate_CurrentDate() {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDate _ret = QDate::currentDate();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDate*>(new QDate(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
QDate* QDate_FromString(struct miqt_string* s) {
|
|
|
|
QString s_QString = QString::fromUtf8(&s->data, s->len);
|
|
|
|
QDate _ret = QDate::fromString(s_QString);
|
2024-08-29 07:01:51 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDate*>(new QDate(_ret));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
QDate* QDate_FromString2(struct miqt_string* s, struct miqt_string* format) {
|
|
|
|
QString s_QString = QString::fromUtf8(&s->data, s->len);
|
|
|
|
QString format_QString = QString::fromUtf8(&format->data, format->len);
|
|
|
|
QDate _ret = QDate::fromString(s_QString, format_QString);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDate*>(new QDate(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
QDate* QDate_FromString3(struct miqt_string* s, struct miqt_string* format, QCalendar* cal) {
|
|
|
|
QString s_QString = QString::fromUtf8(&s->data, s->len);
|
|
|
|
QString format_QString = QString::fromUtf8(&format->data, format->len);
|
|
|
|
QDate _ret = QDate::fromString(s_QString, format_QString, *cal);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDate*>(new QDate(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool QDate_IsValid2(int y, int m, int d) {
|
|
|
|
return QDate::isValid(static_cast<int>(y), static_cast<int>(m), static_cast<int>(d));
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QDate_IsLeapYear(int year) {
|
|
|
|
return QDate::isLeapYear(static_cast<int>(year));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QDate* QDate_FromJulianDay(long long jd_) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDate _ret = QDate::fromJulianDay(static_cast<qint64>(jd_));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDate*>(new QDate(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
long long QDate_ToJulianDay(const QDate* self) {
|
|
|
|
return self->toJulianDay();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QDate_WeekNumber1(const QDate* self, int* yearNum) {
|
|
|
|
return self->weekNumber(static_cast<int*>(yearNum));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QDateTime* QDate_StartOfDay1(const QDate* self, uintptr_t spec) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = self->startOfDay(static_cast<Qt::TimeSpec>(spec));
|
2024-08-29 07:01:51 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QDateTime* QDate_StartOfDay2(const QDate* self, uintptr_t spec, int offsetSeconds) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = self->startOfDay(static_cast<Qt::TimeSpec>(spec), static_cast<int>(offsetSeconds));
|
2024-08-29 07:01:51 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QDateTime* QDate_EndOfDay1(const QDate* self, uintptr_t spec) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = self->endOfDay(static_cast<Qt::TimeSpec>(spec));
|
2024-08-29 07:01:51 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QDateTime* QDate_EndOfDay2(const QDate* self, uintptr_t spec, int offsetSeconds) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = self->endOfDay(static_cast<Qt::TimeSpec>(spec), static_cast<int>(offsetSeconds));
|
2024-08-29 07:01:51 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QDate_ShortMonthName2(int month, uintptr_t typeVal) {
|
|
|
|
QString _ret = QDate::shortMonthName(static_cast<int>(month), static_cast<QDate::MonthNameType>(typeVal));
|
2024-08-29 07:01:51 +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-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QDate_ShortDayName2(int weekday, uintptr_t typeVal) {
|
|
|
|
QString _ret = QDate::shortDayName(static_cast<int>(weekday), static_cast<QDate::MonthNameType>(typeVal));
|
2024-08-29 07:01:51 +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-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QDate_LongMonthName2(int month, uintptr_t typeVal) {
|
|
|
|
QString _ret = QDate::longMonthName(static_cast<int>(month), static_cast<QDate::MonthNameType>(typeVal));
|
2024-08-29 07:01:51 +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-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QDate_LongDayName2(int weekday, uintptr_t typeVal) {
|
|
|
|
QString _ret = QDate::longDayName(static_cast<int>(weekday), static_cast<QDate::MonthNameType>(typeVal));
|
2024-08-29 07:01:51 +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-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QDate_ToString1(const QDate* self, uintptr_t format) {
|
|
|
|
QString _ret = self->toString(static_cast<Qt::DateFormat>(format));
|
2024-08-29 07:01:51 +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-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
QDate* QDate_FromString22(struct miqt_string* s, uintptr_t f) {
|
|
|
|
QString s_QString = QString::fromUtf8(&s->data, s->len);
|
|
|
|
QDate _ret = QDate::fromString(s_QString, static_cast<Qt::DateFormat>(f));
|
2024-08-29 07:01:51 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDate*>(new QDate(_ret));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QDate_Delete(QDate* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|
|
|
|
QTime* QTime_new() {
|
|
|
|
return new QTime();
|
|
|
|
}
|
|
|
|
|
|
|
|
QTime* QTime_new2(int h, int m) {
|
|
|
|
return new QTime(static_cast<int>(h), static_cast<int>(m));
|
|
|
|
}
|
|
|
|
|
|
|
|
QTime* QTime_new3(QTime* param1) {
|
|
|
|
return new QTime(*param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
QTime* QTime_new4(int h, int m, int s) {
|
|
|
|
return new QTime(static_cast<int>(h), static_cast<int>(m), static_cast<int>(s));
|
|
|
|
}
|
|
|
|
|
|
|
|
QTime* QTime_new5(int h, int m, int s, int ms) {
|
|
|
|
return new QTime(static_cast<int>(h), static_cast<int>(m), static_cast<int>(s), static_cast<int>(ms));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QTime_IsNull(const QTime* self) {
|
|
|
|
return self->isNull();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QTime_IsValid(const QTime* self) {
|
|
|
|
return self->isValid();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QTime_Hour(const QTime* self) {
|
|
|
|
return self->hour();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QTime_Minute(const QTime* self) {
|
|
|
|
return self->minute();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QTime_Second(const QTime* self) {
|
|
|
|
return self->second();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QTime_Msec(const QTime* self) {
|
|
|
|
return self->msec();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QTime_ToString(const QTime* self) {
|
|
|
|
QString _ret = self->toString();
|
2024-08-29 07:01:51 +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-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QTime_ToStringWithFormat(const QTime* self, struct miqt_string* format) {
|
|
|
|
QString format_QString = QString::fromUtf8(&format->data, format->len);
|
|
|
|
QString _ret = self->toString(format_QString);
|
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
|
|
|
}
|
|
|
|
|
|
|
|
bool QTime_SetHMS(QTime* self, int h, int m, int s) {
|
|
|
|
return self->setHMS(static_cast<int>(h), static_cast<int>(m), static_cast<int>(s));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QTime* QTime_AddSecs(const QTime* self, int secs) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QTime _ret = self->addSecs(static_cast<int>(secs));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QTime*>(new QTime(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QTime_SecsTo(const QTime* self, QTime* param1) {
|
|
|
|
return self->secsTo(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QTime* QTime_AddMSecs(const QTime* self, int ms) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QTime _ret = self->addMSecs(static_cast<int>(ms));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QTime*>(new QTime(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QTime_MsecsTo(const QTime* self, QTime* param1) {
|
|
|
|
return self->msecsTo(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QTime_OperatorEqual(const QTime* self, QTime* other) {
|
|
|
|
return self->operator==(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QTime_OperatorNotEqual(const QTime* self, QTime* other) {
|
|
|
|
return self->operator!=(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QTime_OperatorLesser(const QTime* self, QTime* other) {
|
|
|
|
return self->operator<(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QTime_OperatorLesserOrEqual(const QTime* self, QTime* other) {
|
|
|
|
return self->operator<=(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QTime_OperatorGreater(const QTime* self, QTime* other) {
|
|
|
|
return self->operator>(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QTime_OperatorGreaterOrEqual(const QTime* self, QTime* other) {
|
|
|
|
return self->operator>=(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QTime* QTime_FromMSecsSinceStartOfDay(int msecs) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QTime _ret = QTime::fromMSecsSinceStartOfDay(static_cast<int>(msecs));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QTime*>(new QTime(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QTime_MsecsSinceStartOfDay(const QTime* self) {
|
|
|
|
return self->msecsSinceStartOfDay();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QTime* QTime_CurrentTime() {
|
2024-09-14 22:29:05 +00:00
|
|
|
QTime _ret = QTime::currentTime();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QTime*>(new QTime(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
QTime* QTime_FromString(struct miqt_string* s) {
|
|
|
|
QString s_QString = QString::fromUtf8(&s->data, s->len);
|
|
|
|
QTime _ret = QTime::fromString(s_QString);
|
2024-08-29 07:01:51 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QTime*>(new QTime(_ret));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
QTime* QTime_FromString2(struct miqt_string* s, struct miqt_string* format) {
|
|
|
|
QString s_QString = QString::fromUtf8(&s->data, s->len);
|
|
|
|
QString format_QString = QString::fromUtf8(&format->data, format->len);
|
|
|
|
QTime _ret = QTime::fromString(s_QString, format_QString);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QTime*>(new QTime(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool QTime_IsValid2(int h, int m, int s) {
|
|
|
|
return QTime::isValid(static_cast<int>(h), static_cast<int>(m), static_cast<int>(s));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTime_Start(QTime* self) {
|
|
|
|
self->start();
|
|
|
|
}
|
|
|
|
|
|
|
|
int QTime_Restart(QTime* self) {
|
|
|
|
return self->restart();
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QTime_Elapsed(const QTime* self) {
|
|
|
|
return self->elapsed();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QTime_ToString1(const QTime* self, uintptr_t f) {
|
|
|
|
QString _ret = self->toString(static_cast<Qt::DateFormat>(f));
|
2024-08-29 07:01:51 +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
|
|
|
}
|
|
|
|
|
|
|
|
bool QTime_SetHMS4(QTime* self, int h, int m, int s, int ms) {
|
|
|
|
return self->setHMS(static_cast<int>(h), static_cast<int>(m), static_cast<int>(s), static_cast<int>(ms));
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
QTime* QTime_FromString22(struct miqt_string* s, uintptr_t f) {
|
|
|
|
QString s_QString = QString::fromUtf8(&s->data, s->len);
|
|
|
|
QTime _ret = QTime::fromString(s_QString, static_cast<Qt::DateFormat>(f));
|
2024-08-29 07:01:51 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QTime*>(new QTime(_ret));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
bool QTime_IsValid4(int h, int m, int s, int ms) {
|
|
|
|
return QTime::isValid(static_cast<int>(h), static_cast<int>(m), static_cast<int>(s), static_cast<int>(ms));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTime_Delete(QTime* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|
|
|
|
QDateTime* QDateTime_new(QDate* param1) {
|
|
|
|
return new QDateTime(*param1);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QDateTime* QDateTime_new2(QDate* param1, QTime* param2) {
|
|
|
|
return new QDateTime(*param1, *param2);
|
|
|
|
}
|
|
|
|
|
|
|
|
QDateTime* QDateTime_new3(QDate* date, QTime* time, uintptr_t spec, int offsetSeconds) {
|
|
|
|
return new QDateTime(*date, *time, static_cast<Qt::TimeSpec>(spec), static_cast<int>(offsetSeconds));
|
|
|
|
}
|
|
|
|
|
|
|
|
QDateTime* QDateTime_new4(QDate* date, QTime* time, QTimeZone* timeZone) {
|
2024-08-25 04:08:24 +00:00
|
|
|
return new QDateTime(*date, *time, *timeZone);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QDateTime* QDateTime_new5(QDateTime* other) {
|
2024-08-25 04:08:24 +00:00
|
|
|
return new QDateTime(*other);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QDateTime* QDateTime_new6(QDate* param1, QTime* param2, uintptr_t spec) {
|
|
|
|
return new QDateTime(*param1, *param2, static_cast<Qt::TimeSpec>(spec));
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QDateTime_OperatorAssign(QDateTime* self, QDateTime* other) {
|
|
|
|
self->operator=(*other);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDateTime_Swap(QDateTime* self, QDateTime* other) {
|
|
|
|
self->swap(*other);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QDateTime_IsNull(const QDateTime* self) {
|
|
|
|
return self->isNull();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QDateTime_IsValid(const QDateTime* self) {
|
|
|
|
return self->isValid();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QDate* QDateTime_Date(const QDateTime* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDate _ret = self->date();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDate*>(new QDate(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QTime* QDateTime_Time(const QDateTime* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QTime _ret = self->time();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QTime*>(new QTime(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
uintptr_t QDateTime_TimeSpec(const QDateTime* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
Qt::TimeSpec _ret = self->timeSpec();
|
|
|
|
return static_cast<uintptr_t>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QDateTime_OffsetFromUtc(const QDateTime* self) {
|
|
|
|
return self->offsetFromUtc();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QTimeZone* QDateTime_TimeZone(const QDateTime* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QTimeZone _ret = self->timeZone();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QTimeZone*>(new QTimeZone(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QDateTime_TimeZoneAbbreviation(const QDateTime* self) {
|
|
|
|
QString _ret = self->timeZoneAbbreviation();
|
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 QDateTime_IsDaylightTime(const QDateTime* self) {
|
|
|
|
return self->isDaylightTime();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
long long QDateTime_ToMSecsSinceEpoch(const QDateTime* self) {
|
|
|
|
return self->toMSecsSinceEpoch();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
long long QDateTime_ToSecsSinceEpoch(const QDateTime* self) {
|
|
|
|
return self->toSecsSinceEpoch();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QDateTime_SetDate(QDateTime* self, QDate* date) {
|
|
|
|
self->setDate(*date);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDateTime_SetTime(QDateTime* self, QTime* time) {
|
|
|
|
self->setTime(*time);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QDateTime_SetTimeSpec(QDateTime* self, uintptr_t spec) {
|
|
|
|
self->setTimeSpec(static_cast<Qt::TimeSpec>(spec));
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QDateTime_SetOffsetFromUtc(QDateTime* self, int offsetSeconds) {
|
|
|
|
self->setOffsetFromUtc(static_cast<int>(offsetSeconds));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDateTime_SetTimeZone(QDateTime* self, QTimeZone* toZone) {
|
|
|
|
self->setTimeZone(*toZone);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QDateTime_SetMSecsSinceEpoch(QDateTime* self, long long msecs) {
|
|
|
|
self->setMSecsSinceEpoch(static_cast<qint64>(msecs));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QDateTime_SetSecsSinceEpoch(QDateTime* self, long long secs) {
|
|
|
|
self->setSecsSinceEpoch(static_cast<qint64>(secs));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QDateTime_ToString(const QDateTime* self) {
|
|
|
|
QString _ret = self->toString();
|
2024-08-29 07:01:51 +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-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QDateTime_ToStringWithFormat(const QDateTime* self, struct miqt_string* format) {
|
|
|
|
QString format_QString = QString::fromUtf8(&format->data, format->len);
|
|
|
|
QString _ret = self->toString(format_QString);
|
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* QDateTime_ToString2(const QDateTime* self, struct miqt_string* format, QCalendar* cal) {
|
|
|
|
QString format_QString = QString::fromUtf8(&format->data, format->len);
|
|
|
|
QString _ret = self->toString(format_QString, *cal);
|
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
|
|
|
QDateTime* QDateTime_AddDays(const QDateTime* self, long long days) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = self->addDays(static_cast<qint64>(days));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QDateTime* QDateTime_AddMonths(const QDateTime* self, int months) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = self->addMonths(static_cast<int>(months));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QDateTime* QDateTime_AddYears(const QDateTime* self, int years) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = self->addYears(static_cast<int>(years));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QDateTime* QDateTime_AddSecs(const QDateTime* self, long long secs) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = self->addSecs(static_cast<qint64>(secs));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QDateTime* QDateTime_AddMSecs(const QDateTime* self, long long msecs) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = self->addMSecs(static_cast<qint64>(msecs));
|
2024-08-29 07:01:51 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QDateTime* QDateTime_ToTimeSpec(const QDateTime* self, uintptr_t spec) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = self->toTimeSpec(static_cast<Qt::TimeSpec>(spec));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QDateTime* QDateTime_ToLocalTime(const QDateTime* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = self->toLocalTime();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QDateTime* QDateTime_ToUTC(const QDateTime* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = self->toUTC();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QDateTime* QDateTime_ToOffsetFromUtc(const QDateTime* self, int offsetSeconds) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = self->toOffsetFromUtc(static_cast<int>(offsetSeconds));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QDateTime* QDateTime_ToTimeZone(const QDateTime* self, QTimeZone* toZone) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = self->toTimeZone(*toZone);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
long long QDateTime_DaysTo(const QDateTime* self, QDateTime* param1) {
|
|
|
|
return self->daysTo(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
long long QDateTime_SecsTo(const QDateTime* self, QDateTime* param1) {
|
|
|
|
return self->secsTo(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
long long QDateTime_MsecsTo(const QDateTime* self, QDateTime* param1) {
|
|
|
|
return self->msecsTo(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QDateTime_OperatorEqual(const QDateTime* self, QDateTime* other) {
|
|
|
|
return self->operator==(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QDateTime_OperatorNotEqual(const QDateTime* self, QDateTime* other) {
|
|
|
|
return self->operator!=(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QDateTime_OperatorLesser(const QDateTime* self, QDateTime* other) {
|
|
|
|
return self->operator<(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QDateTime_OperatorLesserOrEqual(const QDateTime* self, QDateTime* other) {
|
|
|
|
return self->operator<=(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QDateTime_OperatorGreater(const QDateTime* self, QDateTime* other) {
|
|
|
|
return self->operator>(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QDateTime_OperatorGreaterOrEqual(const QDateTime* self, QDateTime* other) {
|
|
|
|
return self->operator>=(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QDateTime_SetUtcOffset(QDateTime* self, int seconds) {
|
|
|
|
self->setUtcOffset(static_cast<int>(seconds));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QDateTime_UtcOffset(const QDateTime* self) {
|
|
|
|
return self->utcOffset();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QDateTime* QDateTime_CurrentDateTime() {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = QDateTime::currentDateTime();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QDateTime* QDateTime_CurrentDateTimeUtc() {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = QDateTime::currentDateTimeUtc();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime* QDateTime_FromString(struct miqt_string* s) {
|
|
|
|
QString s_QString = QString::fromUtf8(&s->data, s->len);
|
|
|
|
QDateTime _ret = QDateTime::fromString(s_QString);
|
2024-08-29 07:01:51 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime* QDateTime_FromString2(struct miqt_string* s, struct miqt_string* format) {
|
|
|
|
QString s_QString = QString::fromUtf8(&s->data, s->len);
|
|
|
|
QString format_QString = QString::fromUtf8(&format->data, format->len);
|
|
|
|
QDateTime _ret = QDateTime::fromString(s_QString, format_QString);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime* QDateTime_FromString3(struct miqt_string* s, struct miqt_string* format, QCalendar* cal) {
|
|
|
|
QString s_QString = QString::fromUtf8(&s->data, s->len);
|
|
|
|
QString format_QString = QString::fromUtf8(&format->data, format->len);
|
|
|
|
QDateTime _ret = QDateTime::fromString(s_QString, format_QString, *cal);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
unsigned int QDateTime_ToTimeT(const QDateTime* self) {
|
|
|
|
return self->toTime_t();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QDateTime_SetTimeT(QDateTime* self, unsigned int secsSince1Jan1970UTC) {
|
|
|
|
self->setTime_t(static_cast<uint>(secsSince1Jan1970UTC));
|
|
|
|
}
|
|
|
|
|
|
|
|
QDateTime* QDateTime_FromTimeT(unsigned int secsSince1Jan1970UTC) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = QDateTime::fromTime_t(static_cast<uint>(secsSince1Jan1970UTC));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QDateTime* QDateTime_FromTimeT2(unsigned int secsSince1Jan1970UTC, uintptr_t spec) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = QDateTime::fromTime_t(static_cast<uint>(secsSince1Jan1970UTC), static_cast<Qt::TimeSpec>(spec));
|
2024-08-29 07:01:51 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QDateTime* QDateTime_FromTimeT3(unsigned int secsSince1Jan1970UTC, QTimeZone* timeZone) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = QDateTime::fromTime_t(static_cast<uint>(secsSince1Jan1970UTC), *timeZone);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QDateTime* QDateTime_FromMSecsSinceEpoch(long long msecs) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = QDateTime::fromMSecsSinceEpoch(static_cast<qint64>(msecs));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QDateTime* QDateTime_FromMSecsSinceEpoch2(long long msecs, uintptr_t spec) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = QDateTime::fromMSecsSinceEpoch(static_cast<qint64>(msecs), static_cast<Qt::TimeSpec>(spec));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QDateTime* QDateTime_FromSecsSinceEpoch(long long secs) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = QDateTime::fromSecsSinceEpoch(static_cast<qint64>(secs));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QDateTime* QDateTime_FromMSecsSinceEpoch3(long long msecs, QTimeZone* timeZone) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = QDateTime::fromMSecsSinceEpoch(static_cast<qint64>(msecs), *timeZone);
|
2024-08-29 07:01:51 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QDateTime* QDateTime_FromSecsSinceEpoch2(long long secs, QTimeZone* timeZone) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = QDateTime::fromSecsSinceEpoch(static_cast<qint64>(secs), *timeZone);
|
2024-08-29 07:01:51 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
long long QDateTime_CurrentMSecsSinceEpoch() {
|
2024-08-25 04:08:24 +00:00
|
|
|
return QDateTime::currentMSecsSinceEpoch();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
long long QDateTime_CurrentSecsSinceEpoch() {
|
2024-08-25 04:08:24 +00:00
|
|
|
return QDateTime::currentSecsSinceEpoch();
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QDateTime_ToString1(const QDateTime* self, uintptr_t format) {
|
|
|
|
QString _ret = self->toString(static_cast<Qt::DateFormat>(format));
|
2024-08-29 07:01:51 +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-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime* QDateTime_FromString22(struct miqt_string* s, uintptr_t f) {
|
|
|
|
QString s_QString = QString::fromUtf8(&s->data, s->len);
|
|
|
|
QDateTime _ret = QDateTime::fromString(s_QString, static_cast<Qt::DateFormat>(f));
|
2024-08-29 07:01:51 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QDateTime* QDateTime_FromTimeT32(unsigned int secsSince1Jan1970UTC, uintptr_t spec, int offsetFromUtc) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = QDateTime::fromTime_t(static_cast<uint>(secsSince1Jan1970UTC), static_cast<Qt::TimeSpec>(spec), static_cast<int>(offsetFromUtc));
|
2024-08-29 07:01:51 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QDateTime* QDateTime_FromMSecsSinceEpoch32(long long msecs, uintptr_t spec, int offsetFromUtc) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = QDateTime::fromMSecsSinceEpoch(static_cast<qint64>(msecs), static_cast<Qt::TimeSpec>(spec), static_cast<int>(offsetFromUtc));
|
2024-08-29 07:01:51 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QDateTime* QDateTime_FromSecsSinceEpoch22(long long secs, uintptr_t spe) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = QDateTime::fromSecsSinceEpoch(static_cast<qint64>(secs), static_cast<Qt::TimeSpec>(spe));
|
2024-08-29 07:01:51 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QDateTime* QDateTime_FromSecsSinceEpoch3(long long secs, uintptr_t spe, int offsetFromUtc) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDateTime _ret = QDateTime::fromSecsSinceEpoch(static_cast<qint64>(secs), static_cast<Qt::TimeSpec>(spe), static_cast<int>(offsetFromUtc));
|
2024-08-29 07:01:51 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QDateTime*>(new QDateTime(_ret));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QDateTime_Delete(QDateTime* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|