# Path: oroboros/core/geocoords.py
# class Latitude(_Coords):
# 	"""Latitude type.
# 	
# 	Default to '0:N:0:0'.
# 	
# 	"""
# 	
# 	__slots__ = _Coords.__slots__
# 	
# 	def _set_degrees(self, degrees):
# 		"""Check and set latitude degrees.
# 		
# 		:type degrees: numeric
# 		:raise ValueError: degrees not in range(-90, 91)
# 		"""
# 		degrees = abs(int(degrees))
# 		if degrees < 0 or degrees > 90:
# 			raise TypeError('Latitude degrees not in range(-90, 91).',
# 				degrees)
# 		self._degrees = degrees
# 	
# 	def _set_direction(self, direction):
# 		"""Check and set latitude direction (N/S).
# 		
# 		:type direction: str
# 		:raise ValueError: invalid direction
# 		"""
# 		if direction in (None, 'N', 'n', '+', 1):
# 			self._direction = 'N'
# 		elif direction in ('S', 's', '-', 0):
# 			self._direction = 'S'
# 		else:
# 			raise ValueError('Latitude direction not in ("N", "+", "S", "-").',
# 				direction)
# 	
# 	degrees = property(_Coords._get_degrees, _set_degrees,
# 		doc="Latitude degrees [-90;90].")
# 	direction = property(_Coords._get_direction, _set_direction,
# 		doc="Latitude direction (N/S).")
# 	minutes = property(_Coords._get_minutes, _Coords._set_minutes,
# 		doc="Latitude minutes [0;59].")
# 	seconds = property(_Coords._get_seconds, _Coords._set_seconds,
# 		doc="Latitude seconds [0;59].")
# 	
# 	def __repr__(self):
# 		return "Latitude(%s, '%s', %s, %s)" % (
# 			self._degrees, self._direction, self._minutes, self._seconds)
# 
# class Longitude(_Coords):
# 	"""Longitude type.
# 	
# 	Default to '0:E:0:0'.
# 	
# 	"""
# 	
# 	__slots__ = _Coords.__slots__
# 	
# 	def _set_degrees(self, degrees):
# 		"""Check and set longitude degrees.
# 		
# 		:type degrees: numeric
# 		:raise ValueError: degrees not in range(-180, 181)
# 		"""
# 		degrees = abs(int(degrees))
# 		if degrees < 0 or degrees > 180:
# 			raise ValueError('Longitude degrees not in range(-180, 181).',
# 				degrees)
# 		self._degrees = degrees
# 	
# 	def _set_direction(self, direction):
# 		"""Check and set longitude direction (E/W).
# 		
# 		:type direction: str
# 		:raise ValueError: invalid direction
# 		"""
# 		if direction in (None, 'E', 'e', '+', 1):
# 			self._direction = 'E'
# 		elif direction in ('W', 'w', '-', 0):
# 			self._direction = 'W'
# 		else:
# 			raise ValueError('Latitude direction not in ("E", "+", "W", "-").',
# 				direction)
# 	
# 	degrees = property(_Coords._get_degrees, _set_degrees,
# 		doc="Longitude degrees [-180;180].")
# 	direction = property(_Coords._get_direction, _set_direction,
# 		doc="Longitude direction (E/W).")
# 	minutes = property(_Coords._get_minutes, _Coords._set_minutes,
# 		doc="Longitude minutes [0;59].")
# 	seconds = property(_Coords._get_seconds, _Coords._set_seconds,
# 		doc="Longitude seconds [0;59].")
# 	
# 	def __repr__(self):
# 		return "Longitude(%s, '%s', %s, %s)" % (
# 			self._degrees, self._direction, self._minutes, self._seconds)


from PyQt4.QtCore import *
from PyQt4.QtGui import *
from oroboros.core.geocoords import Latitude, Longitude
		self.addWidget(self.scspin)
		# set values
		self.reset()
	
	def reset(self):
		self.dgspin.setValue(self._coords._degrees)
		if self._coords._direction == self.drlist[0]:
			self.drbox.setCurrentIndex(0)
		else:
			self.drbox.setCurrentIndex(1)
		self.mnspin.setValue(self._coords._minutes)
		self.scspin.setValue(self._coords._seconds)
	
	def value(self):
		dg = self.dgspin.value()
		mn = self.mnspin.value()
		sc = self.scspin.value()
		if self.drbox.currentIndex() == 0:
			if self._typ == 'lat':
				dr = 'N'
			else:
				dr = 'E'
		else:
			if self._typ == 'lat':
				dr = 'S'
			else:
				dr = 'W'
		if self._typ == 'lat':
			return Latitude(dg, dr, mn, sc)
		else:

# Path: oroboros/core/geocoords.py
# class Latitude(_Coords):
# 	"""Latitude type.
# 	
# 	Default to '0:N:0:0'.
# 	
# 	"""
# 	
# 	__slots__ = _Coords.__slots__
# 	
# 	def _set_degrees(self, degrees):
# 		"""Check and set latitude degrees.
# 		
# 		:type degrees: numeric
# 		:raise ValueError: degrees not in range(-90, 91)
# 		"""
# 		degrees = abs(int(degrees))
# 		if degrees < 0 or degrees > 90:
# 			raise TypeError('Latitude degrees not in range(-90, 91).',
# 				degrees)
# 		self._degrees = degrees
# 	
# 	def _set_direction(self, direction):
# 		"""Check and set latitude direction (N/S).
# 		
# 		:type direction: str
# 		:raise ValueError: invalid direction
# 		"""
# 		if direction in (None, 'N', 'n', '+', 1):
# 			self._direction = 'N'
# 		elif direction in ('S', 's', '-', 0):
# 			self._direction = 'S'
# 		else:
# 			raise ValueError('Latitude direction not in ("N", "+", "S", "-").',
# 				direction)
# 	
# 	degrees = property(_Coords._get_degrees, _set_degrees,
# 		doc="Latitude degrees [-90;90].")
# 	direction = property(_Coords._get_direction, _set_direction,
# 		doc="Latitude direction (N/S).")
# 	minutes = property(_Coords._get_minutes, _Coords._set_minutes,
# 		doc="Latitude minutes [0;59].")
# 	seconds = property(_Coords._get_seconds, _Coords._set_seconds,
# 		doc="Latitude seconds [0;59].")
# 	
# 	def __repr__(self):
# 		return "Latitude(%s, '%s', %s, %s)" % (
# 			self._degrees, self._direction, self._minutes, self._seconds)
# 
# class Longitude(_Coords):
# 	"""Longitude type.
# 	
# 	Default to '0:E:0:0'.
# 	
# 	"""
# 	
# 	__slots__ = _Coords.__slots__
# 	
# 	def _set_degrees(self, degrees):
# 		"""Check and set longitude degrees.
# 		
# 		:type degrees: numeric
# 		:raise ValueError: degrees not in range(-180, 181)
# 		"""
# 		degrees = abs(int(degrees))
# 		if degrees < 0 or degrees > 180:
# 			raise ValueError('Longitude degrees not in range(-180, 181).',
# 				degrees)
# 		self._degrees = degrees
# 	
# 	def _set_direction(self, direction):
# 		"""Check and set longitude direction (E/W).
# 		
# 		:type direction: str
# 		:raise ValueError: invalid direction
# 		"""
# 		if direction in (None, 'E', 'e', '+', 1):
# 			self._direction = 'E'
# 		elif direction in ('W', 'w', '-', 0):
# 			self._direction = 'W'
# 		else:
# 			raise ValueError('Latitude direction not in ("E", "+", "W", "-").',
# 				direction)
# 	
# 	degrees = property(_Coords._get_degrees, _set_degrees,
# 		doc="Longitude degrees [-180;180].")
# 	direction = property(_Coords._get_direction, _set_direction,
# 		doc="Longitude direction (E/W).")
# 	minutes = property(_Coords._get_minutes, _Coords._set_minutes,
# 		doc="Longitude minutes [0;59].")
# 	seconds = property(_Coords._get_seconds, _Coords._set_seconds,
# 		doc="Longitude seconds [0;59].")
# 	
# 	def __repr__(self):
# 		return "Longitude(%s, '%s', %s, %s)" % (
# 			self._degrees, self._direction, self._minutes, self._seconds)


# Path: oroboros/gui/coordswidget.py
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from oroboros.core.geocoords import Latitude, Longitude

		self.addWidget(self.scspin)
		# set values
		self.reset()
	
	def reset(self):
		self.dgspin.setValue(self._coords._degrees)
		if self._coords._direction == self.drlist[0]:
			self.drbox.setCurrentIndex(0)
		else:
			self.drbox.setCurrentIndex(1)
		self.mnspin.setValue(self._coords._minutes)
		self.scspin.setValue(self._coords._seconds)
	
	def value(self):
		dg = self.dgspin.value()
		mn = self.mnspin.value()
		sc = self.scspin.value()
		if self.drbox.currentIndex() == 0:
			if self._typ == 'lat':
				dr = 'N'
			else:
				dr = 'E'
		else:
			if self._typ == 'lat':
				dr = 'S'
			else:
				dr = 'W'
		if self._typ == 'lat':
			return Latitude(dg, dr, mn, sc)
		else:

			return Longitude(dg, dr, mn, sc)