2024-10-20 05:21:03 +00:00
|
|
|
#include <QCalendar>
|
|
|
|
#include <QDate>
|
|
|
|
#include <QDateTime>
|
|
|
|
#include <QList>
|
|
|
|
#include <QLocale>
|
|
|
|
#include <QString>
|
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
|
|
|
#include <QTime>
|
|
|
|
#include <qlocale.h>
|
|
|
|
#include "gen_qlocale.h"
|
|
|
|
#include "_cgo_export.h"
|
|
|
|
|
|
|
|
QLocale* QLocale_new() {
|
|
|
|
return new QLocale();
|
|
|
|
}
|
|
|
|
|
|
|
|
QLocale* QLocale_new2(struct miqt_string name) {
|
|
|
|
QString name_QString = QString::fromUtf8(name.data, name.len);
|
|
|
|
return new QLocale(name_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
QLocale* QLocale_new3(uint16_t language, uint16_t territory) {
|
|
|
|
return new QLocale(static_cast<QLocale::Language>(language), static_cast<QLocale::Territory>(territory));
|
|
|
|
}
|
|
|
|
|
|
|
|
QLocale* QLocale_new4(uint16_t language) {
|
|
|
|
return new QLocale(static_cast<QLocale::Language>(language));
|
|
|
|
}
|
|
|
|
|
|
|
|
QLocale* QLocale_new5(QLocale* other) {
|
|
|
|
return new QLocale(*other);
|
|
|
|
}
|
|
|
|
|
|
|
|
QLocale* QLocale_new6(uint16_t language, uint16_t script) {
|
|
|
|
return new QLocale(static_cast<QLocale::Language>(language), static_cast<QLocale::Script>(script));
|
|
|
|
}
|
|
|
|
|
|
|
|
QLocale* QLocale_new7(uint16_t language, uint16_t script, uint16_t territory) {
|
|
|
|
return new QLocale(static_cast<QLocale::Language>(language), static_cast<QLocale::Script>(script), static_cast<QLocale::Territory>(territory));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLocale_OperatorAssign(QLocale* self, QLocale* other) {
|
|
|
|
self->operator=(*other);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLocale_Swap(QLocale* self, QLocale* other) {
|
|
|
|
self->swap(*other);
|
|
|
|
}
|
|
|
|
|
|
|
|
uint16_t QLocale_Language(const QLocale* self) {
|
|
|
|
QLocale::Language _ret = self->language();
|
|
|
|
return static_cast<uint16_t>(_ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
uint16_t QLocale_Script(const QLocale* self) {
|
|
|
|
QLocale::Script _ret = self->script();
|
|
|
|
return static_cast<uint16_t>(_ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
uint16_t QLocale_Territory(const QLocale* self) {
|
|
|
|
QLocale::Territory _ret = self->territory();
|
|
|
|
return static_cast<uint16_t>(_ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
uint16_t QLocale_Country(const QLocale* self) {
|
|
|
|
QLocale::Country _ret = self->country();
|
|
|
|
return static_cast<uint16_t>(_ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_Name(const QLocale* self) {
|
|
|
|
QString _ret = self->name();
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_Bcp47Name(const QLocale* self) {
|
|
|
|
QString _ret = self->bcp47Name();
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_NativeLanguageName(const QLocale* self) {
|
|
|
|
QString _ret = self->nativeLanguageName();
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_NativeTerritoryName(const QLocale* self) {
|
|
|
|
QString _ret = self->nativeTerritoryName();
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_NativeCountryName(const QLocale* self) {
|
|
|
|
QString _ret = self->nativeCountryName();
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
int16_t QLocale_ToShort(const QLocale* self, struct miqt_string s) {
|
|
|
|
QString s_QString = QString::fromUtf8(s.data, s.len);
|
|
|
|
return self->toShort(s_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
uint16_t QLocale_ToUShort(const QLocale* self, struct miqt_string s) {
|
|
|
|
QString s_QString = QString::fromUtf8(s.data, s.len);
|
|
|
|
ushort _ret = self->toUShort(s_QString);
|
|
|
|
return static_cast<uint16_t>(_ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
int QLocale_ToInt(const QLocale* self, struct miqt_string s) {
|
|
|
|
QString s_QString = QString::fromUtf8(s.data, s.len);
|
|
|
|
return self->toInt(s_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned int QLocale_ToUInt(const QLocale* self, struct miqt_string s) {
|
|
|
|
QString s_QString = QString::fromUtf8(s.data, s.len);
|
|
|
|
uint _ret = self->toUInt(s_QString);
|
|
|
|
return static_cast<unsigned int>(_ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
long QLocale_ToLong(const QLocale* self, struct miqt_string s) {
|
|
|
|
QString s_QString = QString::fromUtf8(s.data, s.len);
|
|
|
|
return self->toLong(s_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned long QLocale_ToULong(const QLocale* self, struct miqt_string s) {
|
|
|
|
QString s_QString = QString::fromUtf8(s.data, s.len);
|
|
|
|
ulong _ret = self->toULong(s_QString);
|
|
|
|
return static_cast<unsigned long>(_ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
long long QLocale_ToLongLong(const QLocale* self, struct miqt_string s) {
|
|
|
|
QString s_QString = QString::fromUtf8(s.data, s.len);
|
|
|
|
qlonglong _ret = self->toLongLong(s_QString);
|
|
|
|
return static_cast<long long>(_ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned long long QLocale_ToULongLong(const QLocale* self, struct miqt_string s) {
|
|
|
|
QString s_QString = QString::fromUtf8(s.data, s.len);
|
|
|
|
qulonglong _ret = self->toULongLong(s_QString);
|
|
|
|
return static_cast<unsigned long long>(_ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
float QLocale_ToFloat(const QLocale* self, struct miqt_string s) {
|
|
|
|
QString s_QString = QString::fromUtf8(s.data, s.len);
|
|
|
|
return self->toFloat(s_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
double QLocale_ToDouble(const QLocale* self, struct miqt_string s) {
|
|
|
|
QString s_QString = QString::fromUtf8(s.data, s.len);
|
|
|
|
return self->toDouble(s_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToString(const QLocale* self, long long i) {
|
|
|
|
QString _ret = self->toString(static_cast<qlonglong>(i));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToStringWithQulonglong(const QLocale* self, unsigned long long i) {
|
|
|
|
QString _ret = self->toString(static_cast<qulonglong>(i));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToStringWithLong(const QLocale* self, long i) {
|
|
|
|
QString _ret = self->toString(static_cast<long>(i));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToStringWithUlong(const QLocale* self, unsigned long i) {
|
|
|
|
QString _ret = self->toString(static_cast<ulong>(i));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToStringWithShort(const QLocale* self, int16_t i) {
|
|
|
|
QString _ret = self->toString(static_cast<short>(i));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToStringWithUshort(const QLocale* self, uint16_t i) {
|
|
|
|
QString _ret = self->toString(static_cast<ushort>(i));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToStringWithInt(const QLocale* self, int i) {
|
|
|
|
QString _ret = self->toString(static_cast<int>(i));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToStringWithUint(const QLocale* self, unsigned int i) {
|
|
|
|
QString _ret = self->toString(static_cast<uint>(i));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToStringWithDouble(const QLocale* self, double f) {
|
|
|
|
QString _ret = self->toString(static_cast<double>(f));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToStringWithFloat(const QLocale* self, float f) {
|
|
|
|
QString _ret = self->toString(static_cast<float>(f));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToString2(const QLocale* self, QDate* date, struct miqt_string format) {
|
|
|
|
QString format_QString = QString::fromUtf8(format.data, format.len);
|
|
|
|
QString _ret = self->toString(*date, format_QString);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToString3(const QLocale* self, QTime* time, struct miqt_string format) {
|
|
|
|
QString format_QString = QString::fromUtf8(format.data, format.len);
|
|
|
|
QString _ret = self->toString(*time, format_QString);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToString4(const QLocale* self, QDateTime* dateTime, struct miqt_string format) {
|
|
|
|
QString format_QString = QString::fromUtf8(format.data, format.len);
|
|
|
|
QString _ret = self->toString(*dateTime, format_QString);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToStringWithDate(const QLocale* self, QDate* date) {
|
|
|
|
QString _ret = self->toString(*date);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToStringWithTime(const QLocale* self, QTime* time) {
|
|
|
|
QString _ret = self->toString(*time);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToStringWithDateTime(const QLocale* self, QDateTime* dateTime) {
|
|
|
|
QString _ret = self->toString(*dateTime);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToString9(const QLocale* self, QDate* date, int format, QCalendar* cal) {
|
|
|
|
QString _ret = self->toString(*date, static_cast<QLocale::FormatType>(format), *cal);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToString10(const QLocale* self, QDateTime* dateTime, int format, QCalendar* cal) {
|
|
|
|
QString _ret = self->toString(*dateTime, static_cast<QLocale::FormatType>(format), *cal);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_DateFormat(const QLocale* self) {
|
|
|
|
QString _ret = self->dateFormat();
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_TimeFormat(const QLocale* self) {
|
|
|
|
QString _ret = self->timeFormat();
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_DateTimeFormat(const QLocale* self) {
|
|
|
|
QString _ret = self->dateTimeFormat();
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
QDate* QLocale_ToDate(const QLocale* self, struct miqt_string stringVal) {
|
|
|
|
QString stringVal_QString = QString::fromUtf8(stringVal.data, stringVal.len);
|
|
|
|
return new QDate(self->toDate(stringVal_QString));
|
|
|
|
}
|
|
|
|
|
|
|
|
QTime* QLocale_ToTime(const QLocale* self, struct miqt_string stringVal) {
|
|
|
|
QString stringVal_QString = QString::fromUtf8(stringVal.data, stringVal.len);
|
|
|
|
return new QTime(self->toTime(stringVal_QString));
|
|
|
|
}
|
|
|
|
|
|
|
|
QDateTime* QLocale_ToDateTime(const QLocale* self, struct miqt_string stringVal) {
|
|
|
|
QString stringVal_QString = QString::fromUtf8(stringVal.data, stringVal.len);
|
|
|
|
return new QDateTime(self->toDateTime(stringVal_QString));
|
|
|
|
}
|
|
|
|
|
|
|
|
QDate* QLocale_ToDate2(const QLocale* self, struct miqt_string stringVal, struct miqt_string format) {
|
|
|
|
QString stringVal_QString = QString::fromUtf8(stringVal.data, stringVal.len);
|
|
|
|
QString format_QString = QString::fromUtf8(format.data, format.len);
|
|
|
|
return new QDate(self->toDate(stringVal_QString, format_QString));
|
|
|
|
}
|
|
|
|
|
|
|
|
QTime* QLocale_ToTime2(const QLocale* self, struct miqt_string stringVal, struct miqt_string format) {
|
|
|
|
QString stringVal_QString = QString::fromUtf8(stringVal.data, stringVal.len);
|
|
|
|
QString format_QString = QString::fromUtf8(format.data, format.len);
|
|
|
|
return new QTime(self->toTime(stringVal_QString, format_QString));
|
|
|
|
}
|
|
|
|
|
|
|
|
QDateTime* QLocale_ToDateTime2(const QLocale* self, struct miqt_string stringVal, struct miqt_string format) {
|
|
|
|
QString stringVal_QString = QString::fromUtf8(stringVal.data, stringVal.len);
|
|
|
|
QString format_QString = QString::fromUtf8(format.data, format.len);
|
|
|
|
return new QDateTime(self->toDateTime(stringVal_QString, format_QString));
|
|
|
|
}
|
|
|
|
|
|
|
|
QDate* QLocale_ToDate3(const QLocale* self, struct miqt_string stringVal, int format, QCalendar* cal) {
|
|
|
|
QString stringVal_QString = QString::fromUtf8(stringVal.data, stringVal.len);
|
|
|
|
return new QDate(self->toDate(stringVal_QString, static_cast<QLocale::FormatType>(format), *cal));
|
|
|
|
}
|
|
|
|
|
|
|
|
QDateTime* QLocale_ToDateTime3(const QLocale* self, struct miqt_string stringVal, int format, QCalendar* cal) {
|
|
|
|
QString stringVal_QString = QString::fromUtf8(stringVal.data, stringVal.len);
|
|
|
|
return new QDateTime(self->toDateTime(stringVal_QString, static_cast<QLocale::FormatType>(format), *cal));
|
|
|
|
}
|
|
|
|
|
|
|
|
QDate* QLocale_ToDate4(const QLocale* self, struct miqt_string stringVal, struct miqt_string format, QCalendar* cal) {
|
|
|
|
QString stringVal_QString = QString::fromUtf8(stringVal.data, stringVal.len);
|
|
|
|
QString format_QString = QString::fromUtf8(format.data, format.len);
|
|
|
|
return new QDate(self->toDate(stringVal_QString, format_QString, *cal));
|
|
|
|
}
|
|
|
|
|
|
|
|
QDateTime* QLocale_ToDateTime4(const QLocale* self, struct miqt_string stringVal, struct miqt_string format, QCalendar* cal) {
|
|
|
|
QString stringVal_QString = QString::fromUtf8(stringVal.data, stringVal.len);
|
|
|
|
QString format_QString = QString::fromUtf8(format.data, format.len);
|
|
|
|
return new QDateTime(self->toDateTime(stringVal_QString, format_QString, *cal));
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_DecimalPoint(const QLocale* self) {
|
|
|
|
QString _ret = self->decimalPoint();
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_GroupSeparator(const QLocale* self) {
|
|
|
|
QString _ret = self->groupSeparator();
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_Percent(const QLocale* self) {
|
|
|
|
QString _ret = self->percent();
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ZeroDigit(const QLocale* self) {
|
|
|
|
QString _ret = self->zeroDigit();
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_NegativeSign(const QLocale* self) {
|
|
|
|
QString _ret = self->negativeSign();
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_PositiveSign(const QLocale* self) {
|
|
|
|
QString _ret = self->positiveSign();
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_Exponential(const QLocale* self) {
|
|
|
|
QString _ret = self->exponential();
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_MonthName(const QLocale* self, int param1) {
|
|
|
|
QString _ret = self->monthName(static_cast<int>(param1));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_StandaloneMonthName(const QLocale* self, int param1) {
|
|
|
|
QString _ret = self->standaloneMonthName(static_cast<int>(param1));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_DayName(const QLocale* self, int param1) {
|
|
|
|
QString _ret = self->dayName(static_cast<int>(param1));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_StandaloneDayName(const QLocale* self, int param1) {
|
|
|
|
QString _ret = self->standaloneDayName(static_cast<int>(param1));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
int QLocale_FirstDayOfWeek(const QLocale* self) {
|
|
|
|
Qt::DayOfWeek _ret = self->firstDayOfWeek();
|
|
|
|
return static_cast<int>(_ret);
|
|
|
|
}
|
|
|
|
|
2024-11-04 07:18:27 +00:00
|
|
|
struct miqt_array QLocale_Weekdays(const QLocale* self) {
|
2024-10-20 05:21:03 +00:00
|
|
|
QList<Qt::DayOfWeek> _ret = self->weekdays();
|
|
|
|
// Convert QList<> from C++ memory to manually-managed C memory
|
|
|
|
int* _arr = static_cast<int*>(malloc(sizeof(int) * _ret.length()));
|
|
|
|
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
|
|
|
Qt::DayOfWeek _lv_ret = _ret[i];
|
|
|
|
_arr[i] = static_cast<int>(_lv_ret);
|
|
|
|
}
|
2024-11-04 07:18:27 +00:00
|
|
|
struct miqt_array _out;
|
|
|
|
_out.len = _ret.length();
|
|
|
|
_out.data = static_cast<void*>(_arr);
|
2024-10-20 05:21:03 +00:00
|
|
|
return _out;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_AmText(const QLocale* self) {
|
|
|
|
QString _ret = self->amText();
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_PmText(const QLocale* self) {
|
|
|
|
QString _ret = self->pmText();
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
int QLocale_MeasurementSystem(const QLocale* self) {
|
|
|
|
QLocale::MeasurementSystem _ret = self->measurementSystem();
|
|
|
|
return static_cast<int>(_ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
QLocale* QLocale_Collation(const QLocale* self) {
|
|
|
|
return new QLocale(self->collation());
|
|
|
|
}
|
|
|
|
|
|
|
|
int QLocale_TextDirection(const QLocale* self) {
|
|
|
|
Qt::LayoutDirection _ret = self->textDirection();
|
|
|
|
return static_cast<int>(_ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToUpper(const QLocale* self, struct miqt_string str) {
|
|
|
|
QString str_QString = QString::fromUtf8(str.data, str.len);
|
|
|
|
QString _ret = self->toUpper(str_QString);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToLower(const QLocale* self, struct miqt_string str) {
|
|
|
|
QString str_QString = QString::fromUtf8(str.data, str.len);
|
|
|
|
QString _ret = self->toLower(str_QString);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_CurrencySymbol(const QLocale* self) {
|
|
|
|
QString _ret = self->currencySymbol();
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToCurrencyString(const QLocale* self, long long param1) {
|
|
|
|
QString _ret = self->toCurrencyString(static_cast<qlonglong>(param1));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToCurrencyStringWithQulonglong(const QLocale* self, unsigned long long param1) {
|
|
|
|
QString _ret = self->toCurrencyString(static_cast<qulonglong>(param1));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToCurrencyStringWithShort(const QLocale* self, int16_t i) {
|
|
|
|
QString _ret = self->toCurrencyString(static_cast<short>(i));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToCurrencyStringWithUshort(const QLocale* self, uint16_t i) {
|
|
|
|
QString _ret = self->toCurrencyString(static_cast<ushort>(i));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToCurrencyStringWithInt(const QLocale* self, int i) {
|
|
|
|
QString _ret = self->toCurrencyString(static_cast<int>(i));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToCurrencyStringWithUint(const QLocale* self, unsigned int i) {
|
|
|
|
QString _ret = self->toCurrencyString(static_cast<uint>(i));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToCurrencyStringWithDouble(const QLocale* self, double param1) {
|
|
|
|
QString _ret = self->toCurrencyString(static_cast<double>(param1));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToCurrencyStringWithFloat(const QLocale* self, float i) {
|
|
|
|
QString _ret = self->toCurrencyString(static_cast<float>(i));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_FormattedDataSize(const QLocale* self, long long bytes) {
|
|
|
|
QString _ret = self->formattedDataSize(static_cast<qint64>(bytes));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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-11-04 07:18:27 +00:00
|
|
|
struct miqt_array QLocale_UiLanguages(const QLocale* self) {
|
2024-10-20 05:21:03 +00:00
|
|
|
QStringList _ret = self->uiLanguages();
|
|
|
|
// Convert QList<> from C++ memory to manually-managed C memory
|
|
|
|
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
|
|
|
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
|
|
|
QString _lv_ret = _ret[i];
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _lv_b = _lv_ret.toUtf8();
|
|
|
|
struct miqt_string _lv_ms;
|
|
|
|
_lv_ms.len = _lv_b.length();
|
|
|
|
_lv_ms.data = static_cast<char*>(malloc(_lv_ms.len));
|
|
|
|
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
|
|
|
_arr[i] = _lv_ms;
|
|
|
|
}
|
2024-11-04 07:18:27 +00:00
|
|
|
struct miqt_array _out;
|
|
|
|
_out.len = _ret.length();
|
|
|
|
_out.data = static_cast<void*>(_arr);
|
2024-10-20 05:21:03 +00:00
|
|
|
return _out;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_LanguageToCode(uint16_t language) {
|
|
|
|
QString _ret = QLocale::languageToCode(static_cast<QLocale::Language>(language));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_TerritoryToCode(uint16_t territory) {
|
|
|
|
QString _ret = QLocale::territoryToCode(static_cast<QLocale::Territory>(territory));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_CountryToCode(uint16_t country) {
|
|
|
|
QString _ret = QLocale::countryToCode(static_cast<QLocale::Country>(country));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ScriptToCode(uint16_t script) {
|
|
|
|
QString _ret = QLocale::scriptToCode(static_cast<QLocale::Script>(script));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_LanguageToString(uint16_t language) {
|
|
|
|
QString _ret = QLocale::languageToString(static_cast<QLocale::Language>(language));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_TerritoryToString(uint16_t territory) {
|
|
|
|
QString _ret = QLocale::territoryToString(static_cast<QLocale::Territory>(territory));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_CountryToString(uint16_t country) {
|
|
|
|
QString _ret = QLocale::countryToString(static_cast<QLocale::Country>(country));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ScriptToString(uint16_t script) {
|
|
|
|
QString _ret = QLocale::scriptToString(static_cast<QLocale::Script>(script));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLocale_SetDefault(QLocale* locale) {
|
|
|
|
QLocale::setDefault(*locale);
|
|
|
|
}
|
|
|
|
|
|
|
|
QLocale* QLocale_C() {
|
|
|
|
return new QLocale(QLocale::c());
|
|
|
|
}
|
|
|
|
|
|
|
|
QLocale* QLocale_System() {
|
|
|
|
return new QLocale(QLocale::system());
|
|
|
|
}
|
|
|
|
|
2024-11-04 07:18:27 +00:00
|
|
|
struct miqt_array QLocale_MatchingLocales(uint16_t language, uint16_t script, uint16_t territory) {
|
2024-10-20 05:21:03 +00:00
|
|
|
QList<QLocale> _ret = QLocale::matchingLocales(static_cast<QLocale::Language>(language), static_cast<QLocale::Script>(script), static_cast<QLocale::Territory>(territory));
|
|
|
|
// Convert QList<> from C++ memory to manually-managed C memory
|
|
|
|
QLocale** _arr = static_cast<QLocale**>(malloc(sizeof(QLocale*) * _ret.length()));
|
|
|
|
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
|
|
|
_arr[i] = new QLocale(_ret[i]);
|
|
|
|
}
|
2024-11-04 07:18:27 +00:00
|
|
|
struct miqt_array _out;
|
|
|
|
_out.len = _ret.length();
|
|
|
|
_out.data = static_cast<void*>(_arr);
|
2024-10-20 05:21:03 +00:00
|
|
|
return _out;
|
|
|
|
}
|
|
|
|
|
2024-11-04 07:18:27 +00:00
|
|
|
struct miqt_array QLocale_CountriesForLanguage(uint16_t lang) {
|
2024-10-20 05:21:03 +00:00
|
|
|
QList<QLocale::Country> _ret = QLocale::countriesForLanguage(static_cast<QLocale::Language>(lang));
|
|
|
|
// Convert QList<> from C++ memory to manually-managed C memory
|
|
|
|
uint16_t* _arr = static_cast<uint16_t*>(malloc(sizeof(uint16_t) * _ret.length()));
|
|
|
|
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
|
|
|
QLocale::Country _lv_ret = _ret[i];
|
|
|
|
_arr[i] = static_cast<uint16_t>(_lv_ret);
|
|
|
|
}
|
2024-11-04 07:18:27 +00:00
|
|
|
struct miqt_array _out;
|
|
|
|
_out.len = _ret.length();
|
|
|
|
_out.data = static_cast<void*>(_arr);
|
2024-10-20 05:21:03 +00:00
|
|
|
return _out;
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLocale_SetNumberOptions(QLocale* self, int options) {
|
|
|
|
self->setNumberOptions(static_cast<QLocale::NumberOptions>(options));
|
|
|
|
}
|
|
|
|
|
|
|
|
int QLocale_NumberOptions(const QLocale* self) {
|
|
|
|
QLocale::NumberOptions _ret = self->numberOptions();
|
|
|
|
return static_cast<int>(_ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_QuoteString(const QLocale* self, struct miqt_string str) {
|
|
|
|
QString str_QString = QString::fromUtf8(str.data, str.len);
|
|
|
|
QString _ret = self->quoteString(str_QString);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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-11-04 07:18:27 +00:00
|
|
|
struct miqt_string QLocale_CreateSeparatedList(const QLocale* self, struct miqt_array /* of struct miqt_string */ strl) {
|
2024-10-20 05:21:03 +00:00
|
|
|
QStringList strl_QList;
|
2024-11-04 07:18:27 +00:00
|
|
|
strl_QList.reserve(strl.len);
|
|
|
|
struct miqt_string* strl_arr = static_cast<struct miqt_string*>(strl.data);
|
|
|
|
for(size_t i = 0; i < strl.len; ++i) {
|
2024-10-20 05:21:03 +00:00
|
|
|
QString strl_arr_i_QString = QString::fromUtf8(strl_arr[i].data, strl_arr[i].len);
|
|
|
|
strl_QList.push_back(strl_arr_i_QString);
|
|
|
|
}
|
|
|
|
QString _ret = self->createSeparatedList(strl_QList);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
int16_t QLocale_ToShort2(const QLocale* self, struct miqt_string s, bool* ok) {
|
|
|
|
QString s_QString = QString::fromUtf8(s.data, s.len);
|
|
|
|
return self->toShort(s_QString, ok);
|
|
|
|
}
|
|
|
|
|
|
|
|
uint16_t QLocale_ToUShort2(const QLocale* self, struct miqt_string s, bool* ok) {
|
|
|
|
QString s_QString = QString::fromUtf8(s.data, s.len);
|
|
|
|
ushort _ret = self->toUShort(s_QString, ok);
|
|
|
|
return static_cast<uint16_t>(_ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
int QLocale_ToInt2(const QLocale* self, struct miqt_string s, bool* ok) {
|
|
|
|
QString s_QString = QString::fromUtf8(s.data, s.len);
|
|
|
|
return self->toInt(s_QString, ok);
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned int QLocale_ToUInt2(const QLocale* self, struct miqt_string s, bool* ok) {
|
|
|
|
QString s_QString = QString::fromUtf8(s.data, s.len);
|
|
|
|
uint _ret = self->toUInt(s_QString, ok);
|
|
|
|
return static_cast<unsigned int>(_ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
long QLocale_ToLong2(const QLocale* self, struct miqt_string s, bool* ok) {
|
|
|
|
QString s_QString = QString::fromUtf8(s.data, s.len);
|
|
|
|
return self->toLong(s_QString, ok);
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned long QLocale_ToULong2(const QLocale* self, struct miqt_string s, bool* ok) {
|
|
|
|
QString s_QString = QString::fromUtf8(s.data, s.len);
|
|
|
|
ulong _ret = self->toULong(s_QString, ok);
|
|
|
|
return static_cast<unsigned long>(_ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
long long QLocale_ToLongLong2(const QLocale* self, struct miqt_string s, bool* ok) {
|
|
|
|
QString s_QString = QString::fromUtf8(s.data, s.len);
|
|
|
|
qlonglong _ret = self->toLongLong(s_QString, ok);
|
|
|
|
return static_cast<long long>(_ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned long long QLocale_ToULongLong2(const QLocale* self, struct miqt_string s, bool* ok) {
|
|
|
|
QString s_QString = QString::fromUtf8(s.data, s.len);
|
|
|
|
qulonglong _ret = self->toULongLong(s_QString, ok);
|
|
|
|
return static_cast<unsigned long long>(_ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
float QLocale_ToFloat2(const QLocale* self, struct miqt_string s, bool* ok) {
|
|
|
|
QString s_QString = QString::fromUtf8(s.data, s.len);
|
|
|
|
return self->toFloat(s_QString, ok);
|
|
|
|
}
|
|
|
|
|
|
|
|
double QLocale_ToDouble2(const QLocale* self, struct miqt_string s, bool* ok) {
|
|
|
|
QString s_QString = QString::fromUtf8(s.data, s.len);
|
|
|
|
return self->toDouble(s_QString, ok);
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToString22(const QLocale* self, double f, char format) {
|
|
|
|
QString _ret = self->toString(static_cast<double>(f), static_cast<char>(format));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToString32(const QLocale* self, double f, char format, int precision) {
|
|
|
|
QString _ret = self->toString(static_cast<double>(f), static_cast<char>(format), static_cast<int>(precision));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToString23(const QLocale* self, float f, char format) {
|
|
|
|
QString _ret = self->toString(static_cast<float>(f), static_cast<char>(format));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToString33(const QLocale* self, float f, char format, int precision) {
|
|
|
|
QString _ret = self->toString(static_cast<float>(f), static_cast<char>(format), static_cast<int>(precision));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToString24(const QLocale* self, QDate* date, int format) {
|
|
|
|
QString _ret = self->toString(*date, static_cast<QLocale::FormatType>(format));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToString25(const QLocale* self, QTime* time, int format) {
|
|
|
|
QString _ret = self->toString(*time, static_cast<QLocale::FormatType>(format));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToString26(const QLocale* self, QDateTime* dateTime, int format) {
|
|
|
|
QString _ret = self->toString(*dateTime, static_cast<QLocale::FormatType>(format));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_DateFormat1(const QLocale* self, int format) {
|
|
|
|
QString _ret = self->dateFormat(static_cast<QLocale::FormatType>(format));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_TimeFormat1(const QLocale* self, int format) {
|
|
|
|
QString _ret = self->timeFormat(static_cast<QLocale::FormatType>(format));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_DateTimeFormat1(const QLocale* self, int format) {
|
|
|
|
QString _ret = self->dateTimeFormat(static_cast<QLocale::FormatType>(format));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
QDate* QLocale_ToDate22(const QLocale* self, struct miqt_string stringVal, int param2) {
|
|
|
|
QString stringVal_QString = QString::fromUtf8(stringVal.data, stringVal.len);
|
|
|
|
return new QDate(self->toDate(stringVal_QString, static_cast<QLocale::FormatType>(param2)));
|
|
|
|
}
|
|
|
|
|
|
|
|
QTime* QLocale_ToTime22(const QLocale* self, struct miqt_string stringVal, int param2) {
|
|
|
|
QString stringVal_QString = QString::fromUtf8(stringVal.data, stringVal.len);
|
|
|
|
return new QTime(self->toTime(stringVal_QString, static_cast<QLocale::FormatType>(param2)));
|
|
|
|
}
|
|
|
|
|
|
|
|
QDateTime* QLocale_ToDateTime22(const QLocale* self, struct miqt_string stringVal, int format) {
|
|
|
|
QString stringVal_QString = QString::fromUtf8(stringVal.data, stringVal.len);
|
|
|
|
return new QDateTime(self->toDateTime(stringVal_QString, static_cast<QLocale::FormatType>(format)));
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_MonthName2(const QLocale* self, int param1, int format) {
|
|
|
|
QString _ret = self->monthName(static_cast<int>(param1), static_cast<QLocale::FormatType>(format));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_StandaloneMonthName2(const QLocale* self, int param1, int format) {
|
|
|
|
QString _ret = self->standaloneMonthName(static_cast<int>(param1), static_cast<QLocale::FormatType>(format));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_DayName2(const QLocale* self, int param1, int format) {
|
|
|
|
QString _ret = self->dayName(static_cast<int>(param1), static_cast<QLocale::FormatType>(format));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_StandaloneDayName2(const QLocale* self, int param1, int format) {
|
|
|
|
QString _ret = self->standaloneDayName(static_cast<int>(param1), static_cast<QLocale::FormatType>(format));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_CurrencySymbol1(const QLocale* self, int param1) {
|
|
|
|
QString _ret = self->currencySymbol(static_cast<QLocale::CurrencySymbolFormat>(param1));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToCurrencyString2(const QLocale* self, long long param1, struct miqt_string symbol) {
|
|
|
|
QString symbol_QString = QString::fromUtf8(symbol.data, symbol.len);
|
|
|
|
QString _ret = self->toCurrencyString(static_cast<qlonglong>(param1), symbol_QString);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToCurrencyString22(const QLocale* self, unsigned long long param1, struct miqt_string symbol) {
|
|
|
|
QString symbol_QString = QString::fromUtf8(symbol.data, symbol.len);
|
|
|
|
QString _ret = self->toCurrencyString(static_cast<qulonglong>(param1), symbol_QString);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToCurrencyString23(const QLocale* self, int16_t i, struct miqt_string symbol) {
|
|
|
|
QString symbol_QString = QString::fromUtf8(symbol.data, symbol.len);
|
|
|
|
QString _ret = self->toCurrencyString(static_cast<short>(i), symbol_QString);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToCurrencyString24(const QLocale* self, uint16_t i, struct miqt_string symbol) {
|
|
|
|
QString symbol_QString = QString::fromUtf8(symbol.data, symbol.len);
|
|
|
|
QString _ret = self->toCurrencyString(static_cast<ushort>(i), symbol_QString);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToCurrencyString25(const QLocale* self, int i, struct miqt_string symbol) {
|
|
|
|
QString symbol_QString = QString::fromUtf8(symbol.data, symbol.len);
|
|
|
|
QString _ret = self->toCurrencyString(static_cast<int>(i), symbol_QString);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToCurrencyString26(const QLocale* self, unsigned int i, struct miqt_string symbol) {
|
|
|
|
QString symbol_QString = QString::fromUtf8(symbol.data, symbol.len);
|
|
|
|
QString _ret = self->toCurrencyString(static_cast<uint>(i), symbol_QString);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToCurrencyString27(const QLocale* self, double param1, struct miqt_string symbol) {
|
|
|
|
QString symbol_QString = QString::fromUtf8(symbol.data, symbol.len);
|
|
|
|
QString _ret = self->toCurrencyString(static_cast<double>(param1), symbol_QString);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToCurrencyString3(const QLocale* self, double param1, struct miqt_string symbol, int precision) {
|
|
|
|
QString symbol_QString = QString::fromUtf8(symbol.data, symbol.len);
|
|
|
|
QString _ret = self->toCurrencyString(static_cast<double>(param1), symbol_QString, static_cast<int>(precision));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToCurrencyString28(const QLocale* self, float i, struct miqt_string symbol) {
|
|
|
|
QString symbol_QString = QString::fromUtf8(symbol.data, symbol.len);
|
|
|
|
QString _ret = self->toCurrencyString(static_cast<float>(i), symbol_QString);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_ToCurrencyString32(const QLocale* self, float i, struct miqt_string symbol, int precision) {
|
|
|
|
QString symbol_QString = QString::fromUtf8(symbol.data, symbol.len);
|
|
|
|
QString _ret = self->toCurrencyString(static_cast<float>(i), symbol_QString, static_cast<int>(precision));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_FormattedDataSize2(const QLocale* self, long long bytes, int precision) {
|
|
|
|
QString _ret = self->formattedDataSize(static_cast<qint64>(bytes), static_cast<int>(precision));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_FormattedDataSize3(const QLocale* self, long long bytes, int precision, int format) {
|
|
|
|
QString _ret = self->formattedDataSize(static_cast<qint64>(bytes), static_cast<int>(precision), static_cast<QLocale::DataSizeFormats>(format));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_LanguageToCode2(uint16_t language, int codeTypes) {
|
|
|
|
QString _ret = QLocale::languageToCode(static_cast<QLocale::Language>(language), static_cast<QLocale::LanguageCodeTypes>(codeTypes));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QLocale_QuoteString2(const QLocale* self, struct miqt_string str, int style) {
|
|
|
|
QString str_QString = QString::fromUtf8(str.data, str.len);
|
|
|
|
QString _ret = self->quoteString(str_QString, static_cast<QLocale::QuotationStyle>(style));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLocale_Delete(QLocale* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|