mirror of
https://github.com/mappu/miqt.git
synced 2025-02-01 19:10:21 +00:00
1987 lines
78 KiB
Go
1987 lines
78 KiB
Go
package qt6
|
|
|
|
/*
|
|
|
|
#include "gen_qfilesystemmodel.h"
|
|
#include <stdlib.h>
|
|
|
|
*/
|
|
import "C"
|
|
|
|
import (
|
|
"runtime"
|
|
"runtime/cgo"
|
|
"unsafe"
|
|
)
|
|
|
|
type QFileSystemModel__Roles int
|
|
|
|
const (
|
|
QFileSystemModel__FileIconRole QFileSystemModel__Roles = 1
|
|
QFileSystemModel__FilePathRole QFileSystemModel__Roles = 257
|
|
QFileSystemModel__FileNameRole QFileSystemModel__Roles = 258
|
|
QFileSystemModel__FilePermissions QFileSystemModel__Roles = 259
|
|
)
|
|
|
|
type QFileSystemModel__Option int
|
|
|
|
const (
|
|
QFileSystemModel__DontWatchForChanges QFileSystemModel__Option = 1
|
|
QFileSystemModel__DontResolveSymlinks QFileSystemModel__Option = 2
|
|
QFileSystemModel__DontUseCustomDirectoryIcons QFileSystemModel__Option = 4
|
|
)
|
|
|
|
type QFileSystemModel struct {
|
|
h *C.QFileSystemModel
|
|
*QAbstractItemModel
|
|
}
|
|
|
|
func (this *QFileSystemModel) cPointer() *C.QFileSystemModel {
|
|
if this == nil {
|
|
return nil
|
|
}
|
|
return this.h
|
|
}
|
|
|
|
func (this *QFileSystemModel) UnsafePointer() unsafe.Pointer {
|
|
if this == nil {
|
|
return nil
|
|
}
|
|
return unsafe.Pointer(this.h)
|
|
}
|
|
|
|
// newQFileSystemModel constructs the type using only CGO pointers.
|
|
func newQFileSystemModel(h *C.QFileSystemModel) *QFileSystemModel {
|
|
if h == nil {
|
|
return nil
|
|
}
|
|
var outptr_QAbstractItemModel *C.QAbstractItemModel = nil
|
|
C.QFileSystemModel_virtbase(h, &outptr_QAbstractItemModel)
|
|
|
|
return &QFileSystemModel{h: h,
|
|
QAbstractItemModel: newQAbstractItemModel(outptr_QAbstractItemModel)}
|
|
}
|
|
|
|
// UnsafeNewQFileSystemModel constructs the type using only unsafe pointers.
|
|
func UnsafeNewQFileSystemModel(h unsafe.Pointer) *QFileSystemModel {
|
|
return newQFileSystemModel((*C.QFileSystemModel)(h))
|
|
}
|
|
|
|
// NewQFileSystemModel constructs a new QFileSystemModel object.
|
|
func NewQFileSystemModel() *QFileSystemModel {
|
|
|
|
return newQFileSystemModel(C.QFileSystemModel_new())
|
|
}
|
|
|
|
// NewQFileSystemModel2 constructs a new QFileSystemModel object.
|
|
func NewQFileSystemModel2(parent *QObject) *QFileSystemModel {
|
|
|
|
return newQFileSystemModel(C.QFileSystemModel_new2(parent.cPointer()))
|
|
}
|
|
|
|
func (this *QFileSystemModel) MetaObject() *QMetaObject {
|
|
return newQMetaObject(C.QFileSystemModel_metaObject(this.h))
|
|
}
|
|
|
|
func (this *QFileSystemModel) Metacast(param1 string) unsafe.Pointer {
|
|
param1_Cstring := C.CString(param1)
|
|
defer C.free(unsafe.Pointer(param1_Cstring))
|
|
return (unsafe.Pointer)(C.QFileSystemModel_metacast(this.h, param1_Cstring))
|
|
}
|
|
|
|
func QFileSystemModel_Tr(s string) string {
|
|
s_Cstring := C.CString(s)
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
|
var _ms C.struct_miqt_string = C.QFileSystemModel_tr(s_Cstring)
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
C.free(unsafe.Pointer(_ms.data))
|
|
return _ret
|
|
}
|
|
|
|
func (this *QFileSystemModel) RootPathChanged(newPath string) {
|
|
newPath_ms := C.struct_miqt_string{}
|
|
newPath_ms.data = C.CString(newPath)
|
|
newPath_ms.len = C.size_t(len(newPath))
|
|
defer C.free(unsafe.Pointer(newPath_ms.data))
|
|
C.QFileSystemModel_rootPathChanged(this.h, newPath_ms)
|
|
}
|
|
func (this *QFileSystemModel) OnRootPathChanged(slot func(newPath string)) {
|
|
C.QFileSystemModel_connect_rootPathChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_rootPathChanged
|
|
func miqt_exec_callback_QFileSystemModel_rootPathChanged(cb C.intptr_t, newPath C.struct_miqt_string) {
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(newPath string))
|
|
if !ok {
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
}
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
var newPath_ms C.struct_miqt_string = newPath
|
|
newPath_ret := C.GoStringN(newPath_ms.data, C.int(int64(newPath_ms.len)))
|
|
C.free(unsafe.Pointer(newPath_ms.data))
|
|
slotval1 := newPath_ret
|
|
|
|
gofunc(slotval1)
|
|
}
|
|
|
|
func (this *QFileSystemModel) FileRenamed(path string, oldName string, newName string) {
|
|
path_ms := C.struct_miqt_string{}
|
|
path_ms.data = C.CString(path)
|
|
path_ms.len = C.size_t(len(path))
|
|
defer C.free(unsafe.Pointer(path_ms.data))
|
|
oldName_ms := C.struct_miqt_string{}
|
|
oldName_ms.data = C.CString(oldName)
|
|
oldName_ms.len = C.size_t(len(oldName))
|
|
defer C.free(unsafe.Pointer(oldName_ms.data))
|
|
newName_ms := C.struct_miqt_string{}
|
|
newName_ms.data = C.CString(newName)
|
|
newName_ms.len = C.size_t(len(newName))
|
|
defer C.free(unsafe.Pointer(newName_ms.data))
|
|
C.QFileSystemModel_fileRenamed(this.h, path_ms, oldName_ms, newName_ms)
|
|
}
|
|
func (this *QFileSystemModel) OnFileRenamed(slot func(path string, oldName string, newName string)) {
|
|
C.QFileSystemModel_connect_fileRenamed(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_fileRenamed
|
|
func miqt_exec_callback_QFileSystemModel_fileRenamed(cb C.intptr_t, path C.struct_miqt_string, oldName C.struct_miqt_string, newName C.struct_miqt_string) {
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(path string, oldName string, newName string))
|
|
if !ok {
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
}
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
var path_ms C.struct_miqt_string = path
|
|
path_ret := C.GoStringN(path_ms.data, C.int(int64(path_ms.len)))
|
|
C.free(unsafe.Pointer(path_ms.data))
|
|
slotval1 := path_ret
|
|
var oldName_ms C.struct_miqt_string = oldName
|
|
oldName_ret := C.GoStringN(oldName_ms.data, C.int(int64(oldName_ms.len)))
|
|
C.free(unsafe.Pointer(oldName_ms.data))
|
|
slotval2 := oldName_ret
|
|
var newName_ms C.struct_miqt_string = newName
|
|
newName_ret := C.GoStringN(newName_ms.data, C.int(int64(newName_ms.len)))
|
|
C.free(unsafe.Pointer(newName_ms.data))
|
|
slotval3 := newName_ret
|
|
|
|
gofunc(slotval1, slotval2, slotval3)
|
|
}
|
|
|
|
func (this *QFileSystemModel) DirectoryLoaded(path string) {
|
|
path_ms := C.struct_miqt_string{}
|
|
path_ms.data = C.CString(path)
|
|
path_ms.len = C.size_t(len(path))
|
|
defer C.free(unsafe.Pointer(path_ms.data))
|
|
C.QFileSystemModel_directoryLoaded(this.h, path_ms)
|
|
}
|
|
func (this *QFileSystemModel) OnDirectoryLoaded(slot func(path string)) {
|
|
C.QFileSystemModel_connect_directoryLoaded(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_directoryLoaded
|
|
func miqt_exec_callback_QFileSystemModel_directoryLoaded(cb C.intptr_t, path C.struct_miqt_string) {
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(path string))
|
|
if !ok {
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
}
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
var path_ms C.struct_miqt_string = path
|
|
path_ret := C.GoStringN(path_ms.data, C.int(int64(path_ms.len)))
|
|
C.free(unsafe.Pointer(path_ms.data))
|
|
slotval1 := path_ret
|
|
|
|
gofunc(slotval1)
|
|
}
|
|
|
|
func (this *QFileSystemModel) Index(row int, column int, parent *QModelIndex) *QModelIndex {
|
|
_goptr := newQModelIndex(C.QFileSystemModel_index(this.h, (C.int)(row), (C.int)(column), parent.cPointer()))
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
return _goptr
|
|
}
|
|
|
|
func (this *QFileSystemModel) IndexWithPath(path string) *QModelIndex {
|
|
path_ms := C.struct_miqt_string{}
|
|
path_ms.data = C.CString(path)
|
|
path_ms.len = C.size_t(len(path))
|
|
defer C.free(unsafe.Pointer(path_ms.data))
|
|
_goptr := newQModelIndex(C.QFileSystemModel_indexWithPath(this.h, path_ms))
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
return _goptr
|
|
}
|
|
|
|
func (this *QFileSystemModel) Parent(child *QModelIndex) *QModelIndex {
|
|
_goptr := newQModelIndex(C.QFileSystemModel_parent(this.h, child.cPointer()))
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
return _goptr
|
|
}
|
|
|
|
func (this *QFileSystemModel) Sibling(row int, column int, idx *QModelIndex) *QModelIndex {
|
|
_goptr := newQModelIndex(C.QFileSystemModel_sibling(this.h, (C.int)(row), (C.int)(column), idx.cPointer()))
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
return _goptr
|
|
}
|
|
|
|
func (this *QFileSystemModel) HasChildren(parent *QModelIndex) bool {
|
|
return (bool)(C.QFileSystemModel_hasChildren(this.h, parent.cPointer()))
|
|
}
|
|
|
|
func (this *QFileSystemModel) CanFetchMore(parent *QModelIndex) bool {
|
|
return (bool)(C.QFileSystemModel_canFetchMore(this.h, parent.cPointer()))
|
|
}
|
|
|
|
func (this *QFileSystemModel) FetchMore(parent *QModelIndex) {
|
|
C.QFileSystemModel_fetchMore(this.h, parent.cPointer())
|
|
}
|
|
|
|
func (this *QFileSystemModel) RowCount(parent *QModelIndex) int {
|
|
return (int)(C.QFileSystemModel_rowCount(this.h, parent.cPointer()))
|
|
}
|
|
|
|
func (this *QFileSystemModel) ColumnCount(parent *QModelIndex) int {
|
|
return (int)(C.QFileSystemModel_columnCount(this.h, parent.cPointer()))
|
|
}
|
|
|
|
func (this *QFileSystemModel) MyComputer() *QVariant {
|
|
_goptr := newQVariant(C.QFileSystemModel_myComputer(this.h))
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
return _goptr
|
|
}
|
|
|
|
func (this *QFileSystemModel) Data(index *QModelIndex, role int) *QVariant {
|
|
_goptr := newQVariant(C.QFileSystemModel_data(this.h, index.cPointer(), (C.int)(role)))
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
return _goptr
|
|
}
|
|
|
|
func (this *QFileSystemModel) SetData(index *QModelIndex, value *QVariant, role int) bool {
|
|
return (bool)(C.QFileSystemModel_setData(this.h, index.cPointer(), value.cPointer(), (C.int)(role)))
|
|
}
|
|
|
|
func (this *QFileSystemModel) HeaderData(section int, orientation Orientation, role int) *QVariant {
|
|
_goptr := newQVariant(C.QFileSystemModel_headerData(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)))
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
return _goptr
|
|
}
|
|
|
|
func (this *QFileSystemModel) Flags(index *QModelIndex) ItemFlag {
|
|
return (ItemFlag)(C.QFileSystemModel_flags(this.h, index.cPointer()))
|
|
}
|
|
|
|
func (this *QFileSystemModel) Sort(column int, order SortOrder) {
|
|
C.QFileSystemModel_sort(this.h, (C.int)(column), (C.int)(order))
|
|
}
|
|
|
|
func (this *QFileSystemModel) MimeTypes() []string {
|
|
var _ma C.struct_miqt_array = C.QFileSystemModel_mimeTypes(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 *QFileSystemModel) 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 newQMimeData(C.QFileSystemModel_mimeData(this.h, indexes_ma))
|
|
}
|
|
|
|
func (this *QFileSystemModel) DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool {
|
|
return (bool)(C.QFileSystemModel_dropMimeData(this.h, data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer()))
|
|
}
|
|
|
|
func (this *QFileSystemModel) SupportedDropActions() DropAction {
|
|
return (DropAction)(C.QFileSystemModel_supportedDropActions(this.h))
|
|
}
|
|
|
|
func (this *QFileSystemModel) RoleNames() map[int][]byte {
|
|
var _mm C.struct_miqt_map = C.QFileSystemModel_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
|
|
}
|
|
|
|
func (this *QFileSystemModel) SetRootPath(path string) *QModelIndex {
|
|
path_ms := C.struct_miqt_string{}
|
|
path_ms.data = C.CString(path)
|
|
path_ms.len = C.size_t(len(path))
|
|
defer C.free(unsafe.Pointer(path_ms.data))
|
|
_goptr := newQModelIndex(C.QFileSystemModel_setRootPath(this.h, path_ms))
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
return _goptr
|
|
}
|
|
|
|
func (this *QFileSystemModel) RootPath() string {
|
|
var _ms C.struct_miqt_string = C.QFileSystemModel_rootPath(this.h)
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
C.free(unsafe.Pointer(_ms.data))
|
|
return _ret
|
|
}
|
|
|
|
func (this *QFileSystemModel) RootDirectory() *QDir {
|
|
_goptr := newQDir(C.QFileSystemModel_rootDirectory(this.h))
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
return _goptr
|
|
}
|
|
|
|
func (this *QFileSystemModel) SetIconProvider(provider *QAbstractFileIconProvider) {
|
|
C.QFileSystemModel_setIconProvider(this.h, provider.cPointer())
|
|
}
|
|
|
|
func (this *QFileSystemModel) IconProvider() *QAbstractFileIconProvider {
|
|
return newQAbstractFileIconProvider(C.QFileSystemModel_iconProvider(this.h))
|
|
}
|
|
|
|
func (this *QFileSystemModel) SetFilter(filters QDir__Filter) {
|
|
C.QFileSystemModel_setFilter(this.h, (C.int)(filters))
|
|
}
|
|
|
|
func (this *QFileSystemModel) Filter() QDir__Filter {
|
|
return (QDir__Filter)(C.QFileSystemModel_filter(this.h))
|
|
}
|
|
|
|
func (this *QFileSystemModel) SetResolveSymlinks(enable bool) {
|
|
C.QFileSystemModel_setResolveSymlinks(this.h, (C.bool)(enable))
|
|
}
|
|
|
|
func (this *QFileSystemModel) ResolveSymlinks() bool {
|
|
return (bool)(C.QFileSystemModel_resolveSymlinks(this.h))
|
|
}
|
|
|
|
func (this *QFileSystemModel) SetReadOnly(enable bool) {
|
|
C.QFileSystemModel_setReadOnly(this.h, (C.bool)(enable))
|
|
}
|
|
|
|
func (this *QFileSystemModel) IsReadOnly() bool {
|
|
return (bool)(C.QFileSystemModel_isReadOnly(this.h))
|
|
}
|
|
|
|
func (this *QFileSystemModel) SetNameFilterDisables(enable bool) {
|
|
C.QFileSystemModel_setNameFilterDisables(this.h, (C.bool)(enable))
|
|
}
|
|
|
|
func (this *QFileSystemModel) NameFilterDisables() bool {
|
|
return (bool)(C.QFileSystemModel_nameFilterDisables(this.h))
|
|
}
|
|
|
|
func (this *QFileSystemModel) SetNameFilters(filters []string) {
|
|
filters_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(filters))))
|
|
defer C.free(unsafe.Pointer(filters_CArray))
|
|
for i := range filters {
|
|
filters_i_ms := C.struct_miqt_string{}
|
|
filters_i_ms.data = C.CString(filters[i])
|
|
filters_i_ms.len = C.size_t(len(filters[i]))
|
|
defer C.free(unsafe.Pointer(filters_i_ms.data))
|
|
filters_CArray[i] = filters_i_ms
|
|
}
|
|
filters_ma := C.struct_miqt_array{len: C.size_t(len(filters)), data: unsafe.Pointer(filters_CArray)}
|
|
C.QFileSystemModel_setNameFilters(this.h, filters_ma)
|
|
}
|
|
|
|
func (this *QFileSystemModel) NameFilters() []string {
|
|
var _ma C.struct_miqt_array = C.QFileSystemModel_nameFilters(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 *QFileSystemModel) SetOption(option QFileSystemModel__Option) {
|
|
C.QFileSystemModel_setOption(this.h, (C.int)(option))
|
|
}
|
|
|
|
func (this *QFileSystemModel) TestOption(option QFileSystemModel__Option) bool {
|
|
return (bool)(C.QFileSystemModel_testOption(this.h, (C.int)(option)))
|
|
}
|
|
|
|
func (this *QFileSystemModel) SetOptions(options QFileSystemModel__Option) {
|
|
C.QFileSystemModel_setOptions(this.h, (C.int)(options))
|
|
}
|
|
|
|
func (this *QFileSystemModel) Options() QFileSystemModel__Option {
|
|
return (QFileSystemModel__Option)(C.QFileSystemModel_options(this.h))
|
|
}
|
|
|
|
func (this *QFileSystemModel) FilePath(index *QModelIndex) string {
|
|
var _ms C.struct_miqt_string = C.QFileSystemModel_filePath(this.h, index.cPointer())
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
C.free(unsafe.Pointer(_ms.data))
|
|
return _ret
|
|
}
|
|
|
|
func (this *QFileSystemModel) IsDir(index *QModelIndex) bool {
|
|
return (bool)(C.QFileSystemModel_isDir(this.h, index.cPointer()))
|
|
}
|
|
|
|
func (this *QFileSystemModel) Size(index *QModelIndex) int64 {
|
|
return (int64)(C.QFileSystemModel_size(this.h, index.cPointer()))
|
|
}
|
|
|
|
func (this *QFileSystemModel) Type(index *QModelIndex) string {
|
|
var _ms C.struct_miqt_string = C.QFileSystemModel_type(this.h, index.cPointer())
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
C.free(unsafe.Pointer(_ms.data))
|
|
return _ret
|
|
}
|
|
|
|
func (this *QFileSystemModel) LastModified(index *QModelIndex) *QDateTime {
|
|
_goptr := newQDateTime(C.QFileSystemModel_lastModified(this.h, index.cPointer()))
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
return _goptr
|
|
}
|
|
|
|
func (this *QFileSystemModel) Mkdir(parent *QModelIndex, name string) *QModelIndex {
|
|
name_ms := C.struct_miqt_string{}
|
|
name_ms.data = C.CString(name)
|
|
name_ms.len = C.size_t(len(name))
|
|
defer C.free(unsafe.Pointer(name_ms.data))
|
|
_goptr := newQModelIndex(C.QFileSystemModel_mkdir(this.h, parent.cPointer(), name_ms))
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
return _goptr
|
|
}
|
|
|
|
func (this *QFileSystemModel) Rmdir(index *QModelIndex) bool {
|
|
return (bool)(C.QFileSystemModel_rmdir(this.h, index.cPointer()))
|
|
}
|
|
|
|
func (this *QFileSystemModel) FileName(index *QModelIndex) string {
|
|
var _ms C.struct_miqt_string = C.QFileSystemModel_fileName(this.h, index.cPointer())
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
C.free(unsafe.Pointer(_ms.data))
|
|
return _ret
|
|
}
|
|
|
|
func (this *QFileSystemModel) FileIcon(index *QModelIndex) *QIcon {
|
|
_goptr := newQIcon(C.QFileSystemModel_fileIcon(this.h, index.cPointer()))
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
return _goptr
|
|
}
|
|
|
|
func (this *QFileSystemModel) Permissions(index *QModelIndex) QFileDevice__Permission {
|
|
return (QFileDevice__Permission)(C.QFileSystemModel_permissions(this.h, index.cPointer()))
|
|
}
|
|
|
|
func (this *QFileSystemModel) FileInfo(index *QModelIndex) *QFileInfo {
|
|
_goptr := newQFileInfo(C.QFileSystemModel_fileInfo(this.h, index.cPointer()))
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
return _goptr
|
|
}
|
|
|
|
func (this *QFileSystemModel) Remove(index *QModelIndex) bool {
|
|
return (bool)(C.QFileSystemModel_remove(this.h, index.cPointer()))
|
|
}
|
|
|
|
func QFileSystemModel_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.QFileSystemModel_tr2(s_Cstring, c_Cstring)
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
C.free(unsafe.Pointer(_ms.data))
|
|
return _ret
|
|
}
|
|
|
|
func QFileSystemModel_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.QFileSystemModel_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 *QFileSystemModel) Index2(path string, column int) *QModelIndex {
|
|
path_ms := C.struct_miqt_string{}
|
|
path_ms.data = C.CString(path)
|
|
path_ms.len = C.size_t(len(path))
|
|
defer C.free(unsafe.Pointer(path_ms.data))
|
|
_goptr := newQModelIndex(C.QFileSystemModel_index2(this.h, path_ms, (C.int)(column)))
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
return _goptr
|
|
}
|
|
|
|
func (this *QFileSystemModel) MyComputer1(role int) *QVariant {
|
|
_goptr := newQVariant(C.QFileSystemModel_myComputer1(this.h, (C.int)(role)))
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
return _goptr
|
|
}
|
|
|
|
func (this *QFileSystemModel) SetOption2(option QFileSystemModel__Option, on bool) {
|
|
C.QFileSystemModel_setOption2(this.h, (C.int)(option), (C.bool)(on))
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_Index(row int, column int, parent *QModelIndex) *QModelIndex {
|
|
|
|
_goptr := newQModelIndex(C.QFileSystemModel_virtualbase_index(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), parent.cPointer()))
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
return _goptr
|
|
|
|
}
|
|
func (this *QFileSystemModel) Onindex(slot func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) {
|
|
ok := C.QFileSystemModel_override_virtual_index(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_index
|
|
func miqt_exec_callback_QFileSystemModel_index(self *C.QFileSystemModel, 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 := newQModelIndex(parent)
|
|
|
|
virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_Index, slotval1, slotval2, slotval3)
|
|
|
|
return virtualReturn.cPointer()
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_Parent(child *QModelIndex) *QModelIndex {
|
|
|
|
_goptr := newQModelIndex(C.QFileSystemModel_virtualbase_parent(unsafe.Pointer(this.h), child.cPointer()))
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
return _goptr
|
|
|
|
}
|
|
func (this *QFileSystemModel) Onparent(slot func(super func(child *QModelIndex) *QModelIndex, child *QModelIndex) *QModelIndex) {
|
|
ok := C.QFileSystemModel_override_virtual_parent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_parent
|
|
func miqt_exec_callback_QFileSystemModel_parent(self *C.QFileSystemModel, 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 := newQModelIndex(child)
|
|
|
|
virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_Parent, slotval1)
|
|
|
|
return virtualReturn.cPointer()
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_Sibling(row int, column int, idx *QModelIndex) *QModelIndex {
|
|
|
|
_goptr := newQModelIndex(C.QFileSystemModel_virtualbase_sibling(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), idx.cPointer()))
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
return _goptr
|
|
|
|
}
|
|
func (this *QFileSystemModel) Onsibling(slot func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) {
|
|
ok := C.QFileSystemModel_override_virtual_sibling(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_sibling
|
|
func miqt_exec_callback_QFileSystemModel_sibling(self *C.QFileSystemModel, 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 := newQModelIndex(idx)
|
|
|
|
virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_Sibling, slotval1, slotval2, slotval3)
|
|
|
|
return virtualReturn.cPointer()
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_HasChildren(parent *QModelIndex) bool {
|
|
|
|
return (bool)(C.QFileSystemModel_virtualbase_hasChildren(unsafe.Pointer(this.h), parent.cPointer()))
|
|
|
|
}
|
|
func (this *QFileSystemModel) OnhasChildren(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) {
|
|
ok := C.QFileSystemModel_override_virtual_hasChildren(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_hasChildren
|
|
func miqt_exec_callback_QFileSystemModel_hasChildren(self *C.QFileSystemModel, 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 := newQModelIndex(parent)
|
|
|
|
virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_HasChildren, slotval1)
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_CanFetchMore(parent *QModelIndex) bool {
|
|
|
|
return (bool)(C.QFileSystemModel_virtualbase_canFetchMore(unsafe.Pointer(this.h), parent.cPointer()))
|
|
|
|
}
|
|
func (this *QFileSystemModel) OncanFetchMore(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) {
|
|
ok := C.QFileSystemModel_override_virtual_canFetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_canFetchMore
|
|
func miqt_exec_callback_QFileSystemModel_canFetchMore(self *C.QFileSystemModel, 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 := newQModelIndex(parent)
|
|
|
|
virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_CanFetchMore, slotval1)
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_FetchMore(parent *QModelIndex) {
|
|
|
|
C.QFileSystemModel_virtualbase_fetchMore(unsafe.Pointer(this.h), parent.cPointer())
|
|
|
|
}
|
|
func (this *QFileSystemModel) OnfetchMore(slot func(super func(parent *QModelIndex), parent *QModelIndex)) {
|
|
ok := C.QFileSystemModel_override_virtual_fetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_fetchMore
|
|
func miqt_exec_callback_QFileSystemModel_fetchMore(self *C.QFileSystemModel, 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 := newQModelIndex(parent)
|
|
|
|
gofunc((&QFileSystemModel{h: self}).callVirtualBase_FetchMore, slotval1)
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_RowCount(parent *QModelIndex) int {
|
|
|
|
return (int)(C.QFileSystemModel_virtualbase_rowCount(unsafe.Pointer(this.h), parent.cPointer()))
|
|
|
|
}
|
|
func (this *QFileSystemModel) OnrowCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) {
|
|
ok := C.QFileSystemModel_override_virtual_rowCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_rowCount
|
|
func miqt_exec_callback_QFileSystemModel_rowCount(self *C.QFileSystemModel, 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 := newQModelIndex(parent)
|
|
|
|
virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_RowCount, slotval1)
|
|
|
|
return (C.int)(virtualReturn)
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_ColumnCount(parent *QModelIndex) int {
|
|
|
|
return (int)(C.QFileSystemModel_virtualbase_columnCount(unsafe.Pointer(this.h), parent.cPointer()))
|
|
|
|
}
|
|
func (this *QFileSystemModel) OncolumnCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) {
|
|
ok := C.QFileSystemModel_override_virtual_columnCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_columnCount
|
|
func miqt_exec_callback_QFileSystemModel_columnCount(self *C.QFileSystemModel, 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 := newQModelIndex(parent)
|
|
|
|
virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_ColumnCount, slotval1)
|
|
|
|
return (C.int)(virtualReturn)
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_Data(index *QModelIndex, role int) *QVariant {
|
|
|
|
_goptr := newQVariant(C.QFileSystemModel_virtualbase_data(unsafe.Pointer(this.h), index.cPointer(), (C.int)(role)))
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
return _goptr
|
|
|
|
}
|
|
func (this *QFileSystemModel) Ondata(slot func(super func(index *QModelIndex, role int) *QVariant, index *QModelIndex, role int) *QVariant) {
|
|
ok := C.QFileSystemModel_override_virtual_data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_data
|
|
func miqt_exec_callback_QFileSystemModel_data(self *C.QFileSystemModel, 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 := newQModelIndex(index)
|
|
|
|
slotval2 := (int)(role)
|
|
|
|
virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_Data, slotval1, slotval2)
|
|
|
|
return virtualReturn.cPointer()
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_SetData(index *QModelIndex, value *QVariant, role int) bool {
|
|
|
|
return (bool)(C.QFileSystemModel_virtualbase_setData(unsafe.Pointer(this.h), index.cPointer(), value.cPointer(), (C.int)(role)))
|
|
|
|
}
|
|
func (this *QFileSystemModel) OnsetData(slot func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) {
|
|
ok := C.QFileSystemModel_override_virtual_setData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_setData
|
|
func miqt_exec_callback_QFileSystemModel_setData(self *C.QFileSystemModel, 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 := newQModelIndex(index)
|
|
|
|
slotval2 := newQVariant(value)
|
|
|
|
slotval3 := (int)(role)
|
|
|
|
virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_SetData, slotval1, slotval2, slotval3)
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_HeaderData(section int, orientation Orientation, role int) *QVariant {
|
|
|
|
_goptr := newQVariant(C.QFileSystemModel_virtualbase_headerData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), (C.int)(role)))
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
return _goptr
|
|
|
|
}
|
|
func (this *QFileSystemModel) OnheaderData(slot func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) {
|
|
ok := C.QFileSystemModel_override_virtual_headerData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_headerData
|
|
func miqt_exec_callback_QFileSystemModel_headerData(self *C.QFileSystemModel, 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((&QFileSystemModel{h: self}).callVirtualBase_HeaderData, slotval1, slotval2, slotval3)
|
|
|
|
return virtualReturn.cPointer()
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_Flags(index *QModelIndex) ItemFlag {
|
|
|
|
return (ItemFlag)(C.QFileSystemModel_virtualbase_flags(unsafe.Pointer(this.h), index.cPointer()))
|
|
|
|
}
|
|
func (this *QFileSystemModel) Onflags(slot func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) {
|
|
ok := C.QFileSystemModel_override_virtual_flags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_flags
|
|
func miqt_exec_callback_QFileSystemModel_flags(self *C.QFileSystemModel, 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 := newQModelIndex(index)
|
|
|
|
virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_Flags, slotval1)
|
|
|
|
return (C.int)(virtualReturn)
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_Sort(column int, order SortOrder) {
|
|
|
|
C.QFileSystemModel_virtualbase_sort(unsafe.Pointer(this.h), (C.int)(column), (C.int)(order))
|
|
|
|
}
|
|
func (this *QFileSystemModel) Onsort(slot func(super func(column int, order SortOrder), column int, order SortOrder)) {
|
|
ok := C.QFileSystemModel_override_virtual_sort(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_sort
|
|
func miqt_exec_callback_QFileSystemModel_sort(self *C.QFileSystemModel, 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((&QFileSystemModel{h: self}).callVirtualBase_Sort, slotval1, slotval2)
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_MimeTypes() []string {
|
|
|
|
var _ma C.struct_miqt_array = C.QFileSystemModel_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 *QFileSystemModel) OnmimeTypes(slot func(super func() []string) []string) {
|
|
ok := C.QFileSystemModel_override_virtual_mimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_mimeTypes
|
|
func miqt_exec_callback_QFileSystemModel_mimeTypes(self *C.QFileSystemModel, 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((&QFileSystemModel{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 *QFileSystemModel) 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 newQMimeData(C.QFileSystemModel_virtualbase_mimeData(unsafe.Pointer(this.h), indexes_ma))
|
|
|
|
}
|
|
func (this *QFileSystemModel) OnmimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) {
|
|
ok := C.QFileSystemModel_override_virtual_mimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_mimeData
|
|
func miqt_exec_callback_QFileSystemModel_mimeData(self *C.QFileSystemModel, 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_goptr := newQModelIndex(indexes_outCast[i])
|
|
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((&QFileSystemModel{h: self}).callVirtualBase_MimeData, slotval1)
|
|
|
|
return virtualReturn.cPointer()
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool {
|
|
|
|
return (bool)(C.QFileSystemModel_virtualbase_dropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer()))
|
|
|
|
}
|
|
func (this *QFileSystemModel) 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) {
|
|
ok := C.QFileSystemModel_override_virtual_dropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_dropMimeData
|
|
func miqt_exec_callback_QFileSystemModel_dropMimeData(self *C.QFileSystemModel, 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 := newQMimeData(data)
|
|
|
|
slotval2 := (DropAction)(action)
|
|
|
|
slotval3 := (int)(row)
|
|
|
|
slotval4 := (int)(column)
|
|
|
|
slotval5 := newQModelIndex(parent)
|
|
|
|
virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5)
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_SupportedDropActions() DropAction {
|
|
|
|
return (DropAction)(C.QFileSystemModel_virtualbase_supportedDropActions(unsafe.Pointer(this.h)))
|
|
|
|
}
|
|
func (this *QFileSystemModel) OnsupportedDropActions(slot func(super func() DropAction) DropAction) {
|
|
ok := C.QFileSystemModel_override_virtual_supportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_supportedDropActions
|
|
func miqt_exec_callback_QFileSystemModel_supportedDropActions(self *C.QFileSystemModel, 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((&QFileSystemModel{h: self}).callVirtualBase_SupportedDropActions)
|
|
|
|
return (C.int)(virtualReturn)
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_RoleNames() map[int][]byte {
|
|
|
|
var _mm C.struct_miqt_map = C.QFileSystemModel_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 *QFileSystemModel) OnroleNames(slot func(super func() map[int][]byte) map[int][]byte) {
|
|
ok := C.QFileSystemModel_override_virtual_roleNames(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_roleNames
|
|
func miqt_exec_callback_QFileSystemModel_roleNames(self *C.QFileSystemModel, 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((&QFileSystemModel{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{}
|
|
if len(virtualReturn_v) > 0 {
|
|
virtualReturn_v_alias.data = (*C.char)(unsafe.Pointer(&virtualReturn_v[0]))
|
|
} else {
|
|
virtualReturn_v_alias.data = (*C.char)(unsafe.Pointer(nil))
|
|
}
|
|
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 *QFileSystemModel) callVirtualBase_TimerEvent(event *QTimerEvent) {
|
|
|
|
C.QFileSystemModel_virtualbase_timerEvent(unsafe.Pointer(this.h), event.cPointer())
|
|
|
|
}
|
|
func (this *QFileSystemModel) OntimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) {
|
|
ok := C.QFileSystemModel_override_virtual_timerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_timerEvent
|
|
func miqt_exec_callback_QFileSystemModel_timerEvent(self *C.QFileSystemModel, cb C.intptr_t, event *C.QTimerEvent) {
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent))
|
|
if !ok {
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
}
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
slotval1 := newQTimerEvent(event)
|
|
|
|
gofunc((&QFileSystemModel{h: self}).callVirtualBase_TimerEvent, slotval1)
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_Event(event *QEvent) bool {
|
|
|
|
return (bool)(C.QFileSystemModel_virtualbase_event(unsafe.Pointer(this.h), event.cPointer()))
|
|
|
|
}
|
|
func (this *QFileSystemModel) Onevent(slot func(super func(event *QEvent) bool, event *QEvent) bool) {
|
|
ok := C.QFileSystemModel_override_virtual_event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_event
|
|
func miqt_exec_callback_QFileSystemModel_event(self *C.QFileSystemModel, cb C.intptr_t, event *C.QEvent) C.bool {
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool)
|
|
if !ok {
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
}
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
slotval1 := newQEvent(event)
|
|
|
|
virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_Event, slotval1)
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool {
|
|
|
|
return (bool)(C.QFileSystemModel_virtualbase_setHeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role)))
|
|
|
|
}
|
|
func (this *QFileSystemModel) OnsetHeaderData(slot func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) {
|
|
ok := C.QFileSystemModel_override_virtual_setHeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_setHeaderData
|
|
func miqt_exec_callback_QFileSystemModel_setHeaderData(self *C.QFileSystemModel, 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 := newQVariant(value)
|
|
|
|
slotval4 := (int)(role)
|
|
|
|
virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_SetHeaderData, slotval1, slotval2, slotval3, slotval4)
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_ItemData(index *QModelIndex) map[int]QVariant {
|
|
|
|
var _mm C.struct_miqt_map = C.QFileSystemModel_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_goptr := newQVariant(_Values[i])
|
|
_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 *QFileSystemModel) OnitemData(slot func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) {
|
|
ok := C.QFileSystemModel_override_virtual_itemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_itemData
|
|
func miqt_exec_callback_QFileSystemModel_itemData(self *C.QFileSystemModel, 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 := newQModelIndex(index)
|
|
|
|
virtualReturn := gofunc((&QFileSystemModel{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 *QFileSystemModel) 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.QFileSystemModel_virtualbase_setItemData(unsafe.Pointer(this.h), index.cPointer(), roles_mm))
|
|
|
|
}
|
|
func (this *QFileSystemModel) OnsetItemData(slot func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) {
|
|
ok := C.QFileSystemModel_override_virtual_setItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_setItemData
|
|
func miqt_exec_callback_QFileSystemModel_setItemData(self *C.QFileSystemModel, 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 := newQModelIndex(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_goptr := newQVariant(roles_Values[i])
|
|
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((&QFileSystemModel{h: self}).callVirtualBase_SetItemData, slotval1, slotval2)
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_ClearItemData(index *QModelIndex) bool {
|
|
|
|
return (bool)(C.QFileSystemModel_virtualbase_clearItemData(unsafe.Pointer(this.h), index.cPointer()))
|
|
|
|
}
|
|
func (this *QFileSystemModel) OnclearItemData(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) {
|
|
ok := C.QFileSystemModel_override_virtual_clearItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_clearItemData
|
|
func miqt_exec_callback_QFileSystemModel_clearItemData(self *C.QFileSystemModel, 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 := newQModelIndex(index)
|
|
|
|
virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_ClearItemData, slotval1)
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool {
|
|
|
|
return (bool)(C.QFileSystemModel_virtualbase_canDropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer()))
|
|
|
|
}
|
|
func (this *QFileSystemModel) 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) {
|
|
ok := C.QFileSystemModel_override_virtual_canDropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_canDropMimeData
|
|
func miqt_exec_callback_QFileSystemModel_canDropMimeData(self *C.QFileSystemModel, 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 := newQMimeData(data)
|
|
|
|
slotval2 := (DropAction)(action)
|
|
|
|
slotval3 := (int)(row)
|
|
|
|
slotval4 := (int)(column)
|
|
|
|
slotval5 := newQModelIndex(parent)
|
|
|
|
virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_CanDropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5)
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_SupportedDragActions() DropAction {
|
|
|
|
return (DropAction)(C.QFileSystemModel_virtualbase_supportedDragActions(unsafe.Pointer(this.h)))
|
|
|
|
}
|
|
func (this *QFileSystemModel) OnsupportedDragActions(slot func(super func() DropAction) DropAction) {
|
|
ok := C.QFileSystemModel_override_virtual_supportedDragActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_supportedDragActions
|
|
func miqt_exec_callback_QFileSystemModel_supportedDragActions(self *C.QFileSystemModel, 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((&QFileSystemModel{h: self}).callVirtualBase_SupportedDragActions)
|
|
|
|
return (C.int)(virtualReturn)
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_InsertRows(row int, count int, parent *QModelIndex) bool {
|
|
|
|
return (bool)(C.QFileSystemModel_virtualbase_insertRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer()))
|
|
|
|
}
|
|
func (this *QFileSystemModel) OninsertRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) {
|
|
ok := C.QFileSystemModel_override_virtual_insertRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_insertRows
|
|
func miqt_exec_callback_QFileSystemModel_insertRows(self *C.QFileSystemModel, 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 := newQModelIndex(parent)
|
|
|
|
virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_InsertRows, slotval1, slotval2, slotval3)
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_InsertColumns(column int, count int, parent *QModelIndex) bool {
|
|
|
|
return (bool)(C.QFileSystemModel_virtualbase_insertColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer()))
|
|
|
|
}
|
|
func (this *QFileSystemModel) OninsertColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) {
|
|
ok := C.QFileSystemModel_override_virtual_insertColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_insertColumns
|
|
func miqt_exec_callback_QFileSystemModel_insertColumns(self *C.QFileSystemModel, 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 := newQModelIndex(parent)
|
|
|
|
virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_InsertColumns, slotval1, slotval2, slotval3)
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_RemoveRows(row int, count int, parent *QModelIndex) bool {
|
|
|
|
return (bool)(C.QFileSystemModel_virtualbase_removeRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer()))
|
|
|
|
}
|
|
func (this *QFileSystemModel) OnremoveRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) {
|
|
ok := C.QFileSystemModel_override_virtual_removeRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_removeRows
|
|
func miqt_exec_callback_QFileSystemModel_removeRows(self *C.QFileSystemModel, 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 := newQModelIndex(parent)
|
|
|
|
virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_RemoveRows, slotval1, slotval2, slotval3)
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_RemoveColumns(column int, count int, parent *QModelIndex) bool {
|
|
|
|
return (bool)(C.QFileSystemModel_virtualbase_removeColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer()))
|
|
|
|
}
|
|
func (this *QFileSystemModel) OnremoveColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) {
|
|
ok := C.QFileSystemModel_override_virtual_removeColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_removeColumns
|
|
func miqt_exec_callback_QFileSystemModel_removeColumns(self *C.QFileSystemModel, 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 := newQModelIndex(parent)
|
|
|
|
virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_RemoveColumns, slotval1, slotval2, slotval3)
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool {
|
|
|
|
return (bool)(C.QFileSystemModel_virtualbase_moveRows(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceRow), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild)))
|
|
|
|
}
|
|
func (this *QFileSystemModel) 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) {
|
|
ok := C.QFileSystemModel_override_virtual_moveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_moveRows
|
|
func miqt_exec_callback_QFileSystemModel_moveRows(self *C.QFileSystemModel, 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 := newQModelIndex(sourceParent)
|
|
|
|
slotval2 := (int)(sourceRow)
|
|
|
|
slotval3 := (int)(count)
|
|
|
|
slotval4 := newQModelIndex(destinationParent)
|
|
|
|
slotval5 := (int)(destinationChild)
|
|
|
|
virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_MoveRows, slotval1, slotval2, slotval3, slotval4, slotval5)
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_MoveColumns(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool {
|
|
|
|
return (bool)(C.QFileSystemModel_virtualbase_moveColumns(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceColumn), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild)))
|
|
|
|
}
|
|
func (this *QFileSystemModel) 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) {
|
|
ok := C.QFileSystemModel_override_virtual_moveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_moveColumns
|
|
func miqt_exec_callback_QFileSystemModel_moveColumns(self *C.QFileSystemModel, 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 := newQModelIndex(sourceParent)
|
|
|
|
slotval2 := (int)(sourceColumn)
|
|
|
|
slotval3 := (int)(count)
|
|
|
|
slotval4 := newQModelIndex(destinationParent)
|
|
|
|
slotval5 := (int)(destinationChild)
|
|
|
|
virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_MoveColumns, slotval1, slotval2, slotval3, slotval4, slotval5)
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_Buddy(index *QModelIndex) *QModelIndex {
|
|
|
|
_goptr := newQModelIndex(C.QFileSystemModel_virtualbase_buddy(unsafe.Pointer(this.h), index.cPointer()))
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
return _goptr
|
|
|
|
}
|
|
func (this *QFileSystemModel) Onbuddy(slot func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) {
|
|
ok := C.QFileSystemModel_override_virtual_buddy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_buddy
|
|
func miqt_exec_callback_QFileSystemModel_buddy(self *C.QFileSystemModel, 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 := newQModelIndex(index)
|
|
|
|
virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_Buddy, slotval1)
|
|
|
|
return virtualReturn.cPointer()
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_Match(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex {
|
|
|
|
var _ma C.struct_miqt_array = C.QFileSystemModel_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_goptr := newQModelIndex(_outCast[i])
|
|
_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
_ret[i] = *_lv_goptr
|
|
}
|
|
return _ret
|
|
|
|
}
|
|
func (this *QFileSystemModel) 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) {
|
|
ok := C.QFileSystemModel_override_virtual_match(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_match
|
|
func miqt_exec_callback_QFileSystemModel_match(self *C.QFileSystemModel, 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 := newQModelIndex(start)
|
|
|
|
slotval2 := (int)(role)
|
|
|
|
slotval3 := newQVariant(value)
|
|
|
|
slotval4 := (int)(hits)
|
|
|
|
slotval5 := (MatchFlag)(flags)
|
|
|
|
virtualReturn := gofunc((&QFileSystemModel{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 *QFileSystemModel) callVirtualBase_Span(index *QModelIndex) *QSize {
|
|
|
|
_goptr := newQSize(C.QFileSystemModel_virtualbase_span(unsafe.Pointer(this.h), index.cPointer()))
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
return _goptr
|
|
|
|
}
|
|
func (this *QFileSystemModel) Onspan(slot func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) {
|
|
ok := C.QFileSystemModel_override_virtual_span(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_span
|
|
func miqt_exec_callback_QFileSystemModel_span(self *C.QFileSystemModel, 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 := newQModelIndex(index)
|
|
|
|
virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_Span, slotval1)
|
|
|
|
return virtualReturn.cPointer()
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_MultiData(index *QModelIndex, roleDataSpan QModelRoleDataSpan) {
|
|
|
|
C.QFileSystemModel_virtualbase_multiData(unsafe.Pointer(this.h), index.cPointer(), roleDataSpan.cPointer())
|
|
|
|
}
|
|
func (this *QFileSystemModel) OnmultiData(slot func(super func(index *QModelIndex, roleDataSpan QModelRoleDataSpan), index *QModelIndex, roleDataSpan QModelRoleDataSpan)) {
|
|
ok := C.QFileSystemModel_override_virtual_multiData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_multiData
|
|
func miqt_exec_callback_QFileSystemModel_multiData(self *C.QFileSystemModel, 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 := newQModelIndex(index)
|
|
|
|
roleDataSpan_goptr := newQModelRoleDataSpan(roleDataSpan)
|
|
roleDataSpan_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
slotval2 := *roleDataSpan_goptr
|
|
|
|
gofunc((&QFileSystemModel{h: self}).callVirtualBase_MultiData, slotval1, slotval2)
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_Submit() bool {
|
|
|
|
return (bool)(C.QFileSystemModel_virtualbase_submit(unsafe.Pointer(this.h)))
|
|
|
|
}
|
|
func (this *QFileSystemModel) Onsubmit(slot func(super func() bool) bool) {
|
|
ok := C.QFileSystemModel_override_virtual_submit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_submit
|
|
func miqt_exec_callback_QFileSystemModel_submit(self *C.QFileSystemModel, 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((&QFileSystemModel{h: self}).callVirtualBase_Submit)
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_Revert() {
|
|
|
|
C.QFileSystemModel_virtualbase_revert(unsafe.Pointer(this.h))
|
|
|
|
}
|
|
func (this *QFileSystemModel) Onrevert(slot func(super func())) {
|
|
ok := C.QFileSystemModel_override_virtual_revert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_revert
|
|
func miqt_exec_callback_QFileSystemModel_revert(self *C.QFileSystemModel, 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((&QFileSystemModel{h: self}).callVirtualBase_Revert)
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_ResetInternalData() {
|
|
|
|
C.QFileSystemModel_virtualbase_resetInternalData(unsafe.Pointer(this.h))
|
|
|
|
}
|
|
func (this *QFileSystemModel) OnresetInternalData(slot func(super func())) {
|
|
ok := C.QFileSystemModel_override_virtual_resetInternalData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_resetInternalData
|
|
func miqt_exec_callback_QFileSystemModel_resetInternalData(self *C.QFileSystemModel, 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((&QFileSystemModel{h: self}).callVirtualBase_ResetInternalData)
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool {
|
|
|
|
return (bool)(C.QFileSystemModel_virtualbase_eventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer()))
|
|
|
|
}
|
|
func (this *QFileSystemModel) OneventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) {
|
|
ok := C.QFileSystemModel_override_virtual_eventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_eventFilter
|
|
func miqt_exec_callback_QFileSystemModel_eventFilter(self *C.QFileSystemModel, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool {
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool)
|
|
if !ok {
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
}
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
slotval1 := newQObject(watched)
|
|
|
|
slotval2 := newQEvent(event)
|
|
|
|
virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_EventFilter, slotval1, slotval2)
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_ChildEvent(event *QChildEvent) {
|
|
|
|
C.QFileSystemModel_virtualbase_childEvent(unsafe.Pointer(this.h), event.cPointer())
|
|
|
|
}
|
|
func (this *QFileSystemModel) OnchildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) {
|
|
ok := C.QFileSystemModel_override_virtual_childEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_childEvent
|
|
func miqt_exec_callback_QFileSystemModel_childEvent(self *C.QFileSystemModel, cb C.intptr_t, event *C.QChildEvent) {
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent))
|
|
if !ok {
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
}
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
slotval1 := newQChildEvent(event)
|
|
|
|
gofunc((&QFileSystemModel{h: self}).callVirtualBase_ChildEvent, slotval1)
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_CustomEvent(event *QEvent) {
|
|
|
|
C.QFileSystemModel_virtualbase_customEvent(unsafe.Pointer(this.h), event.cPointer())
|
|
|
|
}
|
|
func (this *QFileSystemModel) OncustomEvent(slot func(super func(event *QEvent), event *QEvent)) {
|
|
ok := C.QFileSystemModel_override_virtual_customEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_customEvent
|
|
func miqt_exec_callback_QFileSystemModel_customEvent(self *C.QFileSystemModel, cb C.intptr_t, event *C.QEvent) {
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent))
|
|
if !ok {
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
}
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
slotval1 := newQEvent(event)
|
|
|
|
gofunc((&QFileSystemModel{h: self}).callVirtualBase_CustomEvent, slotval1)
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_ConnectNotify(signal *QMetaMethod) {
|
|
|
|
C.QFileSystemModel_virtualbase_connectNotify(unsafe.Pointer(this.h), signal.cPointer())
|
|
|
|
}
|
|
func (this *QFileSystemModel) OnconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) {
|
|
ok := C.QFileSystemModel_override_virtual_connectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_connectNotify
|
|
func miqt_exec_callback_QFileSystemModel_connectNotify(self *C.QFileSystemModel, cb C.intptr_t, signal *C.QMetaMethod) {
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod))
|
|
if !ok {
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
}
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
slotval1 := newQMetaMethod(signal)
|
|
|
|
gofunc((&QFileSystemModel{h: self}).callVirtualBase_ConnectNotify, slotval1)
|
|
|
|
}
|
|
|
|
func (this *QFileSystemModel) callVirtualBase_DisconnectNotify(signal *QMetaMethod) {
|
|
|
|
C.QFileSystemModel_virtualbase_disconnectNotify(unsafe.Pointer(this.h), signal.cPointer())
|
|
|
|
}
|
|
func (this *QFileSystemModel) OndisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) {
|
|
ok := C.QFileSystemModel_override_virtual_disconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
if !ok {
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
}
|
|
}
|
|
|
|
//export miqt_exec_callback_QFileSystemModel_disconnectNotify
|
|
func miqt_exec_callback_QFileSystemModel_disconnectNotify(self *C.QFileSystemModel, cb C.intptr_t, signal *C.QMetaMethod) {
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod))
|
|
if !ok {
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
}
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
slotval1 := newQMetaMethod(signal)
|
|
|
|
gofunc((&QFileSystemModel{h: self}).callVirtualBase_DisconnectNotify, slotval1)
|
|
|
|
}
|
|
|
|
// Delete this object from C++ memory.
|
|
func (this *QFileSystemModel) Delete() {
|
|
C.QFileSystemModel_delete(this.h)
|
|
}
|
|
|
|
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
|
// from C++ memory once it is unreachable from Go memory.
|
|
func (this *QFileSystemModel) GoGC() {
|
|
runtime.SetFinalizer(this, func(this *QFileSystemModel) {
|
|
this.Delete()
|
|
runtime.KeepAlive(this.h)
|
|
})
|
|
}
|