| 
									
										
										
										
											2015-07-23 14:46:02 +03:00
										 |  |  | import QtQuick 2.3 | 
					
						
							| 
									
										
										
										
											2017-03-31 16:15:14 +02:00
										 |  |  | import QtQuick.Controls 1.4 as QQC1 | 
					
						
							|  |  |  | import QtQuick.Controls 2.0 | 
					
						
							| 
									
										
										
										
											2015-07-23 14:46:02 +03:00
										 |  |  | import QtQuick.Window 2.2 | 
					
						
							|  |  |  | import QtQuick.Dialogs 1.2 | 
					
						
							|  |  |  | import QtQuick.Layouts 1.1 | 
					
						
							|  |  |  | import org.subsurfacedivelog.mobile 1.0 | 
					
						
							| 
									
										
										
										
											2017-03-31 16:15:14 +02:00
										 |  |  | import org.kde.kirigami 2.0 as Kirigami | 
					
						
							| 
									
										
										
										
											2015-07-23 14:46:02 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-03-08 21:26:54 +01:00
										 |  |  | Kirigami.Page { | 
					
						
							| 
									
										
										
										
											2015-07-23 14:46:02 +03:00
										 |  |  | 	id: diveComputerDownloadWindow | 
					
						
							| 
									
										
										
										
											2016-02-02 21:48:43 +02:00
										 |  |  | 	anchors.top:parent.top | 
					
						
							| 
									
										
										
										
											2015-07-23 14:46:02 +03:00
										 |  |  | 	width: parent.width | 
					
						
							|  |  |  | 	height: parent.height | 
					
						
							| 
									
										
										
										
											2016-02-02 21:48:43 +02:00
										 |  |  | 	Layout.fillWidth: true; | 
					
						
							| 
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 |  |  | 	title: qsTr("Dive Computer") | 
					
						
							| 
									
										
										
										
											2015-07-23 14:46:02 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-02-12 22:26:47 -08:00
										 |  |  | /* this can be done by hitting the back key | 
					
						
							| 
									
										
										
										
											2016-02-12 04:51:03 -08:00
										 |  |  | 	contextualActions: [ | 
					
						
							| 
									
										
										
										
											2017-03-31 16:15:14 +02:00
										 |  |  | 		Kirigami.Action { | 
					
						
							| 
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 |  |  | 			text: qsTr("Close Preferences") | 
					
						
							| 
									
										
										
										
											2016-02-12 04:51:03 -08:00
										 |  |  | 			iconName: "dialog-cancel" | 
					
						
							|  |  |  | 			onTriggered: { | 
					
						
							|  |  |  | 				stackView.pop() | 
					
						
							|  |  |  | 				contextDrawer.close() | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 	] | 
					
						
							| 
									
										
										
										
											2016-02-12 22:26:47 -08:00
										 |  |  |  */ | 
					
						
							| 
									
										
										
										
											2016-02-02 21:48:43 +02:00
										 |  |  | 	ColumnLayout { | 
					
						
							| 
									
										
										
										
											2015-07-23 14:46:02 +03:00
										 |  |  | 		anchors.top: parent.top | 
					
						
							|  |  |  | 		height: parent.height | 
					
						
							| 
									
										
										
										
											2016-02-02 21:48:43 +02:00
										 |  |  | 		width: parent.width | 
					
						
							|  |  |  | 		Layout.fillWidth: true | 
					
						
							|  |  |  | 		RowLayout { | 
					
						
							|  |  |  | 			anchors.top:parent.top | 
					
						
							|  |  |  | 			Layout.fillWidth: true | 
					
						
							| 
									
										
										
										
											2017-03-31 16:15:14 +02:00
										 |  |  | 			Kirigami.Label { text: qsTr(" Vendor name: ") } | 
					
						
							| 
									
										
										
										
											2016-02-02 21:48:43 +02:00
										 |  |  | 			ComboBox { Layout.fillWidth: true } | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 		RowLayout { | 
					
						
							| 
									
										
										
										
											2017-03-31 16:15:14 +02:00
										 |  |  | 			Kirigami.Label { text: qsTr(" Dive Computer:") } | 
					
						
							| 
									
										
										
										
											2016-02-02 21:48:43 +02:00
										 |  |  | 			ComboBox { Layout.fillWidth: true } | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 		RowLayout { | 
					
						
							| 
									
										
										
										
											2017-03-31 16:15:14 +02:00
										 |  |  | 			Kirigami.Label { text: " Progress:" } | 
					
						
							| 
									
										
										
										
											2016-02-02 21:48:43 +02:00
										 |  |  | 			Layout.fillWidth: true | 
					
						
							|  |  |  | 			ProgressBar { Layout.fillWidth: true } | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 		RowLayout { | 
					
						
							| 
									
										
										
										
											2017-03-31 16:15:14 +02:00
										 |  |  | 			Button { | 
					
						
							| 
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 |  |  | 				text: qsTr("Download") | 
					
						
							| 
									
										
										
										
											2016-02-02 21:48:43 +02:00
										 |  |  | 				onClicked: { | 
					
						
							| 
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 |  |  | 					text: qsTr("Retry") | 
					
						
							| 
									
										
										
										
											2016-02-02 21:48:43 +02:00
										 |  |  | 					stackView.pop(); | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 			} | 
					
						
							| 
									
										
										
										
											2017-03-31 16:15:14 +02:00
										 |  |  | 			Button { | 
					
						
							| 
									
										
										
										
											2016-02-02 21:48:43 +02:00
										 |  |  | 				id:quitbutton | 
					
						
							| 
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 |  |  | 				text: qsTr("Quit") | 
					
						
							| 
									
										
										
										
											2016-02-02 21:48:43 +02:00
										 |  |  | 				onClicked: { | 
					
						
							|  |  |  | 					stackView.pop(); | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 		RowLayout { | 
					
						
							| 
									
										
										
										
											2017-03-31 16:15:14 +02:00
										 |  |  | 			Kirigami.Label { | 
					
						
							| 
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 |  |  | 				text: qsTr(" Downloaded dives") | 
					
						
							| 
									
										
										
										
											2016-02-02 21:48:43 +02:00
										 |  |  | 			} | 
					
						
							|  |  |  | 		} | 
					
						
							| 
									
										
										
										
											2017-03-31 16:15:14 +02:00
										 |  |  | 		QQC1.TableView { | 
					
						
							| 
									
										
										
										
											2015-07-23 14:46:02 +03:00
										 |  |  | 			width: parent.width | 
					
						
							| 
									
										
										
										
											2016-02-02 21:48:43 +02:00
										 |  |  | 			Layout.fillWidth: true  // The tableview should fill
 | 
					
						
							|  |  |  | 			Layout.fillHeight: true // all remaining vertical space
 | 
					
						
							|  |  |  | 			height: parent.height   // on this screen
 | 
					
						
							| 
									
										
										
										
											2017-03-31 16:15:14 +02:00
										 |  |  | 			QQC1.TableViewColumn { | 
					
						
							| 
									
										
										
										
											2016-02-02 21:48:43 +02:00
										 |  |  | 				width: parent.width / 2 | 
					
						
							|  |  |  | 				role: "datetime" | 
					
						
							| 
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 |  |  | 				title: qsTr("Date / Time") | 
					
						
							| 
									
										
										
										
											2016-02-02 21:48:43 +02:00
										 |  |  | 			} | 
					
						
							| 
									
										
										
										
											2017-03-31 16:15:14 +02:00
										 |  |  | 			QQC1.TableViewColumn { | 
					
						
							| 
									
										
										
										
											2016-02-02 21:48:43 +02:00
										 |  |  | 				width: parent.width / 4 | 
					
						
							|  |  |  | 				role: "duration" | 
					
						
							| 
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 |  |  | 				title: qsTr("Duration") | 
					
						
							| 
									
										
										
										
											2016-02-02 21:48:43 +02:00
										 |  |  | 			} | 
					
						
							| 
									
										
										
										
											2017-03-31 16:15:14 +02:00
										 |  |  | 			QQC1.TableViewColumn { | 
					
						
							| 
									
										
										
										
											2016-02-02 21:48:43 +02:00
										 |  |  | 				width: parent.width / 4 | 
					
						
							|  |  |  | 				role: "depth" | 
					
						
							| 
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 |  |  | 				title: qsTr("Depth") | 
					
						
							| 
									
										
										
										
											2016-02-02 21:48:43 +02:00
										 |  |  | 			} | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 		RowLayout { | 
					
						
							|  |  |  | 			Layout.fillWidth: true | 
					
						
							| 
									
										
										
										
											2017-03-31 16:15:14 +02:00
										 |  |  | 			Button { | 
					
						
							| 
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 |  |  | 				text: qsTr("Accept") | 
					
						
							| 
									
										
										
										
											2016-02-02 21:48:43 +02:00
										 |  |  | 				onClicked: { | 
					
						
							|  |  |  | 				stackView.pop(); | 
					
						
							| 
									
										
										
										
											2015-07-23 14:46:02 +03:00
										 |  |  | 				} | 
					
						
							| 
									
										
										
										
											2016-02-02 21:48:43 +02:00
										 |  |  | 			} | 
					
						
							| 
									
										
										
										
											2017-03-31 16:15:14 +02:00
										 |  |  | 			Button { | 
					
						
							| 
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 |  |  | 				text: qsTr("Quit") | 
					
						
							| 
									
										
										
										
											2016-02-02 21:48:43 +02:00
										 |  |  | 				onClicked: { | 
					
						
							|  |  |  | 					stackView.pop(); | 
					
						
							| 
									
										
										
										
											2015-07-23 14:46:02 +03:00
										 |  |  | 				} | 
					
						
							|  |  |  | 			} | 
					
						
							| 
									
										
										
										
											2017-03-31 16:15:14 +02:00
										 |  |  | 			Kirigami.Label { | 
					
						
							| 
									
										
										
										
											2016-02-02 21:48:43 +02:00
										 |  |  | 				text: ""  // Spacer between 2 button groups
 | 
					
						
							|  |  |  | 				Layout.fillWidth: true | 
					
						
							|  |  |  | 			} | 
					
						
							| 
									
										
										
										
											2017-03-31 16:15:14 +02:00
										 |  |  | 			Button { | 
					
						
							| 
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 |  |  | 				text: qsTr("Select All") | 
					
						
							| 
									
										
										
										
											2016-02-02 21:48:43 +02:00
										 |  |  | 			} | 
					
						
							| 
									
										
										
										
											2017-03-31 16:15:14 +02:00
										 |  |  | 			Button { | 
					
						
							| 
									
										
										
										
											2016-02-02 21:48:43 +02:00
										 |  |  | 				id: unselectbutton | 
					
						
							| 
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 |  |  | 				text: qsTr("Unselect All") | 
					
						
							| 
									
										
										
										
											2016-02-02 21:48:43 +02:00
										 |  |  | 			} | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 		RowLayout { // spacer to make space for silly button
 | 
					
						
							|  |  |  | 			Layout.minimumHeight: 1.2 * unselectbutton.height | 
					
						
							| 
									
										
										
										
											2017-03-31 16:15:14 +02:00
										 |  |  | 			Kirigami.Label { | 
					
						
							| 
									
										
										
										
											2016-02-02 21:48:43 +02:00
										 |  |  | 				text:"" | 
					
						
							| 
									
										
										
										
											2015-07-23 14:46:02 +03:00
										 |  |  | 			} | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | } |