Manager: Warn on close when machines are running

This commit is contained in:
Alexander Babikov
2025-07-29 05:39:43 +05:00
parent 1d421b4db0
commit 2657a5bade
5 changed files with 29 additions and 0 deletions

View File

@@ -160,4 +160,15 @@ VMManagerModel::getProcessStats()
}
}
return stats;
}
int
VMManagerModel::getActiveMachineCount()
{
int running = 0;
for (const auto& system: machines) {
if (system->getProcessStatus() != VMManagerSystem::ProcessStatus::Stopped)
running++;
}
return running;
}