2024-08-25 04:08:24 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qgraphicswidget.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
"runtime/cgo"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
type QGraphicsWidget__ int
|
|
|
|
|
|
|
|
const (
|
|
|
|
QGraphicsWidget____Type QGraphicsWidget__ = 11
|
|
|
|
)
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
type QGraphicsWidget struct {
|
|
|
|
h *C.QGraphicsWidget
|
|
|
|
*QGraphicsObject
|
|
|
|
*QGraphicsLayoutItem
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) cPointer() *C.QGraphicsWidget {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
|
|
|
func newQGraphicsWidget(h *C.QGraphicsWidget) *QGraphicsWidget {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
return &QGraphicsWidget{h: h, QGraphicsObject: newQGraphicsObject_U(unsafe.Pointer(h)), QGraphicsLayoutItem: newQGraphicsLayoutItem_U(unsafe.Pointer(h))}
|
|
|
|
}
|
|
|
|
|
|
|
|
func newQGraphicsWidget_U(h unsafe.Pointer) *QGraphicsWidget {
|
|
|
|
return newQGraphicsWidget((*C.QGraphicsWidget)(h))
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
// NewQGraphicsWidget constructs a new QGraphicsWidget object.
|
|
|
|
func NewQGraphicsWidget() *QGraphicsWidget {
|
|
|
|
ret := C.QGraphicsWidget_new()
|
|
|
|
return newQGraphicsWidget(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQGraphicsWidget2 constructs a new QGraphicsWidget object.
|
|
|
|
func NewQGraphicsWidget2(parent *QGraphicsItem) *QGraphicsWidget {
|
|
|
|
ret := C.QGraphicsWidget_new2(parent.cPointer())
|
|
|
|
return newQGraphicsWidget(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQGraphicsWidget3 constructs a new QGraphicsWidget object.
|
|
|
|
func NewQGraphicsWidget3(parent *QGraphicsItem, wFlags int) *QGraphicsWidget {
|
2024-09-18 01:33:50 +00:00
|
|
|
ret := C.QGraphicsWidget_new3(parent.cPointer(), (C.int)(wFlags))
|
2024-08-29 07:01:51 +00:00
|
|
|
return newQGraphicsWidget(ret)
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QGraphicsWidget) MetaObject() *QMetaObject {
|
2024-09-17 07:30:27 +00:00
|
|
|
return newQMetaObject_U(unsafe.Pointer(C.QGraphicsWidget_MetaObject(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGraphicsWidget_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.QGraphicsWidget_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 QGraphicsWidget_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.QGraphicsWidget_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 *QGraphicsWidget) Layout() *QGraphicsLayout {
|
2024-09-17 07:30:27 +00:00
|
|
|
return newQGraphicsLayout_U(unsafe.Pointer(C.QGraphicsWidget_Layout(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) SetLayout(layout *QGraphicsLayout) {
|
|
|
|
C.QGraphicsWidget_SetLayout(this.h, layout.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) AdjustSize() {
|
|
|
|
C.QGraphicsWidget_AdjustSize(this.h)
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QGraphicsWidget) LayoutDirection() LayoutDirection {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (LayoutDirection)(C.QGraphicsWidget_LayoutDirection(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QGraphicsWidget) SetLayoutDirection(direction LayoutDirection) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QGraphicsWidget_SetLayoutDirection(this.h, (C.int)(direction))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QGraphicsWidget) UnsetLayoutDirection() {
|
|
|
|
C.QGraphicsWidget_UnsetLayoutDirection(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) Style() *QStyle {
|
2024-09-17 07:30:27 +00:00
|
|
|
return newQStyle_U(unsafe.Pointer(C.QGraphicsWidget_Style(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) SetStyle(style *QStyle) {
|
|
|
|
C.QGraphicsWidget_SetStyle(this.h, style.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) Font() *QFont {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QGraphicsWidget_Font(this.h)
|
|
|
|
_goptr := newQFont(_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 *QGraphicsWidget) SetFont(font *QFont) {
|
|
|
|
C.QGraphicsWidget_SetFont(this.h, font.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) Palette() *QPalette {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QGraphicsWidget_Palette(this.h)
|
|
|
|
_goptr := newQPalette(_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 *QGraphicsWidget) SetPalette(palette *QPalette) {
|
|
|
|
C.QGraphicsWidget_SetPalette(this.h, palette.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) AutoFillBackground() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QGraphicsWidget_AutoFillBackground(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) SetAutoFillBackground(enabled bool) {
|
|
|
|
C.QGraphicsWidget_SetAutoFillBackground(this.h, (C.bool)(enabled))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) Resize(size *QSizeF) {
|
|
|
|
C.QGraphicsWidget_Resize(this.h, size.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) Resize2(w float64, h float64) {
|
|
|
|
C.QGraphicsWidget_Resize2(this.h, (C.double)(w), (C.double)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) Size() *QSizeF {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QGraphicsWidget_Size(this.h)
|
|
|
|
_goptr := newQSizeF(_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 *QGraphicsWidget) SetGeometry(rect *QRectF) {
|
|
|
|
C.QGraphicsWidget_SetGeometry(this.h, rect.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) SetGeometry2(x float64, y float64, w float64, h float64) {
|
|
|
|
C.QGraphicsWidget_SetGeometry2(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) Rect() *QRectF {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QGraphicsWidget_Rect(this.h)
|
|
|
|
_goptr := newQRectF(_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 *QGraphicsWidget) SetContentsMargins(left float64, top float64, right float64, bottom float64) {
|
|
|
|
C.QGraphicsWidget_SetContentsMargins(this.h, (C.double)(left), (C.double)(top), (C.double)(right), (C.double)(bottom))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) SetContentsMarginsWithMargins(margins QMarginsF) {
|
|
|
|
C.QGraphicsWidget_SetContentsMarginsWithMargins(this.h, margins.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) GetContentsMargins(left *float64, top *float64, right *float64, bottom *float64) {
|
|
|
|
C.QGraphicsWidget_GetContentsMargins(this.h, (*C.double)(unsafe.Pointer(left)), (*C.double)(unsafe.Pointer(top)), (*C.double)(unsafe.Pointer(right)), (*C.double)(unsafe.Pointer(bottom)))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) SetWindowFrameMargins(left float64, top float64, right float64, bottom float64) {
|
|
|
|
C.QGraphicsWidget_SetWindowFrameMargins(this.h, (C.double)(left), (C.double)(top), (C.double)(right), (C.double)(bottom))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) SetWindowFrameMarginsWithMargins(margins QMarginsF) {
|
|
|
|
C.QGraphicsWidget_SetWindowFrameMarginsWithMargins(this.h, margins.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) GetWindowFrameMargins(left *float64, top *float64, right *float64, bottom *float64) {
|
|
|
|
C.QGraphicsWidget_GetWindowFrameMargins(this.h, (*C.double)(unsafe.Pointer(left)), (*C.double)(unsafe.Pointer(top)), (*C.double)(unsafe.Pointer(right)), (*C.double)(unsafe.Pointer(bottom)))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) UnsetWindowFrameMargins() {
|
|
|
|
C.QGraphicsWidget_UnsetWindowFrameMargins(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) WindowFrameGeometry() *QRectF {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QGraphicsWidget_WindowFrameGeometry(this.h)
|
|
|
|
_goptr := newQRectF(_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 *QGraphicsWidget) WindowFrameRect() *QRectF {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QGraphicsWidget_WindowFrameRect(this.h)
|
|
|
|
_goptr := newQRectF(_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 *QGraphicsWidget) WindowFlags() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QGraphicsWidget_WindowFlags(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QGraphicsWidget) WindowType() WindowType {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (WindowType)(C.QGraphicsWidget_WindowType(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) SetWindowFlags(wFlags int) {
|
2024-09-18 01:33:50 +00:00
|
|
|
C.QGraphicsWidget_SetWindowFlags(this.h, (C.int)(wFlags))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QGraphicsWidget) IsActiveWindow() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QGraphicsWidget_IsActiveWindow(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) SetWindowTitle(title string) {
|
2024-09-14 22:29:05 +00:00
|
|
|
title_ms := miqt_strdupg(title)
|
|
|
|
defer C.free(title_ms)
|
|
|
|
C.QGraphicsWidget_SetWindowTitle(this.h, (*C.struct_miqt_string)(title_ms))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) WindowTitle() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QGraphicsWidget_WindowTitle(this.h)
|
|
|
|
_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 *QGraphicsWidget) FocusPolicy() FocusPolicy {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (FocusPolicy)(C.QGraphicsWidget_FocusPolicy(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QGraphicsWidget) SetFocusPolicy(policy FocusPolicy) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QGraphicsWidget_SetFocusPolicy(this.h, (C.int)(policy))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func QGraphicsWidget_SetTabOrder(first *QGraphicsWidget, second *QGraphicsWidget) {
|
|
|
|
C.QGraphicsWidget_SetTabOrder(first.cPointer(), second.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) FocusWidget() *QGraphicsWidget {
|
2024-09-17 07:30:27 +00:00
|
|
|
return newQGraphicsWidget_U(unsafe.Pointer(C.QGraphicsWidget_FocusWidget(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
func (this *QGraphicsWidget) GrabShortcut(sequence *QKeySequence) int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QGraphicsWidget_GrabShortcut(this.h, sequence.cPointer()))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QGraphicsWidget) ReleaseShortcut(id int) {
|
|
|
|
C.QGraphicsWidget_ReleaseShortcut(this.h, (C.int)(id))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) SetShortcutEnabled(id int) {
|
|
|
|
C.QGraphicsWidget_SetShortcutEnabled(this.h, (C.int)(id))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) SetShortcutAutoRepeat(id int) {
|
|
|
|
C.QGraphicsWidget_SetShortcutAutoRepeat(this.h, (C.int)(id))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) AddAction(action *QAction) {
|
|
|
|
C.QGraphicsWidget_AddAction(this.h, action.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) AddActions(actions []*QAction) {
|
|
|
|
// For the C ABI, malloc a C array of raw pointers
|
2024-09-01 05:51:28 +00:00
|
|
|
actions_CArray := (*[0xffff]*C.QAction)(C.malloc(C.size_t(8 * len(actions))))
|
2024-08-25 04:08:24 +00:00
|
|
|
defer C.free(unsafe.Pointer(actions_CArray))
|
|
|
|
for i := range actions {
|
|
|
|
actions_CArray[i] = actions[i].cPointer()
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
actions_ma := &C.struct_miqt_array{len: C.size_t(len(actions)), data: unsafe.Pointer(actions_CArray)}
|
|
|
|
defer runtime.KeepAlive(unsafe.Pointer(actions_ma))
|
|
|
|
C.QGraphicsWidget_AddActions(this.h, actions_ma)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) InsertActions(before *QAction, actions []*QAction) {
|
|
|
|
// For the C ABI, malloc a C array of raw pointers
|
2024-09-01 05:51:28 +00:00
|
|
|
actions_CArray := (*[0xffff]*C.QAction)(C.malloc(C.size_t(8 * len(actions))))
|
2024-08-25 04:08:24 +00:00
|
|
|
defer C.free(unsafe.Pointer(actions_CArray))
|
|
|
|
for i := range actions {
|
|
|
|
actions_CArray[i] = actions[i].cPointer()
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
actions_ma := &C.struct_miqt_array{len: C.size_t(len(actions)), data: unsafe.Pointer(actions_CArray)}
|
|
|
|
defer runtime.KeepAlive(unsafe.Pointer(actions_ma))
|
|
|
|
C.QGraphicsWidget_InsertActions(this.h, before.cPointer(), actions_ma)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) InsertAction(before *QAction, action *QAction) {
|
|
|
|
C.QGraphicsWidget_InsertAction(this.h, before.cPointer(), action.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) RemoveAction(action *QAction) {
|
|
|
|
C.QGraphicsWidget_RemoveAction(this.h, action.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) Actions() []*QAction {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ma *C.struct_miqt_array = C.QGraphicsWidget_Actions(this.h)
|
|
|
|
_ret := make([]*QAction, int(_ma.len))
|
2024-09-17 07:30:27 +00:00
|
|
|
_outCast := (*[0xffff]*C.QAction)(unsafe.Pointer(_ma.data)) // hey ya
|
2024-09-14 22:29:05 +00:00
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-09-17 07:30:27 +00:00
|
|
|
_ret[i] = newQAction_U(unsafe.Pointer(_outCast[i]))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
C.free(unsafe.Pointer(_ma))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QGraphicsWidget) SetAttribute(attribute WidgetAttribute) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QGraphicsWidget_SetAttribute(this.h, (C.int)(attribute))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QGraphicsWidget) TestAttribute(attribute WidgetAttribute) bool {
|
2024-09-18 00:12:02 +00:00
|
|
|
return (bool)(C.QGraphicsWidget_TestAttribute(this.h, (C.int)(attribute)))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QGraphicsWidget) Type() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QGraphicsWidget_Type(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) Paint(painter *QPainter, option *QStyleOptionGraphicsItem) {
|
|
|
|
C.QGraphicsWidget_Paint(this.h, painter.cPointer(), option.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) PaintWindowFrame(painter *QPainter, option *QStyleOptionGraphicsItem) {
|
|
|
|
C.QGraphicsWidget_PaintWindowFrame(this.h, painter.cPointer(), option.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) BoundingRect() *QRectF {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QGraphicsWidget_BoundingRect(this.h)
|
|
|
|
_goptr := newQRectF(_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 *QGraphicsWidget) Shape() *QPainterPath {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QGraphicsWidget_Shape(this.h)
|
|
|
|
_goptr := newQPainterPath(_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 *QGraphicsWidget) GeometryChanged() {
|
|
|
|
C.QGraphicsWidget_GeometryChanged(this.h)
|
|
|
|
}
|
|
|
|
func (this *QGraphicsWidget) OnGeometryChanged(slot func()) {
|
2024-09-14 22:29:05 +00:00
|
|
|
C.QGraphicsWidget_connect_GeometryChanged(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QGraphicsWidget_GeometryChanged
|
|
|
|
func miqt_exec_callback_QGraphicsWidget_GeometryChanged(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 *QGraphicsWidget) LayoutChanged() {
|
|
|
|
C.QGraphicsWidget_LayoutChanged(this.h)
|
|
|
|
}
|
|
|
|
func (this *QGraphicsWidget) OnLayoutChanged(slot func()) {
|
2024-09-14 22:29:05 +00:00
|
|
|
C.QGraphicsWidget_connect_LayoutChanged(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QGraphicsWidget_LayoutChanged
|
|
|
|
func miqt_exec_callback_QGraphicsWidget_LayoutChanged(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 *QGraphicsWidget) Close() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QGraphicsWidget_Close(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGraphicsWidget_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.QGraphicsWidget_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 QGraphicsWidget_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.QGraphicsWidget_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 QGraphicsWidget_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.QGraphicsWidget_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 QGraphicsWidget_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.QGraphicsWidget_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 *QGraphicsWidget) GrabShortcut2(sequence *QKeySequence, context ShortcutContext) int {
|
2024-09-18 00:12:02 +00:00
|
|
|
return (int)(C.QGraphicsWidget_GrabShortcut2(this.h, sequence.cPointer(), (C.int)(context)))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QGraphicsWidget) SetShortcutEnabled2(id int, enabled bool) {
|
|
|
|
C.QGraphicsWidget_SetShortcutEnabled2(this.h, (C.int)(id), (C.bool)(enabled))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) SetShortcutAutoRepeat2(id int, enabled bool) {
|
|
|
|
C.QGraphicsWidget_SetShortcutAutoRepeat2(this.h, (C.int)(id), (C.bool)(enabled))
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QGraphicsWidget) SetAttribute2(attribute WidgetAttribute, on bool) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QGraphicsWidget_SetAttribute2(this.h, (C.int)(attribute), (C.bool)(on))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QGraphicsWidget) Paint3(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) {
|
|
|
|
C.QGraphicsWidget_Paint3(this.h, painter.cPointer(), option.cPointer(), widget.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsWidget) PaintWindowFrame3(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) {
|
|
|
|
C.QGraphicsWidget_PaintWindowFrame3(this.h, painter.cPointer(), option.cPointer(), widget.cPointer())
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Delete this object from C++ memory.
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QGraphicsWidget) Delete() {
|
|
|
|
C.QGraphicsWidget_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 *QGraphicsWidget) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QGraphicsWidget) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|