| 
									
										
										
										
											2017-04-27 20:30:36 +02:00
										 |  |  | // SPDX-License-Identifier: GPL-2.0
 | 
					
						
							| 
									
										
										
										
											2015-11-29 17:43:56 +01:00
										 |  |  | import QtQuick 2.4 | 
					
						
							| 
									
										
										
										
											2017-03-31 16:15:14 +02:00
										 |  |  | import QtQuick.Controls 2.0 | 
					
						
							| 
									
										
										
										
											2015-05-27 13:34:55 +03:00
										 |  |  | import QtQuick.Window 2.2 | 
					
						
							| 
									
										
										
										
											2015-06-04 11:27:38 +03:00
										 |  |  | import QtQuick.Dialogs 1.2 | 
					
						
							| 
									
										
										
										
											2015-07-10 11:05:13 +03:00
										 |  |  | import QtQuick.Layouts 1.1 | 
					
						
							| 
									
										
										
										
											2015-07-30 08:17:09 +02:00
										 |  |  | import QtQuick.Window 2.2 | 
					
						
							| 
									
										
										
										
											2015-06-04 13:36:36 +03:00
										 |  |  | import org.subsurfacedivelog.mobile 1.0 | 
					
						
							| 
									
										
										
										
											2017-03-31 16:15:14 +02:00
										 |  |  | import org.kde.kirigami 2.0 as Kirigami | 
					
						
							| 
									
										
										
										
											2015-10-09 01:57:10 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-03-08 21:26:54 +01:00
										 |  |  | Kirigami.ApplicationWindow { | 
					
						
							| 
									
										
										
										
											2015-12-03 23:27:27 +01:00
										 |  |  | 	id: rootItem | 
					
						
							| 
									
										
										
										
											2016-01-01 09:34:32 -08:00
										 |  |  | 	title: qsTr("Subsurface-mobile") | 
					
						
							| 
									
										
										
										
											2017-06-28 06:50:11 -07:00
										 |  |  | 	reachableModeEnabled: false // while it's a good idea, it seems to confuse more than help
 | 
					
						
							| 
									
										
										
										
											2016-04-22 18:12:15 +02:00
										 |  |  | 	header: Kirigami.ApplicationHeader { | 
					
						
							|  |  |  | 		minimumHeight: 0 | 
					
						
							| 
									
										
										
										
											2017-06-21 09:19:24 -07:00
										 |  |  | 		preferredHeight: Math.round(Kirigami.Units.gridUnit * (Qt.platform.os == "ios" ? 2 : 1.5)) | 
					
						
							| 
									
										
										
										
											2016-04-22 18:12:15 +02:00
										 |  |  | 		maximumHeight: Kirigami.Units.gridUnit * 2 | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2015-07-12 10:42:23 -07:00
										 |  |  | 	property bool fullscreen: true | 
					
						
							| 
									
										
										
										
											2016-04-06 11:42:38 -07:00
										 |  |  | 	property alias oldStatus: manager.oldStatus | 
					
						
							| 
									
										
										
										
											2017-06-17 23:22:37 -07:00
										 |  |  | 	property alias notificationText: manager.notificationText | 
					
						
							| 
									
										
										
										
											2016-03-02 17:14:47 -08:00
										 |  |  | 	property QtObject notification: null | 
					
						
							| 
									
										
										
										
											2016-03-30 20:38:51 -05:00
										 |  |  | 	property bool showingDiveList: false | 
					
						
							| 
									
										
										
										
											2016-04-03 18:33:40 -07:00
										 |  |  | 	property alias syncToCloud: manager.syncToCloud | 
					
						
							| 
									
										
										
										
											2016-06-13 16:42:36 -07:00
										 |  |  | 	property alias showPin: manager.showPin | 
					
						
							| 
									
										
										
										
											2017-06-17 23:22:37 -07:00
										 |  |  | 	onNotificationTextChanged: { | 
					
						
							|  |  |  | 		if (notificationText != "") { | 
					
						
							|  |  |  | 			// there's a risk that we have a >5 second gap in update events;
 | 
					
						
							|  |  |  | 			// still, keep the timeout at 5s to avoid odd unchanging notifications
 | 
					
						
							|  |  |  | 			showPassiveNotification(notificationText, 5000) | 
					
						
							| 
									
										
										
										
											2016-03-02 17:14:47 -08:00
										 |  |  | 		} else { | 
					
						
							| 
									
										
										
										
											2017-06-17 23:22:37 -07:00
										 |  |  | 			// hiding the notification right away may be a mistake as it hides the last warning / error
 | 
					
						
							| 
									
										
										
										
											2016-03-03 19:35:33 +01:00
										 |  |  | 			hidePassiveNotification(); | 
					
						
							| 
									
										
										
										
											2016-03-02 17:14:47 -08:00
										 |  |  | 		} | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2015-11-29 17:43:56 +01:00
										 |  |  | 	FontMetrics { | 
					
						
							|  |  |  | 		id: fontMetrics | 
					
						
							| 
									
										
										
										
											2017-06-20 10:56:49 -07:00
										 |  |  | 		Component.onCompleted: { | 
					
						
							|  |  |  | 			console.log("Using the following font: " + fontMetrics.font.family) | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-04-14 13:05:01 -07:00
										 |  |  | 		/* this shouldn't be needed anymore | 
					
						
							| 
									
										
										
										
											2016-09-20 06:42:34 -07:00
										 |  |  | 		Component.onCompleted: { | 
					
						
							|  |  |  | 			if (Math.round(rootItem.width / Kirigami.Units.gridUnit) < 20) { | 
					
						
							|  |  |  | 				fontMetrics.font.pointSize = fontMetrics.font.pointSize * 2 / 3 | 
					
						
							|  |  |  | 				Kirigami.Theme.defaultFont.pointSize = fontMetrics.font.pointSize | 
					
						
							|  |  |  | 				console.log("Reduce font size for narrow screens: " + fontMetrics.font.pointSize) | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 		} | 
					
						
							| 
									
										
										
										
											2017-04-14 13:05:01 -07:00
										 |  |  | 		*/ | 
					
						
							| 
									
										
										
										
											2015-11-29 17:43:56 +01:00
										 |  |  | 	} | 
					
						
							| 
									
										
										
										
											2016-01-19 12:42:58 -08:00
										 |  |  | 	visible: false | 
					
						
							| 
									
										
										
										
											2016-12-27 18:36:02 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	// TODO: Verify where the opacity went to.
 | 
					
						
							|  |  |  | 	// opacity: 0
 | 
					
						
							| 
									
										
										
										
											2015-06-04 11:27:38 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-02-10 21:47:09 -08:00
										 |  |  | 	function returnTopPage() { | 
					
						
							|  |  |  | 		for (var i=stackView.depth; i>1; i--) { | 
					
						
							|  |  |  | 			stackView.pop() | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 		detailsWindow.endEditMode() | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-03-30 20:39:25 -05:00
										 |  |  | 	function scrollToTop() { | 
					
						
							|  |  |  | 		diveList.scrollToTop() | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-04-02 07:09:40 -05:00
										 |  |  | 	function showMap(location) { | 
					
						
							|  |  |  | 		var urlPrefix = "https://www.google.com/maps/place/" | 
					
						
							|  |  |  | 		var locationPair = location + "/@" + location | 
					
						
							|  |  |  | 		var urlSuffix = ",5000m/data=!3m1!1e3!4m2!3m1!1s0x0:0x0" | 
					
						
							|  |  |  | 		Qt.openUrlExternally(urlPrefix + locationPair + urlSuffix) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-04-01 22:29:39 -05:00
										 |  |  | 	function startAddDive() { | 
					
						
							|  |  |  | 		detailsWindow.state = "add" | 
					
						
							|  |  |  | 		detailsWindow.dive_id = manager.addDive(); | 
					
						
							|  |  |  | 		detailsWindow.number = manager.getNumber(detailsWindow.dive_id) | 
					
						
							|  |  |  | 		detailsWindow.date = manager.getDate(detailsWindow.dive_id) | 
					
						
							|  |  |  | 		detailsWindow.airtemp = "" | 
					
						
							|  |  |  | 		detailsWindow.watertemp = "" | 
					
						
							| 
									
										
										
										
											2016-05-20 18:48:36 +02:00
										 |  |  | 		detailsWindow.buddyModel = manager.buddyInit | 
					
						
							|  |  |  | 		detailsWindow.buddyIndex = -1 | 
					
						
							| 
									
										
										
										
											2017-04-14 17:09:09 -07:00
										 |  |  | 		detailsWindow.buddyText = "" | 
					
						
							| 
									
										
										
										
											2016-04-01 22:29:39 -05:00
										 |  |  | 		detailsWindow.depth = "" | 
					
						
							| 
									
										
										
										
											2016-05-20 18:48:36 +02:00
										 |  |  | 		detailsWindow.divemasterModel = manager.divemasterInit | 
					
						
							|  |  |  | 		detailsWindow.divemasterIndex = -1 | 
					
						
							| 
									
										
										
										
											2017-04-14 17:09:09 -07:00
										 |  |  | 		detailsWindow.divemasterText = "" | 
					
						
							| 
									
										
										
										
											2016-04-01 22:29:39 -05:00
										 |  |  | 		detailsWindow.notes = "" | 
					
						
							|  |  |  | 		detailsWindow.location = "" | 
					
						
							| 
									
										
										
										
											2016-04-15 05:17:39 -07:00
										 |  |  | 		detailsWindow.gps = "" | 
					
						
							| 
									
										
										
										
											2016-04-01 22:29:39 -05:00
										 |  |  | 		detailsWindow.duration = "" | 
					
						
							| 
									
										
										
										
											2016-05-20 18:48:36 +02:00
										 |  |  | 		detailsWindow.suitModel = manager.suitInit | 
					
						
							|  |  |  | 		detailsWindow.suitIndex = -1 | 
					
						
							| 
									
										
										
										
											2017-04-14 17:09:09 -07:00
										 |  |  | 		detailsWindow.suitText = "" | 
					
						
							|  |  |  | 		detailsWindow.cylinderModel = manager.cylinderInit | 
					
						
							|  |  |  | 		detailsWindow.cylinderIndex = -1 | 
					
						
							|  |  |  | 		detailsWindow.cylinderText = "" | 
					
						
							| 
									
										
										
										
											2016-04-01 22:29:39 -05:00
										 |  |  | 		detailsWindow.weight = "" | 
					
						
							|  |  |  | 		detailsWindow.gasmix = "" | 
					
						
							|  |  |  | 		detailsWindow.startpressure = "" | 
					
						
							|  |  |  | 		detailsWindow.endpressure = "" | 
					
						
							| 
									
										
										
										
											2016-04-15 05:17:39 -07:00
										 |  |  | 		detailsWindow.gpsCheckbox = false | 
					
						
							| 
									
										
										
										
											2016-04-01 22:29:39 -05:00
										 |  |  | 		stackView.push(detailsWindow) | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-03-08 21:26:54 +01:00
										 |  |  | 	globalDrawer: Kirigami.GlobalDrawer { | 
					
						
							| 
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 |  |  | 		title: qsTr("Subsurface") | 
					
						
							| 
									
										
										
										
											2015-11-29 17:43:56 +01:00
										 |  |  | 		titleIcon: "qrc:/qml/subsurface-mobile-icon.png" | 
					
						
							| 
									
										
										
										
											2015-11-07 03:08:05 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-11-29 17:43:56 +01:00
										 |  |  | 		bannerImageSource: "dive.jpg" | 
					
						
							| 
									
										
										
										
											2016-06-12 12:09:49 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-04-13 19:57:22 +02:00
										 |  |  | 		actions: [ | 
					
						
							| 
									
										
										
										
											2016-03-08 21:26:54 +01:00
										 |  |  | 			Kirigami.Action { | 
					
						
							| 
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 |  |  | 				text: qsTr("Dive list") | 
					
						
							| 
									
										
										
										
											2015-12-04 00:26:45 +01:00
										 |  |  | 				onTriggered: { | 
					
						
							| 
									
										
										
										
											2016-03-26 21:35:35 -07:00
										 |  |  | 					manager.appendTextToLog("requested dive list with credential status " + manager.credentialStatus) | 
					
						
							| 
									
										
										
										
											2016-03-13 11:41:09 -07:00
										 |  |  | 					if (manager.credentialStatus == QMLManager.UNKNOWN) { | 
					
						
							|  |  |  | 						// the user has asked to change credentials - if the credentials before that
 | 
					
						
							|  |  |  | 						// were valid, go back to dive list
 | 
					
						
							|  |  |  | 						if (oldStatus == QMLManager.VALID || oldStatus == QMLManager.VALID_EMAIL) { | 
					
						
							|  |  |  | 							manager.credentialStatus = oldStatus | 
					
						
							|  |  |  | 						} | 
					
						
							|  |  |  | 					} | 
					
						
							| 
									
										
										
										
											2016-02-10 21:47:09 -08:00
										 |  |  | 					returnTopPage() | 
					
						
							| 
									
										
										
										
											2016-03-03 15:12:09 -08:00
										 |  |  | 					globalDrawer.close() | 
					
						
							| 
									
										
										
										
											2015-12-04 00:26:45 +01:00
										 |  |  | 				} | 
					
						
							|  |  |  | 			}, | 
					
						
							| 
									
										
										
										
											2016-03-08 21:26:54 +01:00
										 |  |  | 			Kirigami.Action { | 
					
						
							| 
									
										
										
										
											2017-06-23 13:06:17 -07:00
										 |  |  | 				text: qsTr("Settings") | 
					
						
							|  |  |  | 				Kirigami.Action { | 
					
						
							|  |  |  | 					text: qsTr("Cloud credentials") | 
					
						
							|  |  |  | 					onTriggered: { | 
					
						
							|  |  |  | 						returnTopPage() | 
					
						
							|  |  |  | 						oldStatus = manager.credentialStatus | 
					
						
							|  |  |  | 						if (diveList.numDives > 0) { | 
					
						
							|  |  |  | 							manager.startPageText = "Enter different credentials or return to dive list" | 
					
						
							|  |  |  | 						} else { | 
					
						
							|  |  |  | 							manager.startPageText = "Enter valid cloud storage credentials" | 
					
						
							|  |  |  | 						} | 
					
						
							|  |  |  | 						manager.credentialStatus = QMLManager.UNKNOWN | 
					
						
							|  |  |  | 					} | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 				Kirigami.Action { | 
					
						
							|  |  |  | 					text: qsTr("Preferences") | 
					
						
							|  |  |  | 					onTriggered: { | 
					
						
							|  |  |  | 						stackView.push(prefsWindow) | 
					
						
							|  |  |  | 						detailsWindow.endEditMode() | 
					
						
							| 
									
										
										
										
											2016-02-10 18:09:16 -08:00
										 |  |  | 					} | 
					
						
							| 
									
										
										
										
											2015-12-04 00:26:45 +01:00
										 |  |  | 				} | 
					
						
							|  |  |  | 			}, | 
					
						
							| 
									
										
										
										
											2016-03-08 21:26:54 +01:00
										 |  |  | 			Kirigami.Action { | 
					
						
							| 
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 |  |  | 				text: qsTr("Manage dives") | 
					
						
							| 
									
										
										
										
											2016-03-08 21:26:54 +01:00
										 |  |  | 				Kirigami.Action { | 
					
						
							| 
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 |  |  | 					text: qsTr("Add dive manually") | 
					
						
							| 
									
										
										
										
											2016-04-22 05:21:26 -07:00
										 |  |  | 					enabled: manager.credentialStatus === QMLManager.VALID || manager.credentialStatus === QMLManager.VALID_EMAIL || manager.credentialStatus === QMLManager.NOCLOUD | 
					
						
							| 
									
										
										
										
											2015-12-08 02:33:11 +01:00
										 |  |  | 					onTriggered: { | 
					
						
							| 
									
										
										
										
											2016-04-02 11:04:44 -05:00
										 |  |  | 						returnTopPage()  // otherwise odd things happen with the page stack
 | 
					
						
							| 
									
										
										
										
											2016-04-01 22:29:39 -05:00
										 |  |  | 						startAddDive() | 
					
						
							| 
									
										
										
										
											2015-12-08 02:33:11 +01:00
										 |  |  | 					} | 
					
						
							|  |  |  | 				} | 
					
						
							| 
									
										
										
										
											2017-05-11 12:47:54 +02:00
										 |  |  | 				Kirigami.Action { | 
					
						
							|  |  |  | 					text: qsTr("Download from DC") | 
					
						
							|  |  |  | 					enabled: true | 
					
						
							|  |  |  | 					onTriggered: { | 
					
						
							| 
									
										
										
										
											2017-06-16 01:22:44 -07:00
										 |  |  | 						downloadFromDc.dcImportModel.clearTable() | 
					
						
							| 
									
										
										
										
											2017-05-11 12:47:54 +02:00
										 |  |  | 						stackView.push(downloadFromDc) | 
					
						
							|  |  |  | 					} | 
					
						
							|  |  |  | 				} | 
					
						
							| 
									
										
										
										
											2016-03-08 21:26:54 +01:00
										 |  |  | 				Kirigami.Action { | 
					
						
							| 
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 |  |  | 					text: qsTr("Manual sync with cloud") | 
					
						
							| 
									
										
										
										
											2016-04-22 05:21:26 -07:00
										 |  |  | 					enabled: manager.credentialStatus === QMLManager.VALID || manager.credentialStatus === QMLManager.VALID_EMAIL || manager.credentialStatus === QMLManager.NOCLOUD | 
					
						
							| 
									
										
										
										
											2015-12-08 02:33:11 +01:00
										 |  |  | 					onTriggered: { | 
					
						
							| 
									
										
										
										
											2016-04-22 05:21:26 -07:00
										 |  |  | 						if (manager.credentialStatus === QMLManager.NOCLOUD) { | 
					
						
							|  |  |  | 							returnTopPage() | 
					
						
							|  |  |  | 							oldStatus = manager.credentialStatus | 
					
						
							|  |  |  | 							manager.startPageText = "Enter valid cloud storage credentials" | 
					
						
							|  |  |  | 							manager.credentialStatus = QMLManager.UNKNOWN | 
					
						
							|  |  |  | 							globalDrawer.close() | 
					
						
							|  |  |  | 						} else { | 
					
						
							|  |  |  | 							globalDrawer.close() | 
					
						
							|  |  |  | 							detailsWindow.endEditMode() | 
					
						
							|  |  |  | 							manager.saveChangesCloud(true); | 
					
						
							|  |  |  | 							globalDrawer.close() | 
					
						
							|  |  |  | 						} | 
					
						
							| 
									
										
										
										
											2015-12-08 02:33:11 +01:00
										 |  |  | 					} | 
					
						
							|  |  |  | 				} | 
					
						
							| 
									
										
										
										
											2016-04-01 20:40:12 -05:00
										 |  |  | 				Kirigami.Action { | 
					
						
							| 
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 |  |  | 				text: syncToCloud ? qsTr("Offline mode") : qsTr("Enable auto cloud sync") | 
					
						
							| 
									
										
										
										
											2016-04-22 05:21:26 -07:00
										 |  |  | 					enabled: manager.credentialStatus !== QMLManager.NOCLOUD | 
					
						
							| 
									
										
										
										
											2015-12-08 02:33:11 +01:00
										 |  |  | 					onTriggered: { | 
					
						
							| 
									
										
										
										
											2016-04-03 18:33:40 -07:00
										 |  |  | 						syncToCloud = !syncToCloud | 
					
						
							|  |  |  | 						if (!syncToCloud) { | 
					
						
							| 
									
										
										
										
											2017-06-24 22:09:38 +02:00
										 |  |  | 							showPassiveNotification(qsTr("Turning off automatic sync to cloud causes all data to only be \ | 
					
						
							|  |  |  | stored locally. This can be very useful in situations with limited or no network access. Please choose 'Manual sync with cloud' \ | 
					
						
							|  |  |  | if you have network connectivity and want to sync your data to cloud storage."), 10000) | 
					
						
							| 
									
										
										
										
											2016-04-03 18:33:40 -07:00
										 |  |  | 						} | 
					
						
							| 
									
										
										
										
											2015-12-08 02:33:11 +01:00
										 |  |  | 					} | 
					
						
							| 
									
										
										
										
											2015-11-29 17:43:56 +01:00
										 |  |  | 				} | 
					
						
							| 
									
										
										
										
											2017-04-13 19:57:22 +02:00
										 |  |  | 			}, | 
					
						
							| 
									
										
										
										
											2016-03-08 21:26:54 +01:00
										 |  |  | 			Kirigami.Action { | 
					
						
							| 
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 |  |  | 				text: qsTr("GPS") | 
					
						
							| 
									
										
										
										
											2016-02-10 20:54:36 -08:00
										 |  |  | 				enabled: manager.credentialStatus === QMLManager.VALID || manager.credentialStatus === QMLManager.VALID_EMAIL | 
					
						
							| 
									
										
										
										
											2017-04-13 19:57:22 +02:00
										 |  |  | 				visible: (Qt.platform.os !== "ios") | 
					
						
							| 
									
										
										
										
											2016-03-08 21:26:54 +01:00
										 |  |  | 				Kirigami.Action { | 
					
						
							| 
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 |  |  | 					text: qsTr("GPS-tag dives") | 
					
						
							| 
									
										
										
										
											2015-12-04 00:26:45 +01:00
										 |  |  | 					onTriggered: { | 
					
						
							| 
									
										
										
										
											2015-12-08 02:33:11 +01:00
										 |  |  | 						manager.applyGpsData(); | 
					
						
							| 
									
										
										
										
											2015-12-04 00:26:45 +01:00
										 |  |  | 					} | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-03-08 21:26:54 +01:00
										 |  |  | 				Kirigami.Action { | 
					
						
							| 
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 |  |  | 					text: qsTr("Upload GPS data") | 
					
						
							| 
									
										
										
										
											2015-12-04 00:26:45 +01:00
										 |  |  | 					onTriggered: { | 
					
						
							| 
									
										
										
										
											2015-12-08 02:33:11 +01:00
										 |  |  | 						manager.sendGpsData(); | 
					
						
							| 
									
										
										
										
											2015-12-04 00:26:45 +01:00
										 |  |  | 					} | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-03-08 21:26:54 +01:00
										 |  |  | 				Kirigami.Action { | 
					
						
							| 
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 |  |  | 					text: qsTr("Download GPS data") | 
					
						
							| 
									
										
										
										
											2016-01-07 21:37:36 -08:00
										 |  |  | 					onTriggered: { | 
					
						
							|  |  |  | 						manager.downloadGpsData(); | 
					
						
							|  |  |  | 					} | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-03-08 21:26:54 +01:00
										 |  |  | 				Kirigami.Action { | 
					
						
							| 
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 |  |  | 					text: qsTr("Show GPS fixes") | 
					
						
							| 
									
										
										
										
											2016-01-07 21:40:15 -08:00
										 |  |  | 					onTriggered: { | 
					
						
							| 
									
										
										
										
											2016-04-02 11:04:44 -05:00
										 |  |  | 						returnTopPage() | 
					
						
							| 
									
										
										
										
											2016-01-07 21:40:15 -08:00
										 |  |  | 						manager.populateGpsData(); | 
					
						
							|  |  |  | 						stackView.push(gpsWindow) | 
					
						
							|  |  |  | 					} | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-03-08 21:26:54 +01:00
										 |  |  | 				Kirigami.Action { | 
					
						
							| 
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 |  |  | 					text: qsTr("Clear GPS cache") | 
					
						
							| 
									
										
										
										
											2015-12-04 00:26:45 +01:00
										 |  |  | 					onTriggered: { | 
					
						
							| 
									
										
										
										
											2015-12-08 02:33:11 +01:00
										 |  |  | 						manager.clearGpsData(); | 
					
						
							| 
									
										
										
										
											2015-12-04 00:26:45 +01:00
										 |  |  | 					} | 
					
						
							|  |  |  | 				} | 
					
						
							| 
									
										
										
										
											2017-04-13 19:57:22 +02:00
										 |  |  | 			}, | 
					
						
							| 
									
										
										
										
											2016-03-08 21:26:54 +01:00
										 |  |  | 			Kirigami.Action { | 
					
						
							| 
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 |  |  | 				text: qsTr("Developer") | 
					
						
							| 
									
										
										
										
											2016-03-08 21:26:54 +01:00
										 |  |  | 				Kirigami.Action { | 
					
						
							| 
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 |  |  | 					text: qsTr("App log") | 
					
						
							| 
									
										
										
										
											2015-12-08 02:33:11 +01:00
										 |  |  | 					onTriggered: { | 
					
						
							|  |  |  | 						stackView.push(logWindow) | 
					
						
							|  |  |  | 					} | 
					
						
							| 
									
										
										
										
											2015-11-29 17:43:56 +01:00
										 |  |  | 				} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-03-08 21:26:54 +01:00
										 |  |  | 				Kirigami.Action { | 
					
						
							| 
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 |  |  | 					text: qsTr("Theme information") | 
					
						
							| 
									
										
										
										
											2015-12-08 02:33:11 +01:00
										 |  |  | 					onTriggered: { | 
					
						
							|  |  |  | 						stackView.push(themetest) | 
					
						
							|  |  |  | 					} | 
					
						
							| 
									
										
										
										
											2015-12-04 00:26:45 +01:00
										 |  |  | 				} | 
					
						
							| 
									
										
										
										
											2016-02-10 22:53:59 +02:00
										 |  |  | 			}, | 
					
						
							| 
									
										
										
										
											2016-03-31 21:57:12 -05:00
										 |  |  | 			Kirigami.Action { | 
					
						
							| 
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 |  |  | 				text: qsTr("User manual") | 
					
						
							| 
									
										
										
										
											2016-03-13 11:13:04 -07:00
										 |  |  | 				onTriggered: { | 
					
						
							| 
									
										
										
										
											2016-04-02 07:02:44 -05:00
										 |  |  | 					Qt.openUrlExternally("https://subsurface-divelog.org/documentation/subsurface-mobile-user-manual/") | 
					
						
							| 
									
										
										
										
											2016-03-13 11:13:04 -07:00
										 |  |  | 				} | 
					
						
							|  |  |  | 			}, | 
					
						
							| 
									
										
										
										
											2016-03-08 21:26:54 +01:00
										 |  |  | 			Kirigami.Action { | 
					
						
							| 
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 |  |  | 				text: qsTr("About") | 
					
						
							| 
									
										
										
										
											2016-02-10 22:53:59 +02:00
										 |  |  | 				onTriggered: { | 
					
						
							|  |  |  | 					stackView.push(aboutWindow) | 
					
						
							|  |  |  | 					detailsWindow.endEditMode() | 
					
						
							|  |  |  | 				} | 
					
						
							| 
									
										
										
										
											2015-11-29 17:43:56 +01:00
										 |  |  | 			} | 
					
						
							| 
									
										
										
										
											2017-04-13 19:57:22 +02:00
										 |  |  | 		] // end actions
 | 
					
						
							| 
									
										
										
										
											2015-10-09 01:57:10 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-11-30 01:48:10 +01:00
										 |  |  | 		MouseArea { | 
					
						
							|  |  |  | 			height: childrenRect.height | 
					
						
							| 
									
										
										
										
											2016-03-08 21:26:54 +01:00
										 |  |  | 			width: Kirigami.Units.gridUnit * 10 | 
					
						
							| 
									
										
										
										
											2015-11-30 01:48:10 +01:00
										 |  |  | 			CheckBox { | 
					
						
							| 
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 |  |  | 				//text: qsTr("Run location service")
 | 
					
						
							| 
									
										
										
										
											2015-11-30 01:48:10 +01:00
										 |  |  | 				id: locationCheckbox | 
					
						
							| 
									
										
										
										
											2016-04-17 22:57:14 -07:00
										 |  |  | 				visible: manager.locationServiceAvailable | 
					
						
							| 
									
										
										
										
											2015-11-30 01:48:10 +01:00
										 |  |  | 				anchors { | 
					
						
							|  |  |  | 					left: parent.left | 
					
						
							|  |  |  | 					top: parent.top | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 				checked: manager.locationServiceEnabled | 
					
						
							|  |  |  | 				onCheckedChanged: { | 
					
						
							|  |  |  | 					manager.locationServiceEnabled = checked; | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 			} | 
					
						
							| 
									
										
										
										
											2016-03-08 21:26:54 +01:00
										 |  |  | 			Kirigami.Label { | 
					
						
							|  |  |  | 				x: Kirigami.Units.gridUnit * 1.5 | 
					
						
							| 
									
										
										
										
											2015-11-30 01:48:10 +01:00
										 |  |  | 				anchors { | 
					
						
							|  |  |  | 					left: locationCheckbox.right | 
					
						
							|  |  |  | 					//leftMargin: units.smallSpacing
 | 
					
						
							|  |  |  | 					verticalCenter: locationCheckbox.verticalCenter | 
					
						
							|  |  |  | 				} | 
					
						
							| 
									
										
										
										
											2016-09-04 08:57:09 -07:00
										 |  |  | 				text: Qt.platform.os == "ios" ? "" : manager.locationServiceAvailable ? qsTr("Run location service") : qsTr("No GPS source available") | 
					
						
							| 
									
										
										
										
											2015-11-30 01:48:10 +01:00
										 |  |  | 			} | 
					
						
							|  |  |  | 			onClicked: { | 
					
						
							|  |  |  | 				print("Click.") | 
					
						
							|  |  |  | 				locationCheckbox.checked = !locationCheckbox.checked | 
					
						
							| 
									
										
										
										
											2015-11-30 01:32:55 +01:00
										 |  |  | 			} | 
					
						
							|  |  |  | 		} | 
					
						
							| 
									
										
										
										
											2015-10-09 01:57:10 +02:00
										 |  |  | 	} | 
					
						
							| 
									
										
										
										
											2015-11-29 19:09:59 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-06-21 13:44:24 -07:00
										 |  |  | 	function blueTheme() { | 
					
						
							| 
									
										
										
										
											2017-06-23 12:29:22 -07:00
										 |  |  | 		subsurfaceTheme.currentTheme = "Blue" | 
					
						
							|  |  |  | 		subsurfaceTheme.darkerPrimaryColor = subsurfaceTheme.blueDarkerPrimaryColor | 
					
						
							|  |  |  | 		subsurfaceTheme.darkerPrimaryTextColor= subsurfaceTheme.blueDarkerPrimaryTextColor | 
					
						
							|  |  |  | 		subsurfaceTheme.primaryColor = subsurfaceTheme.bluePrimaryColor | 
					
						
							|  |  |  | 		subsurfaceTheme.primaryTextColor = subsurfaceTheme.bluePrimaryTextColor | 
					
						
							|  |  |  | 		subsurfaceTheme.lightPrimaryColor = subsurfaceTheme.blueLightPrimaryColor | 
					
						
							|  |  |  | 		subsurfaceTheme.lightPrimaryTextColor = subsurfaceTheme.blueLightPrimaryTextColor | 
					
						
							|  |  |  | 		subsurfaceTheme.backgroundColor = subsurfaceTheme.blueBackgroundColor | 
					
						
							| 
									
										
										
										
											2017-06-23 18:07:48 -07:00
										 |  |  | 		subsurfaceTheme.textColor = subsurfaceTheme.blueTextColor | 
					
						
							| 
									
										
										
										
											2017-06-24 11:18:18 -07:00
										 |  |  | 		subsurfaceTheme.secondaryTextColor = subsurfaceTheme.blueSecondaryTextColor | 
					
						
							| 
									
										
										
										
											2017-06-23 21:32:31 -07:00
										 |  |  | 		manager.setStatusbarColor(subsurfaceTheme.darkerPrimaryColor) | 
					
						
							| 
									
										
										
										
											2017-06-21 13:44:24 -07:00
										 |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	function pinkTheme() { | 
					
						
							| 
									
										
										
										
											2017-06-23 12:29:22 -07:00
										 |  |  | 		subsurfaceTheme.currentTheme = "Pink" | 
					
						
							|  |  |  | 		subsurfaceTheme.darkerPrimaryColor = subsurfaceTheme.pinkDarkerPrimaryColor | 
					
						
							|  |  |  | 		subsurfaceTheme.darkerPrimaryTextColor = subsurfaceTheme.pinkDarkerPrimaryTextColor | 
					
						
							|  |  |  | 		subsurfaceTheme.primaryColor = subsurfaceTheme.pinkPrimaryColor | 
					
						
							|  |  |  | 		subsurfaceTheme.primaryTextColor = subsurfaceTheme.pinkPrimaryTextColor | 
					
						
							|  |  |  | 		subsurfaceTheme.lightPrimaryColor = subsurfaceTheme.pinkLightPrimaryColor | 
					
						
							|  |  |  | 		subsurfaceTheme.lightPrimaryTextColor = subsurfaceTheme.pinkLightPrimaryTextColor | 
					
						
							|  |  |  | 		subsurfaceTheme.backgroundColor = subsurfaceTheme.pinkBackgroundColor | 
					
						
							| 
									
										
										
										
											2017-06-23 18:07:48 -07:00
										 |  |  | 		subsurfaceTheme.textColor = subsurfaceTheme.pinkTextColor | 
					
						
							| 
									
										
										
										
											2017-06-24 11:18:18 -07:00
										 |  |  | 		subsurfaceTheme.secondaryTextColor = subsurfaceTheme.pinkSecondaryTextColor | 
					
						
							| 
									
										
										
										
											2017-06-23 21:32:31 -07:00
										 |  |  | 		manager.setStatusbarColor(subsurfaceTheme.darkerPrimaryColor) | 
					
						
							| 
									
										
										
										
											2017-06-21 15:47:29 -07:00
										 |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	function darkTheme() { | 
					
						
							| 
									
										
										
										
											2017-06-23 12:29:22 -07:00
										 |  |  | 		subsurfaceTheme.currentTheme = "Dark" | 
					
						
							|  |  |  | 		subsurfaceTheme.darkerPrimaryColor = subsurfaceTheme.darkDarkerPrimaryColor | 
					
						
							|  |  |  | 		subsurfaceTheme.darkerPrimaryTextColor= subsurfaceTheme.darkDarkerPrimaryTextColor | 
					
						
							|  |  |  | 		subsurfaceTheme.primaryColor = subsurfaceTheme.darkPrimaryColor | 
					
						
							|  |  |  | 		subsurfaceTheme.primaryTextColor = subsurfaceTheme.darkPrimaryTextColor | 
					
						
							|  |  |  | 		subsurfaceTheme.lightPrimaryColor = subsurfaceTheme.darkLightPrimaryColor | 
					
						
							|  |  |  | 		subsurfaceTheme.lightPrimaryTextColor = subsurfaceTheme.darkLightPrimaryTextColor | 
					
						
							|  |  |  | 		subsurfaceTheme.backgroundColor = subsurfaceTheme.darkBackgroundColor | 
					
						
							| 
									
										
										
										
											2017-06-23 18:07:48 -07:00
										 |  |  | 		subsurfaceTheme.textColor = subsurfaceTheme.darkTextColor | 
					
						
							| 
									
										
										
										
											2017-06-24 11:18:18 -07:00
										 |  |  | 		subsurfaceTheme.secondaryTextColor = subsurfaceTheme.darkSecondaryTextColor | 
					
						
							| 
									
										
										
										
											2017-06-23 21:32:31 -07:00
										 |  |  | 		manager.setStatusbarColor(subsurfaceTheme.darkerPrimaryColor) | 
					
						
							| 
									
										
										
										
											2017-06-21 13:44:24 -07:00
										 |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-11-29 19:09:59 +01:00
										 |  |  | 	QtObject { | 
					
						
							|  |  |  | 		id: subsurfaceTheme | 
					
						
							|  |  |  | 		property int titlePointSize: Math.round(fontMetrics.font.pointSize * 1.5) | 
					
						
							| 
									
										
										
										
											2015-11-29 23:39:14 +01:00
										 |  |  | 		property int smallPointSize: Math.round(fontMetrics.font.pointSize * 0.8) | 
					
						
							| 
									
										
										
										
											2017-06-21 07:39:07 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-06-23 12:29:22 -07:00
										 |  |  | 		// colors currently in use
 | 
					
						
							|  |  |  | 		property string currentTheme | 
					
						
							|  |  |  | 		property color darkerPrimaryColor | 
					
						
							|  |  |  | 		property color darkerPrimaryTextColor | 
					
						
							|  |  |  | 		property color primaryColor | 
					
						
							|  |  |  | 		property color primaryTextColor | 
					
						
							|  |  |  | 		property color lightPrimaryColor | 
					
						
							|  |  |  | 		property color lightPrimaryTextColor | 
					
						
							|  |  |  | 		property color backgroundColor | 
					
						
							| 
									
										
										
										
											2017-06-23 18:07:48 -07:00
										 |  |  | 		property color textColor | 
					
						
							| 
									
										
										
										
											2017-06-24 11:18:18 -07:00
										 |  |  | 		property color secondaryTextColor | 
					
						
							| 
									
										
										
										
											2017-06-23 12:29:22 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | 		// colors for the blue theme
 | 
					
						
							|  |  |  | 		property color blueDarkerPrimaryColor: "#303F9f" | 
					
						
							|  |  |  | 		property color blueDarkerPrimaryTextColor: "#ECECEC" | 
					
						
							|  |  |  | 		property color bluePrimaryColor: "#3F51B5" | 
					
						
							| 
									
										
										
										
											2017-06-24 11:18:18 -07:00
										 |  |  | 		property color bluePrimaryTextColor: "#FFFFFF" | 
					
						
							| 
									
										
										
										
											2017-06-23 12:29:22 -07:00
										 |  |  | 		property color blueLightPrimaryColor: "#C5CAE9" | 
					
						
							|  |  |  | 		property color blueLightPrimaryTextColor: "#212121" | 
					
						
							|  |  |  | 		property color blueBackgroundColor: "#eff0f1" | 
					
						
							| 
									
										
										
										
											2017-06-23 18:07:48 -07:00
										 |  |  | 		property color blueTextColor: blueLightPrimaryTextColor | 
					
						
							| 
									
										
										
										
											2017-06-24 11:18:18 -07:00
										 |  |  | 		property color blueSecondaryTextColor: "#757575" | 
					
						
							| 
									
										
										
										
											2017-06-23 12:29:22 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | 		// colors for the pink theme
 | 
					
						
							|  |  |  | 		property color pinkDarkerPrimaryColor: "#FF1493" | 
					
						
							|  |  |  | 		property color pinkDarkerPrimaryTextColor: "#ECECEC" | 
					
						
							|  |  |  | 		property color pinkPrimaryColor: "#FF69B4" | 
					
						
							|  |  |  | 		property color pinkPrimaryTextColor: "#212121" | 
					
						
							|  |  |  | 		property color pinkLightPrimaryColor: "#FFDDF4" | 
					
						
							|  |  |  | 		property color pinkLightPrimaryTextColor: "#212121" | 
					
						
							|  |  |  | 		property color pinkBackgroundColor: "#eff0f1" | 
					
						
							| 
									
										
										
										
											2017-06-23 18:07:48 -07:00
										 |  |  | 		property color pinkTextColor: pinkLightPrimaryTextColor | 
					
						
							| 
									
										
										
										
											2017-06-24 11:18:18 -07:00
										 |  |  | 		property color pinkSecondaryTextColor: "#757575" | 
					
						
							| 
									
										
										
										
											2017-06-23 12:29:22 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | 		// colors for the dark theme
 | 
					
						
							|  |  |  | 		property color darkDarkerPrimaryColor: "#303F9f" | 
					
						
							|  |  |  | 		property color darkDarkerPrimaryTextColor: "#ECECEC" | 
					
						
							|  |  |  | 		property color darkPrimaryColor: "#3F51B5" | 
					
						
							| 
									
										
										
										
											2017-06-21 07:39:07 -07:00
										 |  |  | 		property color darkPrimaryTextColor: "#ECECEC" | 
					
						
							| 
									
										
										
										
											2017-06-23 12:29:22 -07:00
										 |  |  | 		property color darkLightPrimaryColor: "#C5CAE9" | 
					
						
							|  |  |  | 		property color darkLightPrimaryTextColor: "#212121" | 
					
						
							|  |  |  | 		property color darkBackgroundColor: "#000000" | 
					
						
							| 
									
										
										
										
											2017-06-23 18:07:48 -07:00
										 |  |  | 		property color darkTextColor: darkPrimaryTextColor | 
					
						
							| 
									
										
										
										
											2017-06-24 11:18:18 -07:00
										 |  |  | 		property color darkSecondaryTextColor: "#757575" | 
					
						
							| 
									
										
										
										
											2017-06-21 15:47:29 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-06-24 11:18:18 -07:00
										 |  |  | 		property color contrastAccentColor: "#FF5722" // used for delete button
 | 
					
						
							| 
									
										
										
										
											2017-06-21 07:39:07 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-17 12:56:47 -07:00
										 |  |  | 		property int columnWidth: Math.round(rootItem.width/(Kirigami.Units.gridUnit*28)) > 0 ? Math.round(rootItem.width / Math.round(rootItem.width/(Kirigami.Units.gridUnit*28))) : rootItem.width | 
					
						
							| 
									
										
										
										
											2017-06-20 22:51:25 -07:00
										 |  |  | 		Component.onCompleted: { | 
					
						
							| 
									
										
										
										
											2017-06-23 18:07:48 -07:00
										 |  |  | 			Kirigami.Theme.highlightColor = Qt.binding(function() { return darkerPrimaryColor }) | 
					
						
							|  |  |  | 			Kirigami.Theme.highlighedTextColor = Qt.binding(function() { return darkerPrimaryTextColor }) | 
					
						
							| 
									
										
										
										
											2017-06-21 15:47:29 -07:00
										 |  |  | 			Kirigami.Theme.backgroundColor = Qt.binding(function() { return backgroundColor }) | 
					
						
							| 
									
										
										
										
											2017-06-23 18:07:48 -07:00
										 |  |  | 			Kirigami.Theme.textColor = Qt.binding(function() { return textColor }) | 
					
						
							|  |  |  | 			Kirigami.Theme.buttonHoverColor = Qt.binding(function() { return darkerPrimaryColor }) | 
					
						
							| 
									
										
										
										
											2017-06-23 12:29:22 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | 			// this needs to pick the theme from persistent preference settings
 | 
					
						
							| 
									
										
										
										
											2017-06-23 19:35:48 -07:00
										 |  |  | 			var theme = manager.theme | 
					
						
							|  |  |  | 			if (theme == "Blue") | 
					
						
							|  |  |  | 				blueTheme() | 
					
						
							|  |  |  | 			else if (theme == "Pink") | 
					
						
							|  |  |  | 				pinkTheme() | 
					
						
							|  |  |  | 			else | 
					
						
							|  |  |  | 				darkTheme() | 
					
						
							| 
									
										
										
										
											2017-06-20 22:51:25 -07:00
										 |  |  | 		} | 
					
						
							| 
									
										
										
										
											2015-11-29 19:09:59 +01:00
										 |  |  | 	} | 
					
						
							| 
									
										
										
										
											2015-11-29 21:13:57 +01:00
										 |  |  | 	property Item stackView: pageStack | 
					
						
							| 
									
										
										
										
											2016-03-08 21:26:54 +01:00
										 |  |  | 	pageStack.initialPage: DiveList { | 
					
						
							| 
									
										
										
										
											2016-01-28 18:27:54 -08:00
										 |  |  | 		id: diveList | 
					
						
							| 
									
										
										
										
											2016-01-19 12:42:58 -08:00
										 |  |  | 		opacity: 0 | 
					
						
							|  |  |  | 		Behavior on opacity { | 
					
						
							|  |  |  | 			NumberAnimation { | 
					
						
							|  |  |  | 				duration: 200 | 
					
						
							|  |  |  | 				easing.type: Easing.OutQuad | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-12 10:56:48 -07:00
										 |  |  | 	} | 
					
						
							| 
									
										
										
										
											2015-07-10 11:40:30 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-12 10:56:48 -07:00
										 |  |  | 	QMLManager { | 
					
						
							|  |  |  | 		id: manager | 
					
						
							| 
									
										
										
										
											2015-06-09 22:20:44 +03:00
										 |  |  | 	} | 
					
						
							| 
									
										
										
										
											2015-07-12 10:56:48 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	Preferences { | 
					
						
							|  |  |  | 		id: prefsWindow | 
					
						
							|  |  |  | 		visible: false | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-02-10 22:53:59 +02:00
										 |  |  | 	About { | 
					
						
							|  |  |  | 		id: aboutWindow | 
					
						
							|  |  |  | 		visible: false | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-21 15:00:29 +03:00
										 |  |  | 	DiveDetails { | 
					
						
							|  |  |  | 		id: detailsWindow | 
					
						
							|  |  |  | 		visible: false | 
					
						
							| 
									
										
										
										
											2016-04-27 05:44:18 -07:00
										 |  |  | 		anchors.fill: parent | 
					
						
							| 
									
										
										
										
											2015-07-21 15:00:29 +03:00
										 |  |  | 	} | 
					
						
							| 
									
										
										
										
											2015-07-23 14:46:02 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-08-19 10:18:26 +03:00
										 |  |  | 	Log { | 
					
						
							|  |  |  | 		id: logWindow | 
					
						
							|  |  |  | 		visible: false | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2015-10-09 01:57:10 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-01-07 21:40:15 -08:00
										 |  |  | 	GpsList { | 
					
						
							|  |  |  | 		id: gpsWindow | 
					
						
							| 
									
										
										
										
											2016-03-08 21:26:54 +01:00
										 |  |  | 		visible: false | 
					
						
							| 
									
										
										
										
											2016-01-07 21:40:15 -08:00
										 |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-11 12:47:54 +02:00
										 |  |  | 	DownloadFromDiveComputer { | 
					
						
							|  |  |  | 		id: downloadFromDc | 
					
						
							|  |  |  | 		visible: false | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-11-06 21:53:26 +00:00
										 |  |  | 	ThemeTest { | 
					
						
							|  |  |  | 		id: themetest | 
					
						
							|  |  |  | 		visible: false | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-10-09 01:57:10 +02:00
										 |  |  | 	Component.onCompleted: { | 
					
						
							| 
									
										
										
										
											2015-12-04 19:34:59 -08:00
										 |  |  | 		manager.finishSetup(); | 
					
						
							| 
									
										
										
										
											2016-01-19 12:42:58 -08:00
										 |  |  | 		rootItem.visible = true | 
					
						
							| 
									
										
										
										
											2016-01-28 18:27:54 -08:00
										 |  |  | 		diveList.opacity = 1 | 
					
						
							| 
									
										
										
										
											2016-01-19 12:42:58 -08:00
										 |  |  | 		rootItem.opacity = 1 | 
					
						
							| 
									
										
										
										
											2016-09-17 12:56:47 -07:00
										 |  |  | 		pageStack.defaultColumnWidth = Kirigami.Units.gridUnit * 28 | 
					
						
							| 
									
										
										
										
											2016-01-19 12:42:58 -08:00
										 |  |  | 	} | 
					
						
							| 
									
										
										
										
											2016-12-27 18:36:02 +01:00
										 |  |  | 	/* TODO: Verify where opacity went to. | 
					
						
							| 
									
										
										
										
											2016-01-19 12:42:58 -08:00
										 |  |  | 	Behavior on opacity { | 
					
						
							|  |  |  | 		NumberAnimation { | 
					
						
							|  |  |  | 			duration: 200 | 
					
						
							|  |  |  | 			easing.type: Easing.OutQuad | 
					
						
							|  |  |  | 		} | 
					
						
							| 
									
										
										
										
											2015-10-09 01:57:10 +02:00
										 |  |  | 	} | 
					
						
							| 
									
										
										
										
											2016-12-27 18:36:02 +01:00
										 |  |  | 	*/ | 
					
						
							| 
									
										
										
										
											2015-05-27 13:34:55 +03:00
										 |  |  | } |