2024-08-25 04:08:24 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qgraphicslinearlayout.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
2024-08-29 07:01:51 +00:00
|
|
|
"runtime"
|
2024-08-25 04:08:24 +00:00
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
|
|
|
type QGraphicsLinearLayout struct {
|
|
|
|
h *C.QGraphicsLinearLayout
|
|
|
|
*QGraphicsLayout
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLinearLayout) cPointer() *C.QGraphicsLinearLayout {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
|
|
|
func newQGraphicsLinearLayout(h *C.QGraphicsLinearLayout) *QGraphicsLinearLayout {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
return &QGraphicsLinearLayout{h: h, QGraphicsLayout: newQGraphicsLayout_U(unsafe.Pointer(h))}
|
|
|
|
}
|
|
|
|
|
|
|
|
func newQGraphicsLinearLayout_U(h unsafe.Pointer) *QGraphicsLinearLayout {
|
|
|
|
return newQGraphicsLinearLayout((*C.QGraphicsLinearLayout)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQGraphicsLinearLayout constructs a new QGraphicsLinearLayout object.
|
|
|
|
func NewQGraphicsLinearLayout() *QGraphicsLinearLayout {
|
|
|
|
ret := C.QGraphicsLinearLayout_new()
|
|
|
|
return newQGraphicsLinearLayout(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQGraphicsLinearLayout2 constructs a new QGraphicsLinearLayout object.
|
2024-09-04 06:54:22 +00:00
|
|
|
func NewQGraphicsLinearLayout2(orientation Orientation) *QGraphicsLinearLayout {
|
2024-09-18 00:12:02 +00:00
|
|
|
ret := C.QGraphicsLinearLayout_new2((C.int)(orientation))
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQGraphicsLinearLayout(ret)
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
// NewQGraphicsLinearLayout3 constructs a new QGraphicsLinearLayout object.
|
|
|
|
func NewQGraphicsLinearLayout3(parent *QGraphicsLayoutItem) *QGraphicsLinearLayout {
|
|
|
|
ret := C.QGraphicsLinearLayout_new3(parent.cPointer())
|
|
|
|
return newQGraphicsLinearLayout(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQGraphicsLinearLayout4 constructs a new QGraphicsLinearLayout object.
|
2024-09-04 06:54:22 +00:00
|
|
|
func NewQGraphicsLinearLayout4(orientation Orientation, parent *QGraphicsLayoutItem) *QGraphicsLinearLayout {
|
2024-09-18 00:12:02 +00:00
|
|
|
ret := C.QGraphicsLinearLayout_new4((C.int)(orientation), parent.cPointer())
|
2024-08-29 07:01:51 +00:00
|
|
|
return newQGraphicsLinearLayout(ret)
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QGraphicsLinearLayout) SetOrientation(orientation Orientation) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QGraphicsLinearLayout_SetOrientation(this.h, (C.int)(orientation))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QGraphicsLinearLayout) Orientation() Orientation {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (Orientation)(C.QGraphicsLinearLayout_Orientation(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QGraphicsLinearLayout) AddItem(item *QGraphicsLayoutItem) {
|
|
|
|
C.QGraphicsLinearLayout_AddItem(this.h, item.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLinearLayout) AddStretch() {
|
|
|
|
C.QGraphicsLinearLayout_AddStretch(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLinearLayout) InsertItem(index int, item *QGraphicsLayoutItem) {
|
|
|
|
C.QGraphicsLinearLayout_InsertItem(this.h, (C.int)(index), item.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLinearLayout) InsertStretch(index int) {
|
|
|
|
C.QGraphicsLinearLayout_InsertStretch(this.h, (C.int)(index))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLinearLayout) RemoveItem(item *QGraphicsLayoutItem) {
|
|
|
|
C.QGraphicsLinearLayout_RemoveItem(this.h, item.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLinearLayout) RemoveAt(index int) {
|
|
|
|
C.QGraphicsLinearLayout_RemoveAt(this.h, (C.int)(index))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLinearLayout) SetSpacing(spacing float64) {
|
|
|
|
C.QGraphicsLinearLayout_SetSpacing(this.h, (C.double)(spacing))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLinearLayout) Spacing() float64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (float64)(C.QGraphicsLinearLayout_Spacing(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLinearLayout) SetItemSpacing(index int, spacing float64) {
|
|
|
|
C.QGraphicsLinearLayout_SetItemSpacing(this.h, (C.int)(index), (C.double)(spacing))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLinearLayout) ItemSpacing(index int) float64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (float64)(C.QGraphicsLinearLayout_ItemSpacing(this.h, (C.int)(index)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLinearLayout) SetStretchFactor(item *QGraphicsLayoutItem, stretch int) {
|
|
|
|
C.QGraphicsLinearLayout_SetStretchFactor(this.h, item.cPointer(), (C.int)(stretch))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLinearLayout) StretchFactor(item *QGraphicsLayoutItem) int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QGraphicsLinearLayout_StretchFactor(this.h, item.cPointer()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 06:40:03 +00:00
|
|
|
func (this *QGraphicsLinearLayout) SetAlignment(item *QGraphicsLayoutItem, alignment AlignmentFlag) {
|
2024-09-18 01:33:50 +00:00
|
|
|
C.QGraphicsLinearLayout_SetAlignment(this.h, item.cPointer(), (C.int)(alignment))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 06:40:03 +00:00
|
|
|
func (this *QGraphicsLinearLayout) Alignment(item *QGraphicsLayoutItem) AlignmentFlag {
|
|
|
|
return (AlignmentFlag)(C.QGraphicsLinearLayout_Alignment(this.h, item.cPointer()))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QGraphicsLinearLayout) SetGeometry(rect *QRectF) {
|
|
|
|
C.QGraphicsLinearLayout_SetGeometry(this.h, rect.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLinearLayout) Count() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QGraphicsLinearLayout_Count(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLinearLayout) ItemAt(index int) *QGraphicsLayoutItem {
|
2024-09-17 07:30:27 +00:00
|
|
|
return newQGraphicsLayoutItem_U(unsafe.Pointer(C.QGraphicsLinearLayout_ItemAt(this.h, (C.int)(index))))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLinearLayout) Invalidate() {
|
|
|
|
C.QGraphicsLinearLayout_Invalidate(this.h)
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QGraphicsLinearLayout) SizeHint(which SizeHint) *QSizeF {
|
2024-09-18 00:12:02 +00:00
|
|
|
_ret := C.QGraphicsLinearLayout_SizeHint(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 *QGraphicsLinearLayout) Dump() {
|
|
|
|
C.QGraphicsLinearLayout_Dump(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLinearLayout) AddStretch1(stretch int) {
|
|
|
|
C.QGraphicsLinearLayout_AddStretch1(this.h, (C.int)(stretch))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLinearLayout) InsertStretch2(index int, stretch int) {
|
|
|
|
C.QGraphicsLinearLayout_InsertStretch2(this.h, (C.int)(index), (C.int)(stretch))
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QGraphicsLinearLayout) SizeHint2(which SizeHint, constraint *QSizeF) *QSizeF {
|
2024-09-18 00:12:02 +00:00
|
|
|
_ret := C.QGraphicsLinearLayout_SizeHint2(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-08-25 04:08:24 +00:00
|
|
|
func (this *QGraphicsLinearLayout) Dump1(indent int) {
|
|
|
|
C.QGraphicsLinearLayout_Dump1(this.h, (C.int)(indent))
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Delete this object from C++ memory.
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QGraphicsLinearLayout) Delete() {
|
|
|
|
C.QGraphicsLinearLayout_Delete(this.h)
|
|
|
|
}
|
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 *QGraphicsLinearLayout) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QGraphicsLinearLayout) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|