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

Method HighlightIfExecuted

lib/macro/macro-tree.cpp:212–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210}
211
212void MacroTreeItem::HighlightIfExecuted()
213{
214 if (!_highlight || !_macro) {
215 return;
216 }
217
218 bool wasHighlighted = false;
219 if (_lastHighlightCheckTime.time_since_epoch().count() != 0 &&
220 _macro->WasExecutedSince(_lastHighlightCheckTime)) {
221 HighlightWidget(this, Qt::green, QColor(0, 0, 0, 0), true);
222 wasHighlighted = true;
223 }
224
225 if (!wasHighlighted &&
226 _lastHighlightCheckTime.time_since_epoch().count() != 0 &&
227 _macro->ActionTriggerModePreventedActionsSince(
228 _lastHighlightCheckTime)) {
229 HighlightWidget(this, Qt::yellow, QColor(0, 0, 0, 0), true);
230 }
231
232 _lastHighlightCheckTime = std::chrono::high_resolution_clock::now();
233}
234
235void MacroTreeItem::MacroRenamed(const QString &oldName, const QString &newName)
236{

Callers

nothing calls this directly

Calls 5

nowClass · 0.85
countMethod · 0.80
WasExecutedSinceMethod · 0.80
HighlightWidgetFunction · 0.50

Tested by

no test coverage detected