2024-08-25 04:08:24 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qabstractitemview.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
"runtime/cgo"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
type QAbstractItemView__SelectionMode int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QAbstractItemView__NoSelection QAbstractItemView__SelectionMode = 0
|
|
|
|
QAbstractItemView__SingleSelection QAbstractItemView__SelectionMode = 1
|
|
|
|
QAbstractItemView__MultiSelection QAbstractItemView__SelectionMode = 2
|
|
|
|
QAbstractItemView__ExtendedSelection QAbstractItemView__SelectionMode = 3
|
|
|
|
QAbstractItemView__ContiguousSelection QAbstractItemView__SelectionMode = 4
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type QAbstractItemView__SelectionBehavior int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QAbstractItemView__SelectItems QAbstractItemView__SelectionBehavior = 0
|
|
|
|
QAbstractItemView__SelectRows QAbstractItemView__SelectionBehavior = 1
|
|
|
|
QAbstractItemView__SelectColumns QAbstractItemView__SelectionBehavior = 2
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type QAbstractItemView__ScrollHint int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QAbstractItemView__EnsureVisible QAbstractItemView__ScrollHint = 0
|
|
|
|
QAbstractItemView__PositionAtTop QAbstractItemView__ScrollHint = 1
|
|
|
|
QAbstractItemView__PositionAtBottom QAbstractItemView__ScrollHint = 2
|
|
|
|
QAbstractItemView__PositionAtCenter QAbstractItemView__ScrollHint = 3
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type QAbstractItemView__EditTrigger int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QAbstractItemView__NoEditTriggers QAbstractItemView__EditTrigger = 0
|
|
|
|
QAbstractItemView__CurrentChanged QAbstractItemView__EditTrigger = 1
|
|
|
|
QAbstractItemView__DoubleClicked QAbstractItemView__EditTrigger = 2
|
|
|
|
QAbstractItemView__SelectedClicked QAbstractItemView__EditTrigger = 4
|
|
|
|
QAbstractItemView__EditKeyPressed QAbstractItemView__EditTrigger = 8
|
|
|
|
QAbstractItemView__AnyKeyPressed QAbstractItemView__EditTrigger = 16
|
|
|
|
QAbstractItemView__AllEditTriggers QAbstractItemView__EditTrigger = 31
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type QAbstractItemView__ScrollMode int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QAbstractItemView__ScrollPerItem QAbstractItemView__ScrollMode = 0
|
|
|
|
QAbstractItemView__ScrollPerPixel QAbstractItemView__ScrollMode = 1
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type QAbstractItemView__DragDropMode int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QAbstractItemView__NoDragDrop QAbstractItemView__DragDropMode = 0
|
|
|
|
QAbstractItemView__DragOnly QAbstractItemView__DragDropMode = 1
|
|
|
|
QAbstractItemView__DropOnly QAbstractItemView__DragDropMode = 2
|
|
|
|
QAbstractItemView__DragDrop QAbstractItemView__DragDropMode = 3
|
|
|
|
QAbstractItemView__InternalMove QAbstractItemView__DragDropMode = 4
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
type QAbstractItemView struct {
|
|
|
|
h *C.QAbstractItemView
|
|
|
|
*QAbstractScrollArea
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) cPointer() *C.QAbstractItemView {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
|
|
|
func newQAbstractItemView(h *C.QAbstractItemView) *QAbstractItemView {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
return &QAbstractItemView{h: h, QAbstractScrollArea: newQAbstractScrollArea_U(unsafe.Pointer(h))}
|
|
|
|
}
|
|
|
|
|
|
|
|
func newQAbstractItemView_U(h unsafe.Pointer) *QAbstractItemView {
|
|
|
|
return newQAbstractItemView((*C.QAbstractItemView)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) MetaObject() *QMetaObject {
|
2024-09-17 07:30:27 +00:00
|
|
|
return newQMetaObject_U(unsafe.Pointer(C.QAbstractItemView_MetaObject(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 22:32:57 +00:00
|
|
|
func (this *QAbstractItemView) Metacast(param1 string) unsafe.Pointer {
|
|
|
|
param1_Cstring := C.CString(param1)
|
|
|
|
defer C.free(unsafe.Pointer(param1_Cstring))
|
|
|
|
return C.QAbstractItemView_Metacast(this.h, param1_Cstring)
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func QAbstractItemView_Tr(s string) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QAbstractItemView_Tr(s_Cstring)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QAbstractItemView_TrUtf8(s string) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QAbstractItemView_TrUtf8(s_Cstring)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) SetModel(model *QAbstractItemModel) {
|
|
|
|
C.QAbstractItemView_SetModel(this.h, model.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) Model() *QAbstractItemModel {
|
2024-09-17 07:30:27 +00:00
|
|
|
return newQAbstractItemModel_U(unsafe.Pointer(C.QAbstractItemView_Model(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) SetSelectionModel(selectionModel *QItemSelectionModel) {
|
|
|
|
C.QAbstractItemView_SetSelectionModel(this.h, selectionModel.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) SelectionModel() *QItemSelectionModel {
|
2024-09-17 07:30:27 +00:00
|
|
|
return newQItemSelectionModel_U(unsafe.Pointer(C.QAbstractItemView_SelectionModel(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) SetItemDelegate(delegate *QAbstractItemDelegate) {
|
|
|
|
C.QAbstractItemView_SetItemDelegate(this.h, delegate.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) ItemDelegate() *QAbstractItemDelegate {
|
2024-09-17 07:30:27 +00:00
|
|
|
return newQAbstractItemDelegate_U(unsafe.Pointer(C.QAbstractItemView_ItemDelegate(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QAbstractItemView) SetSelectionMode(mode QAbstractItemView__SelectionMode) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QAbstractItemView_SetSelectionMode(this.h, (C.int)(mode))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QAbstractItemView) SelectionMode() QAbstractItemView__SelectionMode {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (QAbstractItemView__SelectionMode)(C.QAbstractItemView_SelectionMode(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QAbstractItemView) SetSelectionBehavior(behavior QAbstractItemView__SelectionBehavior) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QAbstractItemView_SetSelectionBehavior(this.h, (C.int)(behavior))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QAbstractItemView) SelectionBehavior() QAbstractItemView__SelectionBehavior {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (QAbstractItemView__SelectionBehavior)(C.QAbstractItemView_SelectionBehavior(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QAbstractItemView) CurrentIndex() *QModelIndex {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QAbstractItemView_CurrentIndex(this.h)
|
|
|
|
_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 *QAbstractItemView) RootIndex() *QModelIndex {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QAbstractItemView_RootIndex(this.h)
|
|
|
|
_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
|
|
|
}
|
|
|
|
|
2024-09-20 06:40:03 +00:00
|
|
|
func (this *QAbstractItemView) SetEditTriggers(triggers QAbstractItemView__EditTrigger) {
|
2024-09-18 01:33:50 +00:00
|
|
|
C.QAbstractItemView_SetEditTriggers(this.h, (C.int)(triggers))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 06:40:03 +00:00
|
|
|
func (this *QAbstractItemView) EditTriggers() QAbstractItemView__EditTrigger {
|
|
|
|
return (QAbstractItemView__EditTrigger)(C.QAbstractItemView_EditTriggers(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QAbstractItemView) SetVerticalScrollMode(mode QAbstractItemView__ScrollMode) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QAbstractItemView_SetVerticalScrollMode(this.h, (C.int)(mode))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QAbstractItemView) VerticalScrollMode() QAbstractItemView__ScrollMode {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (QAbstractItemView__ScrollMode)(C.QAbstractItemView_VerticalScrollMode(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QAbstractItemView) ResetVerticalScrollMode() {
|
|
|
|
C.QAbstractItemView_ResetVerticalScrollMode(this.h)
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QAbstractItemView) SetHorizontalScrollMode(mode QAbstractItemView__ScrollMode) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QAbstractItemView_SetHorizontalScrollMode(this.h, (C.int)(mode))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QAbstractItemView) HorizontalScrollMode() QAbstractItemView__ScrollMode {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (QAbstractItemView__ScrollMode)(C.QAbstractItemView_HorizontalScrollMode(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QAbstractItemView) ResetHorizontalScrollMode() {
|
|
|
|
C.QAbstractItemView_ResetHorizontalScrollMode(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) SetAutoScroll(enable bool) {
|
|
|
|
C.QAbstractItemView_SetAutoScroll(this.h, (C.bool)(enable))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) HasAutoScroll() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QAbstractItemView_HasAutoScroll(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) SetAutoScrollMargin(margin int) {
|
|
|
|
C.QAbstractItemView_SetAutoScrollMargin(this.h, (C.int)(margin))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) AutoScrollMargin() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QAbstractItemView_AutoScrollMargin(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) SetTabKeyNavigation(enable bool) {
|
|
|
|
C.QAbstractItemView_SetTabKeyNavigation(this.h, (C.bool)(enable))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) TabKeyNavigation() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QAbstractItemView_TabKeyNavigation(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) SetDropIndicatorShown(enable bool) {
|
|
|
|
C.QAbstractItemView_SetDropIndicatorShown(this.h, (C.bool)(enable))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) ShowDropIndicator() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QAbstractItemView_ShowDropIndicator(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) SetDragEnabled(enable bool) {
|
|
|
|
C.QAbstractItemView_SetDragEnabled(this.h, (C.bool)(enable))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) DragEnabled() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QAbstractItemView_DragEnabled(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) SetDragDropOverwriteMode(overwrite bool) {
|
|
|
|
C.QAbstractItemView_SetDragDropOverwriteMode(this.h, (C.bool)(overwrite))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) DragDropOverwriteMode() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QAbstractItemView_DragDropOverwriteMode(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QAbstractItemView) SetDragDropMode(behavior QAbstractItemView__DragDropMode) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QAbstractItemView_SetDragDropMode(this.h, (C.int)(behavior))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QAbstractItemView) DragDropMode() QAbstractItemView__DragDropMode {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (QAbstractItemView__DragDropMode)(C.QAbstractItemView_DragDropMode(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QAbstractItemView) SetDefaultDropAction(dropAction DropAction) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QAbstractItemView_SetDefaultDropAction(this.h, (C.int)(dropAction))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QAbstractItemView) DefaultDropAction() DropAction {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (DropAction)(C.QAbstractItemView_DefaultDropAction(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QAbstractItemView) SetAlternatingRowColors(enable bool) {
|
|
|
|
C.QAbstractItemView_SetAlternatingRowColors(this.h, (C.bool)(enable))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) AlternatingRowColors() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QAbstractItemView_AlternatingRowColors(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) SetIconSize(size *QSize) {
|
|
|
|
C.QAbstractItemView_SetIconSize(this.h, size.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) IconSize() *QSize {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QAbstractItemView_IconSize(this.h)
|
|
|
|
_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-09-04 06:54:22 +00:00
|
|
|
func (this *QAbstractItemView) SetTextElideMode(mode TextElideMode) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QAbstractItemView_SetTextElideMode(this.h, (C.int)(mode))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QAbstractItemView) TextElideMode() TextElideMode {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (TextElideMode)(C.QAbstractItemView_TextElideMode(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QAbstractItemView) KeyboardSearch(search string) {
|
2024-09-14 22:29:05 +00:00
|
|
|
search_ms := miqt_strdupg(search)
|
|
|
|
defer C.free(search_ms)
|
|
|
|
C.QAbstractItemView_KeyboardSearch(this.h, (*C.struct_miqt_string)(search_ms))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) VisualRect(index *QModelIndex) *QRect {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QAbstractItemView_VisualRect(this.h, index.cPointer())
|
|
|
|
_goptr := newQRect(_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-08-29 07:01:51 +00:00
|
|
|
func (this *QAbstractItemView) ScrollTo(index *QModelIndex) {
|
|
|
|
C.QAbstractItemView_ScrollTo(this.h, index.cPointer())
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QAbstractItemView) IndexAt(point *QPoint) *QModelIndex {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QAbstractItemView_IndexAt(this.h, point.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 *QAbstractItemView) SizeHintForIndex(index *QModelIndex) *QSize {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QAbstractItemView_SizeHintForIndex(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
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) SizeHintForRow(row int) int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QAbstractItemView_SizeHintForRow(this.h, (C.int)(row)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) SizeHintForColumn(column int) int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QAbstractItemView_SizeHintForColumn(this.h, (C.int)(column)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) OpenPersistentEditor(index *QModelIndex) {
|
|
|
|
C.QAbstractItemView_OpenPersistentEditor(this.h, index.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) ClosePersistentEditor(index *QModelIndex) {
|
|
|
|
C.QAbstractItemView_ClosePersistentEditor(this.h, index.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) IsPersistentEditorOpen(index *QModelIndex) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QAbstractItemView_IsPersistentEditorOpen(this.h, index.cPointer()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) SetIndexWidget(index *QModelIndex, widget *QWidget) {
|
|
|
|
C.QAbstractItemView_SetIndexWidget(this.h, index.cPointer(), widget.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) IndexWidget(index *QModelIndex) *QWidget {
|
2024-09-17 07:30:27 +00:00
|
|
|
return newQWidget_U(unsafe.Pointer(C.QAbstractItemView_IndexWidget(this.h, index.cPointer())))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) SetItemDelegateForRow(row int, delegate *QAbstractItemDelegate) {
|
|
|
|
C.QAbstractItemView_SetItemDelegateForRow(this.h, (C.int)(row), delegate.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) ItemDelegateForRow(row int) *QAbstractItemDelegate {
|
2024-09-17 07:30:27 +00:00
|
|
|
return newQAbstractItemDelegate_U(unsafe.Pointer(C.QAbstractItemView_ItemDelegateForRow(this.h, (C.int)(row))))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) SetItemDelegateForColumn(column int, delegate *QAbstractItemDelegate) {
|
|
|
|
C.QAbstractItemView_SetItemDelegateForColumn(this.h, (C.int)(column), delegate.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) ItemDelegateForColumn(column int) *QAbstractItemDelegate {
|
2024-09-17 07:30:27 +00:00
|
|
|
return newQAbstractItemDelegate_U(unsafe.Pointer(C.QAbstractItemView_ItemDelegateForColumn(this.h, (C.int)(column))))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) ItemDelegateWithIndex(index *QModelIndex) *QAbstractItemDelegate {
|
2024-09-17 07:30:27 +00:00
|
|
|
return newQAbstractItemDelegate_U(unsafe.Pointer(C.QAbstractItemView_ItemDelegateWithIndex(this.h, index.cPointer())))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QAbstractItemView) InputMethodQuery(query InputMethodQuery) *QVariant {
|
2024-09-18 00:12:02 +00:00
|
|
|
_ret := C.QAbstractItemView_InputMethodQuery(this.h, (C.int)(query))
|
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-08-25 04:08:24 +00:00
|
|
|
func (this *QAbstractItemView) Reset() {
|
|
|
|
C.QAbstractItemView_Reset(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) SetRootIndex(index *QModelIndex) {
|
|
|
|
C.QAbstractItemView_SetRootIndex(this.h, index.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) DoItemsLayout() {
|
|
|
|
C.QAbstractItemView_DoItemsLayout(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) SelectAll() {
|
|
|
|
C.QAbstractItemView_SelectAll(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) Edit(index *QModelIndex) {
|
|
|
|
C.QAbstractItemView_Edit(this.h, index.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) ClearSelection() {
|
|
|
|
C.QAbstractItemView_ClearSelection(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) SetCurrentIndex(index *QModelIndex) {
|
|
|
|
C.QAbstractItemView_SetCurrentIndex(this.h, index.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) ScrollToTop() {
|
|
|
|
C.QAbstractItemView_ScrollToTop(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) ScrollToBottom() {
|
|
|
|
C.QAbstractItemView_ScrollToBottom(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) Update(index *QModelIndex) {
|
|
|
|
C.QAbstractItemView_Update(this.h, index.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) Pressed(index *QModelIndex) {
|
|
|
|
C.QAbstractItemView_Pressed(this.h, index.cPointer())
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QAbstractItemView) OnPressed(slot func(index *QModelIndex)) {
|
|
|
|
C.QAbstractItemView_connect_Pressed(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QAbstractItemView_Pressed
|
|
|
|
func miqt_exec_callback_QAbstractItemView_Pressed(cb *C.void, index *C.QModelIndex) {
|
|
|
|
gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(index *QModelIndex))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-09-17 07:30:27 +00:00
|
|
|
slotval1 := newQModelIndex_U(unsafe.Pointer(index))
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) Clicked(index *QModelIndex) {
|
|
|
|
C.QAbstractItemView_Clicked(this.h, index.cPointer())
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QAbstractItemView) OnClicked(slot func(index *QModelIndex)) {
|
|
|
|
C.QAbstractItemView_connect_Clicked(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QAbstractItemView_Clicked
|
|
|
|
func miqt_exec_callback_QAbstractItemView_Clicked(cb *C.void, index *C.QModelIndex) {
|
|
|
|
gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(index *QModelIndex))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-09-17 07:30:27 +00:00
|
|
|
slotval1 := newQModelIndex_U(unsafe.Pointer(index))
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) DoubleClicked(index *QModelIndex) {
|
|
|
|
C.QAbstractItemView_DoubleClicked(this.h, index.cPointer())
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QAbstractItemView) OnDoubleClicked(slot func(index *QModelIndex)) {
|
|
|
|
C.QAbstractItemView_connect_DoubleClicked(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QAbstractItemView_DoubleClicked
|
|
|
|
func miqt_exec_callback_QAbstractItemView_DoubleClicked(cb *C.void, index *C.QModelIndex) {
|
|
|
|
gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(index *QModelIndex))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-09-17 07:30:27 +00:00
|
|
|
slotval1 := newQModelIndex_U(unsafe.Pointer(index))
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) Activated(index *QModelIndex) {
|
|
|
|
C.QAbstractItemView_Activated(this.h, index.cPointer())
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QAbstractItemView) OnActivated(slot func(index *QModelIndex)) {
|
|
|
|
C.QAbstractItemView_connect_Activated(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QAbstractItemView_Activated
|
|
|
|
func miqt_exec_callback_QAbstractItemView_Activated(cb *C.void, index *C.QModelIndex) {
|
|
|
|
gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(index *QModelIndex))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-09-17 07:30:27 +00:00
|
|
|
slotval1 := newQModelIndex_U(unsafe.Pointer(index))
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) Entered(index *QModelIndex) {
|
|
|
|
C.QAbstractItemView_Entered(this.h, index.cPointer())
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QAbstractItemView) OnEntered(slot func(index *QModelIndex)) {
|
|
|
|
C.QAbstractItemView_connect_Entered(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QAbstractItemView_Entered
|
|
|
|
func miqt_exec_callback_QAbstractItemView_Entered(cb *C.void, index *C.QModelIndex) {
|
|
|
|
gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(index *QModelIndex))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-09-17 07:30:27 +00:00
|
|
|
slotval1 := newQModelIndex_U(unsafe.Pointer(index))
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) ViewportEntered() {
|
|
|
|
C.QAbstractItemView_ViewportEntered(this.h)
|
|
|
|
}
|
|
|
|
func (this *QAbstractItemView) OnViewportEntered(slot func()) {
|
2024-09-14 22:29:05 +00:00
|
|
|
C.QAbstractItemView_connect_ViewportEntered(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QAbstractItemView_ViewportEntered
|
|
|
|
func miqt_exec_callback_QAbstractItemView_ViewportEntered(cb *C.void) {
|
|
|
|
gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func())
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
gofunc()
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAbstractItemView) IconSizeChanged(size *QSize) {
|
|
|
|
C.QAbstractItemView_IconSizeChanged(this.h, size.cPointer())
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QAbstractItemView) OnIconSizeChanged(slot func(size *QSize)) {
|
|
|
|
C.QAbstractItemView_connect_IconSizeChanged(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QAbstractItemView_IconSizeChanged
|
|
|
|
func miqt_exec_callback_QAbstractItemView_IconSizeChanged(cb *C.void, size *C.QSize) {
|
|
|
|
gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(size *QSize))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-09-17 07:30:27 +00:00
|
|
|
slotval1 := newQSize_U(unsafe.Pointer(size))
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QAbstractItemView_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-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QAbstractItemView_Tr2(s_Cstring, c_Cstring)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QAbstractItemView_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-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QAbstractItemView_Tr3(s_Cstring, c_Cstring, (C.int)(n))
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QAbstractItemView_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-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QAbstractItemView_TrUtf82(s_Cstring, c_Cstring)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QAbstractItemView_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-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QAbstractItemView_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QAbstractItemView) ScrollTo2(index *QModelIndex, hint QAbstractItemView__ScrollHint) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QAbstractItemView_ScrollTo2(this.h, index.cPointer(), (C.int)(hint))
|
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 *QAbstractItemView) Delete() {
|
|
|
|
C.QAbstractItemView_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 *QAbstractItemView) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QAbstractItemView) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|