QtDeployer/source/QML/PreparePage.qml

115 lines
2.0 KiB
QML
Raw Normal View History

2018-03-12 11:43:03 +03:30
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Controls.Material 2.0
import QtQuick.Layouts 1.3
import Qt.labs.settings 1.0
Page {
id: page
clip: true
header: TopBar {
2018-05-10 14:08:58 +03:00
text: qsTr("Prepare")
2018-03-12 11:43:03 +03:30
ToolButton {
text: "➔"
rotation: 180
font.pointSize: largeFont
anchors.right: parent.right
onClicked: swipeview.currentIndex = 0
anchors.verticalCenter: parent.verticalCenter
}
}
property string outdir
property var cpplibs: []
ColumnLayout {
spacing: 15
anchors.margins: 15
anchors.fill: parent
Label {
elide: Text.ElideRight
Layout.fillWidth: true
font.pointSize: mediumFont
2018-05-10 14:08:58 +03:00
text: qsTr("Choose Non-Qt Libraries To Copy")
2018-03-12 11:43:03 +03:30
}
Flickable {
id: flick
Layout.fillWidth: true
Layout.fillHeight: true
contentWidth: width
contentHeight: column.height
clip: true
ScrollBar.vertical: ScrollBar { }
Rectangle {
parent: flick
anchors.fill: parent
color: "transparent"
border.color: Material.accent
}
Column {
id: column
width: parent.width
Repeater {
2018-05-10 12:36:59 +03:00
model: CppManager.cppLibraries
2018-03-12 11:43:03 +03:30
delegate: CheckDelegate {
id: del
text: modelData
width: parent.width
Connections {
target: checkAll
onCheckedChanged: del.checked = checkAll.checked
}
onCheckedChanged: {
var place = cpplibs.indexOf(del.text)
if (checked && place < 0)
cpplibs.push(del.text)
else if (place > -1)
cpplibs.splice(place, 1)
}
}
}
}
}
CheckBox {
id: checkAll
Layout.fillWidth: true
2018-05-10 14:08:58 +03:00
text: qsTr("Check All The Above")
2018-03-12 11:43:03 +03:30
}
CheckBox {
id: erase
Layout.fillWidth: true
2018-05-10 14:08:58 +03:00
text: qsTr("Erase Everything In: ") + outdir
2018-03-12 11:43:03 +03:30
}
Button {
2018-05-10 14:08:58 +03:00
text: qsTr("Next")
2018-03-12 11:43:03 +03:30
Material.background: buttonColor
Layout.alignment: Qt.AlignRight
onClicked: {
pp.erase = erase.checked
swipeview.currentIndex = 2
CppManager.cppLibraries = cpplibs
}
}
}
Settings {
property alias erase: erase.checked
}
}