package qt /* #include "gen_qvalidator.h" #include */ import "C" import ( "runtime" "runtime/cgo" "unsafe" ) type QValidator__State int const ( QValidator__State__Invalid QValidator__State = 0 QValidator__State__Intermediate QValidator__State = 1 QValidator__State__Acceptable QValidator__State = 2 ) type QDoubleValidator__Notation int const ( QDoubleValidator__Notation__StandardNotation QDoubleValidator__Notation = 0 QDoubleValidator__Notation__ScientificNotation QDoubleValidator__Notation = 1 ) type QValidator struct { h *C.QValidator *QObject } func (this *QValidator) cPointer() *C.QValidator { if this == nil { return nil } return this.h } func newQValidator(h *C.QValidator) *QValidator { if h == nil { return nil } return &QValidator{h: h, QObject: newQObject_U(unsafe.Pointer(h))} } func newQValidator_U(h unsafe.Pointer) *QValidator { return newQValidator((*C.QValidator)(h)) } func (this *QValidator) MetaObject() *QMetaObject { ret := C.QValidator_MetaObject(this.h) return newQMetaObject_U(unsafe.Pointer(ret)) } func QValidator_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.QValidator_Tr(s_Cstring, &_out, &_out_Strlen) ret := C.GoStringN(_out, _out_Strlen) C.free(unsafe.Pointer(_out)) return ret } func QValidator_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.QValidator_TrUtf8(s_Cstring, &_out, &_out_Strlen) ret := C.GoStringN(_out, _out_Strlen) C.free(unsafe.Pointer(_out)) return ret } func (this *QValidator) SetLocale(locale *QLocale) { C.QValidator_SetLocale(this.h, locale.cPointer()) } func (this *QValidator) Locale() *QLocale { ret := C.QValidator_Locale(this.h) // Qt uses pass-by-value semantics for this type. Mimic with finalizer ret1 := newQLocale(ret) runtime.SetFinalizer(ret1, func(ret2 *QLocale) { ret2.Delete() runtime.KeepAlive(ret2.h) }) return ret1 } func (this *QValidator) Validate(param1 string, param2 *int) QValidator__State { param1_Cstring := C.CString(param1) defer C.free(unsafe.Pointer(param1_Cstring)) ret := C.QValidator_Validate(this.h, param1_Cstring, C.size_t(len(param1)), (*C.int)(unsafe.Pointer(param2))) return (QValidator__State)(ret) } func (this *QValidator) Fixup(param1 string) { param1_Cstring := C.CString(param1) defer C.free(unsafe.Pointer(param1_Cstring)) C.QValidator_Fixup(this.h, param1_Cstring, C.size_t(len(param1))) } func (this *QValidator) Changed() { C.QValidator_Changed(this.h) } func (this *QValidator) OnChanged(slot func()) { var slotWrapper miqtCallbackFunc = func(argc C.int, args *C.void) { slot() } C.QValidator_connect_Changed(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slotWrapper)))) } func QValidator_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.QValidator_Tr2(s_Cstring, c_Cstring, &_out, &_out_Strlen) ret := C.GoStringN(_out, _out_Strlen) C.free(unsafe.Pointer(_out)) return ret } func QValidator_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.QValidator_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 QValidator_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.QValidator_TrUtf82(s_Cstring, c_Cstring, &_out, &_out_Strlen) ret := C.GoStringN(_out, _out_Strlen) C.free(unsafe.Pointer(_out)) return ret } func QValidator_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.QValidator_TrUtf83(s_Cstring, c_Cstring, (C.int)(n), &_out, &_out_Strlen) ret := C.GoStringN(_out, _out_Strlen) C.free(unsafe.Pointer(_out)) return ret } func (this *QValidator) Delete() { C.QValidator_Delete(this.h) } type QIntValidator struct { h *C.QIntValidator *QValidator } func (this *QIntValidator) cPointer() *C.QIntValidator { if this == nil { return nil } return this.h } func newQIntValidator(h *C.QIntValidator) *QIntValidator { if h == nil { return nil } return &QIntValidator{h: h, QValidator: newQValidator_U(unsafe.Pointer(h))} } func newQIntValidator_U(h unsafe.Pointer) *QIntValidator { return newQIntValidator((*C.QIntValidator)(h)) } // NewQIntValidator constructs a new QIntValidator object. func NewQIntValidator() *QIntValidator { ret := C.QIntValidator_new() return newQIntValidator(ret) } // NewQIntValidator2 constructs a new QIntValidator object. func NewQIntValidator2(bottom int, top int) *QIntValidator { ret := C.QIntValidator_new2((C.int)(bottom), (C.int)(top)) return newQIntValidator(ret) } // NewQIntValidator3 constructs a new QIntValidator object. func NewQIntValidator3(parent *QObject) *QIntValidator { ret := C.QIntValidator_new3(parent.cPointer()) return newQIntValidator(ret) } // NewQIntValidator4 constructs a new QIntValidator object. func NewQIntValidator4(bottom int, top int, parent *QObject) *QIntValidator { ret := C.QIntValidator_new4((C.int)(bottom), (C.int)(top), parent.cPointer()) return newQIntValidator(ret) } func (this *QIntValidator) MetaObject() *QMetaObject { ret := C.QIntValidator_MetaObject(this.h) return newQMetaObject_U(unsafe.Pointer(ret)) } func QIntValidator_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.QIntValidator_Tr(s_Cstring, &_out, &_out_Strlen) ret := C.GoStringN(_out, _out_Strlen) C.free(unsafe.Pointer(_out)) return ret } func QIntValidator_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.QIntValidator_TrUtf8(s_Cstring, &_out, &_out_Strlen) ret := C.GoStringN(_out, _out_Strlen) C.free(unsafe.Pointer(_out)) return ret } func (this *QIntValidator) Validate(param1 string, param2 *int) QValidator__State { param1_Cstring := C.CString(param1) defer C.free(unsafe.Pointer(param1_Cstring)) ret := C.QIntValidator_Validate(this.h, param1_Cstring, C.size_t(len(param1)), (*C.int)(unsafe.Pointer(param2))) return (QValidator__State)(ret) } func (this *QIntValidator) Fixup(input string) { input_Cstring := C.CString(input) defer C.free(unsafe.Pointer(input_Cstring)) C.QIntValidator_Fixup(this.h, input_Cstring, C.size_t(len(input))) } func (this *QIntValidator) SetBottom(bottom int) { C.QIntValidator_SetBottom(this.h, (C.int)(bottom)) } func (this *QIntValidator) SetTop(top int) { C.QIntValidator_SetTop(this.h, (C.int)(top)) } func (this *QIntValidator) SetRange(bottom int, top int) { C.QIntValidator_SetRange(this.h, (C.int)(bottom), (C.int)(top)) } func (this *QIntValidator) Bottom() int { ret := C.QIntValidator_Bottom(this.h) return (int)(ret) } func (this *QIntValidator) Top() int { ret := C.QIntValidator_Top(this.h) return (int)(ret) } func (this *QIntValidator) BottomChanged(bottom int) { C.QIntValidator_BottomChanged(this.h, (C.int)(bottom)) } func (this *QIntValidator) OnBottomChanged(slot func()) { var slotWrapper miqtCallbackFunc = func(argc C.int, args *C.void) { slot() } C.QIntValidator_connect_BottomChanged(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slotWrapper)))) } func (this *QIntValidator) TopChanged(top int) { C.QIntValidator_TopChanged(this.h, (C.int)(top)) } func (this *QIntValidator) OnTopChanged(slot func()) { var slotWrapper miqtCallbackFunc = func(argc C.int, args *C.void) { slot() } C.QIntValidator_connect_TopChanged(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slotWrapper)))) } func QIntValidator_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.QIntValidator_Tr2(s_Cstring, c_Cstring, &_out, &_out_Strlen) ret := C.GoStringN(_out, _out_Strlen) C.free(unsafe.Pointer(_out)) return ret } func QIntValidator_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.QIntValidator_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 QIntValidator_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.QIntValidator_TrUtf82(s_Cstring, c_Cstring, &_out, &_out_Strlen) ret := C.GoStringN(_out, _out_Strlen) C.free(unsafe.Pointer(_out)) return ret } func QIntValidator_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.QIntValidator_TrUtf83(s_Cstring, c_Cstring, (C.int)(n), &_out, &_out_Strlen) ret := C.GoStringN(_out, _out_Strlen) C.free(unsafe.Pointer(_out)) return ret } func (this *QIntValidator) Delete() { C.QIntValidator_Delete(this.h) } type QDoubleValidator struct { h *C.QDoubleValidator *QValidator } func (this *QDoubleValidator) cPointer() *C.QDoubleValidator { if this == nil { return nil } return this.h } func newQDoubleValidator(h *C.QDoubleValidator) *QDoubleValidator { if h == nil { return nil } return &QDoubleValidator{h: h, QValidator: newQValidator_U(unsafe.Pointer(h))} } func newQDoubleValidator_U(h unsafe.Pointer) *QDoubleValidator { return newQDoubleValidator((*C.QDoubleValidator)(h)) } // NewQDoubleValidator constructs a new QDoubleValidator object. func NewQDoubleValidator() *QDoubleValidator { ret := C.QDoubleValidator_new() return newQDoubleValidator(ret) } // NewQDoubleValidator2 constructs a new QDoubleValidator object. func NewQDoubleValidator2(bottom float64, top float64, decimals int) *QDoubleValidator { ret := C.QDoubleValidator_new2((C.double)(bottom), (C.double)(top), (C.int)(decimals)) return newQDoubleValidator(ret) } // NewQDoubleValidator3 constructs a new QDoubleValidator object. func NewQDoubleValidator3(parent *QObject) *QDoubleValidator { ret := C.QDoubleValidator_new3(parent.cPointer()) return newQDoubleValidator(ret) } // NewQDoubleValidator4 constructs a new QDoubleValidator object. func NewQDoubleValidator4(bottom float64, top float64, decimals int, parent *QObject) *QDoubleValidator { ret := C.QDoubleValidator_new4((C.double)(bottom), (C.double)(top), (C.int)(decimals), parent.cPointer()) return newQDoubleValidator(ret) } func (this *QDoubleValidator) MetaObject() *QMetaObject { ret := C.QDoubleValidator_MetaObject(this.h) return newQMetaObject_U(unsafe.Pointer(ret)) } func QDoubleValidator_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.QDoubleValidator_Tr(s_Cstring, &_out, &_out_Strlen) ret := C.GoStringN(_out, _out_Strlen) C.free(unsafe.Pointer(_out)) return ret } func QDoubleValidator_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.QDoubleValidator_TrUtf8(s_Cstring, &_out, &_out_Strlen) ret := C.GoStringN(_out, _out_Strlen) C.free(unsafe.Pointer(_out)) return ret } func (this *QDoubleValidator) Validate(param1 string, param2 *int) QValidator__State { param1_Cstring := C.CString(param1) defer C.free(unsafe.Pointer(param1_Cstring)) ret := C.QDoubleValidator_Validate(this.h, param1_Cstring, C.size_t(len(param1)), (*C.int)(unsafe.Pointer(param2))) return (QValidator__State)(ret) } func (this *QDoubleValidator) SetRange(bottom float64, top float64) { C.QDoubleValidator_SetRange(this.h, (C.double)(bottom), (C.double)(top)) } func (this *QDoubleValidator) SetBottom(bottom float64) { C.QDoubleValidator_SetBottom(this.h, (C.double)(bottom)) } func (this *QDoubleValidator) SetTop(top float64) { C.QDoubleValidator_SetTop(this.h, (C.double)(top)) } func (this *QDoubleValidator) SetDecimals(decimals int) { C.QDoubleValidator_SetDecimals(this.h, (C.int)(decimals)) } func (this *QDoubleValidator) SetNotation(notation QDoubleValidator__Notation) { C.QDoubleValidator_SetNotation(this.h, (C.uintptr_t)(notation)) } func (this *QDoubleValidator) Bottom() float64 { ret := C.QDoubleValidator_Bottom(this.h) return (float64)(ret) } func (this *QDoubleValidator) Top() float64 { ret := C.QDoubleValidator_Top(this.h) return (float64)(ret) } func (this *QDoubleValidator) Decimals() int { ret := C.QDoubleValidator_Decimals(this.h) return (int)(ret) } func (this *QDoubleValidator) Notation() QDoubleValidator__Notation { ret := C.QDoubleValidator_Notation(this.h) return (QDoubleValidator__Notation)(ret) } func (this *QDoubleValidator) BottomChanged(bottom float64) { C.QDoubleValidator_BottomChanged(this.h, (C.double)(bottom)) } func (this *QDoubleValidator) OnBottomChanged(slot func()) { var slotWrapper miqtCallbackFunc = func(argc C.int, args *C.void) { slot() } C.QDoubleValidator_connect_BottomChanged(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slotWrapper)))) } func (this *QDoubleValidator) TopChanged(top float64) { C.QDoubleValidator_TopChanged(this.h, (C.double)(top)) } func (this *QDoubleValidator) OnTopChanged(slot func()) { var slotWrapper miqtCallbackFunc = func(argc C.int, args *C.void) { slot() } C.QDoubleValidator_connect_TopChanged(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slotWrapper)))) } func (this *QDoubleValidator) DecimalsChanged(decimals int) { C.QDoubleValidator_DecimalsChanged(this.h, (C.int)(decimals)) } func (this *QDoubleValidator) OnDecimalsChanged(slot func()) { var slotWrapper miqtCallbackFunc = func(argc C.int, args *C.void) { slot() } C.QDoubleValidator_connect_DecimalsChanged(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slotWrapper)))) } func (this *QDoubleValidator) NotationChanged(notation QDoubleValidator__Notation) { C.QDoubleValidator_NotationChanged(this.h, (C.uintptr_t)(notation)) } func (this *QDoubleValidator) OnNotationChanged(slot func()) { var slotWrapper miqtCallbackFunc = func(argc C.int, args *C.void) { slot() } C.QDoubleValidator_connect_NotationChanged(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slotWrapper)))) } func QDoubleValidator_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.QDoubleValidator_Tr2(s_Cstring, c_Cstring, &_out, &_out_Strlen) ret := C.GoStringN(_out, _out_Strlen) C.free(unsafe.Pointer(_out)) return ret } func QDoubleValidator_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.QDoubleValidator_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 QDoubleValidator_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.QDoubleValidator_TrUtf82(s_Cstring, c_Cstring, &_out, &_out_Strlen) ret := C.GoStringN(_out, _out_Strlen) C.free(unsafe.Pointer(_out)) return ret } func QDoubleValidator_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.QDoubleValidator_TrUtf83(s_Cstring, c_Cstring, (C.int)(n), &_out, &_out_Strlen) ret := C.GoStringN(_out, _out_Strlen) C.free(unsafe.Pointer(_out)) return ret } func (this *QDoubleValidator) SetRange3(bottom float64, top float64, decimals int) { C.QDoubleValidator_SetRange3(this.h, (C.double)(bottom), (C.double)(top), (C.int)(decimals)) } func (this *QDoubleValidator) Delete() { C.QDoubleValidator_Delete(this.h) } type QRegExpValidator struct { h *C.QRegExpValidator *QValidator } func (this *QRegExpValidator) cPointer() *C.QRegExpValidator { if this == nil { return nil } return this.h } func newQRegExpValidator(h *C.QRegExpValidator) *QRegExpValidator { if h == nil { return nil } return &QRegExpValidator{h: h, QValidator: newQValidator_U(unsafe.Pointer(h))} } func newQRegExpValidator_U(h unsafe.Pointer) *QRegExpValidator { return newQRegExpValidator((*C.QRegExpValidator)(h)) } // NewQRegExpValidator constructs a new QRegExpValidator object. func NewQRegExpValidator() *QRegExpValidator { ret := C.QRegExpValidator_new() return newQRegExpValidator(ret) } // NewQRegExpValidator2 constructs a new QRegExpValidator object. func NewQRegExpValidator2(rx *QRegExp) *QRegExpValidator { ret := C.QRegExpValidator_new2(rx.cPointer()) return newQRegExpValidator(ret) } // NewQRegExpValidator3 constructs a new QRegExpValidator object. func NewQRegExpValidator3(parent *QObject) *QRegExpValidator { ret := C.QRegExpValidator_new3(parent.cPointer()) return newQRegExpValidator(ret) } // NewQRegExpValidator4 constructs a new QRegExpValidator object. func NewQRegExpValidator4(rx *QRegExp, parent *QObject) *QRegExpValidator { ret := C.QRegExpValidator_new4(rx.cPointer(), parent.cPointer()) return newQRegExpValidator(ret) } func (this *QRegExpValidator) MetaObject() *QMetaObject { ret := C.QRegExpValidator_MetaObject(this.h) return newQMetaObject_U(unsafe.Pointer(ret)) } func QRegExpValidator_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.QRegExpValidator_Tr(s_Cstring, &_out, &_out_Strlen) ret := C.GoStringN(_out, _out_Strlen) C.free(unsafe.Pointer(_out)) return ret } func QRegExpValidator_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.QRegExpValidator_TrUtf8(s_Cstring, &_out, &_out_Strlen) ret := C.GoStringN(_out, _out_Strlen) C.free(unsafe.Pointer(_out)) return ret } func (this *QRegExpValidator) Validate(input string, pos *int) QValidator__State { input_Cstring := C.CString(input) defer C.free(unsafe.Pointer(input_Cstring)) ret := C.QRegExpValidator_Validate(this.h, input_Cstring, C.size_t(len(input)), (*C.int)(unsafe.Pointer(pos))) return (QValidator__State)(ret) } func (this *QRegExpValidator) SetRegExp(rx *QRegExp) { C.QRegExpValidator_SetRegExp(this.h, rx.cPointer()) } func (this *QRegExpValidator) RegExp() *QRegExp { ret := C.QRegExpValidator_RegExp(this.h) return newQRegExp_U(unsafe.Pointer(ret)) } func (this *QRegExpValidator) RegExpChanged(regExp *QRegExp) { C.QRegExpValidator_RegExpChanged(this.h, regExp.cPointer()) } func (this *QRegExpValidator) OnRegExpChanged(slot func()) { var slotWrapper miqtCallbackFunc = func(argc C.int, args *C.void) { slot() } C.QRegExpValidator_connect_RegExpChanged(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slotWrapper)))) } func QRegExpValidator_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.QRegExpValidator_Tr2(s_Cstring, c_Cstring, &_out, &_out_Strlen) ret := C.GoStringN(_out, _out_Strlen) C.free(unsafe.Pointer(_out)) return ret } func QRegExpValidator_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.QRegExpValidator_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 QRegExpValidator_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.QRegExpValidator_TrUtf82(s_Cstring, c_Cstring, &_out, &_out_Strlen) ret := C.GoStringN(_out, _out_Strlen) C.free(unsafe.Pointer(_out)) return ret } func QRegExpValidator_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.QRegExpValidator_TrUtf83(s_Cstring, c_Cstring, (C.int)(n), &_out, &_out_Strlen) ret := C.GoStringN(_out, _out_Strlen) C.free(unsafe.Pointer(_out)) return ret } func (this *QRegExpValidator) Delete() { C.QRegExpValidator_Delete(this.h) } type QRegularExpressionValidator struct { h *C.QRegularExpressionValidator *QValidator } func (this *QRegularExpressionValidator) cPointer() *C.QRegularExpressionValidator { if this == nil { return nil } return this.h } func newQRegularExpressionValidator(h *C.QRegularExpressionValidator) *QRegularExpressionValidator { if h == nil { return nil } return &QRegularExpressionValidator{h: h, QValidator: newQValidator_U(unsafe.Pointer(h))} } func newQRegularExpressionValidator_U(h unsafe.Pointer) *QRegularExpressionValidator { return newQRegularExpressionValidator((*C.QRegularExpressionValidator)(h)) } // NewQRegularExpressionValidator constructs a new QRegularExpressionValidator object. func NewQRegularExpressionValidator() *QRegularExpressionValidator { ret := C.QRegularExpressionValidator_new() return newQRegularExpressionValidator(ret) } // NewQRegularExpressionValidator2 constructs a new QRegularExpressionValidator object. func NewQRegularExpressionValidator2(re *QRegularExpression) *QRegularExpressionValidator { ret := C.QRegularExpressionValidator_new2(re.cPointer()) return newQRegularExpressionValidator(ret) } // NewQRegularExpressionValidator3 constructs a new QRegularExpressionValidator object. func NewQRegularExpressionValidator3(parent *QObject) *QRegularExpressionValidator { ret := C.QRegularExpressionValidator_new3(parent.cPointer()) return newQRegularExpressionValidator(ret) } // NewQRegularExpressionValidator4 constructs a new QRegularExpressionValidator object. func NewQRegularExpressionValidator4(re *QRegularExpression, parent *QObject) *QRegularExpressionValidator { ret := C.QRegularExpressionValidator_new4(re.cPointer(), parent.cPointer()) return newQRegularExpressionValidator(ret) } func (this *QRegularExpressionValidator) MetaObject() *QMetaObject { ret := C.QRegularExpressionValidator_MetaObject(this.h) return newQMetaObject_U(unsafe.Pointer(ret)) } func QRegularExpressionValidator_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.QRegularExpressionValidator_Tr(s_Cstring, &_out, &_out_Strlen) ret := C.GoStringN(_out, _out_Strlen) C.free(unsafe.Pointer(_out)) return ret } func QRegularExpressionValidator_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.QRegularExpressionValidator_TrUtf8(s_Cstring, &_out, &_out_Strlen) ret := C.GoStringN(_out, _out_Strlen) C.free(unsafe.Pointer(_out)) return ret } func (this *QRegularExpressionValidator) Validate(input string, pos *int) QValidator__State { input_Cstring := C.CString(input) defer C.free(unsafe.Pointer(input_Cstring)) ret := C.QRegularExpressionValidator_Validate(this.h, input_Cstring, C.size_t(len(input)), (*C.int)(unsafe.Pointer(pos))) return (QValidator__State)(ret) } func (this *QRegularExpressionValidator) RegularExpression() *QRegularExpression { ret := C.QRegularExpressionValidator_RegularExpression(this.h) // Qt uses pass-by-value semantics for this type. Mimic with finalizer ret1 := newQRegularExpression(ret) runtime.SetFinalizer(ret1, func(ret2 *QRegularExpression) { ret2.Delete() runtime.KeepAlive(ret2.h) }) return ret1 } func (this *QRegularExpressionValidator) SetRegularExpression(re *QRegularExpression) { C.QRegularExpressionValidator_SetRegularExpression(this.h, re.cPointer()) } func (this *QRegularExpressionValidator) RegularExpressionChanged(re *QRegularExpression) { C.QRegularExpressionValidator_RegularExpressionChanged(this.h, re.cPointer()) } func (this *QRegularExpressionValidator) OnRegularExpressionChanged(slot func()) { var slotWrapper miqtCallbackFunc = func(argc C.int, args *C.void) { slot() } C.QRegularExpressionValidator_connect_RegularExpressionChanged(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slotWrapper)))) } func QRegularExpressionValidator_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.QRegularExpressionValidator_Tr2(s_Cstring, c_Cstring, &_out, &_out_Strlen) ret := C.GoStringN(_out, _out_Strlen) C.free(unsafe.Pointer(_out)) return ret } func QRegularExpressionValidator_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.QRegularExpressionValidator_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 QRegularExpressionValidator_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.QRegularExpressionValidator_TrUtf82(s_Cstring, c_Cstring, &_out, &_out_Strlen) ret := C.GoStringN(_out, _out_Strlen) C.free(unsafe.Pointer(_out)) return ret } func QRegularExpressionValidator_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.QRegularExpressionValidator_TrUtf83(s_Cstring, c_Cstring, (C.int)(n), &_out, &_out_Strlen) ret := C.GoStringN(_out, _out_Strlen) C.free(unsafe.Pointer(_out)) return ret } func (this *QRegularExpressionValidator) Delete() { C.QRegularExpressionValidator_Delete(this.h) }