start adding the songedit.qml for actuaal use
This commit is contained in:
parent
43694f0483
commit
bc809fb8db
@ -111,7 +111,9 @@ func (cl *cell) imgtext(width, height int) *imagick.MagickWand {
|
||||
r, g, b, _ := cl.font.color.RGBA()
|
||||
pw.SetColor(fmt.Sprintf("rgb(%d,%d,%d)", r, g, b))
|
||||
dw.SetFillColor(pw)
|
||||
if (cl.font.name != "") || (cl.font.name != "none") {
|
||||
dw.SetFont(cl.font.name)
|
||||
}
|
||||
dw.SetFontSize(cl.font.size)
|
||||
|
||||
otlne := "none"
|
||||
|
9
main.go
9
main.go
@ -93,6 +93,7 @@ func run() error {
|
||||
|
||||
window.Show()
|
||||
window2.Show()
|
||||
edtQmlShow()
|
||||
slides[0].clearcache()
|
||||
qml.RunMain(glInit)
|
||||
|
||||
@ -126,14 +127,16 @@ func (sl *slide) add( /*cl *cell*/ ) {
|
||||
cl.qmlimg.Set("parent", window.ObjectByName("data2"))
|
||||
cl.qmlimg.Set("index", cl.index)
|
||||
cl.setSignal()
|
||||
//give QML the text
|
||||
cl.qmlcell.ObjectByName("cellText").Set("text", cl.text)
|
||||
|
||||
}
|
||||
|
||||
func (cl *cell) Init() {
|
||||
cl.text = "Testing 1... 2... 3... :-P"
|
||||
cl.text = "hello this is text\nhaha\nhdsjfklfhaskjd"
|
||||
cl.index = -1
|
||||
cl.font.color, cl.font.outlineColor = color.RGBA{0, 0, 0, 1}, color.RGBA{1, 1, 1, 1}
|
||||
cl.font.name = fontlst[1]
|
||||
cl.font.name = "none"
|
||||
cl.font.outline = false
|
||||
cl.font.outlineSize = 1
|
||||
cl.font.size = 35
|
||||
@ -146,8 +149,6 @@ func (cl *cell) Init() {
|
||||
cl.img = imagick.NewMagickWand()
|
||||
cl.img.ReadImage("logo:")
|
||||
|
||||
//give QML the text
|
||||
cl.qmlcell.ObjectByName("cellText").Set("text", cl.text)
|
||||
}
|
||||
|
||||
//(cell) remove() should destroy everything for this cell
|
||||
|
6
qml.go
6
qml.go
@ -7,6 +7,7 @@ import (
|
||||
"runtime/debug"
|
||||
"strconv"
|
||||
"strings"
|
||||
"fmt"
|
||||
|
||||
"github.com/lordwelch/qml"
|
||||
)
|
||||
@ -152,7 +153,12 @@ func setSignals() {
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func edtQmlShow() {
|
||||
var slc *[]string
|
||||
edtQml.Common.ObjectByName("fontPicker").List("model").Convert(slc)
|
||||
fmt.Println(slc)
|
||||
}
|
||||
|
||||
//imgProvider() for preview images in QML
|
||||
|
@ -13,7 +13,7 @@ Rectangle {
|
||||
id: cellText
|
||||
enabled: true
|
||||
objectName: "cellText"
|
||||
text: "hello this is text\nhaha\nhdsjfklfhaskjd"
|
||||
text: ""
|
||||
clip: true
|
||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||
anchors.fill: parent
|
||||
|
@ -10,14 +10,18 @@ ApplicationWindow {
|
||||
ColorDialog {
|
||||
id: textClrDialog
|
||||
//objectname: "textClrDialog"
|
||||
// @disable-check M16
|
||||
title: "Please choose a color for the text"
|
||||
// @disable-check M16
|
||||
showAlphaChannel: true
|
||||
}
|
||||
|
||||
ColorDialog {
|
||||
id: outlineClrDialog
|
||||
//objectname: "outlineClrDialog"
|
||||
// @disable-check M16
|
||||
title: "Please choose a color for the text"
|
||||
// @disable-check M16
|
||||
showAlphaChannel: true
|
||||
}
|
||||
|
||||
@ -205,8 +209,10 @@ ApplicationWindow {
|
||||
|
||||
ComboBox {
|
||||
id: fontPicker
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
||||
objectName: "fontPicker"
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
||||
model: ["test","test1","test2"]
|
||||
|
||||
}
|
||||
|
||||
SpinBox {
|
||||
@ -216,6 +222,7 @@ ApplicationWindow {
|
||||
maximumValue: 1000
|
||||
value: 1
|
||||
suffix: "Pt"
|
||||
|
||||
}
|
||||
|
||||
SpinBox {
|
||||
|
Loading…
Reference in New Issue
Block a user