MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / CurrentSelection

Method CurrentSelection

lib/utils/source-selection.cpp:132–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132SourceSelection SourceSelectionWidget::CurrentSelection()
133{
134 SourceSelection s;
135 const int idx = currentIndex();
136 const auto name = currentText();
137 if (idx == -1 || name.isEmpty()) {
138 return s;
139 }
140
141 if (idx < _variablesEndIdx) {
142 s._type = SourceSelection::Type::VARIABLE;
143 s._variable = GetWeakVariableByQString(name);
144 } else if (idx < _sourcesEndIdx) {
145 s._type = SourceSelection::Type::SOURCE;
146 s._source = GetWeakSourceByQString(name);
147 }
148 return s;
149}
150
151void SourceSelectionWidget::Reset()
152{

Callers

nothing calls this directly

Calls 2

GetWeakVariableByQStringFunction · 0.85
GetWeakSourceByQStringFunction · 0.85

Tested by

no test coverage detected