MCPcopy Create free account
hub / github.com/analogdevicesinc/scopy / getChapterInstructionFromName

Method getChapterInstructionFromName

gui/src/tutorialbuilder.cpp:211–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211QList<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
230scopy::HoverPosition TutorialBuilder::convertStringToHoverPosition(const QString &position) noexcept
231{

Callers 1

collectChaptersMethod · 0.95

Calls 1

keysMethod · 0.80

Tested by

no test coverage detected