| 
									
										
										
										
											2017-04-27 20:30:36 +02:00
										 |  |  | // SPDX-License-Identifier: GPL-2.0
 | 
					
						
							| 
									
										
										
										
											2015-07-10 10:48:28 +03:00
										 |  |  | import QtQuick 2.3 | 
					
						
							| 
									
										
										
										
											2017-03-31 16:15:14 +02:00
										 |  |  | import QtQuick.Controls 2.0 | 
					
						
							| 
									
										
										
										
											2015-07-10 10:48:28 +03:00
										 |  |  | import QtQuick.Window 2.2 | 
					
						
							|  |  |  | import QtQuick.Dialogs 1.2 | 
					
						
							|  |  |  | import QtQuick.Layouts 1.1 | 
					
						
							| 
									
										
										
										
											2017-03-31 16:15:14 +02:00
										 |  |  | import org.kde.kirigami 2.0 as Kirigami | 
					
						
							| 
									
										
										
										
											2015-07-10 10:48:28 +03:00
										 |  |  | import org.subsurfacedivelog.mobile 1.0 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-07-09 18:47:18 -07:00
										 |  |  | Kirigami.ScrollablePage { | 
					
						
							| 
									
										
										
										
											2017-07-20 19:39:55 +02:00
										 |  |  | 	objectName: "Settings" | 
					
						
							| 
									
										
										
										
											2017-07-20 19:55:58 +12:00
										 |  |  | 	id: settingsPage | 
					
						
							| 
									
										
										
										
											2017-07-20 19:39:55 +02:00
										 |  |  | 	title: qsTr("Settings") | 
					
						
							| 
									
										
										
										
											2017-08-03 15:47:37 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	property real gridWidth: settingsPage.width - Kirigami.Units.gridUnit | 
					
						
							| 
									
										
										
										
											2017-07-09 18:47:18 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	ColumnLayout { | 
					
						
							| 
									
										
										
										
											2017-08-03 15:47:37 -07:00
										 |  |  | 		width: gridWidth | 
					
						
							| 
									
										
										
										
											2017-07-20 19:39:55 +02:00
										 |  |  | 		CloudCredentials { | 
					
						
							|  |  |  | 			id: cloudCredentials | 
					
						
							|  |  |  | 			Layout.fillWidth: true | 
					
						
							| 
									
										
										
										
											2017-08-03 15:30:32 -07:00
										 |  |  | 			Layout.rightMargin: Kirigami.Units.smallSpacing | 
					
						
							| 
									
										
										
										
											2017-08-03 15:47:37 -07:00
										 |  |  | 			Layout.topMargin: - Kirigami.Units.gridUnit | 
					
						
							| 
									
										
										
										
											2017-07-20 19:39:55 +02:00
										 |  |  | 			property int headingLevel: 4 | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 		Rectangle { | 
					
						
							|  |  |  | 			color: subsurfaceTheme.darkerPrimaryColor | 
					
						
							|  |  |  | 			height: 1 | 
					
						
							|  |  |  | 			opacity: 0.5 | 
					
						
							|  |  |  | 			Layout.fillWidth: true | 
					
						
							|  |  |  | 		} | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 		GridLayout { | 
					
						
							| 
									
										
										
										
											2017-07-20 19:39:55 +02:00
										 |  |  | 			id: themeSettings | 
					
						
							| 
									
										
										
										
											2017-07-22 12:04:27 +02:00
										 |  |  | 			columns: 3 | 
					
						
							| 
									
										
										
										
											2017-07-20 19:39:55 +02:00
										 |  |  | 			Layout.bottomMargin: Kirigami.Units.gridUnit | 
					
						
							| 
									
										
										
										
											2015-07-10 10:48:28 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 			Kirigami.Heading { | 
					
						
							|  |  |  | 				text: qsTr("Theme") | 
					
						
							|  |  |  | 				color: subsurfaceTheme.textColor | 
					
						
							|  |  |  | 				level: 4 | 
					
						
							|  |  |  | 				Layout.topMargin: Kirigami.Units.largeSpacing | 
					
						
							|  |  |  | 				Layout.bottomMargin: Kirigami.Units.largeSpacing / 2 | 
					
						
							| 
									
										
										
										
											2017-07-22 12:04:27 +02:00
										 |  |  | 				Layout.columnSpan: 3 | 
					
						
							| 
									
										
										
										
											2017-06-23 13:06:17 -07:00
										 |  |  | 			} | 
					
						
							| 
									
										
										
										
											2017-07-22 11:54:21 +02:00
										 |  |  | 			Kirigami.Label { | 
					
						
							| 
									
										
										
										
											2017-07-20 19:55:58 +12:00
										 |  |  | 				text: qsTr("Blue") | 
					
						
							|  |  |  | 				color: subsurfaceTheme.textColor | 
					
						
							|  |  |  | 				rightPadding: Kirigami.Units.gridUnit | 
					
						
							| 
									
										
										
										
											2017-07-23 12:44:52 +02:00
										 |  |  | 				Layout.preferredWidth: gridWidth * 0.15 | 
					
						
							| 
									
										
										
										
											2017-06-23 18:08:47 -07:00
										 |  |  | 			} | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 			Row { | 
					
						
							| 
									
										
										
										
											2017-07-22 13:06:48 -07:00
										 |  |  | 				Layout.preferredWidth: gridWidth * 0.6 | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 				Rectangle { | 
					
						
							|  |  |  | 					id: blueRect | 
					
						
							|  |  |  | 					color: subsurfaceTheme.blueBackgroundColor | 
					
						
							|  |  |  | 					border.color: "black" | 
					
						
							| 
									
										
										
										
											2017-07-22 11:54:21 +02:00
										 |  |  | 					width: sampleRegularBlue.width + Kirigami.Units.gridUnit | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 					height: Kirigami.Units.gridUnit * 2 | 
					
						
							|  |  |  | 					Text { | 
					
						
							|  |  |  | 						id: sampleRegularBlue | 
					
						
							|  |  |  | 						text: qsTr("regular text") | 
					
						
							|  |  |  | 						color: subsurfaceTheme.blueTextColor | 
					
						
							|  |  |  | 						anchors { | 
					
						
							|  |  |  | 							horizontalCenter: parent.horizontalCenter | 
					
						
							|  |  |  | 							verticalCenter: parent.verticalCenter | 
					
						
							|  |  |  | 						} | 
					
						
							|  |  |  | 					} | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 				Rectangle { | 
					
						
							|  |  |  | 					color: subsurfaceTheme.bluePrimaryColor | 
					
						
							|  |  |  | 					border.color: "black" | 
					
						
							| 
									
										
										
										
											2017-07-22 11:54:21 +02:00
										 |  |  | 					width: sampleHighlightBlue.width + Kirigami.Units.gridUnit | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 					height: Kirigami.Units.gridUnit * 2 | 
					
						
							|  |  |  | 					Text { | 
					
						
							|  |  |  | 						id: sampleHighlightBlue | 
					
						
							|  |  |  | 						text: qsTr("Highlight") | 
					
						
							|  |  |  | 						color: subsurfaceTheme.bluePrimaryTextColor | 
					
						
							|  |  |  | 						anchors { | 
					
						
							|  |  |  | 							horizontalCenter: parent.horizontalCenter | 
					
						
							|  |  |  | 							verticalCenter: parent.verticalCenter | 
					
						
							|  |  |  | 						} | 
					
						
							| 
									
										
										
										
											2017-06-23 18:08:47 -07:00
										 |  |  | 					} | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 			} | 
					
						
							| 
									
										
										
										
											2017-07-24 20:04:47 +02:00
										 |  |  | 			SsrfSwitch { | 
					
						
							| 
									
										
										
										
											2017-07-23 12:44:52 +02:00
										 |  |  | 				id: blueButton | 
					
						
							|  |  |  | 				Layout.preferredWidth: gridWidth * 0.25 | 
					
						
							| 
									
										
										
										
											2017-07-20 19:55:58 +12:00
										 |  |  | 				checked: subsurfaceTheme.currentTheme === "Blue" | 
					
						
							| 
									
										
										
										
											2017-07-23 12:44:52 +02:00
										 |  |  | 				enabled: subsurfaceTheme.currentTheme !== "Blue" | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 				onClicked: { | 
					
						
							| 
									
										
										
										
											2017-07-20 19:55:58 +12:00
										 |  |  | 					blueTheme() | 
					
						
							| 
									
										
										
										
											2017-07-20 21:53:42 +02:00
										 |  |  | 					manager.theme = subsurfaceTheme.currentTheme | 
					
						
							|  |  |  | 					manager.savePreferences() | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 				} | 
					
						
							| 
									
										
										
										
											2017-07-08 19:17:10 +02:00
										 |  |  | 			} | 
					
						
							| 
									
										
										
										
											2017-07-20 19:55:58 +12:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-07-22 11:54:21 +02:00
										 |  |  | 			Kirigami.Label { | 
					
						
							| 
									
										
										
										
											2017-07-23 12:44:52 +02:00
										 |  |  | 				id: pinkLabel | 
					
						
							| 
									
										
										
										
											2017-07-20 19:55:58 +12:00
										 |  |  | 				text: qsTr("Pink") | 
					
						
							|  |  |  | 				rightPadding: Kirigami.Units.gridUnit | 
					
						
							| 
									
										
										
										
											2017-07-23 12:44:52 +02:00
										 |  |  | 				Layout.preferredWidth: gridWidth * 0.15 | 
					
						
							| 
									
										
										
										
											2017-07-20 19:55:58 +12:00
										 |  |  | 			} | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 			Row { | 
					
						
							| 
									
										
										
										
											2017-07-23 12:44:52 +02:00
										 |  |  | 				Layout.preferredWidth: gridWidth * 0.6 | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 				Rectangle { | 
					
						
							|  |  |  | 					id: pinkRect | 
					
						
							|  |  |  | 					color: subsurfaceTheme.pinkBackgroundColor | 
					
						
							|  |  |  | 					border.color: "black" | 
					
						
							| 
									
										
										
										
											2017-07-22 11:54:21 +02:00
										 |  |  | 					width: sampleRegularPink.width + Kirigami.Units.gridUnit | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 					height: Kirigami.Units.gridUnit * 2 | 
					
						
							|  |  |  | 					Text { | 
					
						
							|  |  |  | 						id: sampleRegularPink | 
					
						
							|  |  |  | 						text: qsTr("regular text") | 
					
						
							|  |  |  | 						color: subsurfaceTheme.pinkTextColor | 
					
						
							|  |  |  | 						anchors { | 
					
						
							|  |  |  | 							horizontalCenter: parent.horizontalCenter | 
					
						
							|  |  |  | 							verticalCenter: parent.verticalCenter | 
					
						
							|  |  |  | 						} | 
					
						
							| 
									
										
										
										
											2017-06-23 18:08:47 -07:00
										 |  |  | 					} | 
					
						
							|  |  |  | 				} | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 				Rectangle { | 
					
						
							|  |  |  | 					color: subsurfaceTheme.pinkPrimaryColor | 
					
						
							|  |  |  | 					border.color: "black" | 
					
						
							| 
									
										
										
										
											2017-07-22 11:54:21 +02:00
										 |  |  | 					width: sampleHighlightPink.width + Kirigami.Units.gridUnit | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 					height: Kirigami.Units.gridUnit * 2 | 
					
						
							|  |  |  | 					Text { | 
					
						
							|  |  |  | 						id: sampleHighlightPink | 
					
						
							|  |  |  | 						text: qsTr("Highlight") | 
					
						
							|  |  |  | 						color: subsurfaceTheme.pinkPrimaryTextColor | 
					
						
							|  |  |  | 						anchors { | 
					
						
							|  |  |  | 							horizontalCenter: parent.horizontalCenter | 
					
						
							|  |  |  | 							verticalCenter: parent.verticalCenter | 
					
						
							|  |  |  | 						} | 
					
						
							| 
									
										
										
										
											2017-06-23 18:08:47 -07:00
										 |  |  | 					} | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 			} | 
					
						
							| 
									
										
										
										
											2017-07-22 11:54:21 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-07-24 20:04:47 +02:00
										 |  |  | 			SsrfSwitch { | 
					
						
							| 
									
										
										
										
											2017-07-23 12:44:52 +02:00
										 |  |  | 				id: pinkButton | 
					
						
							|  |  |  | 				Layout.preferredWidth: gridWidth * 0.25 | 
					
						
							| 
									
										
										
										
											2017-07-20 19:55:58 +12:00
										 |  |  | 				checked: subsurfaceTheme.currentTheme === "Pink" | 
					
						
							| 
									
										
										
										
											2017-07-23 12:44:52 +02:00
										 |  |  | 				enabled: subsurfaceTheme.currentTheme !== "Pink" | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 				onClicked: { | 
					
						
							| 
									
										
										
										
											2017-07-20 19:55:58 +12:00
										 |  |  | 					pinkTheme() | 
					
						
							| 
									
										
										
										
											2017-07-20 21:53:42 +02:00
										 |  |  | 					manager.theme = subsurfaceTheme.currentTheme | 
					
						
							|  |  |  | 					manager.savePreferences() | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 				} | 
					
						
							| 
									
										
										
										
											2017-07-08 19:17:10 +02:00
										 |  |  | 			} | 
					
						
							| 
									
										
										
										
											2017-07-20 19:55:58 +12:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-07-22 11:54:21 +02:00
										 |  |  | 			Kirigami.Label { | 
					
						
							| 
									
										
										
										
											2017-07-20 19:55:58 +12:00
										 |  |  | 				text: qsTr("Dark") | 
					
						
							|  |  |  | 				color: subsurfaceTheme.textColor | 
					
						
							|  |  |  | 				rightPadding: Kirigami.Units.gridUnit | 
					
						
							| 
									
										
										
										
											2017-07-23 12:44:52 +02:00
										 |  |  | 				Layout.preferredWidth: gridWidth * 0.15 | 
					
						
							| 
									
										
										
										
											2017-07-20 19:55:58 +12:00
										 |  |  | 			} | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 			Row { | 
					
						
							| 
									
										
										
										
											2017-07-23 12:44:52 +02:00
										 |  |  | 				Layout.preferredWidth: gridWidth * 0.6 | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 				Rectangle { | 
					
						
							|  |  |  | 					id: blackRect | 
					
						
							|  |  |  | 					color: subsurfaceTheme.darkBackgroundColor | 
					
						
							|  |  |  | 					border.color: "black" | 
					
						
							| 
									
										
										
										
											2017-07-22 11:54:21 +02:00
										 |  |  | 					width: sampleRegularDark.width + Kirigami.Units.gridUnit | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 					height: Kirigami.Units.gridUnit * 2 | 
					
						
							|  |  |  | 					Text { | 
					
						
							|  |  |  | 						id: sampleRegularDark | 
					
						
							|  |  |  | 						text: qsTr("regular text") | 
					
						
							|  |  |  | 						color: subsurfaceTheme.darkTextColor | 
					
						
							|  |  |  | 						anchors { | 
					
						
							|  |  |  | 							horizontalCenter: parent.horizontalCenter | 
					
						
							|  |  |  | 							verticalCenter: parent.verticalCenter | 
					
						
							|  |  |  | 						} | 
					
						
							| 
									
										
										
										
											2017-06-23 18:08:47 -07:00
										 |  |  | 					} | 
					
						
							|  |  |  | 				} | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 				Rectangle { | 
					
						
							|  |  |  | 					color: subsurfaceTheme.darkPrimaryColor | 
					
						
							|  |  |  | 					border.color: "black" | 
					
						
							| 
									
										
										
										
											2017-07-22 11:54:21 +02:00
										 |  |  | 					width: sampleHighlightDark.width + Kirigami.Units.gridUnit | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 					height: Kirigami.Units.gridUnit * 2 | 
					
						
							|  |  |  | 					Text { | 
					
						
							|  |  |  | 						id: sampleHighlightDark | 
					
						
							|  |  |  | 						text: qsTr("Highlight") | 
					
						
							|  |  |  | 						color: subsurfaceTheme.darkPrimaryTextColor | 
					
						
							|  |  |  | 						anchors { | 
					
						
							|  |  |  | 							horizontalCenter: parent.horizontalCenter | 
					
						
							|  |  |  | 							verticalCenter: parent.verticalCenter | 
					
						
							|  |  |  | 						} | 
					
						
							| 
									
										
										
										
											2017-06-23 18:08:47 -07:00
										 |  |  | 					} | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 			} | 
					
						
							| 
									
										
										
										
											2017-07-24 20:04:47 +02:00
										 |  |  | 			SsrfSwitch { | 
					
						
							| 
									
										
										
										
											2017-07-23 12:44:52 +02:00
										 |  |  | 				id: darkButton | 
					
						
							|  |  |  | 				Layout.preferredWidth: gridWidth * 0.25 | 
					
						
							| 
									
										
										
										
											2017-07-20 19:55:58 +12:00
										 |  |  | 				checked: subsurfaceTheme.currentTheme === "Dark" | 
					
						
							| 
									
										
										
										
											2017-07-23 12:44:52 +02:00
										 |  |  | 				enabled: subsurfaceTheme.currentTheme !== "Dark" | 
					
						
							| 
									
										
										
										
											2017-07-20 19:55:58 +12:00
										 |  |  | 				onClicked: { | 
					
						
							|  |  |  | 					darkTheme() | 
					
						
							| 
									
										
										
										
											2017-07-20 21:53:42 +02:00
										 |  |  | 					manager.theme = subsurfaceTheme.currentTheme | 
					
						
							|  |  |  | 					manager.savePreferences() | 
					
						
							| 
									
										
										
										
											2017-07-20 19:55:58 +12:00
										 |  |  | 				} | 
					
						
							|  |  |  | 			} | 
					
						
							| 
									
										
										
										
											2017-06-23 18:08:47 -07:00
										 |  |  | 		} | 
					
						
							| 
									
										
										
										
											2017-07-24 20:04:47 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-07-20 19:39:55 +02:00
										 |  |  | 		Rectangle { | 
					
						
							|  |  |  | 			color: subsurfaceTheme.darkerPrimaryColor | 
					
						
							|  |  |  | 			height: 1 | 
					
						
							|  |  |  | 			opacity: 0.5 | 
					
						
							|  |  |  | 			Layout.fillWidth: true | 
					
						
							|  |  |  | 		} | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 		GridLayout { | 
					
						
							|  |  |  | 			id: gpsPrefs | 
					
						
							|  |  |  | 			columns: 2 | 
					
						
							|  |  |  | 			width: parent.width | 
					
						
							| 
									
										
										
										
											2017-06-23 13:06:17 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 			Kirigami.Heading { | 
					
						
							|  |  |  | 				text: qsTr("Subsurface GPS data webservice") | 
					
						
							|  |  |  | 				color: subsurfaceTheme.textColor | 
					
						
							|  |  |  | 				level: 4 | 
					
						
							|  |  |  | 				Layout.topMargin: Kirigami.Units.largeSpacing | 
					
						
							|  |  |  | 				Layout.bottomMargin: Kirigami.Units.largeSpacing / 2 | 
					
						
							|  |  |  | 				Layout.columnSpan: 2 | 
					
						
							|  |  |  | 			} | 
					
						
							| 
									
										
										
										
											2015-11-13 17:14:22 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 			Kirigami.Label { | 
					
						
							|  |  |  | 				text: qsTr("Distance threshold (meters)") | 
					
						
							|  |  |  | 				Layout.alignment: Qt.AlignRight | 
					
						
							| 
									
										
										
										
											2017-07-22 12:04:27 +02:00
										 |  |  | 				Layout.preferredWidth:gridWidth * 0.75 | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 			} | 
					
						
							| 
									
										
										
										
											2015-11-14 09:10:06 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 			TextField { | 
					
						
							|  |  |  | 				id: distanceThreshold | 
					
						
							|  |  |  | 				text: manager.distanceThreshold | 
					
						
							| 
									
										
										
										
											2017-07-22 12:04:27 +02:00
										 |  |  | 				Layout.preferredWidth: gridWidth * 0.25 | 
					
						
							| 
									
										
										
										
											2017-07-20 21:53:42 +02:00
										 |  |  | 				onEditingFinished: { | 
					
						
							|  |  |  | 					manager.distanceThreshold = distanceThreshold.text | 
					
						
							|  |  |  | 					manager.savePreferences() | 
					
						
							|  |  |  | 				} | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 			} | 
					
						
							| 
									
										
										
										
											2015-11-14 09:10:06 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 			Kirigami.Label { | 
					
						
							|  |  |  | 				text: qsTr("Time threshold (minutes)") | 
					
						
							|  |  |  | 				Layout.alignment: Qt.AlignRight | 
					
						
							| 
									
										
										
										
											2017-07-22 12:04:27 +02:00
										 |  |  | 				Layout.preferredWidth: gridWidth * 0.75 | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 			} | 
					
						
							| 
									
										
										
										
											2015-11-14 09:10:06 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 			TextField { | 
					
						
							|  |  |  | 				id: timeThreshold | 
					
						
							|  |  |  | 				text: manager.timeThreshold | 
					
						
							| 
									
										
										
										
											2017-07-22 12:04:27 +02:00
										 |  |  | 				Layout.preferredWidth: gridWidth * 0.25 | 
					
						
							| 
									
										
										
										
											2017-07-20 21:53:42 +02:00
										 |  |  | 				onEditingFinished: { | 
					
						
							|  |  |  | 					manager.timeThreshold = timeThreshold.text | 
					
						
							|  |  |  | 					manager.savePreferences() | 
					
						
							|  |  |  | 				} | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 			} | 
					
						
							| 
									
										
										
										
											2015-11-14 09:10:06 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-07-19 20:57:12 +02:00
										 |  |  | 		} | 
					
						
							| 
									
										
										
										
											2017-07-20 21:19:26 +02:00
										 |  |  | 		Rectangle { | 
					
						
							|  |  |  | 			color: subsurfaceTheme.darkerPrimaryColor | 
					
						
							|  |  |  | 			height: 1 | 
					
						
							|  |  |  | 			opacity: 0.5 | 
					
						
							|  |  |  | 			Layout.fillWidth: true | 
					
						
							|  |  |  | 		} | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 		GridLayout { | 
					
						
							|  |  |  | 			id: libdclogprefs | 
					
						
							| 
									
										
										
										
											2017-07-22 12:04:27 +02:00
										 |  |  | 			columns: 2 | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 			width: parent.width | 
					
						
							|  |  |  | 			Kirigami.Heading { | 
					
						
							| 
									
										
										
										
											2017-07-20 19:39:55 +02:00
										 |  |  | 				text: qsTr("Dive computer") | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 				color: subsurfaceTheme.textColor | 
					
						
							|  |  |  | 				level: 4 | 
					
						
							|  |  |  | 				Layout.topMargin: Kirigami.Units.largeSpacing | 
					
						
							|  |  |  | 				Layout.bottomMargin: Kirigami.Units.largeSpacing / 2 | 
					
						
							| 
									
										
										
										
											2017-07-22 12:04:27 +02:00
										 |  |  | 				Layout.columnSpan: 2 | 
					
						
							| 
									
										
										
										
											2017-07-09 18:08:36 -07:00
										 |  |  | 			} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-07-20 19:55:58 +12:00
										 |  |  | 			Kirigami.Label { | 
					
						
							|  |  |  | 				text: qsTr("Save detailed log") | 
					
						
							| 
									
										
										
										
											2017-07-22 12:04:27 +02:00
										 |  |  | 				Layout.preferredWidth: gridWidth * 0.75 | 
					
						
							| 
									
										
										
										
											2017-07-20 19:55:58 +12:00
										 |  |  | 			} | 
					
						
							| 
									
										
										
										
											2017-07-24 20:04:47 +02:00
										 |  |  | 			SsrfSwitch { | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 				id: libdclogButton | 
					
						
							|  |  |  | 				checked: manager.libdcLog | 
					
						
							| 
									
										
										
										
											2017-07-22 12:04:27 +02:00
										 |  |  | 				Layout.preferredWidth: gridWidth * 0.25 | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 				onClicked: { | 
					
						
							|  |  |  | 					manager.libdcLog = checked | 
					
						
							|  |  |  | 				} | 
					
						
							| 
									
										
										
										
											2017-07-09 18:08:36 -07:00
										 |  |  | 			} | 
					
						
							|  |  |  | 		} | 
					
						
							| 
									
										
										
										
											2017-07-20 21:19:26 +02:00
										 |  |  | 		Rectangle { | 
					
						
							|  |  |  | 			color: subsurfaceTheme.darkerPrimaryColor | 
					
						
							|  |  |  | 			height: 1 | 
					
						
							|  |  |  | 			opacity: 0.5 | 
					
						
							|  |  |  | 			Layout.fillWidth: true | 
					
						
							|  |  |  | 		} | 
					
						
							| 
									
										
										
										
											2017-07-19 16:35:46 +02:00
										 |  |  | 		GridLayout { | 
					
						
							|  |  |  | 			id: developer | 
					
						
							| 
									
										
										
										
											2017-07-22 12:04:27 +02:00
										 |  |  | 			columns: 2 | 
					
						
							| 
									
										
										
										
											2017-07-19 16:35:46 +02:00
										 |  |  | 			width: parent.width - Kirigami.Units.gridUnit | 
					
						
							|  |  |  | 			Kirigami.Heading { | 
					
						
							|  |  |  | 				text: qsTr("Developer") | 
					
						
							|  |  |  | 				color: subsurfaceTheme.textColor | 
					
						
							|  |  |  | 				level: 4 | 
					
						
							|  |  |  | 				Layout.topMargin: Kirigami.Units.largeSpacing | 
					
						
							|  |  |  | 				Layout.bottomMargin: Kirigami.Units.largeSpacing / 2 | 
					
						
							| 
									
										
										
										
											2017-07-22 12:04:27 +02:00
										 |  |  | 				Layout.columnSpan: 2 | 
					
						
							| 
									
										
										
										
											2017-07-19 16:35:46 +02:00
										 |  |  | 			} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-07-20 20:47:17 +02:00
										 |  |  | 			Kirigami.Label { | 
					
						
							|  |  |  | 				text: qsTr("Display Developer menu") | 
					
						
							| 
									
										
										
										
											2017-07-22 12:04:27 +02:00
										 |  |  | 				Layout.preferredWidth: gridWidth * 0.75 | 
					
						
							| 
									
										
										
										
											2017-07-20 20:47:17 +02:00
										 |  |  | 			} | 
					
						
							| 
									
										
										
										
											2017-07-24 20:04:47 +02:00
										 |  |  | 			SsrfSwitch { | 
					
						
							| 
									
										
										
										
											2017-07-19 16:35:46 +02:00
										 |  |  | 				id: developerButton | 
					
						
							|  |  |  | 				checked: manager.developer | 
					
						
							| 
									
										
										
										
											2017-07-22 12:04:27 +02:00
										 |  |  | 				Layout.preferredWidth: gridWidth * 0.25 | 
					
						
							| 
									
										
										
										
											2017-07-19 16:35:46 +02:00
										 |  |  | 				onClicked: { | 
					
						
							|  |  |  | 					manager.developer = checked | 
					
						
							| 
									
										
										
										
											2017-08-03 15:30:32 -07:00
										 |  |  | 				} | 
					
						
							| 
									
										
										
										
											2017-07-19 16:35:46 +02:00
										 |  |  | 			} | 
					
						
							|  |  |  | 		} | 
					
						
							| 
									
										
										
										
											2017-07-09 20:53:16 -07:00
										 |  |  | 		Item { | 
					
						
							|  |  |  | 			height: Kirigami.Units.gridUnit * 6 | 
					
						
							| 
									
										
										
										
											2017-07-09 18:08:36 -07:00
										 |  |  | 		} | 
					
						
							| 
									
										
										
										
											2017-07-09 18:47:18 -07:00
										 |  |  | 	} | 
					
						
							| 
									
										
										
										
											2015-07-10 10:48:28 +03:00
										 |  |  | } |