miqt/qt/gen_qheaderview.go

679 lines
21 KiB
Go
Raw Normal View History

package qt
/*
#include "gen_qheaderview.h"
#include <stdlib.h>
*/
import "C"
import (
"runtime"
"runtime/cgo"
"unsafe"
)
2024-09-04 06:54:22 +00:00
type QHeaderView__ResizeMode int
const (
QHeaderView__ResizeMode__Interactive QHeaderView__ResizeMode = 0
QHeaderView__ResizeMode__Stretch QHeaderView__ResizeMode = 1
QHeaderView__ResizeMode__Fixed QHeaderView__ResizeMode = 2
QHeaderView__ResizeMode__ResizeToContents QHeaderView__ResizeMode = 3
QHeaderView__ResizeMode__Custom QHeaderView__ResizeMode = 2
)
type QHeaderView struct {
h *C.QHeaderView
*QAbstractItemView
}
func (this *QHeaderView) cPointer() *C.QHeaderView {
if this == nil {
return nil
}
return this.h
}
func newQHeaderView(h *C.QHeaderView) *QHeaderView {
2024-09-01 02:23:55 +00:00
if h == nil {
return nil
}
return &QHeaderView{h: h, QAbstractItemView: newQAbstractItemView_U(unsafe.Pointer(h))}
}
func newQHeaderView_U(h unsafe.Pointer) *QHeaderView {
return newQHeaderView((*C.QHeaderView)(h))
}
2024-08-29 07:01:51 +00:00
// NewQHeaderView constructs a new QHeaderView object.
2024-09-04 06:54:22 +00:00
func NewQHeaderView(orientation Orientation) *QHeaderView {
2024-08-29 07:01:51 +00:00
ret := C.QHeaderView_new((C.uintptr_t)(orientation))
return newQHeaderView(ret)
}
// NewQHeaderView2 constructs a new QHeaderView object.
2024-09-04 06:54:22 +00:00
func NewQHeaderView2(orientation Orientation, parent *QWidget) *QHeaderView {
2024-08-29 07:01:51 +00:00
ret := C.QHeaderView_new2((C.uintptr_t)(orientation), parent.cPointer())
return newQHeaderView(ret)
}
func (this *QHeaderView) MetaObject() *QMetaObject {
_ret := C.QHeaderView_MetaObject(this.h)
return newQMetaObject_U(unsafe.Pointer(_ret))
}
func QHeaderView_Tr(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
var _ms *C.struct_miqt_string = C.QHeaderView_Tr(s_Cstring)
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms))
return _ret
}
func QHeaderView_TrUtf8(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
var _ms *C.struct_miqt_string = C.QHeaderView_TrUtf8(s_Cstring)
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms))
return _ret
}
func (this *QHeaderView) SetModel(model *QAbstractItemModel) {
C.QHeaderView_SetModel(this.h, model.cPointer())
}
2024-09-04 06:54:22 +00:00
func (this *QHeaderView) Orientation() Orientation {
_ret := C.QHeaderView_Orientation(this.h)
return (Orientation)(_ret)
2024-08-29 07:01:51 +00:00
}
func (this *QHeaderView) Offset() int {
_ret := C.QHeaderView_Offset(this.h)
return (int)(_ret)
}
func (this *QHeaderView) Length() int {
_ret := C.QHeaderView_Length(this.h)
return (int)(_ret)
}
func (this *QHeaderView) SizeHint() *QSize {
_ret := C.QHeaderView_SizeHint(this.h)
_goptr := newQSize(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QHeaderView) SetVisible(v bool) {
C.QHeaderView_SetVisible(this.h, (C.bool)(v))
}
func (this *QHeaderView) SectionSizeHint(logicalIndex int) int {
_ret := C.QHeaderView_SectionSizeHint(this.h, (C.int)(logicalIndex))
return (int)(_ret)
}
func (this *QHeaderView) VisualIndexAt(position int) int {
_ret := C.QHeaderView_VisualIndexAt(this.h, (C.int)(position))
return (int)(_ret)
}
func (this *QHeaderView) LogicalIndexAt(position int) int {
_ret := C.QHeaderView_LogicalIndexAt(this.h, (C.int)(position))
return (int)(_ret)
}
func (this *QHeaderView) LogicalIndexAt2(x int, y int) int {
_ret := C.QHeaderView_LogicalIndexAt2(this.h, (C.int)(x), (C.int)(y))
return (int)(_ret)
}
func (this *QHeaderView) LogicalIndexAtWithPos(pos *QPoint) int {
_ret := C.QHeaderView_LogicalIndexAtWithPos(this.h, pos.cPointer())
return (int)(_ret)
}
func (this *QHeaderView) SectionSize(logicalIndex int) int {
_ret := C.QHeaderView_SectionSize(this.h, (C.int)(logicalIndex))
return (int)(_ret)
}
func (this *QHeaderView) SectionPosition(logicalIndex int) int {
_ret := C.QHeaderView_SectionPosition(this.h, (C.int)(logicalIndex))
return (int)(_ret)
}
func (this *QHeaderView) SectionViewportPosition(logicalIndex int) int {
_ret := C.QHeaderView_SectionViewportPosition(this.h, (C.int)(logicalIndex))
return (int)(_ret)
}
func (this *QHeaderView) MoveSection(from int, to int) {
C.QHeaderView_MoveSection(this.h, (C.int)(from), (C.int)(to))
}
func (this *QHeaderView) SwapSections(first int, second int) {
C.QHeaderView_SwapSections(this.h, (C.int)(first), (C.int)(second))
}
func (this *QHeaderView) ResizeSection(logicalIndex int, size int) {
C.QHeaderView_ResizeSection(this.h, (C.int)(logicalIndex), (C.int)(size))
}
2024-09-04 06:54:22 +00:00
func (this *QHeaderView) ResizeSections(mode QHeaderView__ResizeMode) {
2024-08-29 07:01:51 +00:00
C.QHeaderView_ResizeSections(this.h, (C.uintptr_t)(mode))
}
func (this *QHeaderView) IsSectionHidden(logicalIndex int) bool {
_ret := C.QHeaderView_IsSectionHidden(this.h, (C.int)(logicalIndex))
return (bool)(_ret)
}
func (this *QHeaderView) SetSectionHidden(logicalIndex int, hide bool) {
C.QHeaderView_SetSectionHidden(this.h, (C.int)(logicalIndex), (C.bool)(hide))
}
func (this *QHeaderView) HiddenSectionCount() int {
_ret := C.QHeaderView_HiddenSectionCount(this.h)
return (int)(_ret)
}
func (this *QHeaderView) HideSection(logicalIndex int) {
C.QHeaderView_HideSection(this.h, (C.int)(logicalIndex))
}
func (this *QHeaderView) ShowSection(logicalIndex int) {
C.QHeaderView_ShowSection(this.h, (C.int)(logicalIndex))
}
func (this *QHeaderView) Count() int {
_ret := C.QHeaderView_Count(this.h)
return (int)(_ret)
}
func (this *QHeaderView) VisualIndex(logicalIndex int) int {
_ret := C.QHeaderView_VisualIndex(this.h, (C.int)(logicalIndex))
return (int)(_ret)
}
func (this *QHeaderView) LogicalIndex(visualIndex int) int {
_ret := C.QHeaderView_LogicalIndex(this.h, (C.int)(visualIndex))
return (int)(_ret)
}
func (this *QHeaderView) SetSectionsMovable(movable bool) {
C.QHeaderView_SetSectionsMovable(this.h, (C.bool)(movable))
}
func (this *QHeaderView) SectionsMovable() bool {
_ret := C.QHeaderView_SectionsMovable(this.h)
return (bool)(_ret)
}
func (this *QHeaderView) SetFirstSectionMovable(movable bool) {
C.QHeaderView_SetFirstSectionMovable(this.h, (C.bool)(movable))
}
func (this *QHeaderView) IsFirstSectionMovable() bool {
_ret := C.QHeaderView_IsFirstSectionMovable(this.h)
return (bool)(_ret)
}
func (this *QHeaderView) SetSectionsClickable(clickable bool) {
C.QHeaderView_SetSectionsClickable(this.h, (C.bool)(clickable))
}
func (this *QHeaderView) SectionsClickable() bool {
_ret := C.QHeaderView_SectionsClickable(this.h)
return (bool)(_ret)
}
func (this *QHeaderView) SetHighlightSections(highlight bool) {
C.QHeaderView_SetHighlightSections(this.h, (C.bool)(highlight))
}
func (this *QHeaderView) HighlightSections() bool {
_ret := C.QHeaderView_HighlightSections(this.h)
return (bool)(_ret)
}
2024-09-04 06:54:22 +00:00
func (this *QHeaderView) SectionResizeMode(logicalIndex int) QHeaderView__ResizeMode {
_ret := C.QHeaderView_SectionResizeMode(this.h, (C.int)(logicalIndex))
return (QHeaderView__ResizeMode)(_ret)
2024-08-29 07:01:51 +00:00
}
2024-09-04 06:54:22 +00:00
func (this *QHeaderView) SetSectionResizeMode(mode QHeaderView__ResizeMode) {
2024-08-29 07:01:51 +00:00
C.QHeaderView_SetSectionResizeMode(this.h, (C.uintptr_t)(mode))
}
2024-09-04 06:54:22 +00:00
func (this *QHeaderView) SetSectionResizeMode2(logicalIndex int, mode QHeaderView__ResizeMode) {
2024-08-29 07:01:51 +00:00
C.QHeaderView_SetSectionResizeMode2(this.h, (C.int)(logicalIndex), (C.uintptr_t)(mode))
}
func (this *QHeaderView) SetResizeContentsPrecision(precision int) {
C.QHeaderView_SetResizeContentsPrecision(this.h, (C.int)(precision))
}
func (this *QHeaderView) ResizeContentsPrecision() int {
_ret := C.QHeaderView_ResizeContentsPrecision(this.h)
return (int)(_ret)
}
func (this *QHeaderView) StretchSectionCount() int {
_ret := C.QHeaderView_StretchSectionCount(this.h)
return (int)(_ret)
}
func (this *QHeaderView) SetSortIndicatorShown(show bool) {
C.QHeaderView_SetSortIndicatorShown(this.h, (C.bool)(show))
}
func (this *QHeaderView) IsSortIndicatorShown() bool {
_ret := C.QHeaderView_IsSortIndicatorShown(this.h)
return (bool)(_ret)
}
2024-09-04 06:54:22 +00:00
func (this *QHeaderView) SetSortIndicator(logicalIndex int, order SortOrder) {
2024-08-29 07:01:51 +00:00
C.QHeaderView_SetSortIndicator(this.h, (C.int)(logicalIndex), (C.uintptr_t)(order))
}
func (this *QHeaderView) SortIndicatorSection() int {
_ret := C.QHeaderView_SortIndicatorSection(this.h)
return (int)(_ret)
}
2024-09-04 06:54:22 +00:00
func (this *QHeaderView) SortIndicatorOrder() SortOrder {
_ret := C.QHeaderView_SortIndicatorOrder(this.h)
return (SortOrder)(_ret)
2024-08-29 07:01:51 +00:00
}
func (this *QHeaderView) StretchLastSection() bool {
_ret := C.QHeaderView_StretchLastSection(this.h)
return (bool)(_ret)
}
func (this *QHeaderView) SetStretchLastSection(stretch bool) {
C.QHeaderView_SetStretchLastSection(this.h, (C.bool)(stretch))
}
func (this *QHeaderView) CascadingSectionResizes() bool {
_ret := C.QHeaderView_CascadingSectionResizes(this.h)
return (bool)(_ret)
}
func (this *QHeaderView) SetCascadingSectionResizes(enable bool) {
C.QHeaderView_SetCascadingSectionResizes(this.h, (C.bool)(enable))
}
func (this *QHeaderView) DefaultSectionSize() int {
_ret := C.QHeaderView_DefaultSectionSize(this.h)
return (int)(_ret)
}
func (this *QHeaderView) SetDefaultSectionSize(size int) {
C.QHeaderView_SetDefaultSectionSize(this.h, (C.int)(size))
}
func (this *QHeaderView) ResetDefaultSectionSize() {
C.QHeaderView_ResetDefaultSectionSize(this.h)
}
func (this *QHeaderView) MinimumSectionSize() int {
_ret := C.QHeaderView_MinimumSectionSize(this.h)
return (int)(_ret)
}
func (this *QHeaderView) SetMinimumSectionSize(size int) {
C.QHeaderView_SetMinimumSectionSize(this.h, (C.int)(size))
}
func (this *QHeaderView) MaximumSectionSize() int {
_ret := C.QHeaderView_MaximumSectionSize(this.h)
return (int)(_ret)
}
func (this *QHeaderView) SetMaximumSectionSize(size int) {
C.QHeaderView_SetMaximumSectionSize(this.h, (C.int)(size))
}
2024-08-29 07:01:51 +00:00
func (this *QHeaderView) DefaultAlignment() int {
_ret := C.QHeaderView_DefaultAlignment(this.h)
return (int)(_ret)
2024-08-29 07:01:51 +00:00
}
func (this *QHeaderView) SetDefaultAlignment(alignment int) {
C.QHeaderView_SetDefaultAlignment(this.h, (C.int)(alignment))
}
func (this *QHeaderView) DoItemsLayout() {
C.QHeaderView_DoItemsLayout(this.h)
}
func (this *QHeaderView) SectionsMoved() bool {
_ret := C.QHeaderView_SectionsMoved(this.h)
return (bool)(_ret)
}
func (this *QHeaderView) SectionsHidden() bool {
_ret := C.QHeaderView_SectionsHidden(this.h)
return (bool)(_ret)
}
func (this *QHeaderView) SaveState() *QByteArray {
_ret := C.QHeaderView_SaveState(this.h)
_goptr := newQByteArray(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QHeaderView) RestoreState(state *QByteArray) bool {
_ret := C.QHeaderView_RestoreState(this.h, state.cPointer())
return (bool)(_ret)
}
func (this *QHeaderView) Reset() {
C.QHeaderView_Reset(this.h)
}
func (this *QHeaderView) SetOffset(offset int) {
C.QHeaderView_SetOffset(this.h, (C.int)(offset))
}
func (this *QHeaderView) SetOffsetToSectionPosition(visualIndex int) {
C.QHeaderView_SetOffsetToSectionPosition(this.h, (C.int)(visualIndex))
}
func (this *QHeaderView) SetOffsetToLastSection() {
C.QHeaderView_SetOffsetToLastSection(this.h)
}
2024-09-04 06:54:22 +00:00
func (this *QHeaderView) HeaderDataChanged(orientation Orientation, logicalFirst int, logicalLast int) {
2024-08-29 07:01:51 +00:00
C.QHeaderView_HeaderDataChanged(this.h, (C.uintptr_t)(orientation), (C.int)(logicalFirst), (C.int)(logicalLast))
}
func (this *QHeaderView) SectionMoved(logicalIndex int, oldVisualIndex int, newVisualIndex int) {
C.QHeaderView_SectionMoved(this.h, (C.int)(logicalIndex), (C.int)(oldVisualIndex), (C.int)(newVisualIndex))
}
func (this *QHeaderView) OnSectionMoved(slot func(logicalIndex int, oldVisualIndex int, newVisualIndex int)) {
C.QHeaderView_connect_SectionMoved(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
}
//export miqt_exec_callback_QHeaderView_SectionMoved
func miqt_exec_callback_QHeaderView_SectionMoved(cb *C.void, logicalIndex C.int, oldVisualIndex C.int, newVisualIndex C.int) {
gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(logicalIndex int, oldVisualIndex int, newVisualIndex int))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
logicalIndex_ret := logicalIndex
slotval1 := (int)(logicalIndex_ret)
oldVisualIndex_ret := oldVisualIndex
slotval2 := (int)(oldVisualIndex_ret)
newVisualIndex_ret := newVisualIndex
slotval3 := (int)(newVisualIndex_ret)
gofunc(slotval1, slotval2, slotval3)
}
func (this *QHeaderView) SectionResized(logicalIndex int, oldSize int, newSize int) {
C.QHeaderView_SectionResized(this.h, (C.int)(logicalIndex), (C.int)(oldSize), (C.int)(newSize))
}
func (this *QHeaderView) OnSectionResized(slot func(logicalIndex int, oldSize int, newSize int)) {
C.QHeaderView_connect_SectionResized(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
}
//export miqt_exec_callback_QHeaderView_SectionResized
func miqt_exec_callback_QHeaderView_SectionResized(cb *C.void, logicalIndex C.int, oldSize C.int, newSize C.int) {
gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(logicalIndex int, oldSize int, newSize int))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
logicalIndex_ret := logicalIndex
slotval1 := (int)(logicalIndex_ret)
oldSize_ret := oldSize
slotval2 := (int)(oldSize_ret)
newSize_ret := newSize
slotval3 := (int)(newSize_ret)
gofunc(slotval1, slotval2, slotval3)
}
func (this *QHeaderView) SectionPressed(logicalIndex int) {
C.QHeaderView_SectionPressed(this.h, (C.int)(logicalIndex))
}
func (this *QHeaderView) OnSectionPressed(slot func(logicalIndex int)) {
C.QHeaderView_connect_SectionPressed(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
}
//export miqt_exec_callback_QHeaderView_SectionPressed
func miqt_exec_callback_QHeaderView_SectionPressed(cb *C.void, logicalIndex C.int) {
gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(logicalIndex int))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
logicalIndex_ret := logicalIndex
slotval1 := (int)(logicalIndex_ret)
gofunc(slotval1)
}
func (this *QHeaderView) SectionClicked(logicalIndex int) {
C.QHeaderView_SectionClicked(this.h, (C.int)(logicalIndex))
}
func (this *QHeaderView) OnSectionClicked(slot func(logicalIndex int)) {
C.QHeaderView_connect_SectionClicked(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
}
//export miqt_exec_callback_QHeaderView_SectionClicked
func miqt_exec_callback_QHeaderView_SectionClicked(cb *C.void, logicalIndex C.int) {
gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(logicalIndex int))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
logicalIndex_ret := logicalIndex
slotval1 := (int)(logicalIndex_ret)
gofunc(slotval1)
}
func (this *QHeaderView) SectionEntered(logicalIndex int) {
C.QHeaderView_SectionEntered(this.h, (C.int)(logicalIndex))
}
func (this *QHeaderView) OnSectionEntered(slot func(logicalIndex int)) {
C.QHeaderView_connect_SectionEntered(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
}
//export miqt_exec_callback_QHeaderView_SectionEntered
func miqt_exec_callback_QHeaderView_SectionEntered(cb *C.void, logicalIndex C.int) {
gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(logicalIndex int))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
logicalIndex_ret := logicalIndex
slotval1 := (int)(logicalIndex_ret)
gofunc(slotval1)
}
func (this *QHeaderView) SectionDoubleClicked(logicalIndex int) {
C.QHeaderView_SectionDoubleClicked(this.h, (C.int)(logicalIndex))
}
func (this *QHeaderView) OnSectionDoubleClicked(slot func(logicalIndex int)) {
C.QHeaderView_connect_SectionDoubleClicked(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
}
//export miqt_exec_callback_QHeaderView_SectionDoubleClicked
func miqt_exec_callback_QHeaderView_SectionDoubleClicked(cb *C.void, logicalIndex C.int) {
gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(logicalIndex int))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
logicalIndex_ret := logicalIndex
slotval1 := (int)(logicalIndex_ret)
gofunc(slotval1)
}
func (this *QHeaderView) SectionCountChanged(oldCount int, newCount int) {
C.QHeaderView_SectionCountChanged(this.h, (C.int)(oldCount), (C.int)(newCount))
}
func (this *QHeaderView) OnSectionCountChanged(slot func(oldCount int, newCount int)) {
C.QHeaderView_connect_SectionCountChanged(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
}
//export miqt_exec_callback_QHeaderView_SectionCountChanged
func miqt_exec_callback_QHeaderView_SectionCountChanged(cb *C.void, oldCount C.int, newCount C.int) {
gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(oldCount int, newCount int))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
oldCount_ret := oldCount
slotval1 := (int)(oldCount_ret)
newCount_ret := newCount
slotval2 := (int)(newCount_ret)
gofunc(slotval1, slotval2)
}
func (this *QHeaderView) SectionHandleDoubleClicked(logicalIndex int) {
C.QHeaderView_SectionHandleDoubleClicked(this.h, (C.int)(logicalIndex))
}
func (this *QHeaderView) OnSectionHandleDoubleClicked(slot func(logicalIndex int)) {
C.QHeaderView_connect_SectionHandleDoubleClicked(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
}
//export miqt_exec_callback_QHeaderView_SectionHandleDoubleClicked
func miqt_exec_callback_QHeaderView_SectionHandleDoubleClicked(cb *C.void, logicalIndex C.int) {
gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(logicalIndex int))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
logicalIndex_ret := logicalIndex
slotval1 := (int)(logicalIndex_ret)
gofunc(slotval1)
}
func (this *QHeaderView) GeometriesChanged() {
C.QHeaderView_GeometriesChanged(this.h)
}
func (this *QHeaderView) OnGeometriesChanged(slot func()) {
C.QHeaderView_connect_GeometriesChanged(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
}
//export miqt_exec_callback_QHeaderView_GeometriesChanged
func miqt_exec_callback_QHeaderView_GeometriesChanged(cb *C.void) {
gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func())
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
gofunc()
}
2024-09-04 06:54:22 +00:00
func (this *QHeaderView) SortIndicatorChanged(logicalIndex int, order SortOrder) {
2024-08-29 07:01:51 +00:00
C.QHeaderView_SortIndicatorChanged(this.h, (C.int)(logicalIndex), (C.uintptr_t)(order))
}
func (this *QHeaderView) OnSortIndicatorChanged(slot func(logicalIndex int, order SortOrder)) {
C.QHeaderView_connect_SortIndicatorChanged(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
}
2024-08-29 07:01:51 +00:00
//export miqt_exec_callback_QHeaderView_SortIndicatorChanged
func miqt_exec_callback_QHeaderView_SortIndicatorChanged(cb *C.void, logicalIndex C.int, order C.uintptr_t) {
gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(logicalIndex int, order SortOrder))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
2024-08-29 07:01:51 +00:00
}
// Convert all CABI parameters to Go parameters
logicalIndex_ret := logicalIndex
slotval1 := (int)(logicalIndex_ret)
order_ret := order
slotval2 := (SortOrder)(order_ret)
gofunc(slotval1, slotval2)
2024-08-29 07:01:51 +00:00
}
func QHeaderView_Tr2(s string, c string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
c_Cstring := C.CString(c)
defer C.free(unsafe.Pointer(c_Cstring))
var _ms *C.struct_miqt_string = C.QHeaderView_Tr2(s_Cstring, c_Cstring)
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms))
return _ret
}
func QHeaderView_Tr3(s string, c string, n int) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
c_Cstring := C.CString(c)
defer C.free(unsafe.Pointer(c_Cstring))
var _ms *C.struct_miqt_string = C.QHeaderView_Tr3(s_Cstring, c_Cstring, (C.int)(n))
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms))
return _ret
}
func QHeaderView_TrUtf82(s string, c string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
c_Cstring := C.CString(c)
defer C.free(unsafe.Pointer(c_Cstring))
var _ms *C.struct_miqt_string = C.QHeaderView_TrUtf82(s_Cstring, c_Cstring)
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms))
return _ret
}
func QHeaderView_TrUtf83(s string, c string, n int) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
c_Cstring := C.CString(c)
defer C.free(unsafe.Pointer(c_Cstring))
var _ms *C.struct_miqt_string = C.QHeaderView_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms))
return _ret
}
// Delete this object from C++ memory.
func (this *QHeaderView) Delete() {
C.QHeaderView_Delete(this.h)
}
// 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 *QHeaderView) GoGC() {
runtime.SetFinalizer(this, func(this *QHeaderView) {
this.Delete()
runtime.KeepAlive(this.h)
})
}