texcrafting/Main.qml
2024-09-10 05:12:05 +08:00

74 lines
1.3 KiB
QML

import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import texcrafting
ApplicationWindow {
width: 640
height: 480
visible: true
title: qsTr("Hello World")
TextureCrafter {
id: crafter
}
RowLayout {
anchors.fill: parent
ColumnLayout {
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
TexSlot {
id: texSlotR
rectColor: "red"
}
TexSlot {
id: texSlotG
rectColor: "green"
}
TexSlot {
id: texSlotB
rectColor: "blue"
}
}
ColumnLayout {
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
ProgressBar {
value: 0.5
}
Button {
Layout.alignment: Qt.AlignHCenter
text: qsTr("Craft!")
onClicked: crafter.packChannels([texSlotR.filePath, texSlotG.filePath, texSlotB.filePath])
}
}
ColumnLayout {
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
TexSlot {
rectColor: "green"
}
}
}
}