2024-08-25 04:08:24 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qcommandlinkbutton.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"
|
|
|
|
)
|
|
|
|
|
|
|
|
type QCommandLinkButton struct {
|
|
|
|
h *C.QCommandLinkButton
|
|
|
|
*QPushButton
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCommandLinkButton) cPointer() *C.QCommandLinkButton {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func (this *QCommandLinkButton) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func newQCommandLinkButton(h *C.QCommandLinkButton) *QCommandLinkButton {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-10-16 05:07:56 +00:00
|
|
|
return &QCommandLinkButton{h: h, QPushButton: UnsafeNewQPushButton(unsafe.Pointer(h))}
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func UnsafeNewQCommandLinkButton(h unsafe.Pointer) *QCommandLinkButton {
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQCommandLinkButton((*C.QCommandLinkButton)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQCommandLinkButton constructs a new QCommandLinkButton object.
|
2024-10-26 00:46:42 +00:00
|
|
|
func NewQCommandLinkButton(parent *QWidget) *QCommandLinkButton {
|
|
|
|
ret := C.QCommandLinkButton_new(parent.cPointer())
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQCommandLinkButton(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQCommandLinkButton2 constructs a new QCommandLinkButton object.
|
2024-10-26 00:46:42 +00:00
|
|
|
func NewQCommandLinkButton2() *QCommandLinkButton {
|
|
|
|
ret := C.QCommandLinkButton_new2()
|
|
|
|
return newQCommandLinkButton(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQCommandLinkButton3 constructs a new QCommandLinkButton object.
|
|
|
|
func NewQCommandLinkButton3(text string) *QCommandLinkButton {
|
2024-10-18 23:53:33 +00:00
|
|
|
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))
|
2024-10-26 00:46:42 +00:00
|
|
|
ret := C.QCommandLinkButton_new3(text_ms)
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQCommandLinkButton(ret)
|
|
|
|
}
|
|
|
|
|
2024-10-26 00:46:42 +00:00
|
|
|
// NewQCommandLinkButton4 constructs a new QCommandLinkButton object.
|
|
|
|
func NewQCommandLinkButton4(text string, description string) *QCommandLinkButton {
|
2024-10-18 23:53:33 +00:00
|
|
|
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))
|
2024-10-26 00:46:42 +00:00
|
|
|
ret := C.QCommandLinkButton_new4(text_ms, description_ms)
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQCommandLinkButton(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQCommandLinkButton5 constructs a new QCommandLinkButton object.
|
|
|
|
func NewQCommandLinkButton5(text string, parent *QWidget) *QCommandLinkButton {
|
2024-10-18 23:53:33 +00:00
|
|
|
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())
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQCommandLinkButton(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQCommandLinkButton6 constructs a new QCommandLinkButton object.
|
|
|
|
func NewQCommandLinkButton6(text string, description string, parent *QWidget) *QCommandLinkButton {
|
2024-10-18 23:53:33 +00:00
|
|
|
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())
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQCommandLinkButton(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCommandLinkButton) MetaObject() *QMetaObject {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQMetaObject(unsafe.Pointer(C.QCommandLinkButton_MetaObject(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 22:32:57 +00:00
|
|
|
func (this *QCommandLinkButton) Metacast(param1 string) unsafe.Pointer {
|
|
|
|
param1_Cstring := C.CString(param1)
|
|
|
|
defer C.free(unsafe.Pointer(param1_Cstring))
|
2024-10-18 23:53:33 +00:00
|
|
|
return (unsafe.Pointer)(C.QCommandLinkButton_Metacast(this.h, param1_Cstring))
|
2024-09-20 22:32:57 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func QCommandLinkButton_Tr(s string) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
2024-10-18 23:53:33 +00:00
|
|
|
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))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QCommandLinkButton_TrUtf8(s string) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
2024-10-18 23:53:33 +00:00
|
|
|
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))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCommandLinkButton) Description() string {
|
2024-10-18 23:53:33 +00:00
|
|
|
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))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCommandLinkButton) SetDescription(description string) {
|
2024-10-18 23:53:33 +00:00
|
|
|
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)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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))
|
2024-10-18 23:53:33 +00:00
|
|
|
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))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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))
|
2024-10-18 23:53:33 +00:00
|
|
|
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))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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))
|
2024-10-18 23:53:33 +00:00
|
|
|
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))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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))
|
2024-10-18 23:53:33 +00:00
|
|
|
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))
|
2024-09-14 22:29:05 +00:00
|
|
|
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 *QCommandLinkButton) Delete() {
|
|
|
|
C.QCommandLinkButton_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 *QCommandLinkButton) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QCommandLinkButton) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|