[booking] Add possibility to specify additional textual price value for Booking searchmarks MAPSME-14321

This commit is contained in:
Anatoliy Tomilov 2020-07-14 00:09:39 +05:00 committed by Arsentiy Milchakov
parent e545bd0a6f
commit df2fdad57a
2 changed files with 14 additions and 0 deletions

View file

@ -422,6 +422,13 @@ drape_ptr<df::UserPointMark::TitlesInfo> SearchMarkPoint::GetTitleDecl() const
else
{
titles->push_back(m_titleDecl);
if (!m_price.empty())
{
auto priceDecl = m_titleDecl;
priceDecl.m_primaryText = m_price;
priceDecl.m_anchor = dp::Anchor::Left;
titles->push_back(priceDecl);
}
}
return titles;
}
@ -485,6 +492,11 @@ void SearchMarkPoint::SetPricing(int pricing)
SetAttributeValue(m_pricing, pricing);
}
void SearchMarkPoint::SetPrice(std::string const & price)
{
SetAttributeValue(m_price, price);
}
void SearchMarkPoint::SetSale(bool hasSale)
{
SetAttributeValue(m_hasSale, hasSale);

View file

@ -46,6 +46,7 @@ public:
void SetPreparing(bool isPreparing);
void SetRating(float rating);
void SetPricing(int pricing);
void SetPrice(std::string const & price);
void SetSale(bool hasSale);
protected:
@ -71,6 +72,7 @@ protected:
bool m_isPreparing = false;
float m_rating = 0.0f;
int m_pricing = 0;
std::string m_price;
bool m_hasSale = false;
dp::TitleDecl m_titleDecl;
dp::TitleDecl m_ugcTitleDecl;