aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Willem Ferguson <willemferguson@zoology.up.ac.za>2016-02-02 21:48:43 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-02-03 10:50:00 -0800
commit545b106d5cacc1e773bd26be9bed92fe84163d1d (patch)
tree052e416613b5ecfb1dfee0b499fc18f53582d4d2
parent520f505d20766fb8416de5f1e30a534abb89adba (diff)
downloadsubsurface-545b106d5cacc1e773bd26be9bed92fe84163d1d.tar.gz
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>
-rw-r--r--qt-mobile/qml/DownloadFromDiveComputer.qml204
1 files changed, 89 insertions, 115 deletions
diff --git a/qt-mobile/qml/DownloadFromDiveComputer.qml b/qt-mobile/qml/DownloadFromDiveComputer.qml
index 5ce5370e6..2cbbfadc6 100644
--- a/qt-mobile/qml/DownloadFromDiveComputer.qml
+++ b/qt-mobile/qml/DownloadFromDiveComputer.qml
@@ -1,5 +1,6 @@
import QtQuick 2.3
import QtQuick.Controls 1.2
+import QtQuick.Controls.Styles 1.2
import QtQuick.Window 2.2
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.1
@@ -7,130 +8,103 @@ import org.subsurfacedivelog.mobile 1.0
Item {
id: diveComputerDownloadWindow
- anchors.top: parent.top
+ anchors.top:parent.top
width: parent.width
height: parent.height
+ Layout.fillWidth: true;
- GridLayout {
- columns: 2
+ ColumnLayout {
anchors.top: parent.top
- width: parent.width
height: parent.height
- ColumnLayout {
- height: parent.height
+ width: parent.width
+ Layout.fillWidth: true
+ RowLayout {
+ anchors.top:parent.top
+ Layout.fillWidth: true
+ Text { text: " Vendor name : " }
+ ComboBox { Layout.fillWidth: true }
+ }
+ RowLayout {
+ Text { text: " Dive Computer:" }
+ ComboBox { Layout.fillWidth: true }
+ }
+ RowLayout {
+ Text { text: " Progress:" }
+ Layout.fillWidth: true
+ ProgressBar { Layout.fillWidth: true }
+ }
+ RowLayout {
+ SubsurfaceButton {
+ text: "Download"
+ onClicked: {
+ text: "Retry"
+ stackView.pop();
+ }
+ }
+ SubsurfaceButton {
+ id:quitbutton
+ text: "Quit"
+ onClicked: {
+ stackView.pop();
+ }
+ }
+ }
+ RowLayout {
+ Text {
+ text: " Downloaded dives"
+ }
+ }
+ TableView {
width: parent.width
- ColumnLayout {
- width: parent.width
- Layout.fillHeight: true
- ColumnLayout {
- Layout.fillHeight: true
- Layout.fillWidth: true
- ColumnLayout {
- height: parent.height
- Layout.fillWidth: true
- RowLayout {
- Text { text: " Vendor name : " }
- ComboBox { Layout.fillWidth: true }
- }
- RowLayout {
- Text { text: " Dive Computer:" }
- 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 {
- Text { text: " Progress:" }
- Layout.fillWidth: true
- ProgressBar { Layout.fillWidth: true }
- }
- RowLayout {
- SubsurfaceButton {
- text: "Download"
- onClicked: {
- stackView.pop();
- }
- }
- SubsurfaceButton {
- text: "Quit"
- onClicked: {
- stackView.pop();
- }
- }
- }
- }
+ Layout.fillWidth: true // The tableview should fill
+ Layout.fillHeight: true // all remaining vertical space
+ height: parent.height // on this screen
+ TableViewColumn {
+ width: parent.width / 2
+ role: "datetime"
+ title: "Date / Time"
+ }
+ TableViewColumn {
+ width: parent.width / 4
+ role: "duration"
+ title: "Duration"
+ }
+ TableViewColumn {
+ width: parent.width / 4
+ role: "depth"
+ title: "Depth"
+ }
+ }
+ RowLayout {
+ Layout.fillWidth: true
+ SubsurfaceButton {
+ text: "Accept"
+ onClicked: {
+ stackView.pop();
}
- ColumnLayout {
- height: parent.height
- Layout.fillWidth: true
- RowLayout {
- Text {
- text: " Downloaded dives"
- }
- }
- TableView {
- Layout.fillWidth: true
- Layout.fillHeight: true
- TableViewColumn {
- width: 50
- role: "isChecked"
- title: "Select"
- }
- TableViewColumn {
- role: "datetime"
- title: "Date / Time"
- }
- TableViewColumn {
- width: 80
- role: "duration"
- title: "Duration"
- }
- TableViewColumn {
- width: 50
- role: "depth"
- title: "Depth"
- }
- }
+ }
+ SubsurfaceButton {
+ text: "Quit"
+ onClicked: {
+ stackView.pop();
}
}
- GridLayout {
- Layout.fillWidth: true
- columns: 5
- SubsurfaceButton {
- text: "Accept"
- onClicked: {
- stackView.pop();
- }
- }
- SubsurfaceButton {
- text: "Quit"
- onClicked: {
- stackView.pop();
- }
- }
- Text {
- text: ""
- Layout.fillWidth: true
- }
- SubsurfaceButton {
- text: "Select All"
- }
- SubsurfaceButton {
- text: "Unselect All"
- }
+ Text {
+ text: "" // Spacer between 2 button groups
+ Layout.fillWidth: true
+ }
+ SubsurfaceButton {
+ text: "Select All"
+ }
+ SubsurfaceButton {
+ id: unselectbutton
+ text: "Unselect All"
+ }
+ }
+ RowLayout { // spacer to make space for silly button
+ Layout.minimumHeight: 1.2 * unselectbutton.height
+ Text {
+ text:""
}
}
}