From 913d4886ce16d6f6bb93c29d143c1cac9f7a24c4 Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 4 Jan 2025 12:19:04 +1300 Subject: [PATCH] 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