| 
									
										
										
										
											2015-08-19 10:16:36 +03:00
										 |  |  | import QtQuick 2.3 | 
					
						
							|  |  |  | import QtQuick.Controls 1.2 | 
					
						
							|  |  |  | import QtQuick.Controls.Styles 1.2 | 
					
						
							|  |  |  | import QtQuick.Window 2.2 | 
					
						
							|  |  |  | import QtQuick.Dialogs 1.2 | 
					
						
							|  |  |  | import QtQuick.Layouts 1.1 | 
					
						
							|  |  |  | import QtQuick.Window 2.2 | 
					
						
							|  |  |  | import org.subsurfacedivelog.mobile 1.0 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Rectangle { | 
					
						
							|  |  |  | 	id: topBar | 
					
						
							| 
									
										
										
										
											2015-10-09 05:05:23 +02:00
										 |  |  | 	color: theme.accentColor | 
					
						
							| 
									
										
										
										
											2015-08-19 10:16:36 +03:00
										 |  |  | 	Layout.fillWidth: true | 
					
						
							|  |  |  | 	Layout.margins: 0 | 
					
						
							| 
									
										
										
										
											2015-10-09 05:05:23 +02:00
										 |  |  | 	Layout.minimumHeight: prefsButton.height + units.spacing * 2 | 
					
						
							| 
									
										
										
										
											2015-08-19 10:16:36 +03:00
										 |  |  | 	RowLayout { | 
					
						
							|  |  |  | 		anchors.bottom: topBar.bottom | 
					
						
							| 
									
										
										
										
											2015-10-09 05:05:23 +02:00
										 |  |  | 		anchors.bottomMargin: units.spacing | 
					
						
							| 
									
										
										
										
											2015-08-19 10:16:36 +03:00
										 |  |  | 		anchors.left: topBar.left | 
					
						
							| 
									
										
										
										
											2015-10-09 05:05:23 +02:00
										 |  |  | 		anchors.leftMargin: units.spacing | 
					
						
							| 
									
										
										
										
											2015-08-19 10:16:36 +03:00
										 |  |  | 		anchors.right: topBar.right | 
					
						
							| 
									
										
										
										
											2015-10-09 05:05:23 +02:00
										 |  |  | 		anchors.rightMargin: units.spacing | 
					
						
							| 
									
										
										
										
											2015-08-19 10:16:36 +03:00
										 |  |  | 		Button { | 
					
						
							|  |  |  | 			id: backButton | 
					
						
							|  |  |  | 			Layout.maximumHeight: prefsButton.height | 
					
						
							|  |  |  | 			Layout.minimumHeight: prefsButton.height | 
					
						
							| 
									
										
										
										
											2015-10-09 05:05:23 +02:00
										 |  |  | 			Layout.preferredWidth: units.gridUnit * 2 | 
					
						
							| 
									
										
										
										
											2015-08-19 10:16:36 +03:00
										 |  |  | 			text: "\u2190" | 
					
						
							|  |  |  | 			style: ButtonStyle { | 
					
						
							|  |  |  | 				background: Rectangle { | 
					
						
							| 
									
										
										
										
											2015-10-09 05:05:23 +02:00
										 |  |  | 					color: theme.accentColor | 
					
						
							|  |  |  | 					implicitWidth: units.gridUnit * 2 | 
					
						
							| 
									
										
										
										
											2015-08-19 10:16:36 +03:00
										 |  |  | 				} | 
					
						
							|  |  |  | 				label: Text { | 
					
						
							|  |  |  | 					id: txt | 
					
						
							| 
									
										
										
										
											2015-10-09 05:05:23 +02:00
										 |  |  | 					color: theme.accentTextColor | 
					
						
							| 
									
										
										
										
											2015-08-19 10:16:36 +03:00
										 |  |  | 					font.pointSize: 18 | 
					
						
							|  |  |  | 					font.bold: true | 
					
						
							|  |  |  | 					text: control.text | 
					
						
							|  |  |  | 					horizontalAlignment: Text.AlignHCenter | 
					
						
							|  |  |  | 					verticalAlignment: Text.AlignVCenter | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 			onClicked: { | 
					
						
							| 
									
										
										
										
											2015-08-20 11:44:01 +03:00
										 |  |  | 				if (stackView.currentItem.objectName == "DiveDetails") | 
					
						
							|  |  |  | 				{ | 
					
						
							| 
									
										
										
										
											2015-08-19 10:16:36 +03:00
										 |  |  | 				manager.commitChanges( | 
					
						
							|  |  |  | 							dive_id, | 
					
						
							|  |  |  | 							suit, | 
					
						
							|  |  |  | 							buddy, | 
					
						
							|  |  |  | 							divemaster, | 
					
						
							|  |  |  | 							notes | 
					
						
							|  |  |  | 							) | 
					
						
							| 
									
										
										
										
											2015-08-20 11:44:01 +03:00
										 |  |  | 				} | 
					
						
							| 
									
										
										
										
											2015-08-19 10:16:36 +03:00
										 |  |  | 				stackView.pop(); | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 		Text { | 
					
						
							|  |  |  | 			text: qsTr("Subsurface mobile") | 
					
						
							|  |  |  | 			font.pointSize: 18 | 
					
						
							| 
									
										
										
										
											2015-10-09 05:05:23 +02:00
										 |  |  | 			color: theme.accentTextColor | 
					
						
							|  |  |  | 			anchors.left: backButton.right | 
					
						
							|  |  |  | 			anchors.leftMargin: units.spacing | 
					
						
							|  |  |  | 			//horizontalAlignment: Text.AlignHCenter
 | 
					
						
							| 
									
										
										
										
											2015-08-19 10:16:36 +03:00
										 |  |  | 		} | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | } |