Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorr.kuznetsov <r.kuznetsov@corp.mail.ru>2016-04-13 14:56:28 +0300
committerr.kuznetsov <r.kuznetsov@corp.mail.ru>2016-04-13 18:36:17 +0300
commitc1d1942f4d4e182e1c9a388dc1163bf66a354079 (patch)
tree5ab33d3fe0856f1e176ddd18bd3fab8a51b1a943 /platform
parent047ebf3c4a6eb7e0a5f6fcf67389bffa126c02d8 (diff)
Redone my position
Diffstat (limited to 'platform')
-rw-r--r--platform/location.hpp13
-rw-r--r--platform/settings.cpp28
2 files changed, 20 insertions, 21 deletions
diff --git a/platform/location.hpp b/platform/location.hpp
index f068b213e7..38b5b4fe66 100644
--- a/platform/location.hpp
+++ b/platform/location.hpp
@@ -232,16 +232,15 @@ namespace location
double GetDistanceFromBegin() const { return m_distanceFromBegin; }
};
- // Do not change the order and values
enum EMyPositionMode
{
- MODE_UNKNOWN_POSITION = 0x0,
- MODE_PENDING_POSITION = 0x1,
- MODE_NOT_FOLLOW = 0x2,
- MODE_FOLLOW = 0x3,
- MODE_ROTATE_AND_FOLLOW = 0x4,
+ PendingPosition = 0,
+ NotFollowNoPosition,
+ NotFollow,
+ Follow,
+ FollowAndRotate
};
- using TMyPositionModeChanged = function<void (location::EMyPositionMode)>;
+ using TMyPositionModeChanged = function<void (location::EMyPositionMode, bool)>;
} // namespace location
diff --git a/platform/settings.cpp b/platform/settings.cpp
index 0cb17a4f3f..9feff99bc1 100644
--- a/platform/settings.cpp
+++ b/platform/settings.cpp
@@ -392,28 +392,28 @@ string ToString<location::EMyPositionMode>(location::EMyPositionMode const & v)
{
switch (v)
{
- case location::MODE_UNKNOWN_POSITION: return "Unknown";
- case location::MODE_PENDING_POSITION: return "Pending";
- case location::MODE_NOT_FOLLOW: return "NotFollow";
- case location::MODE_FOLLOW: return "Follow";
- case location::MODE_ROTATE_AND_FOLLOW: return "RotateAndFollow";
- default: return "Unknown";
+ case location::PendingPosition: return "PendingPosition";
+ case location::NotFollow: return "NotFollow";
+ case location::NotFollowNoPosition: return "NotFollowNoPosition";
+ case location::Follow: return "Follow";
+ case location::FollowAndRotate: return "FollowAndRotate";
+ default: return "Pending";
}
}
template <>
bool FromString<location::EMyPositionMode>(string const & s, location::EMyPositionMode & v)
{
- if (s == "Unknown")
- v = location::MODE_UNKNOWN_POSITION;
- else if (s == "Pending")
- v = location::MODE_PENDING_POSITION;
+ if (s == "PendingPosition")
+ v = location::PendingPosition;
else if (s == "NotFollow")
- v = location::MODE_NOT_FOLLOW;
+ v = location::NotFollow;
+ else if (s == "NotFollowNoPosition")
+ v = location::NotFollowNoPosition;
else if (s == "Follow")
- v = location::MODE_FOLLOW;
- else if (s == "RotateAndFollow")
- v = location::MODE_ROTATE_AND_FOLLOW;
+ v = location::Follow;
+ else if (s == "FollowAndRotate")
+ v = location::FollowAndRotate;
else
return false;