mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Dive list model: add GPS string access
If the QML UI needs the GPS information, we need a way to get to it. I'm not convinced that having it as comma separated string is the best way to go, but that's what I need for the Google API so that's what I picked for now. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									07a0ef2139
								
							
						
					
					
						commit
						7ffe7a8c8a
					
				
					 4 changed files with 21 additions and 0 deletions
				
			
		|  | @ -77,6 +77,8 @@ QVariant DiveListModel::data(const QModelIndex &index, int role) const | |||
| 		return dive.sac(); | ||||
| 	else if (role == DiveLocationRole) | ||||
| 		return dive.location(); | ||||
| 	else if (role == DiveGPSRole) | ||||
| 		return dive.gps(); | ||||
| 	else if (role == DiveNotesRole) | ||||
| 		return dive.notes(); | ||||
| 	else if (role == DiveBuddyRole) | ||||
|  | @ -107,6 +109,7 @@ QHash<int, QByteArray> DiveListModel::roleNames() const | |||
| 	roles[DiveGasRole] = "gas"; | ||||
| 	roles[DiveSacRole] = "sac"; | ||||
| 	roles[DiveLocationRole] = "location"; | ||||
| 	roles[DiveGPSRole] = "gps"; | ||||
| 	roles[DiveNotesRole] = "notes"; | ||||
| 	roles[DiveBuddyRole] = "buddy"; | ||||
| 	roles[DiveMasterRole] = "divemaster"; | ||||
|  |  | |||
|  | @ -26,6 +26,7 @@ public: | |||
| 		DiveGasRole, | ||||
| 		DiveSacRole, | ||||
| 		DiveLocationRole, | ||||
| 		DiveGPSRole, | ||||
| 		DiveNotesRole, | ||||
| 		DiveBuddyRole, | ||||
| 		DiveMasterRole, | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue