2024-08-25 04:08:24 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qtransposeproxymodel.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
|
|
|
type QTransposeProxyModel struct {
|
|
|
|
h *C.QTransposeProxyModel
|
|
|
|
*QAbstractProxyModel
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTransposeProxyModel) cPointer() *C.QTransposeProxyModel {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func (this *QTransposeProxyModel) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func newQTransposeProxyModel(h *C.QTransposeProxyModel) *QTransposeProxyModel {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-10-16 05:07:56 +00:00
|
|
|
return &QTransposeProxyModel{h: h, QAbstractProxyModel: UnsafeNewQAbstractProxyModel(unsafe.Pointer(h))}
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func UnsafeNewQTransposeProxyModel(h unsafe.Pointer) *QTransposeProxyModel {
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQTransposeProxyModel((*C.QTransposeProxyModel)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQTransposeProxyModel constructs a new QTransposeProxyModel object.
|
|
|
|
func NewQTransposeProxyModel() *QTransposeProxyModel {
|
|
|
|
ret := C.QTransposeProxyModel_new()
|
|
|
|
return newQTransposeProxyModel(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQTransposeProxyModel2 constructs a new QTransposeProxyModel object.
|
|
|
|
func NewQTransposeProxyModel2(parent *QObject) *QTransposeProxyModel {
|
|
|
|
ret := C.QTransposeProxyModel_new2(parent.cPointer())
|
|
|
|
return newQTransposeProxyModel(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTransposeProxyModel) MetaObject() *QMetaObject {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQMetaObject(unsafe.Pointer(C.QTransposeProxyModel_MetaObject(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 22:32:57 +00:00
|
|
|
func (this *QTransposeProxyModel) Metacast(param1 string) unsafe.Pointer {
|
|
|
|
param1_Cstring := C.CString(param1)
|
|
|
|
defer C.free(unsafe.Pointer(param1_Cstring))
|
2024-10-18 23:53:33 +00:00
|
|
|
return (unsafe.Pointer)(C.QTransposeProxyModel_Metacast(this.h, param1_Cstring))
|
2024-09-20 22:32:57 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func QTransposeProxyModel_Tr(s string) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QTransposeProxyModel_Tr(s_Cstring)
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QTransposeProxyModel_TrUtf8(s string) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QTransposeProxyModel_TrUtf8(s_Cstring)
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTransposeProxyModel) SetSourceModel(newSourceModel *QAbstractItemModel) {
|
|
|
|
C.QTransposeProxyModel_SetSourceModel(this.h, newSourceModel.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTransposeProxyModel) RowCount() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QTransposeProxyModel_RowCount(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTransposeProxyModel) ColumnCount() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QTransposeProxyModel_ColumnCount(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QTransposeProxyModel) HeaderData(section int, orientation Orientation) *QVariant {
|
2024-09-18 00:12:02 +00:00
|
|
|
_ret := C.QTransposeProxyModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation))
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr := newQVariant(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QTransposeProxyModel) SetHeaderData(section int, orientation Orientation, value *QVariant) bool {
|
2024-09-18 00:12:02 +00:00
|
|
|
return (bool)(C.QTransposeProxyModel_SetHeaderData(this.h, (C.int)(section), (C.int)(orientation), value.cPointer()))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-11-04 07:59:22 +00:00
|
|
|
func (this *QTransposeProxyModel) 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.QTransposeProxyModel_SetItemData(this.h, index.cPointer(), roles_mm))
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QTransposeProxyModel) Span(index *QModelIndex) *QSize {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QTransposeProxyModel_Span(this.h, index.cPointer())
|
|
|
|
_goptr := newQSize(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-11-04 07:59:22 +00:00
|
|
|
func (this *QTransposeProxyModel) ItemData(index *QModelIndex) map[int]QVariant {
|
|
|
|
var _mm C.struct_miqt_map = C.QTransposeProxyModel_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
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QTransposeProxyModel) MapFromSource(sourceIndex *QModelIndex) *QModelIndex {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QTransposeProxyModel_MapFromSource(this.h, sourceIndex.cPointer())
|
|
|
|
_goptr := newQModelIndex(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTransposeProxyModel) MapToSource(proxyIndex *QModelIndex) *QModelIndex {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QTransposeProxyModel_MapToSource(this.h, proxyIndex.cPointer())
|
|
|
|
_goptr := newQModelIndex(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTransposeProxyModel) Parent(index *QModelIndex) *QModelIndex {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QTransposeProxyModel_Parent(this.h, index.cPointer())
|
|
|
|
_goptr := newQModelIndex(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTransposeProxyModel) Index(row int, column int) *QModelIndex {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QTransposeProxyModel_Index(this.h, (C.int)(row), (C.int)(column))
|
|
|
|
_goptr := newQModelIndex(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTransposeProxyModel) InsertRows(row int, count int) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QTransposeProxyModel_InsertRows(this.h, (C.int)(row), (C.int)(count)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTransposeProxyModel) RemoveRows(row int, count int) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QTransposeProxyModel_RemoveRows(this.h, (C.int)(row), (C.int)(count)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTransposeProxyModel) MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QTransposeProxyModel_MoveRows(this.h, sourceParent.cPointer(), (C.int)(sourceRow), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTransposeProxyModel) InsertColumns(column int, count int) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QTransposeProxyModel_InsertColumns(this.h, (C.int)(column), (C.int)(count)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTransposeProxyModel) RemoveColumns(column int, count int) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QTransposeProxyModel_RemoveColumns(this.h, (C.int)(column), (C.int)(count)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTransposeProxyModel) MoveColumns(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QTransposeProxyModel_MoveColumns(this.h, sourceParent.cPointer(), (C.int)(sourceColumn), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
func (this *QTransposeProxyModel) Sort(column int) {
|
|
|
|
C.QTransposeProxyModel_Sort(this.h, (C.int)(column))
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func QTransposeProxyModel_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))
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QTransposeProxyModel_Tr2(s_Cstring, c_Cstring)
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QTransposeProxyModel_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))
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QTransposeProxyModel_Tr3(s_Cstring, c_Cstring, (C.int)(n))
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QTransposeProxyModel_TrUtf82(s string, c string) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
|
|
|
c_Cstring := C.CString(c)
|
|
|
|
defer C.free(unsafe.Pointer(c_Cstring))
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QTransposeProxyModel_TrUtf82(s_Cstring, c_Cstring)
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QTransposeProxyModel_TrUtf83(s string, c string, n int) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
|
|
|
c_Cstring := C.CString(c)
|
|
|
|
defer C.free(unsafe.Pointer(c_Cstring))
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QTransposeProxyModel_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTransposeProxyModel) RowCount1(parent *QModelIndex) int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QTransposeProxyModel_RowCount1(this.h, parent.cPointer()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTransposeProxyModel) ColumnCount1(parent *QModelIndex) int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QTransposeProxyModel_ColumnCount1(this.h, parent.cPointer()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QTransposeProxyModel) HeaderData3(section int, orientation Orientation, role int) *QVariant {
|
2024-09-18 00:12:02 +00:00
|
|
|
_ret := C.QTransposeProxyModel_HeaderData3(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role))
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr := newQVariant(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QTransposeProxyModel) SetHeaderData4(section int, orientation Orientation, value *QVariant, role int) bool {
|
2024-09-18 00:12:02 +00:00
|
|
|
return (bool)(C.QTransposeProxyModel_SetHeaderData4(this.h, (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role)))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QTransposeProxyModel) Index3(row int, column int, parent *QModelIndex) *QModelIndex {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QTransposeProxyModel_Index3(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
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTransposeProxyModel) InsertRows3(row int, count int, parent *QModelIndex) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QTransposeProxyModel_InsertRows3(this.h, (C.int)(row), (C.int)(count), parent.cPointer()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTransposeProxyModel) RemoveRows3(row int, count int, parent *QModelIndex) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QTransposeProxyModel_RemoveRows3(this.h, (C.int)(row), (C.int)(count), parent.cPointer()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTransposeProxyModel) InsertColumns3(column int, count int, parent *QModelIndex) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QTransposeProxyModel_InsertColumns3(this.h, (C.int)(column), (C.int)(count), parent.cPointer()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTransposeProxyModel) RemoveColumns3(column int, count int, parent *QModelIndex) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QTransposeProxyModel_RemoveColumns3(this.h, (C.int)(column), (C.int)(count), parent.cPointer()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QTransposeProxyModel) Sort2(column int, order SortOrder) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QTransposeProxyModel_Sort2(this.h, (C.int)(column), (C.int)(order))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Delete this object from C++ memory.
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QTransposeProxyModel) Delete() {
|
|
|
|
C.QTransposeProxyModel_Delete(this.h)
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
|
|
|
// from C++ memory once it is unreachable from Go memory.
|
|
|
|
func (this *QTransposeProxyModel) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QTransposeProxyModel) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|