2024-08-25 04:08:24 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qhistorystate.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
2024-09-14 22:29:05 +00:00
|
|
|
"runtime"
|
2024-08-25 04:08:24 +00:00
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
type QHistoryState__HistoryType int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QHistoryState__ShallowHistory QHistoryState__HistoryType = 0
|
|
|
|
QHistoryState__DeepHistory QHistoryState__HistoryType = 1
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
type QHistoryState struct {
|
|
|
|
h *C.QHistoryState
|
|
|
|
*QAbstractState
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QHistoryState) cPointer() *C.QHistoryState {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
|
|
|
func newQHistoryState(h *C.QHistoryState) *QHistoryState {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
return &QHistoryState{h: h, QAbstractState: newQAbstractState_U(unsafe.Pointer(h))}
|
|
|
|
}
|
|
|
|
|
|
|
|
func newQHistoryState_U(h unsafe.Pointer) *QHistoryState {
|
|
|
|
return newQHistoryState((*C.QHistoryState)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQHistoryState constructs a new QHistoryState object.
|
|
|
|
func NewQHistoryState() *QHistoryState {
|
|
|
|
ret := C.QHistoryState_new()
|
|
|
|
return newQHistoryState(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQHistoryState2 constructs a new QHistoryState object.
|
2024-09-04 06:54:22 +00:00
|
|
|
func NewQHistoryState2(typeVal QHistoryState__HistoryType) *QHistoryState {
|
2024-09-18 00:12:02 +00:00
|
|
|
ret := C.QHistoryState_new2((C.int)(typeVal))
|
2024-08-29 07:01:51 +00:00
|
|
|
return newQHistoryState(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQHistoryState3 constructs a new QHistoryState object.
|
|
|
|
func NewQHistoryState3(parent *QState) *QHistoryState {
|
|
|
|
ret := C.QHistoryState_new3(parent.cPointer())
|
|
|
|
return newQHistoryState(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQHistoryState4 constructs a new QHistoryState object.
|
2024-09-04 06:54:22 +00:00
|
|
|
func NewQHistoryState4(typeVal QHistoryState__HistoryType, parent *QState) *QHistoryState {
|
2024-09-18 00:12:02 +00:00
|
|
|
ret := C.QHistoryState_new4((C.int)(typeVal), parent.cPointer())
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQHistoryState(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QHistoryState) MetaObject() *QMetaObject {
|
2024-09-17 07:30:27 +00:00
|
|
|
return newQMetaObject_U(unsafe.Pointer(C.QHistoryState_MetaObject(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 22:32:57 +00:00
|
|
|
func (this *QHistoryState) Metacast(param1 string) unsafe.Pointer {
|
|
|
|
param1_Cstring := C.CString(param1)
|
|
|
|
defer C.free(unsafe.Pointer(param1_Cstring))
|
|
|
|
return C.QHistoryState_Metacast(this.h, param1_Cstring)
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func QHistoryState_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.QHistoryState_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 QHistoryState_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.QHistoryState_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 *QHistoryState) DefaultTransition() *QAbstractTransition {
|
2024-09-17 07:30:27 +00:00
|
|
|
return newQAbstractTransition_U(unsafe.Pointer(C.QHistoryState_DefaultTransition(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QHistoryState) SetDefaultTransition(transition *QAbstractTransition) {
|
|
|
|
C.QHistoryState_SetDefaultTransition(this.h, transition.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QHistoryState) DefaultState() *QAbstractState {
|
2024-09-17 07:30:27 +00:00
|
|
|
return newQAbstractState_U(unsafe.Pointer(C.QHistoryState_DefaultState(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QHistoryState) SetDefaultState(state *QAbstractState) {
|
|
|
|
C.QHistoryState_SetDefaultState(this.h, state.cPointer())
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QHistoryState) HistoryType() QHistoryState__HistoryType {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (QHistoryState__HistoryType)(C.QHistoryState_HistoryType(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QHistoryState) SetHistoryType(typeVal QHistoryState__HistoryType) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QHistoryState_SetHistoryType(this.h, (C.int)(typeVal))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func QHistoryState_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.QHistoryState_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 QHistoryState_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.QHistoryState_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 QHistoryState_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.QHistoryState_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 QHistoryState_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.QHistoryState_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-14 22:29:05 +00:00
|
|
|
// Delete this object from C++ memory.
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QHistoryState) Delete() {
|
|
|
|
C.QHistoryState_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 *QHistoryState) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QHistoryState) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|