The inverse functio to get a QPen from the string
| 53 | |
| 54 | // The inverse functio to get a QPen from the string |
| 55 | LineDrawStyle convertStringToPen(const QString &str) |
| 56 | { |
| 57 | LineDrawStyle style; |
| 58 | QStringList split = str.split(" "); |
| 59 | if (split.length() == 3) |
| 60 | { |
| 61 | style.color = Color(split[0].toStdString()); |
| 62 | style.width = split[1].toDouble(); |
| 63 | auto patternIdx = split[2].toInt(); |
| 64 | if (patternIdx >= 0 && unsigned(patternIdx) < AllPatterns.size()) |
| 65 | style.pattern = AllPatterns[patternIdx]; |
| 66 | } |
| 67 | return style; |
| 68 | } |
| 69 | |
| 70 | std::vector<StatisticsType::ArrowHead> AllArrowHeads = {StatisticsType::ArrowHead::arrow, |
| 71 | StatisticsType::ArrowHead::circle, |
no test coverage detected