Mobile. Modify DownloadFromDiveComputer.qml

1) Create space for sillybutton at bottom of screen
        2) Reformat columns in tableview
        3) General cleanup and simplification of code.

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Willem Ferguson 2016-02-02 21:48:43 +02:00 committed by Dirk Hohndel
parent 520f505d20
commit 545b106d5c

View file

@ -1,5 +1,6 @@
import QtQuick 2.3 import QtQuick 2.3
import QtQuick.Controls 1.2 import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.2
import QtQuick.Window 2.2 import QtQuick.Window 2.2
import QtQuick.Dialogs 1.2 import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
@ -10,25 +11,16 @@ Item {
anchors.top:parent.top anchors.top:parent.top
width: parent.width width: parent.width
height: parent.height height: parent.height
Layout.fillWidth: true;
GridLayout { ColumnLayout {
columns: 2
anchors.top: parent.top anchors.top: parent.top
width: parent.width
height: parent.height
ColumnLayout {
height: parent.height height: parent.height
width: parent.width width: parent.width
ColumnLayout {
width: parent.width
Layout.fillHeight: true
ColumnLayout {
Layout.fillHeight: true
Layout.fillWidth: true
ColumnLayout {
height: parent.height
Layout.fillWidth: true Layout.fillWidth: true
RowLayout { RowLayout {
anchors.top:parent.top
Layout.fillWidth: true
Text { text: " Vendor name : " } Text { text: " Vendor name : " }
ComboBox { Layout.fillWidth: true } ComboBox { Layout.fillWidth: true }
} }
@ -36,22 +28,6 @@ Item {
Text { text: " Dive Computer:" } Text { text: " Dive Computer:" }
ComboBox { Layout.fillWidth: true } ComboBox { Layout.fillWidth: true }
} }
// Text { text: "Device or mount point" }
// RowLayout {
// Layout.fillWidth: true
// TextField { Layout.fillWidth: true }
// SubsurfaceButton { text: "..." }
// }
// GridLayout {
// columns: 2
// CheckBox { text: "Force download of all dives" }
// CheckBox { text: "Always prefer downloaded dives" }
// CheckBox { text: "Download into new trip" }
// CheckBox { text: "Save libdivecomputer logfile" }
// CheckBox { text: "Save libdivecomputer dumpfile" }
// CheckBox { text: "Choose Bluetooth download mode" }
// }
RowLayout { RowLayout {
Text { text: " Progress:" } Text { text: " Progress:" }
Layout.fillWidth: true Layout.fillWidth: true
@ -61,54 +37,46 @@ Item {
SubsurfaceButton { SubsurfaceButton {
text: "Download" text: "Download"
onClicked: { onClicked: {
text: "Retry"
stackView.pop(); stackView.pop();
} }
} }
SubsurfaceButton { SubsurfaceButton {
id:quitbutton
text: "Quit" text: "Quit"
onClicked: { onClicked: {
stackView.pop(); stackView.pop();
} }
} }
} }
}
}
ColumnLayout {
height: parent.height
Layout.fillWidth: true
RowLayout { RowLayout {
Text { Text {
text: " Downloaded dives" text: " Downloaded dives"
} }
} }
TableView { TableView {
Layout.fillWidth: true width: parent.width
Layout.fillHeight: true Layout.fillWidth: true // The tableview should fill
TableViewColumn { Layout.fillHeight: true // all remaining vertical space
width: 50 height: parent.height // on this screen
role: "isChecked"
title: "Select"
}
TableViewColumn { TableViewColumn {
width: parent.width / 2
role: "datetime" role: "datetime"
title: "Date / Time" title: "Date / Time"
} }
TableViewColumn { TableViewColumn {
width: 80 width: parent.width / 4
role: "duration" role: "duration"
title: "Duration" title: "Duration"
} }
TableViewColumn { TableViewColumn {
width: 50 width: parent.width / 4
role: "depth" role: "depth"
title: "Depth" title: "Depth"
} }
} }
} RowLayout {
}
GridLayout {
Layout.fillWidth: true Layout.fillWidth: true
columns: 5
SubsurfaceButton { SubsurfaceButton {
text: "Accept" text: "Accept"
onClicked: { onClicked: {
@ -122,16 +90,22 @@ Item {
} }
} }
Text { Text {
text: "" text: "" // Spacer between 2 button groups
Layout.fillWidth: true Layout.fillWidth: true
} }
SubsurfaceButton { SubsurfaceButton {
text: "Select All" text: "Select All"
} }
SubsurfaceButton { SubsurfaceButton {
id: unselectbutton
text: "Unselect All" text: "Unselect All"
} }
} }
RowLayout { // spacer to make space for silly button
Layout.minimumHeight: 1.2 * unselectbutton.height
Text {
text:""
}
} }
} }
} }