From ad635b2b38c551509bc9e88f608f063a1fe74aa7 Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 4 Jan 2025 12:18:54 +1300 Subject: [PATCH 1/6] genbindings: support conversion operators --- cmd/genbindings/clang2il.go | 3 ++- cmd/genbindings/intermediate.go | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmd/genbindings/clang2il.go b/cmd/genbindings/clang2il.go index d465d513..6c5fca35 100644 --- a/cmd/genbindings/clang2il.go +++ b/cmd/genbindings/clang2il.go @@ -421,7 +421,8 @@ nextMethod: continue } - case "CXXMethodDecl": + case "CXXMethodDecl", + "CXXConversionDecl": // e.g. `QColor::operator QVariant()` // Method methodName, ok := node["name"].(string) diff --git a/cmd/genbindings/intermediate.go b/cmd/genbindings/intermediate.go index 9346f788..6f0f4fb3 100644 --- a/cmd/genbindings/intermediate.go +++ b/cmd/genbindings/intermediate.go @@ -308,6 +308,11 @@ func (nm CppMethod) SafeMethodName() string { // languages. Replace more specific cases first replacer := strings.NewReplacer( + // `operator ` with a trailing space only occurs in conversion operators + // Add a fake _ here, but it will be replaced with camelcase in the regex below + `operator `, `To `, + `::`, `__`, // e.g. `operator QCborError::Code` + `==`, `Equal`, `!=`, `NotEqual`, `>=`, `GreaterOrEqual`, @@ -342,7 +347,12 @@ func (nm CppMethod) SafeMethodName() string { // Also make the first letter uppercase so it becomes public in Go tmp = titleCase(tmp) + // Replace spaces (e.g. `operator long long` with CamelCase + tmp = regexp.MustCompile(` ([a-zA-Z])`).ReplaceAllStringFunc(tmp, func(match string) string { return strings.ToUpper(match[1:]) }) + // Also replace any underscore_case with CamelCase + // Only catch lowercase letters in this one, not uppercase, as it causes a + // lot of churn for Scintilla tmp = regexp.MustCompile(`_([a-z])`).ReplaceAllStringFunc(tmp, func(match string) string { return strings.ToUpper(match[1:]) }) return tmp From 81dd216f13acf4e732e287639837872762ce718d Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 4 Jan 2025 12:46:43 +1300 Subject: [PATCH 2/6] genbindings: add qfloat16 exceptions --- cmd/genbindings/config-allowlist.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmd/genbindings/config-allowlist.go b/cmd/genbindings/config-allowlist.go index 53d48d35..3b07a6db 100644 --- a/cmd/genbindings/config-allowlist.go +++ b/cmd/genbindings/config-allowlist.go @@ -293,6 +293,14 @@ func AllowMethod(className string, mm CppMethod) error { return ErrTooComplex } + if className == "qfloat16" && mm.MethodName == "operator float" { + // Present in Qt 5 and Qt 6.4, but in 6.5++ the declaration is conditional on QFLOAT16_IS_NATIVE + // In that case it becomes `operator std::float16_t` or `operator _Float16` depending on your + // compiler + // A proper fix here would be to reproject qfloat16 as std::float16_t (?) in all cases + return ErrTooComplex + } + return nil // OK, allow } From 913d4886ce16d6f6bb93c29d143c1cac9f7a24c4 Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 4 Jan 2025 12:19:04 +1300 Subject: [PATCH 3/6] qt: rebuild (add conversion operators) --- qt/cbor/gen_qcborcommon.cpp | 5 +++++ qt/cbor/gen_qcborcommon.go | 4 ++++ qt/cbor/gen_qcborcommon.h | 1 + qt/cbor/gen_qcborvalue.cpp | 4 ++++ qt/cbor/gen_qcborvalue.go | 6 ++++++ qt/cbor/gen_qcborvalue.h | 1 + qt/gen_qabstractitemmodel.cpp | 6 ++++++ qt/gen_qabstractitemmodel.go | 4 ++++ qt/gen_qabstractitemmodel.h | 1 + qt/gen_qbitarray.cpp | 4 ++++ qt/gen_qbitarray.go | 4 ++++ qt/gen_qbitarray.h | 1 + qt/gen_qbitmap.cpp | 5 +++++ qt/gen_qbitmap.go | 6 ++++++ qt/gen_qbitmap.h | 3 +++ qt/gen_qbrush.cpp | 5 +++++ qt/gen_qbrush.go | 6 ++++++ qt/gen_qbrush.h | 3 +++ qt/gen_qcolor.cpp | 5 +++++ qt/gen_qcolor.go | 6 ++++++ qt/gen_qcolor.h | 3 +++ qt/gen_qcolorspace.cpp | 5 +++++ qt/gen_qcolorspace.go | 6 ++++++ qt/gen_qcolorspace.h | 3 +++ qt/gen_qcursor.cpp | 5 +++++ qt/gen_qcursor.go | 6 ++++++ qt/gen_qcursor.h | 3 +++ qt/gen_qfont.cpp | 5 +++++ qt/gen_qfont.go | 6 ++++++ qt/gen_qfont.h | 3 +++ qt/gen_qicon.cpp | 5 +++++ qt/gen_qicon.go | 6 ++++++ qt/gen_qicon.h | 3 +++ qt/gen_qimage.cpp | 5 +++++ qt/gen_qimage.go | 6 ++++++ qt/gen_qimage.h | 3 +++ qt/gen_qjsonvalue.cpp | 4 ++++ qt/gen_qjsonvalue.go | 6 ++++++ qt/gen_qjsonvalue.h | 1 + qt/gen_qkeysequence.cpp | 5 +++++ qt/gen_qkeysequence.go | 6 ++++++ qt/gen_qkeysequence.h | 3 +++ qt/gen_qmatrix.cpp | 5 +++++ qt/gen_qmatrix.go | 6 ++++++ qt/gen_qmatrix.h | 3 +++ qt/gen_qmatrix4x4.cpp | 5 +++++ qt/gen_qmatrix4x4.go | 6 ++++++ qt/gen_qmatrix4x4.h | 3 +++ qt/gen_qobjectdefs.cpp | 4 ++++ qt/gen_qobjectdefs.go | 4 ++++ qt/gen_qobjectdefs.h | 1 + qt/gen_qpainterpath.cpp | 4 ++++ qt/gen_qpainterpath.go | 6 ++++++ qt/gen_qpainterpath.h | 1 + qt/gen_qpalette.cpp | 5 +++++ qt/gen_qpalette.go | 6 ++++++ qt/gen_qpalette.h | 3 +++ qt/gen_qpen.cpp | 5 +++++ qt/gen_qpen.go | 6 ++++++ qt/gen_qpen.h | 3 +++ qt/gen_qpixmap.cpp | 5 +++++ qt/gen_qpixmap.go | 6 ++++++ qt/gen_qpixmap.h | 3 +++ qt/gen_qquaternion.cpp | 5 +++++ qt/gen_qquaternion.go | 6 ++++++ qt/gen_qquaternion.h | 3 +++ qt/gen_qregion.cpp | 5 +++++ qt/gen_qregion.go | 6 ++++++ qt/gen_qregion.h | 3 +++ qt/gen_qrgba64.cpp | 5 +++++ qt/gen_qrgba64.go | 4 ++++ qt/gen_qrgba64.h | 1 + qt/gen_qsizepolicy.cpp | 5 +++++ qt/gen_qsizepolicy.go | 6 ++++++ qt/gen_qsizepolicy.h | 3 +++ qt/gen_qsocketnotifier.cpp | 10 ++++++++++ qt/gen_qsocketnotifier.go | 8 ++++++++ qt/gen_qsocketnotifier.h | 1 + qt/gen_qtextformat.cpp | 8 ++++++++ qt/gen_qtextformat.go | 12 ++++++++++++ qt/gen_qtextformat.h | 2 ++ qt/gen_qtransform.cpp | 5 +++++ qt/gen_qtransform.go | 6 ++++++ qt/gen_qtransform.h | 3 +++ qt/gen_qvector2d.cpp | 5 +++++ qt/gen_qvector2d.go | 6 ++++++ qt/gen_qvector2d.h | 3 +++ qt/gen_qvector3d.cpp | 5 +++++ qt/gen_qvector3d.go | 6 ++++++ qt/gen_qvector3d.h | 3 +++ qt/gen_qvector4d.cpp | 5 +++++ qt/gen_qvector4d.go | 6 ++++++ qt/gen_qvector4d.h | 3 +++ qt/script/gen_qscriptstring.cpp | 11 +++++++++++ qt/script/gen_qscriptstring.go | 7 +++++++ qt/script/gen_qscriptstring.h | 1 + qt6/cbor/gen_qcborcommon.cpp | 5 +++++ qt6/cbor/gen_qcborcommon.go | 4 ++++ qt6/cbor/gen_qcborcommon.h | 1 + qt6/cbor/gen_qcborvalue.cpp | 8 ++++++++ qt6/cbor/gen_qcborvalue.go | 12 ++++++++++++ qt6/cbor/gen_qcborvalue.h | 2 ++ qt6/gen_qabstractitemmodel.cpp | 4 ++++ qt6/gen_qabstractitemmodel.go | 6 ++++++ qt6/gen_qabstractitemmodel.h | 1 + qt6/gen_qbitarray.cpp | 4 ++++ qt6/gen_qbitarray.go | 4 ++++ qt6/gen_qbitarray.h | 1 + qt6/gen_qbitmap.cpp | 5 +++++ qt6/gen_qbitmap.go | 6 ++++++ qt6/gen_qbitmap.h | 3 +++ qt6/gen_qbrush.cpp | 5 +++++ qt6/gen_qbrush.go | 6 ++++++ qt6/gen_qbrush.h | 3 +++ qt6/gen_qcolor.cpp | 5 +++++ qt6/gen_qcolor.go | 6 ++++++ qt6/gen_qcolor.h | 3 +++ qt6/gen_qcolorspace.cpp | 5 +++++ qt6/gen_qcolorspace.go | 6 ++++++ qt6/gen_qcolorspace.h | 3 +++ qt6/gen_qcursor.cpp | 5 +++++ qt6/gen_qcursor.go | 6 ++++++ qt6/gen_qcursor.h | 3 +++ qt6/gen_qfont.cpp | 5 +++++ qt6/gen_qfont.go | 6 ++++++ qt6/gen_qfont.h | 3 +++ qt6/gen_qhashfunctions.cpp | 4 ++++ qt6/gen_qhashfunctions.go | 4 ++++ qt6/gen_qhashfunctions.h | 1 + qt6/gen_qicon.cpp | 5 +++++ qt6/gen_qicon.go | 6 ++++++ qt6/gen_qicon.h | 3 +++ qt6/gen_qimage.cpp | 5 +++++ qt6/gen_qimage.go | 6 ++++++ qt6/gen_qimage.h | 3 +++ qt6/gen_qjsonvalue.cpp | 8 ++++++++ qt6/gen_qjsonvalue.go | 12 ++++++++++++ qt6/gen_qjsonvalue.h | 2 ++ qt6/gen_qkeysequence.cpp | 5 +++++ qt6/gen_qkeysequence.go | 6 ++++++ qt6/gen_qkeysequence.h | 3 +++ qt6/gen_qmatrix4x4.cpp | 5 +++++ qt6/gen_qmatrix4x4.go | 6 ++++++ qt6/gen_qmatrix4x4.h | 3 +++ qt6/gen_qnamespace.cpp | 4 ++++ qt6/gen_qnamespace.go | 4 ++++ qt6/gen_qnamespace.h | 1 + qt6/gen_qobjectdefs.cpp | 4 ++++ qt6/gen_qobjectdefs.go | 4 ++++ qt6/gen_qobjectdefs.h | 1 + qt6/gen_qpainterpath.cpp | 4 ++++ qt6/gen_qpainterpath.go | 6 ++++++ qt6/gen_qpainterpath.h | 1 + qt6/gen_qpalette.cpp | 5 +++++ qt6/gen_qpalette.go | 6 ++++++ qt6/gen_qpalette.h | 3 +++ qt6/gen_qpen.cpp | 5 +++++ qt6/gen_qpen.go | 6 ++++++ qt6/gen_qpen.h | 3 +++ qt6/gen_qpixmap.cpp | 5 +++++ qt6/gen_qpixmap.go | 6 ++++++ qt6/gen_qpixmap.h | 3 +++ qt6/gen_qquaternion.cpp | 5 +++++ qt6/gen_qquaternion.go | 6 ++++++ qt6/gen_qquaternion.h | 3 +++ qt6/gen_qregion.cpp | 5 +++++ qt6/gen_qregion.go | 6 ++++++ qt6/gen_qregion.h | 3 +++ qt6/gen_qrgba64.cpp | 5 +++++ qt6/gen_qrgba64.go | 4 ++++ qt6/gen_qrgba64.h | 1 + qt6/gen_qsizepolicy.cpp | 5 +++++ qt6/gen_qsizepolicy.go | 6 ++++++ qt6/gen_qsizepolicy.h | 3 +++ qt6/gen_qsocketnotifier.cpp | 10 ++++++++++ qt6/gen_qsocketnotifier.go | 8 ++++++++ qt6/gen_qsocketnotifier.h | 1 + qt6/gen_qtextformat.cpp | 8 ++++++++ qt6/gen_qtextformat.go | 12 ++++++++++++ qt6/gen_qtextformat.h | 2 ++ qt6/gen_qtransform.cpp | 5 +++++ qt6/gen_qtransform.go | 6 ++++++ qt6/gen_qtransform.h | 3 +++ qt6/gen_qvectornd.cpp | 13 +++++++++++++ qt6/gen_qvectornd.go | 18 ++++++++++++++++++ qt6/gen_qvectornd.h | 5 +++++ 186 files changed, 873 insertions(+) diff --git a/qt/cbor/gen_qcborcommon.cpp b/qt/cbor/gen_qcborcommon.cpp index c96cbcda..43b83da9 100644 --- a/qt/cbor/gen_qcborcommon.cpp +++ b/qt/cbor/gen_qcborcommon.cpp @@ -10,6 +10,11 @@ #endif #include "_cgo_export.h" +int QCborError_ToQCborError__Code(const QCborError* self) { + QCborError::Code _ret = self->operator QCborError::Code(); + return static_cast(_ret); +} + struct miqt_string QCborError_ToString(const QCborError* self) { QString _ret = self->toString(); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory diff --git a/qt/cbor/gen_qcborcommon.go b/qt/cbor/gen_qcborcommon.go index 175078ab..fa68feb2 100644 --- a/qt/cbor/gen_qcborcommon.go +++ b/qt/cbor/gen_qcborcommon.go @@ -107,6 +107,10 @@ func UnsafeNewQCborError(h unsafe.Pointer) *QCborError { return newQCborError((*C.QCborError)(h)) } +func (this *QCborError) ToQCborError__Code() QCborError__Code { + return (QCborError__Code)(C.QCborError_ToQCborError__Code(this.h)) +} + func (this *QCborError) ToString() string { var _ms C.struct_miqt_string = C.QCborError_ToString(this.h) _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) diff --git a/qt/cbor/gen_qcborcommon.h b/qt/cbor/gen_qcborcommon.h index fe046c62..dab2c89b 100644 --- a/qt/cbor/gen_qcborcommon.h +++ b/qt/cbor/gen_qcborcommon.h @@ -20,6 +20,7 @@ class QCborError; typedef struct QCborError QCborError; #endif +int QCborError_ToQCborError__Code(const QCborError* self); struct miqt_string QCborError_ToString(const QCborError* self); void QCborError_Delete(QCborError* self, bool isSubclass); diff --git a/qt/cbor/gen_qcborvalue.cpp b/qt/cbor/gen_qcborvalue.cpp index 8a67afe9..228b7ada 100644 --- a/qt/cbor/gen_qcborvalue.cpp +++ b/qt/cbor/gen_qcborvalue.cpp @@ -509,6 +509,10 @@ QCborValueRef* QCborValueRef_new(QCborValueRef* param1) { return new QCborValueRef(*param1); } +QCborValue* QCborValueRef_ToQCborValue(const QCborValueRef* self) { + return new QCborValue(self->operator QCborValue()); +} + void QCborValueRef_OperatorAssign(QCborValueRef* self, QCborValue* other) { self->operator=(*other); } diff --git a/qt/cbor/gen_qcborvalue.go b/qt/cbor/gen_qcborvalue.go index 83f062a4..95cb04a7 100644 --- a/qt/cbor/gen_qcborvalue.go +++ b/qt/cbor/gen_qcborvalue.go @@ -792,6 +792,12 @@ func NewQCborValueRef(param1 *QCborValueRef) *QCborValueRef { return ret } +func (this *QCborValueRef) ToQCborValue() *QCborValue { + _goptr := newQCborValue(C.QCborValueRef_ToQCborValue(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QCborValueRef) OperatorAssign(other *QCborValue) { C.QCborValueRef_OperatorAssign(this.h, other.cPointer()) } diff --git a/qt/cbor/gen_qcborvalue.h b/qt/cbor/gen_qcborvalue.h index fdb31380..e49de73b 100644 --- a/qt/cbor/gen_qcborvalue.h +++ b/qt/cbor/gen_qcborvalue.h @@ -148,6 +148,7 @@ struct miqt_string QCborValue_ToDiagnosticNotation1(const QCborValue* self, int void QCborValue_Delete(QCborValue* self, bool isSubclass); QCborValueRef* QCborValueRef_new(QCborValueRef* param1); +QCborValue* QCborValueRef_ToQCborValue(const QCborValueRef* self); void QCborValueRef_OperatorAssign(QCborValueRef* self, QCborValue* other); void QCborValueRef_OperatorAssignWithOther(QCborValueRef* self, QCborValueRef* other); int QCborValueRef_Type(const QCborValueRef* self); diff --git a/qt/gen_qabstractitemmodel.cpp b/qt/gen_qabstractitemmodel.cpp index 32f732fb..15a1e194 100644 --- a/qt/gen_qabstractitemmodel.cpp +++ b/qt/gen_qabstractitemmodel.cpp @@ -156,6 +156,12 @@ void QPersistentModelIndex_OperatorAssignWithOther(QPersistentModelIndex* self, self->operator=(*other); } +QModelIndex* QPersistentModelIndex_ToConstQModelIndexBitwiseAnd(const QPersistentModelIndex* self) { + const QModelIndex& _ret = self->operator const QModelIndex &(); + // Cast returned reference into pointer + return const_cast(&_ret); +} + int QPersistentModelIndex_Row(const QPersistentModelIndex* self) { return self->row(); } diff --git a/qt/gen_qabstractitemmodel.go b/qt/gen_qabstractitemmodel.go index f420b9ca..c78d80ce 100644 --- a/qt/gen_qabstractitemmodel.go +++ b/qt/gen_qabstractitemmodel.go @@ -265,6 +265,10 @@ func (this *QPersistentModelIndex) OperatorAssignWithOther(other *QModelIndex) { C.QPersistentModelIndex_OperatorAssignWithOther(this.h, other.cPointer()) } +func (this *QPersistentModelIndex) ToConstQModelIndexBitwiseAnd() *QModelIndex { + return newQModelIndex(C.QPersistentModelIndex_ToConstQModelIndexBitwiseAnd(this.h)) +} + func (this *QPersistentModelIndex) Row() int { return (int)(C.QPersistentModelIndex_Row(this.h)) } diff --git a/qt/gen_qabstractitemmodel.h b/qt/gen_qabstractitemmodel.h index a2a8896a..0eada8a9 100644 --- a/qt/gen_qabstractitemmodel.h +++ b/qt/gen_qabstractitemmodel.h @@ -78,6 +78,7 @@ void QPersistentModelIndex_Swap(QPersistentModelIndex* self, QPersistentModelInd bool QPersistentModelIndex_OperatorEqualWithOther(const QPersistentModelIndex* self, QModelIndex* other); bool QPersistentModelIndex_OperatorNotEqualWithOther(const QPersistentModelIndex* self, QModelIndex* other); void QPersistentModelIndex_OperatorAssignWithOther(QPersistentModelIndex* self, QModelIndex* other); +QModelIndex* QPersistentModelIndex_ToConstQModelIndexBitwiseAnd(const QPersistentModelIndex* self); int QPersistentModelIndex_Row(const QPersistentModelIndex* self); int QPersistentModelIndex_Column(const QPersistentModelIndex* self); void* QPersistentModelIndex_InternalPointer(const QPersistentModelIndex* self); diff --git a/qt/gen_qbitarray.cpp b/qt/gen_qbitarray.cpp index d5fabafd..187fd0ba 100644 --- a/qt/gen_qbitarray.cpp +++ b/qt/gen_qbitarray.cpp @@ -164,6 +164,10 @@ QBitRef* QBitRef_new(QBitRef* param1) { return new QBitRef(*param1); } +bool QBitRef_ToBool(const QBitRef* self) { + return self->operator bool(); +} + bool QBitRef_OperatorNot(const QBitRef* self) { return self->operator!(); } diff --git a/qt/gen_qbitarray.go b/qt/gen_qbitarray.go index ea8d86be..02f629a5 100644 --- a/qt/gen_qbitarray.go +++ b/qt/gen_qbitarray.go @@ -270,6 +270,10 @@ func NewQBitRef(param1 *QBitRef) *QBitRef { return ret } +func (this *QBitRef) ToBool() bool { + return (bool)(C.QBitRef_ToBool(this.h)) +} + func (this *QBitRef) OperatorNot() bool { return (bool)(C.QBitRef_OperatorNot(this.h)) } diff --git a/qt/gen_qbitarray.h b/qt/gen_qbitarray.h index bfedc85f..8b24f93a 100644 --- a/qt/gen_qbitarray.h +++ b/qt/gen_qbitarray.h @@ -61,6 +61,7 @@ bool QBitArray_Fill22(QBitArray* self, bool val, int size); void QBitArray_Delete(QBitArray* self, bool isSubclass); QBitRef* QBitRef_new(QBitRef* param1); +bool QBitRef_ToBool(const QBitRef* self); bool QBitRef_OperatorNot(const QBitRef* self); void QBitRef_OperatorAssign(QBitRef* self, QBitRef* val); void QBitRef_OperatorAssignWithVal(QBitRef* self, bool val); diff --git a/qt/gen_qbitmap.cpp b/qt/gen_qbitmap.cpp index a46ae1a4..9370b622 100644 --- a/qt/gen_qbitmap.cpp +++ b/qt/gen_qbitmap.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include "gen_qbitmap.h" @@ -146,6 +147,10 @@ void QBitmap_Swap(QBitmap* self, QBitmap* other) { self->swap(*other); } +QVariant* QBitmap_ToQVariant(const QBitmap* self) { + return new QVariant(self->operator QVariant()); +} + void QBitmap_Clear(QBitmap* self) { self->clear(); } diff --git a/qt/gen_qbitmap.go b/qt/gen_qbitmap.go index 1e666d2e..0344420b 100644 --- a/qt/gen_qbitmap.go +++ b/qt/gen_qbitmap.go @@ -129,6 +129,12 @@ func (this *QBitmap) Swap(other *QBitmap) { C.QBitmap_Swap(this.h, other.cPointer()) } +func (this *QBitmap) ToQVariant() *QVariant { + _goptr := newQVariant(C.QBitmap_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QBitmap) Clear() { C.QBitmap_Clear(this.h) } diff --git a/qt/gen_qbitmap.h b/qt/gen_qbitmap.h index 82db0586..4dae31f5 100644 --- a/qt/gen_qbitmap.h +++ b/qt/gen_qbitmap.h @@ -23,6 +23,7 @@ class QPaintEngine; class QPixmap; class QSize; class QTransform; +class QVariant; #else typedef struct QBitmap QBitmap; typedef struct QImage QImage; @@ -32,6 +33,7 @@ typedef struct QPaintEngine QPaintEngine; typedef struct QPixmap QPixmap; typedef struct QSize QSize; typedef struct QTransform QTransform; +typedef struct QVariant QVariant; #endif QBitmap* QBitmap_new(); @@ -45,6 +47,7 @@ void QBitmap_virtbase(QBitmap* src, QPixmap** outptr_QPixmap); void QBitmap_OperatorAssign(QBitmap* self, QBitmap* other); void QBitmap_OperatorAssignWithQPixmap(QBitmap* self, QPixmap* param1); void QBitmap_Swap(QBitmap* self, QBitmap* other); +QVariant* QBitmap_ToQVariant(const QBitmap* self); void QBitmap_Clear(QBitmap* self); QBitmap* QBitmap_FromImage(QImage* image); QBitmap* QBitmap_FromData(QSize* size, const unsigned char* bits); diff --git a/qt/gen_qbrush.cpp b/qt/gen_qbrush.cpp index fcec9598..cfc45030 100644 --- a/qt/gen_qbrush.cpp +++ b/qt/gen_qbrush.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include "gen_qbrush.h" @@ -77,6 +78,10 @@ void QBrush_Swap(QBrush* self, QBrush* other) { self->swap(*other); } +QVariant* QBrush_ToQVariant(const QBrush* self) { + return new QVariant(self->operator QVariant()); +} + int QBrush_Style(const QBrush* self) { Qt::BrushStyle _ret = self->style(); return static_cast(_ret); diff --git a/qt/gen_qbrush.go b/qt/gen_qbrush.go index 0283fb28..d13197f3 100644 --- a/qt/gen_qbrush.go +++ b/qt/gen_qbrush.go @@ -357,6 +357,12 @@ func (this *QBrush) Swap(other *QBrush) { C.QBrush_Swap(this.h, other.cPointer()) } +func (this *QBrush) ToQVariant() *QVariant { + _goptr := newQVariant(C.QBrush_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QBrush) Style() BrushStyle { return (BrushStyle)(C.QBrush_Style(this.h)) } diff --git a/qt/gen_qbrush.h b/qt/gen_qbrush.h index c0fa8ff7..8c3b1f9d 100644 --- a/qt/gen_qbrush.h +++ b/qt/gen_qbrush.h @@ -32,6 +32,7 @@ class QPixmap; class QPointF; class QRadialGradient; class QTransform; +class QVariant; #else typedef struct QBrush QBrush; typedef struct QBrushData QBrushData; @@ -46,6 +47,7 @@ typedef struct QPixmap QPixmap; typedef struct QPointF QPointF; typedef struct QRadialGradient QRadialGradient; typedef struct QTransform QTransform; +typedef struct QVariant QVariant; #endif QBrush* QBrush_new(); @@ -62,6 +64,7 @@ QBrush* QBrush_new11(QColor* color, int bs); QBrush* QBrush_new12(int color, int bs); void QBrush_OperatorAssign(QBrush* self, QBrush* brush); void QBrush_Swap(QBrush* self, QBrush* other); +QVariant* QBrush_ToQVariant(const QBrush* self); int QBrush_Style(const QBrush* self); void QBrush_SetStyle(QBrush* self, int style); QMatrix* QBrush_Matrix(const QBrush* self); diff --git a/qt/gen_qcolor.cpp b/qt/gen_qcolor.cpp index 9b3012a8..78d2d271 100644 --- a/qt/gen_qcolor.cpp +++ b/qt/gen_qcolor.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include "gen_qcolor.h" @@ -495,6 +496,10 @@ bool QColor_OperatorNotEqual(const QColor* self, QColor* c) { return (*self != *c); } +QVariant* QColor_ToQVariant(const QColor* self) { + return new QVariant(self->operator QVariant()); +} + bool QColor_IsValidColor(struct miqt_string name) { QString name_QString = QString::fromUtf8(name.data, name.len); return QColor::isValidColor(name_QString); diff --git a/qt/gen_qcolor.go b/qt/gen_qcolor.go index 780abca0..950d4e13 100644 --- a/qt/gen_qcolor.go +++ b/qt/gen_qcolor.go @@ -615,6 +615,12 @@ func (this *QColor) OperatorNotEqual(c *QColor) bool { return (bool)(C.QColor_OperatorNotEqual(this.h, c.cPointer())) } +func (this *QColor) ToQVariant() *QVariant { + _goptr := newQVariant(C.QColor_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func QColor_IsValidColor(name string) bool { name_ms := C.struct_miqt_string{} name_ms.data = C.CString(name) diff --git a/qt/gen_qcolor.h b/qt/gen_qcolor.h index 9c0e6413..70188557 100644 --- a/qt/gen_qcolor.h +++ b/qt/gen_qcolor.h @@ -17,9 +17,11 @@ extern "C" { #ifdef __cplusplus class QColor; class QRgba64; +class QVariant; #else typedef struct QColor QColor; typedef struct QRgba64 QRgba64; +typedef struct QVariant QVariant; #endif QColor* QColor_new(); @@ -130,6 +132,7 @@ QColor* QColor_Lighter(const QColor* self); QColor* QColor_Darker(const QColor* self); bool QColor_OperatorEqual(const QColor* self, QColor* c); bool QColor_OperatorNotEqual(const QColor* self, QColor* c); +QVariant* QColor_ToQVariant(const QColor* self); bool QColor_IsValidColor(struct miqt_string name); void QColor_GetRgb4(const QColor* self, int* r, int* g, int* b, int* a); void QColor_SetRgb4(QColor* self, int r, int g, int b, int a); diff --git a/qt/gen_qcolorspace.cpp b/qt/gen_qcolorspace.cpp index a7a98036..318f2c8b 100644 --- a/qt/gen_qcolorspace.cpp +++ b/qt/gen_qcolorspace.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include #include "gen_qcolorspace.h" @@ -102,6 +103,10 @@ QColorTransform* QColorSpace_TransformationToColorSpace(const QColorSpace* self, return new QColorTransform(self->transformationToColorSpace(*colorspace)); } +QVariant* QColorSpace_ToQVariant(const QColorSpace* self) { + return new QVariant(self->operator QVariant()); +} + void QColorSpace_SetTransferFunction2(QColorSpace* self, int transferFunction, float gamma) { self->setTransferFunction(static_cast(transferFunction), static_cast(gamma)); } diff --git a/qt/gen_qcolorspace.go b/qt/gen_qcolorspace.go index e1dfa6b5..fe98cfe8 100644 --- a/qt/gen_qcolorspace.go +++ b/qt/gen_qcolorspace.go @@ -204,6 +204,12 @@ func (this *QColorSpace) TransformationToColorSpace(colorspace *QColorSpace) *QC return _goptr } +func (this *QColorSpace) ToQVariant() *QVariant { + _goptr := newQVariant(C.QColorSpace_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QColorSpace) SetTransferFunction2(transferFunction QColorSpace__TransferFunction, gamma float32) { C.QColorSpace_SetTransferFunction2(this.h, (C.int)(transferFunction), (C.float)(gamma)) } diff --git a/qt/gen_qcolorspace.h b/qt/gen_qcolorspace.h index a714b141..ced0e9fa 100644 --- a/qt/gen_qcolorspace.h +++ b/qt/gen_qcolorspace.h @@ -18,10 +18,12 @@ extern "C" { class QColorSpace; class QColorTransform; class QPointF; +class QVariant; #else typedef struct QColorSpace QColorSpace; typedef struct QColorTransform QColorTransform; typedef struct QPointF QPointF; +typedef struct QVariant QVariant; #endif QColorSpace* QColorSpace_new(); @@ -45,6 +47,7 @@ bool QColorSpace_IsValid(const QColorSpace* self); QColorSpace* QColorSpace_FromIccProfile(struct miqt_string iccProfile); struct miqt_string QColorSpace_IccProfile(const QColorSpace* self); QColorTransform* QColorSpace_TransformationToColorSpace(const QColorSpace* self, QColorSpace* colorspace); +QVariant* QColorSpace_ToQVariant(const QColorSpace* self); void QColorSpace_SetTransferFunction2(QColorSpace* self, int transferFunction, float gamma); QColorSpace* QColorSpace_WithTransferFunction2(const QColorSpace* self, int transferFunction, float gamma); void QColorSpace_Delete(QColorSpace* self, bool isSubclass); diff --git a/qt/gen_qcursor.cpp b/qt/gen_qcursor.cpp index 6243125b..ad3d6fb0 100644 --- a/qt/gen_qcursor.cpp +++ b/qt/gen_qcursor.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include "gen_qcursor.h" @@ -55,6 +56,10 @@ void QCursor_Swap(QCursor* self, QCursor* other) { self->swap(*other); } +QVariant* QCursor_ToQVariant(const QCursor* self) { + return new QVariant(self->operator QVariant()); +} + int QCursor_Shape(const QCursor* self) { Qt::CursorShape _ret = self->shape(); return static_cast(_ret); diff --git a/qt/gen_qcursor.go b/qt/gen_qcursor.go index 419cfa45..09e3c1a7 100644 --- a/qt/gen_qcursor.go +++ b/qt/gen_qcursor.go @@ -126,6 +126,12 @@ func (this *QCursor) Swap(other *QCursor) { C.QCursor_Swap(this.h, other.cPointer()) } +func (this *QCursor) ToQVariant() *QVariant { + _goptr := newQVariant(C.QCursor_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QCursor) Shape() CursorShape { return (CursorShape)(C.QCursor_Shape(this.h)) } diff --git a/qt/gen_qcursor.h b/qt/gen_qcursor.h index 8c8c2bd9..9fb2e3f6 100644 --- a/qt/gen_qcursor.h +++ b/qt/gen_qcursor.h @@ -20,12 +20,14 @@ class QCursor; class QPixmap; class QPoint; class QScreen; +class QVariant; #else typedef struct QBitmap QBitmap; typedef struct QCursor QCursor; typedef struct QPixmap QPixmap; typedef struct QPoint QPoint; typedef struct QScreen QScreen; +typedef struct QVariant QVariant; #endif QCursor* QCursor_new(); @@ -39,6 +41,7 @@ QCursor* QCursor_new8(QPixmap* pixmap, int hotX); QCursor* QCursor_new9(QPixmap* pixmap, int hotX, int hotY); void QCursor_OperatorAssign(QCursor* self, QCursor* cursor); void QCursor_Swap(QCursor* self, QCursor* other); +QVariant* QCursor_ToQVariant(const QCursor* self); int QCursor_Shape(const QCursor* self); void QCursor_SetShape(QCursor* self, int newShape); QBitmap* QCursor_Bitmap(const QCursor* self); diff --git a/qt/gen_qfont.cpp b/qt/gen_qfont.cpp index da6d79ff..c4ea2e97 100644 --- a/qt/gen_qfont.cpp +++ b/qt/gen_qfont.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include "gen_qfont.h" @@ -308,6 +309,10 @@ bool QFont_OperatorLesser(const QFont* self, QFont* param1) { return (*self < *param1); } +QVariant* QFont_ToQVariant(const QFont* self) { + return new QVariant(self->operator QVariant()); +} + bool QFont_IsCopyOf(const QFont* self, QFont* param1) { return self->isCopyOf(*param1); } diff --git a/qt/gen_qfont.go b/qt/gen_qfont.go index 060ae442..c40057f9 100644 --- a/qt/gen_qfont.go +++ b/qt/gen_qfont.go @@ -496,6 +496,12 @@ func (this *QFont) OperatorLesser(param1 *QFont) bool { return (bool)(C.QFont_OperatorLesser(this.h, param1.cPointer())) } +func (this *QFont) ToQVariant() *QVariant { + _goptr := newQVariant(C.QFont_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QFont) IsCopyOf(param1 *QFont) bool { return (bool)(C.QFont_IsCopyOf(this.h, param1.cPointer())) } diff --git a/qt/gen_qfont.h b/qt/gen_qfont.h index 280153d5..0e0ee33b 100644 --- a/qt/gen_qfont.h +++ b/qt/gen_qfont.h @@ -17,9 +17,11 @@ extern "C" { #ifdef __cplusplus class QFont; class QPaintDevice; +class QVariant; #else typedef struct QFont QFont; typedef struct QPaintDevice QPaintDevice; +typedef struct QVariant QVariant; #endif QFont* QFont_new(); @@ -83,6 +85,7 @@ void QFont_OperatorAssign(QFont* self, QFont* param1); bool QFont_OperatorEqual(const QFont* self, QFont* param1); bool QFont_OperatorNotEqual(const QFont* self, QFont* param1); bool QFont_OperatorLesser(const QFont* self, QFont* param1); +QVariant* QFont_ToQVariant(const QFont* self); bool QFont_IsCopyOf(const QFont* self, QFont* param1); void QFont_SetRawName(QFont* self, struct miqt_string rawName); struct miqt_string QFont_RawName(const QFont* self); diff --git a/qt/gen_qicon.cpp b/qt/gen_qicon.cpp index 38c7714f..9a033c66 100644 --- a/qt/gen_qicon.cpp +++ b/qt/gen_qicon.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include "gen_qicon.h" @@ -46,6 +47,10 @@ void QIcon_Swap(QIcon* self, QIcon* other) { self->swap(*other); } +QVariant* QIcon_ToQVariant(const QIcon* self) { + return new QVariant(self->operator QVariant()); +} + QPixmap* QIcon_Pixmap(const QIcon* self, QSize* size) { return new QPixmap(self->pixmap(*size)); } diff --git a/qt/gen_qicon.go b/qt/gen_qicon.go index 14128009..fa1125ea 100644 --- a/qt/gen_qicon.go +++ b/qt/gen_qicon.go @@ -114,6 +114,12 @@ func (this *QIcon) Swap(other *QIcon) { C.QIcon_Swap(this.h, other.cPointer()) } +func (this *QIcon) ToQVariant() *QVariant { + _goptr := newQVariant(C.QIcon_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QIcon) Pixmap(size *QSize) *QPixmap { _goptr := newQPixmap(C.QIcon_Pixmap(this.h, size.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer diff --git a/qt/gen_qicon.h b/qt/gen_qicon.h index 1a3b3147..6bfaaacd 100644 --- a/qt/gen_qicon.h +++ b/qt/gen_qicon.h @@ -21,6 +21,7 @@ class QPainter; class QPixmap; class QRect; class QSize; +class QVariant; class QWindow; #else typedef struct QIcon QIcon; @@ -29,6 +30,7 @@ typedef struct QPainter QPainter; typedef struct QPixmap QPixmap; typedef struct QRect QRect; typedef struct QSize QSize; +typedef struct QVariant QVariant; typedef struct QWindow QWindow; #endif @@ -39,6 +41,7 @@ QIcon* QIcon_new4(struct miqt_string fileName); QIcon* QIcon_new5(QIconEngine* engine); void QIcon_OperatorAssign(QIcon* self, QIcon* other); void QIcon_Swap(QIcon* self, QIcon* other); +QVariant* QIcon_ToQVariant(const QIcon* self); QPixmap* QIcon_Pixmap(const QIcon* self, QSize* size); QPixmap* QIcon_Pixmap2(const QIcon* self, int w, int h); QPixmap* QIcon_PixmapWithExtent(const QIcon* self, int extent); diff --git a/qt/gen_qimage.cpp b/qt/gen_qimage.cpp index 2d83f86e..763ce739 100644 --- a/qt/gen_qimage.cpp +++ b/qt/gen_qimage.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include "gen_qimage.h" @@ -250,6 +251,10 @@ bool QImage_OperatorNotEqual(const QImage* self, QImage* param1) { return (*self != *param1); } +QVariant* QImage_ToQVariant(const QImage* self) { + return new QVariant(self->operator QVariant()); +} + void QImage_Detach(QImage* self) { self->detach(); } diff --git a/qt/gen_qimage.go b/qt/gen_qimage.go index a82cc40f..bbad4082 100644 --- a/qt/gen_qimage.go +++ b/qt/gen_qimage.go @@ -208,6 +208,12 @@ func (this *QImage) OperatorNotEqual(param1 *QImage) bool { return (bool)(C.QImage_OperatorNotEqual(this.h, param1.cPointer())) } +func (this *QImage) ToQVariant() *QVariant { + _goptr := newQVariant(C.QImage_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QImage) Detach() { C.QImage_Detach(this.h) } diff --git a/qt/gen_qimage.h b/qt/gen_qimage.h index 9df5edc8..0418cf0d 100644 --- a/qt/gen_qimage.h +++ b/qt/gen_qimage.h @@ -29,6 +29,7 @@ class QPoint; class QRect; class QSize; class QTransform; +class QVariant; #else typedef struct QColor QColor; typedef struct QColorSpace QColorSpace; @@ -44,6 +45,7 @@ typedef struct QPoint QPoint; typedef struct QRect QRect; typedef struct QSize QSize; typedef struct QTransform QTransform; +typedef struct QVariant QVariant; #endif QImage* QImage_new(); @@ -63,6 +65,7 @@ bool QImage_IsNull(const QImage* self); int QImage_DevType(const QImage* self); bool QImage_OperatorEqual(const QImage* self, QImage* param1); bool QImage_OperatorNotEqual(const QImage* self, QImage* param1); +QVariant* QImage_ToQVariant(const QImage* self); void QImage_Detach(QImage* self); bool QImage_IsDetached(const QImage* self); QImage* QImage_Copy(const QImage* self); diff --git a/qt/gen_qjsonvalue.cpp b/qt/gen_qjsonvalue.cpp index bb6cc10a..59299400 100644 --- a/qt/gen_qjsonvalue.cpp +++ b/qt/gen_qjsonvalue.cpp @@ -210,6 +210,10 @@ QJsonValueRef* QJsonValueRef_new3(QJsonObject* object, int idx) { return new QJsonValueRef(object, static_cast(idx)); } +QJsonValue* QJsonValueRef_ToQJsonValue(const QJsonValueRef* self) { + return new QJsonValue(self->operator QJsonValue()); +} + void QJsonValueRef_OperatorAssign(QJsonValueRef* self, QJsonValue* val) { self->operator=(*val); } diff --git a/qt/gen_qjsonvalue.go b/qt/gen_qjsonvalue.go index e6dbd571..8705218d 100644 --- a/qt/gen_qjsonvalue.go +++ b/qt/gen_qjsonvalue.go @@ -365,6 +365,12 @@ func NewQJsonValueRef3(object *QJsonObject, idx int) *QJsonValueRef { return ret } +func (this *QJsonValueRef) ToQJsonValue() *QJsonValue { + _goptr := newQJsonValue(C.QJsonValueRef_ToQJsonValue(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QJsonValueRef) OperatorAssign(val *QJsonValue) { C.QJsonValueRef_OperatorAssign(this.h, val.cPointer()) } diff --git a/qt/gen_qjsonvalue.h b/qt/gen_qjsonvalue.h index db024e58..945128e6 100644 --- a/qt/gen_qjsonvalue.h +++ b/qt/gen_qjsonvalue.h @@ -76,6 +76,7 @@ void QJsonValue_Delete(QJsonValue* self, bool isSubclass); QJsonValueRef* QJsonValueRef_new(QJsonValueRef* param1); QJsonValueRef* QJsonValueRef_new2(QJsonArray* array, int idx); QJsonValueRef* QJsonValueRef_new3(QJsonObject* object, int idx); +QJsonValue* QJsonValueRef_ToQJsonValue(const QJsonValueRef* self); void QJsonValueRef_OperatorAssign(QJsonValueRef* self, QJsonValue* val); void QJsonValueRef_OperatorAssignWithVal(QJsonValueRef* self, QJsonValueRef* val); QVariant* QJsonValueRef_ToVariant(const QJsonValueRef* self); diff --git a/qt/gen_qkeysequence.cpp b/qt/gen_qkeysequence.cpp index f9123d50..51bea66c 100644 --- a/qt/gen_qkeysequence.cpp +++ b/qt/gen_qkeysequence.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include "gen_qkeysequence.h" @@ -127,6 +128,10 @@ struct miqt_array /* of QKeySequence* */ QKeySequence_KeyBindings(int key) { return _out; } +QVariant* QKeySequence_ToQVariant(const QKeySequence* self) { + return new QVariant(self->operator QVariant()); +} + int QKeySequence_OperatorSubscript(const QKeySequence* self, unsigned int i) { return self->operator[](static_cast(i)); } diff --git a/qt/gen_qkeysequence.go b/qt/gen_qkeysequence.go index 11366ea3..e9404e66 100644 --- a/qt/gen_qkeysequence.go +++ b/qt/gen_qkeysequence.go @@ -297,6 +297,12 @@ func QKeySequence_KeyBindings(key QKeySequence__StandardKey) []QKeySequence { return _ret } +func (this *QKeySequence) ToQVariant() *QVariant { + _goptr := newQVariant(C.QKeySequence_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QKeySequence) OperatorSubscript(i uint) int { return (int)(C.QKeySequence_OperatorSubscript(this.h, (C.uint)(i))) } diff --git a/qt/gen_qkeysequence.h b/qt/gen_qkeysequence.h index 9e5618ea..4d5a84d3 100644 --- a/qt/gen_qkeysequence.h +++ b/qt/gen_qkeysequence.h @@ -16,8 +16,10 @@ extern "C" { #ifdef __cplusplus class QKeySequence; +class QVariant; #else typedef struct QKeySequence QKeySequence; +typedef struct QVariant QVariant; #endif QKeySequence* QKeySequence_new(); @@ -38,6 +40,7 @@ struct miqt_string QKeySequence_ListToString(struct miqt_array /* of QKeySequenc int QKeySequence_Matches(const QKeySequence* self, QKeySequence* seq); QKeySequence* QKeySequence_Mnemonic(struct miqt_string text); struct miqt_array /* of QKeySequence* */ QKeySequence_KeyBindings(int key); +QVariant* QKeySequence_ToQVariant(const QKeySequence* self); int QKeySequence_OperatorSubscript(const QKeySequence* self, unsigned int i); void QKeySequence_OperatorAssign(QKeySequence* self, QKeySequence* other); void QKeySequence_Swap(QKeySequence* self, QKeySequence* other); diff --git a/qt/gen_qmatrix.cpp b/qt/gen_qmatrix.cpp index 2e23988e..0ad4b27f 100644 --- a/qt/gen_qmatrix.cpp +++ b/qt/gen_qmatrix.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include "gen_qmatrix.h" @@ -172,6 +173,10 @@ QMatrix* QMatrix_OperatorMultiply(const QMatrix* self, QMatrix* o) { return new QMatrix(self->operator*(*o)); } +QVariant* QMatrix_ToQVariant(const QMatrix* self) { + return new QVariant(self->operator QVariant()); +} + QMatrix* QMatrix_Inverted1(const QMatrix* self, bool* invertible) { return new QMatrix(self->inverted(invertible)); } diff --git a/qt/gen_qmatrix.go b/qt/gen_qmatrix.go index 8e2cb049..27ac0d4e 100644 --- a/qt/gen_qmatrix.go +++ b/qt/gen_qmatrix.go @@ -222,6 +222,12 @@ func (this *QMatrix) OperatorMultiply(o *QMatrix) *QMatrix { return _goptr } +func (this *QMatrix) ToQVariant() *QVariant { + _goptr := newQVariant(C.QMatrix_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QMatrix) Inverted1(invertible *bool) *QMatrix { _goptr := newQMatrix(C.QMatrix_Inverted1(this.h, (*C.bool)(unsafe.Pointer(invertible)))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer diff --git a/qt/gen_qmatrix.h b/qt/gen_qmatrix.h index 11e9f619..a9e36a5c 100644 --- a/qt/gen_qmatrix.h +++ b/qt/gen_qmatrix.h @@ -24,6 +24,7 @@ class QPointF; class QRect; class QRectF; class QRegion; +class QVariant; #else typedef struct QLine QLine; typedef struct QLineF QLineF; @@ -34,6 +35,7 @@ typedef struct QPointF QPointF; typedef struct QRect QRect; typedef struct QRectF QRectF; typedef struct QRegion QRegion; +typedef struct QVariant QVariant; #endif QMatrix* QMatrix_new(int param1); @@ -71,6 +73,7 @@ bool QMatrix_OperatorEqual(const QMatrix* self, QMatrix* param1); bool QMatrix_OperatorNotEqual(const QMatrix* self, QMatrix* param1); QMatrix* QMatrix_OperatorMultiplyAssign(QMatrix* self, QMatrix* param1); QMatrix* QMatrix_OperatorMultiply(const QMatrix* self, QMatrix* o); +QVariant* QMatrix_ToQVariant(const QMatrix* self); QMatrix* QMatrix_Inverted1(const QMatrix* self, bool* invertible); void QMatrix_Delete(QMatrix* self, bool isSubclass); diff --git a/qt/gen_qmatrix4x4.cpp b/qt/gen_qmatrix4x4.cpp index 09f2b146..bc6086c3 100644 --- a/qt/gen_qmatrix4x4.cpp +++ b/qt/gen_qmatrix4x4.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -266,6 +267,10 @@ void QMatrix4x4_Optimize(QMatrix4x4* self) { self->optimize(); } +QVariant* QMatrix4x4_ToQVariant(const QMatrix4x4* self) { + return new QVariant(self->operator QVariant()); +} + QMatrix4x4* QMatrix4x4_Inverted1(const QMatrix4x4* self, bool* invertible) { return new QMatrix4x4(self->inverted(invertible)); } diff --git a/qt/gen_qmatrix4x4.go b/qt/gen_qmatrix4x4.go index 1c0fa8e0..11755049 100644 --- a/qt/gen_qmatrix4x4.go +++ b/qt/gen_qmatrix4x4.go @@ -346,6 +346,12 @@ func (this *QMatrix4x4) Optimize() { C.QMatrix4x4_Optimize(this.h) } +func (this *QMatrix4x4) ToQVariant() *QVariant { + _goptr := newQVariant(C.QMatrix4x4_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QMatrix4x4) Inverted1(invertible *bool) *QMatrix4x4 { _goptr := newQMatrix4x4(C.QMatrix4x4_Inverted1(this.h, (*C.bool)(unsafe.Pointer(invertible)))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer diff --git a/qt/gen_qmatrix4x4.h b/qt/gen_qmatrix4x4.h index 74a39294..0191d168 100644 --- a/qt/gen_qmatrix4x4.h +++ b/qt/gen_qmatrix4x4.h @@ -23,6 +23,7 @@ class QQuaternion; class QRect; class QRectF; class QTransform; +class QVariant; class QVector3D; class QVector4D; #else @@ -34,6 +35,7 @@ typedef struct QQuaternion QQuaternion; typedef struct QRect QRect; typedef struct QRectF QRectF; typedef struct QTransform QTransform; +typedef struct QVariant QVariant; typedef struct QVector3D QVector3D; typedef struct QVector4D QVector4D; #endif @@ -98,6 +100,7 @@ float* QMatrix4x4_Data(QMatrix4x4* self); const float* QMatrix4x4_Data2(const QMatrix4x4* self); const float* QMatrix4x4_ConstData(const QMatrix4x4* self); void QMatrix4x4_Optimize(QMatrix4x4* self); +QVariant* QMatrix4x4_ToQVariant(const QMatrix4x4* self); QMatrix4x4* QMatrix4x4_Inverted1(const QMatrix4x4* self, bool* invertible); void QMatrix4x4_Rotate4(QMatrix4x4* self, float angle, float x, float y, float z); void QMatrix4x4_Viewport5(QMatrix4x4* self, float left, float bottom, float width, float height, float nearPlane); diff --git a/qt/gen_qobjectdefs.cpp b/qt/gen_qobjectdefs.cpp index 210c0da3..2f4aa21b 100644 --- a/qt/gen_qobjectdefs.cpp +++ b/qt/gen_qobjectdefs.cpp @@ -532,6 +532,10 @@ QMetaObject* QMetaObject__SuperData_OperatorMinusGreater(const QMetaObject__Supe return (QMetaObject*) self->operator->(); } +QMetaObject* QMetaObject__SuperData_ToConstQMetaObjectMultiply(const QMetaObject__SuperData* self) { + return (QMetaObject*) self->operator const QMetaObject *(); +} + void QMetaObject__SuperData_OperatorAssign(QMetaObject__SuperData* self, QMetaObject__SuperData* param1) { self->operator=(*param1); } diff --git a/qt/gen_qobjectdefs.go b/qt/gen_qobjectdefs.go index 2d7e55b5..013da57b 100644 --- a/qt/gen_qobjectdefs.go +++ b/qt/gen_qobjectdefs.go @@ -926,6 +926,10 @@ func (this *QMetaObject__SuperData) OperatorMinusGreater() *QMetaObject { return newQMetaObject(C.QMetaObject__SuperData_OperatorMinusGreater(this.h)) } +func (this *QMetaObject__SuperData) ToConstQMetaObjectMultiply() *QMetaObject { + return newQMetaObject(C.QMetaObject__SuperData_ToConstQMetaObjectMultiply(this.h)) +} + func (this *QMetaObject__SuperData) OperatorAssign(param1 *QMetaObject__SuperData) { C.QMetaObject__SuperData_OperatorAssign(this.h, param1.cPointer()) } diff --git a/qt/gen_qobjectdefs.h b/qt/gen_qobjectdefs.h index ed799493..eacf1cf8 100644 --- a/qt/gen_qobjectdefs.h +++ b/qt/gen_qobjectdefs.h @@ -168,6 +168,7 @@ QMetaObject__SuperData* QMetaObject__SuperData_new(); QMetaObject__SuperData* QMetaObject__SuperData_new2(QMetaObject* mo); QMetaObject__SuperData* QMetaObject__SuperData_new3(QMetaObject__SuperData* param1); QMetaObject* QMetaObject__SuperData_OperatorMinusGreater(const QMetaObject__SuperData* self); +QMetaObject* QMetaObject__SuperData_ToConstQMetaObjectMultiply(const QMetaObject__SuperData* self); void QMetaObject__SuperData_OperatorAssign(QMetaObject__SuperData* self, QMetaObject__SuperData* param1); void QMetaObject__SuperData_Delete(QMetaObject__SuperData* self, bool isSubclass); diff --git a/qt/gen_qpainterpath.cpp b/qt/gen_qpainterpath.cpp index 240b45e4..0e89870f 100644 --- a/qt/gen_qpainterpath.cpp +++ b/qt/gen_qpainterpath.cpp @@ -462,6 +462,10 @@ bool QPainterPath__Element_IsCurveTo(const QPainterPath__Element* self) { return self->isCurveTo(); } +QPointF* QPainterPath__Element_ToQPointF(const QPainterPath__Element* self) { + return new QPointF(self->operator QPointF()); +} + bool QPainterPath__Element_OperatorEqual(const QPainterPath__Element* self, QPainterPath__Element* e) { return (*self == *e); } diff --git a/qt/gen_qpainterpath.go b/qt/gen_qpainterpath.go index 8986ab3d..10be0399 100644 --- a/qt/gen_qpainterpath.go +++ b/qt/gen_qpainterpath.go @@ -621,6 +621,12 @@ func (this *QPainterPath__Element) IsCurveTo() bool { return (bool)(C.QPainterPath__Element_IsCurveTo(this.h)) } +func (this *QPainterPath__Element) ToQPointF() *QPointF { + _goptr := newQPointF(C.QPainterPath__Element_ToQPointF(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QPainterPath__Element) OperatorEqual(e *QPainterPath__Element) bool { return (bool)(C.QPainterPath__Element_OperatorEqual(this.h, e.cPointer())) } diff --git a/qt/gen_qpainterpath.h b/qt/gen_qpainterpath.h index a8037bd0..5e5f7971 100644 --- a/qt/gen_qpainterpath.h +++ b/qt/gen_qpainterpath.h @@ -141,6 +141,7 @@ void QPainterPathStroker_Delete(QPainterPathStroker* self, bool isSubclass); bool QPainterPath__Element_IsMoveTo(const QPainterPath__Element* self); bool QPainterPath__Element_IsLineTo(const QPainterPath__Element* self); bool QPainterPath__Element_IsCurveTo(const QPainterPath__Element* self); +QPointF* QPainterPath__Element_ToQPointF(const QPainterPath__Element* self); bool QPainterPath__Element_OperatorEqual(const QPainterPath__Element* self, QPainterPath__Element* e); bool QPainterPath__Element_OperatorNotEqual(const QPainterPath__Element* self, QPainterPath__Element* e); void QPainterPath__Element_Delete(QPainterPath__Element* self, bool isSubclass); diff --git a/qt/gen_qpalette.cpp b/qt/gen_qpalette.cpp index 1239fb32..14c58d44 100644 --- a/qt/gen_qpalette.cpp +++ b/qt/gen_qpalette.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include "gen_qpalette.h" @@ -45,6 +46,10 @@ void QPalette_Swap(QPalette* self, QPalette* other) { self->swap(*other); } +QVariant* QPalette_ToQVariant(const QPalette* self) { + return new QVariant(self->operator QVariant()); +} + int QPalette_CurrentColorGroup(const QPalette* self) { QPalette::ColorGroup _ret = self->currentColorGroup(); return static_cast(_ret); diff --git a/qt/gen_qpalette.go b/qt/gen_qpalette.go index d461e164..7ae35434 100644 --- a/qt/gen_qpalette.go +++ b/qt/gen_qpalette.go @@ -151,6 +151,12 @@ func (this *QPalette) Swap(other *QPalette) { C.QPalette_Swap(this.h, other.cPointer()) } +func (this *QPalette) ToQVariant() *QVariant { + _goptr := newQVariant(C.QPalette_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QPalette) CurrentColorGroup() QPalette__ColorGroup { return (QPalette__ColorGroup)(C.QPalette_CurrentColorGroup(this.h)) } diff --git a/qt/gen_qpalette.h b/qt/gen_qpalette.h index c493ad04..9ecf1569 100644 --- a/qt/gen_qpalette.h +++ b/qt/gen_qpalette.h @@ -18,10 +18,12 @@ extern "C" { class QBrush; class QColor; class QPalette; +class QVariant; #else typedef struct QBrush QBrush; typedef struct QColor QColor; typedef struct QPalette QPalette; +typedef struct QVariant QVariant; #endif QPalette* QPalette_new(); @@ -33,6 +35,7 @@ QPalette* QPalette_new6(QColor* windowText, QColor* window, QColor* light, QColo QPalette* QPalette_new7(QPalette* palette); void QPalette_OperatorAssign(QPalette* self, QPalette* palette); void QPalette_Swap(QPalette* self, QPalette* other); +QVariant* QPalette_ToQVariant(const QPalette* self); int QPalette_CurrentColorGroup(const QPalette* self); void QPalette_SetCurrentColorGroup(QPalette* self, int cg); QColor* QPalette_Color(const QPalette* self, int cg, int cr); diff --git a/qt/gen_qpen.cpp b/qt/gen_qpen.cpp index 29b98c02..a7c25846 100644 --- a/qt/gen_qpen.cpp +++ b/qt/gen_qpen.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include #include "gen_qpen.h" @@ -171,6 +172,10 @@ bool QPen_OperatorNotEqual(const QPen* self, QPen* p) { return (*self != *p); } +QVariant* QPen_ToQVariant(const QPen* self) { + return new QVariant(self->operator QVariant()); +} + bool QPen_IsDetached(QPen* self) { return self->isDetached(); } diff --git a/qt/gen_qpen.go b/qt/gen_qpen.go index d6c8b467..64b8e58d 100644 --- a/qt/gen_qpen.go +++ b/qt/gen_qpen.go @@ -234,6 +234,12 @@ func (this *QPen) OperatorNotEqual(p *QPen) bool { return (bool)(C.QPen_OperatorNotEqual(this.h, p.cPointer())) } +func (this *QPen) ToQVariant() *QVariant { + _goptr := newQVariant(C.QPen_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QPen) IsDetached() bool { return (bool)(C.QPen_IsDetached(this.h)) } diff --git a/qt/gen_qpen.h b/qt/gen_qpen.h index deb336a6..ba950f4e 100644 --- a/qt/gen_qpen.h +++ b/qt/gen_qpen.h @@ -18,10 +18,12 @@ extern "C" { class QBrush; class QColor; class QPen; +class QVariant; #else typedef struct QBrush QBrush; typedef struct QColor QColor; typedef struct QPen QPen; +typedef struct QVariant QVariant; #endif QPen* QPen_new(); @@ -59,6 +61,7 @@ bool QPen_IsCosmetic(const QPen* self); void QPen_SetCosmetic(QPen* self, bool cosmetic); bool QPen_OperatorEqual(const QPen* self, QPen* p); bool QPen_OperatorNotEqual(const QPen* self, QPen* p); +QVariant* QPen_ToQVariant(const QPen* self); bool QPen_IsDetached(QPen* self); void QPen_Delete(QPen* self, bool isSubclass); diff --git a/qt/gen_qpixmap.cpp b/qt/gen_qpixmap.cpp index dbecf9ab..f8c551bc 100644 --- a/qt/gen_qpixmap.cpp +++ b/qt/gen_qpixmap.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include "gen_qpixmap.h" @@ -221,6 +222,10 @@ void QPixmap_Swap(QPixmap* self, QPixmap* other) { self->swap(*other); } +QVariant* QPixmap_ToQVariant(const QPixmap* self) { + return new QVariant(self->operator QVariant()); +} + bool QPixmap_IsNull(const QPixmap* self) { return self->isNull(); } diff --git a/qt/gen_qpixmap.go b/qt/gen_qpixmap.go index 8f492d13..3f0597e2 100644 --- a/qt/gen_qpixmap.go +++ b/qt/gen_qpixmap.go @@ -131,6 +131,12 @@ func (this *QPixmap) Swap(other *QPixmap) { C.QPixmap_Swap(this.h, other.cPointer()) } +func (this *QPixmap) ToQVariant() *QVariant { + _goptr := newQVariant(C.QPixmap_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QPixmap) IsNull() bool { return (bool)(C.QPixmap_IsNull(this.h)) } diff --git a/qt/gen_qpixmap.h b/qt/gen_qpixmap.h index 87bea52a..bb21294b 100644 --- a/qt/gen_qpixmap.h +++ b/qt/gen_qpixmap.h @@ -31,6 +31,7 @@ class QRect; class QRegion; class QSize; class QTransform; +class QVariant; #else typedef struct QBitmap QBitmap; typedef struct QColor QColor; @@ -48,6 +49,7 @@ typedef struct QRect QRect; typedef struct QRegion QRegion; typedef struct QSize QSize; typedef struct QTransform QTransform; +typedef struct QVariant QVariant; #endif QPixmap* QPixmap_new(); @@ -60,6 +62,7 @@ QPixmap* QPixmap_new7(struct miqt_string fileName, const char* format, int flags void QPixmap_virtbase(QPixmap* src, QPaintDevice** outptr_QPaintDevice); void QPixmap_OperatorAssign(QPixmap* self, QPixmap* param1); void QPixmap_Swap(QPixmap* self, QPixmap* other); +QVariant* QPixmap_ToQVariant(const QPixmap* self); bool QPixmap_IsNull(const QPixmap* self); int QPixmap_DevType(const QPixmap* self); int QPixmap_Width(const QPixmap* self); diff --git a/qt/gen_qquaternion.cpp b/qt/gen_qquaternion.cpp index e83021e6..811be499 100644 --- a/qt/gen_qquaternion.cpp +++ b/qt/gen_qquaternion.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -155,6 +156,10 @@ QVector4D* QQuaternion_ToVector4D(const QQuaternion* self) { return new QVector4D(self->toVector4D()); } +QVariant* QQuaternion_ToQVariant(const QQuaternion* self) { + return new QVariant(self->operator QVariant()); +} + void QQuaternion_GetAxisAndAngle(const QQuaternion* self, QVector3D* axis, float* angle) { self->getAxisAndAngle(axis, static_cast(angle)); } diff --git a/qt/gen_qquaternion.go b/qt/gen_qquaternion.go index 9acc235b..584e6256 100644 --- a/qt/gen_qquaternion.go +++ b/qt/gen_qquaternion.go @@ -220,6 +220,12 @@ func (this *QQuaternion) ToVector4D() *QVector4D { return _goptr } +func (this *QQuaternion) ToQVariant() *QVariant { + _goptr := newQVariant(C.QQuaternion_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QQuaternion) GetAxisAndAngle(axis *QVector3D, angle *float32) { C.QQuaternion_GetAxisAndAngle(this.h, axis.cPointer(), (*C.float)(unsafe.Pointer(angle))) } diff --git a/qt/gen_qquaternion.h b/qt/gen_qquaternion.h index 1b67c509..78828508 100644 --- a/qt/gen_qquaternion.h +++ b/qt/gen_qquaternion.h @@ -16,10 +16,12 @@ extern "C" { #ifdef __cplusplus class QQuaternion; +class QVariant; class QVector3D; class QVector4D; #else typedef struct QQuaternion QQuaternion; +typedef struct QVariant QVariant; typedef struct QVector3D QVector3D; typedef struct QVector4D QVector4D; #endif @@ -58,6 +60,7 @@ QQuaternion* QQuaternion_OperatorMultiplyAssign(QQuaternion* self, float factor) QQuaternion* QQuaternion_OperatorMultiplyAssignWithQuaternion(QQuaternion* self, QQuaternion* quaternion); QQuaternion* QQuaternion_OperatorDivideAssign(QQuaternion* self, float divisor); QVector4D* QQuaternion_ToVector4D(const QQuaternion* self); +QVariant* QQuaternion_ToQVariant(const QQuaternion* self); void QQuaternion_GetAxisAndAngle(const QQuaternion* self, QVector3D* axis, float* angle); QQuaternion* QQuaternion_FromAxisAndAngle(QVector3D* axis, float angle); void QQuaternion_GetAxisAndAngle2(const QQuaternion* self, float* x, float* y, float* z, float* angle); diff --git a/qt/gen_qregion.cpp b/qt/gen_qregion.cpp index e0aef878..287cbb28 100644 --- a/qt/gen_qregion.cpp +++ b/qt/gen_qregion.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include "gen_qregion.h" @@ -226,6 +227,10 @@ bool QRegion_OperatorNotEqual(const QRegion* self, QRegion* r) { return (*self != *r); } +QVariant* QRegion_ToQVariant(const QRegion* self) { + return new QVariant(self->operator QVariant()); +} + void QRegion_Delete(QRegion* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); diff --git a/qt/gen_qregion.go b/qt/gen_qregion.go index b364b31f..edbd8d78 100644 --- a/qt/gen_qregion.go +++ b/qt/gen_qregion.go @@ -317,6 +317,12 @@ func (this *QRegion) OperatorNotEqual(r *QRegion) bool { return (bool)(C.QRegion_OperatorNotEqual(this.h, r.cPointer())) } +func (this *QRegion) ToQVariant() *QVariant { + _goptr := newQVariant(C.QRegion_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + // Delete this object from C++ memory. func (this *QRegion) Delete() { C.QRegion_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt/gen_qregion.h b/qt/gen_qregion.h index 189da142..ebf2e872 100644 --- a/qt/gen_qregion.h +++ b/qt/gen_qregion.h @@ -19,11 +19,13 @@ class QBitmap; class QPoint; class QRect; class QRegion; +class QVariant; #else typedef struct QBitmap QBitmap; typedef struct QPoint QPoint; typedef struct QRect QRect; typedef struct QRegion QRegion; +typedef struct QVariant QVariant; #endif QRegion* QRegion_new(); @@ -75,6 +77,7 @@ QRegion* QRegion_OperatorMinusAssign(QRegion* self, QRegion* r); void QRegion_OperatorBitwiseNotAssign(QRegion* self, QRegion* r); bool QRegion_OperatorEqual(const QRegion* self, QRegion* r); bool QRegion_OperatorNotEqual(const QRegion* self, QRegion* r); +QVariant* QRegion_ToQVariant(const QRegion* self); void QRegion_Delete(QRegion* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qrgba64.cpp b/qt/gen_qrgba64.cpp index 64ef6959..6032ccca 100644 --- a/qt/gen_qrgba64.cpp +++ b/qt/gen_qrgba64.cpp @@ -113,6 +113,11 @@ QRgba64* QRgba64_Unpremultiplied(const QRgba64* self) { return new QRgba64(self->unpremultiplied()); } +unsigned long long QRgba64_ToUnsignedLongLong(const QRgba64* self) { + quint64 _ret = self->operator unsigned long long(); + return static_cast(_ret); +} + void QRgba64_OperatorAssign(QRgba64* self, unsigned long long _rgba) { self->operator=(static_cast(_rgba)); } diff --git a/qt/gen_qrgba64.go b/qt/gen_qrgba64.go index 0fa9d94a..d1f1e4e6 100644 --- a/qt/gen_qrgba64.go +++ b/qt/gen_qrgba64.go @@ -162,6 +162,10 @@ func (this *QRgba64) Unpremultiplied() *QRgba64 { return _goptr } +func (this *QRgba64) ToUnsignedLongLong() uint64 { + return (uint64)(C.QRgba64_ToUnsignedLongLong(this.h)) +} + func (this *QRgba64) OperatorAssign(_rgba uint64) { C.QRgba64_OperatorAssign(this.h, (C.ulonglong)(_rgba)) } diff --git a/qt/gen_qrgba64.h b/qt/gen_qrgba64.h index 8caf82d1..d892a205 100644 --- a/qt/gen_qrgba64.h +++ b/qt/gen_qrgba64.h @@ -44,6 +44,7 @@ unsigned int QRgba64_ToArgb32(const QRgba64* self); uint16_t QRgba64_ToRgb16(const QRgba64* self); QRgba64* QRgba64_Premultiplied(const QRgba64* self); QRgba64* QRgba64_Unpremultiplied(const QRgba64* self); +unsigned long long QRgba64_ToUnsignedLongLong(const QRgba64* self); void QRgba64_OperatorAssign(QRgba64* self, unsigned long long _rgba); void QRgba64_Delete(QRgba64* self, bool isSubclass); diff --git a/qt/gen_qsizepolicy.cpp b/qt/gen_qsizepolicy.cpp index b7ac475c..fe7e9d58 100644 --- a/qt/gen_qsizepolicy.cpp +++ b/qt/gen_qsizepolicy.cpp @@ -1,4 +1,5 @@ #include +#include #include #include "gen_qsizepolicy.h" @@ -79,6 +80,10 @@ bool QSizePolicy_OperatorNotEqual(const QSizePolicy* self, QSizePolicy* s) { return (*self != *s); } +QVariant* QSizePolicy_ToQVariant(const QSizePolicy* self) { + return new QVariant(self->operator QVariant()); +} + int QSizePolicy_HorizontalStretch(const QSizePolicy* self) { return self->horizontalStretch(); } diff --git a/qt/gen_qsizepolicy.go b/qt/gen_qsizepolicy.go index c144dd18..b7dadac2 100644 --- a/qt/gen_qsizepolicy.go +++ b/qt/gen_qsizepolicy.go @@ -171,6 +171,12 @@ func (this *QSizePolicy) OperatorNotEqual(s *QSizePolicy) bool { return (bool)(C.QSizePolicy_OperatorNotEqual(this.h, s.cPointer())) } +func (this *QSizePolicy) ToQVariant() *QVariant { + _goptr := newQVariant(C.QSizePolicy_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QSizePolicy) HorizontalStretch() int { return (int)(C.QSizePolicy_HorizontalStretch(this.h)) } diff --git a/qt/gen_qsizepolicy.h b/qt/gen_qsizepolicy.h index eb9c1c0c..5751067b 100644 --- a/qt/gen_qsizepolicy.h +++ b/qt/gen_qsizepolicy.h @@ -16,8 +16,10 @@ extern "C" { #ifdef __cplusplus class QSizePolicy; +class QVariant; #else typedef struct QSizePolicy QSizePolicy; +typedef struct QVariant QVariant; #endif QSizePolicy* QSizePolicy_new(); @@ -37,6 +39,7 @@ void QSizePolicy_SetWidthForHeight(QSizePolicy* self, bool b); bool QSizePolicy_HasWidthForHeight(const QSizePolicy* self); bool QSizePolicy_OperatorEqual(const QSizePolicy* self, QSizePolicy* s); bool QSizePolicy_OperatorNotEqual(const QSizePolicy* self, QSizePolicy* s); +QVariant* QSizePolicy_ToQVariant(const QSizePolicy* self); int QSizePolicy_HorizontalStretch(const QSizePolicy* self); int QSizePolicy_VerticalStretch(const QSizePolicy* self); void QSizePolicy_SetHorizontalStretch(QSizePolicy* self, int stretchFactor); diff --git a/qt/gen_qsocketnotifier.cpp b/qt/gen_qsocketnotifier.cpp index 3034690e..60d8aa8f 100644 --- a/qt/gen_qsocketnotifier.cpp +++ b/qt/gen_qsocketnotifier.cpp @@ -382,6 +382,16 @@ QSocketDescriptor* QSocketDescriptor_new3(int descriptor) { #endif } +int QSocketDescriptor_ToInt(const QSocketDescriptor* self) { +#ifdef Q_OS_LINUX + QSocketDescriptor::DescriptorType _ret = self->operator int(); + return static_cast(_ret); +#else + int _ret_invalidOS; + return _ret_invalidOS; +#endif +} + bool QSocketDescriptor_IsValid(const QSocketDescriptor* self) { return self->isValid(); } diff --git a/qt/gen_qsocketnotifier.go b/qt/gen_qsocketnotifier.go index 2648dad1..3da039ea 100644 --- a/qt/gen_qsocketnotifier.go +++ b/qt/gen_qsocketnotifier.go @@ -426,6 +426,14 @@ func NewQSocketDescriptor3(descriptor int) *QSocketDescriptor { return ret } +func (this *QSocketDescriptor) ToInt() int { + if runtime.GOOS != "linux" { + panic("Unsupported OS") + } + + return (int)(C.QSocketDescriptor_ToInt(this.h)) +} + func (this *QSocketDescriptor) IsValid() bool { return (bool)(C.QSocketDescriptor_IsValid(this.h)) } diff --git a/qt/gen_qsocketnotifier.h b/qt/gen_qsocketnotifier.h index bf67db92..ac9a70f3 100644 --- a/qt/gen_qsocketnotifier.h +++ b/qt/gen_qsocketnotifier.h @@ -69,6 +69,7 @@ void QSocketNotifier_Delete(QSocketNotifier* self, bool isSubclass); QSocketDescriptor* QSocketDescriptor_new(); QSocketDescriptor* QSocketDescriptor_new2(QSocketDescriptor* param1); QSocketDescriptor* QSocketDescriptor_new3(int descriptor); +int QSocketDescriptor_ToInt(const QSocketDescriptor* self); bool QSocketDescriptor_IsValid(const QSocketDescriptor* self); void QSocketDescriptor_Delete(QSocketDescriptor* self, bool isSubclass); diff --git a/qt/gen_qtextformat.cpp b/qt/gen_qtextformat.cpp index dbea6c72..2eff05e4 100644 --- a/qt/gen_qtextformat.cpp +++ b/qt/gen_qtextformat.cpp @@ -61,6 +61,10 @@ bool QTextLength_OperatorNotEqual(const QTextLength* self, QTextLength* other) { return (*self != *other); } +QVariant* QTextLength_ToQVariant(const QTextLength* self) { + return new QVariant(self->operator QVariant()); +} + void QTextLength_Delete(QTextLength* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); @@ -286,6 +290,10 @@ bool QTextFormat_OperatorNotEqual(const QTextFormat* self, QTextFormat* rhs) { return (*self != *rhs); } +QVariant* QTextFormat_ToQVariant(const QTextFormat* self) { + return new QVariant(self->operator QVariant()); +} + void QTextFormat_SetLayoutDirection(QTextFormat* self, int direction) { self->setLayoutDirection(static_cast(direction)); } diff --git a/qt/gen_qtextformat.go b/qt/gen_qtextformat.go index 8088b8f9..1fffbb7b 100644 --- a/qt/gen_qtextformat.go +++ b/qt/gen_qtextformat.go @@ -326,6 +326,12 @@ func (this *QTextLength) OperatorNotEqual(other *QTextLength) bool { return (bool)(C.QTextLength_OperatorNotEqual(this.h, other.cPointer())) } +func (this *QTextLength) ToQVariant() *QVariant { + _goptr := newQVariant(C.QTextLength_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + // Delete this object from C++ memory. func (this *QTextLength) Delete() { C.QTextLength_Delete(this.h, C.bool(this.isSubclass)) @@ -619,6 +625,12 @@ func (this *QTextFormat) OperatorNotEqual(rhs *QTextFormat) bool { return (bool)(C.QTextFormat_OperatorNotEqual(this.h, rhs.cPointer())) } +func (this *QTextFormat) ToQVariant() *QVariant { + _goptr := newQVariant(C.QTextFormat_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QTextFormat) SetLayoutDirection(direction LayoutDirection) { C.QTextFormat_SetLayoutDirection(this.h, (C.int)(direction)) } diff --git a/qt/gen_qtextformat.h b/qt/gen_qtextformat.h index 4df67156..56c01a36 100644 --- a/qt/gen_qtextformat.h +++ b/qt/gen_qtextformat.h @@ -60,6 +60,7 @@ double QTextLength_Value(const QTextLength* self, double maximumLength); double QTextLength_RawValue(const QTextLength* self); bool QTextLength_OperatorEqual(const QTextLength* self, QTextLength* other); bool QTextLength_OperatorNotEqual(const QTextLength* self, QTextLength* other); +QVariant* QTextLength_ToQVariant(const QTextLength* self); void QTextLength_Delete(QTextLength* self, bool isSubclass); QTextFormat* QTextFormat_new(); @@ -107,6 +108,7 @@ QTextImageFormat* QTextFormat_ToImageFormat(const QTextFormat* self); QTextTableCellFormat* QTextFormat_ToTableCellFormat(const QTextFormat* self); bool QTextFormat_OperatorEqual(const QTextFormat* self, QTextFormat* rhs); bool QTextFormat_OperatorNotEqual(const QTextFormat* self, QTextFormat* rhs); +QVariant* QTextFormat_ToQVariant(const QTextFormat* self); void QTextFormat_SetLayoutDirection(QTextFormat* self, int direction); int QTextFormat_LayoutDirection(const QTextFormat* self); void QTextFormat_SetBackground(QTextFormat* self, QBrush* brush); diff --git a/qt/gen_qtransform.cpp b/qt/gen_qtransform.cpp index 9131750e..0f6e3fb5 100644 --- a/qt/gen_qtransform.cpp +++ b/qt/gen_qtransform.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include "gen_qtransform.h" @@ -206,6 +207,10 @@ QTransform* QTransform_OperatorMultiply(const QTransform* self, QTransform* o) { return new QTransform(self->operator*(*o)); } +QVariant* QTransform_ToQVariant(const QTransform* self) { + return new QVariant(self->operator QVariant()); +} + void QTransform_Reset(QTransform* self) { self->reset(); } diff --git a/qt/gen_qtransform.go b/qt/gen_qtransform.go index 427855d1..657aef72 100644 --- a/qt/gen_qtransform.go +++ b/qt/gen_qtransform.go @@ -257,6 +257,12 @@ func (this *QTransform) OperatorMultiply(o *QTransform) *QTransform { return _goptr } +func (this *QTransform) ToQVariant() *QVariant { + _goptr := newQVariant(C.QTransform_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QTransform) Reset() { C.QTransform_Reset(this.h) } diff --git a/qt/gen_qtransform.h b/qt/gen_qtransform.h index 6964c667..038889f6 100644 --- a/qt/gen_qtransform.h +++ b/qt/gen_qtransform.h @@ -25,6 +25,7 @@ class QRect; class QRectF; class QRegion; class QTransform; +class QVariant; #else typedef struct QLine QLine; typedef struct QLineF QLineF; @@ -36,6 +37,7 @@ typedef struct QRect QRect; typedef struct QRectF QRectF; typedef struct QRegion QRegion; typedef struct QTransform QTransform; +typedef struct QVariant QVariant; #endif QTransform* QTransform_new(int param1); @@ -79,6 +81,7 @@ bool QTransform_OperatorEqual(const QTransform* self, QTransform* param1); bool QTransform_OperatorNotEqual(const QTransform* self, QTransform* param1); QTransform* QTransform_OperatorMultiplyAssign(QTransform* self, QTransform* param1); QTransform* QTransform_OperatorMultiply(const QTransform* self, QTransform* o); +QVariant* QTransform_ToQVariant(const QTransform* self); void QTransform_Reset(QTransform* self); QPoint* QTransform_Map(const QTransform* self, QPoint* p); QPointF* QTransform_MapWithQPointF(const QTransform* self, QPointF* p); diff --git a/qt/gen_qvector2d.cpp b/qt/gen_qvector2d.cpp index d82b9c8a..e5cc2f8f 100644 --- a/qt/gen_qvector2d.cpp +++ b/qt/gen_qvector2d.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -147,6 +148,10 @@ QPointF* QVector2D_ToPointF(const QVector2D* self) { return new QPointF(self->toPointF()); } +QVariant* QVector2D_ToQVariant(const QVector2D* self) { + return new QVariant(self->operator QVariant()); +} + void QVector2D_Delete(QVector2D* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); diff --git a/qt/gen_qvector2d.go b/qt/gen_qvector2d.go index 8f43b8a1..f7a7cc87 100644 --- a/qt/gen_qvector2d.go +++ b/qt/gen_qvector2d.go @@ -212,6 +212,12 @@ func (this *QVector2D) ToPointF() *QPointF { return _goptr } +func (this *QVector2D) ToQVariant() *QVariant { + _goptr := newQVariant(C.QVector2D_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + // Delete this object from C++ memory. func (this *QVector2D) Delete() { C.QVector2D_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt/gen_qvector2d.h b/qt/gen_qvector2d.h index 76ec011a..a1bbea7a 100644 --- a/qt/gen_qvector2d.h +++ b/qt/gen_qvector2d.h @@ -17,12 +17,14 @@ extern "C" { #ifdef __cplusplus class QPoint; class QPointF; +class QVariant; class QVector2D; class QVector3D; class QVector4D; #else typedef struct QPoint QPoint; typedef struct QPointF QPointF; +typedef struct QVariant QVariant; typedef struct QVector2D QVector2D; typedef struct QVector3D QVector3D; typedef struct QVector4D QVector4D; @@ -59,6 +61,7 @@ QVector3D* QVector2D_ToVector3D(const QVector2D* self); QVector4D* QVector2D_ToVector4D(const QVector2D* self); QPoint* QVector2D_ToPoint(const QVector2D* self); QPointF* QVector2D_ToPointF(const QVector2D* self); +QVariant* QVector2D_ToQVariant(const QVector2D* self); void QVector2D_Delete(QVector2D* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qvector3d.cpp b/qt/gen_qvector3d.cpp index ed79b876..838fde18 100644 --- a/qt/gen_qvector3d.cpp +++ b/qt/gen_qvector3d.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include @@ -189,6 +190,10 @@ QPointF* QVector3D_ToPointF(const QVector3D* self) { return new QPointF(self->toPointF()); } +QVariant* QVector3D_ToQVariant(const QVector3D* self) { + return new QVariant(self->operator QVariant()); +} + void QVector3D_Delete(QVector3D* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); diff --git a/qt/gen_qvector3d.go b/qt/gen_qvector3d.go index 01203458..a8f83340 100644 --- a/qt/gen_qvector3d.go +++ b/qt/gen_qvector3d.go @@ -266,6 +266,12 @@ func (this *QVector3D) ToPointF() *QPointF { return _goptr } +func (this *QVector3D) ToQVariant() *QVariant { + _goptr := newQVariant(C.QVector3D_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + // Delete this object from C++ memory. func (this *QVector3D) Delete() { C.QVector3D_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt/gen_qvector3d.h b/qt/gen_qvector3d.h index cb57aa70..24285fa8 100644 --- a/qt/gen_qvector3d.h +++ b/qt/gen_qvector3d.h @@ -19,6 +19,7 @@ class QMatrix4x4; class QPoint; class QPointF; class QRect; +class QVariant; class QVector2D; class QVector3D; class QVector4D; @@ -27,6 +28,7 @@ typedef struct QMatrix4x4 QMatrix4x4; typedef struct QPoint QPoint; typedef struct QPointF QPointF; typedef struct QRect QRect; +typedef struct QVariant QVariant; typedef struct QVector2D QVector2D; typedef struct QVector3D QVector3D; typedef struct QVector4D QVector4D; @@ -73,6 +75,7 @@ QVector2D* QVector3D_ToVector2D(const QVector3D* self); QVector4D* QVector3D_ToVector4D(const QVector3D* self); QPoint* QVector3D_ToPoint(const QVector3D* self); QPointF* QVector3D_ToPointF(const QVector3D* self); +QVariant* QVector3D_ToQVariant(const QVector3D* self); void QVector3D_Delete(QVector3D* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qvector4d.cpp b/qt/gen_qvector4d.cpp index c00b9ab9..90ced0b1 100644 --- a/qt/gen_qvector4d.cpp +++ b/qt/gen_qvector4d.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -171,6 +172,10 @@ QPointF* QVector4D_ToPointF(const QVector4D* self) { return new QPointF(self->toPointF()); } +QVariant* QVector4D_ToQVariant(const QVector4D* self) { + return new QVariant(self->operator QVariant()); +} + void QVector4D_Delete(QVector4D* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); diff --git a/qt/gen_qvector4d.go b/qt/gen_qvector4d.go index dce35e9c..9fceaae7 100644 --- a/qt/gen_qvector4d.go +++ b/qt/gen_qvector4d.go @@ -248,6 +248,12 @@ func (this *QVector4D) ToPointF() *QPointF { return _goptr } +func (this *QVector4D) ToQVariant() *QVariant { + _goptr := newQVariant(C.QVector4D_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + // Delete this object from C++ memory. func (this *QVector4D) Delete() { C.QVector4D_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt/gen_qvector4d.h b/qt/gen_qvector4d.h index e7f0f8f1..28b46e7c 100644 --- a/qt/gen_qvector4d.h +++ b/qt/gen_qvector4d.h @@ -17,12 +17,14 @@ extern "C" { #ifdef __cplusplus class QPoint; class QPointF; +class QVariant; class QVector2D; class QVector3D; class QVector4D; #else typedef struct QPoint QPoint; typedef struct QPointF QPointF; +typedef struct QVariant QVariant; typedef struct QVector2D QVector2D; typedef struct QVector3D QVector3D; typedef struct QVector4D QVector4D; @@ -65,6 +67,7 @@ QVector3D* QVector4D_ToVector3D(const QVector4D* self); QVector3D* QVector4D_ToVector3DAffine(const QVector4D* self); QPoint* QVector4D_ToPoint(const QVector4D* self); QPointF* QVector4D_ToPointF(const QVector4D* self); +QVariant* QVector4D_ToQVariant(const QVector4D* self); void QVector4D_Delete(QVector4D* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/script/gen_qscriptstring.cpp b/qt/script/gen_qscriptstring.cpp index c292edef..f8a816d2 100644 --- a/qt/script/gen_qscriptstring.cpp +++ b/qt/script/gen_qscriptstring.cpp @@ -50,6 +50,17 @@ struct miqt_string QScriptString_ToString(const QScriptString* self) { return _ms; } +struct miqt_string QScriptString_ToQString(const QScriptString* self) { + QString _ret = self->operator 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + unsigned int QScriptString_ToArrayIndex1(const QScriptString* self, bool* ok) { quint32 _ret = self->toArrayIndex(ok); return static_cast(_ret); diff --git a/qt/script/gen_qscriptstring.go b/qt/script/gen_qscriptstring.go index 493332b4..55faac77 100644 --- a/qt/script/gen_qscriptstring.go +++ b/qt/script/gen_qscriptstring.go @@ -89,6 +89,13 @@ func (this *QScriptString) ToString() string { return _ret } +func (this *QScriptString) ToQString() string { + var _ms C.struct_miqt_string = C.QScriptString_ToQString(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + func (this *QScriptString) ToArrayIndex1(ok *bool) uint { return (uint)(C.QScriptString_ToArrayIndex1(this.h, (*C.bool)(unsafe.Pointer(ok)))) } diff --git a/qt/script/gen_qscriptstring.h b/qt/script/gen_qscriptstring.h index 25a663d2..ae353494 100644 --- a/qt/script/gen_qscriptstring.h +++ b/qt/script/gen_qscriptstring.h @@ -28,6 +28,7 @@ bool QScriptString_OperatorEqual(const QScriptString* self, QScriptString* other bool QScriptString_OperatorNotEqual(const QScriptString* self, QScriptString* other); unsigned int QScriptString_ToArrayIndex(const QScriptString* self); struct miqt_string QScriptString_ToString(const QScriptString* self); +struct miqt_string QScriptString_ToQString(const QScriptString* self); unsigned int QScriptString_ToArrayIndex1(const QScriptString* self, bool* ok); void QScriptString_Delete(QScriptString* self, bool isSubclass); diff --git a/qt6/cbor/gen_qcborcommon.cpp b/qt6/cbor/gen_qcborcommon.cpp index c96cbcda..43b83da9 100644 --- a/qt6/cbor/gen_qcborcommon.cpp +++ b/qt6/cbor/gen_qcborcommon.cpp @@ -10,6 +10,11 @@ #endif #include "_cgo_export.h" +int QCborError_ToQCborError__Code(const QCborError* self) { + QCborError::Code _ret = self->operator QCborError::Code(); + return static_cast(_ret); +} + struct miqt_string QCborError_ToString(const QCborError* self) { QString _ret = self->toString(); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory diff --git a/qt6/cbor/gen_qcborcommon.go b/qt6/cbor/gen_qcborcommon.go index 175078ab..fa68feb2 100644 --- a/qt6/cbor/gen_qcborcommon.go +++ b/qt6/cbor/gen_qcborcommon.go @@ -107,6 +107,10 @@ func UnsafeNewQCborError(h unsafe.Pointer) *QCborError { return newQCborError((*C.QCborError)(h)) } +func (this *QCborError) ToQCborError__Code() QCborError__Code { + return (QCborError__Code)(C.QCborError_ToQCborError__Code(this.h)) +} + func (this *QCborError) ToString() string { var _ms C.struct_miqt_string = C.QCborError_ToString(this.h) _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) diff --git a/qt6/cbor/gen_qcborcommon.h b/qt6/cbor/gen_qcborcommon.h index 15d1c03f..badbcd17 100644 --- a/qt6/cbor/gen_qcborcommon.h +++ b/qt6/cbor/gen_qcborcommon.h @@ -20,6 +20,7 @@ class QCborError; typedef struct QCborError QCborError; #endif +int QCborError_ToQCborError__Code(const QCborError* self); struct miqt_string QCborError_ToString(const QCborError* self); void QCborError_Delete(QCborError* self, bool isSubclass); diff --git a/qt6/cbor/gen_qcborvalue.cpp b/qt6/cbor/gen_qcborvalue.cpp index e33cdbdc..e5fbd431 100644 --- a/qt6/cbor/gen_qcborvalue.cpp +++ b/qt6/cbor/gen_qcborvalue.cpp @@ -510,6 +510,10 @@ QCborValueConstRef* QCborValueConstRef_new(QCborValueConstRef* param1) { return new QCborValueConstRef(*param1); } +QCborValue* QCborValueConstRef_ToQCborValue(const QCborValueConstRef* self) { + return new QCborValue(self->operator QCborValue()); +} + int QCborValueConstRef_Type(const QCborValueConstRef* self) { QCborValue::Type _ret = self->type(); return static_cast(_ret); @@ -853,6 +857,10 @@ QCborValueRef* QCborValueRef_OperatorSubscript2(QCborValueRef* self, struct miqt return new QCborValueRef(self->operator[](key_QString)); } +QCborValue* QCborValueRef_ToQCborValue(const QCborValueRef* self) { + return new QCborValue(self->operator QCborValue()); +} + int QCborValueRef_Type(const QCborValueRef* self) { QCborValue::Type _ret = self->type(); return static_cast(_ret); diff --git a/qt6/cbor/gen_qcborvalue.go b/qt6/cbor/gen_qcborvalue.go index 2df04e0b..3ae12c55 100644 --- a/qt6/cbor/gen_qcborvalue.go +++ b/qt6/cbor/gen_qcborvalue.go @@ -792,6 +792,12 @@ func NewQCborValueConstRef(param1 *QCborValueConstRef) *QCborValueConstRef { return ret } +func (this *QCborValueConstRef) ToQCborValue() *QCborValue { + _goptr := newQCborValue(C.QCborValueConstRef_ToQCborValue(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QCborValueConstRef) Type() QCborValue__Type { return (QCborValue__Type)(C.QCborValueConstRef_Type(this.h)) } @@ -1198,6 +1204,12 @@ func (this *QCborValueRef) OperatorSubscript2(key string) *QCborValueRef { return _goptr } +func (this *QCborValueRef) ToQCborValue() *QCborValue { + _goptr := newQCborValue(C.QCborValueRef_ToQCborValue(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QCborValueRef) Type() QCborValue__Type { return (QCborValue__Type)(C.QCborValueRef_Type(this.h)) } diff --git a/qt6/cbor/gen_qcborvalue.h b/qt6/cbor/gen_qcborvalue.h index a7e745ec..15c10a23 100644 --- a/qt6/cbor/gen_qcborvalue.h +++ b/qt6/cbor/gen_qcborvalue.h @@ -150,6 +150,7 @@ struct miqt_string QCborValue_ToDiagnosticNotation1(const QCborValue* self, int void QCborValue_Delete(QCborValue* self, bool isSubclass); QCborValueConstRef* QCborValueConstRef_new(QCborValueConstRef* param1); +QCborValue* QCborValueConstRef_ToQCborValue(const QCborValueConstRef* self); int QCborValueConstRef_Type(const QCborValueConstRef* self); bool QCborValueConstRef_IsInteger(const QCborValueConstRef* self); bool QCborValueConstRef_IsByteArray(const QCborValueConstRef* self); @@ -221,6 +222,7 @@ void QCborValueRef_OperatorAssign(QCborValueRef* self, QCborValue* other); void QCborValueRef_OperatorAssignWithOther(QCborValueRef* self, QCborValueRef* other); QCborValueRef* QCborValueRef_OperatorSubscript(QCborValueRef* self, long long key); QCborValueRef* QCborValueRef_OperatorSubscript2(QCborValueRef* self, struct miqt_string key); +QCborValue* QCborValueRef_ToQCborValue(const QCborValueRef* self); int QCborValueRef_Type(const QCborValueRef* self); bool QCborValueRef_IsInteger(const QCborValueRef* self); bool QCborValueRef_IsByteArray(const QCborValueRef* self); diff --git a/qt6/gen_qabstractitemmodel.cpp b/qt6/gen_qabstractitemmodel.cpp index d0c4ba1e..685e3be5 100644 --- a/qt6/gen_qabstractitemmodel.cpp +++ b/qt6/gen_qabstractitemmodel.cpp @@ -258,6 +258,10 @@ void QPersistentModelIndex_OperatorAssignWithOther(QPersistentModelIndex* self, self->operator=(*other); } +QModelIndex* QPersistentModelIndex_ToQModelIndex(const QPersistentModelIndex* self) { + return new QModelIndex(self->operator QModelIndex()); +} + int QPersistentModelIndex_Row(const QPersistentModelIndex* self) { return self->row(); } diff --git a/qt6/gen_qabstractitemmodel.go b/qt6/gen_qabstractitemmodel.go index 8e189a74..11fbfe5d 100644 --- a/qt6/gen_qabstractitemmodel.go +++ b/qt6/gen_qabstractitemmodel.go @@ -457,6 +457,12 @@ func (this *QPersistentModelIndex) OperatorAssignWithOther(other *QModelIndex) { C.QPersistentModelIndex_OperatorAssignWithOther(this.h, other.cPointer()) } +func (this *QPersistentModelIndex) ToQModelIndex() *QModelIndex { + _goptr := newQModelIndex(C.QPersistentModelIndex_ToQModelIndex(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QPersistentModelIndex) Row() int { return (int)(C.QPersistentModelIndex_Row(this.h)) } diff --git a/qt6/gen_qabstractitemmodel.h b/qt6/gen_qabstractitemmodel.h index 84fcd722..0d78c71b 100644 --- a/qt6/gen_qabstractitemmodel.h +++ b/qt6/gen_qabstractitemmodel.h @@ -105,6 +105,7 @@ void QPersistentModelIndex_Swap(QPersistentModelIndex* self, QPersistentModelInd bool QPersistentModelIndex_OperatorEqualWithOther(const QPersistentModelIndex* self, QModelIndex* other); bool QPersistentModelIndex_OperatorNotEqualWithOther(const QPersistentModelIndex* self, QModelIndex* other); void QPersistentModelIndex_OperatorAssignWithOther(QPersistentModelIndex* self, QModelIndex* other); +QModelIndex* QPersistentModelIndex_ToQModelIndex(const QPersistentModelIndex* self); int QPersistentModelIndex_Row(const QPersistentModelIndex* self); int QPersistentModelIndex_Column(const QPersistentModelIndex* self); void* QPersistentModelIndex_InternalPointer(const QPersistentModelIndex* self); diff --git a/qt6/gen_qbitarray.cpp b/qt6/gen_qbitarray.cpp index 0d61226e..fb3e9638 100644 --- a/qt6/gen_qbitarray.cpp +++ b/qt6/gen_qbitarray.cpp @@ -169,6 +169,10 @@ QBitRef* QBitRef_new(QBitRef* param1) { return new QBitRef(*param1); } +bool QBitRef_ToBool(const QBitRef* self) { + return self->operator bool(); +} + bool QBitRef_OperatorNot(const QBitRef* self) { return self->operator!(); } diff --git a/qt6/gen_qbitarray.go b/qt6/gen_qbitarray.go index 2140119e..f51b6c95 100644 --- a/qt6/gen_qbitarray.go +++ b/qt6/gen_qbitarray.go @@ -268,6 +268,10 @@ func NewQBitRef(param1 *QBitRef) *QBitRef { return ret } +func (this *QBitRef) ToBool() bool { + return (bool)(C.QBitRef_ToBool(this.h)) +} + func (this *QBitRef) OperatorNot() bool { return (bool)(C.QBitRef_OperatorNot(this.h)) } diff --git a/qt6/gen_qbitarray.h b/qt6/gen_qbitarray.h index 559e7551..8fc28e2f 100644 --- a/qt6/gen_qbitarray.h +++ b/qt6/gen_qbitarray.h @@ -61,6 +61,7 @@ unsigned int QBitArray_ToUInt322(const QBitArray* self, int endianness, bool* ok void QBitArray_Delete(QBitArray* self, bool isSubclass); QBitRef* QBitRef_new(QBitRef* param1); +bool QBitRef_ToBool(const QBitRef* self); bool QBitRef_OperatorNot(const QBitRef* self); void QBitRef_OperatorAssign(QBitRef* self, QBitRef* val); void QBitRef_OperatorAssignWithVal(QBitRef* self, bool val); diff --git a/qt6/gen_qbitmap.cpp b/qt6/gen_qbitmap.cpp index 48dc04e4..427c704e 100644 --- a/qt6/gen_qbitmap.cpp +++ b/qt6/gen_qbitmap.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include "gen_qbitmap.h" @@ -141,6 +142,10 @@ void QBitmap_Swap(QBitmap* self, QBitmap* other) { self->swap(*other); } +QVariant* QBitmap_ToQVariant(const QBitmap* self) { + return new QVariant(self->operator QVariant()); +} + void QBitmap_Clear(QBitmap* self) { self->clear(); } diff --git a/qt6/gen_qbitmap.go b/qt6/gen_qbitmap.go index 7aad24b5..8a768c82 100644 --- a/qt6/gen_qbitmap.go +++ b/qt6/gen_qbitmap.go @@ -125,6 +125,12 @@ func (this *QBitmap) Swap(other *QBitmap) { C.QBitmap_Swap(this.h, other.cPointer()) } +func (this *QBitmap) ToQVariant() *QVariant { + _goptr := newQVariant(C.QBitmap_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QBitmap) Clear() { C.QBitmap_Clear(this.h) } diff --git a/qt6/gen_qbitmap.h b/qt6/gen_qbitmap.h index 75db7a44..a44ec7ec 100644 --- a/qt6/gen_qbitmap.h +++ b/qt6/gen_qbitmap.h @@ -22,6 +22,7 @@ class QPaintEngine; class QPixmap; class QSize; class QTransform; +class QVariant; #else typedef struct QBitmap QBitmap; typedef struct QImage QImage; @@ -30,6 +31,7 @@ typedef struct QPaintEngine QPaintEngine; typedef struct QPixmap QPixmap; typedef struct QSize QSize; typedef struct QTransform QTransform; +typedef struct QVariant QVariant; #endif QBitmap* QBitmap_new(); @@ -42,6 +44,7 @@ QBitmap* QBitmap_new7(struct miqt_string fileName, const char* format); void QBitmap_virtbase(QBitmap* src, QPixmap** outptr_QPixmap); void QBitmap_OperatorAssign(QBitmap* self, QPixmap* param1); void QBitmap_Swap(QBitmap* self, QBitmap* other); +QVariant* QBitmap_ToQVariant(const QBitmap* self); void QBitmap_Clear(QBitmap* self); QBitmap* QBitmap_FromImage(QImage* image); QBitmap* QBitmap_FromData(QSize* size, const unsigned char* bits); diff --git a/qt6/gen_qbrush.cpp b/qt6/gen_qbrush.cpp index 60fca910..fdd1c96f 100644 --- a/qt6/gen_qbrush.cpp +++ b/qt6/gen_qbrush.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include "gen_qbrush.h" @@ -76,6 +77,10 @@ void QBrush_Swap(QBrush* self, QBrush* other) { self->swap(*other); } +QVariant* QBrush_ToQVariant(const QBrush* self) { + return new QVariant(self->operator QVariant()); +} + int QBrush_Style(const QBrush* self) { Qt::BrushStyle _ret = self->style(); return static_cast(_ret); diff --git a/qt6/gen_qbrush.go b/qt6/gen_qbrush.go index 960bb0a6..b6ba75bc 100644 --- a/qt6/gen_qbrush.go +++ b/qt6/gen_qbrush.go @@ -357,6 +357,12 @@ func (this *QBrush) Swap(other *QBrush) { C.QBrush_Swap(this.h, other.cPointer()) } +func (this *QBrush) ToQVariant() *QVariant { + _goptr := newQVariant(C.QBrush_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QBrush) Style() BrushStyle { return (BrushStyle)(C.QBrush_Style(this.h)) } diff --git a/qt6/gen_qbrush.h b/qt6/gen_qbrush.h index e682881c..d69156fb 100644 --- a/qt6/gen_qbrush.h +++ b/qt6/gen_qbrush.h @@ -31,6 +31,7 @@ class QPixmap; class QPointF; class QRadialGradient; class QTransform; +class QVariant; #else typedef struct QBrush QBrush; typedef struct QBrushData QBrushData; @@ -44,6 +45,7 @@ typedef struct QPixmap QPixmap; typedef struct QPointF QPointF; typedef struct QRadialGradient QRadialGradient; typedef struct QTransform QTransform; +typedef struct QVariant QVariant; #endif QBrush* QBrush_new(); @@ -60,6 +62,7 @@ QBrush* QBrush_new11(QColor* color, int bs); QBrush* QBrush_new12(int color, int bs); void QBrush_OperatorAssign(QBrush* self, QBrush* brush); void QBrush_Swap(QBrush* self, QBrush* other); +QVariant* QBrush_ToQVariant(const QBrush* self); int QBrush_Style(const QBrush* self); void QBrush_SetStyle(QBrush* self, int style); QTransform* QBrush_Transform(const QBrush* self); diff --git a/qt6/gen_qcolor.cpp b/qt6/gen_qcolor.cpp index 5986ffc5..cb7a8d56 100644 --- a/qt6/gen_qcolor.cpp +++ b/qt6/gen_qcolor.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include "gen_qcolor.h" @@ -453,6 +454,10 @@ bool QColor_OperatorNotEqual(const QColor* self, QColor* c) { return (*self != *c); } +QVariant* QColor_ToQVariant(const QColor* self) { + return new QVariant(self->operator QVariant()); +} + bool QColor_IsValidColor(struct miqt_string name) { QString name_QString = QString::fromUtf8(name.data, name.len); return QColor::isValidColor(name_QString); diff --git a/qt6/gen_qcolor.go b/qt6/gen_qcolor.go index a1539634..5b02e19d 100644 --- a/qt6/gen_qcolor.go +++ b/qt6/gen_qcolor.go @@ -590,6 +590,12 @@ func (this *QColor) OperatorNotEqual(c *QColor) bool { return (bool)(C.QColor_OperatorNotEqual(this.h, c.cPointer())) } +func (this *QColor) ToQVariant() *QVariant { + _goptr := newQVariant(C.QColor_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func QColor_IsValidColor(name string) bool { name_ms := C.struct_miqt_string{} name_ms.data = C.CString(name) diff --git a/qt6/gen_qcolor.h b/qt6/gen_qcolor.h index a2410d59..16e87873 100644 --- a/qt6/gen_qcolor.h +++ b/qt6/gen_qcolor.h @@ -18,10 +18,12 @@ extern "C" { class QAnyStringView; class QColor; class QRgba64; +class QVariant; #else typedef struct QAnyStringView QAnyStringView; typedef struct QColor QColor; typedef struct QRgba64 QRgba64; +typedef struct QVariant QVariant; #endif QColor* QColor_new(); @@ -127,6 +129,7 @@ QColor* QColor_Lighter(const QColor* self); QColor* QColor_Darker(const QColor* self); bool QColor_OperatorEqual(const QColor* self, QColor* c); bool QColor_OperatorNotEqual(const QColor* self, QColor* c); +QVariant* QColor_ToQVariant(const QColor* self); bool QColor_IsValidColor(struct miqt_string name); bool QColor_IsValidColorName(QAnyStringView* param1); struct miqt_string QColor_Name1(const QColor* self, int format); diff --git a/qt6/gen_qcolorspace.cpp b/qt6/gen_qcolorspace.cpp index 96ea502f..69cf2264 100644 --- a/qt6/gen_qcolorspace.cpp +++ b/qt6/gen_qcolorspace.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include "gen_qcolorspace.h" @@ -232,6 +233,10 @@ QColorTransform* QColorSpace_TransformationToColorSpace(const QColorSpace* self, return new QColorTransform(self->transformationToColorSpace(*colorspace)); } +QVariant* QColorSpace_ToQVariant(const QColorSpace* self) { + return new QVariant(self->operator QVariant()); +} + void QColorSpace_SetTransferFunction2(QColorSpace* self, int transferFunction, float gamma) { self->setTransferFunction(static_cast(transferFunction), static_cast(gamma)); } diff --git a/qt6/gen_qcolorspace.go b/qt6/gen_qcolorspace.go index 3d0167a2..6bdfe510 100644 --- a/qt6/gen_qcolorspace.go +++ b/qt6/gen_qcolorspace.go @@ -345,6 +345,12 @@ func (this *QColorSpace) TransformationToColorSpace(colorspace *QColorSpace) *QC return _goptr } +func (this *QColorSpace) ToQVariant() *QVariant { + _goptr := newQVariant(C.QColorSpace_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QColorSpace) SetTransferFunction2(transferFunction QColorSpace__TransferFunction, gamma float32) { C.QColorSpace_SetTransferFunction2(this.h, (C.int)(transferFunction), (C.float)(gamma)) } diff --git a/qt6/gen_qcolorspace.h b/qt6/gen_qcolorspace.h index 254f03ed..3c59e643 100644 --- a/qt6/gen_qcolorspace.h +++ b/qt6/gen_qcolorspace.h @@ -18,10 +18,12 @@ extern "C" { class QColorSpace; class QColorTransform; class QPointF; +class QVariant; #else typedef struct QColorSpace QColorSpace; typedef struct QColorTransform QColorTransform; typedef struct QPointF QPointF; +typedef struct QVariant QVariant; #endif QColorSpace* QColorSpace_new(); @@ -55,6 +57,7 @@ bool QColorSpace_IsValid(const QColorSpace* self); QColorSpace* QColorSpace_FromIccProfile(struct miqt_string iccProfile); struct miqt_string QColorSpace_IccProfile(const QColorSpace* self); QColorTransform* QColorSpace_TransformationToColorSpace(const QColorSpace* self, QColorSpace* colorspace); +QVariant* QColorSpace_ToQVariant(const QColorSpace* self); void QColorSpace_SetTransferFunction2(QColorSpace* self, int transferFunction, float gamma); QColorSpace* QColorSpace_WithTransferFunction2(const QColorSpace* self, int transferFunction, float gamma); void QColorSpace_Delete(QColorSpace* self, bool isSubclass); diff --git a/qt6/gen_qcursor.cpp b/qt6/gen_qcursor.cpp index 2695e6c8..8e7be448 100644 --- a/qt6/gen_qcursor.cpp +++ b/qt6/gen_qcursor.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include "gen_qcursor.h" @@ -55,6 +56,10 @@ void QCursor_Swap(QCursor* self, QCursor* other) { self->swap(*other); } +QVariant* QCursor_ToQVariant(const QCursor* self) { + return new QVariant(self->operator QVariant()); +} + int QCursor_Shape(const QCursor* self) { Qt::CursorShape _ret = self->shape(); return static_cast(_ret); diff --git a/qt6/gen_qcursor.go b/qt6/gen_qcursor.go index fcee6e71..4f41beab 100644 --- a/qt6/gen_qcursor.go +++ b/qt6/gen_qcursor.go @@ -126,6 +126,12 @@ func (this *QCursor) Swap(other *QCursor) { C.QCursor_Swap(this.h, other.cPointer()) } +func (this *QCursor) ToQVariant() *QVariant { + _goptr := newQVariant(C.QCursor_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QCursor) Shape() CursorShape { return (CursorShape)(C.QCursor_Shape(this.h)) } diff --git a/qt6/gen_qcursor.h b/qt6/gen_qcursor.h index 73041a3d..bc6cef21 100644 --- a/qt6/gen_qcursor.h +++ b/qt6/gen_qcursor.h @@ -20,12 +20,14 @@ class QCursor; class QPixmap; class QPoint; class QScreen; +class QVariant; #else typedef struct QBitmap QBitmap; typedef struct QCursor QCursor; typedef struct QPixmap QPixmap; typedef struct QPoint QPoint; typedef struct QScreen QScreen; +typedef struct QVariant QVariant; #endif QCursor* QCursor_new(); @@ -39,6 +41,7 @@ QCursor* QCursor_new8(QPixmap* pixmap, int hotX); QCursor* QCursor_new9(QPixmap* pixmap, int hotX, int hotY); void QCursor_OperatorAssign(QCursor* self, QCursor* cursor); void QCursor_Swap(QCursor* self, QCursor* other); +QVariant* QCursor_ToQVariant(const QCursor* self); int QCursor_Shape(const QCursor* self); void QCursor_SetShape(QCursor* self, int newShape); QBitmap* QCursor_Bitmap(const QCursor* self, int param1); diff --git a/qt6/gen_qfont.cpp b/qt6/gen_qfont.cpp index 5f8d3a42..efbc1edc 100644 --- a/qt6/gen_qfont.cpp +++ b/qt6/gen_qfont.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include "gen_qfont.h" @@ -341,6 +342,10 @@ bool QFont_OperatorLesser(const QFont* self, QFont* param1) { return (*self < *param1); } +QVariant* QFont_ToQVariant(const QFont* self) { + return new QVariant(self->operator QVariant()); +} + bool QFont_IsCopyOf(const QFont* self, QFont* param1) { return self->isCopyOf(*param1); } diff --git a/qt6/gen_qfont.go b/qt6/gen_qfont.go index 2c029f21..51b784ec 100644 --- a/qt6/gen_qfont.go +++ b/qt6/gen_qfont.go @@ -550,6 +550,12 @@ func (this *QFont) OperatorLesser(param1 *QFont) bool { return (bool)(C.QFont_OperatorLesser(this.h, param1.cPointer())) } +func (this *QFont) ToQVariant() *QVariant { + _goptr := newQVariant(C.QFont_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QFont) IsCopyOf(param1 *QFont) bool { return (bool)(C.QFont_IsCopyOf(this.h, param1.cPointer())) } diff --git a/qt6/gen_qfont.h b/qt6/gen_qfont.h index 09d7b280..892abec9 100644 --- a/qt6/gen_qfont.h +++ b/qt6/gen_qfont.h @@ -17,9 +17,11 @@ extern "C" { #ifdef __cplusplus class QFont; class QPaintDevice; +class QVariant; #else typedef struct QFont QFont; typedef struct QPaintDevice QPaintDevice; +typedef struct QVariant QVariant; #endif QFont* QFont_new(); @@ -84,6 +86,7 @@ void QFont_OperatorAssign(QFont* self, QFont* param1); bool QFont_OperatorEqual(const QFont* self, QFont* param1); bool QFont_OperatorNotEqual(const QFont* self, QFont* param1); bool QFont_OperatorLesser(const QFont* self, QFont* param1); +QVariant* QFont_ToQVariant(const QFont* self); bool QFont_IsCopyOf(const QFont* self, QFont* param1); struct miqt_string QFont_Key(const QFont* self); struct miqt_string QFont_ToString(const QFont* self); diff --git a/qt6/gen_qhashfunctions.cpp b/qt6/gen_qhashfunctions.cpp index 3b097bcd..7b1be934 100644 --- a/qt6/gen_qhashfunctions.cpp +++ b/qt6/gen_qhashfunctions.cpp @@ -15,6 +15,10 @@ QHashSeed* QHashSeed_new2(size_t d) { return new QHashSeed(static_cast(d)); } +size_t QHashSeed_ToUnsignedLong(const QHashSeed* self) { + return self->operator unsigned long(); +} + QHashSeed* QHashSeed_GlobalSeed() { return new QHashSeed(QHashSeed::globalSeed()); } diff --git a/qt6/gen_qhashfunctions.go b/qt6/gen_qhashfunctions.go index c3c0a93d..13842054 100644 --- a/qt6/gen_qhashfunctions.go +++ b/qt6/gen_qhashfunctions.go @@ -62,6 +62,10 @@ func NewQHashSeed2(d uint64) *QHashSeed { return ret } +func (this *QHashSeed) ToUnsignedLong() uint64 { + return (uint64)(C.QHashSeed_ToUnsignedLong(this.h)) +} + func QHashSeed_GlobalSeed() *QHashSeed { _goptr := newQHashSeed(C.QHashSeed_GlobalSeed()) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer diff --git a/qt6/gen_qhashfunctions.h b/qt6/gen_qhashfunctions.h index 9fa4f974..71f494c1 100644 --- a/qt6/gen_qhashfunctions.h +++ b/qt6/gen_qhashfunctions.h @@ -22,6 +22,7 @@ typedef struct QHashSeed QHashSeed; QHashSeed* QHashSeed_new(); QHashSeed* QHashSeed_new2(size_t d); +size_t QHashSeed_ToUnsignedLong(const QHashSeed* self); QHashSeed* QHashSeed_GlobalSeed(); void QHashSeed_SetDeterministicGlobalSeed(); void QHashSeed_ResetRandomGlobalSeed(); diff --git a/qt6/gen_qicon.cpp b/qt6/gen_qicon.cpp index 37f5eaa1..ba564647 100644 --- a/qt6/gen_qicon.cpp +++ b/qt6/gen_qicon.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include "gen_qicon.h" @@ -46,6 +47,10 @@ void QIcon_Swap(QIcon* self, QIcon* other) { self->swap(*other); } +QVariant* QIcon_ToQVariant(const QIcon* self) { + return new QVariant(self->operator QVariant()); +} + QPixmap* QIcon_Pixmap(const QIcon* self, QSize* size) { return new QPixmap(self->pixmap(*size)); } diff --git a/qt6/gen_qicon.go b/qt6/gen_qicon.go index 991f6e07..c8df9f69 100644 --- a/qt6/gen_qicon.go +++ b/qt6/gen_qicon.go @@ -114,6 +114,12 @@ func (this *QIcon) Swap(other *QIcon) { C.QIcon_Swap(this.h, other.cPointer()) } +func (this *QIcon) ToQVariant() *QVariant { + _goptr := newQVariant(C.QIcon_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QIcon) Pixmap(size *QSize) *QPixmap { _goptr := newQPixmap(C.QIcon_Pixmap(this.h, size.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer diff --git a/qt6/gen_qicon.h b/qt6/gen_qicon.h index 2acdf095..df4e2475 100644 --- a/qt6/gen_qicon.h +++ b/qt6/gen_qicon.h @@ -21,6 +21,7 @@ class QPainter; class QPixmap; class QRect; class QSize; +class QVariant; class QWindow; #else typedef struct QIcon QIcon; @@ -29,6 +30,7 @@ typedef struct QPainter QPainter; typedef struct QPixmap QPixmap; typedef struct QRect QRect; typedef struct QSize QSize; +typedef struct QVariant QVariant; typedef struct QWindow QWindow; #endif @@ -39,6 +41,7 @@ QIcon* QIcon_new4(struct miqt_string fileName); QIcon* QIcon_new5(QIconEngine* engine); void QIcon_OperatorAssign(QIcon* self, QIcon* other); void QIcon_Swap(QIcon* self, QIcon* other); +QVariant* QIcon_ToQVariant(const QIcon* self); QPixmap* QIcon_Pixmap(const QIcon* self, QSize* size); QPixmap* QIcon_Pixmap2(const QIcon* self, int w, int h); QPixmap* QIcon_PixmapWithExtent(const QIcon* self, int extent); diff --git a/qt6/gen_qimage.cpp b/qt6/gen_qimage.cpp index f5ca09ad..5df48777 100644 --- a/qt6/gen_qimage.cpp +++ b/qt6/gen_qimage.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include "gen_qimage.h" @@ -251,6 +252,10 @@ bool QImage_OperatorNotEqual(const QImage* self, QImage* param1) { return (*self != *param1); } +QVariant* QImage_ToQVariant(const QImage* self) { + return new QVariant(self->operator QVariant()); +} + void QImage_Detach(QImage* self) { self->detach(); } diff --git a/qt6/gen_qimage.go b/qt6/gen_qimage.go index 03e0b3fc..249ed31f 100644 --- a/qt6/gen_qimage.go +++ b/qt6/gen_qimage.go @@ -214,6 +214,12 @@ func (this *QImage) OperatorNotEqual(param1 *QImage) bool { return (bool)(C.QImage_OperatorNotEqual(this.h, param1.cPointer())) } +func (this *QImage) ToQVariant() *QVariant { + _goptr := newQVariant(C.QImage_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QImage) Detach() { C.QImage_Detach(this.h) } diff --git a/qt6/gen_qimage.h b/qt6/gen_qimage.h index 3609d36d..1ce0713b 100644 --- a/qt6/gen_qimage.h +++ b/qt6/gen_qimage.h @@ -30,6 +30,7 @@ class QRect; class QSize; class QSizeF; class QTransform; +class QVariant; #else typedef struct QByteArrayView QByteArrayView; typedef struct QColor QColor; @@ -46,6 +47,7 @@ typedef struct QRect QRect; typedef struct QSize QSize; typedef struct QSizeF QSizeF; typedef struct QTransform QTransform; +typedef struct QVariant QVariant; #endif QImage* QImage_new(); @@ -65,6 +67,7 @@ bool QImage_IsNull(const QImage* self); int QImage_DevType(const QImage* self); bool QImage_OperatorEqual(const QImage* self, QImage* param1); bool QImage_OperatorNotEqual(const QImage* self, QImage* param1); +QVariant* QImage_ToQVariant(const QImage* self); void QImage_Detach(QImage* self); bool QImage_IsDetached(const QImage* self); QImage* QImage_Copy(const QImage* self); diff --git a/qt6/gen_qjsonvalue.cpp b/qt6/gen_qjsonvalue.cpp index e66d310f..8c9c7ecb 100644 --- a/qt6/gen_qjsonvalue.cpp +++ b/qt6/gen_qjsonvalue.cpp @@ -211,6 +211,10 @@ QJsonValueConstRef* QJsonValueConstRef_new(QJsonValueConstRef* param1) { return new QJsonValueConstRef(*param1); } +QJsonValue* QJsonValueConstRef_ToQJsonValue(const QJsonValueConstRef* self) { + return new QJsonValue(self->operator QJsonValue()); +} + QVariant* QJsonValueConstRef_ToVariant(const QJsonValueConstRef* self) { return new QVariant(self->toVariant()); } @@ -357,6 +361,10 @@ void QJsonValueRef_OperatorAssignWithVal(QJsonValueRef* self, QJsonValueRef* val self->operator=(*val); } +QJsonValue* QJsonValueRef_ToQJsonValue(const QJsonValueRef* self) { + return new QJsonValue(self->operator QJsonValue()); +} + QVariant* QJsonValueRef_ToVariant(const QJsonValueRef* self) { return new QVariant(self->toVariant()); } diff --git a/qt6/gen_qjsonvalue.go b/qt6/gen_qjsonvalue.go index e89874ac..a9ed0df2 100644 --- a/qt6/gen_qjsonvalue.go +++ b/qt6/gen_qjsonvalue.go @@ -357,6 +357,12 @@ func NewQJsonValueConstRef(param1 *QJsonValueConstRef) *QJsonValueConstRef { return ret } +func (this *QJsonValueConstRef) ToQJsonValue() *QJsonValue { + _goptr := newQJsonValue(C.QJsonValueConstRef_ToQJsonValue(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QJsonValueConstRef) ToVariant() *QVariant { _goptr := newQVariant(C.QJsonValueConstRef_ToVariant(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer @@ -554,6 +560,12 @@ func (this *QJsonValueRef) OperatorAssignWithVal(val *QJsonValueRef) { C.QJsonValueRef_OperatorAssignWithVal(this.h, val.cPointer()) } +func (this *QJsonValueRef) ToQJsonValue() *QJsonValue { + _goptr := newQJsonValue(C.QJsonValueRef_ToQJsonValue(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QJsonValueRef) ToVariant() *QVariant { _goptr := newQVariant(C.QJsonValueRef_ToVariant(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer diff --git a/qt6/gen_qjsonvalue.h b/qt6/gen_qjsonvalue.h index cf128e3f..244feed1 100644 --- a/qt6/gen_qjsonvalue.h +++ b/qt6/gen_qjsonvalue.h @@ -74,6 +74,7 @@ double QJsonValue_ToDouble1(const QJsonValue* self, double defaultValue); void QJsonValue_Delete(QJsonValue* self, bool isSubclass); QJsonValueConstRef* QJsonValueConstRef_new(QJsonValueConstRef* param1); +QJsonValue* QJsonValueConstRef_ToQJsonValue(const QJsonValueConstRef* self); QVariant* QJsonValueConstRef_ToVariant(const QJsonValueConstRef* self); int QJsonValueConstRef_Type(const QJsonValueConstRef* self); bool QJsonValueConstRef_IsNull(const QJsonValueConstRef* self); @@ -106,6 +107,7 @@ QJsonValueRef* QJsonValueRef_new3(QJsonObject* object, ptrdiff_t idx); void QJsonValueRef_virtbase(QJsonValueRef* src, QJsonValueConstRef** outptr_QJsonValueConstRef); void QJsonValueRef_OperatorAssign(QJsonValueRef* self, QJsonValue* val); void QJsonValueRef_OperatorAssignWithVal(QJsonValueRef* self, QJsonValueRef* val); +QJsonValue* QJsonValueRef_ToQJsonValue(const QJsonValueRef* self); QVariant* QJsonValueRef_ToVariant(const QJsonValueRef* self); int QJsonValueRef_Type(const QJsonValueRef* self); bool QJsonValueRef_IsNull(const QJsonValueRef* self); diff --git a/qt6/gen_qkeysequence.cpp b/qt6/gen_qkeysequence.cpp index 2ffbf370..0ba721cf 100644 --- a/qt6/gen_qkeysequence.cpp +++ b/qt6/gen_qkeysequence.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include "gen_qkeysequence.h" @@ -144,6 +145,10 @@ struct miqt_array /* of QKeySequence* */ QKeySequence_KeyBindings(int key) { return _out; } +QVariant* QKeySequence_ToQVariant(const QKeySequence* self) { + return new QVariant(self->operator QVariant()); +} + QKeyCombination* QKeySequence_OperatorSubscript(const QKeySequence* self, unsigned int i) { return new QKeyCombination(self->operator[](static_cast(i))); } diff --git a/qt6/gen_qkeysequence.go b/qt6/gen_qkeysequence.go index 6ec69279..f6f1e9d9 100644 --- a/qt6/gen_qkeysequence.go +++ b/qt6/gen_qkeysequence.go @@ -329,6 +329,12 @@ func QKeySequence_KeyBindings(key QKeySequence__StandardKey) []QKeySequence { return _ret } +func (this *QKeySequence) ToQVariant() *QVariant { + _goptr := newQVariant(C.QKeySequence_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QKeySequence) OperatorSubscript(i uint) *QKeyCombination { _goptr := newQKeyCombination(C.QKeySequence_OperatorSubscript(this.h, (C.uint)(i))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer diff --git a/qt6/gen_qkeysequence.h b/qt6/gen_qkeysequence.h index 122b1e74..213d74d9 100644 --- a/qt6/gen_qkeysequence.h +++ b/qt6/gen_qkeysequence.h @@ -17,9 +17,11 @@ extern "C" { #ifdef __cplusplus class QKeyCombination; class QKeySequence; +class QVariant; #else typedef struct QKeyCombination QKeyCombination; typedef struct QKeySequence QKeySequence; +typedef struct QVariant QVariant; #endif QKeySequence* QKeySequence_new(); @@ -44,6 +46,7 @@ struct miqt_string QKeySequence_ListToString(struct miqt_array /* of QKeySequenc int QKeySequence_Matches(const QKeySequence* self, QKeySequence* seq); QKeySequence* QKeySequence_Mnemonic(struct miqt_string text); struct miqt_array /* of QKeySequence* */ QKeySequence_KeyBindings(int key); +QVariant* QKeySequence_ToQVariant(const QKeySequence* self); QKeyCombination* QKeySequence_OperatorSubscript(const QKeySequence* self, unsigned int i); void QKeySequence_OperatorAssign(QKeySequence* self, QKeySequence* other); void QKeySequence_Swap(QKeySequence* self, QKeySequence* other); diff --git a/qt6/gen_qmatrix4x4.cpp b/qt6/gen_qmatrix4x4.cpp index 6de42468..0f9b333c 100644 --- a/qt6/gen_qmatrix4x4.cpp +++ b/qt6/gen_qmatrix4x4.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -257,6 +258,10 @@ void QMatrix4x4_Optimize(QMatrix4x4* self) { self->optimize(); } +QVariant* QMatrix4x4_ToQVariant(const QMatrix4x4* self) { + return new QVariant(self->operator QVariant()); +} + void QMatrix4x4_ProjectedRotate(QMatrix4x4* self, float angle, float x, float y, float z) { self->projectedRotate(static_cast(angle), static_cast(x), static_cast(y), static_cast(z)); } diff --git a/qt6/gen_qmatrix4x4.go b/qt6/gen_qmatrix4x4.go index e6002203..324ab6bb 100644 --- a/qt6/gen_qmatrix4x4.go +++ b/qt6/gen_qmatrix4x4.go @@ -344,6 +344,12 @@ func (this *QMatrix4x4) Optimize() { C.QMatrix4x4_Optimize(this.h) } +func (this *QMatrix4x4) ToQVariant() *QVariant { + _goptr := newQVariant(C.QMatrix4x4_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QMatrix4x4) ProjectedRotate(angle float32, x float32, y float32, z float32) { C.QMatrix4x4_ProjectedRotate(this.h, (C.float)(angle), (C.float)(x), (C.float)(y), (C.float)(z)) } diff --git a/qt6/gen_qmatrix4x4.h b/qt6/gen_qmatrix4x4.h index ec93e2bc..b851eb1f 100644 --- a/qt6/gen_qmatrix4x4.h +++ b/qt6/gen_qmatrix4x4.h @@ -22,6 +22,7 @@ class QQuaternion; class QRect; class QRectF; class QTransform; +class QVariant; class QVector3D; class QVector4D; #else @@ -32,6 +33,7 @@ typedef struct QQuaternion QQuaternion; typedef struct QRect QRect; typedef struct QRectF QRectF; typedef struct QTransform QTransform; +typedef struct QVariant QVariant; typedef struct QVector3D QVector3D; typedef struct QVector4D QVector4D; #endif @@ -94,6 +96,7 @@ float* QMatrix4x4_Data(QMatrix4x4* self); const float* QMatrix4x4_Data2(const QMatrix4x4* self); const float* QMatrix4x4_ConstData(const QMatrix4x4* self); void QMatrix4x4_Optimize(QMatrix4x4* self); +QVariant* QMatrix4x4_ToQVariant(const QMatrix4x4* self); void QMatrix4x4_ProjectedRotate(QMatrix4x4* self, float angle, float x, float y, float z); int QMatrix4x4_Flags(const QMatrix4x4* self); QMatrix4x4* QMatrix4x4_Inverted1(const QMatrix4x4* self, bool* invertible); diff --git a/qt6/gen_qnamespace.cpp b/qt6/gen_qnamespace.cpp index b1a0259d..0fd54e8a 100644 --- a/qt6/gen_qnamespace.cpp +++ b/qt6/gen_qnamespace.cpp @@ -79,6 +79,10 @@ int QKeyCombination_ToCombined(const QKeyCombination* self) { return self->toCombined(); } +int QKeyCombination_ToInt(const QKeyCombination* self) { + return self->operator int(); +} + void QKeyCombination_Delete(QKeyCombination* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); diff --git a/qt6/gen_qnamespace.go b/qt6/gen_qnamespace.go index a179741a..b9db9e61 100644 --- a/qt6/gen_qnamespace.go +++ b/qt6/gen_qnamespace.go @@ -1882,6 +1882,10 @@ func (this *QKeyCombination) ToCombined() int { return (int)(C.QKeyCombination_ToCombined(this.h)) } +func (this *QKeyCombination) ToInt() int { + return (int)(C.QKeyCombination_ToInt(this.h)) +} + // Delete this object from C++ memory. func (this *QKeyCombination) Delete() { C.QKeyCombination_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt6/gen_qnamespace.h b/qt6/gen_qnamespace.h index 0510af7c..dd8ab6e2 100644 --- a/qt6/gen_qnamespace.h +++ b/qt6/gen_qnamespace.h @@ -45,6 +45,7 @@ int QKeyCombination_KeyboardModifiers(const QKeyCombination* self); int QKeyCombination_Key(const QKeyCombination* self); QKeyCombination* QKeyCombination_FromCombined(int combined); int QKeyCombination_ToCombined(const QKeyCombination* self); +int QKeyCombination_ToInt(const QKeyCombination* self); void QKeyCombination_Delete(QKeyCombination* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qobjectdefs.cpp b/qt6/gen_qobjectdefs.cpp index 0e1c3512..1d0a5b93 100644 --- a/qt6/gen_qobjectdefs.cpp +++ b/qt6/gen_qobjectdefs.cpp @@ -551,6 +551,10 @@ QMetaObject* QMetaObject__SuperData_OperatorMinusGreater(const QMetaObject__Supe return (QMetaObject*) self->operator->(); } +QMetaObject* QMetaObject__SuperData_ToConstQMetaObjectMultiply(const QMetaObject__SuperData* self) { + return (QMetaObject*) self->operator const QMetaObject *(); +} + void QMetaObject__SuperData_OperatorAssign(QMetaObject__SuperData* self, QMetaObject__SuperData* param1) { self->operator=(*param1); } diff --git a/qt6/gen_qobjectdefs.go b/qt6/gen_qobjectdefs.go index 6bfdb8dc..359f4440 100644 --- a/qt6/gen_qobjectdefs.go +++ b/qt6/gen_qobjectdefs.go @@ -980,6 +980,10 @@ func (this *QMetaObject__SuperData) OperatorMinusGreater() *QMetaObject { return newQMetaObject(C.QMetaObject__SuperData_OperatorMinusGreater(this.h)) } +func (this *QMetaObject__SuperData) ToConstQMetaObjectMultiply() *QMetaObject { + return newQMetaObject(C.QMetaObject__SuperData_ToConstQMetaObjectMultiply(this.h)) +} + func (this *QMetaObject__SuperData) OperatorAssign(param1 *QMetaObject__SuperData) { C.QMetaObject__SuperData_OperatorAssign(this.h, param1.cPointer()) } diff --git a/qt6/gen_qobjectdefs.h b/qt6/gen_qobjectdefs.h index 7bb9bfbc..a766ff07 100644 --- a/qt6/gen_qobjectdefs.h +++ b/qt6/gen_qobjectdefs.h @@ -182,6 +182,7 @@ QMetaObject__SuperData* QMetaObject__SuperData_new(); QMetaObject__SuperData* QMetaObject__SuperData_new2(QMetaObject* mo); QMetaObject__SuperData* QMetaObject__SuperData_new3(QMetaObject__SuperData* param1); QMetaObject* QMetaObject__SuperData_OperatorMinusGreater(const QMetaObject__SuperData* self); +QMetaObject* QMetaObject__SuperData_ToConstQMetaObjectMultiply(const QMetaObject__SuperData* self); void QMetaObject__SuperData_OperatorAssign(QMetaObject__SuperData* self, QMetaObject__SuperData* param1); void QMetaObject__SuperData_Delete(QMetaObject__SuperData* self, bool isSubclass); diff --git a/qt6/gen_qpainterpath.cpp b/qt6/gen_qpainterpath.cpp index abf8dd65..8cbdee8c 100644 --- a/qt6/gen_qpainterpath.cpp +++ b/qt6/gen_qpainterpath.cpp @@ -442,6 +442,10 @@ bool QPainterPath__Element_IsCurveTo(const QPainterPath__Element* self) { return self->isCurveTo(); } +QPointF* QPainterPath__Element_ToQPointF(const QPainterPath__Element* self) { + return new QPointF(self->operator QPointF()); +} + bool QPainterPath__Element_OperatorEqual(const QPainterPath__Element* self, QPainterPath__Element* e) { return (*self == *e); } diff --git a/qt6/gen_qpainterpath.go b/qt6/gen_qpainterpath.go index 314f45ca..29cd0100 100644 --- a/qt6/gen_qpainterpath.go +++ b/qt6/gen_qpainterpath.go @@ -599,6 +599,12 @@ func (this *QPainterPath__Element) IsCurveTo() bool { return (bool)(C.QPainterPath__Element_IsCurveTo(this.h)) } +func (this *QPainterPath__Element) ToQPointF() *QPointF { + _goptr := newQPointF(C.QPainterPath__Element_ToQPointF(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QPainterPath__Element) OperatorEqual(e *QPainterPath__Element) bool { return (bool)(C.QPainterPath__Element_OperatorEqual(this.h, e.cPointer())) } diff --git a/qt6/gen_qpainterpath.h b/qt6/gen_qpainterpath.h index bc1a0c31..f231edf9 100644 --- a/qt6/gen_qpainterpath.h +++ b/qt6/gen_qpainterpath.h @@ -136,6 +136,7 @@ void QPainterPathStroker_Delete(QPainterPathStroker* self, bool isSubclass); bool QPainterPath__Element_IsMoveTo(const QPainterPath__Element* self); bool QPainterPath__Element_IsLineTo(const QPainterPath__Element* self); bool QPainterPath__Element_IsCurveTo(const QPainterPath__Element* self); +QPointF* QPainterPath__Element_ToQPointF(const QPainterPath__Element* self); bool QPainterPath__Element_OperatorEqual(const QPainterPath__Element* self, QPainterPath__Element* e); bool QPainterPath__Element_OperatorNotEqual(const QPainterPath__Element* self, QPainterPath__Element* e); void QPainterPath__Element_Delete(QPainterPath__Element* self, bool isSubclass); diff --git a/qt6/gen_qpalette.cpp b/qt6/gen_qpalette.cpp index f2f2524c..8124622d 100644 --- a/qt6/gen_qpalette.cpp +++ b/qt6/gen_qpalette.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include "gen_qpalette.h" @@ -45,6 +46,10 @@ void QPalette_Swap(QPalette* self, QPalette* other) { self->swap(*other); } +QVariant* QPalette_ToQVariant(const QPalette* self) { + return new QVariant(self->operator QVariant()); +} + int QPalette_CurrentColorGroup(const QPalette* self) { QPalette::ColorGroup _ret = self->currentColorGroup(); return static_cast(_ret); diff --git a/qt6/gen_qpalette.go b/qt6/gen_qpalette.go index 68589bbf..07e285c4 100644 --- a/qt6/gen_qpalette.go +++ b/qt6/gen_qpalette.go @@ -149,6 +149,12 @@ func (this *QPalette) Swap(other *QPalette) { C.QPalette_Swap(this.h, other.cPointer()) } +func (this *QPalette) ToQVariant() *QVariant { + _goptr := newQVariant(C.QPalette_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QPalette) CurrentColorGroup() QPalette__ColorGroup { return (QPalette__ColorGroup)(C.QPalette_CurrentColorGroup(this.h)) } diff --git a/qt6/gen_qpalette.h b/qt6/gen_qpalette.h index d51f24c3..3ad1315d 100644 --- a/qt6/gen_qpalette.h +++ b/qt6/gen_qpalette.h @@ -18,10 +18,12 @@ extern "C" { class QBrush; class QColor; class QPalette; +class QVariant; #else typedef struct QBrush QBrush; typedef struct QColor QColor; typedef struct QPalette QPalette; +typedef struct QVariant QVariant; #endif QPalette* QPalette_new(); @@ -33,6 +35,7 @@ QPalette* QPalette_new6(QColor* windowText, QColor* window, QColor* light, QColo QPalette* QPalette_new7(QPalette* palette); void QPalette_OperatorAssign(QPalette* self, QPalette* palette); void QPalette_Swap(QPalette* self, QPalette* other); +QVariant* QPalette_ToQVariant(const QPalette* self); int QPalette_CurrentColorGroup(const QPalette* self); void QPalette_SetCurrentColorGroup(QPalette* self, int cg); QColor* QPalette_Color(const QPalette* self, int cg, int cr); diff --git a/qt6/gen_qpen.cpp b/qt6/gen_qpen.cpp index 4ba4328c..4f38b781 100644 --- a/qt6/gen_qpen.cpp +++ b/qt6/gen_qpen.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include #include "gen_qpen.h" @@ -171,6 +172,10 @@ bool QPen_OperatorNotEqual(const QPen* self, QPen* p) { return (*self != *p); } +QVariant* QPen_ToQVariant(const QPen* self) { + return new QVariant(self->operator QVariant()); +} + bool QPen_IsDetached(QPen* self) { return self->isDetached(); } diff --git a/qt6/gen_qpen.go b/qt6/gen_qpen.go index 4c24543b..b8db3bd5 100644 --- a/qt6/gen_qpen.go +++ b/qt6/gen_qpen.go @@ -234,6 +234,12 @@ func (this *QPen) OperatorNotEqual(p *QPen) bool { return (bool)(C.QPen_OperatorNotEqual(this.h, p.cPointer())) } +func (this *QPen) ToQVariant() *QVariant { + _goptr := newQVariant(C.QPen_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QPen) IsDetached() bool { return (bool)(C.QPen_IsDetached(this.h)) } diff --git a/qt6/gen_qpen.h b/qt6/gen_qpen.h index cb283fc6..d7cbb086 100644 --- a/qt6/gen_qpen.h +++ b/qt6/gen_qpen.h @@ -18,10 +18,12 @@ extern "C" { class QBrush; class QColor; class QPen; +class QVariant; #else typedef struct QBrush QBrush; typedef struct QColor QColor; typedef struct QPen QPen; +typedef struct QVariant QVariant; #endif QPen* QPen_new(); @@ -59,6 +61,7 @@ bool QPen_IsCosmetic(const QPen* self); void QPen_SetCosmetic(QPen* self, bool cosmetic); bool QPen_OperatorEqual(const QPen* self, QPen* p); bool QPen_OperatorNotEqual(const QPen* self, QPen* p); +QVariant* QPen_ToQVariant(const QPen* self); bool QPen_IsDetached(QPen* self); void QPen_Delete(QPen* self, bool isSubclass); diff --git a/qt6/gen_qpixmap.cpp b/qt6/gen_qpixmap.cpp index a87f7779..45028dc8 100644 --- a/qt6/gen_qpixmap.cpp +++ b/qt6/gen_qpixmap.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include "gen_qpixmap.h" @@ -220,6 +221,10 @@ void QPixmap_Swap(QPixmap* self, QPixmap* other) { self->swap(*other); } +QVariant* QPixmap_ToQVariant(const QPixmap* self) { + return new QVariant(self->operator QVariant()); +} + bool QPixmap_IsNull(const QPixmap* self) { return self->isNull(); } diff --git a/qt6/gen_qpixmap.go b/qt6/gen_qpixmap.go index 8f394955..465e429a 100644 --- a/qt6/gen_qpixmap.go +++ b/qt6/gen_qpixmap.go @@ -131,6 +131,12 @@ func (this *QPixmap) Swap(other *QPixmap) { C.QPixmap_Swap(this.h, other.cPointer()) } +func (this *QPixmap) ToQVariant() *QVariant { + _goptr := newQVariant(C.QPixmap_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QPixmap) IsNull() bool { return (bool)(C.QPixmap_IsNull(this.h)) } diff --git a/qt6/gen_qpixmap.h b/qt6/gen_qpixmap.h index 820d7c7c..e804ade3 100644 --- a/qt6/gen_qpixmap.h +++ b/qt6/gen_qpixmap.h @@ -30,6 +30,7 @@ class QRegion; class QSize; class QSizeF; class QTransform; +class QVariant; #else typedef struct QBitmap QBitmap; typedef struct QColor QColor; @@ -46,6 +47,7 @@ typedef struct QRegion QRegion; typedef struct QSize QSize; typedef struct QSizeF QSizeF; typedef struct QTransform QTransform; +typedef struct QVariant QVariant; #endif QPixmap* QPixmap_new(); @@ -58,6 +60,7 @@ QPixmap* QPixmap_new7(struct miqt_string fileName, const char* format, int flags void QPixmap_virtbase(QPixmap* src, QPaintDevice** outptr_QPaintDevice); void QPixmap_OperatorAssign(QPixmap* self, QPixmap* param1); void QPixmap_Swap(QPixmap* self, QPixmap* other); +QVariant* QPixmap_ToQVariant(const QPixmap* self); bool QPixmap_IsNull(const QPixmap* self); int QPixmap_DevType(const QPixmap* self); int QPixmap_Width(const QPixmap* self); diff --git a/qt6/gen_qquaternion.cpp b/qt6/gen_qquaternion.cpp index af0bcf91..be09c7a4 100644 --- a/qt6/gen_qquaternion.cpp +++ b/qt6/gen_qquaternion.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -151,6 +152,10 @@ QVector4D* QQuaternion_ToVector4D(const QQuaternion* self) { return new QVector4D(self->toVector4D()); } +QVariant* QQuaternion_ToQVariant(const QQuaternion* self) { + return new QVariant(self->operator QVariant()); +} + void QQuaternion_GetAxisAndAngle(const QQuaternion* self, QVector3D* axis, float* angle) { self->getAxisAndAngle(axis, static_cast(angle)); } diff --git a/qt6/gen_qquaternion.go b/qt6/gen_qquaternion.go index db4e6221..2c8b8622 100644 --- a/qt6/gen_qquaternion.go +++ b/qt6/gen_qquaternion.go @@ -214,6 +214,12 @@ func (this *QQuaternion) ToVector4D() *QVector4D { return _goptr } +func (this *QQuaternion) ToQVariant() *QVariant { + _goptr := newQVariant(C.QQuaternion_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QQuaternion) GetAxisAndAngle(axis *QVector3D, angle *float32) { C.QQuaternion_GetAxisAndAngle(this.h, axis.cPointer(), (*C.float)(unsafe.Pointer(angle))) } diff --git a/qt6/gen_qquaternion.h b/qt6/gen_qquaternion.h index 8de46e1f..51e44ec6 100644 --- a/qt6/gen_qquaternion.h +++ b/qt6/gen_qquaternion.h @@ -16,10 +16,12 @@ extern "C" { #ifdef __cplusplus class QQuaternion; +class QVariant; class QVector3D; class QVector4D; #else typedef struct QQuaternion QQuaternion; +typedef struct QVariant QVariant; typedef struct QVector3D QVector3D; typedef struct QVector4D QVector4D; #endif @@ -57,6 +59,7 @@ QQuaternion* QQuaternion_OperatorMultiplyAssign(QQuaternion* self, float factor) QQuaternion* QQuaternion_OperatorMultiplyAssignWithQuaternion(QQuaternion* self, QQuaternion* quaternion); QQuaternion* QQuaternion_OperatorDivideAssign(QQuaternion* self, float divisor); QVector4D* QQuaternion_ToVector4D(const QQuaternion* self); +QVariant* QQuaternion_ToQVariant(const QQuaternion* self); void QQuaternion_GetAxisAndAngle(const QQuaternion* self, QVector3D* axis, float* angle); QQuaternion* QQuaternion_FromAxisAndAngle(QVector3D* axis, float angle); void QQuaternion_GetAxisAndAngle2(const QQuaternion* self, float* x, float* y, float* z, float* angle); diff --git a/qt6/gen_qregion.cpp b/qt6/gen_qregion.cpp index eb7d9574..1e2a1576 100644 --- a/qt6/gen_qregion.cpp +++ b/qt6/gen_qregion.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include #include "gen_qregion.h" @@ -212,6 +213,10 @@ bool QRegion_OperatorNotEqual(const QRegion* self, QRegion* r) { return (*self != *r); } +QVariant* QRegion_ToQVariant(const QRegion* self) { + return new QVariant(self->operator QVariant()); +} + void QRegion_Delete(QRegion* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); diff --git a/qt6/gen_qregion.go b/qt6/gen_qregion.go index 58c76a06..44ae59f7 100644 --- a/qt6/gen_qregion.go +++ b/qt6/gen_qregion.go @@ -305,6 +305,12 @@ func (this *QRegion) OperatorNotEqual(r *QRegion) bool { return (bool)(C.QRegion_OperatorNotEqual(this.h, r.cPointer())) } +func (this *QRegion) ToQVariant() *QVariant { + _goptr := newQVariant(C.QRegion_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + // Delete this object from C++ memory. func (this *QRegion) Delete() { C.QRegion_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt6/gen_qregion.h b/qt6/gen_qregion.h index 7877dc3a..194ae471 100644 --- a/qt6/gen_qregion.h +++ b/qt6/gen_qregion.h @@ -19,11 +19,13 @@ class QBitmap; class QPoint; class QRect; class QRegion; +class QVariant; #else typedef struct QBitmap QBitmap; typedef struct QPoint QPoint; typedef struct QRect QRect; typedef struct QRegion QRegion; +typedef struct QVariant QVariant; #endif QRegion* QRegion_new(); @@ -74,6 +76,7 @@ QRegion* QRegion_OperatorMinusAssign(QRegion* self, QRegion* r); void QRegion_OperatorBitwiseNotAssign(QRegion* self, QRegion* r); bool QRegion_OperatorEqual(const QRegion* self, QRegion* r); bool QRegion_OperatorNotEqual(const QRegion* self, QRegion* r); +QVariant* QRegion_ToQVariant(const QRegion* self); void QRegion_Delete(QRegion* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qrgba64.cpp b/qt6/gen_qrgba64.cpp index 64ef6959..6032ccca 100644 --- a/qt6/gen_qrgba64.cpp +++ b/qt6/gen_qrgba64.cpp @@ -113,6 +113,11 @@ QRgba64* QRgba64_Unpremultiplied(const QRgba64* self) { return new QRgba64(self->unpremultiplied()); } +unsigned long long QRgba64_ToUnsignedLongLong(const QRgba64* self) { + quint64 _ret = self->operator unsigned long long(); + return static_cast(_ret); +} + void QRgba64_OperatorAssign(QRgba64* self, unsigned long long _rgba) { self->operator=(static_cast(_rgba)); } diff --git a/qt6/gen_qrgba64.go b/qt6/gen_qrgba64.go index d0edb400..2d0d7da9 100644 --- a/qt6/gen_qrgba64.go +++ b/qt6/gen_qrgba64.go @@ -162,6 +162,10 @@ func (this *QRgba64) Unpremultiplied() *QRgba64 { return _goptr } +func (this *QRgba64) ToUnsignedLongLong() uint64 { + return (uint64)(C.QRgba64_ToUnsignedLongLong(this.h)) +} + func (this *QRgba64) OperatorAssign(_rgba uint64) { C.QRgba64_OperatorAssign(this.h, (C.ulonglong)(_rgba)) } diff --git a/qt6/gen_qrgba64.h b/qt6/gen_qrgba64.h index 52b7040d..9e53f754 100644 --- a/qt6/gen_qrgba64.h +++ b/qt6/gen_qrgba64.h @@ -44,6 +44,7 @@ unsigned int QRgba64_ToArgb32(const QRgba64* self); uint16_t QRgba64_ToRgb16(const QRgba64* self); QRgba64* QRgba64_Premultiplied(const QRgba64* self); QRgba64* QRgba64_Unpremultiplied(const QRgba64* self); +unsigned long long QRgba64_ToUnsignedLongLong(const QRgba64* self); void QRgba64_OperatorAssign(QRgba64* self, unsigned long long _rgba); void QRgba64_Delete(QRgba64* self, bool isSubclass); diff --git a/qt6/gen_qsizepolicy.cpp b/qt6/gen_qsizepolicy.cpp index b7ac475c..fe7e9d58 100644 --- a/qt6/gen_qsizepolicy.cpp +++ b/qt6/gen_qsizepolicy.cpp @@ -1,4 +1,5 @@ #include +#include #include #include "gen_qsizepolicy.h" @@ -79,6 +80,10 @@ bool QSizePolicy_OperatorNotEqual(const QSizePolicy* self, QSizePolicy* s) { return (*self != *s); } +QVariant* QSizePolicy_ToQVariant(const QSizePolicy* self) { + return new QVariant(self->operator QVariant()); +} + int QSizePolicy_HorizontalStretch(const QSizePolicy* self) { return self->horizontalStretch(); } diff --git a/qt6/gen_qsizepolicy.go b/qt6/gen_qsizepolicy.go index f29e9097..26d48d27 100644 --- a/qt6/gen_qsizepolicy.go +++ b/qt6/gen_qsizepolicy.go @@ -171,6 +171,12 @@ func (this *QSizePolicy) OperatorNotEqual(s *QSizePolicy) bool { return (bool)(C.QSizePolicy_OperatorNotEqual(this.h, s.cPointer())) } +func (this *QSizePolicy) ToQVariant() *QVariant { + _goptr := newQVariant(C.QSizePolicy_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QSizePolicy) HorizontalStretch() int { return (int)(C.QSizePolicy_HorizontalStretch(this.h)) } diff --git a/qt6/gen_qsizepolicy.h b/qt6/gen_qsizepolicy.h index 3b82e760..2130a546 100644 --- a/qt6/gen_qsizepolicy.h +++ b/qt6/gen_qsizepolicy.h @@ -16,8 +16,10 @@ extern "C" { #ifdef __cplusplus class QSizePolicy; +class QVariant; #else typedef struct QSizePolicy QSizePolicy; +typedef struct QVariant QVariant; #endif QSizePolicy* QSizePolicy_new(); @@ -37,6 +39,7 @@ void QSizePolicy_SetWidthForHeight(QSizePolicy* self, bool b); bool QSizePolicy_HasWidthForHeight(const QSizePolicy* self); bool QSizePolicy_OperatorEqual(const QSizePolicy* self, QSizePolicy* s); bool QSizePolicy_OperatorNotEqual(const QSizePolicy* self, QSizePolicy* s); +QVariant* QSizePolicy_ToQVariant(const QSizePolicy* self); int QSizePolicy_HorizontalStretch(const QSizePolicy* self); int QSizePolicy_VerticalStretch(const QSizePolicy* self); void QSizePolicy_SetHorizontalStretch(QSizePolicy* self, int stretchFactor); diff --git a/qt6/gen_qsocketnotifier.cpp b/qt6/gen_qsocketnotifier.cpp index 85b7c6d3..aadcf522 100644 --- a/qt6/gen_qsocketnotifier.cpp +++ b/qt6/gen_qsocketnotifier.cpp @@ -367,6 +367,16 @@ QSocketDescriptor* QSocketDescriptor_new3(int descriptor) { #endif } +int QSocketDescriptor_ToInt(const QSocketDescriptor* self) { +#ifdef Q_OS_LINUX + QSocketDescriptor::DescriptorType _ret = self->operator int(); + return static_cast(_ret); +#else + int _ret_invalidOS; + return _ret_invalidOS; +#endif +} + bool QSocketDescriptor_IsValid(const QSocketDescriptor* self) { return self->isValid(); } diff --git a/qt6/gen_qsocketnotifier.go b/qt6/gen_qsocketnotifier.go index f3d9623e..79963ab2 100644 --- a/qt6/gen_qsocketnotifier.go +++ b/qt6/gen_qsocketnotifier.go @@ -419,6 +419,14 @@ func NewQSocketDescriptor3(descriptor int) *QSocketDescriptor { return ret } +func (this *QSocketDescriptor) ToInt() int { + if runtime.GOOS != "linux" { + panic("Unsupported OS") + } + + return (int)(C.QSocketDescriptor_ToInt(this.h)) +} + func (this *QSocketDescriptor) IsValid() bool { return (bool)(C.QSocketDescriptor_IsValid(this.h)) } diff --git a/qt6/gen_qsocketnotifier.h b/qt6/gen_qsocketnotifier.h index c88f227e..34f0c00e 100644 --- a/qt6/gen_qsocketnotifier.h +++ b/qt6/gen_qsocketnotifier.h @@ -70,6 +70,7 @@ void QSocketNotifier_Delete(QSocketNotifier* self, bool isSubclass); QSocketDescriptor* QSocketDescriptor_new(); QSocketDescriptor* QSocketDescriptor_new2(QSocketDescriptor* param1); QSocketDescriptor* QSocketDescriptor_new3(int descriptor); +int QSocketDescriptor_ToInt(const QSocketDescriptor* self); bool QSocketDescriptor_IsValid(const QSocketDescriptor* self); void QSocketDescriptor_Delete(QSocketDescriptor* self, bool isSubclass); diff --git a/qt6/gen_qtextformat.cpp b/qt6/gen_qtextformat.cpp index a7f7a5b1..c15d4e2f 100644 --- a/qt6/gen_qtextformat.cpp +++ b/qt6/gen_qtextformat.cpp @@ -61,6 +61,10 @@ bool QTextLength_OperatorNotEqual(const QTextLength* self, QTextLength* other) { return (*self != *other); } +QVariant* QTextLength_ToQVariant(const QTextLength* self) { + return new QVariant(self->operator QVariant()); +} + void QTextLength_Delete(QTextLength* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); @@ -286,6 +290,10 @@ bool QTextFormat_OperatorNotEqual(const QTextFormat* self, QTextFormat* rhs) { return (*self != *rhs); } +QVariant* QTextFormat_ToQVariant(const QTextFormat* self) { + return new QVariant(self->operator QVariant()); +} + void QTextFormat_SetLayoutDirection(QTextFormat* self, int direction) { self->setLayoutDirection(static_cast(direction)); } diff --git a/qt6/gen_qtextformat.go b/qt6/gen_qtextformat.go index 99bd88f6..5e3bc0b0 100644 --- a/qt6/gen_qtextformat.go +++ b/qt6/gen_qtextformat.go @@ -332,6 +332,12 @@ func (this *QTextLength) OperatorNotEqual(other *QTextLength) bool { return (bool)(C.QTextLength_OperatorNotEqual(this.h, other.cPointer())) } +func (this *QTextLength) ToQVariant() *QVariant { + _goptr := newQVariant(C.QTextLength_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + // Delete this object from C++ memory. func (this *QTextLength) Delete() { C.QTextLength_Delete(this.h, C.bool(this.isSubclass)) @@ -625,6 +631,12 @@ func (this *QTextFormat) OperatorNotEqual(rhs *QTextFormat) bool { return (bool)(C.QTextFormat_OperatorNotEqual(this.h, rhs.cPointer())) } +func (this *QTextFormat) ToQVariant() *QVariant { + _goptr := newQVariant(C.QTextFormat_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QTextFormat) SetLayoutDirection(direction LayoutDirection) { C.QTextFormat_SetLayoutDirection(this.h, (C.int)(direction)) } diff --git a/qt6/gen_qtextformat.h b/qt6/gen_qtextformat.h index 0ac7909d..440ea4a1 100644 --- a/qt6/gen_qtextformat.h +++ b/qt6/gen_qtextformat.h @@ -60,6 +60,7 @@ double QTextLength_Value(const QTextLength* self, double maximumLength); double QTextLength_RawValue(const QTextLength* self); bool QTextLength_OperatorEqual(const QTextLength* self, QTextLength* other); bool QTextLength_OperatorNotEqual(const QTextLength* self, QTextLength* other); +QVariant* QTextLength_ToQVariant(const QTextLength* self); void QTextLength_Delete(QTextLength* self, bool isSubclass); QTextFormat* QTextFormat_new(); @@ -107,6 +108,7 @@ QTextImageFormat* QTextFormat_ToImageFormat(const QTextFormat* self); QTextTableCellFormat* QTextFormat_ToTableCellFormat(const QTextFormat* self); bool QTextFormat_OperatorEqual(const QTextFormat* self, QTextFormat* rhs); bool QTextFormat_OperatorNotEqual(const QTextFormat* self, QTextFormat* rhs); +QVariant* QTextFormat_ToQVariant(const QTextFormat* self); void QTextFormat_SetLayoutDirection(QTextFormat* self, int direction); int QTextFormat_LayoutDirection(const QTextFormat* self); void QTextFormat_SetBackground(QTextFormat* self, QBrush* brush); diff --git a/qt6/gen_qtransform.cpp b/qt6/gen_qtransform.cpp index 3a01edd0..7a65db4d 100644 --- a/qt6/gen_qtransform.cpp +++ b/qt6/gen_qtransform.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include "gen_qtransform.h" @@ -192,6 +193,10 @@ QTransform* QTransform_OperatorMultiply(const QTransform* self, QTransform* o) { return new QTransform(self->operator*(*o)); } +QVariant* QTransform_ToQVariant(const QTransform* self) { + return new QVariant(self->operator QVariant()); +} + void QTransform_Reset(QTransform* self) { self->reset(); } diff --git a/qt6/gen_qtransform.go b/qt6/gen_qtransform.go index 8f162110..932d9ec0 100644 --- a/qt6/gen_qtransform.go +++ b/qt6/gen_qtransform.go @@ -237,6 +237,12 @@ func (this *QTransform) OperatorMultiply(o *QTransform) *QTransform { return _goptr } +func (this *QTransform) ToQVariant() *QVariant { + _goptr := newQVariant(C.QTransform_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QTransform) Reset() { C.QTransform_Reset(this.h) } diff --git a/qt6/gen_qtransform.h b/qt6/gen_qtransform.h index 5e6e5a5e..2267e8dc 100644 --- a/qt6/gen_qtransform.h +++ b/qt6/gen_qtransform.h @@ -24,6 +24,7 @@ class QRect; class QRectF; class QRegion; class QTransform; +class QVariant; #else typedef struct QLine QLine; typedef struct QLineF QLineF; @@ -34,6 +35,7 @@ typedef struct QRect QRect; typedef struct QRectF QRectF; typedef struct QRegion QRegion; typedef struct QTransform QTransform; +typedef struct QVariant QVariant; #endif QTransform* QTransform_new(int param1); @@ -74,6 +76,7 @@ bool QTransform_OperatorEqual(const QTransform* self, QTransform* param1); bool QTransform_OperatorNotEqual(const QTransform* self, QTransform* param1); QTransform* QTransform_OperatorMultiplyAssign(QTransform* self, QTransform* param1); QTransform* QTransform_OperatorMultiply(const QTransform* self, QTransform* o); +QVariant* QTransform_ToQVariant(const QTransform* self); void QTransform_Reset(QTransform* self); QPoint* QTransform_Map(const QTransform* self, QPoint* p); QPointF* QTransform_MapWithQPointF(const QTransform* self, QPointF* p); diff --git a/qt6/gen_qvectornd.cpp b/qt6/gen_qvectornd.cpp index 07705367..01b25bc3 100644 --- a/qt6/gen_qvectornd.cpp +++ b/qt6/gen_qvectornd.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include @@ -149,6 +150,10 @@ QPointF* QVector2D_ToPointF(const QVector2D* self) { return new QPointF(self->toPointF()); } +QVariant* QVector2D_ToQVariant(const QVector2D* self) { + return new QVariant(self->operator QVariant()); +} + void QVector2D_Delete(QVector2D* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); @@ -333,6 +338,10 @@ QPointF* QVector3D_ToPointF(const QVector3D* self) { return new QPointF(self->toPointF()); } +QVariant* QVector3D_ToQVariant(const QVector3D* self) { + return new QVariant(self->operator QVariant()); +} + void QVector3D_Delete(QVector3D* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); @@ -501,6 +510,10 @@ QPointF* QVector4D_ToPointF(const QVector4D* self) { return new QPointF(self->toPointF()); } +QVariant* QVector4D_ToQVariant(const QVector4D* self) { + return new QVariant(self->operator QVariant()); +} + void QVector4D_Delete(QVector4D* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); diff --git a/qt6/gen_qvectornd.go b/qt6/gen_qvectornd.go index 0ef6cb7f..1f6869d3 100644 --- a/qt6/gen_qvectornd.go +++ b/qt6/gen_qvectornd.go @@ -212,6 +212,12 @@ func (this *QVector2D) ToPointF() *QPointF { return _goptr } +func (this *QVector2D) ToQVariant() *QVariant { + _goptr := newQVariant(C.QVector2D_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + // Delete this object from C++ memory. func (this *QVector2D) Delete() { C.QVector2D_Delete(this.h, C.bool(this.isSubclass)) @@ -479,6 +485,12 @@ func (this *QVector3D) ToPointF() *QPointF { return _goptr } +func (this *QVector3D) ToQVariant() *QVariant { + _goptr := newQVariant(C.QVector3D_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + // Delete this object from C++ memory. func (this *QVector3D) Delete() { C.QVector3D_Delete(this.h, C.bool(this.isSubclass)) @@ -728,6 +740,12 @@ func (this *QVector4D) ToPointF() *QPointF { return _goptr } +func (this *QVector4D) ToQVariant() *QVariant { + _goptr := newQVariant(C.QVector4D_ToQVariant(this.h)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + // Delete this object from C++ memory. func (this *QVector4D) Delete() { C.QVector4D_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt6/gen_qvectornd.h b/qt6/gen_qvectornd.h index 5117e97f..0d6124a0 100644 --- a/qt6/gen_qvectornd.h +++ b/qt6/gen_qvectornd.h @@ -19,6 +19,7 @@ class QMatrix4x4; class QPoint; class QPointF; class QRect; +class QVariant; class QVector2D; class QVector3D; class QVector4D; @@ -27,6 +28,7 @@ typedef struct QMatrix4x4 QMatrix4x4; typedef struct QPoint QPoint; typedef struct QPointF QPointF; typedef struct QRect QRect; +typedef struct QVariant QVariant; typedef struct QVector2D QVector2D; typedef struct QVector3D QVector3D; typedef struct QVector4D QVector4D; @@ -63,6 +65,7 @@ QVector3D* QVector2D_ToVector3D(const QVector2D* self); QVector4D* QVector2D_ToVector4D(const QVector2D* self); QPoint* QVector2D_ToPoint(const QVector2D* self); QPointF* QVector2D_ToPointF(const QVector2D* self); +QVariant* QVector2D_ToQVariant(const QVector2D* self); void QVector2D_Delete(QVector2D* self, bool isSubclass); QVector3D* QVector3D_new(); @@ -106,6 +109,7 @@ QVector2D* QVector3D_ToVector2D(const QVector3D* self); QVector4D* QVector3D_ToVector4D(const QVector3D* self); QPoint* QVector3D_ToPoint(const QVector3D* self); QPointF* QVector3D_ToPointF(const QVector3D* self); +QVariant* QVector3D_ToQVariant(const QVector3D* self); void QVector3D_Delete(QVector3D* self, bool isSubclass); QVector4D* QVector4D_new(); @@ -145,6 +149,7 @@ QVector3D* QVector4D_ToVector3D(const QVector4D* self); QVector3D* QVector4D_ToVector3DAffine(const QVector4D* self); QPoint* QVector4D_ToPoint(const QVector4D* self); QPointF* QVector4D_ToPointF(const QVector4D* self); +QVariant* QVector4D_ToQVariant(const QVector4D* self); void QVector4D_Delete(QVector4D* self, bool isSubclass); #ifdef __cplusplus From 29ceb4e235eb97e3c44f0cf55e2de14b9b6cb27e Mon Sep 17 00:00:00 2001 From: st0pli Date: Mon, 30 Dec 2024 09:51:37 +0800 Subject: [PATCH 4/6] Add QVariant__Color examples Add QVariant__Color examples --- examples/modelview_color6/main.go | 50 +++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 examples/modelview_color6/main.go diff --git a/examples/modelview_color6/main.go b/examples/modelview_color6/main.go new file mode 100644 index 00000000..035692d1 --- /dev/null +++ b/examples/modelview_color6/main.go @@ -0,0 +1,50 @@ +package main + +import ( + "fmt" + "os" + + qt "github.com/mappu/miqt/qt6" +) + +func main() { + qt.NewQApplication(os.Args) + + model := qt.NewQAbstractListModel() + + model.OnRowCount(func(parent *qt.QModelIndex) int { + return 1000 + }) + + model.OnData(func(idx *qt.QModelIndex, role int) *qt.QVariant { + if !idx.IsValid() { + return qt.NewQVariant() + } + + switch qt.ItemDataRole(role) { + case qt.ForegroundRole: + if idx.Row() % 2 == 0 { + return qt.NewQVariant4099(qt.NewQColor3(0, 0, 0)) + } else { + return qt.NewQVariant4099(qt.NewQColor3(255, 0, 0)) + } + case qt.BackgroundRole: + if idx.Row() % 2 == 0 { + return qt.NewQVariant4099(qt.NewQColor3(255, 255, 255)) + } else { + return qt.NewQVariant4099(qt.NewQColor3(80, 80, 80)) + } + case qt.DisplayRole: + return qt.NewQVariant14(fmt.Sprintf("this is row %d", idx.Row())) + + default: + return qt.NewQVariant() + } + }) + + v := qt.NewQListView2() + v.SetModel(model.QAbstractItemModel) + v.Show() + + qt.QApplication_Exec() +} From 2cf02525ca73eeb3bb7e919553583df3a2725ad9 Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 4 Jan 2025 12:23:03 +1300 Subject: [PATCH 5/6] examples/modelview_color6: update syntax --- examples/modelview_color6/main.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/modelview_color6/main.go b/examples/modelview_color6/main.go index 035692d1..da48f246 100644 --- a/examples/modelview_color6/main.go +++ b/examples/modelview_color6/main.go @@ -23,16 +23,16 @@ func main() { switch qt.ItemDataRole(role) { case qt.ForegroundRole: - if idx.Row() % 2 == 0 { - return qt.NewQVariant4099(qt.NewQColor3(0, 0, 0)) + if idx.Row()%2 == 0 { + return qt.NewQColor3(0, 0, 0).ToQVariant() } else { - return qt.NewQVariant4099(qt.NewQColor3(255, 0, 0)) + return qt.NewQColor3(255, 0, 0).ToQVariant() } case qt.BackgroundRole: - if idx.Row() % 2 == 0 { - return qt.NewQVariant4099(qt.NewQColor3(255, 255, 255)) + if idx.Row()%2 == 0 { + return qt.NewQColor3(255, 255, 255).ToQVariant() } else { - return qt.NewQVariant4099(qt.NewQColor3(80, 80, 80)) + return qt.NewQColor3(80, 80, 80).ToQVariant() } case qt.DisplayRole: return qt.NewQVariant14(fmt.Sprintf("this is row %d", idx.Row())) From 9bdd3009850e65a2b8a5c2f5ba2a2364645462db Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 4 Jan 2025 12:23:12 +1300 Subject: [PATCH 6/6] examples/modelview_color6: add gitignore and screenshot --- .gitignore | 1 + examples/modelview_color6/modelview_color6.png | Bin 0 -> 14982 bytes 2 files changed, 1 insertion(+) create mode 100644 examples/modelview_color6/modelview_color6.png diff --git a/.gitignore b/.gitignore index 90fb81a7..73a868db 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,7 @@ examples/uidesigner/uidesigner examples/trivialwizard6/trivialwizard6 examples/subclass/subclass examples/modelview/modelview +examples/modelview_color6/modelview_color6 examples/libraries/extras-scintillaedit/extras-scintillaedit examples/libraries/qt-multimedia/qt-multimedia examples/libraries/qt-network/qt-network diff --git a/examples/modelview_color6/modelview_color6.png b/examples/modelview_color6/modelview_color6.png new file mode 100644 index 0000000000000000000000000000000000000000..3531d26ffe2d8ee27e996fa166111a136436162f GIT binary patch literal 14982 zcmb`u2Q-}Pw+C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