2024-08-25 04:08:24 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qinputdialog.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
"runtime/cgo"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
type QInputDialog__InputDialogOption int
|
|
|
|
|
|
|
|
const (
|
|
|
|
QInputDialog__InputDialogOption__NoButtons QInputDialog__InputDialogOption = 1
|
|
|
|
QInputDialog__InputDialogOption__UseListViewForComboBoxItems QInputDialog__InputDialogOption = 2
|
|
|
|
QInputDialog__InputDialogOption__UsePlainTextEditForTextInput QInputDialog__InputDialogOption = 4
|
|
|
|
)
|
|
|
|
|
|
|
|
type QInputDialog__InputMode int
|
|
|
|
|
|
|
|
const (
|
|
|
|
QInputDialog__InputMode__TextInput QInputDialog__InputMode = 0
|
|
|
|
QInputDialog__InputMode__IntInput QInputDialog__InputMode = 1
|
|
|
|
QInputDialog__InputMode__DoubleInput QInputDialog__InputMode = 2
|
|
|
|
)
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
type QInputDialog struct {
|
|
|
|
h *C.QInputDialog
|
|
|
|
*QDialog
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) cPointer() *C.QInputDialog {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
|
|
|
func newQInputDialog(h *C.QInputDialog) *QInputDialog {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
return &QInputDialog{h: h, QDialog: newQDialog_U(unsafe.Pointer(h))}
|
|
|
|
}
|
|
|
|
|
|
|
|
func newQInputDialog_U(h unsafe.Pointer) *QInputDialog {
|
|
|
|
return newQInputDialog((*C.QInputDialog)(h))
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
// NewQInputDialog constructs a new QInputDialog object.
|
|
|
|
func NewQInputDialog() *QInputDialog {
|
|
|
|
ret := C.QInputDialog_new()
|
|
|
|
return newQInputDialog(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQInputDialog2 constructs a new QInputDialog object.
|
|
|
|
func NewQInputDialog2(parent *QWidget) *QInputDialog {
|
|
|
|
ret := C.QInputDialog_new2(parent.cPointer())
|
|
|
|
return newQInputDialog(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQInputDialog3 constructs a new QInputDialog object.
|
|
|
|
func NewQInputDialog3(parent *QWidget, flags int) *QInputDialog {
|
|
|
|
ret := C.QInputDialog_new3(parent.cPointer(), (C.int)(flags))
|
|
|
|
return newQInputDialog(ret)
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QInputDialog) MetaObject() *QMetaObject {
|
|
|
|
ret := C.QInputDialog_MetaObject(this.h)
|
|
|
|
return newQMetaObject_U(unsafe.Pointer(ret))
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_Tr(s string) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
|
|
|
var _out *C.char = nil
|
|
|
|
var _out_Strlen C.int = 0
|
|
|
|
C.QInputDialog_Tr(s_Cstring, &_out, &_out_Strlen)
|
|
|
|
ret := C.GoStringN(_out, _out_Strlen)
|
|
|
|
C.free(unsafe.Pointer(_out))
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_TrUtf8(s string) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
|
|
|
var _out *C.char = nil
|
|
|
|
var _out_Strlen C.int = 0
|
|
|
|
C.QInputDialog_TrUtf8(s_Cstring, &_out, &_out_Strlen)
|
|
|
|
ret := C.GoStringN(_out, _out_Strlen)
|
|
|
|
C.free(unsafe.Pointer(_out))
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QInputDialog) SetInputMode(mode QInputDialog__InputMode) {
|
2024-08-29 07:01:51 +00:00
|
|
|
C.QInputDialog_SetInputMode(this.h, (C.uintptr_t)(mode))
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QInputDialog) InputMode() QInputDialog__InputMode {
|
2024-08-29 07:01:51 +00:00
|
|
|
ret := C.QInputDialog_InputMode(this.h)
|
2024-09-04 06:54:22 +00:00
|
|
|
return (QInputDialog__InputMode)(ret)
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QInputDialog) SetLabelText(text string) {
|
|
|
|
text_Cstring := C.CString(text)
|
|
|
|
defer C.free(unsafe.Pointer(text_Cstring))
|
2024-09-01 06:50:42 +00:00
|
|
|
C.QInputDialog_SetLabelText(this.h, text_Cstring, C.size_t(len(text)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) LabelText() string {
|
|
|
|
var _out *C.char = nil
|
|
|
|
var _out_Strlen C.int = 0
|
|
|
|
C.QInputDialog_LabelText(this.h, &_out, &_out_Strlen)
|
|
|
|
ret := C.GoStringN(_out, _out_Strlen)
|
|
|
|
C.free(unsafe.Pointer(_out))
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QInputDialog) SetOption(option QInputDialog__InputDialogOption) {
|
2024-08-29 07:01:51 +00:00
|
|
|
C.QInputDialog_SetOption(this.h, (C.uintptr_t)(option))
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QInputDialog) TestOption(option QInputDialog__InputDialogOption) bool {
|
2024-08-29 07:01:51 +00:00
|
|
|
ret := C.QInputDialog_TestOption(this.h, (C.uintptr_t)(option))
|
|
|
|
return (bool)(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) SetOptions(options int) {
|
|
|
|
C.QInputDialog_SetOptions(this.h, (C.int)(options))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) Options() int {
|
|
|
|
ret := C.QInputDialog_Options(this.h)
|
|
|
|
return (int)(ret)
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QInputDialog) SetTextValue(text string) {
|
|
|
|
text_Cstring := C.CString(text)
|
|
|
|
defer C.free(unsafe.Pointer(text_Cstring))
|
2024-09-01 06:50:42 +00:00
|
|
|
C.QInputDialog_SetTextValue(this.h, text_Cstring, C.size_t(len(text)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) TextValue() string {
|
|
|
|
var _out *C.char = nil
|
|
|
|
var _out_Strlen C.int = 0
|
|
|
|
C.QInputDialog_TextValue(this.h, &_out, &_out_Strlen)
|
|
|
|
ret := C.GoStringN(_out, _out_Strlen)
|
|
|
|
C.free(unsafe.Pointer(_out))
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QInputDialog) SetTextEchoMode(mode QLineEdit__EchoMode) {
|
2024-08-29 07:01:51 +00:00
|
|
|
C.QInputDialog_SetTextEchoMode(this.h, (C.uintptr_t)(mode))
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QInputDialog) TextEchoMode() QLineEdit__EchoMode {
|
2024-08-29 07:01:51 +00:00
|
|
|
ret := C.QInputDialog_TextEchoMode(this.h)
|
2024-09-04 06:54:22 +00:00
|
|
|
return (QLineEdit__EchoMode)(ret)
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QInputDialog) SetComboBoxEditable(editable bool) {
|
|
|
|
C.QInputDialog_SetComboBoxEditable(this.h, (C.bool)(editable))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) IsComboBoxEditable() bool {
|
|
|
|
ret := C.QInputDialog_IsComboBoxEditable(this.h)
|
|
|
|
return (bool)(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) SetComboBoxItems(items []string) {
|
|
|
|
// For the C ABI, malloc two C arrays; raw char* pointers and their lengths
|
2024-09-01 05:51:28 +00:00
|
|
|
items_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(items))))
|
2024-09-01 06:50:42 +00:00
|
|
|
items_Lengths := (*[0xffff]C.uint64_t)(C.malloc(C.size_t(8 * len(items))))
|
2024-08-25 04:08:24 +00:00
|
|
|
defer C.free(unsafe.Pointer(items_CArray))
|
|
|
|
defer C.free(unsafe.Pointer(items_Lengths))
|
|
|
|
for i := range items {
|
|
|
|
single_cstring := C.CString(items[i])
|
|
|
|
defer C.free(unsafe.Pointer(single_cstring))
|
|
|
|
items_CArray[i] = single_cstring
|
2024-09-01 06:50:42 +00:00
|
|
|
items_Lengths[i] = (C.uint64_t)(len(items[i]))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-01 06:50:42 +00:00
|
|
|
C.QInputDialog_SetComboBoxItems(this.h, &items_CArray[0], &items_Lengths[0], C.size_t(len(items)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) ComboBoxItems() []string {
|
|
|
|
var _out **C.char = nil
|
|
|
|
var _out_Lengths *C.int = nil
|
|
|
|
var _out_len C.size_t = 0
|
|
|
|
C.QInputDialog_ComboBoxItems(this.h, &_out, &_out_Lengths, &_out_len)
|
|
|
|
ret := make([]string, int(_out_len))
|
|
|
|
_outCast := (*[0xffff]*C.char)(unsafe.Pointer(_out)) // hey ya
|
|
|
|
_out_LengthsCast := (*[0xffff]C.int)(unsafe.Pointer(_out_Lengths))
|
|
|
|
for i := 0; i < int(_out_len); i++ {
|
|
|
|
ret[i] = C.GoStringN(_outCast[i], _out_LengthsCast[i])
|
|
|
|
}
|
|
|
|
C.free(unsafe.Pointer(_out))
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) SetIntValue(value int) {
|
|
|
|
C.QInputDialog_SetIntValue(this.h, (C.int)(value))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) IntValue() int {
|
|
|
|
ret := C.QInputDialog_IntValue(this.h)
|
|
|
|
return (int)(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) SetIntMinimum(min int) {
|
|
|
|
C.QInputDialog_SetIntMinimum(this.h, (C.int)(min))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) IntMinimum() int {
|
|
|
|
ret := C.QInputDialog_IntMinimum(this.h)
|
|
|
|
return (int)(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) SetIntMaximum(max int) {
|
|
|
|
C.QInputDialog_SetIntMaximum(this.h, (C.int)(max))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) IntMaximum() int {
|
|
|
|
ret := C.QInputDialog_IntMaximum(this.h)
|
|
|
|
return (int)(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) SetIntRange(min int, max int) {
|
|
|
|
C.QInputDialog_SetIntRange(this.h, (C.int)(min), (C.int)(max))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) SetIntStep(step int) {
|
|
|
|
C.QInputDialog_SetIntStep(this.h, (C.int)(step))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) IntStep() int {
|
|
|
|
ret := C.QInputDialog_IntStep(this.h)
|
|
|
|
return (int)(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) SetDoubleValue(value float64) {
|
|
|
|
C.QInputDialog_SetDoubleValue(this.h, (C.double)(value))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) DoubleValue() float64 {
|
|
|
|
ret := C.QInputDialog_DoubleValue(this.h)
|
|
|
|
return (float64)(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) SetDoubleMinimum(min float64) {
|
|
|
|
C.QInputDialog_SetDoubleMinimum(this.h, (C.double)(min))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) DoubleMinimum() float64 {
|
|
|
|
ret := C.QInputDialog_DoubleMinimum(this.h)
|
|
|
|
return (float64)(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) SetDoubleMaximum(max float64) {
|
|
|
|
C.QInputDialog_SetDoubleMaximum(this.h, (C.double)(max))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) DoubleMaximum() float64 {
|
|
|
|
ret := C.QInputDialog_DoubleMaximum(this.h)
|
|
|
|
return (float64)(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) SetDoubleRange(min float64, max float64) {
|
|
|
|
C.QInputDialog_SetDoubleRange(this.h, (C.double)(min), (C.double)(max))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) SetDoubleDecimals(decimals int) {
|
|
|
|
C.QInputDialog_SetDoubleDecimals(this.h, (C.int)(decimals))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) DoubleDecimals() int {
|
|
|
|
ret := C.QInputDialog_DoubleDecimals(this.h)
|
|
|
|
return (int)(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) SetOkButtonText(text string) {
|
|
|
|
text_Cstring := C.CString(text)
|
|
|
|
defer C.free(unsafe.Pointer(text_Cstring))
|
2024-09-01 06:50:42 +00:00
|
|
|
C.QInputDialog_SetOkButtonText(this.h, text_Cstring, C.size_t(len(text)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) OkButtonText() string {
|
|
|
|
var _out *C.char = nil
|
|
|
|
var _out_Strlen C.int = 0
|
|
|
|
C.QInputDialog_OkButtonText(this.h, &_out, &_out_Strlen)
|
|
|
|
ret := C.GoStringN(_out, _out_Strlen)
|
|
|
|
C.free(unsafe.Pointer(_out))
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) SetCancelButtonText(text string) {
|
|
|
|
text_Cstring := C.CString(text)
|
|
|
|
defer C.free(unsafe.Pointer(text_Cstring))
|
2024-09-01 06:50:42 +00:00
|
|
|
C.QInputDialog_SetCancelButtonText(this.h, text_Cstring, C.size_t(len(text)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) CancelButtonText() string {
|
|
|
|
var _out *C.char = nil
|
|
|
|
var _out_Strlen C.int = 0
|
|
|
|
C.QInputDialog_CancelButtonText(this.h, &_out, &_out_Strlen)
|
|
|
|
ret := C.GoStringN(_out, _out_Strlen)
|
|
|
|
C.free(unsafe.Pointer(_out))
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) MinimumSizeHint() *QSize {
|
|
|
|
ret := C.QInputDialog_MinimumSizeHint(this.h)
|
|
|
|
// Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
ret1 := newQSize(ret)
|
|
|
|
runtime.SetFinalizer(ret1, func(ret2 *QSize) {
|
|
|
|
ret2.Delete()
|
|
|
|
runtime.KeepAlive(ret2.h)
|
|
|
|
})
|
|
|
|
return ret1
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) SizeHint() *QSize {
|
|
|
|
ret := C.QInputDialog_SizeHint(this.h)
|
|
|
|
// Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
ret1 := newQSize(ret)
|
|
|
|
runtime.SetFinalizer(ret1, func(ret2 *QSize) {
|
|
|
|
ret2.Delete()
|
|
|
|
runtime.KeepAlive(ret2.h)
|
|
|
|
})
|
|
|
|
return ret1
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) SetVisible(visible bool) {
|
|
|
|
C.QInputDialog_SetVisible(this.h, (C.bool)(visible))
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
func QInputDialog_GetText(parent *QWidget, title string, label string) string {
|
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
|
|
|
var _out *C.char = nil
|
|
|
|
var _out_Strlen C.int = 0
|
2024-09-01 06:50:42 +00:00
|
|
|
C.QInputDialog_GetText(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)), &_out, &_out_Strlen)
|
2024-08-29 07:01:51 +00:00
|
|
|
ret := C.GoStringN(_out, _out_Strlen)
|
|
|
|
C.free(unsafe.Pointer(_out))
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_GetMultiLineText(parent *QWidget, title string, label string) string {
|
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
|
|
|
var _out *C.char = nil
|
|
|
|
var _out_Strlen C.int = 0
|
2024-09-01 06:50:42 +00:00
|
|
|
C.QInputDialog_GetMultiLineText(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)), &_out, &_out_Strlen)
|
2024-08-29 07:01:51 +00:00
|
|
|
ret := C.GoStringN(_out, _out_Strlen)
|
|
|
|
C.free(unsafe.Pointer(_out))
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_GetItem(parent *QWidget, title string, label string, items []string) string {
|
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
|
|
|
// For the C ABI, malloc two C arrays; raw char* pointers and their lengths
|
2024-09-01 05:51:28 +00:00
|
|
|
items_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(items))))
|
2024-09-01 06:50:42 +00:00
|
|
|
items_Lengths := (*[0xffff]C.uint64_t)(C.malloc(C.size_t(8 * len(items))))
|
2024-08-29 07:01:51 +00:00
|
|
|
defer C.free(unsafe.Pointer(items_CArray))
|
|
|
|
defer C.free(unsafe.Pointer(items_Lengths))
|
|
|
|
for i := range items {
|
|
|
|
single_cstring := C.CString(items[i])
|
|
|
|
defer C.free(unsafe.Pointer(single_cstring))
|
|
|
|
items_CArray[i] = single_cstring
|
2024-09-01 06:50:42 +00:00
|
|
|
items_Lengths[i] = (C.uint64_t)(len(items[i]))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
var _out *C.char = nil
|
|
|
|
var _out_Strlen C.int = 0
|
2024-09-01 06:50:42 +00:00
|
|
|
C.QInputDialog_GetItem(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)), &items_CArray[0], &items_Lengths[0], C.size_t(len(items)), &_out, &_out_Strlen)
|
2024-08-29 07:01:51 +00:00
|
|
|
ret := C.GoStringN(_out, _out_Strlen)
|
|
|
|
C.free(unsafe.Pointer(_out))
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_GetInt(parent *QWidget, title string, label string) int {
|
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
2024-09-01 06:50:42 +00:00
|
|
|
ret := C.QInputDialog_GetInt(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)))
|
2024-08-29 07:01:51 +00:00
|
|
|
return (int)(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_GetDouble(parent *QWidget, title string, label string) float64 {
|
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
2024-09-01 06:50:42 +00:00
|
|
|
ret := C.QInputDialog_GetDouble(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)))
|
2024-08-29 07:01:51 +00:00
|
|
|
return (float64)(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_GetDouble2(parent *QWidget, title string, label string, value float64, minValue float64, maxValue float64, decimals int, ok *bool, flags int, step float64) float64 {
|
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
2024-09-01 06:50:42 +00:00
|
|
|
ret := C.QInputDialog_GetDouble2(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)), (C.double)(value), (C.double)(minValue), (C.double)(maxValue), (C.int)(decimals), (*C.bool)(unsafe.Pointer(ok)), (C.int)(flags), (C.double)(step))
|
2024-08-29 07:01:51 +00:00
|
|
|
return (float64)(ret)
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QInputDialog) SetDoubleStep(step float64) {
|
|
|
|
C.QInputDialog_SetDoubleStep(this.h, (C.double)(step))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) DoubleStep() float64 {
|
|
|
|
ret := C.QInputDialog_DoubleStep(this.h)
|
|
|
|
return (float64)(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) TextValueChanged(text string) {
|
|
|
|
text_Cstring := C.CString(text)
|
|
|
|
defer C.free(unsafe.Pointer(text_Cstring))
|
2024-09-01 06:50:42 +00:00
|
|
|
C.QInputDialog_TextValueChanged(this.h, text_Cstring, C.size_t(len(text)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) OnTextValueChanged(slot func()) {
|
|
|
|
var slotWrapper miqtCallbackFunc = func(argc C.int, args *C.void) {
|
|
|
|
slot()
|
|
|
|
}
|
|
|
|
|
|
|
|
C.QInputDialog_connect_TextValueChanged(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slotWrapper))))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) TextValueSelected(text string) {
|
|
|
|
text_Cstring := C.CString(text)
|
|
|
|
defer C.free(unsafe.Pointer(text_Cstring))
|
2024-09-01 06:50:42 +00:00
|
|
|
C.QInputDialog_TextValueSelected(this.h, text_Cstring, C.size_t(len(text)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) OnTextValueSelected(slot func()) {
|
|
|
|
var slotWrapper miqtCallbackFunc = func(argc C.int, args *C.void) {
|
|
|
|
slot()
|
|
|
|
}
|
|
|
|
|
|
|
|
C.QInputDialog_connect_TextValueSelected(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slotWrapper))))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) IntValueChanged(value int) {
|
|
|
|
C.QInputDialog_IntValueChanged(this.h, (C.int)(value))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) OnIntValueChanged(slot func()) {
|
|
|
|
var slotWrapper miqtCallbackFunc = func(argc C.int, args *C.void) {
|
|
|
|
slot()
|
|
|
|
}
|
|
|
|
|
|
|
|
C.QInputDialog_connect_IntValueChanged(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slotWrapper))))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) IntValueSelected(value int) {
|
|
|
|
C.QInputDialog_IntValueSelected(this.h, (C.int)(value))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) OnIntValueSelected(slot func()) {
|
|
|
|
var slotWrapper miqtCallbackFunc = func(argc C.int, args *C.void) {
|
|
|
|
slot()
|
|
|
|
}
|
|
|
|
|
|
|
|
C.QInputDialog_connect_IntValueSelected(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slotWrapper))))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) DoubleValueChanged(value float64) {
|
|
|
|
C.QInputDialog_DoubleValueChanged(this.h, (C.double)(value))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) OnDoubleValueChanged(slot func()) {
|
|
|
|
var slotWrapper miqtCallbackFunc = func(argc C.int, args *C.void) {
|
|
|
|
slot()
|
|
|
|
}
|
|
|
|
|
|
|
|
C.QInputDialog_connect_DoubleValueChanged(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slotWrapper))))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) DoubleValueSelected(value float64) {
|
|
|
|
C.QInputDialog_DoubleValueSelected(this.h, (C.double)(value))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) OnDoubleValueSelected(slot func()) {
|
|
|
|
var slotWrapper miqtCallbackFunc = func(argc C.int, args *C.void) {
|
|
|
|
slot()
|
|
|
|
}
|
|
|
|
|
|
|
|
C.QInputDialog_connect_DoubleValueSelected(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slotWrapper))))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QInputDialog) Done(result int) {
|
|
|
|
C.QInputDialog_Done(this.h, (C.int)(result))
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_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 _out *C.char = nil
|
|
|
|
var _out_Strlen C.int = 0
|
|
|
|
C.QInputDialog_Tr2(s_Cstring, c_Cstring, &_out, &_out_Strlen)
|
|
|
|
ret := C.GoStringN(_out, _out_Strlen)
|
|
|
|
C.free(unsafe.Pointer(_out))
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_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 _out *C.char = nil
|
|
|
|
var _out_Strlen C.int = 0
|
|
|
|
C.QInputDialog_Tr3(s_Cstring, c_Cstring, (C.int)(n), &_out, &_out_Strlen)
|
|
|
|
ret := C.GoStringN(_out, _out_Strlen)
|
|
|
|
C.free(unsafe.Pointer(_out))
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_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 _out *C.char = nil
|
|
|
|
var _out_Strlen C.int = 0
|
|
|
|
C.QInputDialog_TrUtf82(s_Cstring, c_Cstring, &_out, &_out_Strlen)
|
|
|
|
ret := C.GoStringN(_out, _out_Strlen)
|
|
|
|
C.free(unsafe.Pointer(_out))
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_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 _out *C.char = nil
|
|
|
|
var _out_Strlen C.int = 0
|
|
|
|
C.QInputDialog_TrUtf83(s_Cstring, c_Cstring, (C.int)(n), &_out, &_out_Strlen)
|
|
|
|
ret := C.GoStringN(_out, _out_Strlen)
|
|
|
|
C.free(unsafe.Pointer(_out))
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QInputDialog) SetOption2(option QInputDialog__InputDialogOption, on bool) {
|
2024-08-29 07:01:51 +00:00
|
|
|
C.QInputDialog_SetOption2(this.h, (C.uintptr_t)(option), (C.bool)(on))
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func QInputDialog_GetText4(parent *QWidget, title string, label string, echo QLineEdit__EchoMode) string {
|
2024-08-29 07:01:51 +00:00
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
|
|
|
var _out *C.char = nil
|
|
|
|
var _out_Strlen C.int = 0
|
2024-09-01 06:50:42 +00:00
|
|
|
C.QInputDialog_GetText4(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)), (C.uintptr_t)(echo), &_out, &_out_Strlen)
|
2024-08-29 07:01:51 +00:00
|
|
|
ret := C.GoStringN(_out, _out_Strlen)
|
|
|
|
C.free(unsafe.Pointer(_out))
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func QInputDialog_GetText5(parent *QWidget, title string, label string, echo QLineEdit__EchoMode, text string) string {
|
2024-08-29 07:01:51 +00:00
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
|
|
|
text_Cstring := C.CString(text)
|
|
|
|
defer C.free(unsafe.Pointer(text_Cstring))
|
|
|
|
var _out *C.char = nil
|
|
|
|
var _out_Strlen C.int = 0
|
2024-09-01 06:50:42 +00:00
|
|
|
C.QInputDialog_GetText5(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)), (C.uintptr_t)(echo), text_Cstring, C.size_t(len(text)), &_out, &_out_Strlen)
|
2024-08-29 07:01:51 +00:00
|
|
|
ret := C.GoStringN(_out, _out_Strlen)
|
|
|
|
C.free(unsafe.Pointer(_out))
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func QInputDialog_GetText6(parent *QWidget, title string, label string, echo QLineEdit__EchoMode, text string, ok *bool) string {
|
2024-08-29 07:01:51 +00:00
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
|
|
|
text_Cstring := C.CString(text)
|
|
|
|
defer C.free(unsafe.Pointer(text_Cstring))
|
|
|
|
var _out *C.char = nil
|
|
|
|
var _out_Strlen C.int = 0
|
2024-09-01 06:50:42 +00:00
|
|
|
C.QInputDialog_GetText6(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)), (C.uintptr_t)(echo), text_Cstring, C.size_t(len(text)), (*C.bool)(unsafe.Pointer(ok)), &_out, &_out_Strlen)
|
2024-08-29 07:01:51 +00:00
|
|
|
ret := C.GoStringN(_out, _out_Strlen)
|
|
|
|
C.free(unsafe.Pointer(_out))
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func QInputDialog_GetText7(parent *QWidget, title string, label string, echo QLineEdit__EchoMode, text string, ok *bool, flags int) string {
|
2024-08-29 07:01:51 +00:00
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
|
|
|
text_Cstring := C.CString(text)
|
|
|
|
defer C.free(unsafe.Pointer(text_Cstring))
|
|
|
|
var _out *C.char = nil
|
|
|
|
var _out_Strlen C.int = 0
|
2024-09-01 06:50:42 +00:00
|
|
|
C.QInputDialog_GetText7(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)), (C.uintptr_t)(echo), text_Cstring, C.size_t(len(text)), (*C.bool)(unsafe.Pointer(ok)), (C.int)(flags), &_out, &_out_Strlen)
|
2024-08-29 07:01:51 +00:00
|
|
|
ret := C.GoStringN(_out, _out_Strlen)
|
|
|
|
C.free(unsafe.Pointer(_out))
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func QInputDialog_GetText8(parent *QWidget, title string, label string, echo QLineEdit__EchoMode, text string, ok *bool, flags int, inputMethodHints int) string {
|
2024-08-29 07:01:51 +00:00
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
|
|
|
text_Cstring := C.CString(text)
|
|
|
|
defer C.free(unsafe.Pointer(text_Cstring))
|
|
|
|
var _out *C.char = nil
|
|
|
|
var _out_Strlen C.int = 0
|
2024-09-01 06:50:42 +00:00
|
|
|
C.QInputDialog_GetText8(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)), (C.uintptr_t)(echo), text_Cstring, C.size_t(len(text)), (*C.bool)(unsafe.Pointer(ok)), (C.int)(flags), (C.int)(inputMethodHints), &_out, &_out_Strlen)
|
2024-08-29 07:01:51 +00:00
|
|
|
ret := C.GoStringN(_out, _out_Strlen)
|
|
|
|
C.free(unsafe.Pointer(_out))
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_GetMultiLineText4(parent *QWidget, title string, label string, text string) string {
|
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
|
|
|
text_Cstring := C.CString(text)
|
|
|
|
defer C.free(unsafe.Pointer(text_Cstring))
|
|
|
|
var _out *C.char = nil
|
|
|
|
var _out_Strlen C.int = 0
|
2024-09-01 06:50:42 +00:00
|
|
|
C.QInputDialog_GetMultiLineText4(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)), text_Cstring, C.size_t(len(text)), &_out, &_out_Strlen)
|
2024-08-29 07:01:51 +00:00
|
|
|
ret := C.GoStringN(_out, _out_Strlen)
|
|
|
|
C.free(unsafe.Pointer(_out))
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_GetMultiLineText5(parent *QWidget, title string, label string, text string, ok *bool) string {
|
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
|
|
|
text_Cstring := C.CString(text)
|
|
|
|
defer C.free(unsafe.Pointer(text_Cstring))
|
|
|
|
var _out *C.char = nil
|
|
|
|
var _out_Strlen C.int = 0
|
2024-09-01 06:50:42 +00:00
|
|
|
C.QInputDialog_GetMultiLineText5(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)), text_Cstring, C.size_t(len(text)), (*C.bool)(unsafe.Pointer(ok)), &_out, &_out_Strlen)
|
2024-08-29 07:01:51 +00:00
|
|
|
ret := C.GoStringN(_out, _out_Strlen)
|
|
|
|
C.free(unsafe.Pointer(_out))
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_GetMultiLineText6(parent *QWidget, title string, label string, text string, ok *bool, flags int) string {
|
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
|
|
|
text_Cstring := C.CString(text)
|
|
|
|
defer C.free(unsafe.Pointer(text_Cstring))
|
|
|
|
var _out *C.char = nil
|
|
|
|
var _out_Strlen C.int = 0
|
2024-09-01 06:50:42 +00:00
|
|
|
C.QInputDialog_GetMultiLineText6(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)), text_Cstring, C.size_t(len(text)), (*C.bool)(unsafe.Pointer(ok)), (C.int)(flags), &_out, &_out_Strlen)
|
2024-08-29 07:01:51 +00:00
|
|
|
ret := C.GoStringN(_out, _out_Strlen)
|
|
|
|
C.free(unsafe.Pointer(_out))
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_GetMultiLineText7(parent *QWidget, title string, label string, text string, ok *bool, flags int, inputMethodHints int) string {
|
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
|
|
|
text_Cstring := C.CString(text)
|
|
|
|
defer C.free(unsafe.Pointer(text_Cstring))
|
|
|
|
var _out *C.char = nil
|
|
|
|
var _out_Strlen C.int = 0
|
2024-09-01 06:50:42 +00:00
|
|
|
C.QInputDialog_GetMultiLineText7(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)), text_Cstring, C.size_t(len(text)), (*C.bool)(unsafe.Pointer(ok)), (C.int)(flags), (C.int)(inputMethodHints), &_out, &_out_Strlen)
|
2024-08-29 07:01:51 +00:00
|
|
|
ret := C.GoStringN(_out, _out_Strlen)
|
|
|
|
C.free(unsafe.Pointer(_out))
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_GetItem5(parent *QWidget, title string, label string, items []string, current int) string {
|
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
|
|
|
// For the C ABI, malloc two C arrays; raw char* pointers and their lengths
|
2024-09-01 05:51:28 +00:00
|
|
|
items_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(items))))
|
2024-09-01 06:50:42 +00:00
|
|
|
items_Lengths := (*[0xffff]C.uint64_t)(C.malloc(C.size_t(8 * len(items))))
|
2024-08-29 07:01:51 +00:00
|
|
|
defer C.free(unsafe.Pointer(items_CArray))
|
|
|
|
defer C.free(unsafe.Pointer(items_Lengths))
|
|
|
|
for i := range items {
|
|
|
|
single_cstring := C.CString(items[i])
|
|
|
|
defer C.free(unsafe.Pointer(single_cstring))
|
|
|
|
items_CArray[i] = single_cstring
|
2024-09-01 06:50:42 +00:00
|
|
|
items_Lengths[i] = (C.uint64_t)(len(items[i]))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
var _out *C.char = nil
|
|
|
|
var _out_Strlen C.int = 0
|
2024-09-01 06:50:42 +00:00
|
|
|
C.QInputDialog_GetItem5(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)), &items_CArray[0], &items_Lengths[0], C.size_t(len(items)), (C.int)(current), &_out, &_out_Strlen)
|
2024-08-29 07:01:51 +00:00
|
|
|
ret := C.GoStringN(_out, _out_Strlen)
|
|
|
|
C.free(unsafe.Pointer(_out))
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_GetItem6(parent *QWidget, title string, label string, items []string, current int, editable bool) string {
|
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
|
|
|
// For the C ABI, malloc two C arrays; raw char* pointers and their lengths
|
2024-09-01 05:51:28 +00:00
|
|
|
items_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(items))))
|
2024-09-01 06:50:42 +00:00
|
|
|
items_Lengths := (*[0xffff]C.uint64_t)(C.malloc(C.size_t(8 * len(items))))
|
2024-08-29 07:01:51 +00:00
|
|
|
defer C.free(unsafe.Pointer(items_CArray))
|
|
|
|
defer C.free(unsafe.Pointer(items_Lengths))
|
|
|
|
for i := range items {
|
|
|
|
single_cstring := C.CString(items[i])
|
|
|
|
defer C.free(unsafe.Pointer(single_cstring))
|
|
|
|
items_CArray[i] = single_cstring
|
2024-09-01 06:50:42 +00:00
|
|
|
items_Lengths[i] = (C.uint64_t)(len(items[i]))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
var _out *C.char = nil
|
|
|
|
var _out_Strlen C.int = 0
|
2024-09-01 06:50:42 +00:00
|
|
|
C.QInputDialog_GetItem6(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)), &items_CArray[0], &items_Lengths[0], C.size_t(len(items)), (C.int)(current), (C.bool)(editable), &_out, &_out_Strlen)
|
2024-08-29 07:01:51 +00:00
|
|
|
ret := C.GoStringN(_out, _out_Strlen)
|
|
|
|
C.free(unsafe.Pointer(_out))
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_GetItem7(parent *QWidget, title string, label string, items []string, current int, editable bool, ok *bool) string {
|
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
|
|
|
// For the C ABI, malloc two C arrays; raw char* pointers and their lengths
|
2024-09-01 05:51:28 +00:00
|
|
|
items_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(items))))
|
2024-09-01 06:50:42 +00:00
|
|
|
items_Lengths := (*[0xffff]C.uint64_t)(C.malloc(C.size_t(8 * len(items))))
|
2024-08-29 07:01:51 +00:00
|
|
|
defer C.free(unsafe.Pointer(items_CArray))
|
|
|
|
defer C.free(unsafe.Pointer(items_Lengths))
|
|
|
|
for i := range items {
|
|
|
|
single_cstring := C.CString(items[i])
|
|
|
|
defer C.free(unsafe.Pointer(single_cstring))
|
|
|
|
items_CArray[i] = single_cstring
|
2024-09-01 06:50:42 +00:00
|
|
|
items_Lengths[i] = (C.uint64_t)(len(items[i]))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
var _out *C.char = nil
|
|
|
|
var _out_Strlen C.int = 0
|
2024-09-01 06:50:42 +00:00
|
|
|
C.QInputDialog_GetItem7(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)), &items_CArray[0], &items_Lengths[0], C.size_t(len(items)), (C.int)(current), (C.bool)(editable), (*C.bool)(unsafe.Pointer(ok)), &_out, &_out_Strlen)
|
2024-08-29 07:01:51 +00:00
|
|
|
ret := C.GoStringN(_out, _out_Strlen)
|
|
|
|
C.free(unsafe.Pointer(_out))
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_GetItem8(parent *QWidget, title string, label string, items []string, current int, editable bool, ok *bool, flags int) string {
|
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
|
|
|
// For the C ABI, malloc two C arrays; raw char* pointers and their lengths
|
2024-09-01 05:51:28 +00:00
|
|
|
items_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(items))))
|
2024-09-01 06:50:42 +00:00
|
|
|
items_Lengths := (*[0xffff]C.uint64_t)(C.malloc(C.size_t(8 * len(items))))
|
2024-08-29 07:01:51 +00:00
|
|
|
defer C.free(unsafe.Pointer(items_CArray))
|
|
|
|
defer C.free(unsafe.Pointer(items_Lengths))
|
|
|
|
for i := range items {
|
|
|
|
single_cstring := C.CString(items[i])
|
|
|
|
defer C.free(unsafe.Pointer(single_cstring))
|
|
|
|
items_CArray[i] = single_cstring
|
2024-09-01 06:50:42 +00:00
|
|
|
items_Lengths[i] = (C.uint64_t)(len(items[i]))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
var _out *C.char = nil
|
|
|
|
var _out_Strlen C.int = 0
|
2024-09-01 06:50:42 +00:00
|
|
|
C.QInputDialog_GetItem8(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)), &items_CArray[0], &items_Lengths[0], C.size_t(len(items)), (C.int)(current), (C.bool)(editable), (*C.bool)(unsafe.Pointer(ok)), (C.int)(flags), &_out, &_out_Strlen)
|
2024-08-29 07:01:51 +00:00
|
|
|
ret := C.GoStringN(_out, _out_Strlen)
|
|
|
|
C.free(unsafe.Pointer(_out))
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_GetItem9(parent *QWidget, title string, label string, items []string, current int, editable bool, ok *bool, flags int, inputMethodHints int) string {
|
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
|
|
|
// For the C ABI, malloc two C arrays; raw char* pointers and their lengths
|
2024-09-01 05:51:28 +00:00
|
|
|
items_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(items))))
|
2024-09-01 06:50:42 +00:00
|
|
|
items_Lengths := (*[0xffff]C.uint64_t)(C.malloc(C.size_t(8 * len(items))))
|
2024-08-29 07:01:51 +00:00
|
|
|
defer C.free(unsafe.Pointer(items_CArray))
|
|
|
|
defer C.free(unsafe.Pointer(items_Lengths))
|
|
|
|
for i := range items {
|
|
|
|
single_cstring := C.CString(items[i])
|
|
|
|
defer C.free(unsafe.Pointer(single_cstring))
|
|
|
|
items_CArray[i] = single_cstring
|
2024-09-01 06:50:42 +00:00
|
|
|
items_Lengths[i] = (C.uint64_t)(len(items[i]))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
var _out *C.char = nil
|
|
|
|
var _out_Strlen C.int = 0
|
2024-09-01 06:50:42 +00:00
|
|
|
C.QInputDialog_GetItem9(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)), &items_CArray[0], &items_Lengths[0], C.size_t(len(items)), (C.int)(current), (C.bool)(editable), (*C.bool)(unsafe.Pointer(ok)), (C.int)(flags), (C.int)(inputMethodHints), &_out, &_out_Strlen)
|
2024-08-29 07:01:51 +00:00
|
|
|
ret := C.GoStringN(_out, _out_Strlen)
|
|
|
|
C.free(unsafe.Pointer(_out))
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_GetInt4(parent *QWidget, title string, label string, value int) int {
|
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
2024-09-01 06:50:42 +00:00
|
|
|
ret := C.QInputDialog_GetInt4(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)), (C.int)(value))
|
2024-08-29 07:01:51 +00:00
|
|
|
return (int)(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_GetInt5(parent *QWidget, title string, label string, value int, minValue int) int {
|
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
2024-09-01 06:50:42 +00:00
|
|
|
ret := C.QInputDialog_GetInt5(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)), (C.int)(value), (C.int)(minValue))
|
2024-08-29 07:01:51 +00:00
|
|
|
return (int)(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_GetInt6(parent *QWidget, title string, label string, value int, minValue int, maxValue int) int {
|
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
2024-09-01 06:50:42 +00:00
|
|
|
ret := C.QInputDialog_GetInt6(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)), (C.int)(value), (C.int)(minValue), (C.int)(maxValue))
|
2024-08-29 07:01:51 +00:00
|
|
|
return (int)(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_GetInt7(parent *QWidget, title string, label string, value int, minValue int, maxValue int, step int) int {
|
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
2024-09-01 06:50:42 +00:00
|
|
|
ret := C.QInputDialog_GetInt7(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)), (C.int)(value), (C.int)(minValue), (C.int)(maxValue), (C.int)(step))
|
2024-08-29 07:01:51 +00:00
|
|
|
return (int)(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_GetInt8(parent *QWidget, title string, label string, value int, minValue int, maxValue int, step int, ok *bool) int {
|
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
2024-09-01 06:50:42 +00:00
|
|
|
ret := C.QInputDialog_GetInt8(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)), (C.int)(value), (C.int)(minValue), (C.int)(maxValue), (C.int)(step), (*C.bool)(unsafe.Pointer(ok)))
|
2024-08-29 07:01:51 +00:00
|
|
|
return (int)(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_GetInt9(parent *QWidget, title string, label string, value int, minValue int, maxValue int, step int, ok *bool, flags int) int {
|
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
2024-09-01 06:50:42 +00:00
|
|
|
ret := C.QInputDialog_GetInt9(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)), (C.int)(value), (C.int)(minValue), (C.int)(maxValue), (C.int)(step), (*C.bool)(unsafe.Pointer(ok)), (C.int)(flags))
|
2024-08-29 07:01:51 +00:00
|
|
|
return (int)(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_GetDouble4(parent *QWidget, title string, label string, value float64) float64 {
|
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
2024-09-01 06:50:42 +00:00
|
|
|
ret := C.QInputDialog_GetDouble4(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)), (C.double)(value))
|
2024-08-29 07:01:51 +00:00
|
|
|
return (float64)(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_GetDouble5(parent *QWidget, title string, label string, value float64, minValue float64) float64 {
|
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
2024-09-01 06:50:42 +00:00
|
|
|
ret := C.QInputDialog_GetDouble5(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)), (C.double)(value), (C.double)(minValue))
|
2024-08-29 07:01:51 +00:00
|
|
|
return (float64)(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_GetDouble6(parent *QWidget, title string, label string, value float64, minValue float64, maxValue float64) float64 {
|
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
2024-09-01 06:50:42 +00:00
|
|
|
ret := C.QInputDialog_GetDouble6(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)), (C.double)(value), (C.double)(minValue), (C.double)(maxValue))
|
2024-08-29 07:01:51 +00:00
|
|
|
return (float64)(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_GetDouble7(parent *QWidget, title string, label string, value float64, minValue float64, maxValue float64, decimals int) float64 {
|
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
2024-09-01 06:50:42 +00:00
|
|
|
ret := C.QInputDialog_GetDouble7(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)), (C.double)(value), (C.double)(minValue), (C.double)(maxValue), (C.int)(decimals))
|
2024-08-29 07:01:51 +00:00
|
|
|
return (float64)(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_GetDouble8(parent *QWidget, title string, label string, value float64, minValue float64, maxValue float64, decimals int, ok *bool) float64 {
|
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
2024-09-01 06:50:42 +00:00
|
|
|
ret := C.QInputDialog_GetDouble8(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)), (C.double)(value), (C.double)(minValue), (C.double)(maxValue), (C.int)(decimals), (*C.bool)(unsafe.Pointer(ok)))
|
2024-08-29 07:01:51 +00:00
|
|
|
return (float64)(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func QInputDialog_GetDouble9(parent *QWidget, title string, label string, value float64, minValue float64, maxValue float64, decimals int, ok *bool, flags int) float64 {
|
|
|
|
title_Cstring := C.CString(title)
|
|
|
|
defer C.free(unsafe.Pointer(title_Cstring))
|
|
|
|
label_Cstring := C.CString(label)
|
|
|
|
defer C.free(unsafe.Pointer(label_Cstring))
|
2024-09-01 06:50:42 +00:00
|
|
|
ret := C.QInputDialog_GetDouble9(parent.cPointer(), title_Cstring, C.size_t(len(title)), label_Cstring, C.size_t(len(label)), (C.double)(value), (C.double)(minValue), (C.double)(maxValue), (C.int)(decimals), (*C.bool)(unsafe.Pointer(ok)), (C.int)(flags))
|
2024-08-29 07:01:51 +00:00
|
|
|
return (float64)(ret)
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QInputDialog) Delete() {
|
|
|
|
C.QInputDialog_Delete(this.h)
|
|
|
|
}
|