2024-08-25 04:08:24 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qgraphicsgridlayout.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 QGraphicsGridLayout struct {
|
|
|
|
h *C.QGraphicsGridLayout
|
|
|
|
*QGraphicsLayout
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) cPointer() *C.QGraphicsGridLayout {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
|
|
|
func newQGraphicsGridLayout(h *C.QGraphicsGridLayout) *QGraphicsGridLayout {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
return &QGraphicsGridLayout{h: h, QGraphicsLayout: newQGraphicsLayout_U(unsafe.Pointer(h))}
|
|
|
|
}
|
|
|
|
|
|
|
|
func newQGraphicsGridLayout_U(h unsafe.Pointer) *QGraphicsGridLayout {
|
|
|
|
return newQGraphicsGridLayout((*C.QGraphicsGridLayout)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQGraphicsGridLayout constructs a new QGraphicsGridLayout object.
|
|
|
|
func NewQGraphicsGridLayout() *QGraphicsGridLayout {
|
|
|
|
ret := C.QGraphicsGridLayout_new()
|
|
|
|
return newQGraphicsGridLayout(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQGraphicsGridLayout2 constructs a new QGraphicsGridLayout object.
|
|
|
|
func NewQGraphicsGridLayout2(parent *QGraphicsLayoutItem) *QGraphicsGridLayout {
|
|
|
|
ret := C.QGraphicsGridLayout_new2(parent.cPointer())
|
|
|
|
return newQGraphicsGridLayout(ret)
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
func (this *QGraphicsGridLayout) AddItem(item *QGraphicsLayoutItem, row int, column int, rowSpan int, columnSpan int) {
|
|
|
|
C.QGraphicsGridLayout_AddItem(this.h, item.cPointer(), (C.int)(row), (C.int)(column), (C.int)(rowSpan), (C.int)(columnSpan))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) AddItem2(item *QGraphicsLayoutItem, row int, column int) {
|
|
|
|
C.QGraphicsGridLayout_AddItem2(this.h, item.cPointer(), (C.int)(row), (C.int)(column))
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QGraphicsGridLayout) SetHorizontalSpacing(spacing float64) {
|
|
|
|
C.QGraphicsGridLayout_SetHorizontalSpacing(this.h, (C.double)(spacing))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) HorizontalSpacing() float64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (float64)(C.QGraphicsGridLayout_HorizontalSpacing(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) SetVerticalSpacing(spacing float64) {
|
|
|
|
C.QGraphicsGridLayout_SetVerticalSpacing(this.h, (C.double)(spacing))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) VerticalSpacing() float64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (float64)(C.QGraphicsGridLayout_VerticalSpacing(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) SetSpacing(spacing float64) {
|
|
|
|
C.QGraphicsGridLayout_SetSpacing(this.h, (C.double)(spacing))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) SetRowSpacing(row int, spacing float64) {
|
|
|
|
C.QGraphicsGridLayout_SetRowSpacing(this.h, (C.int)(row), (C.double)(spacing))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) RowSpacing(row int) float64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (float64)(C.QGraphicsGridLayout_RowSpacing(this.h, (C.int)(row)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) SetColumnSpacing(column int, spacing float64) {
|
|
|
|
C.QGraphicsGridLayout_SetColumnSpacing(this.h, (C.int)(column), (C.double)(spacing))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) ColumnSpacing(column int) float64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (float64)(C.QGraphicsGridLayout_ColumnSpacing(this.h, (C.int)(column)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) SetRowStretchFactor(row int, stretch int) {
|
|
|
|
C.QGraphicsGridLayout_SetRowStretchFactor(this.h, (C.int)(row), (C.int)(stretch))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) RowStretchFactor(row int) int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QGraphicsGridLayout_RowStretchFactor(this.h, (C.int)(row)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) SetColumnStretchFactor(column int, stretch int) {
|
|
|
|
C.QGraphicsGridLayout_SetColumnStretchFactor(this.h, (C.int)(column), (C.int)(stretch))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) ColumnStretchFactor(column int) int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QGraphicsGridLayout_ColumnStretchFactor(this.h, (C.int)(column)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) SetRowMinimumHeight(row int, height float64) {
|
|
|
|
C.QGraphicsGridLayout_SetRowMinimumHeight(this.h, (C.int)(row), (C.double)(height))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) RowMinimumHeight(row int) float64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (float64)(C.QGraphicsGridLayout_RowMinimumHeight(this.h, (C.int)(row)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) SetRowPreferredHeight(row int, height float64) {
|
|
|
|
C.QGraphicsGridLayout_SetRowPreferredHeight(this.h, (C.int)(row), (C.double)(height))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) RowPreferredHeight(row int) float64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (float64)(C.QGraphicsGridLayout_RowPreferredHeight(this.h, (C.int)(row)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) SetRowMaximumHeight(row int, height float64) {
|
|
|
|
C.QGraphicsGridLayout_SetRowMaximumHeight(this.h, (C.int)(row), (C.double)(height))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) RowMaximumHeight(row int) float64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (float64)(C.QGraphicsGridLayout_RowMaximumHeight(this.h, (C.int)(row)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) SetRowFixedHeight(row int, height float64) {
|
|
|
|
C.QGraphicsGridLayout_SetRowFixedHeight(this.h, (C.int)(row), (C.double)(height))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) SetColumnMinimumWidth(column int, width float64) {
|
|
|
|
C.QGraphicsGridLayout_SetColumnMinimumWidth(this.h, (C.int)(column), (C.double)(width))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) ColumnMinimumWidth(column int) float64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (float64)(C.QGraphicsGridLayout_ColumnMinimumWidth(this.h, (C.int)(column)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) SetColumnPreferredWidth(column int, width float64) {
|
|
|
|
C.QGraphicsGridLayout_SetColumnPreferredWidth(this.h, (C.int)(column), (C.double)(width))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) ColumnPreferredWidth(column int) float64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (float64)(C.QGraphicsGridLayout_ColumnPreferredWidth(this.h, (C.int)(column)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) SetColumnMaximumWidth(column int, width float64) {
|
|
|
|
C.QGraphicsGridLayout_SetColumnMaximumWidth(this.h, (C.int)(column), (C.double)(width))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) ColumnMaximumWidth(column int) float64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (float64)(C.QGraphicsGridLayout_ColumnMaximumWidth(this.h, (C.int)(column)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) SetColumnFixedWidth(column int, width float64) {
|
|
|
|
C.QGraphicsGridLayout_SetColumnFixedWidth(this.h, (C.int)(column), (C.double)(width))
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
func (this *QGraphicsGridLayout) SetRowAlignment(row int, alignment int) {
|
|
|
|
C.QGraphicsGridLayout_SetRowAlignment(this.h, (C.int)(row), (C.int)(alignment))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) RowAlignment(row int) int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QGraphicsGridLayout_RowAlignment(this.h, (C.int)(row)))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) SetColumnAlignment(column int, alignment int) {
|
|
|
|
C.QGraphicsGridLayout_SetColumnAlignment(this.h, (C.int)(column), (C.int)(alignment))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) ColumnAlignment(column int) int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QGraphicsGridLayout_ColumnAlignment(this.h, (C.int)(column)))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) SetAlignment(item *QGraphicsLayoutItem, alignment int) {
|
|
|
|
C.QGraphicsGridLayout_SetAlignment(this.h, item.cPointer(), (C.int)(alignment))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) Alignment(item *QGraphicsLayoutItem) int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QGraphicsGridLayout_Alignment(this.h, item.cPointer()))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QGraphicsGridLayout) RowCount() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QGraphicsGridLayout_RowCount(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) ColumnCount() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QGraphicsGridLayout_ColumnCount(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) ItemAt(row int, column int) *QGraphicsLayoutItem {
|
2024-09-17 07:30:27 +00:00
|
|
|
return newQGraphicsLayoutItem_U(unsafe.Pointer(C.QGraphicsGridLayout_ItemAt(this.h, (C.int)(row), (C.int)(column))))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) Count() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QGraphicsGridLayout_Count(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) ItemAtWithIndex(index int) *QGraphicsLayoutItem {
|
2024-09-17 07:30:27 +00:00
|
|
|
return newQGraphicsLayoutItem_U(unsafe.Pointer(C.QGraphicsGridLayout_ItemAtWithIndex(this.h, (C.int)(index))))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) RemoveAt(index int) {
|
|
|
|
C.QGraphicsGridLayout_RemoveAt(this.h, (C.int)(index))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) RemoveItem(item *QGraphicsLayoutItem) {
|
|
|
|
C.QGraphicsGridLayout_RemoveItem(this.h, item.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) Invalidate() {
|
|
|
|
C.QGraphicsGridLayout_Invalidate(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) SetGeometry(rect *QRectF) {
|
|
|
|
C.QGraphicsGridLayout_SetGeometry(this.h, rect.cPointer())
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QGraphicsGridLayout) SizeHint(which SizeHint) *QSizeF {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QGraphicsGridLayout_SizeHint(this.h, (C.uintptr_t)(which))
|
|
|
|
_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
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) AddItem6(item *QGraphicsLayoutItem, row int, column int, rowSpan int, columnSpan int, alignment int) {
|
|
|
|
C.QGraphicsGridLayout_AddItem6(this.h, item.cPointer(), (C.int)(row), (C.int)(column), (C.int)(rowSpan), (C.int)(columnSpan), (C.int)(alignment))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsGridLayout) AddItem4(item *QGraphicsLayoutItem, row int, column int, alignment int) {
|
|
|
|
C.QGraphicsGridLayout_AddItem4(this.h, item.cPointer(), (C.int)(row), (C.int)(column), (C.int)(alignment))
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QGraphicsGridLayout) SizeHint2(which SizeHint, constraint *QSizeF) *QSizeF {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QGraphicsGridLayout_SizeHint2(this.h, (C.uintptr_t)(which), constraint.cPointer())
|
|
|
|
_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 *QGraphicsGridLayout) Delete() {
|
|
|
|
C.QGraphicsGridLayout_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 *QGraphicsGridLayout) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QGraphicsGridLayout) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|