miqt/qt/gen_qcommandlinkbutton.go

206 lines
6.5 KiB
Go
Raw Normal View History

package qt
/*
#include "gen_qcommandlinkbutton.h"
#include <stdlib.h>
*/
import "C"
import (
"runtime"
"unsafe"
)
type QCommandLinkButton struct {
h *C.QCommandLinkButton
*QPushButton
}
func (this *QCommandLinkButton) cPointer() *C.QCommandLinkButton {
if this == nil {
return nil
}
return this.h
}
func (this *QCommandLinkButton) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
func newQCommandLinkButton(h *C.QCommandLinkButton) *QCommandLinkButton {
2024-09-01 02:23:55 +00:00
if h == nil {
return nil
}
return &QCommandLinkButton{h: h, QPushButton: UnsafeNewQPushButton(unsafe.Pointer(h))}
}
func UnsafeNewQCommandLinkButton(h unsafe.Pointer) *QCommandLinkButton {
return newQCommandLinkButton((*C.QCommandLinkButton)(h))
}
// NewQCommandLinkButton constructs a new QCommandLinkButton object.
func NewQCommandLinkButton(parent *QWidget) *QCommandLinkButton {
ret := C.QCommandLinkButton_new(parent.cPointer())
return newQCommandLinkButton(ret)
}
// NewQCommandLinkButton2 constructs a new QCommandLinkButton object.
func NewQCommandLinkButton2() *QCommandLinkButton {
ret := C.QCommandLinkButton_new2()
return newQCommandLinkButton(ret)
}
// NewQCommandLinkButton3 constructs a new QCommandLinkButton object.
func NewQCommandLinkButton3(text string) *QCommandLinkButton {
text_ms := C.struct_miqt_string{}
text_ms.data = C.CString(text)
text_ms.len = C.size_t(len(text))
defer C.free(unsafe.Pointer(text_ms.data))
ret := C.QCommandLinkButton_new3(text_ms)
return newQCommandLinkButton(ret)
}
// NewQCommandLinkButton4 constructs a new QCommandLinkButton object.
func NewQCommandLinkButton4(text string, description string) *QCommandLinkButton {
text_ms := C.struct_miqt_string{}
text_ms.data = C.CString(text)
text_ms.len = C.size_t(len(text))
defer C.free(unsafe.Pointer(text_ms.data))
description_ms := C.struct_miqt_string{}
description_ms.data = C.CString(description)
description_ms.len = C.size_t(len(description))
defer C.free(unsafe.Pointer(description_ms.data))
ret := C.QCommandLinkButton_new4(text_ms, description_ms)
return newQCommandLinkButton(ret)
}
// NewQCommandLinkButton5 constructs a new QCommandLinkButton object.
func NewQCommandLinkButton5(text string, parent *QWidget) *QCommandLinkButton {
text_ms := C.struct_miqt_string{}
text_ms.data = C.CString(text)
text_ms.len = C.size_t(len(text))
defer C.free(unsafe.Pointer(text_ms.data))
ret := C.QCommandLinkButton_new5(text_ms, parent.cPointer())
return newQCommandLinkButton(ret)
}
// NewQCommandLinkButton6 constructs a new QCommandLinkButton object.
func NewQCommandLinkButton6(text string, description string, parent *QWidget) *QCommandLinkButton {
text_ms := C.struct_miqt_string{}
text_ms.data = C.CString(text)
text_ms.len = C.size_t(len(text))
defer C.free(unsafe.Pointer(text_ms.data))
description_ms := C.struct_miqt_string{}
description_ms.data = C.CString(description)
description_ms.len = C.size_t(len(description))
defer C.free(unsafe.Pointer(description_ms.data))
ret := C.QCommandLinkButton_new6(text_ms, description_ms, parent.cPointer())
return newQCommandLinkButton(ret)
}
func (this *QCommandLinkButton) MetaObject() *QMetaObject {
return UnsafeNewQMetaObject(unsafe.Pointer(C.QCommandLinkButton_MetaObject(this.h)))
}
func (this *QCommandLinkButton) Metacast(param1 string) unsafe.Pointer {
param1_Cstring := C.CString(param1)
defer C.free(unsafe.Pointer(param1_Cstring))
return (unsafe.Pointer)(C.QCommandLinkButton_Metacast(this.h, param1_Cstring))
}
func QCommandLinkButton_Tr(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
var _ms C.struct_miqt_string = C.QCommandLinkButton_Tr(s_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QCommandLinkButton_TrUtf8(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
var _ms C.struct_miqt_string = C.QCommandLinkButton_TrUtf8(s_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QCommandLinkButton) Description() string {
var _ms C.struct_miqt_string = C.QCommandLinkButton_Description(this.h)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QCommandLinkButton) SetDescription(description string) {
description_ms := C.struct_miqt_string{}
description_ms.data = C.CString(description)
description_ms.len = C.size_t(len(description))
defer C.free(unsafe.Pointer(description_ms.data))
C.QCommandLinkButton_SetDescription(this.h, description_ms)
}
func QCommandLinkButton_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.QCommandLinkButton_Tr2(s_Cstring, c_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QCommandLinkButton_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.QCommandLinkButton_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 QCommandLinkButton_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))
var _ms C.struct_miqt_string = C.QCommandLinkButton_TrUtf82(s_Cstring, c_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QCommandLinkButton_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))
var _ms C.struct_miqt_string = C.QCommandLinkButton_TrUtf83(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
}
// Delete this object from C++ memory.
func (this *QCommandLinkButton) Delete() {
C.QCommandLinkButton_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 *QCommandLinkButton) GoGC() {
runtime.SetFinalizer(this, func(this *QCommandLinkButton) {
this.Delete()
runtime.KeepAlive(this.h)
})
}