2024-08-25 04:08:24 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qfontinfo.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
2024-09-14 22:29:05 +00:00
|
|
|
"runtime"
|
2024-08-25 04:08:24 +00:00
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
|
|
|
type QFontInfo struct {
|
|
|
|
h *C.QFontInfo
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFontInfo) cPointer() *C.QFontInfo {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
|
|
|
func newQFontInfo(h *C.QFontInfo) *QFontInfo {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
return &QFontInfo{h: h}
|
|
|
|
}
|
|
|
|
|
|
|
|
func newQFontInfo_U(h unsafe.Pointer) *QFontInfo {
|
|
|
|
return newQFontInfo((*C.QFontInfo)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQFontInfo constructs a new QFontInfo object.
|
|
|
|
func NewQFontInfo(param1 *QFont) *QFontInfo {
|
|
|
|
ret := C.QFontInfo_new(param1.cPointer())
|
|
|
|
return newQFontInfo(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQFontInfo2 constructs a new QFontInfo object.
|
|
|
|
func NewQFontInfo2(param1 *QFontInfo) *QFontInfo {
|
|
|
|
ret := C.QFontInfo_new2(param1.cPointer())
|
|
|
|
return newQFontInfo(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFontInfo) OperatorAssign(param1 *QFontInfo) {
|
|
|
|
C.QFontInfo_OperatorAssign(this.h, param1.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFontInfo) Swap(other *QFontInfo) {
|
|
|
|
C.QFontInfo_Swap(this.h, other.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFontInfo) Family() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QFontInfo_Family(this.h)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFontInfo) StyleName() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QFontInfo_StyleName(this.h)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFontInfo) PixelSize() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QFontInfo_PixelSize(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFontInfo) PointSize() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QFontInfo_PointSize(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFontInfo) PointSizeF() float64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (float64)(C.QFontInfo_PointSizeF(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFontInfo) Italic() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QFontInfo_Italic(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QFontInfo) Style() QFont__Style {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (QFont__Style)(C.QFontInfo_Style(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QFontInfo) Weight() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QFontInfo_Weight(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFontInfo) Bold() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QFontInfo_Bold(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFontInfo) Underline() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QFontInfo_Underline(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFontInfo) Overline() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QFontInfo_Overline(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFontInfo) StrikeOut() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QFontInfo_StrikeOut(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFontInfo) FixedPitch() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QFontInfo_FixedPitch(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QFontInfo) StyleHint() QFont__StyleHint {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (QFont__StyleHint)(C.QFontInfo_StyleHint(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QFontInfo) RawMode() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QFontInfo_RawMode(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFontInfo) ExactMatch() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QFontInfo_ExactMatch(this.h))
|
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 *QFontInfo) Delete() {
|
|
|
|
C.QFontInfo_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 *QFontInfo) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QFontInfo) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|