2024-08-25 04:08:24 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qcalendarwidget.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
"runtime/cgo"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
type QCalendarWidget__HorizontalHeaderFormat int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QCalendarWidget__NoHorizontalHeader QCalendarWidget__HorizontalHeaderFormat = 0
|
|
|
|
QCalendarWidget__SingleLetterDayNames QCalendarWidget__HorizontalHeaderFormat = 1
|
|
|
|
QCalendarWidget__ShortDayNames QCalendarWidget__HorizontalHeaderFormat = 2
|
|
|
|
QCalendarWidget__LongDayNames QCalendarWidget__HorizontalHeaderFormat = 3
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type QCalendarWidget__VerticalHeaderFormat int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QCalendarWidget__NoVerticalHeader QCalendarWidget__VerticalHeaderFormat = 0
|
|
|
|
QCalendarWidget__ISOWeekNumbers QCalendarWidget__VerticalHeaderFormat = 1
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type QCalendarWidget__SelectionMode int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QCalendarWidget__NoSelection QCalendarWidget__SelectionMode = 0
|
|
|
|
QCalendarWidget__SingleSelection QCalendarWidget__SelectionMode = 1
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
type QCalendarWidget struct {
|
|
|
|
h *C.QCalendarWidget
|
|
|
|
*QWidget
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCalendarWidget) cPointer() *C.QCalendarWidget {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func (this *QCalendarWidget) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func newQCalendarWidget(h *C.QCalendarWidget) *QCalendarWidget {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-10-16 05:07:56 +00:00
|
|
|
return &QCalendarWidget{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))}
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func UnsafeNewQCalendarWidget(h unsafe.Pointer) *QCalendarWidget {
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQCalendarWidget((*C.QCalendarWidget)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQCalendarWidget constructs a new QCalendarWidget object.
|
2024-10-26 00:46:42 +00:00
|
|
|
func NewQCalendarWidget(parent *QWidget) *QCalendarWidget {
|
|
|
|
ret := C.QCalendarWidget_new(parent.cPointer())
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQCalendarWidget(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQCalendarWidget2 constructs a new QCalendarWidget object.
|
2024-10-26 00:46:42 +00:00
|
|
|
func NewQCalendarWidget2() *QCalendarWidget {
|
|
|
|
ret := C.QCalendarWidget_new2()
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQCalendarWidget(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCalendarWidget) MetaObject() *QMetaObject {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQMetaObject(unsafe.Pointer(C.QCalendarWidget_MetaObject(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 22:32:57 +00:00
|
|
|
func (this *QCalendarWidget) 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.QCalendarWidget_Metacast(this.h, param1_Cstring))
|
2024-09-20 22:32:57 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func QCalendarWidget_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.QCalendarWidget_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 QCalendarWidget_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.QCalendarWidget_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 *QCalendarWidget) SizeHint() *QSize {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QCalendarWidget_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 *QCalendarWidget) MinimumSizeHint() *QSize {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QCalendarWidget_MinimumSizeHint(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 *QCalendarWidget) SelectedDate() *QDate {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QCalendarWidget_SelectedDate(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 *QCalendarWidget) YearShown() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QCalendarWidget_YearShown(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCalendarWidget) MonthShown() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QCalendarWidget_MonthShown(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCalendarWidget) MinimumDate() *QDate {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QCalendarWidget_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 *QCalendarWidget) SetMinimumDate(date *QDate) {
|
|
|
|
C.QCalendarWidget_SetMinimumDate(this.h, date.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCalendarWidget) MaximumDate() *QDate {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QCalendarWidget_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 *QCalendarWidget) SetMaximumDate(date *QDate) {
|
|
|
|
C.QCalendarWidget_SetMaximumDate(this.h, date.cPointer())
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QCalendarWidget) FirstDayOfWeek() DayOfWeek {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (DayOfWeek)(C.QCalendarWidget_FirstDayOfWeek(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QCalendarWidget) SetFirstDayOfWeek(dayOfWeek DayOfWeek) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QCalendarWidget_SetFirstDayOfWeek(this.h, (C.int)(dayOfWeek))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QCalendarWidget) IsNavigationBarVisible() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QCalendarWidget_IsNavigationBarVisible(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCalendarWidget) IsGridVisible() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QCalendarWidget_IsGridVisible(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCalendarWidget) Calendar() *QCalendar {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QCalendarWidget_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 *QCalendarWidget) SetCalendar(calendar QCalendar) {
|
|
|
|
C.QCalendarWidget_SetCalendar(this.h, calendar.cPointer())
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QCalendarWidget) SelectionMode() QCalendarWidget__SelectionMode {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (QCalendarWidget__SelectionMode)(C.QCalendarWidget_SelectionMode(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QCalendarWidget) SetSelectionMode(mode QCalendarWidget__SelectionMode) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QCalendarWidget_SetSelectionMode(this.h, (C.int)(mode))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QCalendarWidget) HorizontalHeaderFormat() QCalendarWidget__HorizontalHeaderFormat {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (QCalendarWidget__HorizontalHeaderFormat)(C.QCalendarWidget_HorizontalHeaderFormat(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QCalendarWidget) SetHorizontalHeaderFormat(format QCalendarWidget__HorizontalHeaderFormat) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QCalendarWidget_SetHorizontalHeaderFormat(this.h, (C.int)(format))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QCalendarWidget) VerticalHeaderFormat() QCalendarWidget__VerticalHeaderFormat {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (QCalendarWidget__VerticalHeaderFormat)(C.QCalendarWidget_VerticalHeaderFormat(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QCalendarWidget) SetVerticalHeaderFormat(format QCalendarWidget__VerticalHeaderFormat) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QCalendarWidget_SetVerticalHeaderFormat(this.h, (C.int)(format))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QCalendarWidget) HeaderTextFormat() *QTextCharFormat {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QCalendarWidget_HeaderTextFormat(this.h)
|
|
|
|
_goptr := newQTextCharFormat(_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 *QCalendarWidget) SetHeaderTextFormat(format *QTextCharFormat) {
|
|
|
|
C.QCalendarWidget_SetHeaderTextFormat(this.h, format.cPointer())
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QCalendarWidget) WeekdayTextFormat(dayOfWeek DayOfWeek) *QTextCharFormat {
|
2024-09-18 00:12:02 +00:00
|
|
|
_ret := C.QCalendarWidget_WeekdayTextFormat(this.h, (C.int)(dayOfWeek))
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr := newQTextCharFormat(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QCalendarWidget) SetWeekdayTextFormat(dayOfWeek DayOfWeek, format *QTextCharFormat) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QCalendarWidget_SetWeekdayTextFormat(this.h, (C.int)(dayOfWeek), format.cPointer())
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCalendarWidget) DateTextFormatWithDate(date *QDate) *QTextCharFormat {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QCalendarWidget_DateTextFormatWithDate(this.h, date.cPointer())
|
|
|
|
_goptr := newQTextCharFormat(_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 *QCalendarWidget) SetDateTextFormat(date *QDate, format *QTextCharFormat) {
|
|
|
|
C.QCalendarWidget_SetDateTextFormat(this.h, date.cPointer(), format.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCalendarWidget) IsDateEditEnabled() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QCalendarWidget_IsDateEditEnabled(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCalendarWidget) SetDateEditEnabled(enable bool) {
|
|
|
|
C.QCalendarWidget_SetDateEditEnabled(this.h, (C.bool)(enable))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCalendarWidget) DateEditAcceptDelay() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QCalendarWidget_DateEditAcceptDelay(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCalendarWidget) SetDateEditAcceptDelay(delay int) {
|
|
|
|
C.QCalendarWidget_SetDateEditAcceptDelay(this.h, (C.int)(delay))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCalendarWidget) SetSelectedDate(date *QDate) {
|
|
|
|
C.QCalendarWidget_SetSelectedDate(this.h, date.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCalendarWidget) SetDateRange(min *QDate, max *QDate) {
|
|
|
|
C.QCalendarWidget_SetDateRange(this.h, min.cPointer(), max.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCalendarWidget) SetCurrentPage(year int, month int) {
|
|
|
|
C.QCalendarWidget_SetCurrentPage(this.h, (C.int)(year), (C.int)(month))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCalendarWidget) SetGridVisible(show bool) {
|
|
|
|
C.QCalendarWidget_SetGridVisible(this.h, (C.bool)(show))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCalendarWidget) SetNavigationBarVisible(visible bool) {
|
|
|
|
C.QCalendarWidget_SetNavigationBarVisible(this.h, (C.bool)(visible))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCalendarWidget) ShowNextMonth() {
|
|
|
|
C.QCalendarWidget_ShowNextMonth(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCalendarWidget) ShowPreviousMonth() {
|
|
|
|
C.QCalendarWidget_ShowPreviousMonth(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCalendarWidget) ShowNextYear() {
|
|
|
|
C.QCalendarWidget_ShowNextYear(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCalendarWidget) ShowPreviousYear() {
|
|
|
|
C.QCalendarWidget_ShowPreviousYear(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCalendarWidget) ShowSelectedDate() {
|
|
|
|
C.QCalendarWidget_ShowSelectedDate(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCalendarWidget) ShowToday() {
|
|
|
|
C.QCalendarWidget_ShowToday(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCalendarWidget) SelectionChanged() {
|
|
|
|
C.QCalendarWidget_SelectionChanged(this.h)
|
|
|
|
}
|
|
|
|
func (this *QCalendarWidget) OnSelectionChanged(slot func()) {
|
2024-10-13 06:06:06 +00:00
|
|
|
C.QCalendarWidget_connect_SelectionChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-09-14 22:29:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QCalendarWidget_SelectionChanged
|
2024-10-13 06:06:06 +00:00
|
|
|
func miqt_exec_callback_QCalendarWidget_SelectionChanged(cb C.intptr_t) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func())
|
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
|
|
|
gofunc()
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCalendarWidget) Clicked(date *QDate) {
|
|
|
|
C.QCalendarWidget_Clicked(this.h, date.cPointer())
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QCalendarWidget) OnClicked(slot func(date *QDate)) {
|
2024-10-13 06:06:06 +00:00
|
|
|
C.QCalendarWidget_connect_Clicked(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_QCalendarWidget_Clicked
|
2024-10-13 06:06:06 +00:00
|
|
|
func miqt_exec_callback_QCalendarWidget_Clicked(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 *QCalendarWidget) Activated(date *QDate) {
|
|
|
|
C.QCalendarWidget_Activated(this.h, date.cPointer())
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QCalendarWidget) OnActivated(slot func(date *QDate)) {
|
2024-10-13 06:06:06 +00:00
|
|
|
C.QCalendarWidget_connect_Activated(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_QCalendarWidget_Activated
|
2024-10-13 06:06:06 +00:00
|
|
|
func miqt_exec_callback_QCalendarWidget_Activated(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 *QCalendarWidget) CurrentPageChanged(year int, month int) {
|
|
|
|
C.QCalendarWidget_CurrentPageChanged(this.h, (C.int)(year), (C.int)(month))
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QCalendarWidget) OnCurrentPageChanged(slot func(year int, month int)) {
|
2024-10-13 06:06:06 +00:00
|
|
|
C.QCalendarWidget_connect_CurrentPageChanged(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_QCalendarWidget_CurrentPageChanged
|
2024-10-13 06:06:06 +00:00
|
|
|
func miqt_exec_callback_QCalendarWidget_CurrentPageChanged(cb C.intptr_t, year C.int, month C.int) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(year int, month int))
|
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-09-17 07:30:27 +00:00
|
|
|
slotval1 := (int)(year)
|
2024-09-14 22:29:05 +00:00
|
|
|
|
2024-09-17 07:30:27 +00:00
|
|
|
slotval2 := (int)(month)
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1, slotval2)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QCalendarWidget_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.QCalendarWidget_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 QCalendarWidget_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.QCalendarWidget_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 QCalendarWidget_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.QCalendarWidget_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 QCalendarWidget_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.QCalendarWidget_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 *QCalendarWidget) Delete() {
|
|
|
|
C.QCalendarWidget_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 *QCalendarWidget) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QCalendarWidget) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|