cutego/svg/qsvggenerator.go

129 lines
2.9 KiB
Go
Raw Normal View History

2015-10-24 18:18:24 +03:00
package svg
//#include "qsvggenerator.h"
import "C"
import (
"github.com/therecipe/qt/core"
"github.com/therecipe/qt/gui"
"unsafe"
)
type QSvgGenerator struct {
gui.QPaintDevice
}
2015-11-09 20:23:42 +03:00
type QSvgGenerator_ITF interface {
gui.QPaintDevice_ITF
QSvgGenerator_PTR() *QSvgGenerator
2015-10-24 18:18:24 +03:00
}
2015-11-09 20:23:42 +03:00
func PointerFromQSvgGenerator(ptr QSvgGenerator_ITF) unsafe.Pointer {
2015-10-24 18:18:24 +03:00
if ptr != nil {
2015-11-09 20:23:42 +03:00
return ptr.QSvgGenerator_PTR().Pointer()
2015-10-24 18:18:24 +03:00
}
return nil
}
2015-11-09 20:23:42 +03:00
func NewQSvgGeneratorFromPointer(ptr unsafe.Pointer) *QSvgGenerator {
2015-10-24 18:18:24 +03:00
var n = new(QSvgGenerator)
n.SetPointer(ptr)
return n
}
2015-11-09 20:23:42 +03:00
func (ptr *QSvgGenerator) QSvgGenerator_PTR() *QSvgGenerator {
2015-10-24 18:18:24 +03:00
return ptr
}
func (ptr *QSvgGenerator) Description() string {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
return C.GoString(C.QSvgGenerator_Description(ptr.Pointer()))
2015-10-24 18:18:24 +03:00
}
return ""
}
func (ptr *QSvgGenerator) FileName() string {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
return C.GoString(C.QSvgGenerator_FileName(ptr.Pointer()))
2015-10-24 18:18:24 +03:00
}
return ""
}
func (ptr *QSvgGenerator) OutputDevice() *core.QIODevice {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
return core.NewQIODeviceFromPointer(C.QSvgGenerator_OutputDevice(ptr.Pointer()))
2015-10-24 18:18:24 +03:00
}
return nil
}
func (ptr *QSvgGenerator) Resolution() int {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
return int(C.QSvgGenerator_Resolution(ptr.Pointer()))
2015-10-24 18:18:24 +03:00
}
return 0
}
func (ptr *QSvgGenerator) SetDescription(description string) {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QSvgGenerator_SetDescription(ptr.Pointer(), C.CString(description))
2015-10-24 18:18:24 +03:00
}
}
func (ptr *QSvgGenerator) SetFileName(fileName string) {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QSvgGenerator_SetFileName(ptr.Pointer(), C.CString(fileName))
2015-10-24 18:18:24 +03:00
}
}
2015-11-09 20:23:42 +03:00
func (ptr *QSvgGenerator) SetOutputDevice(outputDevice core.QIODevice_ITF) {
2015-10-24 18:18:24 +03:00
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QSvgGenerator_SetOutputDevice(ptr.Pointer(), core.PointerFromQIODevice(outputDevice))
2015-10-24 18:18:24 +03:00
}
}
func (ptr *QSvgGenerator) SetResolution(dpi int) {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QSvgGenerator_SetResolution(ptr.Pointer(), C.int(dpi))
2015-10-24 18:18:24 +03:00
}
}
2015-11-09 20:23:42 +03:00
func (ptr *QSvgGenerator) SetSize(size core.QSize_ITF) {
2015-10-24 18:18:24 +03:00
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QSvgGenerator_SetSize(ptr.Pointer(), core.PointerFromQSize(size))
2015-10-24 18:18:24 +03:00
}
}
func (ptr *QSvgGenerator) SetTitle(title string) {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QSvgGenerator_SetTitle(ptr.Pointer(), C.CString(title))
2015-10-24 18:18:24 +03:00
}
}
2015-11-09 20:23:42 +03:00
func (ptr *QSvgGenerator) SetViewBox(viewBox core.QRect_ITF) {
2015-10-24 18:18:24 +03:00
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QSvgGenerator_SetViewBox(ptr.Pointer(), core.PointerFromQRect(viewBox))
2015-10-24 18:18:24 +03:00
}
}
2015-11-09 20:23:42 +03:00
func (ptr *QSvgGenerator) SetViewBox2(viewBox core.QRectF_ITF) {
2015-10-24 18:18:24 +03:00
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QSvgGenerator_SetViewBox2(ptr.Pointer(), core.PointerFromQRectF(viewBox))
2015-10-24 18:18:24 +03:00
}
}
func (ptr *QSvgGenerator) Title() string {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
return C.GoString(C.QSvgGenerator_Title(ptr.Pointer()))
2015-10-24 18:18:24 +03:00
}
return ""
}
func NewQSvgGenerator() *QSvgGenerator {
2015-11-09 20:23:42 +03:00
return NewQSvgGeneratorFromPointer(C.QSvgGenerator_NewQSvgGenerator())
2015-10-24 18:18:24 +03:00
}
func (ptr *QSvgGenerator) DestroyQSvgGenerator() {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QSvgGenerator_DestroyQSvgGenerator(ptr.Pointer())
2015-10-24 18:18:24 +03:00
}
}