mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-01-19 04:30:44 +00:00
35 lines
737 B
QML
35 lines
737 B
QML
import QtQuick 2.0
|
|
|
|
import org.yat 1.0
|
|
|
|
ObjectDestructItem {
|
|
id: textLine
|
|
|
|
property var textComponent : Qt.createComponent("TerminalText.qml")
|
|
property font font
|
|
property real fontHeight
|
|
property real fontWidth
|
|
|
|
height: fontHeight
|
|
width: parent.width
|
|
visible: objectHandle.visible
|
|
|
|
Connections {
|
|
target: objectHandle
|
|
|
|
onIndexChanged: {
|
|
y = objectHandle.index * fontHeight;
|
|
}
|
|
|
|
onTextCreated: {
|
|
var textSegment = textComponent.createObject(textLine,
|
|
{
|
|
"objectHandle" : text,
|
|
"font" : textLine.font,
|
|
"fontWidth" : textLine.fontWidth,
|
|
})
|
|
}
|
|
}
|
|
}
|
|
|