2024-08-25 04:08:24 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qtimezone.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
type QTimeZone__ int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QTimeZone__MinUtcOffsetSecs QTimeZone__ = -50400
|
|
|
|
QTimeZone__MaxUtcOffsetSecs QTimeZone__ = 50400
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type QTimeZone__TimeType int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QTimeZone__StandardTime QTimeZone__TimeType = 0
|
|
|
|
QTimeZone__DaylightTime QTimeZone__TimeType = 1
|
|
|
|
QTimeZone__GenericTime QTimeZone__TimeType = 2
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type QTimeZone__NameType int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QTimeZone__DefaultName QTimeZone__NameType = 0
|
|
|
|
QTimeZone__LongName QTimeZone__NameType = 1
|
|
|
|
QTimeZone__ShortName QTimeZone__NameType = 2
|
|
|
|
QTimeZone__OffsetName QTimeZone__NameType = 3
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
type QTimeZone struct {
|
2024-11-19 06:29:06 +00:00
|
|
|
h *C.QTimeZone
|
|
|
|
isSubclass bool
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTimeZone) cPointer() *C.QTimeZone {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func (this *QTimeZone) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// newQTimeZone constructs the type using only CGO pointers.
|
2024-08-25 04:08:24 +00:00
|
|
|
func newQTimeZone(h *C.QTimeZone) *QTimeZone {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-12-07 04:15:57 +00:00
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
return &QTimeZone{h: h}
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// UnsafeNewQTimeZone constructs the type using only unsafe pointers.
|
2024-10-16 05:07:56 +00:00
|
|
|
func UnsafeNewQTimeZone(h unsafe.Pointer) *QTimeZone {
|
2024-12-07 04:15:57 +00:00
|
|
|
return newQTimeZone((*C.QTimeZone)(h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQTimeZone constructs a new QTimeZone object.
|
|
|
|
func NewQTimeZone() *QTimeZone {
|
2024-11-19 06:29:06 +00:00
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
ret := newQTimeZone(C.QTimeZone_new())
|
2024-11-19 06:29:06 +00:00
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQTimeZone2 constructs a new QTimeZone object.
|
2024-10-18 23:53:33 +00:00
|
|
|
func NewQTimeZone2(ianaId []byte) *QTimeZone {
|
|
|
|
ianaId_alias := C.struct_miqt_string{}
|
|
|
|
ianaId_alias.data = (*C.char)(unsafe.Pointer(&ianaId[0]))
|
|
|
|
ianaId_alias.len = C.size_t(len(ianaId))
|
2024-11-19 06:29:06 +00:00
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
ret := newQTimeZone(C.QTimeZone_new2(ianaId_alias))
|
2024-11-19 06:29:06 +00:00
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQTimeZone3 constructs a new QTimeZone object.
|
|
|
|
func NewQTimeZone3(offsetSeconds int) *QTimeZone {
|
2024-11-19 06:29:06 +00:00
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
ret := newQTimeZone(C.QTimeZone_new3((C.int)(offsetSeconds)))
|
2024-11-19 06:29:06 +00:00
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQTimeZone4 constructs a new QTimeZone object.
|
2024-10-18 23:53:33 +00:00
|
|
|
func NewQTimeZone4(zoneId []byte, offsetSeconds int, name string, abbreviation string) *QTimeZone {
|
|
|
|
zoneId_alias := C.struct_miqt_string{}
|
|
|
|
zoneId_alias.data = (*C.char)(unsafe.Pointer(&zoneId[0]))
|
|
|
|
zoneId_alias.len = C.size_t(len(zoneId))
|
|
|
|
name_ms := C.struct_miqt_string{}
|
|
|
|
name_ms.data = C.CString(name)
|
|
|
|
name_ms.len = C.size_t(len(name))
|
|
|
|
defer C.free(unsafe.Pointer(name_ms.data))
|
|
|
|
abbreviation_ms := C.struct_miqt_string{}
|
|
|
|
abbreviation_ms.data = C.CString(abbreviation)
|
|
|
|
abbreviation_ms.len = C.size_t(len(abbreviation))
|
|
|
|
defer C.free(unsafe.Pointer(abbreviation_ms.data))
|
2024-11-19 06:29:06 +00:00
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
ret := newQTimeZone(C.QTimeZone_new4(zoneId_alias, (C.int)(offsetSeconds), name_ms, abbreviation_ms))
|
2024-11-19 06:29:06 +00:00
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQTimeZone5 constructs a new QTimeZone object.
|
|
|
|
func NewQTimeZone5(other *QTimeZone) *QTimeZone {
|
2024-11-19 06:29:06 +00:00
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
ret := newQTimeZone(C.QTimeZone_new5(other.cPointer()))
|
2024-11-19 06:29:06 +00:00
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQTimeZone6 constructs a new QTimeZone object.
|
2024-10-18 23:53:33 +00:00
|
|
|
func NewQTimeZone6(zoneId []byte, offsetSeconds int, name string, abbreviation string, country QLocale__Country) *QTimeZone {
|
|
|
|
zoneId_alias := C.struct_miqt_string{}
|
|
|
|
zoneId_alias.data = (*C.char)(unsafe.Pointer(&zoneId[0]))
|
|
|
|
zoneId_alias.len = C.size_t(len(zoneId))
|
|
|
|
name_ms := C.struct_miqt_string{}
|
|
|
|
name_ms.data = C.CString(name)
|
|
|
|
name_ms.len = C.size_t(len(name))
|
|
|
|
defer C.free(unsafe.Pointer(name_ms.data))
|
|
|
|
abbreviation_ms := C.struct_miqt_string{}
|
|
|
|
abbreviation_ms.data = C.CString(abbreviation)
|
|
|
|
abbreviation_ms.len = C.size_t(len(abbreviation))
|
|
|
|
defer C.free(unsafe.Pointer(abbreviation_ms.data))
|
2024-11-19 06:29:06 +00:00
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
ret := newQTimeZone(C.QTimeZone_new6(zoneId_alias, (C.int)(offsetSeconds), name_ms, abbreviation_ms, (C.int)(country)))
|
2024-11-19 06:29:06 +00:00
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQTimeZone7 constructs a new QTimeZone object.
|
2024-10-18 23:53:33 +00:00
|
|
|
func NewQTimeZone7(zoneId []byte, offsetSeconds int, name string, abbreviation string, country QLocale__Country, comment string) *QTimeZone {
|
|
|
|
zoneId_alias := C.struct_miqt_string{}
|
|
|
|
zoneId_alias.data = (*C.char)(unsafe.Pointer(&zoneId[0]))
|
|
|
|
zoneId_alias.len = C.size_t(len(zoneId))
|
|
|
|
name_ms := C.struct_miqt_string{}
|
|
|
|
name_ms.data = C.CString(name)
|
|
|
|
name_ms.len = C.size_t(len(name))
|
|
|
|
defer C.free(unsafe.Pointer(name_ms.data))
|
|
|
|
abbreviation_ms := C.struct_miqt_string{}
|
|
|
|
abbreviation_ms.data = C.CString(abbreviation)
|
|
|
|
abbreviation_ms.len = C.size_t(len(abbreviation))
|
|
|
|
defer C.free(unsafe.Pointer(abbreviation_ms.data))
|
|
|
|
comment_ms := C.struct_miqt_string{}
|
|
|
|
comment_ms.data = C.CString(comment)
|
|
|
|
comment_ms.len = C.size_t(len(comment))
|
|
|
|
defer C.free(unsafe.Pointer(comment_ms.data))
|
2024-11-19 06:29:06 +00:00
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
ret := newQTimeZone(C.QTimeZone_new7(zoneId_alias, (C.int)(offsetSeconds), name_ms, abbreviation_ms, (C.int)(country), comment_ms))
|
2024-11-19 06:29:06 +00:00
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTimeZone) OperatorAssign(other *QTimeZone) {
|
|
|
|
C.QTimeZone_OperatorAssign(this.h, other.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTimeZone) Swap(other *QTimeZone) {
|
|
|
|
C.QTimeZone_Swap(this.h, other.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTimeZone) IsValid() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QTimeZone_IsValid(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
func (this *QTimeZone) Id() []byte {
|
|
|
|
var _bytearray C.struct_miqt_string = C.QTimeZone_Id(this.h)
|
|
|
|
_ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len)))
|
|
|
|
C.free(unsafe.Pointer(_bytearray.data))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QTimeZone) Country() QLocale__Country {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (QLocale__Country)(C.QTimeZone_Country(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QTimeZone) Comment() string {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QTimeZone_Comment(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
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
func (this *QTimeZone) DisplayName(atDateTime *QDateTime) string {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QTimeZone_DisplayName(this.h, atDateTime.cPointer())
|
|
|
|
_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-09-04 06:54:22 +00:00
|
|
|
func (this *QTimeZone) DisplayNameWithTimeType(timeType QTimeZone__TimeType) string {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QTimeZone_DisplayNameWithTimeType(this.h, (C.int)(timeType))
|
|
|
|
_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 *QTimeZone) Abbreviation(atDateTime *QDateTime) string {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QTimeZone_Abbreviation(this.h, atDateTime.cPointer())
|
|
|
|
_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 *QTimeZone) OffsetFromUtc(atDateTime *QDateTime) int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QTimeZone_OffsetFromUtc(this.h, atDateTime.cPointer()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTimeZone) StandardTimeOffset(atDateTime *QDateTime) int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QTimeZone_StandardTimeOffset(this.h, atDateTime.cPointer()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTimeZone) DaylightTimeOffset(atDateTime *QDateTime) int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QTimeZone_DaylightTimeOffset(this.h, atDateTime.cPointer()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTimeZone) HasDaylightTime() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QTimeZone_HasDaylightTime(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTimeZone) IsDaylightTime(atDateTime *QDateTime) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QTimeZone_IsDaylightTime(this.h, atDateTime.cPointer()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
func (this *QTimeZone) OffsetData(forDateTime *QDateTime) *QTimeZone__OffsetData {
|
2024-12-07 02:02:06 +00:00
|
|
|
_goptr := newQTimeZone__OffsetData(C.QTimeZone_OffsetData(this.h, forDateTime.cPointer()))
|
2024-09-14 22:29:05 +00:00
|
|
|
_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-08-25 04:08:24 +00:00
|
|
|
func (this *QTimeZone) HasTransitions() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QTimeZone_HasTransitions(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
func (this *QTimeZone) NextTransition(afterDateTime *QDateTime) *QTimeZone__OffsetData {
|
2024-12-07 02:02:06 +00:00
|
|
|
_goptr := newQTimeZone__OffsetData(C.QTimeZone_NextTransition(this.h, afterDateTime.cPointer()))
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTimeZone) PreviousTransition(beforeDateTime *QDateTime) *QTimeZone__OffsetData {
|
2024-12-07 02:02:06 +00:00
|
|
|
_goptr := newQTimeZone__OffsetData(C.QTimeZone_PreviousTransition(this.h, beforeDateTime.cPointer()))
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTimeZone) Transitions(fromDateTime *QDateTime, toDateTime *QDateTime) []QTimeZone__OffsetData {
|
2024-11-04 07:18:27 +00:00
|
|
|
var _ma C.struct_miqt_array = C.QTimeZone_Transitions(this.h, fromDateTime.cPointer(), toDateTime.cPointer())
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := make([]QTimeZone__OffsetData, int(_ma.len))
|
2024-09-17 07:30:27 +00:00
|
|
|
_outCast := (*[0xffff]*C.QTimeZone__OffsetData)(unsafe.Pointer(_ma.data)) // hey ya
|
2024-09-14 22:29:05 +00:00
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-12-07 02:02:06 +00:00
|
|
|
_vv_goptr := newQTimeZone__OffsetData(_outCast[i])
|
2024-09-17 07:30:27 +00:00
|
|
|
_vv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
_ret[i] = *_vv_goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
func QTimeZone_SystemTimeZoneId() []byte {
|
|
|
|
var _bytearray C.struct_miqt_string = C.QTimeZone_SystemTimeZoneId()
|
|
|
|
_ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len)))
|
|
|
|
C.free(unsafe.Pointer(_bytearray.data))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QTimeZone_SystemTimeZone() *QTimeZone {
|
2024-12-07 02:02:06 +00:00
|
|
|
_goptr := newQTimeZone(C.QTimeZone_SystemTimeZone())
|
2024-09-14 22:29:05 +00:00
|
|
|
_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 QTimeZone_Utc() *QTimeZone {
|
2024-12-07 02:02:06 +00:00
|
|
|
_goptr := newQTimeZone(C.QTimeZone_Utc())
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
func QTimeZone_IsTimeZoneIdAvailable(ianaId []byte) bool {
|
|
|
|
ianaId_alias := C.struct_miqt_string{}
|
|
|
|
ianaId_alias.data = (*C.char)(unsafe.Pointer(&ianaId[0]))
|
|
|
|
ianaId_alias.len = C.size_t(len(ianaId))
|
|
|
|
return (bool)(C.QTimeZone_IsTimeZoneIdAvailable(ianaId_alias))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
func QTimeZone_AvailableTimeZoneIds() [][]byte {
|
2024-11-04 07:18:27 +00:00
|
|
|
var _ma C.struct_miqt_array = C.QTimeZone_AvailableTimeZoneIds()
|
2024-10-18 23:53:33 +00:00
|
|
|
_ret := make([][]byte, int(_ma.len))
|
|
|
|
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
2024-09-14 22:29:05 +00:00
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _lv_bytearray C.struct_miqt_string = _outCast[i]
|
|
|
|
_lv_ret := C.GoBytes(unsafe.Pointer(_lv_bytearray.data), C.int(int64(_lv_bytearray.len)))
|
|
|
|
C.free(unsafe.Pointer(_lv_bytearray.data))
|
|
|
|
_ret[i] = _lv_ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
func QTimeZone_AvailableTimeZoneIdsWithCountry(country QLocale__Country) [][]byte {
|
2024-11-04 07:18:27 +00:00
|
|
|
var _ma C.struct_miqt_array = C.QTimeZone_AvailableTimeZoneIdsWithCountry((C.int)(country))
|
2024-10-18 23:53:33 +00:00
|
|
|
_ret := make([][]byte, int(_ma.len))
|
|
|
|
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
2024-09-14 22:29:05 +00:00
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _lv_bytearray C.struct_miqt_string = _outCast[i]
|
|
|
|
_lv_ret := C.GoBytes(unsafe.Pointer(_lv_bytearray.data), C.int(int64(_lv_bytearray.len)))
|
|
|
|
C.free(unsafe.Pointer(_lv_bytearray.data))
|
|
|
|
_ret[i] = _lv_ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
func QTimeZone_AvailableTimeZoneIdsWithOffsetSeconds(offsetSeconds int) [][]byte {
|
2024-11-04 07:18:27 +00:00
|
|
|
var _ma C.struct_miqt_array = C.QTimeZone_AvailableTimeZoneIdsWithOffsetSeconds((C.int)(offsetSeconds))
|
2024-10-18 23:53:33 +00:00
|
|
|
_ret := make([][]byte, int(_ma.len))
|
|
|
|
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
2024-09-14 22:29:05 +00:00
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _lv_bytearray C.struct_miqt_string = _outCast[i]
|
|
|
|
_lv_ret := C.GoBytes(unsafe.Pointer(_lv_bytearray.data), C.int(int64(_lv_bytearray.len)))
|
|
|
|
C.free(unsafe.Pointer(_lv_bytearray.data))
|
|
|
|
_ret[i] = _lv_ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
func QTimeZone_IanaIdToWindowsId(ianaId []byte) []byte {
|
|
|
|
ianaId_alias := C.struct_miqt_string{}
|
|
|
|
ianaId_alias.data = (*C.char)(unsafe.Pointer(&ianaId[0]))
|
|
|
|
ianaId_alias.len = C.size_t(len(ianaId))
|
|
|
|
var _bytearray C.struct_miqt_string = C.QTimeZone_IanaIdToWindowsId(ianaId_alias)
|
|
|
|
_ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len)))
|
|
|
|
C.free(unsafe.Pointer(_bytearray.data))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
func QTimeZone_WindowsIdToDefaultIanaId(windowsId []byte) []byte {
|
|
|
|
windowsId_alias := C.struct_miqt_string{}
|
|
|
|
windowsId_alias.data = (*C.char)(unsafe.Pointer(&windowsId[0]))
|
|
|
|
windowsId_alias.len = C.size_t(len(windowsId))
|
|
|
|
var _bytearray C.struct_miqt_string = C.QTimeZone_WindowsIdToDefaultIanaId(windowsId_alias)
|
|
|
|
_ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len)))
|
|
|
|
C.free(unsafe.Pointer(_bytearray.data))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
func QTimeZone_WindowsIdToDefaultIanaId2(windowsId []byte, country QLocale__Country) []byte {
|
|
|
|
windowsId_alias := C.struct_miqt_string{}
|
|
|
|
windowsId_alias.data = (*C.char)(unsafe.Pointer(&windowsId[0]))
|
|
|
|
windowsId_alias.len = C.size_t(len(windowsId))
|
|
|
|
var _bytearray C.struct_miqt_string = C.QTimeZone_WindowsIdToDefaultIanaId2(windowsId_alias, (C.int)(country))
|
|
|
|
_ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len)))
|
|
|
|
C.free(unsafe.Pointer(_bytearray.data))
|
|
|
|
return _ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
func QTimeZone_WindowsIdToIanaIds(windowsId []byte) [][]byte {
|
|
|
|
windowsId_alias := C.struct_miqt_string{}
|
|
|
|
windowsId_alias.data = (*C.char)(unsafe.Pointer(&windowsId[0]))
|
|
|
|
windowsId_alias.len = C.size_t(len(windowsId))
|
2024-11-04 07:18:27 +00:00
|
|
|
var _ma C.struct_miqt_array = C.QTimeZone_WindowsIdToIanaIds(windowsId_alias)
|
2024-10-18 23:53:33 +00:00
|
|
|
_ret := make([][]byte, int(_ma.len))
|
|
|
|
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
2024-09-14 22:29:05 +00:00
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _lv_bytearray C.struct_miqt_string = _outCast[i]
|
|
|
|
_lv_ret := C.GoBytes(unsafe.Pointer(_lv_bytearray.data), C.int(int64(_lv_bytearray.len)))
|
|
|
|
C.free(unsafe.Pointer(_lv_bytearray.data))
|
|
|
|
_ret[i] = _lv_ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
func QTimeZone_WindowsIdToIanaIds2(windowsId []byte, country QLocale__Country) [][]byte {
|
|
|
|
windowsId_alias := C.struct_miqt_string{}
|
|
|
|
windowsId_alias.data = (*C.char)(unsafe.Pointer(&windowsId[0]))
|
|
|
|
windowsId_alias.len = C.size_t(len(windowsId))
|
2024-11-04 07:18:27 +00:00
|
|
|
var _ma C.struct_miqt_array = C.QTimeZone_WindowsIdToIanaIds2(windowsId_alias, (C.int)(country))
|
2024-10-18 23:53:33 +00:00
|
|
|
_ret := make([][]byte, int(_ma.len))
|
|
|
|
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
2024-09-14 22:29:05 +00:00
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _lv_bytearray C.struct_miqt_string = _outCast[i]
|
|
|
|
_lv_ret := C.GoBytes(unsafe.Pointer(_lv_bytearray.data), C.int(int64(_lv_bytearray.len)))
|
|
|
|
C.free(unsafe.Pointer(_lv_bytearray.data))
|
|
|
|
_ret[i] = _lv_ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QTimeZone) DisplayName2(atDateTime *QDateTime, nameType QTimeZone__NameType) string {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QTimeZone_DisplayName2(this.h, atDateTime.cPointer(), (C.int)(nameType))
|
|
|
|
_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-09-04 06:54:22 +00:00
|
|
|
func (this *QTimeZone) DisplayName3(atDateTime *QDateTime, nameType QTimeZone__NameType, locale *QLocale) string {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QTimeZone_DisplayName3(this.h, atDateTime.cPointer(), (C.int)(nameType), locale.cPointer())
|
|
|
|
_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-09-04 06:54:22 +00:00
|
|
|
func (this *QTimeZone) DisplayName22(timeType QTimeZone__TimeType, nameType QTimeZone__NameType) string {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QTimeZone_DisplayName22(this.h, (C.int)(timeType), (C.int)(nameType))
|
|
|
|
_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-09-04 06:54:22 +00:00
|
|
|
func (this *QTimeZone) DisplayName32(timeType QTimeZone__TimeType, nameType QTimeZone__NameType, locale *QLocale) string {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QTimeZone_DisplayName32(this.h, (C.int)(timeType), (C.int)(nameType), locale.cPointer())
|
|
|
|
_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-09-14 22:29:05 +00:00
|
|
|
// Delete this object from C++ memory.
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QTimeZone) Delete() {
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QTimeZone_Delete(this.h, C.bool(this.isSubclass))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-08-29 07:01:51 +00:00
|
|
|
|
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 *QTimeZone) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QTimeZone) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
type QTimeZone__OffsetData struct {
|
2024-11-19 06:29:06 +00:00
|
|
|
h *C.QTimeZone__OffsetData
|
|
|
|
isSubclass bool
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTimeZone__OffsetData) cPointer() *C.QTimeZone__OffsetData {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func (this *QTimeZone__OffsetData) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// newQTimeZone__OffsetData constructs the type using only CGO pointers.
|
2024-08-29 07:01:51 +00:00
|
|
|
func newQTimeZone__OffsetData(h *C.QTimeZone__OffsetData) *QTimeZone__OffsetData {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-12-07 04:15:57 +00:00
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
return &QTimeZone__OffsetData{h: h}
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// UnsafeNewQTimeZone__OffsetData constructs the type using only unsafe pointers.
|
2024-10-16 05:07:56 +00:00
|
|
|
func UnsafeNewQTimeZone__OffsetData(h unsafe.Pointer) *QTimeZone__OffsetData {
|
2024-12-07 04:15:57 +00:00
|
|
|
return newQTimeZone__OffsetData((*C.QTimeZone__OffsetData)(h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQTimeZone__OffsetData constructs a new QTimeZone::OffsetData object.
|
|
|
|
func NewQTimeZone__OffsetData(param1 *QTimeZone__OffsetData) *QTimeZone__OffsetData {
|
2024-11-19 06:29:06 +00:00
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
ret := newQTimeZone__OffsetData(C.QTimeZone__OffsetData_new(param1.cPointer()))
|
2024-11-19 06:29:06 +00:00
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
func (this *QTimeZone__OffsetData) OperatorAssign(param1 *QTimeZone__OffsetData) {
|
|
|
|
C.QTimeZone__OffsetData_OperatorAssign(this.h, param1.cPointer())
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Delete this object from C++ memory.
|
2024-08-29 07:01:51 +00:00
|
|
|
func (this *QTimeZone__OffsetData) Delete() {
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QTimeZone__OffsetData_Delete(this.h, C.bool(this.isSubclass))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
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 *QTimeZone__OffsetData) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QTimeZone__OffsetData) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|