| 
									
										
										
										
											2015-07-21 15:00:29 +03:00
										 |  |  | import QtQuick 2.3 | 
					
						
							|  |  |  | import QtQuick.Controls 1.2 | 
					
						
							| 
									
										
										
										
											2015-07-27 09:55:18 -07:00
										 |  |  | import QtQuick.Controls.Styles 1.2 | 
					
						
							| 
									
										
										
										
											2015-07-21 15:00:29 +03:00
										 |  |  | import QtQuick.Window 2.2 | 
					
						
							|  |  |  | import QtQuick.Dialogs 1.2 | 
					
						
							|  |  |  | import QtQuick.Layouts 1.1 | 
					
						
							| 
									
										
										
										
											2015-07-30 08:17:09 +02:00
										 |  |  | import QtQuick.Window 2.2 | 
					
						
							| 
									
										
										
										
											2015-07-21 15:00:29 +03:00
										 |  |  | import org.subsurfacedivelog.mobile 1.0 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Item { | 
					
						
							|  |  |  | 	id: diveDetailsWindow | 
					
						
							|  |  |  | 	width: parent.width | 
					
						
							| 
									
										
										
										
											2015-08-20 11:44:01 +03:00
										 |  |  | 	objectName: "DiveDetails" | 
					
						
							| 
									
										
										
										
											2015-07-21 15:00:29 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	property string location | 
					
						
							|  |  |  | 	property string dive_id | 
					
						
							|  |  |  | 	property string airtemp | 
					
						
							|  |  |  | 	property string watertemp | 
					
						
							|  |  |  | 	property string suit | 
					
						
							|  |  |  | 	property string buddy | 
					
						
							|  |  |  | 	property string divemaster; | 
					
						
							|  |  |  | 	property string notes; | 
					
						
							| 
									
										
										
										
											2015-07-27 12:26:51 -07:00
										 |  |  | 	property string date | 
					
						
							|  |  |  | 	property string number | 
					
						
							| 
									
										
										
										
											2015-07-21 15:00:29 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	onDive_idChanged: { | 
					
						
							|  |  |  | 		qmlProfile.diveId = dive_id | 
					
						
							|  |  |  | 		qmlProfile.update() | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	Flickable { | 
					
						
							|  |  |  | 		id: flick | 
					
						
							|  |  |  | 		width: parent.width | 
					
						
							|  |  |  | 		anchors { top: parent.top; bottom: parent.bottom } | 
					
						
							|  |  |  | 		contentHeight: parent.height | 
					
						
							|  |  |  | 		clip: true | 
					
						
							|  |  |  | 		ColumnLayout { | 
					
						
							|  |  |  | 			width: parent.width | 
					
						
							| 
									
										
										
										
											2015-07-30 10:17:22 +02:00
										 |  |  | 			spacing: 8 | 
					
						
							| 
									
										
										
										
											2015-08-19 10:16:36 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 			TopBar { | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-21 15:00:29 +03:00
										 |  |  | 			} | 
					
						
							| 
									
										
										
										
											2015-08-19 10:16:36 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-08-12 19:49:11 +03:00
										 |  |  | 			Button { | 
					
						
							| 
									
										
										
										
											2015-08-12 20:18:34 +03:00
										 |  |  | 				text: "Hide Dive Profile" | 
					
						
							| 
									
										
										
										
											2015-08-12 19:49:11 +03:00
										 |  |  | 				onClicked: { | 
					
						
							|  |  |  | 					qmlProfile.visible = !qmlProfile.visible | 
					
						
							| 
									
										
										
										
											2015-08-12 20:18:34 +03:00
										 |  |  | 					if (qmlProfile.visible) { | 
					
						
							|  |  |  | 						text = "Hide Dive Profile" | 
					
						
							|  |  |  | 					} else { | 
					
						
							|  |  |  | 						text = "Show Dive Profile" | 
					
						
							|  |  |  | 					} | 
					
						
							| 
									
										
										
										
											2015-08-12 19:49:11 +03:00
										 |  |  | 				} | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-21 15:00:29 +03:00
										 |  |  | 			GridLayout { | 
					
						
							|  |  |  | 				id: editorDetails | 
					
						
							|  |  |  | 				width: parent.width | 
					
						
							|  |  |  | 				columns: 2 | 
					
						
							| 
									
										
										
										
											2015-07-27 12:26:51 -07:00
										 |  |  | 				Text { | 
					
						
							|  |  |  | 					Layout.columnSpan: 2 | 
					
						
							|  |  |  | 					Layout.alignment: Qt.AlignHCenter | 
					
						
							|  |  |  | 					text: "Dive " + number + " (" + date + ")"; font.bold: true | 
					
						
							|  |  |  | 				} | 
					
						
							| 
									
										
										
										
											2015-07-21 15:00:29 +03:00
										 |  |  | 				QMLProfile { | 
					
						
							| 
									
										
										
										
											2015-07-27 12:26:51 -07:00
										 |  |  | 					Layout.columnSpan: 2 | 
					
						
							|  |  |  | 					Layout.fillWidth: true | 
					
						
							| 
									
										
										
										
											2015-07-21 15:00:29 +03:00
										 |  |  | 					id: qmlProfile | 
					
						
							|  |  |  | 					height: 500 | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 				Text { text: "Location:"; font.bold: true } | 
					
						
							|  |  |  | 				TextField { id: txtLocation; text: location; Layout.fillWidth: true } | 
					
						
							|  |  |  | 				Text { text: "Air Temp:"; font.bold: true } | 
					
						
							|  |  |  | 				TextField { id: txtAirTemp; text: airtemp; Layout.fillWidth: true } | 
					
						
							|  |  |  | 				Text { text: "Water Temp:"; font.bold: true } | 
					
						
							|  |  |  | 				TextField { id: txtWaterTemp; text: watertemp; Layout.fillWidth: true } | 
					
						
							|  |  |  | 				Text { text: "Suit:"; font.bold: true } | 
					
						
							|  |  |  | 				TextField { id: txtSuit; text: suit; Layout.fillWidth: true } | 
					
						
							|  |  |  | 				Text { text: "Buddy:"; font.bold: true } | 
					
						
							|  |  |  | 				TextField { id: txtBuddy; text: buddy; Layout.fillWidth: true } | 
					
						
							|  |  |  | 				Text { text: "Dive Master:"; font.bold: true } | 
					
						
							|  |  |  | 				TextField { id: txtDiveMaster; text: divemaster; Layout.fillWidth: true} | 
					
						
							|  |  |  | 				Text { text: "Notes:"; font.bold: true } | 
					
						
							|  |  |  | 				TextEdit{ | 
					
						
							|  |  |  | 					id: txtNotes | 
					
						
							|  |  |  | 					text: notes | 
					
						
							|  |  |  | 					focus: true | 
					
						
							|  |  |  | 					Layout.fillWidth: true | 
					
						
							|  |  |  | 					Layout.fillHeight: true | 
					
						
							|  |  |  | 					selectByMouse: true | 
					
						
							|  |  |  | 					wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | } |