miqt/qt6/gen_qstandarditemmodel.go

2638 lines
103 KiB
Go
Raw Normal View History

2024-10-20 05:21:03 +00:00
package qt6
/*
#include "gen_qstandarditemmodel.h"
#include <stdlib.h>
*/
import "C"
import (
"runtime"
"runtime/cgo"
"unsafe"
)
type QStandardItem__ItemType int
const (
QStandardItem__Type QStandardItem__ItemType = 0
QStandardItem__UserType QStandardItem__ItemType = 1000
)
type QStandardItem struct {
2024-11-19 06:29:06 +00:00
h *C.QStandardItem
isSubclass bool
2024-10-20 05:21:03 +00:00
}
func (this *QStandardItem) cPointer() *C.QStandardItem {
if this == nil {
return nil
}
return this.h
}
func (this *QStandardItem) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQStandardItem constructs the type using only CGO pointers.
2024-10-20 05:21:03 +00:00
func newQStandardItem(h *C.QStandardItem) *QStandardItem {
if h == nil {
return nil
}
return &QStandardItem{h: h}
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQStandardItem constructs the type using only unsafe pointers.
2024-10-20 05:21:03 +00:00
func UnsafeNewQStandardItem(h unsafe.Pointer) *QStandardItem {
2024-11-19 06:29:06 +00:00
if h == nil {
return nil
}
return &QStandardItem{h: (*C.QStandardItem)(h)}
2024-10-20 05:21:03 +00:00
}
// NewQStandardItem constructs a new QStandardItem object.
func NewQStandardItem() *QStandardItem {
2024-11-19 06:29:06 +00:00
var outptr_QStandardItem *C.QStandardItem = nil
C.QStandardItem_new(&outptr_QStandardItem)
ret := newQStandardItem(outptr_QStandardItem)
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
// NewQStandardItem2 constructs a new QStandardItem object.
func NewQStandardItem2(text string) *QStandardItem {
text_ms := C.struct_miqt_string{}
text_ms.data = C.CString(text)
text_ms.len = C.size_t(len(text))
defer C.free(unsafe.Pointer(text_ms.data))
2024-11-19 06:29:06 +00:00
var outptr_QStandardItem *C.QStandardItem = nil
C.QStandardItem_new2(text_ms, &outptr_QStandardItem)
ret := newQStandardItem(outptr_QStandardItem)
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
// NewQStandardItem3 constructs a new QStandardItem object.
func NewQStandardItem3(icon *QIcon, text string) *QStandardItem {
text_ms := C.struct_miqt_string{}
text_ms.data = C.CString(text)
text_ms.len = C.size_t(len(text))
defer C.free(unsafe.Pointer(text_ms.data))
2024-11-19 06:29:06 +00:00
var outptr_QStandardItem *C.QStandardItem = nil
C.QStandardItem_new3(icon.cPointer(), text_ms, &outptr_QStandardItem)
ret := newQStandardItem(outptr_QStandardItem)
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
// NewQStandardItem4 constructs a new QStandardItem object.
func NewQStandardItem4(rows int) *QStandardItem {
2024-11-19 06:29:06 +00:00
var outptr_QStandardItem *C.QStandardItem = nil
C.QStandardItem_new4((C.int)(rows), &outptr_QStandardItem)
ret := newQStandardItem(outptr_QStandardItem)
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
// NewQStandardItem5 constructs a new QStandardItem object.
func NewQStandardItem5(rows int, columns int) *QStandardItem {
2024-11-19 06:29:06 +00:00
var outptr_QStandardItem *C.QStandardItem = nil
C.QStandardItem_new5((C.int)(rows), (C.int)(columns), &outptr_QStandardItem)
ret := newQStandardItem(outptr_QStandardItem)
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
func (this *QStandardItem) Data(role int) *QVariant {
_ret := C.QStandardItem_Data(this.h, (C.int)(role))
2024-10-20 05:21:03 +00:00
_goptr := newQVariant(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QStandardItem) MultiData(roleDataSpan QModelRoleDataSpan) {
C.QStandardItem_MultiData(this.h, roleDataSpan.cPointer())
}
2024-11-19 06:29:06 +00:00
func (this *QStandardItem) SetData(value *QVariant, role int) {
C.QStandardItem_SetData(this.h, value.cPointer(), (C.int)(role))
2024-10-20 05:21:03 +00:00
}
func (this *QStandardItem) ClearData() {
C.QStandardItem_ClearData(this.h)
}
func (this *QStandardItem) Text() string {
var _ms C.struct_miqt_string = C.QStandardItem_Text(this.h)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QStandardItem) SetText(text string) {
text_ms := C.struct_miqt_string{}
text_ms.data = C.CString(text)
text_ms.len = C.size_t(len(text))
defer C.free(unsafe.Pointer(text_ms.data))
C.QStandardItem_SetText(this.h, text_ms)
}
func (this *QStandardItem) Icon() *QIcon {
_ret := C.QStandardItem_Icon(this.h)
_goptr := newQIcon(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QStandardItem) SetIcon(icon *QIcon) {
C.QStandardItem_SetIcon(this.h, icon.cPointer())
}
func (this *QStandardItem) ToolTip() string {
var _ms C.struct_miqt_string = C.QStandardItem_ToolTip(this.h)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QStandardItem) SetToolTip(toolTip string) {
toolTip_ms := C.struct_miqt_string{}
toolTip_ms.data = C.CString(toolTip)
toolTip_ms.len = C.size_t(len(toolTip))
defer C.free(unsafe.Pointer(toolTip_ms.data))
C.QStandardItem_SetToolTip(this.h, toolTip_ms)
}
func (this *QStandardItem) StatusTip() string {
var _ms C.struct_miqt_string = C.QStandardItem_StatusTip(this.h)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QStandardItem) SetStatusTip(statusTip string) {
statusTip_ms := C.struct_miqt_string{}
statusTip_ms.data = C.CString(statusTip)
statusTip_ms.len = C.size_t(len(statusTip))
defer C.free(unsafe.Pointer(statusTip_ms.data))
C.QStandardItem_SetStatusTip(this.h, statusTip_ms)
}
func (this *QStandardItem) WhatsThis() string {
var _ms C.struct_miqt_string = C.QStandardItem_WhatsThis(this.h)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QStandardItem) SetWhatsThis(whatsThis string) {
whatsThis_ms := C.struct_miqt_string{}
whatsThis_ms.data = C.CString(whatsThis)
whatsThis_ms.len = C.size_t(len(whatsThis))
defer C.free(unsafe.Pointer(whatsThis_ms.data))
C.QStandardItem_SetWhatsThis(this.h, whatsThis_ms)
}
func (this *QStandardItem) SizeHint() *QSize {
_ret := C.QStandardItem_SizeHint(this.h)
_goptr := newQSize(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QStandardItem) SetSizeHint(sizeHint *QSize) {
C.QStandardItem_SetSizeHint(this.h, sizeHint.cPointer())
}
func (this *QStandardItem) Font() *QFont {
_ret := C.QStandardItem_Font(this.h)
_goptr := newQFont(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QStandardItem) SetFont(font *QFont) {
C.QStandardItem_SetFont(this.h, font.cPointer())
}
func (this *QStandardItem) TextAlignment() AlignmentFlag {
return (AlignmentFlag)(C.QStandardItem_TextAlignment(this.h))
}
func (this *QStandardItem) SetTextAlignment(textAlignment AlignmentFlag) {
C.QStandardItem_SetTextAlignment(this.h, (C.int)(textAlignment))
}
func (this *QStandardItem) Background() *QBrush {
_ret := C.QStandardItem_Background(this.h)
_goptr := newQBrush(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QStandardItem) SetBackground(brush *QBrush) {
C.QStandardItem_SetBackground(this.h, brush.cPointer())
}
func (this *QStandardItem) Foreground() *QBrush {
_ret := C.QStandardItem_Foreground(this.h)
_goptr := newQBrush(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QStandardItem) SetForeground(brush *QBrush) {
C.QStandardItem_SetForeground(this.h, brush.cPointer())
}
func (this *QStandardItem) CheckState() CheckState {
return (CheckState)(C.QStandardItem_CheckState(this.h))
}
func (this *QStandardItem) SetCheckState(checkState CheckState) {
C.QStandardItem_SetCheckState(this.h, (C.int)(checkState))
}
func (this *QStandardItem) AccessibleText() string {
var _ms C.struct_miqt_string = C.QStandardItem_AccessibleText(this.h)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QStandardItem) SetAccessibleText(accessibleText string) {
accessibleText_ms := C.struct_miqt_string{}
accessibleText_ms.data = C.CString(accessibleText)
accessibleText_ms.len = C.size_t(len(accessibleText))
defer C.free(unsafe.Pointer(accessibleText_ms.data))
C.QStandardItem_SetAccessibleText(this.h, accessibleText_ms)
}
func (this *QStandardItem) AccessibleDescription() string {
var _ms C.struct_miqt_string = C.QStandardItem_AccessibleDescription(this.h)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QStandardItem) SetAccessibleDescription(accessibleDescription string) {
accessibleDescription_ms := C.struct_miqt_string{}
accessibleDescription_ms.data = C.CString(accessibleDescription)
accessibleDescription_ms.len = C.size_t(len(accessibleDescription))
defer C.free(unsafe.Pointer(accessibleDescription_ms.data))
C.QStandardItem_SetAccessibleDescription(this.h, accessibleDescription_ms)
}
func (this *QStandardItem) Flags() ItemFlag {
return (ItemFlag)(C.QStandardItem_Flags(this.h))
}
func (this *QStandardItem) SetFlags(flags ItemFlag) {
C.QStandardItem_SetFlags(this.h, (C.int)(flags))
}
func (this *QStandardItem) IsEnabled() bool {
return (bool)(C.QStandardItem_IsEnabled(this.h))
}
func (this *QStandardItem) SetEnabled(enabled bool) {
C.QStandardItem_SetEnabled(this.h, (C.bool)(enabled))
}
func (this *QStandardItem) IsEditable() bool {
return (bool)(C.QStandardItem_IsEditable(this.h))
}
func (this *QStandardItem) SetEditable(editable bool) {
C.QStandardItem_SetEditable(this.h, (C.bool)(editable))
}
func (this *QStandardItem) IsSelectable() bool {
return (bool)(C.QStandardItem_IsSelectable(this.h))
}
func (this *QStandardItem) SetSelectable(selectable bool) {
C.QStandardItem_SetSelectable(this.h, (C.bool)(selectable))
}
func (this *QStandardItem) IsCheckable() bool {
return (bool)(C.QStandardItem_IsCheckable(this.h))
}
func (this *QStandardItem) SetCheckable(checkable bool) {
C.QStandardItem_SetCheckable(this.h, (C.bool)(checkable))
}
func (this *QStandardItem) IsAutoTristate() bool {
return (bool)(C.QStandardItem_IsAutoTristate(this.h))
}
func (this *QStandardItem) SetAutoTristate(tristate bool) {
C.QStandardItem_SetAutoTristate(this.h, (C.bool)(tristate))
}
func (this *QStandardItem) IsUserTristate() bool {
return (bool)(C.QStandardItem_IsUserTristate(this.h))
}
func (this *QStandardItem) SetUserTristate(tristate bool) {
C.QStandardItem_SetUserTristate(this.h, (C.bool)(tristate))
}
func (this *QStandardItem) IsDragEnabled() bool {
return (bool)(C.QStandardItem_IsDragEnabled(this.h))
}
func (this *QStandardItem) SetDragEnabled(dragEnabled bool) {
C.QStandardItem_SetDragEnabled(this.h, (C.bool)(dragEnabled))
}
func (this *QStandardItem) IsDropEnabled() bool {
return (bool)(C.QStandardItem_IsDropEnabled(this.h))
}
func (this *QStandardItem) SetDropEnabled(dropEnabled bool) {
C.QStandardItem_SetDropEnabled(this.h, (C.bool)(dropEnabled))
}
func (this *QStandardItem) Parent() *QStandardItem {
return UnsafeNewQStandardItem(unsafe.Pointer(C.QStandardItem_Parent(this.h)))
}
func (this *QStandardItem) Row() int {
return (int)(C.QStandardItem_Row(this.h))
}
func (this *QStandardItem) Column() int {
return (int)(C.QStandardItem_Column(this.h))
}
func (this *QStandardItem) Index() *QModelIndex {
_ret := C.QStandardItem_Index(this.h)
_goptr := newQModelIndex(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QStandardItem) Model() *QStandardItemModel {
2024-11-19 06:29:06 +00:00
return UnsafeNewQStandardItemModel(unsafe.Pointer(C.QStandardItem_Model(this.h)), nil, nil)
2024-10-20 05:21:03 +00:00
}
func (this *QStandardItem) RowCount() int {
return (int)(C.QStandardItem_RowCount(this.h))
}
func (this *QStandardItem) SetRowCount(rows int) {
C.QStandardItem_SetRowCount(this.h, (C.int)(rows))
}
func (this *QStandardItem) ColumnCount() int {
return (int)(C.QStandardItem_ColumnCount(this.h))
}
func (this *QStandardItem) SetColumnCount(columns int) {
C.QStandardItem_SetColumnCount(this.h, (C.int)(columns))
}
func (this *QStandardItem) HasChildren() bool {
return (bool)(C.QStandardItem_HasChildren(this.h))
}
func (this *QStandardItem) Child(row int) *QStandardItem {
return UnsafeNewQStandardItem(unsafe.Pointer(C.QStandardItem_Child(this.h, (C.int)(row))))
}
func (this *QStandardItem) SetChild(row int, column int, item *QStandardItem) {
C.QStandardItem_SetChild(this.h, (C.int)(row), (C.int)(column), item.cPointer())
}
func (this *QStandardItem) SetChild2(row int, item *QStandardItem) {
C.QStandardItem_SetChild2(this.h, (C.int)(row), item.cPointer())
}
func (this *QStandardItem) InsertRow(row int, items []*QStandardItem) {
items_CArray := (*[0xffff]*C.QStandardItem)(C.malloc(C.size_t(8 * len(items))))
defer C.free(unsafe.Pointer(items_CArray))
for i := range items {
items_CArray[i] = items[i].cPointer()
}
items_ma := C.struct_miqt_array{len: C.size_t(len(items)), data: unsafe.Pointer(items_CArray)}
2024-10-20 05:21:03 +00:00
C.QStandardItem_InsertRow(this.h, (C.int)(row), items_ma)
}
func (this *QStandardItem) InsertColumn(column int, items []*QStandardItem) {
items_CArray := (*[0xffff]*C.QStandardItem)(C.malloc(C.size_t(8 * len(items))))
defer C.free(unsafe.Pointer(items_CArray))
for i := range items {
items_CArray[i] = items[i].cPointer()
}
items_ma := C.struct_miqt_array{len: C.size_t(len(items)), data: unsafe.Pointer(items_CArray)}
2024-10-20 05:21:03 +00:00
C.QStandardItem_InsertColumn(this.h, (C.int)(column), items_ma)
}
func (this *QStandardItem) InsertRows(row int, items []*QStandardItem) {
items_CArray := (*[0xffff]*C.QStandardItem)(C.malloc(C.size_t(8 * len(items))))
defer C.free(unsafe.Pointer(items_CArray))
for i := range items {
items_CArray[i] = items[i].cPointer()
}
items_ma := C.struct_miqt_array{len: C.size_t(len(items)), data: unsafe.Pointer(items_CArray)}
2024-10-20 05:21:03 +00:00
C.QStandardItem_InsertRows(this.h, (C.int)(row), items_ma)
}
func (this *QStandardItem) InsertRows2(row int, count int) {
C.QStandardItem_InsertRows2(this.h, (C.int)(row), (C.int)(count))
}
func (this *QStandardItem) InsertColumns(column int, count int) {
C.QStandardItem_InsertColumns(this.h, (C.int)(column), (C.int)(count))
}
func (this *QStandardItem) RemoveRow(row int) {
C.QStandardItem_RemoveRow(this.h, (C.int)(row))
}
func (this *QStandardItem) RemoveColumn(column int) {
C.QStandardItem_RemoveColumn(this.h, (C.int)(column))
}
func (this *QStandardItem) RemoveRows(row int, count int) {
C.QStandardItem_RemoveRows(this.h, (C.int)(row), (C.int)(count))
}
func (this *QStandardItem) RemoveColumns(column int, count int) {
C.QStandardItem_RemoveColumns(this.h, (C.int)(column), (C.int)(count))
}
func (this *QStandardItem) AppendRow(items []*QStandardItem) {
items_CArray := (*[0xffff]*C.QStandardItem)(C.malloc(C.size_t(8 * len(items))))
defer C.free(unsafe.Pointer(items_CArray))
for i := range items {
items_CArray[i] = items[i].cPointer()
}
items_ma := C.struct_miqt_array{len: C.size_t(len(items)), data: unsafe.Pointer(items_CArray)}
2024-10-20 05:21:03 +00:00
C.QStandardItem_AppendRow(this.h, items_ma)
}
func (this *QStandardItem) AppendRows(items []*QStandardItem) {
items_CArray := (*[0xffff]*C.QStandardItem)(C.malloc(C.size_t(8 * len(items))))
defer C.free(unsafe.Pointer(items_CArray))
for i := range items {
items_CArray[i] = items[i].cPointer()
}
items_ma := C.struct_miqt_array{len: C.size_t(len(items)), data: unsafe.Pointer(items_CArray)}
2024-10-20 05:21:03 +00:00
C.QStandardItem_AppendRows(this.h, items_ma)
}
func (this *QStandardItem) AppendColumn(items []*QStandardItem) {
items_CArray := (*[0xffff]*C.QStandardItem)(C.malloc(C.size_t(8 * len(items))))
defer C.free(unsafe.Pointer(items_CArray))
for i := range items {
items_CArray[i] = items[i].cPointer()
}
items_ma := C.struct_miqt_array{len: C.size_t(len(items)), data: unsafe.Pointer(items_CArray)}
2024-10-20 05:21:03 +00:00
C.QStandardItem_AppendColumn(this.h, items_ma)
}
func (this *QStandardItem) InsertRow2(row int, item *QStandardItem) {
C.QStandardItem_InsertRow2(this.h, (C.int)(row), item.cPointer())
}
func (this *QStandardItem) AppendRowWithItem(item *QStandardItem) {
C.QStandardItem_AppendRowWithItem(this.h, item.cPointer())
}
func (this *QStandardItem) TakeChild(row int) *QStandardItem {
return UnsafeNewQStandardItem(unsafe.Pointer(C.QStandardItem_TakeChild(this.h, (C.int)(row))))
}
func (this *QStandardItem) TakeRow(row int) []*QStandardItem {
var _ma C.struct_miqt_array = C.QStandardItem_TakeRow(this.h, (C.int)(row))
2024-10-20 05:21:03 +00:00
_ret := make([]*QStandardItem, int(_ma.len))
_outCast := (*[0xffff]*C.QStandardItem)(unsafe.Pointer(_ma.data)) // hey ya
for i := 0; i < int(_ma.len); i++ {
_ret[i] = UnsafeNewQStandardItem(unsafe.Pointer(_outCast[i]))
}
return _ret
}
func (this *QStandardItem) TakeColumn(column int) []*QStandardItem {
var _ma C.struct_miqt_array = C.QStandardItem_TakeColumn(this.h, (C.int)(column))
2024-10-20 05:21:03 +00:00
_ret := make([]*QStandardItem, int(_ma.len))
_outCast := (*[0xffff]*C.QStandardItem)(unsafe.Pointer(_ma.data)) // hey ya
for i := 0; i < int(_ma.len); i++ {
_ret[i] = UnsafeNewQStandardItem(unsafe.Pointer(_outCast[i]))
}
return _ret
}
func (this *QStandardItem) SortChildren(column int) {
C.QStandardItem_SortChildren(this.h, (C.int)(column))
}
func (this *QStandardItem) Clone() *QStandardItem {
return UnsafeNewQStandardItem(unsafe.Pointer(C.QStandardItem_Clone(this.h)))
}
func (this *QStandardItem) Type() int {
return (int)(C.QStandardItem_Type(this.h))
}
func (this *QStandardItem) Read(in *QDataStream) {
C.QStandardItem_Read(this.h, in.cPointer())
}
func (this *QStandardItem) Write(out *QDataStream) {
C.QStandardItem_Write(this.h, out.cPointer())
}
func (this *QStandardItem) OperatorLesser(other *QStandardItem) bool {
return (bool)(C.QStandardItem_OperatorLesser(this.h, other.cPointer()))
}
2024-11-19 06:29:06 +00:00
func (this *QStandardItem) Child2(row int, column int) *QStandardItem {
return UnsafeNewQStandardItem(unsafe.Pointer(C.QStandardItem_Child2(this.h, (C.int)(row), (C.int)(column))))
}
func (this *QStandardItem) TakeChild2(row int, column int) *QStandardItem {
return UnsafeNewQStandardItem(unsafe.Pointer(C.QStandardItem_TakeChild2(this.h, (C.int)(row), (C.int)(column))))
}
func (this *QStandardItem) SortChildren2(column int, order SortOrder) {
C.QStandardItem_SortChildren2(this.h, (C.int)(column), (C.int)(order))
}
func (this *QStandardItem) callVirtualBase_Data(role int) *QVariant {
_ret := C.QStandardItem_virtualbase_Data(unsafe.Pointer(this.h), (C.int)(role))
2024-10-20 05:21:03 +00:00
_goptr := newQVariant(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
2024-11-19 06:29:06 +00:00
}
func (this *QStandardItem) OnData(slot func(super func(role int) *QVariant, role int) *QVariant) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItem_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItem_Data
func miqt_exec_callback_QStandardItem_Data(self *C.QStandardItem, cb C.intptr_t, role C.int) *C.QVariant {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(role int) *QVariant, role int) *QVariant)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := (int)(role)
virtualReturn := gofunc((&QStandardItem{h: self}).callVirtualBase_Data, slotval1)
return virtualReturn.cPointer()
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
func (this *QStandardItem) callVirtualBase_MultiData(roleDataSpan QModelRoleDataSpan) {
C.QStandardItem_virtualbase_MultiData(unsafe.Pointer(this.h), roleDataSpan.cPointer())
}
func (this *QStandardItem) OnMultiData(slot func(super func(roleDataSpan QModelRoleDataSpan), roleDataSpan QModelRoleDataSpan)) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItem_override_virtual_MultiData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
//export miqt_exec_callback_QStandardItem_MultiData
func miqt_exec_callback_QStandardItem_MultiData(self *C.QStandardItem, cb C.intptr_t, roleDataSpan *C.QModelRoleDataSpan) {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(roleDataSpan QModelRoleDataSpan), roleDataSpan QModelRoleDataSpan))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
roleDataSpan_ret := roleDataSpan
roleDataSpan_goptr := newQModelRoleDataSpan(roleDataSpan_ret)
roleDataSpan_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
slotval1 := *roleDataSpan_goptr
gofunc((&QStandardItem{h: self}).callVirtualBase_MultiData, slotval1)
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
func (this *QStandardItem) callVirtualBase_SetData(value *QVariant, role int) {
C.QStandardItem_virtualbase_SetData(unsafe.Pointer(this.h), value.cPointer(), (C.int)(role))
}
func (this *QStandardItem) OnSetData(slot func(super func(value *QVariant, role int), value *QVariant, role int)) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItem_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
//export miqt_exec_callback_QStandardItem_SetData
func miqt_exec_callback_QStandardItem_SetData(self *C.QStandardItem, cb C.intptr_t, value *C.QVariant, role C.int) {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(value *QVariant, role int), value *QVariant, role int))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := UnsafeNewQVariant(unsafe.Pointer(value))
slotval2 := (int)(role)
gofunc((&QStandardItem{h: self}).callVirtualBase_SetData, slotval1, slotval2)
}
func (this *QStandardItem) callVirtualBase_Clone() *QStandardItem {
return UnsafeNewQStandardItem(unsafe.Pointer(C.QStandardItem_virtualbase_Clone(unsafe.Pointer(this.h))))
}
func (this *QStandardItem) OnClone(slot func(super func() *QStandardItem) *QStandardItem) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItem_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItem_Clone
func miqt_exec_callback_QStandardItem_Clone(self *C.QStandardItem, cb C.intptr_t) *C.QStandardItem {
gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QStandardItem) *QStandardItem)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
virtualReturn := gofunc((&QStandardItem{h: self}).callVirtualBase_Clone)
return virtualReturn.cPointer()
}
func (this *QStandardItem) callVirtualBase_Type() int {
return (int)(C.QStandardItem_virtualbase_Type(unsafe.Pointer(this.h)))
}
func (this *QStandardItem) OnType(slot func(super func() int) int) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItem_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItem_Type
func miqt_exec_callback_QStandardItem_Type(self *C.QStandardItem, cb C.intptr_t) C.int {
gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
virtualReturn := gofunc((&QStandardItem{h: self}).callVirtualBase_Type)
return (C.int)(virtualReturn)
}
func (this *QStandardItem) callVirtualBase_Read(in *QDataStream) {
C.QStandardItem_virtualbase_Read(unsafe.Pointer(this.h), in.cPointer())
}
func (this *QStandardItem) OnRead(slot func(super func(in *QDataStream), in *QDataStream)) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItem_override_virtual_Read(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItem_Read
func miqt_exec_callback_QStandardItem_Read(self *C.QStandardItem, cb C.intptr_t, in *C.QDataStream) {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(in *QDataStream), in *QDataStream))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := UnsafeNewQDataStream(unsafe.Pointer(in), nil)
gofunc((&QStandardItem{h: self}).callVirtualBase_Read, slotval1)
}
func (this *QStandardItem) callVirtualBase_Write(out *QDataStream) {
C.QStandardItem_virtualbase_Write(unsafe.Pointer(this.h), out.cPointer())
}
func (this *QStandardItem) OnWrite(slot func(super func(out *QDataStream), out *QDataStream)) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItem_override_virtual_Write(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItem_Write
func miqt_exec_callback_QStandardItem_Write(self *C.QStandardItem, cb C.intptr_t, out *C.QDataStream) {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(out *QDataStream), out *QDataStream))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := UnsafeNewQDataStream(unsafe.Pointer(out), nil)
gofunc((&QStandardItem{h: self}).callVirtualBase_Write, slotval1)
}
func (this *QStandardItem) callVirtualBase_OperatorLesser(other *QStandardItem) bool {
return (bool)(C.QStandardItem_virtualbase_OperatorLesser(unsafe.Pointer(this.h), other.cPointer()))
}
func (this *QStandardItem) OnOperatorLesser(slot func(super func(other *QStandardItem) bool, other *QStandardItem) bool) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItem_override_virtual_OperatorLesser(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItem_OperatorLesser
func miqt_exec_callback_QStandardItem_OperatorLesser(self *C.QStandardItem, cb C.intptr_t, other *C.QStandardItem) C.bool {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(other *QStandardItem) bool, other *QStandardItem) bool)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := UnsafeNewQStandardItem(unsafe.Pointer(other))
virtualReturn := gofunc((&QStandardItem{h: self}).callVirtualBase_OperatorLesser, slotval1)
return (C.bool)(virtualReturn)
2024-10-20 05:21:03 +00:00
}
// Delete this object from C++ memory.
func (this *QStandardItem) Delete() {
2024-11-19 06:29:06 +00:00
C.QStandardItem_Delete(this.h, C.bool(this.isSubclass))
2024-10-20 05:21:03 +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 *QStandardItem) GoGC() {
runtime.SetFinalizer(this, func(this *QStandardItem) {
this.Delete()
runtime.KeepAlive(this.h)
})
}
type QStandardItemModel struct {
2024-11-19 06:29:06 +00:00
h *C.QStandardItemModel
isSubclass bool
2024-10-20 05:21:03 +00:00
*QAbstractItemModel
}
func (this *QStandardItemModel) cPointer() *C.QStandardItemModel {
if this == nil {
return nil
}
return this.h
}
func (this *QStandardItemModel) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQStandardItemModel constructs the type using only CGO pointers.
func newQStandardItemModel(h *C.QStandardItemModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QStandardItemModel {
2024-10-20 05:21:03 +00:00
if h == nil {
return nil
}
2024-11-19 06:29:06 +00:00
return &QStandardItemModel{h: h,
QAbstractItemModel: newQAbstractItemModel(h_QAbstractItemModel, h_QObject)}
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQStandardItemModel constructs the type using only unsafe pointers.
func UnsafeNewQStandardItemModel(h unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QStandardItemModel {
if h == nil {
return nil
}
return &QStandardItemModel{h: (*C.QStandardItemModel)(h),
QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)}
2024-10-20 05:21:03 +00:00
}
// NewQStandardItemModel constructs a new QStandardItemModel object.
func NewQStandardItemModel() *QStandardItemModel {
2024-11-19 06:29:06 +00:00
var outptr_QStandardItemModel *C.QStandardItemModel = nil
var outptr_QAbstractItemModel *C.QAbstractItemModel = nil
var outptr_QObject *C.QObject = nil
C.QStandardItemModel_new(&outptr_QStandardItemModel, &outptr_QAbstractItemModel, &outptr_QObject)
ret := newQStandardItemModel(outptr_QStandardItemModel, outptr_QAbstractItemModel, outptr_QObject)
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
// NewQStandardItemModel2 constructs a new QStandardItemModel object.
func NewQStandardItemModel2(rows int, columns int) *QStandardItemModel {
2024-11-19 06:29:06 +00:00
var outptr_QStandardItemModel *C.QStandardItemModel = nil
var outptr_QAbstractItemModel *C.QAbstractItemModel = nil
var outptr_QObject *C.QObject = nil
C.QStandardItemModel_new2((C.int)(rows), (C.int)(columns), &outptr_QStandardItemModel, &outptr_QAbstractItemModel, &outptr_QObject)
ret := newQStandardItemModel(outptr_QStandardItemModel, outptr_QAbstractItemModel, outptr_QObject)
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
// NewQStandardItemModel3 constructs a new QStandardItemModel object.
func NewQStandardItemModel3(parent *QObject) *QStandardItemModel {
2024-11-19 06:29:06 +00:00
var outptr_QStandardItemModel *C.QStandardItemModel = nil
var outptr_QAbstractItemModel *C.QAbstractItemModel = nil
var outptr_QObject *C.QObject = nil
C.QStandardItemModel_new3(parent.cPointer(), &outptr_QStandardItemModel, &outptr_QAbstractItemModel, &outptr_QObject)
ret := newQStandardItemModel(outptr_QStandardItemModel, outptr_QAbstractItemModel, outptr_QObject)
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
// NewQStandardItemModel4 constructs a new QStandardItemModel object.
func NewQStandardItemModel4(rows int, columns int, parent *QObject) *QStandardItemModel {
2024-11-19 06:29:06 +00:00
var outptr_QStandardItemModel *C.QStandardItemModel = nil
var outptr_QAbstractItemModel *C.QAbstractItemModel = nil
var outptr_QObject *C.QObject = nil
C.QStandardItemModel_new4((C.int)(rows), (C.int)(columns), parent.cPointer(), &outptr_QStandardItemModel, &outptr_QAbstractItemModel, &outptr_QObject)
ret := newQStandardItemModel(outptr_QStandardItemModel, outptr_QAbstractItemModel, outptr_QObject)
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
func (this *QStandardItemModel) MetaObject() *QMetaObject {
return UnsafeNewQMetaObject(unsafe.Pointer(C.QStandardItemModel_MetaObject(this.h)))
}
func (this *QStandardItemModel) Metacast(param1 string) unsafe.Pointer {
param1_Cstring := C.CString(param1)
defer C.free(unsafe.Pointer(param1_Cstring))
return (unsafe.Pointer)(C.QStandardItemModel_Metacast(this.h, param1_Cstring))
}
func QStandardItemModel_Tr(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
var _ms C.struct_miqt_string = C.QStandardItemModel_Tr(s_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QStandardItemModel) SetItemRoleNames(roleNames map[int][]byte) {
roleNames_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roleNames))))
defer C.free(unsafe.Pointer(roleNames_Keys_CArray))
roleNames_Values_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(roleNames))))
defer C.free(unsafe.Pointer(roleNames_Values_CArray))
roleNames_ctr := 0
for roleNames_k, roleNames_v := range roleNames {
roleNames_Keys_CArray[roleNames_ctr] = (C.int)(roleNames_k)
roleNames_v_alias := C.struct_miqt_string{}
roleNames_v_alias.data = (*C.char)(unsafe.Pointer(&roleNames_v[0]))
roleNames_v_alias.len = C.size_t(len(roleNames_v))
roleNames_Values_CArray[roleNames_ctr] = roleNames_v_alias
roleNames_ctr++
}
roleNames_mm := C.struct_miqt_map{
len: C.size_t(len(roleNames)),
keys: unsafe.Pointer(roleNames_Keys_CArray),
values: unsafe.Pointer(roleNames_Values_CArray),
}
C.QStandardItemModel_SetItemRoleNames(this.h, roleNames_mm)
}
func (this *QStandardItemModel) RoleNames() map[int][]byte {
var _mm C.struct_miqt_map = C.QStandardItemModel_RoleNames(this.h)
_ret := make(map[int][]byte, int(_mm.len))
_Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys))
_Values := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_mm.values))
for i := 0; i < int(_mm.len); i++ {
_entry_Key := (int)(_Keys[i])
var _hashval_bytearray C.struct_miqt_string = _Values[i]
_hashval_ret := C.GoBytes(unsafe.Pointer(_hashval_bytearray.data), C.int(int64(_hashval_bytearray.len)))
C.free(unsafe.Pointer(_hashval_bytearray.data))
_entry_Value := _hashval_ret
_ret[_entry_Key] = _entry_Value
}
return _ret
}
2024-11-19 06:29:06 +00:00
func (this *QStandardItemModel) Index(row int, column int, parent *QModelIndex) *QModelIndex {
_ret := C.QStandardItemModel_Index(this.h, (C.int)(row), (C.int)(column), parent.cPointer())
2024-10-20 05:21:03 +00:00
_goptr := newQModelIndex(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QStandardItemModel) Parent(child *QModelIndex) *QModelIndex {
_ret := C.QStandardItemModel_Parent(this.h, child.cPointer())
_goptr := newQModelIndex(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
2024-11-19 06:29:06 +00:00
func (this *QStandardItemModel) RowCount(parent *QModelIndex) int {
return (int)(C.QStandardItemModel_RowCount(this.h, parent.cPointer()))
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
func (this *QStandardItemModel) ColumnCount(parent *QModelIndex) int {
return (int)(C.QStandardItemModel_ColumnCount(this.h, parent.cPointer()))
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
func (this *QStandardItemModel) HasChildren(parent *QModelIndex) bool {
return (bool)(C.QStandardItemModel_HasChildren(this.h, parent.cPointer()))
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
func (this *QStandardItemModel) Data(index *QModelIndex, role int) *QVariant {
_ret := C.QStandardItemModel_Data(this.h, index.cPointer(), (C.int)(role))
2024-10-20 05:21:03 +00:00
_goptr := newQVariant(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QStandardItemModel) MultiData(index *QModelIndex, roleDataSpan QModelRoleDataSpan) {
C.QStandardItemModel_MultiData(this.h, index.cPointer(), roleDataSpan.cPointer())
}
2024-11-19 06:29:06 +00:00
func (this *QStandardItemModel) SetData(index *QModelIndex, value *QVariant, role int) bool {
return (bool)(C.QStandardItemModel_SetData(this.h, index.cPointer(), value.cPointer(), (C.int)(role)))
2024-10-20 05:21:03 +00:00
}
func (this *QStandardItemModel) ClearItemData(index *QModelIndex) bool {
return (bool)(C.QStandardItemModel_ClearItemData(this.h, index.cPointer()))
}
2024-11-19 06:29:06 +00:00
func (this *QStandardItemModel) HeaderData(section int, orientation Orientation, role int) *QVariant {
_ret := C.QStandardItemModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role))
2024-10-20 05:21:03 +00:00
_goptr := newQVariant(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
2024-11-19 06:29:06 +00:00
func (this *QStandardItemModel) SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool {
return (bool)(C.QStandardItemModel_SetHeaderData(this.h, (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role)))
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
func (this *QStandardItemModel) InsertRows(row int, count int, parent *QModelIndex) bool {
return (bool)(C.QStandardItemModel_InsertRows(this.h, (C.int)(row), (C.int)(count), parent.cPointer()))
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
func (this *QStandardItemModel) InsertColumns(column int, count int, parent *QModelIndex) bool {
return (bool)(C.QStandardItemModel_InsertColumns(this.h, (C.int)(column), (C.int)(count), parent.cPointer()))
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
func (this *QStandardItemModel) RemoveRows(row int, count int, parent *QModelIndex) bool {
return (bool)(C.QStandardItemModel_RemoveRows(this.h, (C.int)(row), (C.int)(count), parent.cPointer()))
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
func (this *QStandardItemModel) RemoveColumns(column int, count int, parent *QModelIndex) bool {
return (bool)(C.QStandardItemModel_RemoveColumns(this.h, (C.int)(column), (C.int)(count), parent.cPointer()))
2024-10-20 05:21:03 +00:00
}
func (this *QStandardItemModel) Flags(index *QModelIndex) ItemFlag {
return (ItemFlag)(C.QStandardItemModel_Flags(this.h, index.cPointer()))
}
func (this *QStandardItemModel) SupportedDropActions() DropAction {
return (DropAction)(C.QStandardItemModel_SupportedDropActions(this.h))
}
func (this *QStandardItemModel) ItemData(index *QModelIndex) map[int]QVariant {
var _mm C.struct_miqt_map = C.QStandardItemModel_ItemData(this.h, index.cPointer())
_ret := make(map[int]QVariant, int(_mm.len))
_Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys))
_Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(_mm.values))
for i := 0; i < int(_mm.len); i++ {
_entry_Key := (int)(_Keys[i])
_mapval_ret := _Values[i]
_mapval_goptr := newQVariant(_mapval_ret)
_mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
_entry_Value := *_mapval_goptr
_ret[_entry_Key] = _entry_Value
}
return _ret
}
func (this *QStandardItemModel) SetItemData(index *QModelIndex, roles map[int]QVariant) bool {
roles_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles))))
defer C.free(unsafe.Pointer(roles_Keys_CArray))
roles_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(roles))))
defer C.free(unsafe.Pointer(roles_Values_CArray))
roles_ctr := 0
for roles_k, roles_v := range roles {
roles_Keys_CArray[roles_ctr] = (C.int)(roles_k)
roles_Values_CArray[roles_ctr] = roles_v.cPointer()
roles_ctr++
}
roles_mm := C.struct_miqt_map{
len: C.size_t(len(roles)),
keys: unsafe.Pointer(roles_Keys_CArray),
values: unsafe.Pointer(roles_Values_CArray),
}
return (bool)(C.QStandardItemModel_SetItemData(this.h, index.cPointer(), roles_mm))
}
2024-10-20 05:21:03 +00:00
func (this *QStandardItemModel) Clear() {
C.QStandardItemModel_Clear(this.h)
}
2024-11-19 06:29:06 +00:00
func (this *QStandardItemModel) Sort(column int, order SortOrder) {
C.QStandardItemModel_Sort(this.h, (C.int)(column), (C.int)(order))
2024-10-20 05:21:03 +00:00
}
func (this *QStandardItemModel) ItemFromIndex(index *QModelIndex) *QStandardItem {
return UnsafeNewQStandardItem(unsafe.Pointer(C.QStandardItemModel_ItemFromIndex(this.h, index.cPointer())))
}
func (this *QStandardItemModel) IndexFromItem(item *QStandardItem) *QModelIndex {
_ret := C.QStandardItemModel_IndexFromItem(this.h, item.cPointer())
_goptr := newQModelIndex(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QStandardItemModel) Item(row int) *QStandardItem {
return UnsafeNewQStandardItem(unsafe.Pointer(C.QStandardItemModel_Item(this.h, (C.int)(row))))
}
func (this *QStandardItemModel) SetItem(row int, column int, item *QStandardItem) {
C.QStandardItemModel_SetItem(this.h, (C.int)(row), (C.int)(column), item.cPointer())
}
func (this *QStandardItemModel) SetItem2(row int, item *QStandardItem) {
C.QStandardItemModel_SetItem2(this.h, (C.int)(row), item.cPointer())
}
func (this *QStandardItemModel) InvisibleRootItem() *QStandardItem {
return UnsafeNewQStandardItem(unsafe.Pointer(C.QStandardItemModel_InvisibleRootItem(this.h)))
}
func (this *QStandardItemModel) HorizontalHeaderItem(column int) *QStandardItem {
return UnsafeNewQStandardItem(unsafe.Pointer(C.QStandardItemModel_HorizontalHeaderItem(this.h, (C.int)(column))))
}
func (this *QStandardItemModel) SetHorizontalHeaderItem(column int, item *QStandardItem) {
C.QStandardItemModel_SetHorizontalHeaderItem(this.h, (C.int)(column), item.cPointer())
}
func (this *QStandardItemModel) VerticalHeaderItem(row int) *QStandardItem {
return UnsafeNewQStandardItem(unsafe.Pointer(C.QStandardItemModel_VerticalHeaderItem(this.h, (C.int)(row))))
}
func (this *QStandardItemModel) SetVerticalHeaderItem(row int, item *QStandardItem) {
C.QStandardItemModel_SetVerticalHeaderItem(this.h, (C.int)(row), item.cPointer())
}
func (this *QStandardItemModel) SetHorizontalHeaderLabels(labels []string) {
labels_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(labels))))
defer C.free(unsafe.Pointer(labels_CArray))
for i := range labels {
labels_i_ms := C.struct_miqt_string{}
labels_i_ms.data = C.CString(labels[i])
labels_i_ms.len = C.size_t(len(labels[i]))
defer C.free(unsafe.Pointer(labels_i_ms.data))
labels_CArray[i] = labels_i_ms
}
labels_ma := C.struct_miqt_array{len: C.size_t(len(labels)), data: unsafe.Pointer(labels_CArray)}
2024-10-20 05:21:03 +00:00
C.QStandardItemModel_SetHorizontalHeaderLabels(this.h, labels_ma)
}
func (this *QStandardItemModel) SetVerticalHeaderLabels(labels []string) {
labels_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(labels))))
defer C.free(unsafe.Pointer(labels_CArray))
for i := range labels {
labels_i_ms := C.struct_miqt_string{}
labels_i_ms.data = C.CString(labels[i])
labels_i_ms.len = C.size_t(len(labels[i]))
defer C.free(unsafe.Pointer(labels_i_ms.data))
labels_CArray[i] = labels_i_ms
}
labels_ma := C.struct_miqt_array{len: C.size_t(len(labels)), data: unsafe.Pointer(labels_CArray)}
2024-10-20 05:21:03 +00:00
C.QStandardItemModel_SetVerticalHeaderLabels(this.h, labels_ma)
}
func (this *QStandardItemModel) SetRowCount(rows int) {
C.QStandardItemModel_SetRowCount(this.h, (C.int)(rows))
}
func (this *QStandardItemModel) SetColumnCount(columns int) {
C.QStandardItemModel_SetColumnCount(this.h, (C.int)(columns))
}
func (this *QStandardItemModel) AppendRow(items []*QStandardItem) {
items_CArray := (*[0xffff]*C.QStandardItem)(C.malloc(C.size_t(8 * len(items))))
defer C.free(unsafe.Pointer(items_CArray))
for i := range items {
items_CArray[i] = items[i].cPointer()
}
items_ma := C.struct_miqt_array{len: C.size_t(len(items)), data: unsafe.Pointer(items_CArray)}
2024-10-20 05:21:03 +00:00
C.QStandardItemModel_AppendRow(this.h, items_ma)
}
func (this *QStandardItemModel) AppendColumn(items []*QStandardItem) {
items_CArray := (*[0xffff]*C.QStandardItem)(C.malloc(C.size_t(8 * len(items))))
defer C.free(unsafe.Pointer(items_CArray))
for i := range items {
items_CArray[i] = items[i].cPointer()
}
items_ma := C.struct_miqt_array{len: C.size_t(len(items)), data: unsafe.Pointer(items_CArray)}
2024-10-20 05:21:03 +00:00
C.QStandardItemModel_AppendColumn(this.h, items_ma)
}
func (this *QStandardItemModel) AppendRowWithItem(item *QStandardItem) {
C.QStandardItemModel_AppendRowWithItem(this.h, item.cPointer())
}
func (this *QStandardItemModel) InsertRow(row int, items []*QStandardItem) {
items_CArray := (*[0xffff]*C.QStandardItem)(C.malloc(C.size_t(8 * len(items))))
defer C.free(unsafe.Pointer(items_CArray))
for i := range items {
items_CArray[i] = items[i].cPointer()
}
items_ma := C.struct_miqt_array{len: C.size_t(len(items)), data: unsafe.Pointer(items_CArray)}
2024-10-20 05:21:03 +00:00
C.QStandardItemModel_InsertRow(this.h, (C.int)(row), items_ma)
}
func (this *QStandardItemModel) InsertColumn(column int, items []*QStandardItem) {
items_CArray := (*[0xffff]*C.QStandardItem)(C.malloc(C.size_t(8 * len(items))))
defer C.free(unsafe.Pointer(items_CArray))
for i := range items {
items_CArray[i] = items[i].cPointer()
}
items_ma := C.struct_miqt_array{len: C.size_t(len(items)), data: unsafe.Pointer(items_CArray)}
2024-10-20 05:21:03 +00:00
C.QStandardItemModel_InsertColumn(this.h, (C.int)(column), items_ma)
}
func (this *QStandardItemModel) InsertRow2(row int, item *QStandardItem) {
C.QStandardItemModel_InsertRow2(this.h, (C.int)(row), item.cPointer())
}
func (this *QStandardItemModel) InsertRowWithRow(row int) bool {
return (bool)(C.QStandardItemModel_InsertRowWithRow(this.h, (C.int)(row)))
}
func (this *QStandardItemModel) InsertColumnWithColumn(column int) bool {
return (bool)(C.QStandardItemModel_InsertColumnWithColumn(this.h, (C.int)(column)))
}
func (this *QStandardItemModel) TakeItem(row int) *QStandardItem {
return UnsafeNewQStandardItem(unsafe.Pointer(C.QStandardItemModel_TakeItem(this.h, (C.int)(row))))
}
func (this *QStandardItemModel) TakeRow(row int) []*QStandardItem {
var _ma C.struct_miqt_array = C.QStandardItemModel_TakeRow(this.h, (C.int)(row))
2024-10-20 05:21:03 +00:00
_ret := make([]*QStandardItem, int(_ma.len))
_outCast := (*[0xffff]*C.QStandardItem)(unsafe.Pointer(_ma.data)) // hey ya
for i := 0; i < int(_ma.len); i++ {
_ret[i] = UnsafeNewQStandardItem(unsafe.Pointer(_outCast[i]))
}
return _ret
}
func (this *QStandardItemModel) TakeColumn(column int) []*QStandardItem {
var _ma C.struct_miqt_array = C.QStandardItemModel_TakeColumn(this.h, (C.int)(column))
2024-10-20 05:21:03 +00:00
_ret := make([]*QStandardItem, int(_ma.len))
_outCast := (*[0xffff]*C.QStandardItem)(unsafe.Pointer(_ma.data)) // hey ya
for i := 0; i < int(_ma.len); i++ {
_ret[i] = UnsafeNewQStandardItem(unsafe.Pointer(_outCast[i]))
}
return _ret
}
func (this *QStandardItemModel) TakeHorizontalHeaderItem(column int) *QStandardItem {
return UnsafeNewQStandardItem(unsafe.Pointer(C.QStandardItemModel_TakeHorizontalHeaderItem(this.h, (C.int)(column))))
}
func (this *QStandardItemModel) TakeVerticalHeaderItem(row int) *QStandardItem {
return UnsafeNewQStandardItem(unsafe.Pointer(C.QStandardItemModel_TakeVerticalHeaderItem(this.h, (C.int)(row))))
}
func (this *QStandardItemModel) ItemPrototype() *QStandardItem {
return UnsafeNewQStandardItem(unsafe.Pointer(C.QStandardItemModel_ItemPrototype(this.h)))
}
func (this *QStandardItemModel) SetItemPrototype(item *QStandardItem) {
C.QStandardItemModel_SetItemPrototype(this.h, item.cPointer())
}
func (this *QStandardItemModel) FindItems(text string) []*QStandardItem {
text_ms := C.struct_miqt_string{}
text_ms.data = C.CString(text)
text_ms.len = C.size_t(len(text))
defer C.free(unsafe.Pointer(text_ms.data))
var _ma C.struct_miqt_array = C.QStandardItemModel_FindItems(this.h, text_ms)
2024-10-20 05:21:03 +00:00
_ret := make([]*QStandardItem, int(_ma.len))
_outCast := (*[0xffff]*C.QStandardItem)(unsafe.Pointer(_ma.data)) // hey ya
for i := 0; i < int(_ma.len); i++ {
_ret[i] = UnsafeNewQStandardItem(unsafe.Pointer(_outCast[i]))
}
return _ret
}
func (this *QStandardItemModel) SortRole() int {
return (int)(C.QStandardItemModel_SortRole(this.h))
}
func (this *QStandardItemModel) SetSortRole(role int) {
C.QStandardItemModel_SetSortRole(this.h, (C.int)(role))
}
func (this *QStandardItemModel) MimeTypes() []string {
var _ma C.struct_miqt_array = C.QStandardItemModel_MimeTypes(this.h)
2024-10-20 05:21:03 +00:00
_ret := make([]string, int(_ma.len))
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
for i := 0; i < int(_ma.len); i++ {
var _lv_ms C.struct_miqt_string = _outCast[i]
_lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len)))
C.free(unsafe.Pointer(_lv_ms.data))
_ret[i] = _lv_ret
}
return _ret
}
func (this *QStandardItemModel) MimeData(indexes []QModelIndex) *QMimeData {
indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes))))
defer C.free(unsafe.Pointer(indexes_CArray))
for i := range indexes {
indexes_CArray[i] = indexes[i].cPointer()
}
indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)}
2024-11-19 06:29:06 +00:00
return UnsafeNewQMimeData(unsafe.Pointer(C.QStandardItemModel_MimeData(this.h, indexes_ma)), nil)
2024-10-20 05:21:03 +00:00
}
func (this *QStandardItemModel) DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool {
return (bool)(C.QStandardItemModel_DropMimeData(this.h, data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer()))
}
func (this *QStandardItemModel) ItemChanged(item *QStandardItem) {
C.QStandardItemModel_ItemChanged(this.h, item.cPointer())
}
func (this *QStandardItemModel) OnItemChanged(slot func(item *QStandardItem)) {
C.QStandardItemModel_connect_ItemChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_ItemChanged
func miqt_exec_callback_QStandardItemModel_ItemChanged(cb C.intptr_t, item *C.QStandardItem) {
gofunc, ok := cgo.Handle(cb).Value().(func(item *QStandardItem))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := UnsafeNewQStandardItem(unsafe.Pointer(item))
gofunc(slotval1)
}
func QStandardItemModel_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.QStandardItemModel_Tr2(s_Cstring, c_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QStandardItemModel_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.QStandardItemModel_Tr3(s_Cstring, c_Cstring, (C.int)(n))
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QStandardItemModel) Item2(row int, column int) *QStandardItem {
return UnsafeNewQStandardItem(unsafe.Pointer(C.QStandardItemModel_Item2(this.h, (C.int)(row), (C.int)(column))))
}
func (this *QStandardItemModel) InsertRow22(row int, parent *QModelIndex) bool {
return (bool)(C.QStandardItemModel_InsertRow22(this.h, (C.int)(row), parent.cPointer()))
}
func (this *QStandardItemModel) InsertColumn2(column int, parent *QModelIndex) bool {
return (bool)(C.QStandardItemModel_InsertColumn2(this.h, (C.int)(column), parent.cPointer()))
}
func (this *QStandardItemModel) TakeItem2(row int, column int) *QStandardItem {
return UnsafeNewQStandardItem(unsafe.Pointer(C.QStandardItemModel_TakeItem2(this.h, (C.int)(row), (C.int)(column))))
}
func (this *QStandardItemModel) FindItems2(text string, flags MatchFlag) []*QStandardItem {
text_ms := C.struct_miqt_string{}
text_ms.data = C.CString(text)
text_ms.len = C.size_t(len(text))
defer C.free(unsafe.Pointer(text_ms.data))
var _ma C.struct_miqt_array = C.QStandardItemModel_FindItems2(this.h, text_ms, (C.int)(flags))
2024-10-20 05:21:03 +00:00
_ret := make([]*QStandardItem, int(_ma.len))
_outCast := (*[0xffff]*C.QStandardItem)(unsafe.Pointer(_ma.data)) // hey ya
for i := 0; i < int(_ma.len); i++ {
_ret[i] = UnsafeNewQStandardItem(unsafe.Pointer(_outCast[i]))
}
return _ret
}
func (this *QStandardItemModel) FindItems3(text string, flags MatchFlag, column int) []*QStandardItem {
text_ms := C.struct_miqt_string{}
text_ms.data = C.CString(text)
text_ms.len = C.size_t(len(text))
defer C.free(unsafe.Pointer(text_ms.data))
var _ma C.struct_miqt_array = C.QStandardItemModel_FindItems3(this.h, text_ms, (C.int)(flags), (C.int)(column))
2024-10-20 05:21:03 +00:00
_ret := make([]*QStandardItem, int(_ma.len))
_outCast := (*[0xffff]*C.QStandardItem)(unsafe.Pointer(_ma.data)) // hey ya
for i := 0; i < int(_ma.len); i++ {
_ret[i] = UnsafeNewQStandardItem(unsafe.Pointer(_outCast[i]))
}
return _ret
}
2024-11-19 06:29:06 +00:00
func (this *QStandardItemModel) callVirtualBase_RoleNames() map[int][]byte {
var _mm C.struct_miqt_map = C.QStandardItemModel_virtualbase_RoleNames(unsafe.Pointer(this.h))
_ret := make(map[int][]byte, int(_mm.len))
_Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys))
_Values := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_mm.values))
for i := 0; i < int(_mm.len); i++ {
_entry_Key := (int)(_Keys[i])
var _hashval_bytearray C.struct_miqt_string = _Values[i]
_hashval_ret := C.GoBytes(unsafe.Pointer(_hashval_bytearray.data), C.int(int64(_hashval_bytearray.len)))
C.free(unsafe.Pointer(_hashval_bytearray.data))
_entry_Value := _hashval_ret
_ret[_entry_Key] = _entry_Value
}
return _ret
}
func (this *QStandardItemModel) OnRoleNames(slot func(super func() map[int][]byte) map[int][]byte) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_RoleNames(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_RoleNames
func miqt_exec_callback_QStandardItemModel_RoleNames(self *C.QStandardItemModel, cb C.intptr_t) C.struct_miqt_map {
gofunc, ok := cgo.Handle(cb).Value().(func(super func() map[int][]byte) map[int][]byte)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_RoleNames)
virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn))))
defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray))
virtualReturn_Values_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn))))
defer C.free(unsafe.Pointer(virtualReturn_Values_CArray))
virtualReturn_ctr := 0
for virtualReturn_k, virtualReturn_v := range virtualReturn {
virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k)
virtualReturn_v_alias := C.struct_miqt_string{}
virtualReturn_v_alias.data = (*C.char)(unsafe.Pointer(&virtualReturn_v[0]))
virtualReturn_v_alias.len = C.size_t(len(virtualReturn_v))
virtualReturn_Values_CArray[virtualReturn_ctr] = virtualReturn_v_alias
virtualReturn_ctr++
}
virtualReturn_mm := C.struct_miqt_map{
len: C.size_t(len(virtualReturn)),
keys: unsafe.Pointer(virtualReturn_Keys_CArray),
values: unsafe.Pointer(virtualReturn_Values_CArray),
}
return virtualReturn_mm
}
func (this *QStandardItemModel) callVirtualBase_Index(row int, column int, parent *QModelIndex) *QModelIndex {
_ret := C.QStandardItemModel_virtualbase_Index(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), parent.cPointer())
_goptr := newQModelIndex(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QStandardItemModel) OnIndex(slot func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_Index(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_Index
func miqt_exec_callback_QStandardItemModel_Index(self *C.QStandardItemModel, cb C.intptr_t, row C.int, column C.int, parent *C.QModelIndex) *C.QModelIndex {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := (int)(row)
slotval2 := (int)(column)
slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent))
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_Index, slotval1, slotval2, slotval3)
return virtualReturn.cPointer()
}
func (this *QStandardItemModel) callVirtualBase_Parent(child *QModelIndex) *QModelIndex {
_ret := C.QStandardItemModel_virtualbase_Parent(unsafe.Pointer(this.h), child.cPointer())
_goptr := newQModelIndex(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QStandardItemModel) OnParent(slot func(super func(child *QModelIndex) *QModelIndex, child *QModelIndex) *QModelIndex) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_Parent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_Parent
func miqt_exec_callback_QStandardItemModel_Parent(self *C.QStandardItemModel, cb C.intptr_t, child *C.QModelIndex) *C.QModelIndex {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(child *QModelIndex) *QModelIndex, child *QModelIndex) *QModelIndex)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(child))
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_Parent, slotval1)
return virtualReturn.cPointer()
}
func (this *QStandardItemModel) callVirtualBase_RowCount(parent *QModelIndex) int {
return (int)(C.QStandardItemModel_virtualbase_RowCount(unsafe.Pointer(this.h), parent.cPointer()))
}
func (this *QStandardItemModel) OnRowCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_RowCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_RowCount
func miqt_exec_callback_QStandardItemModel_RowCount(self *C.QStandardItemModel, cb C.intptr_t, parent *C.QModelIndex) C.int {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) int, parent *QModelIndex) int)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent))
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_RowCount, slotval1)
return (C.int)(virtualReturn)
}
func (this *QStandardItemModel) callVirtualBase_ColumnCount(parent *QModelIndex) int {
return (int)(C.QStandardItemModel_virtualbase_ColumnCount(unsafe.Pointer(this.h), parent.cPointer()))
}
func (this *QStandardItemModel) OnColumnCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_ColumnCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_ColumnCount
func miqt_exec_callback_QStandardItemModel_ColumnCount(self *C.QStandardItemModel, cb C.intptr_t, parent *C.QModelIndex) C.int {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) int, parent *QModelIndex) int)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent))
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_ColumnCount, slotval1)
return (C.int)(virtualReturn)
}
func (this *QStandardItemModel) callVirtualBase_HasChildren(parent *QModelIndex) bool {
return (bool)(C.QStandardItemModel_virtualbase_HasChildren(unsafe.Pointer(this.h), parent.cPointer()))
}
func (this *QStandardItemModel) OnHasChildren(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_HasChildren(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_HasChildren
func miqt_exec_callback_QStandardItemModel_HasChildren(self *C.QStandardItemModel, cb C.intptr_t, parent *C.QModelIndex) C.bool {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent))
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_HasChildren, slotval1)
return (C.bool)(virtualReturn)
}
func (this *QStandardItemModel) callVirtualBase_Data(index *QModelIndex, role int) *QVariant {
_ret := C.QStandardItemModel_virtualbase_Data(unsafe.Pointer(this.h), index.cPointer(), (C.int)(role))
_goptr := newQVariant(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QStandardItemModel) OnData(slot func(super func(index *QModelIndex, role int) *QVariant, index *QModelIndex, role int) *QVariant) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_Data
func miqt_exec_callback_QStandardItemModel_Data(self *C.QStandardItemModel, cb C.intptr_t, index *C.QModelIndex, role C.int) *C.QVariant {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, role int) *QVariant, index *QModelIndex, role int) *QVariant)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index))
slotval2 := (int)(role)
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_Data, slotval1, slotval2)
return virtualReturn.cPointer()
}
func (this *QStandardItemModel) callVirtualBase_MultiData(index *QModelIndex, roleDataSpan QModelRoleDataSpan) {
C.QStandardItemModel_virtualbase_MultiData(unsafe.Pointer(this.h), index.cPointer(), roleDataSpan.cPointer())
}
func (this *QStandardItemModel) OnMultiData(slot func(super func(index *QModelIndex, roleDataSpan QModelRoleDataSpan), index *QModelIndex, roleDataSpan QModelRoleDataSpan)) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_MultiData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_MultiData
func miqt_exec_callback_QStandardItemModel_MultiData(self *C.QStandardItemModel, cb C.intptr_t, index *C.QModelIndex, roleDataSpan *C.QModelRoleDataSpan) {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, roleDataSpan QModelRoleDataSpan), index *QModelIndex, roleDataSpan QModelRoleDataSpan))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index))
roleDataSpan_ret := roleDataSpan
roleDataSpan_goptr := newQModelRoleDataSpan(roleDataSpan_ret)
roleDataSpan_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
slotval2 := *roleDataSpan_goptr
gofunc((&QStandardItemModel{h: self}).callVirtualBase_MultiData, slotval1, slotval2)
}
func (this *QStandardItemModel) callVirtualBase_SetData(index *QModelIndex, value *QVariant, role int) bool {
return (bool)(C.QStandardItemModel_virtualbase_SetData(unsafe.Pointer(this.h), index.cPointer(), value.cPointer(), (C.int)(role)))
}
func (this *QStandardItemModel) OnSetData(slot func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_SetData
func miqt_exec_callback_QStandardItemModel_SetData(self *C.QStandardItemModel, cb C.intptr_t, index *C.QModelIndex, value *C.QVariant, role C.int) C.bool {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index))
slotval2 := UnsafeNewQVariant(unsafe.Pointer(value))
slotval3 := (int)(role)
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_SetData, slotval1, slotval2, slotval3)
return (C.bool)(virtualReturn)
}
func (this *QStandardItemModel) callVirtualBase_ClearItemData(index *QModelIndex) bool {
return (bool)(C.QStandardItemModel_virtualbase_ClearItemData(unsafe.Pointer(this.h), index.cPointer()))
}
func (this *QStandardItemModel) OnClearItemData(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_ClearItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_ClearItemData
func miqt_exec_callback_QStandardItemModel_ClearItemData(self *C.QStandardItemModel, cb C.intptr_t, index *C.QModelIndex) C.bool {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) bool, index *QModelIndex) bool)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index))
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_ClearItemData, slotval1)
return (C.bool)(virtualReturn)
}
func (this *QStandardItemModel) callVirtualBase_HeaderData(section int, orientation Orientation, role int) *QVariant {
_ret := C.QStandardItemModel_virtualbase_HeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), (C.int)(role))
_goptr := newQVariant(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QStandardItemModel) OnHeaderData(slot func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_HeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_HeaderData
func miqt_exec_callback_QStandardItemModel_HeaderData(self *C.QStandardItemModel, cb C.intptr_t, section C.int, orientation C.int, role C.int) *C.QVariant {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := (int)(section)
slotval2 := (Orientation)(orientation)
slotval3 := (int)(role)
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_HeaderData, slotval1, slotval2, slotval3)
return virtualReturn.cPointer()
}
func (this *QStandardItemModel) callVirtualBase_SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool {
return (bool)(C.QStandardItemModel_virtualbase_SetHeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role)))
}
func (this *QStandardItemModel) OnSetHeaderData(slot func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_SetHeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_SetHeaderData
func miqt_exec_callback_QStandardItemModel_SetHeaderData(self *C.QStandardItemModel, cb C.intptr_t, section C.int, orientation C.int, value *C.QVariant, role C.int) C.bool {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := (int)(section)
slotval2 := (Orientation)(orientation)
slotval3 := UnsafeNewQVariant(unsafe.Pointer(value))
slotval4 := (int)(role)
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_SetHeaderData, slotval1, slotval2, slotval3, slotval4)
return (C.bool)(virtualReturn)
}
func (this *QStandardItemModel) callVirtualBase_InsertRows(row int, count int, parent *QModelIndex) bool {
return (bool)(C.QStandardItemModel_virtualbase_InsertRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer()))
}
func (this *QStandardItemModel) OnInsertRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_InsertRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_InsertRows
func miqt_exec_callback_QStandardItemModel_InsertRows(self *C.QStandardItemModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := (int)(row)
slotval2 := (int)(count)
slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent))
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_InsertRows, slotval1, slotval2, slotval3)
return (C.bool)(virtualReturn)
}
func (this *QStandardItemModel) callVirtualBase_InsertColumns(column int, count int, parent *QModelIndex) bool {
return (bool)(C.QStandardItemModel_virtualbase_InsertColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer()))
}
func (this *QStandardItemModel) OnInsertColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_InsertColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_InsertColumns
func miqt_exec_callback_QStandardItemModel_InsertColumns(self *C.QStandardItemModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := (int)(column)
slotval2 := (int)(count)
slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent))
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_InsertColumns, slotval1, slotval2, slotval3)
return (C.bool)(virtualReturn)
}
func (this *QStandardItemModel) callVirtualBase_RemoveRows(row int, count int, parent *QModelIndex) bool {
return (bool)(C.QStandardItemModel_virtualbase_RemoveRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer()))
}
func (this *QStandardItemModel) OnRemoveRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_RemoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_RemoveRows
func miqt_exec_callback_QStandardItemModel_RemoveRows(self *C.QStandardItemModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := (int)(row)
slotval2 := (int)(count)
slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent))
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_RemoveRows, slotval1, slotval2, slotval3)
return (C.bool)(virtualReturn)
}
func (this *QStandardItemModel) callVirtualBase_RemoveColumns(column int, count int, parent *QModelIndex) bool {
return (bool)(C.QStandardItemModel_virtualbase_RemoveColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer()))
}
func (this *QStandardItemModel) OnRemoveColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_RemoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_RemoveColumns
func miqt_exec_callback_QStandardItemModel_RemoveColumns(self *C.QStandardItemModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := (int)(column)
slotval2 := (int)(count)
slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent))
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_RemoveColumns, slotval1, slotval2, slotval3)
return (C.bool)(virtualReturn)
}
func (this *QStandardItemModel) callVirtualBase_Flags(index *QModelIndex) ItemFlag {
return (ItemFlag)(C.QStandardItemModel_virtualbase_Flags(unsafe.Pointer(this.h), index.cPointer()))
}
func (this *QStandardItemModel) OnFlags(slot func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_Flags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_Flags
func miqt_exec_callback_QStandardItemModel_Flags(self *C.QStandardItemModel, cb C.intptr_t, index *C.QModelIndex) C.int {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index))
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_Flags, slotval1)
return (C.int)(virtualReturn)
}
func (this *QStandardItemModel) callVirtualBase_SupportedDropActions() DropAction {
return (DropAction)(C.QStandardItemModel_virtualbase_SupportedDropActions(unsafe.Pointer(this.h)))
}
func (this *QStandardItemModel) OnSupportedDropActions(slot func(super func() DropAction) DropAction) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_SupportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_SupportedDropActions
func miqt_exec_callback_QStandardItemModel_SupportedDropActions(self *C.QStandardItemModel, cb C.intptr_t) C.int {
gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_SupportedDropActions)
return (C.int)(virtualReturn)
}
func (this *QStandardItemModel) callVirtualBase_ItemData(index *QModelIndex) map[int]QVariant {
var _mm C.struct_miqt_map = C.QStandardItemModel_virtualbase_ItemData(unsafe.Pointer(this.h), index.cPointer())
_ret := make(map[int]QVariant, int(_mm.len))
_Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys))
_Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(_mm.values))
for i := 0; i < int(_mm.len); i++ {
_entry_Key := (int)(_Keys[i])
_mapval_ret := _Values[i]
_mapval_goptr := newQVariant(_mapval_ret)
_mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
_entry_Value := *_mapval_goptr
_ret[_entry_Key] = _entry_Value
}
return _ret
}
func (this *QStandardItemModel) OnItemData(slot func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_ItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_ItemData
func miqt_exec_callback_QStandardItemModel_ItemData(self *C.QStandardItemModel, cb C.intptr_t, index *C.QModelIndex) C.struct_miqt_map {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index))
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_ItemData, slotval1)
virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn))))
defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray))
virtualReturn_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(virtualReturn))))
defer C.free(unsafe.Pointer(virtualReturn_Values_CArray))
virtualReturn_ctr := 0
for virtualReturn_k, virtualReturn_v := range virtualReturn {
virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k)
virtualReturn_Values_CArray[virtualReturn_ctr] = virtualReturn_v.cPointer()
virtualReturn_ctr++
}
virtualReturn_mm := C.struct_miqt_map{
len: C.size_t(len(virtualReturn)),
keys: unsafe.Pointer(virtualReturn_Keys_CArray),
values: unsafe.Pointer(virtualReturn_Values_CArray),
}
return virtualReturn_mm
}
func (this *QStandardItemModel) callVirtualBase_SetItemData(index *QModelIndex, roles map[int]QVariant) bool {
roles_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles))))
defer C.free(unsafe.Pointer(roles_Keys_CArray))
roles_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(roles))))
defer C.free(unsafe.Pointer(roles_Values_CArray))
roles_ctr := 0
for roles_k, roles_v := range roles {
roles_Keys_CArray[roles_ctr] = (C.int)(roles_k)
roles_Values_CArray[roles_ctr] = roles_v.cPointer()
roles_ctr++
}
roles_mm := C.struct_miqt_map{
len: C.size_t(len(roles)),
keys: unsafe.Pointer(roles_Keys_CArray),
values: unsafe.Pointer(roles_Values_CArray),
}
return (bool)(C.QStandardItemModel_virtualbase_SetItemData(unsafe.Pointer(this.h), index.cPointer(), roles_mm))
}
func (this *QStandardItemModel) OnSetItemData(slot func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_SetItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_SetItemData
func miqt_exec_callback_QStandardItemModel_SetItemData(self *C.QStandardItemModel, cb C.intptr_t, index *C.QModelIndex, roles C.struct_miqt_map) C.bool {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index))
var roles_mm C.struct_miqt_map = roles
roles_ret := make(map[int]QVariant, int(roles_mm.len))
roles_Keys := (*[0xffff]C.int)(unsafe.Pointer(roles_mm.keys))
roles_Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(roles_mm.values))
for i := 0; i < int(roles_mm.len); i++ {
roles_entry_Key := (int)(roles_Keys[i])
roles_mapval_ret := roles_Values[i]
roles_mapval_goptr := newQVariant(roles_mapval_ret)
roles_mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
roles_entry_Value := *roles_mapval_goptr
roles_ret[roles_entry_Key] = roles_entry_Value
}
slotval2 := roles_ret
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_SetItemData, slotval1, slotval2)
return (C.bool)(virtualReturn)
}
func (this *QStandardItemModel) callVirtualBase_Sort(column int, order SortOrder) {
C.QStandardItemModel_virtualbase_Sort(unsafe.Pointer(this.h), (C.int)(column), (C.int)(order))
}
func (this *QStandardItemModel) OnSort(slot func(super func(column int, order SortOrder), column int, order SortOrder)) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_Sort(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_Sort
func miqt_exec_callback_QStandardItemModel_Sort(self *C.QStandardItemModel, cb C.intptr_t, column C.int, order C.int) {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, order SortOrder), column int, order SortOrder))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := (int)(column)
slotval2 := (SortOrder)(order)
gofunc((&QStandardItemModel{h: self}).callVirtualBase_Sort, slotval1, slotval2)
}
func (this *QStandardItemModel) callVirtualBase_MimeTypes() []string {
var _ma C.struct_miqt_array = C.QStandardItemModel_virtualbase_MimeTypes(unsafe.Pointer(this.h))
_ret := make([]string, int(_ma.len))
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
for i := 0; i < int(_ma.len); i++ {
var _lv_ms C.struct_miqt_string = _outCast[i]
_lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len)))
C.free(unsafe.Pointer(_lv_ms.data))
_ret[i] = _lv_ret
}
return _ret
}
func (this *QStandardItemModel) OnMimeTypes(slot func(super func() []string) []string) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_MimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_MimeTypes
func miqt_exec_callback_QStandardItemModel_MimeTypes(self *C.QStandardItemModel, cb C.intptr_t) C.struct_miqt_array {
gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_MimeTypes)
virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn))))
defer C.free(unsafe.Pointer(virtualReturn_CArray))
for i := range virtualReturn {
virtualReturn_i_ms := C.struct_miqt_string{}
virtualReturn_i_ms.data = C.CString(virtualReturn[i])
virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i]))
defer C.free(unsafe.Pointer(virtualReturn_i_ms.data))
virtualReturn_CArray[i] = virtualReturn_i_ms
}
virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)}
return virtualReturn_ma
}
func (this *QStandardItemModel) callVirtualBase_MimeData(indexes []QModelIndex) *QMimeData {
indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes))))
defer C.free(unsafe.Pointer(indexes_CArray))
for i := range indexes {
indexes_CArray[i] = indexes[i].cPointer()
}
indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)}
return UnsafeNewQMimeData(unsafe.Pointer(C.QStandardItemModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)), nil)
}
func (this *QStandardItemModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_MimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_MimeData
func miqt_exec_callback_QStandardItemModel_MimeData(self *C.QStandardItemModel, cb C.intptr_t, indexes C.struct_miqt_array) *C.QMimeData {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
var indexes_ma C.struct_miqt_array = indexes
indexes_ret := make([]QModelIndex, int(indexes_ma.len))
indexes_outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(indexes_ma.data)) // hey ya
for i := 0; i < int(indexes_ma.len); i++ {
indexes_lv_ret := indexes_outCast[i]
indexes_lv_goptr := newQModelIndex(indexes_lv_ret)
indexes_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
indexes_ret[i] = *indexes_lv_goptr
}
slotval1 := indexes_ret
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_MimeData, slotval1)
return virtualReturn.cPointer()
}
func (this *QStandardItemModel) callVirtualBase_DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool {
return (bool)(C.QStandardItemModel_virtualbase_DropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer()))
}
func (this *QStandardItemModel) OnDropMimeData(slot func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_DropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_DropMimeData
func miqt_exec_callback_QStandardItemModel_DropMimeData(self *C.QStandardItemModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := UnsafeNewQMimeData(unsafe.Pointer(data), nil)
slotval2 := (DropAction)(action)
slotval3 := (int)(row)
slotval4 := (int)(column)
slotval5 := UnsafeNewQModelIndex(unsafe.Pointer(parent))
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5)
return (C.bool)(virtualReturn)
}
func (this *QStandardItemModel) callVirtualBase_Sibling(row int, column int, idx *QModelIndex) *QModelIndex {
_ret := C.QStandardItemModel_virtualbase_Sibling(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), idx.cPointer())
_goptr := newQModelIndex(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QStandardItemModel) OnSibling(slot func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_Sibling(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_Sibling
func miqt_exec_callback_QStandardItemModel_Sibling(self *C.QStandardItemModel, cb C.intptr_t, row C.int, column C.int, idx *C.QModelIndex) *C.QModelIndex {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := (int)(row)
slotval2 := (int)(column)
slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(idx))
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_Sibling, slotval1, slotval2, slotval3)
return virtualReturn.cPointer()
}
func (this *QStandardItemModel) callVirtualBase_CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool {
return (bool)(C.QStandardItemModel_virtualbase_CanDropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer()))
}
func (this *QStandardItemModel) OnCanDropMimeData(slot func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_CanDropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_CanDropMimeData
func miqt_exec_callback_QStandardItemModel_CanDropMimeData(self *C.QStandardItemModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := UnsafeNewQMimeData(unsafe.Pointer(data), nil)
slotval2 := (DropAction)(action)
slotval3 := (int)(row)
slotval4 := (int)(column)
slotval5 := UnsafeNewQModelIndex(unsafe.Pointer(parent))
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_CanDropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5)
return (C.bool)(virtualReturn)
}
func (this *QStandardItemModel) callVirtualBase_SupportedDragActions() DropAction {
return (DropAction)(C.QStandardItemModel_virtualbase_SupportedDragActions(unsafe.Pointer(this.h)))
}
func (this *QStandardItemModel) OnSupportedDragActions(slot func(super func() DropAction) DropAction) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_SupportedDragActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_SupportedDragActions
func miqt_exec_callback_QStandardItemModel_SupportedDragActions(self *C.QStandardItemModel, cb C.intptr_t) C.int {
gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_SupportedDragActions)
return (C.int)(virtualReturn)
}
func (this *QStandardItemModel) callVirtualBase_MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool {
return (bool)(C.QStandardItemModel_virtualbase_MoveRows(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceRow), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild)))
}
func (this *QStandardItemModel) OnMoveRows(slot func(super func(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_MoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_MoveRows
func miqt_exec_callback_QStandardItemModel_MoveRows(self *C.QStandardItemModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceRow C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceParent))
slotval2 := (int)(sourceRow)
slotval3 := (int)(count)
slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(destinationParent))
slotval5 := (int)(destinationChild)
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_MoveRows, slotval1, slotval2, slotval3, slotval4, slotval5)
return (C.bool)(virtualReturn)
}
func (this *QStandardItemModel) callVirtualBase_MoveColumns(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool {
return (bool)(C.QStandardItemModel_virtualbase_MoveColumns(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceColumn), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild)))
}
func (this *QStandardItemModel) OnMoveColumns(slot func(super func(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_MoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_MoveColumns
func miqt_exec_callback_QStandardItemModel_MoveColumns(self *C.QStandardItemModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceColumn C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceParent))
slotval2 := (int)(sourceColumn)
slotval3 := (int)(count)
slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(destinationParent))
slotval5 := (int)(destinationChild)
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_MoveColumns, slotval1, slotval2, slotval3, slotval4, slotval5)
return (C.bool)(virtualReturn)
}
func (this *QStandardItemModel) callVirtualBase_FetchMore(parent *QModelIndex) {
C.QStandardItemModel_virtualbase_FetchMore(unsafe.Pointer(this.h), parent.cPointer())
}
func (this *QStandardItemModel) OnFetchMore(slot func(super func(parent *QModelIndex), parent *QModelIndex)) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_FetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_FetchMore
func miqt_exec_callback_QStandardItemModel_FetchMore(self *C.QStandardItemModel, cb C.intptr_t, parent *C.QModelIndex) {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex), parent *QModelIndex))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent))
gofunc((&QStandardItemModel{h: self}).callVirtualBase_FetchMore, slotval1)
}
func (this *QStandardItemModel) callVirtualBase_CanFetchMore(parent *QModelIndex) bool {
return (bool)(C.QStandardItemModel_virtualbase_CanFetchMore(unsafe.Pointer(this.h), parent.cPointer()))
}
func (this *QStandardItemModel) OnCanFetchMore(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_CanFetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_CanFetchMore
func miqt_exec_callback_QStandardItemModel_CanFetchMore(self *C.QStandardItemModel, cb C.intptr_t, parent *C.QModelIndex) C.bool {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent))
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_CanFetchMore, slotval1)
return (C.bool)(virtualReturn)
}
func (this *QStandardItemModel) callVirtualBase_Buddy(index *QModelIndex) *QModelIndex {
_ret := C.QStandardItemModel_virtualbase_Buddy(unsafe.Pointer(this.h), index.cPointer())
_goptr := newQModelIndex(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QStandardItemModel) OnBuddy(slot func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_Buddy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_Buddy
func miqt_exec_callback_QStandardItemModel_Buddy(self *C.QStandardItemModel, cb C.intptr_t, index *C.QModelIndex) *C.QModelIndex {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index))
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_Buddy, slotval1)
return virtualReturn.cPointer()
}
func (this *QStandardItemModel) callVirtualBase_Match(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex {
var _ma C.struct_miqt_array = C.QStandardItemModel_virtualbase_Match(unsafe.Pointer(this.h), start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits), (C.int)(flags))
_ret := make([]QModelIndex, int(_ma.len))
_outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya
for i := 0; i < int(_ma.len); i++ {
_lv_ret := _outCast[i]
_lv_goptr := newQModelIndex(_lv_ret)
_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
_ret[i] = *_lv_goptr
}
return _ret
}
func (this *QStandardItemModel) OnMatch(slot func(super func(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex, start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_Match(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_Match
func miqt_exec_callback_QStandardItemModel_Match(self *C.QStandardItemModel, cb C.intptr_t, start *C.QModelIndex, role C.int, value *C.QVariant, hits C.int, flags C.int) C.struct_miqt_array {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex, start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(start))
slotval2 := (int)(role)
slotval3 := UnsafeNewQVariant(unsafe.Pointer(value))
slotval4 := (int)(hits)
slotval5 := (MatchFlag)(flags)
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_Match, slotval1, slotval2, slotval3, slotval4, slotval5)
virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn))))
defer C.free(unsafe.Pointer(virtualReturn_CArray))
for i := range virtualReturn {
virtualReturn_CArray[i] = virtualReturn[i].cPointer()
}
virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)}
return virtualReturn_ma
}
func (this *QStandardItemModel) callVirtualBase_Span(index *QModelIndex) *QSize {
_ret := C.QStandardItemModel_virtualbase_Span(unsafe.Pointer(this.h), index.cPointer())
_goptr := newQSize(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QStandardItemModel) OnSpan(slot func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_Span(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_Span
func miqt_exec_callback_QStandardItemModel_Span(self *C.QStandardItemModel, cb C.intptr_t, index *C.QModelIndex) *C.QSize {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index))
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_Span, slotval1)
return virtualReturn.cPointer()
}
func (this *QStandardItemModel) callVirtualBase_Submit() bool {
return (bool)(C.QStandardItemModel_virtualbase_Submit(unsafe.Pointer(this.h)))
}
func (this *QStandardItemModel) OnSubmit(slot func(super func() bool) bool) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_Submit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_Submit
func miqt_exec_callback_QStandardItemModel_Submit(self *C.QStandardItemModel, cb C.intptr_t) C.bool {
gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_Submit)
return (C.bool)(virtualReturn)
}
func (this *QStandardItemModel) callVirtualBase_Revert() {
C.QStandardItemModel_virtualbase_Revert(unsafe.Pointer(this.h))
}
func (this *QStandardItemModel) OnRevert(slot func(super func())) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_Revert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_Revert
func miqt_exec_callback_QStandardItemModel_Revert(self *C.QStandardItemModel, cb C.intptr_t) {
gofunc, ok := cgo.Handle(cb).Value().(func(super func()))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
gofunc((&QStandardItemModel{h: self}).callVirtualBase_Revert)
}
func (this *QStandardItemModel) callVirtualBase_ResetInternalData() {
C.QStandardItemModel_virtualbase_ResetInternalData(unsafe.Pointer(this.h))
}
func (this *QStandardItemModel) OnResetInternalData(slot func(super func())) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_override_virtual_ResetInternalData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QStandardItemModel_ResetInternalData
func miqt_exec_callback_QStandardItemModel_ResetInternalData(self *C.QStandardItemModel, cb C.intptr_t) {
gofunc, ok := cgo.Handle(cb).Value().(func(super func()))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
gofunc((&QStandardItemModel{h: self}).callVirtualBase_ResetInternalData)
}
2024-10-20 05:21:03 +00:00
// Delete this object from C++ memory.
func (this *QStandardItemModel) Delete() {
2024-11-19 06:29:06 +00:00
C.QStandardItemModel_Delete(this.h, C.bool(this.isSubclass))
2024-10-20 05:21:03 +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 *QStandardItemModel) GoGC() {
runtime.SetFinalizer(this, func(this *QStandardItemModel) {
this.Delete()
runtime.KeepAlive(this.h)
})
}