1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-26 11:52:10 +01:00

127 lines
3.7 KiB
QML
Raw Normal View History

import QtQuick 2.1
2013-11-20 12:24:34 +01:00
import QtQuick.Controls 1.0
import QtQuick.Layouts 1.0
import org.openpilot 1.0
2013-11-20 12:24:34 +01:00
Rectangle {
width: 600
height: 400
ColumnLayout {
anchors.fill: parent
2013-11-20 21:08:26 +01:00
anchors.margins: 10
spacing: 10
ScrollView {
Layout.fillWidth: true
Layout.fillHeight: true
frameVisible: true
ListView {
id: authorsView
anchors.fill: parent
spacing: 3
model: logManager.logEntries
delegate: Text {
font.pixelSize: 12
text: Flight
}
clip: true
}
}
2013-11-20 16:56:43 +01:00
RowLayout {
Layout.fillWidth: true
spacing: 10
ColumnLayout {
spacing: 10
height: 40
Text {
id: totalFlights
2013-11-20 21:08:26 +01:00
font.pixelSize: 12
text: "<b>" + qsTr("Flights recorded: ") + "</b>" + (logStatus.Flight + 1)
2013-11-20 16:56:43 +01:00
}
Text {
id: totalEntries
2013-11-20 21:08:26 +01:00
font.pixelSize: 12
text: "<b>" + qsTr("Logs slots used: ") + "</b>" + logStatus.UsedSlots
2013-11-20 16:56:43 +01:00
}
Text {
id: freeEntries
2013-11-20 21:08:26 +01:00
font.pixelSize: 12
text: "<b>" + qsTr("Logs slots left: ") + "</b>" + logStatus.FreeSlots
2013-11-20 16:56:43 +01:00
}
}
Rectangle {
Layout.fillWidth: true
}
ColumnLayout {
spacing: 10
height: 40
RowLayout {
Rectangle {
Layout.fillWidth: true
}
Text {
font.pixelSize: 12
text: "<b>" + qsTr("Flight to download:") + "</b>"
}
ComboBox {
id: flightCombo
property ListModel dataModel: ListModel {}
model: dataModel
Component.onCompleted: {
dataModel.append({"value": "All"})
for (var a = 0; a <= logStatus.Flight ; a++) {
dataModel.append({"value": (a + 1).toString()})
}
}
}
}
RowLayout {
Layout.fillWidth: true
Layout.fillHeight: true
Rectangle {
Layout.fillWidth: true
}
Button {
text: qsTr("Download logs")
activeFocusOnPress: true
onClicked: logManager.retrieveLogs(flightCombo.currentIndex - 1)
}
}
}
}
Rectangle {
border.width: 1
height: 2
width: parent.width
anchors.margins: 20
anchors.horizontalCenter: parent.horizontalCenter
border.color: "#adadad"
}
2013-11-20 21:08:26 +01:00
RowLayout {
Layout.fillWidth: true
height: 40
Button {
2013-11-20 21:08:26 +01:00
id: exportButton
text: qsTr("Export...")
activeFocusOnPress: true
onClicked: logManager.exportLogs()
}
Rectangle {
Layout.fillWidth: true
}
Button {
id: okButton
text: qsTr("OK")
2013-11-20 21:08:26 +01:00
activeFocusOnPress: true
onClicked: dialog.close()
}
}
2013-11-20 12:24:34 +01:00
}
}