2024-08-25 04:08:24 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qdatetimeedit.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
"runtime/cgo"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
type QDateTimeEdit__Section int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QDateTimeEdit__NoSection QDateTimeEdit__Section = 0
|
|
|
|
QDateTimeEdit__AmPmSection QDateTimeEdit__Section = 1
|
|
|
|
QDateTimeEdit__MSecSection QDateTimeEdit__Section = 2
|
|
|
|
QDateTimeEdit__SecondSection QDateTimeEdit__Section = 4
|
|
|
|
QDateTimeEdit__MinuteSection QDateTimeEdit__Section = 8
|
|
|
|
QDateTimeEdit__HourSection QDateTimeEdit__Section = 16
|
|
|
|
QDateTimeEdit__DaySection QDateTimeEdit__Section = 256
|
|
|
|
QDateTimeEdit__MonthSection QDateTimeEdit__Section = 512
|
|
|
|
QDateTimeEdit__YearSection QDateTimeEdit__Section = 1024
|
|
|
|
QDateTimeEdit__TimeSections_Mask QDateTimeEdit__Section = 31
|
|
|
|
QDateTimeEdit__DateSections_Mask QDateTimeEdit__Section = 1792
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
type QDateTimeEdit struct {
|
|
|
|
h *C.QDateTimeEdit
|
|
|
|
*QAbstractSpinBox
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) cPointer() *C.QDateTimeEdit {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func (this *QDateTimeEdit) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func newQDateTimeEdit(h *C.QDateTimeEdit) *QDateTimeEdit {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-10-16 05:07:56 +00:00
|
|
|
return &QDateTimeEdit{h: h, QAbstractSpinBox: UnsafeNewQAbstractSpinBox(unsafe.Pointer(h))}
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func UnsafeNewQDateTimeEdit(h unsafe.Pointer) *QDateTimeEdit {
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQDateTimeEdit((*C.QDateTimeEdit)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQDateTimeEdit constructs a new QDateTimeEdit object.
|
2024-10-26 00:46:42 +00:00
|
|
|
func NewQDateTimeEdit(parent *QWidget) *QDateTimeEdit {
|
|
|
|
ret := C.QDateTimeEdit_new(parent.cPointer())
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQDateTimeEdit(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQDateTimeEdit2 constructs a new QDateTimeEdit object.
|
2024-10-26 00:46:42 +00:00
|
|
|
func NewQDateTimeEdit2() *QDateTimeEdit {
|
|
|
|
ret := C.QDateTimeEdit_new2()
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQDateTimeEdit(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQDateTimeEdit3 constructs a new QDateTimeEdit object.
|
2024-10-26 00:46:42 +00:00
|
|
|
func NewQDateTimeEdit3(dt *QDateTime) *QDateTimeEdit {
|
|
|
|
ret := C.QDateTimeEdit_new3(dt.cPointer())
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQDateTimeEdit(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQDateTimeEdit4 constructs a new QDateTimeEdit object.
|
2024-10-26 00:46:42 +00:00
|
|
|
func NewQDateTimeEdit4(d *QDate) *QDateTimeEdit {
|
|
|
|
ret := C.QDateTimeEdit_new4(d.cPointer())
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQDateTimeEdit(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQDateTimeEdit5 constructs a new QDateTimeEdit object.
|
2024-10-26 00:46:42 +00:00
|
|
|
func NewQDateTimeEdit5(t *QTime) *QDateTimeEdit {
|
|
|
|
ret := C.QDateTimeEdit_new5(t.cPointer())
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQDateTimeEdit(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQDateTimeEdit6 constructs a new QDateTimeEdit object.
|
|
|
|
func NewQDateTimeEdit6(dt *QDateTime, parent *QWidget) *QDateTimeEdit {
|
|
|
|
ret := C.QDateTimeEdit_new6(dt.cPointer(), parent.cPointer())
|
|
|
|
return newQDateTimeEdit(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQDateTimeEdit7 constructs a new QDateTimeEdit object.
|
|
|
|
func NewQDateTimeEdit7(d *QDate, parent *QWidget) *QDateTimeEdit {
|
|
|
|
ret := C.QDateTimeEdit_new7(d.cPointer(), parent.cPointer())
|
|
|
|
return newQDateTimeEdit(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQDateTimeEdit8 constructs a new QDateTimeEdit object.
|
|
|
|
func NewQDateTimeEdit8(t *QTime, parent *QWidget) *QDateTimeEdit {
|
|
|
|
ret := C.QDateTimeEdit_new8(t.cPointer(), parent.cPointer())
|
|
|
|
return newQDateTimeEdit(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) MetaObject() *QMetaObject {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQMetaObject(unsafe.Pointer(C.QDateTimeEdit_MetaObject(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 22:32:57 +00:00
|
|
|
func (this *QDateTimeEdit) 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.QDateTimeEdit_Metacast(this.h, param1_Cstring))
|
2024-09-20 22:32:57 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func QDateTimeEdit_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.QDateTimeEdit_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 QDateTimeEdit_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.QDateTimeEdit_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 *QDateTimeEdit) DateTime() *QDateTime {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QDateTimeEdit_DateTime(this.h)
|
|
|
|
_goptr := newQDateTime(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) Date() *QDate {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QDateTimeEdit_Date(this.h)
|
|
|
|
_goptr := newQDate(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) Time() *QTime {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QDateTimeEdit_Time(this.h)
|
|
|
|
_goptr := newQTime(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) Calendar() *QCalendar {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QDateTimeEdit_Calendar(this.h)
|
|
|
|
_goptr := newQCalendar(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) SetCalendar(calendar QCalendar) {
|
|
|
|
C.QDateTimeEdit_SetCalendar(this.h, calendar.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) MinimumDateTime() *QDateTime {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QDateTimeEdit_MinimumDateTime(this.h)
|
|
|
|
_goptr := newQDateTime(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) ClearMinimumDateTime() {
|
|
|
|
C.QDateTimeEdit_ClearMinimumDateTime(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) SetMinimumDateTime(dt *QDateTime) {
|
|
|
|
C.QDateTimeEdit_SetMinimumDateTime(this.h, dt.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) MaximumDateTime() *QDateTime {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QDateTimeEdit_MaximumDateTime(this.h)
|
|
|
|
_goptr := newQDateTime(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) ClearMaximumDateTime() {
|
|
|
|
C.QDateTimeEdit_ClearMaximumDateTime(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) SetMaximumDateTime(dt *QDateTime) {
|
|
|
|
C.QDateTimeEdit_SetMaximumDateTime(this.h, dt.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) SetDateTimeRange(min *QDateTime, max *QDateTime) {
|
|
|
|
C.QDateTimeEdit_SetDateTimeRange(this.h, min.cPointer(), max.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) MinimumDate() *QDate {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QDateTimeEdit_MinimumDate(this.h)
|
|
|
|
_goptr := newQDate(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) SetMinimumDate(min *QDate) {
|
|
|
|
C.QDateTimeEdit_SetMinimumDate(this.h, min.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) ClearMinimumDate() {
|
|
|
|
C.QDateTimeEdit_ClearMinimumDate(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) MaximumDate() *QDate {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QDateTimeEdit_MaximumDate(this.h)
|
|
|
|
_goptr := newQDate(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) SetMaximumDate(max *QDate) {
|
|
|
|
C.QDateTimeEdit_SetMaximumDate(this.h, max.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) ClearMaximumDate() {
|
|
|
|
C.QDateTimeEdit_ClearMaximumDate(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) SetDateRange(min *QDate, max *QDate) {
|
|
|
|
C.QDateTimeEdit_SetDateRange(this.h, min.cPointer(), max.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) MinimumTime() *QTime {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QDateTimeEdit_MinimumTime(this.h)
|
|
|
|
_goptr := newQTime(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) SetMinimumTime(min *QTime) {
|
|
|
|
C.QDateTimeEdit_SetMinimumTime(this.h, min.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) ClearMinimumTime() {
|
|
|
|
C.QDateTimeEdit_ClearMinimumTime(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) MaximumTime() *QTime {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QDateTimeEdit_MaximumTime(this.h)
|
|
|
|
_goptr := newQTime(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) SetMaximumTime(max *QTime) {
|
|
|
|
C.QDateTimeEdit_SetMaximumTime(this.h, max.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) ClearMaximumTime() {
|
|
|
|
C.QDateTimeEdit_ClearMaximumTime(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) SetTimeRange(min *QTime, max *QTime) {
|
|
|
|
C.QDateTimeEdit_SetTimeRange(this.h, min.cPointer(), max.cPointer())
|
|
|
|
}
|
|
|
|
|
2024-09-20 06:40:03 +00:00
|
|
|
func (this *QDateTimeEdit) DisplayedSections() QDateTimeEdit__Section {
|
|
|
|
return (QDateTimeEdit__Section)(C.QDateTimeEdit_DisplayedSections(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QDateTimeEdit) CurrentSection() QDateTimeEdit__Section {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (QDateTimeEdit__Section)(C.QDateTimeEdit_CurrentSection(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QDateTimeEdit) SectionAt(index int) QDateTimeEdit__Section {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (QDateTimeEdit__Section)(C.QDateTimeEdit_SectionAt(this.h, (C.int)(index)))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QDateTimeEdit) SetCurrentSection(section QDateTimeEdit__Section) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QDateTimeEdit_SetCurrentSection(this.h, (C.int)(section))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QDateTimeEdit) CurrentSectionIndex() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QDateTimeEdit_CurrentSectionIndex(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) SetCurrentSectionIndex(index int) {
|
|
|
|
C.QDateTimeEdit_SetCurrentSectionIndex(this.h, (C.int)(index))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) CalendarWidget() *QCalendarWidget {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQCalendarWidget(unsafe.Pointer(C.QDateTimeEdit_CalendarWidget(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) SetCalendarWidget(calendarWidget *QCalendarWidget) {
|
|
|
|
C.QDateTimeEdit_SetCalendarWidget(this.h, calendarWidget.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) SectionCount() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QDateTimeEdit_SectionCount(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QDateTimeEdit) SetSelectedSection(section QDateTimeEdit__Section) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QDateTimeEdit_SetSelectedSection(this.h, (C.int)(section))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QDateTimeEdit) SectionText(section QDateTimeEdit__Section) string {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QDateTimeEdit_SectionText(this.h, (C.int)(section))
|
|
|
|
_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-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QDateTimeEdit) DisplayFormat() string {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QDateTimeEdit_DisplayFormat(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 *QDateTimeEdit) SetDisplayFormat(format string) {
|
2024-10-18 23:53:33 +00:00
|
|
|
format_ms := C.struct_miqt_string{}
|
|
|
|
format_ms.data = C.CString(format)
|
|
|
|
format_ms.len = C.size_t(len(format))
|
|
|
|
defer C.free(unsafe.Pointer(format_ms.data))
|
|
|
|
C.QDateTimeEdit_SetDisplayFormat(this.h, format_ms)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) CalendarPopup() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QDateTimeEdit_CalendarPopup(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) SetCalendarPopup(enable bool) {
|
|
|
|
C.QDateTimeEdit_SetCalendarPopup(this.h, (C.bool)(enable))
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QDateTimeEdit) TimeSpec() TimeSpec {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (TimeSpec)(C.QDateTimeEdit_TimeSpec(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QDateTimeEdit) SetTimeSpec(spec TimeSpec) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QDateTimeEdit_SetTimeSpec(this.h, (C.int)(spec))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QDateTimeEdit) SizeHint() *QSize {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QDateTimeEdit_SizeHint(this.h)
|
|
|
|
_goptr := newQSize(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) Clear() {
|
|
|
|
C.QDateTimeEdit_Clear(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) StepBy(steps int) {
|
|
|
|
C.QDateTimeEdit_StepBy(this.h, (C.int)(steps))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) Event(event *QEvent) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QDateTimeEdit_Event(this.h, event.cPointer()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) DateTimeChanged(dateTime *QDateTime) {
|
|
|
|
C.QDateTimeEdit_DateTimeChanged(this.h, dateTime.cPointer())
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QDateTimeEdit) OnDateTimeChanged(slot func(dateTime *QDateTime)) {
|
2024-10-13 06:06:06 +00:00
|
|
|
C.QDateTimeEdit_connect_DateTimeChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-09-14 22:29:05 +00:00
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QDateTimeEdit_DateTimeChanged
|
2024-10-13 06:06:06 +00:00
|
|
|
func miqt_exec_callback_QDateTimeEdit_DateTimeChanged(cb C.intptr_t, dateTime *C.QDateTime) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(dateTime *QDateTime))
|
2024-09-14 22:29:05 +00:00
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-10-16 05:07:56 +00:00
|
|
|
slotval1 := UnsafeNewQDateTime(unsafe.Pointer(dateTime))
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) TimeChanged(time *QTime) {
|
|
|
|
C.QDateTimeEdit_TimeChanged(this.h, time.cPointer())
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QDateTimeEdit) OnTimeChanged(slot func(time *QTime)) {
|
2024-10-13 06:06:06 +00:00
|
|
|
C.QDateTimeEdit_connect_TimeChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-09-14 22:29:05 +00:00
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QDateTimeEdit_TimeChanged
|
2024-10-13 06:06:06 +00:00
|
|
|
func miqt_exec_callback_QDateTimeEdit_TimeChanged(cb C.intptr_t, time *C.QTime) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(time *QTime))
|
2024-09-14 22:29:05 +00:00
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-10-16 05:07:56 +00:00
|
|
|
slotval1 := UnsafeNewQTime(unsafe.Pointer(time))
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) DateChanged(date *QDate) {
|
|
|
|
C.QDateTimeEdit_DateChanged(this.h, date.cPointer())
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QDateTimeEdit) OnDateChanged(slot func(date *QDate)) {
|
2024-10-13 06:06:06 +00:00
|
|
|
C.QDateTimeEdit_connect_DateChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-09-14 22:29:05 +00:00
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QDateTimeEdit_DateChanged
|
2024-10-13 06:06:06 +00:00
|
|
|
func miqt_exec_callback_QDateTimeEdit_DateChanged(cb C.intptr_t, date *C.QDate) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(date *QDate))
|
2024-09-14 22:29:05 +00:00
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-10-16 05:07:56 +00:00
|
|
|
slotval1 := UnsafeNewQDate(unsafe.Pointer(date))
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) SetDateTime(dateTime *QDateTime) {
|
|
|
|
C.QDateTimeEdit_SetDateTime(this.h, dateTime.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) SetDate(date *QDate) {
|
|
|
|
C.QDateTimeEdit_SetDate(this.h, date.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateTimeEdit) SetTime(time *QTime) {
|
|
|
|
C.QDateTimeEdit_SetTime(this.h, time.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func QDateTimeEdit_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.QDateTimeEdit_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 QDateTimeEdit_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.QDateTimeEdit_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 QDateTimeEdit_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.QDateTimeEdit_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 QDateTimeEdit_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.QDateTimeEdit_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 *QDateTimeEdit) Delete() {
|
|
|
|
C.QDateTimeEdit_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 *QDateTimeEdit) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QDateTimeEdit) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
type QTimeEdit struct {
|
|
|
|
h *C.QTimeEdit
|
|
|
|
*QDateTimeEdit
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTimeEdit) cPointer() *C.QTimeEdit {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func (this *QTimeEdit) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func newQTimeEdit(h *C.QTimeEdit) *QTimeEdit {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-10-16 05:07:56 +00:00
|
|
|
return &QTimeEdit{h: h, QDateTimeEdit: UnsafeNewQDateTimeEdit(unsafe.Pointer(h))}
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func UnsafeNewQTimeEdit(h unsafe.Pointer) *QTimeEdit {
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQTimeEdit((*C.QTimeEdit)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQTimeEdit constructs a new QTimeEdit object.
|
2024-10-26 00:46:42 +00:00
|
|
|
func NewQTimeEdit(parent *QWidget) *QTimeEdit {
|
|
|
|
ret := C.QTimeEdit_new(parent.cPointer())
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQTimeEdit(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQTimeEdit2 constructs a new QTimeEdit object.
|
2024-10-26 00:46:42 +00:00
|
|
|
func NewQTimeEdit2() *QTimeEdit {
|
|
|
|
ret := C.QTimeEdit_new2()
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQTimeEdit(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQTimeEdit3 constructs a new QTimeEdit object.
|
2024-10-26 00:46:42 +00:00
|
|
|
func NewQTimeEdit3(time *QTime) *QTimeEdit {
|
|
|
|
ret := C.QTimeEdit_new3(time.cPointer())
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQTimeEdit(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQTimeEdit4 constructs a new QTimeEdit object.
|
|
|
|
func NewQTimeEdit4(time *QTime, parent *QWidget) *QTimeEdit {
|
|
|
|
ret := C.QTimeEdit_new4(time.cPointer(), parent.cPointer())
|
|
|
|
return newQTimeEdit(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTimeEdit) MetaObject() *QMetaObject {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQMetaObject(unsafe.Pointer(C.QTimeEdit_MetaObject(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 22:32:57 +00:00
|
|
|
func (this *QTimeEdit) 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.QTimeEdit_Metacast(this.h, param1_Cstring))
|
2024-09-20 22:32:57 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func QTimeEdit_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.QTimeEdit_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 QTimeEdit_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.QTimeEdit_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 *QTimeEdit) UserTimeChanged(time *QTime) {
|
|
|
|
C.QTimeEdit_UserTimeChanged(this.h, time.cPointer())
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QTimeEdit) OnUserTimeChanged(slot func(time *QTime)) {
|
2024-10-13 06:06:06 +00:00
|
|
|
C.QTimeEdit_connect_UserTimeChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-09-14 22:29:05 +00:00
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QTimeEdit_UserTimeChanged
|
2024-10-13 06:06:06 +00:00
|
|
|
func miqt_exec_callback_QTimeEdit_UserTimeChanged(cb C.intptr_t, time *C.QTime) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(time *QTime))
|
2024-09-14 22:29:05 +00:00
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-10-16 05:07:56 +00:00
|
|
|
slotval1 := UnsafeNewQTime(unsafe.Pointer(time))
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QTimeEdit_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.QTimeEdit_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 QTimeEdit_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.QTimeEdit_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 QTimeEdit_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.QTimeEdit_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 QTimeEdit_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.QTimeEdit_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 *QTimeEdit) Delete() {
|
|
|
|
C.QTimeEdit_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 *QTimeEdit) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QTimeEdit) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
type QDateEdit struct {
|
|
|
|
h *C.QDateEdit
|
|
|
|
*QDateTimeEdit
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateEdit) cPointer() *C.QDateEdit {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func (this *QDateEdit) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func newQDateEdit(h *C.QDateEdit) *QDateEdit {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-10-16 05:07:56 +00:00
|
|
|
return &QDateEdit{h: h, QDateTimeEdit: UnsafeNewQDateTimeEdit(unsafe.Pointer(h))}
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func UnsafeNewQDateEdit(h unsafe.Pointer) *QDateEdit {
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQDateEdit((*C.QDateEdit)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQDateEdit constructs a new QDateEdit object.
|
2024-10-26 00:46:42 +00:00
|
|
|
func NewQDateEdit(parent *QWidget) *QDateEdit {
|
|
|
|
ret := C.QDateEdit_new(parent.cPointer())
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQDateEdit(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQDateEdit2 constructs a new QDateEdit object.
|
2024-10-26 00:46:42 +00:00
|
|
|
func NewQDateEdit2() *QDateEdit {
|
|
|
|
ret := C.QDateEdit_new2()
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQDateEdit(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQDateEdit3 constructs a new QDateEdit object.
|
2024-10-26 00:46:42 +00:00
|
|
|
func NewQDateEdit3(date *QDate) *QDateEdit {
|
|
|
|
ret := C.QDateEdit_new3(date.cPointer())
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQDateEdit(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQDateEdit4 constructs a new QDateEdit object.
|
|
|
|
func NewQDateEdit4(date *QDate, parent *QWidget) *QDateEdit {
|
|
|
|
ret := C.QDateEdit_new4(date.cPointer(), parent.cPointer())
|
|
|
|
return newQDateEdit(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDateEdit) MetaObject() *QMetaObject {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQMetaObject(unsafe.Pointer(C.QDateEdit_MetaObject(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 22:32:57 +00:00
|
|
|
func (this *QDateEdit) 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.QDateEdit_Metacast(this.h, param1_Cstring))
|
2024-09-20 22:32:57 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func QDateEdit_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.QDateEdit_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 QDateEdit_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.QDateEdit_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 *QDateEdit) UserDateChanged(date *QDate) {
|
|
|
|
C.QDateEdit_UserDateChanged(this.h, date.cPointer())
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QDateEdit) OnUserDateChanged(slot func(date *QDate)) {
|
2024-10-13 06:06:06 +00:00
|
|
|
C.QDateEdit_connect_UserDateChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-09-14 22:29:05 +00:00
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QDateEdit_UserDateChanged
|
2024-10-13 06:06:06 +00:00
|
|
|
func miqt_exec_callback_QDateEdit_UserDateChanged(cb C.intptr_t, date *C.QDate) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(date *QDate))
|
2024-09-14 22:29:05 +00:00
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-10-16 05:07:56 +00:00
|
|
|
slotval1 := UnsafeNewQDate(unsafe.Pointer(date))
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QDateEdit_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.QDateEdit_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 QDateEdit_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.QDateEdit_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 QDateEdit_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.QDateEdit_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 QDateEdit_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.QDateEdit_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 *QDateEdit) Delete() {
|
|
|
|
C.QDateEdit_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 *QDateEdit) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QDateEdit) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|