diff options
author | rachytski <siarhei.rachytski@gmail.com> | 2011-10-06 14:13:07 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:25:26 +0300 |
commit | 04e1ccbbfc4e2a4b14953fb2e538273d28d4f6c0 (patch) | |
tree | ec75009ed70296142e00d42cf7ed4c558eaa7a94 /map/ruler.hpp | |
parent | 1e096fec117b2c6171d84d74d6a0ac482b4b75c7 (diff) |
added support of Feet/Miles and Yard/Miles to Ruler.
Diffstat (limited to 'map/ruler.hpp')
-rw-r--r-- | map/ruler.hpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/map/ruler.hpp b/map/ruler.hpp index c04da25ced..0d5aaf905a 100644 --- a/map/ruler.hpp +++ b/map/ruler.hpp @@ -31,7 +31,7 @@ private: yg::FontDesc m_fontDesc; ScreenBase m_screen; - float m_unitsDiff; //< current diff in units between two endpoints of the ruler. + float m_metresDiff; //< current diff in units between two endpoints of the ruler. string m_scalerText; vector<m2::PointD> m_path; @@ -43,6 +43,18 @@ private: mutable vector<m2::AnyRectD> m_boundRects; + typedef double (*ConversionFn)(double); + vector<pair<string, double> > * m_units; + ConversionFn m_conversionFn; + + vector<pair<string, double> > m_yards; + vector<pair<string, double> > m_feets; + vector<pair<string, double> > m_metres; + + void initYards(); + void initMetres(); + void initFeets(); + public: void update(); //< update internal params after some other params changed. |