cutego/multimediawidgets/qgraphicsvideoitem.go

102 lines
2.9 KiB
Go
Raw Normal View History

2015-10-24 18:18:24 +03:00
package multimediawidgets
//#include "qgraphicsvideoitem.h"
import "C"
import (
"github.com/therecipe/qt"
"github.com/therecipe/qt/core"
"github.com/therecipe/qt/gui"
"github.com/therecipe/qt/multimedia"
"github.com/therecipe/qt/widgets"
"unsafe"
)
type QGraphicsVideoItem struct {
multimedia.QMediaBindableInterface
widgets.QGraphicsObject
}
2015-11-09 20:23:42 +03:00
type QGraphicsVideoItem_ITF interface {
multimedia.QMediaBindableInterface_ITF
widgets.QGraphicsObject_ITF
QGraphicsVideoItem_PTR() *QGraphicsVideoItem
2015-10-24 18:18:24 +03:00
}
func (p *QGraphicsVideoItem) Pointer() unsafe.Pointer {
2015-11-09 20:23:42 +03:00
return p.QMediaBindableInterface_PTR().Pointer()
2015-10-24 18:18:24 +03:00
}
func (p *QGraphicsVideoItem) SetPointer(ptr unsafe.Pointer) {
2015-11-09 20:23:42 +03:00
p.QMediaBindableInterface_PTR().SetPointer(ptr)
p.QGraphicsObject_PTR().SetPointer(ptr)
2015-10-24 18:18:24 +03:00
}
2015-11-09 20:23:42 +03:00
func PointerFromQGraphicsVideoItem(ptr QGraphicsVideoItem_ITF) unsafe.Pointer {
2015-10-24 18:18:24 +03:00
if ptr != nil {
2015-11-09 20:23:42 +03:00
return ptr.QGraphicsVideoItem_PTR().Pointer()
2015-10-24 18:18:24 +03:00
}
return nil
}
2015-11-09 20:23:42 +03:00
func NewQGraphicsVideoItemFromPointer(ptr unsafe.Pointer) *QGraphicsVideoItem {
2015-10-24 18:18:24 +03:00
var n = new(QGraphicsVideoItem)
n.SetPointer(ptr)
2015-11-09 20:23:42 +03:00
if len(n.ObjectName()) == 0 {
2015-10-24 18:18:24 +03:00
n.SetObjectName("QGraphicsVideoItem_" + qt.RandomIdentifier())
}
return n
}
2015-11-09 20:23:42 +03:00
func (ptr *QGraphicsVideoItem) QGraphicsVideoItem_PTR() *QGraphicsVideoItem {
2015-10-24 18:18:24 +03:00
return ptr
}
2015-11-09 20:23:42 +03:00
func NewQGraphicsVideoItem(parent widgets.QGraphicsItem_ITF) *QGraphicsVideoItem {
return NewQGraphicsVideoItemFromPointer(C.QGraphicsVideoItem_NewQGraphicsVideoItem(widgets.PointerFromQGraphicsItem(parent)))
2015-10-24 18:18:24 +03:00
}
func (ptr *QGraphicsVideoItem) AspectRatioMode() core.Qt__AspectRatioMode {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
return core.Qt__AspectRatioMode(C.QGraphicsVideoItem_AspectRatioMode(ptr.Pointer()))
2015-10-24 18:18:24 +03:00
}
return 0
}
func (ptr *QGraphicsVideoItem) MediaObject() *multimedia.QMediaObject {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
return multimedia.NewQMediaObjectFromPointer(C.QGraphicsVideoItem_MediaObject(ptr.Pointer()))
2015-10-24 18:18:24 +03:00
}
return nil
}
2015-11-09 20:23:42 +03:00
func (ptr *QGraphicsVideoItem) Paint(painter gui.QPainter_ITF, option widgets.QStyleOptionGraphicsItem_ITF, widget widgets.QWidget_ITF) {
2015-10-24 18:18:24 +03:00
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QGraphicsVideoItem_Paint(ptr.Pointer(), gui.PointerFromQPainter(painter), widgets.PointerFromQStyleOptionGraphicsItem(option), widgets.PointerFromQWidget(widget))
2015-10-24 18:18:24 +03:00
}
}
func (ptr *QGraphicsVideoItem) SetAspectRatioMode(mode core.Qt__AspectRatioMode) {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QGraphicsVideoItem_SetAspectRatioMode(ptr.Pointer(), C.int(mode))
2015-10-24 18:18:24 +03:00
}
}
2015-11-09 20:23:42 +03:00
func (ptr *QGraphicsVideoItem) SetOffset(offset core.QPointF_ITF) {
2015-10-24 18:18:24 +03:00
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QGraphicsVideoItem_SetOffset(ptr.Pointer(), core.PointerFromQPointF(offset))
2015-10-24 18:18:24 +03:00
}
}
2015-11-09 20:23:42 +03:00
func (ptr *QGraphicsVideoItem) SetSize(size core.QSizeF_ITF) {
2015-10-24 18:18:24 +03:00
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QGraphicsVideoItem_SetSize(ptr.Pointer(), core.PointerFromQSizeF(size))
2015-10-24 18:18:24 +03:00
}
}
func (ptr *QGraphicsVideoItem) DestroyQGraphicsVideoItem() {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QGraphicsVideoItem_DestroyQGraphicsVideoItem(ptr.Pointer())
2015-10-24 18:18:24 +03:00
ptr.SetPointer(nil)
}
}