From 6683d42b636619e02e2bcf98923a2fdbf44bd95b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 31 May 2015 17:07:13 +0300 Subject: Move functions getColor, getIdByChar from palette to theme and userpalette. --- src/gui/userpalette.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/gui/userpalette.cpp') diff --git a/src/gui/userpalette.cpp b/src/gui/userpalette.cpp index d0e6c2c9a..629caca73 100644 --- a/src/gui/userpalette.cpp +++ b/src/gui/userpalette.cpp @@ -371,3 +371,16 @@ void UserPalette::addColor(const unsigned type, if (grad != GradientType::STATIC) mGradVector.push_back(&mColors[type]); } + +int UserPalette::getIdByChar(const signed char c, bool &valid) const +{ + const CharColors::const_iterator it = mCharColors.find(c); + if (it != mCharColors.end()) + { + valid = true; + return (*it).second; + } + + valid = false; + return 0; +} -- cgit v1.2.3-60-g2f50