Changeset 26fd241c3e28094ce1fff787bd1bcfaf0b101ed0
- Timestamp:
- 02/22/10 20:38:25 (5 months ago)
- Author:
- Tobias Bieniek <Tobias.Bieniek@…>
- git-author:
- Tobias Bieniek <Tobias.Bieniek@gmx.de> / 2010-02-22T18:29:55Z+0100
- Parents:
- f84f92055fd97fdf36502aaf47dde06b296949e6
- Children:
- 6409703d43721b4822d3c2d78b75bf02e6493ee8
- git-committer:
- Tobias Bieniek <Tobias.Bieniek@gmx.de> / 2010-02-22T18:38:25Z+0100
- Message:
-
Units: Implemented Get/SetCoordinateFormat()
- Location:
- src
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r04e505
|
r26fd24
|
|
| 1499 | 1499 | dfe->addEnumText(_T("DDMM.mmm")); |
| 1500 | 1500 | dfe->addEnumText(_T("DD.dddd")); |
| 1501 | | dfe->Set(Units::CoordinateFormat); |
| | 1501 | dfe->Set(Units::GetCoordinateFormat()); |
| 1502 | 1502 | wp->RefreshDisplay(); |
| 1503 | 1503 | } |
-
|
r3a70da
|
r26fd24
|
|
| 112 | 112 | static void SetUnits(void) { |
| 113 | 113 | WndProperty* wp; |
| 114 | | switch (Units::CoordinateFormat) { |
| | 114 | switch (Units::GetCoordinateFormat()) { |
| 115 | 115 | case 0: // ("DDMMSS"); |
| 116 | 116 | case 1: // ("DDMMSS.ss"); |
| … |
… |
|
| 203 | 203 | } |
| 204 | 204 | |
| 205 | | switch (Units::CoordinateFormat) { |
| | 205 | switch (Units::GetCoordinateFormat()) { |
| 206 | 206 | case 0: // ("DDMMSS"); |
| 207 | 207 | case 1: // ("DDMMSS.ss"); |
| … |
… |
|
| 256 | 256 | } |
| 257 | 257 | |
| 258 | | switch (Units::CoordinateFormat) { |
| | 258 | switch (Units::GetCoordinateFormat()) { |
| 259 | 259 | case 0: // ("DDMMSS"); |
| 260 | 260 | case 1: // ("DDMMSS.ss"); |
| … |
… |
|
| 336 | 336 | } |
| 337 | 337 | |
| 338 | | switch (Units::CoordinateFormat) { |
| | 338 | switch (Units::GetCoordinateFormat()) { |
| 339 | 339 | case 0: // ("DDMMSS"); |
| 340 | 340 | case 1: // ("DDMMSS.ss"); |
| … |
… |
|
| 383 | 383 | } |
| 384 | 384 | |
| 385 | | switch (Units::CoordinateFormat) { |
| | 385 | switch (Units::GetCoordinateFormat()) { |
| 386 | 386 | case 0: // ("DDMMSS"); |
| 387 | 387 | case 1: // ("DDMMSS.ss"); |
-
|
rdb32436
|
r26fd24
|
|
| 182 | 182 | Temp = 0; |
| 183 | 183 | GetFromRegistryD(szRegistryLatLonUnits, Temp); |
| 184 | | Units::CoordinateFormat = (CoordinateFormats_t)Temp; |
| | 184 | Units::SetCoordinateFormat((CoordinateFormats_t)Temp); |
| 185 | 185 | |
| 186 | 186 | GetFromRegistryD(szRegistrySpeedUnitsValue, Speed); |
-
|
rf84f92
|
r26fd24
|
|
| 297 | 297 | // so don't need different names in different languages. |
| 298 | 298 | return UnitDescriptors[Unit].Name; |
| | 299 | } |
| | 300 | |
| | 301 | CoordinateFormats_t |
| | 302 | Units::GetCoordinateFormat() |
| | 303 | { |
| | 304 | return CoordinateFormat; |
| | 305 | } |
| | 306 | |
| | 307 | CoordinateFormats_t |
| | 308 | Units::SetCoordinateFormat(CoordinateFormats_t NewFormat) |
| | 309 | { |
| | 310 | CoordinateFormats_t last = CoordinateFormat; |
| | 311 | if (CoordinateFormat != NewFormat) |
| | 312 | CoordinateFormat = NewFormat; |
| | 313 | return last; |
| 299 | 314 | } |
| 300 | 315 | |
-
|
rf8b0e4
|
r26fd24
|
|
| 115 | 115 | |
| 116 | 116 | /** |
| | 117 | * Returns the user-specified coordinate format |
| | 118 | * @return The user-specified coordinate format |
| | 119 | */ |
| | 120 | static CoordinateFormats_t GetCoordinateFormat(void); |
| | 121 | /** |
| | 122 | * Sets the user-specified coordinate format |
| | 123 | * @param NewUnit The new coordinate format |
| | 124 | * @return The old coordinate format |
| | 125 | */ |
| | 126 | static CoordinateFormats_t SetCoordinateFormat(CoordinateFormats_t NewFormat); |
| | 127 | |
| | 128 | /** |
| 117 | 129 | * Returns the user-specified unit for a horizontal distance |
| 118 | 130 | * @return The user-specified unit for a horizontal distance |