From 75f58d8563fe166d7edb1488dc8bb416fa92f548 Mon Sep 17 00:00:00 2001 From: ExMix Date: Sun, 29 Mar 2015 10:15:51 +0300 Subject: [PATCH] [drape] remove old code --- iphone/Maps/Classes/MapViewController.mm | 1 - map/framework.cpp | 21 +++------------------ map/framework.hpp | 23 ----------------------- map/information_display.cpp | 20 -------------------- map/information_display.hpp | 5 ----- map/map.pro | 2 -- 6 files changed, 3 insertions(+), 69 deletions(-) diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm index a00e9dc67c..947fe8f7b7 100644 --- a/iphone/Maps/Classes/MapViewController.mm +++ b/iphone/Maps/Classes/MapViewController.mm @@ -22,7 +22,6 @@ #include "anim/controller.hpp" #include "../Statistics/Statistics.h" -#include "map/country_status_display.hpp" #include "map/user_mark.hpp" #include "platform/file_logging.hpp" diff --git a/map/framework.cpp b/map/framework.cpp index 717c9205ae..85ae620caa 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -160,21 +160,6 @@ InformationDisplay & Framework::GetInformationDisplay() return m_informationDisplay; } -CountryStatusDisplay * Framework::GetCountryStatusDisplay() const -{ - return m_informationDisplay.countryStatusDisplay().get(); -} - -void Framework::SetWidgetPivot(InformationDisplay::WidgetType widget, m2::PointD const & pivot) -{ - m_informationDisplay.SetWidgetPivot(widget, pivot); -} - -m2::PointD Framework::GetWidgetSize(InformationDisplay::WidgetType widget) const -{ - return m_informationDisplay.GetWidgetSize(widget); -} - Framework::Framework() : m_animator(this), m_queryMaxScaleMode(false), @@ -204,7 +189,7 @@ Framework::Framework() // @TODO. There are hardcoded strings below which are defined in strings.txt as well. // It's better to use strings form strings.txt intead of hardcoding them here. m_stringsBundle.SetDefaultString("country_status_added_to_queue", "^\nis added to the downloading queue"); - m_stringsBundle.SetDefaultString("country_status_downloading", "Downloading\n^\n^%"); + m_stringsBundle.SetDefaultString("country_status_downloading", "Downloading\n^\n^"); m_stringsBundle.SetDefaultString("country_status_download", "Download map\n^ ^"); m_stringsBundle.SetDefaultString("country_status_download_failed", "Downloading\n^\nhas failed"); m_stringsBundle.SetDefaultString("country_status_download_without_routing", "Download map\nwithout routing (^ ^)"); @@ -469,14 +454,14 @@ void Framework::RegisterAllMaps() minFormat = min(minFormat, static_cast(id.GetInfo()->m_version.format)); } - m_countryTree.Init(maps); + m_activeMaps->Init(maps); m_searchEngine->SupportOldFormat(minFormat < version::v3); } void Framework::DeregisterAllMaps() { - m_countryTree.Clear(); + m_activeMaps->Clear(); m_model.Clear(); m_storage.Clear(); } diff --git a/map/framework.hpp b/map/framework.hpp index 566d7b998d..6dd6dad4cf 100644 --- a/map/framework.hpp +++ b/map/framework.hpp @@ -59,8 +59,6 @@ class CountryInfoGetter; namespace anim { class Controller; } namespace routing { namespace turns{ class Settings; } } -class CountryStatusDisplay; - /// Uncomment line to make fixed position settings and /// build version for screenshots. //#define FIXED_LOCATION @@ -256,27 +254,6 @@ public: MapStyle GetMapStyle() const; InformationDisplay & GetInformationDisplay(); - CountryStatusDisplay * GetCountryStatusDisplay() const; - ScalesProcessor & GetScalesProcessor() { return m_scales; } - - /*! - * \brief SetWidgetPivot() places widgets on the screen. - * \param widget is a widget ID. - * \param pivot is a pivot point of a widget in framebuffer coordinates. - * That means pivot points are measured in pixels. - * \note The default pivot points of the widgets on the map are set by - * InformationDisplay::SetWidgetPivotsByDefault() method. If you decide - * to change the default behavior by calling the method - * you should take into account that SetWidgetPivot() shall be called: - * - on the start of the program; - * - when the screen orientation is changed; - * - when the screen size is changed; - * A caller of Framework::OnSize() is a good place for it. - * \note SetWidgetPivot() shall be called only after RenderPolicy is created - * and set to the Framework. - */ - void SetWidgetPivot(InformationDisplay::WidgetType widget, m2::PointD const & pivot); - m2::PointD GetWidgetSize(InformationDisplay::WidgetType widget) const; void PrepareToShutdown(); diff --git a/map/information_display.cpp b/map/information_display.cpp index 876303bf82..50360f37a7 100644 --- a/map/information_display.cpp +++ b/map/information_display.cpp @@ -1,5 +1,4 @@ #include "map/information_display.hpp" -#include "map/country_status_display.hpp" #include "map/compass_arrow.hpp" #include "map/framework.hpp" #include "map/alfa_animation_task.hpp" @@ -33,7 +32,6 @@ InformationDisplay::InformationDisplay(Framework * fw) //m_fontDesc.m_color = Color(0x4D, 0x4D, 0x4D, 0xCC); InitRuler(fw); - InitCountryStatusDisplay(fw); InitCompassArrow(fw); InitLocationState(fw); InitDebugLabel(); @@ -59,18 +57,6 @@ void InformationDisplay::InitRuler(Framework * fw) // m_ruler->setIsVisible(false); } -void InformationDisplay::InitCountryStatusDisplay(Framework * fw) -{ - ///@TODO UVR -// CountryStatusDisplay::Params p(fw->GetCountryTree().GetActiveMapLayout()); - -// p.m_pivot = m2::PointD(0, 0); -// p.m_position = EPosCenter; -// p.m_depth = countryStatusDepth; - -// m_countryStatusDisplay.reset(new CountryStatusDisplay(p)); -} - void InformationDisplay::InitCopyright(Framework * fw) { ///@TODO UVR @@ -269,12 +255,6 @@ void InformationDisplay::setEmptyCountryIndex(storage::TIndex const & idx) //m_countryStatusDisplay->SetCountryIndex(idx); } -shared_ptr const & InformationDisplay::countryStatusDisplay() const -{ - ///@TODO UVR - return nullptr;//m_countryStatusDisplay; -} - shared_ptr const & InformationDisplay::locationState() const { ///@TODO UVR diff --git a/map/information_display.hpp b/map/information_display.hpp index da3ec8f20e..2471da01b4 100644 --- a/map/information_display.hpp +++ b/map/information_display.hpp @@ -16,7 +16,6 @@ namespace location } class Framework; -class CountryStatusDisplay; class CompassArrow; class Ruler; @@ -32,7 +31,6 @@ class InformationDisplay ///@TODO UVR //gui::Controller * m_controller; - shared_ptr m_countryStatusDisplay; shared_ptr m_compassArrow; shared_ptr m_locationState; ///@TODO UVR @@ -43,7 +41,6 @@ class InformationDisplay void InitDebugLabel(); void InitLocationState(Framework * fw); void InitCompassArrow(Framework * fw); - void InitCountryStatusDisplay(Framework * fw); void InitCopyright(Framework * fw); @@ -81,8 +78,6 @@ public: void setEmptyCountryIndex(storage::TIndex const & idx); - shared_ptr const & countryStatusDisplay() const; - void ResetRouteMatchingInfo(); void SetWidgetPivot(WidgetType widget, m2::PointD const & pivot); diff --git a/map/map.pro b/map/map.pro index b43cc4779a..3ac3649998 100644 --- a/map/map.pro +++ b/map/map.pro @@ -19,7 +19,6 @@ HEADERS += \ bookmark_manager.hpp \ change_viewport_task.hpp \ compass_arrow.hpp \ - country_status_display.hpp \ country_tree.hpp \ feature_vec_model.hpp \ framework.hpp \ @@ -48,7 +47,6 @@ SOURCES += \ bookmark_manager.cpp \ change_viewport_task.cpp \ compass_arrow.cpp \ - country_status_display.cpp \ country_tree.cpp \ feature_vec_model.cpp \ framework.cpp \