| 244 | } |
| 245 | |
| 246 | std::string CheckForCorrectHex(const std::string &colorName) |
| 247 | { |
| 248 | std::regex rgx("([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})"); |
| 249 | std::smatch match; |
| 250 | |
| 251 | if (!colorName.empty() && colorName.at(0) != '#' && std::regex_search(colorName.begin(), colorName.end(), match, rgx)) |
| 252 | { |
| 253 | return "#" + colorName; |
| 254 | } |
| 255 | else |
| 256 | { |
| 257 | return colorName; |
| 258 | } |
| 259 | } |
| 260 | |
| 261 | void QmitkChartWidget::Impl::GetImageUrl() |
| 262 | { |