forked from organicmaps/organicmaps
GetBookmark returns pointer to non constant bookmark.
Setter for bookmark's name and type.
This commit is contained in:
parent
fbf3fcf205
commit
b28e16a20f
6 changed files with 20 additions and 0 deletions
|
@ -75,6 +75,11 @@ Bookmark const * BookmarkCategory::GetBookmark(size_t index) const
|
|||
return (index < m_bookmarks.size() ? m_bookmarks[index] : 0);
|
||||
}
|
||||
|
||||
Bookmark * BookmarkCategory::GetBookmark(size_t index)
|
||||
{
|
||||
return (index < m_bookmarks.size() ? m_bookmarks[index] : 0);
|
||||
}
|
||||
|
||||
int BookmarkCategory::GetBookmark(m2::PointD const org, double const squareDistance) const
|
||||
{
|
||||
for (size_t i = 0; i < m_bookmarks.size(); ++i)
|
||||
|
|
|
@ -30,8 +30,10 @@ public:
|
|||
|
||||
m2::PointD const & GetOrg() const { return m_org; }
|
||||
string const & GetName() const { return m_name; }
|
||||
void SetName(string const & name) { m_name = name; }
|
||||
/// @return Now its a bookmark color - name of icon file
|
||||
string const & GetType() const { return m_type; }
|
||||
void SetType(string const & type) { m_type = type; }
|
||||
m2::RectD GetViewport() const { return m2::RectD(m_org, m_org); }
|
||||
|
||||
string const & GetDescription() const { return m_description; }
|
||||
|
@ -84,6 +86,7 @@ public:
|
|||
inline size_t GetBookmarksCount() const { return m_bookmarks.size(); }
|
||||
|
||||
Bookmark const * GetBookmark(size_t index) const;
|
||||
Bookmark * GetBookmark(size_t index);
|
||||
/// @param[in] distance in metres between orgs
|
||||
/// @returns -1 or index of found bookmark
|
||||
int GetBookmark(m2::PointD const org, double const squareDistance) const;
|
||||
|
|
|
@ -173,6 +173,11 @@ Bookmark const * BookmarkManager::AdditionalPoiLayerGetBookmark(size_t index) co
|
|||
return m_additionalPoiLayer->GetBookmark(index);
|
||||
}
|
||||
|
||||
Bookmark * BookmarkManager::AdditionalPoiLayerGetBookmark(size_t index)
|
||||
{
|
||||
return m_additionalPoiLayer->GetBookmark(index);
|
||||
}
|
||||
|
||||
void BookmarkManager::AdditionalPoiLayerDeleteBookmark(int index)
|
||||
{
|
||||
m_additionalPoiLayer->DeleteBookmark(index);
|
||||
|
|
|
@ -50,6 +50,7 @@ public:
|
|||
void AdditionalPoiLayerSetVisible();
|
||||
void AdditionalPoiLayerAddPoi(Bookmark const & bm);
|
||||
Bookmark const * AdditionalPoiLayerGetBookmark(size_t index) const;
|
||||
Bookmark * AdditionalPoiLayerGetBookmark(size_t index);
|
||||
void AdditionalPoiLayerDeleteBookmark(int index);
|
||||
void AdditionalPoiLayerClear();
|
||||
bool IsAdditionalLayerPoi(const BookmarkAndCategory & bm) const;
|
||||
|
|
|
@ -598,6 +598,11 @@ Bookmark const * Framework::AdditionalPoiLayerGetBookmark(size_t index) const
|
|||
return m_bmManager.AdditionalPoiLayerGetBookmark(index);
|
||||
}
|
||||
|
||||
Bookmark * Framework::AdditionalPoiLayerGetBookmark(size_t index)
|
||||
{
|
||||
return m_bmManager.AdditionalPoiLayerGetBookmark(index);
|
||||
}
|
||||
|
||||
void Framework::AdditionalPoiLayerDeleteBookmark(int index)
|
||||
{
|
||||
m_bmManager.AdditionalPoiLayerDeleteBookmark(index);
|
||||
|
|
|
@ -207,6 +207,7 @@ public:
|
|||
void AdditionalPoiLayerSetVisible();
|
||||
void AdditionalPoiLayerAddPoi(Bookmark const & bm);
|
||||
Bookmark const * AdditionalPoiLayerGetBookmark(size_t index) const;
|
||||
Bookmark * AdditionalPoiLayerGetBookmark(size_t index);
|
||||
void AdditionalPoiLayerDeleteBookmark(int index);
|
||||
void AdditionalPoiLayerClear();
|
||||
bool IsAdditionalLayerPoi(const BookmarkAndCategory & bm) const;
|
||||
|
|
Loading…
Add table
Reference in a new issue