mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 00:41:09 +02:00
CComponentsText: add overloaded member setText() for int vars
Origin commit data
------------------
Branch: ni/coolstream
Commit: fb64fb5d35
Author: Thilo Graf <dbt@novatux.de>
Date: 2013-04-10 (Wed, 10 Apr 2013)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -194,6 +194,7 @@ class CComponentsText : public CComponentsItem
|
||||
virtual void setText(const char* ctext, const int mode = ~CTextBox::AUTO_WIDTH, Font* font_text = NULL);
|
||||
virtual void setText(const std::string& stext, const int mode = ~CTextBox::AUTO_WIDTH, Font* font_text = NULL);
|
||||
virtual void setText(neutrino_locale_t locale_text, const int mode = ~CTextBox::AUTO_WIDTH, Font* font_text = NULL);
|
||||
virtual void setText(const int digit, const int mode = ~CTextBox::AUTO_WIDTH, Font* font_text = NULL);
|
||||
virtual void removeLineBreaks(std::string& str);
|
||||
|
||||
//get a Text Box object, so it's possible to get access directly to its methods
|
||||
|
@@ -176,6 +176,12 @@ void CComponentsText::setText(const std::string& stext, const int mode, Font* fo
|
||||
|
||||
}
|
||||
|
||||
void CComponentsText::setText(const int digit, const int mode, Font* font_text)
|
||||
{
|
||||
string s_digit = iToString(digit);
|
||||
setText(s_digit, mode, font_text);
|
||||
}
|
||||
|
||||
void CComponentsText::paintText(bool do_save_bg)
|
||||
{
|
||||
paintInit(do_save_bg);
|
||||
@@ -212,9 +218,9 @@ void CComponentsText::removeLineBreaks(std::string& str)
|
||||
//helper, converts int to string
|
||||
string CComponentsText::iToString(int int_val)
|
||||
{
|
||||
int i = int_val;
|
||||
ostringstream i_str;
|
||||
i_str << i;
|
||||
string i_string(i_str.str());
|
||||
return i_string;
|
||||
int i = int_val;
|
||||
ostringstream i_str;
|
||||
i_str << i;
|
||||
string i_string(i_str.str());
|
||||
return i_string;
|
||||
}
|
||||
|
Reference in New Issue
Block a user