| 209 | } |
| 210 | |
| 211 | QList<TutorialBuilder::ChapterInstructions *> TutorialBuilder::getChapterInstructionFromName(const QString &name) |
| 212 | { |
| 213 | QList<TutorialBuilder::ChapterInstructions *> result; |
| 214 | for(auto &chapter : m_chapters) { |
| 215 | const QList<QString> keys = chapter->widgets.keys(); |
| 216 | for(const auto &itemName : keys) { |
| 217 | if(itemName == name) { |
| 218 | result.push_back(chapter); |
| 219 | } |
| 220 | } |
| 221 | } |
| 222 | |
| 223 | if(result.isEmpty()) { |
| 224 | throw std::runtime_error("No ChapterInstructions that need this name were found."); |
| 225 | } else { |
| 226 | return result; |
| 227 | } |
| 228 | } |
| 229 | |
| 230 | scopy::HoverPosition TutorialBuilder::convertStringToHoverPosition(const QString &position) noexcept |
| 231 | { |