--- a/sources/coloredline.cpp Wed Jul 20 15:06:00 2016 +0300 +++ b/sources/coloredline.cpp Wed Jul 20 15:07:03 2016 +0300 @@ -50,7 +50,7 @@ void ColoredLine::finalize() { if (m_activeColor != DEFAULT) - set_color(m_activeColor, false); + setColor(m_activeColor, false); if (m_boldActive) m_data << RLINE_OFF_BOLD; @@ -60,7 +60,7 @@ // ------------------------------------------------------------------------------------------------- // -void ColoredLine::add_char(char ch) +void ColoredLine::addChar(char ch) { static const ColorCodeInfo colorCodes[] = { @@ -100,7 +100,7 @@ if (m_colorCodeStage == 1) { if (m_activeColor != DEFAULT) - set_color(m_activeColor, false); + setColor(m_activeColor, false); if (m_boldActive) m_data << RLINE_OFF_BOLD; @@ -114,7 +114,7 @@ if (ch >= 'a' and ch <= 'v' and ch != 'l') { const ColorCodeInfo& colorInfo = colorCodes[ch - 'a']; - activate_color(colorInfo.color, colorInfo.bold); + activateColor(colorInfo.color, colorInfo.bold); } if (ch == '[') @@ -133,7 +133,7 @@ { if (String(colorInfo.name).to_lowercase() == color) { - activate_color(colorInfo.color, colorInfo.bold); + activateColor(colorInfo.color, colorInfo.bold); m_colorCodeStage = 0; break; } @@ -158,7 +158,7 @@ // ------------------------------------------------------------------------------------------------- // -void ColoredLine::activate_color(Color color, bool bold) +void ColoredLine::activateColor(Color color, bool bold) { if (m_boldActive) m_data << RLINE_OFF_BOLD; @@ -166,7 +166,7 @@ m_activeColor = color; m_boldActive = bold; assert(m_activeColor < 8); - set_color(m_activeColor, true); + setColor(m_activeColor, true); if (m_boldActive) m_data << RLINE_ON_BOLD; @@ -174,15 +174,15 @@ // ------------------------------------------------------------------------------------------------- // -void ColoredLine::add_string(const String& text) +void ColoredLine::addString(const String& text) { for (char a : text) - add_char(a); + addChar(a); } // ------------------------------------------------------------------------------------------------- // -void ColoredLine::set_color(Color a, bool on) +void ColoredLine::setColor(Color a, bool on) { assert(a < 8); m_data << (a +(on ? RLINE_ON_COLOR : RLINE_OFF_COLOR));