| 89 | } |
| 90 | |
| 91 | QString LocationDialog::locationText() { |
| 92 | double lat = latitude.text().toDouble(); |
| 93 | QString p1 = calculateDegrees(lat); |
| 94 | if (lat>=0) |
| 95 | p1 = p1+" N "; |
| 96 | else |
| 97 | p1 = p1+" S "; |
| 98 | |
| 99 | double lon = longitude.text().toDouble(); |
| 100 | QString p2 = calculateDegrees(lon); |
| 101 | if (lon>=0) |
| 102 | p2 = p2+" E"; |
| 103 | else |
| 104 | p2 = p2+" W"; |
| 105 | return p1+p2; |
| 106 | |
| 107 | |
| 108 | } |
| 109 | |
| 110 | |
| 111 | QString LocationDialog::calculateDegrees(double value) { |
no outgoing calls
no test coverage detected