mirror of
https://github.com/mappu/miqt.git
synced 2025-01-08 16:38:37 +00:00
Merge pull request #120 from mappu/miqt-conversiondecl
Implement conversion operators
This commit is contained in:
commit
4c0d782bd3
1
.gitignore
vendored
1
.gitignore
vendored
@ -30,6 +30,7 @@ examples/uidesigner/uidesigner
|
||||
examples/trivialwizard6/trivialwizard6
|
||||
examples/subclass/subclass
|
||||
examples/modelview/modelview
|
||||
examples/modelview_color6/modelview_color6
|
||||
examples/libraries/extras-scintillaedit/extras-scintillaedit
|
||||
examples/libraries/qt-multimedia/qt-multimedia
|
||||
examples/libraries/qt-network/qt-network
|
||||
|
@ -421,7 +421,8 @@ nextMethod:
|
||||
continue
|
||||
}
|
||||
|
||||
case "CXXMethodDecl":
|
||||
case "CXXMethodDecl",
|
||||
"CXXConversionDecl": // e.g. `QColor::operator QVariant()`
|
||||
|
||||
// Method
|
||||
methodName, ok := node["name"].(string)
|
||||
|
@ -293,6 +293,14 @@ func AllowMethod(className string, mm CppMethod) error {
|
||||
return ErrTooComplex
|
||||
}
|
||||
|
||||
if className == "qfloat16" && mm.MethodName == "operator float" {
|
||||
// Present in Qt 5 and Qt 6.4, but in 6.5++ the declaration is conditional on QFLOAT16_IS_NATIVE
|
||||
// In that case it becomes `operator std::float16_t` or `operator _Float16` depending on your
|
||||
// compiler
|
||||
// A proper fix here would be to reproject qfloat16 as std::float16_t (?) in all cases
|
||||
return ErrTooComplex
|
||||
}
|
||||
|
||||
return nil // OK, allow
|
||||
}
|
||||
|
||||
|
@ -308,6 +308,11 @@ func (nm CppMethod) SafeMethodName() string {
|
||||
// languages. Replace more specific cases first
|
||||
replacer := strings.NewReplacer(
|
||||
|
||||
// `operator ` with a trailing space only occurs in conversion operators
|
||||
// Add a fake _ here, but it will be replaced with camelcase in the regex below
|
||||
`operator `, `To `,
|
||||
`::`, `__`, // e.g. `operator QCborError::Code`
|
||||
|
||||
`==`, `Equal`,
|
||||
`!=`, `NotEqual`,
|
||||
`>=`, `GreaterOrEqual`,
|
||||
@ -342,7 +347,12 @@ func (nm CppMethod) SafeMethodName() string {
|
||||
// Also make the first letter uppercase so it becomes public in Go
|
||||
tmp = titleCase(tmp)
|
||||
|
||||
// Replace spaces (e.g. `operator long long` with CamelCase
|
||||
tmp = regexp.MustCompile(` ([a-zA-Z])`).ReplaceAllStringFunc(tmp, func(match string) string { return strings.ToUpper(match[1:]) })
|
||||
|
||||
// Also replace any underscore_case with CamelCase
|
||||
// Only catch lowercase letters in this one, not uppercase, as it causes a
|
||||
// lot of churn for Scintilla
|
||||
tmp = regexp.MustCompile(`_([a-z])`).ReplaceAllStringFunc(tmp, func(match string) string { return strings.ToUpper(match[1:]) })
|
||||
|
||||
return tmp
|
||||
|
50
examples/modelview_color6/main.go
Normal file
50
examples/modelview_color6/main.go
Normal file
@ -0,0 +1,50 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
qt "github.com/mappu/miqt/qt6"
|
||||
)
|
||||
|
||||
func main() {
|
||||
qt.NewQApplication(os.Args)
|
||||
|
||||
model := qt.NewQAbstractListModel()
|
||||
|
||||
model.OnRowCount(func(parent *qt.QModelIndex) int {
|
||||
return 1000
|
||||
})
|
||||
|
||||
model.OnData(func(idx *qt.QModelIndex, role int) *qt.QVariant {
|
||||
if !idx.IsValid() {
|
||||
return qt.NewQVariant()
|
||||
}
|
||||
|
||||
switch qt.ItemDataRole(role) {
|
||||
case qt.ForegroundRole:
|
||||
if idx.Row()%2 == 0 {
|
||||
return qt.NewQColor3(0, 0, 0).ToQVariant()
|
||||
} else {
|
||||
return qt.NewQColor3(255, 0, 0).ToQVariant()
|
||||
}
|
||||
case qt.BackgroundRole:
|
||||
if idx.Row()%2 == 0 {
|
||||
return qt.NewQColor3(255, 255, 255).ToQVariant()
|
||||
} else {
|
||||
return qt.NewQColor3(80, 80, 80).ToQVariant()
|
||||
}
|
||||
case qt.DisplayRole:
|
||||
return qt.NewQVariant14(fmt.Sprintf("this is row %d", idx.Row()))
|
||||
|
||||
default:
|
||||
return qt.NewQVariant()
|
||||
}
|
||||
})
|
||||
|
||||
v := qt.NewQListView2()
|
||||
v.SetModel(model.QAbstractItemModel)
|
||||
v.Show()
|
||||
|
||||
qt.QApplication_Exec()
|
||||
}
|
BIN
examples/modelview_color6/modelview_color6.png
Normal file
BIN
examples/modelview_color6/modelview_color6.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
@ -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<int>(_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
|
||||
|
@ -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)))
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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())
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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<QModelIndex*>(&_ret);
|
||||
}
|
||||
|
||||
int QPersistentModelIndex_Row(const QPersistentModelIndex* self) {
|
||||
return self->row();
|
||||
}
|
||||
|
@ -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))
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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!();
|
||||
}
|
||||
|
@ -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))
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <QTransform>
|
||||
#include <QVariant>
|
||||
#include <qbitmap.h>
|
||||
#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();
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include <QPointF>
|
||||
#include <QRadialGradient>
|
||||
#include <QTransform>
|
||||
#include <QVariant>
|
||||
#include <qbrush.h>
|
||||
#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<int>(_ret);
|
||||
|
@ -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))
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <QVariant>
|
||||
#include <qcolor.h>
|
||||
#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);
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -2,6 +2,7 @@
|
||||
#include <QColorSpace>
|
||||
#include <QColorTransform>
|
||||
#include <QPointF>
|
||||
#include <QVariant>
|
||||
#include <qcolorspace.h>
|
||||
#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<QColorSpace::TransferFunction>(transferFunction), static_cast<float>(gamma));
|
||||
}
|
||||
|
@ -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))
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include <QPixmap>
|
||||
#include <QPoint>
|
||||
#include <QScreen>
|
||||
#include <QVariant>
|
||||
#include <qcursor.h>
|
||||
#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<int>(_ret);
|
||||
|
@ -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))
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <QVariant>
|
||||
#include <qfont.h>
|
||||
#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);
|
||||
}
|
||||
|
@ -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()))
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <QVariant>
|
||||
#include <QWindow>
|
||||
#include <qicon.h>
|
||||
#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));
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <QTransform>
|
||||
#include <QVariant>
|
||||
#include <qimage.h>
|
||||
#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();
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -210,6 +210,10 @@ QJsonValueRef* QJsonValueRef_new3(QJsonObject* object, int idx) {
|
||||
return new QJsonValueRef(object, static_cast<int>(idx));
|
||||
}
|
||||
|
||||
QJsonValue* QJsonValueRef_ToQJsonValue(const QJsonValueRef* self) {
|
||||
return new QJsonValue(self->operator QJsonValue());
|
||||
}
|
||||
|
||||
void QJsonValueRef_OperatorAssign(QJsonValueRef* self, QJsonValue* val) {
|
||||
self->operator=(*val);
|
||||
}
|
||||
|
@ -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())
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <QVariant>
|
||||
#include <qkeysequence.h>
|
||||
#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<uint>(i));
|
||||
}
|
||||
|
@ -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)))
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <QRect>
|
||||
#include <QRectF>
|
||||
#include <QRegion>
|
||||
#include <QVariant>
|
||||
#include <qmatrix.h>
|
||||
#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));
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include <QRect>
|
||||
#include <QRectF>
|
||||
#include <QTransform>
|
||||
#include <QVariant>
|
||||
#include <QVector3D>
|
||||
#include <QVector4D>
|
||||
#include <qmatrix4x4.h>
|
||||
@ -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));
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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())
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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()))
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include <QBrush>
|
||||
#include <QColor>
|
||||
#include <QPalette>
|
||||
#include <QVariant>
|
||||
#include <qpalette.h>
|
||||
#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<int>(_ret);
|
||||
|
@ -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))
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -2,6 +2,7 @@
|
||||
#include <QColor>
|
||||
#include <QList>
|
||||
#include <QPen>
|
||||
#include <QVariant>
|
||||
#include <qpen.h>
|
||||
#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();
|
||||
}
|
||||
|
@ -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))
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <QTransform>
|
||||
#include <QVariant>
|
||||
#include <qpixmap.h>
|
||||
#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();
|
||||
}
|
||||
|
@ -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))
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include <QQuaternion>
|
||||
#include <QVariant>
|
||||
#include <QVector3D>
|
||||
#include <QVector4D>
|
||||
#include <qquaternion.h>
|
||||
@ -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<float*>(angle));
|
||||
}
|
||||
|
@ -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)))
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include <QPoint>
|
||||
#include <QRect>
|
||||
#include <QRegion>
|
||||
#include <QVariant>
|
||||
#include <qregion.h>
|
||||
#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<QRegion*>( self );
|
||||
|
@ -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))
|
||||
|
@ -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
|
||||
|
@ -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<unsigned long long>(_ret);
|
||||
}
|
||||
|
||||
void QRgba64_OperatorAssign(QRgba64* self, unsigned long long _rgba) {
|
||||
self->operator=(static_cast<quint64>(_rgba));
|
||||
}
|
||||
|
@ -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))
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include <QSizePolicy>
|
||||
#include <QVariant>
|
||||
#include <qsizepolicy.h>
|
||||
#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();
|
||||
}
|
||||
|
@ -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))
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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<int>(_ret);
|
||||
#else
|
||||
int _ret_invalidOS;
|
||||
return _ret_invalidOS;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool QSocketDescriptor_IsValid(const QSocketDescriptor* self) {
|
||||
return self->isValid();
|
||||
}
|
||||
|
@ -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))
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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<QTextLength*>( 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<Qt::LayoutDirection>(direction));
|
||||
}
|
||||
|
@ -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))
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <QRectF>
|
||||
#include <QRegion>
|
||||
#include <QTransform>
|
||||
#include <QVariant>
|
||||
#include <qtransform.h>
|
||||
#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();
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include <QPoint>
|
||||
#include <QPointF>
|
||||
#include <QVariant>
|
||||
#include <QVector2D>
|
||||
#include <QVector3D>
|
||||
#include <QVector4D>
|
||||
@ -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<QVector2D*>( self );
|
||||
|
@ -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))
|
||||
|
@ -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
|
||||
|
@ -2,6 +2,7 @@
|
||||
#include <QPoint>
|
||||
#include <QPointF>
|
||||
#include <QRect>
|
||||
#include <QVariant>
|
||||
#include <QVector2D>
|
||||
#include <QVector3D>
|
||||
#include <QVector4D>
|
||||
@ -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<QVector3D*>( self );
|
||||
|
@ -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))
|
||||
|
@ -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
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include <QPoint>
|
||||
#include <QPointF>
|
||||
#include <QVariant>
|
||||
#include <QVector2D>
|
||||
#include <QVector3D>
|
||||
#include <QVector4D>
|
||||
@ -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<QVector4D*>( self );
|
||||
|
@ -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))
|
||||
|
@ -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
|
||||
|
@ -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<char*>(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<unsigned int>(_ret);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user