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

Method UpdateRunning

lib/macro/macro-tree.cpp:179–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177}
178
179void MacroTreeItem::UpdateRunning()
180{
181 const QSignalBlocker blocker(_running);
182
183 if (!_macro->IsGroup()) {
184 _running->setChecked(!_macro->Paused());
185 return;
186 }
187
188 const auto macros = GetGroupMacroEntries(_macro.get());
189 bool allRunning = true;
190 bool allPaused = true;
191 for (const auto &macro : macros) {
192 if (macro->Paused()) {
193 allRunning = false;
194 } else {
195 allPaused = false;
196 }
197 }
198
199 if (allRunning) {
200 _running->setCheckState(Qt::Checked);
201 return;
202 }
203
204 if (allPaused) {
205 _running->setCheckState(Qt::Unchecked);
206 return;
207 }
208
209 _running->setCheckState(Qt::PartiallyChecked);
210}
211
212void MacroTreeItem::HighlightIfExecuted()
213{

Callers 1

RunningClickedMethod · 0.80

Calls 5

GetGroupMacroEntriesFunction · 0.85
IsGroupMethod · 0.80
setCheckedMethod · 0.80
PausedMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected