2024-08-25 04:08:24 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qgraphicslayoutitem.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
|
|
|
type QGraphicsLayoutItem struct {
|
2024-11-19 06:29:06 +00:00
|
|
|
h *C.QGraphicsLayoutItem
|
|
|
|
isSubclass bool
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) cPointer() *C.QGraphicsLayoutItem {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func (this *QGraphicsLayoutItem) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// newQGraphicsLayoutItem constructs the type using only CGO pointers.
|
2024-08-25 04:08:24 +00:00
|
|
|
func newQGraphicsLayoutItem(h *C.QGraphicsLayoutItem) *QGraphicsLayoutItem {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
return &QGraphicsLayoutItem{h: h}
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// UnsafeNewQGraphicsLayoutItem constructs the type using only unsafe pointers.
|
2024-10-16 05:07:56 +00:00
|
|
|
func UnsafeNewQGraphicsLayoutItem(h unsafe.Pointer) *QGraphicsLayoutItem {
|
2024-11-19 06:29:06 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return &QGraphicsLayoutItem{h: (*C.QGraphicsLayoutItem)(h)}
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) SetSizePolicy(policy *QSizePolicy) {
|
|
|
|
C.QGraphicsLayoutItem_SetSizePolicy(this.h, policy.cPointer())
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QGraphicsLayoutItem) SetSizePolicy2(hPolicy QSizePolicy__Policy, vPolicy QSizePolicy__Policy) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QGraphicsLayoutItem_SetSizePolicy2(this.h, (C.int)(hPolicy), (C.int)(vPolicy))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QGraphicsLayoutItem) SizePolicy() *QSizePolicy {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QGraphicsLayoutItem_SizePolicy(this.h)
|
|
|
|
_goptr := newQSizePolicy(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) SetMinimumSize(size *QSizeF) {
|
|
|
|
C.QGraphicsLayoutItem_SetMinimumSize(this.h, size.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) SetMinimumSize2(w float64, h float64) {
|
|
|
|
C.QGraphicsLayoutItem_SetMinimumSize2(this.h, (C.double)(w), (C.double)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) MinimumSize() *QSizeF {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QGraphicsLayoutItem_MinimumSize(this.h)
|
|
|
|
_goptr := newQSizeF(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) SetMinimumWidth(width float64) {
|
|
|
|
C.QGraphicsLayoutItem_SetMinimumWidth(this.h, (C.double)(width))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) MinimumWidth() float64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (float64)(C.QGraphicsLayoutItem_MinimumWidth(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) SetMinimumHeight(height float64) {
|
|
|
|
C.QGraphicsLayoutItem_SetMinimumHeight(this.h, (C.double)(height))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) MinimumHeight() float64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (float64)(C.QGraphicsLayoutItem_MinimumHeight(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) SetPreferredSize(size *QSizeF) {
|
|
|
|
C.QGraphicsLayoutItem_SetPreferredSize(this.h, size.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) SetPreferredSize2(w float64, h float64) {
|
|
|
|
C.QGraphicsLayoutItem_SetPreferredSize2(this.h, (C.double)(w), (C.double)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) PreferredSize() *QSizeF {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QGraphicsLayoutItem_PreferredSize(this.h)
|
|
|
|
_goptr := newQSizeF(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) SetPreferredWidth(width float64) {
|
|
|
|
C.QGraphicsLayoutItem_SetPreferredWidth(this.h, (C.double)(width))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) PreferredWidth() float64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (float64)(C.QGraphicsLayoutItem_PreferredWidth(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) SetPreferredHeight(height float64) {
|
|
|
|
C.QGraphicsLayoutItem_SetPreferredHeight(this.h, (C.double)(height))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) PreferredHeight() float64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (float64)(C.QGraphicsLayoutItem_PreferredHeight(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) SetMaximumSize(size *QSizeF) {
|
|
|
|
C.QGraphicsLayoutItem_SetMaximumSize(this.h, size.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) SetMaximumSize2(w float64, h float64) {
|
|
|
|
C.QGraphicsLayoutItem_SetMaximumSize2(this.h, (C.double)(w), (C.double)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) MaximumSize() *QSizeF {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QGraphicsLayoutItem_MaximumSize(this.h)
|
|
|
|
_goptr := newQSizeF(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) SetMaximumWidth(width float64) {
|
|
|
|
C.QGraphicsLayoutItem_SetMaximumWidth(this.h, (C.double)(width))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) MaximumWidth() float64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (float64)(C.QGraphicsLayoutItem_MaximumWidth(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) SetMaximumHeight(height float64) {
|
|
|
|
C.QGraphicsLayoutItem_SetMaximumHeight(this.h, (C.double)(height))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) MaximumHeight() float64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (float64)(C.QGraphicsLayoutItem_MaximumHeight(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) SetGeometry(rect *QRectF) {
|
|
|
|
C.QGraphicsLayoutItem_SetGeometry(this.h, rect.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) Geometry() *QRectF {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QGraphicsLayoutItem_Geometry(this.h)
|
|
|
|
_goptr := newQRectF(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) GetContentsMargins(left *float64, top *float64, right *float64, bottom *float64) {
|
|
|
|
C.QGraphicsLayoutItem_GetContentsMargins(this.h, (*C.double)(unsafe.Pointer(left)), (*C.double)(unsafe.Pointer(top)), (*C.double)(unsafe.Pointer(right)), (*C.double)(unsafe.Pointer(bottom)))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) ContentsRect() *QRectF {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QGraphicsLayoutItem_ContentsRect(this.h)
|
|
|
|
_goptr := newQRectF(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QGraphicsLayoutItem) EffectiveSizeHint(which SizeHint) *QSizeF {
|
2024-09-18 00:12:02 +00:00
|
|
|
_ret := C.QGraphicsLayoutItem_EffectiveSizeHint(this.h, (C.int)(which))
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr := newQSizeF(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QGraphicsLayoutItem) UpdateGeometry() {
|
|
|
|
C.QGraphicsLayoutItem_UpdateGeometry(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) ParentLayoutItem() *QGraphicsLayoutItem {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQGraphicsLayoutItem(unsafe.Pointer(C.QGraphicsLayoutItem_ParentLayoutItem(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) SetParentLayoutItem(parent *QGraphicsLayoutItem) {
|
|
|
|
C.QGraphicsLayoutItem_SetParentLayoutItem(this.h, parent.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) IsLayout() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QGraphicsLayoutItem_IsLayout(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) GraphicsItem() *QGraphicsItem {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQGraphicsItem(unsafe.Pointer(C.QGraphicsLayoutItem_GraphicsItem(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) OwnedByLayout() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QGraphicsLayoutItem_OwnedByLayout(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QGraphicsLayoutItem) SetSizePolicy3(hPolicy QSizePolicy__Policy, vPolicy QSizePolicy__Policy, controlType QSizePolicy__ControlType) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QGraphicsLayoutItem_SetSizePolicy3(this.h, (C.int)(hPolicy), (C.int)(vPolicy), (C.int)(controlType))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QGraphicsLayoutItem) EffectiveSizeHint2(which SizeHint, constraint *QSizeF) *QSizeF {
|
2024-09-18 00:12:02 +00:00
|
|
|
_ret := C.QGraphicsLayoutItem_EffectiveSizeHint2(this.h, (C.int)(which), constraint.cPointer())
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr := newQSizeF(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Delete this object from C++ memory.
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QGraphicsLayoutItem) Delete() {
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QGraphicsLayoutItem_Delete(this.h, C.bool(this.isSubclass))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
|
|
|
// from C++ memory once it is unreachable from Go memory.
|
|
|
|
func (this *QGraphicsLayoutItem) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QGraphicsLayoutItem) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|