| 210 | } |
| 211 | |
| 212 | void 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 | |
| 235 | void MacroTreeItem::MacroRenamed(const QString &oldName, const QString &newName) |
| 236 | { |
nothing calls this directly
no test coverage detected