From f2ca69f7766ef22de71741f2ac579093b915df33 Mon Sep 17 00:00:00 2001 From: Alex Zolotarev Date: Wed, 3 Jul 2013 20:15:37 +0300 Subject: [PATCH] Disabled coordinates on the map in the lower right corner --- map/framework.cpp | 5 ----- map/information_display.cpp | 39 ------------------------------------- map/information_display.hpp | 5 ----- 3 files changed, 49 deletions(-) diff --git a/map/framework.cpp b/map/framework.cpp index 05635ffb5f..8b205a3599 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -224,7 +224,6 @@ Framework::Framework() m_informationDisplay.enableDebugPoints(true); #endif - m_informationDisplay.enableCenter(true); m_informationDisplay.enableRuler(true); m_informationDisplay.setRulerParams(m_minRulerWidth, m_metresMinWidth, m_metresMaxWidth); @@ -823,10 +822,6 @@ void Framework::DrawAdditionalInfo(shared_ptr const & e) m_informationDisplay.setDebugInfo(0, GetDrawScale()); - m2::PointD const center = m_navigator.Screen().GlobalRect().GlobalCenter(); - m_informationDisplay.setCenter(m2::PointD(MercatorBounds::XToLon(center.x), - MercatorBounds::YToLat(center.y))); - m_informationDisplay.enableRuler(true); m_informationDisplay.doDraw(pDrawer); diff --git a/map/information_display.cpp b/map/information_display.cpp index 8318a66752..48dfede26e 100644 --- a/map/information_display.cpp +++ b/map/information_display.cpp @@ -42,12 +42,10 @@ InformationDisplay::InformationDisplay(Framework * fw) InitCountryStatusDisplay(fw); InitCompassArrow(fw); InitLocationState(fw); - InitCenterLabel(); InitDebugLabel(); enableDebugPoints(false); enableRuler(false); - enableCenter(false); enableDebugInfo(false); enableMemoryWarning(false); enableBenchmarkInfo(false); @@ -112,17 +110,6 @@ void InformationDisplay::InitLocationState(Framework * fw) m_locationState.reset(new location::State(p)); } -void InformationDisplay::InitCenterLabel() -{ - gui::CachedTextView::Params p; - - p.m_depth = graphics::rulerDepth; - p.m_position = graphics::EPosUnderLeft; - p.m_pivot = m2::PointD(0, 0); - - m_centerLabel.reset(new gui::CachedTextView(p)); -} - void InformationDisplay::InitDebugLabel() { gui::CachedTextView::Params p; @@ -141,7 +128,6 @@ void InformationDisplay::setController(gui::Controller *controller) m_controller->AddElement(m_compassArrow); m_controller->AddElement(m_locationState); m_controller->AddElement(m_ruler); - m_controller->AddElement(m_centerLabel); m_controller->AddElement(m_debugLabel); } @@ -177,11 +163,6 @@ void InformationDisplay::setDisplayRect(m2::RectI const & rect) m_ruler->setPivot(pt); - m2::PointD centerLabelPivot(m_displayRect.maxX() - 4 * m_visualScale, - m_displayRect.maxY() - 30 * m_visualScale); - - m_centerLabel->setPivot(centerLabelPivot); - m2::PointD debugLabelPivot(m_displayRect.minX() + 10, m_displayRect.minY() + 20 + 5 * m_visualScale); @@ -228,26 +209,6 @@ void InformationDisplay::setVisualScale(double visualScale) m_ruler->setFont(gui::Element::EActive, m_fontDesc); m_debugLabel->setFont(gui::Element::EActive, m_fontDesc); - m_centerLabel->setFont(gui::Element::EActive, m_fontDesc); -} - -void InformationDisplay::enableCenter(bool doEnable) -{ - m_centerLabel->setIsVisible(doEnable); -} - -void InformationDisplay::setCenter(m2::PointD const & pt) -{ - m_centerPtLonLat = pt; - - ostringstream out; - - out << fixed << setprecision(4) - << m_centerPtLonLat.y - << ", " - << m_centerPtLonLat.x; - - m_centerLabel->setText(out.str()); } void InformationDisplay::enableDebugInfo(bool doEnable) diff --git a/map/information_display.hpp b/map/information_display.hpp index ff6e287555..e274e77491 100644 --- a/map/information_display.hpp +++ b/map/information_display.hpp @@ -89,11 +89,9 @@ private: shared_ptr m_countryStatusDisplay; shared_ptr m_compassArrow; shared_ptr m_locationState; - shared_ptr m_centerLabel; shared_ptr m_debugLabel; void InitRuler(Framework * fw); - void InitCenterLabel(); void InitDebugLabel(); void InitLocationState(Framework * fw); void InitCompassArrow(Framework * fw); @@ -117,9 +115,6 @@ public: void enableRuler(bool doEnable); void setRulerParams(unsigned pxMinWidth, double metresMinWidth, double metresMaxWidth); - void enableCenter(bool doEnable); - void setCenter(m2::PointD const & latLongPt); - void enableDebugInfo(bool doEnable); void setDebugInfo(double frameDuration, int currentScale);