MCPcopy Create free account
hub / github.com/RGAA-Software/GoDesk / UpdateRunningStatus

Method UpdateRunningStatus

src/render_panel/ui/tab_game.cpp:383–398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

381 }
382
383 void TabGame::UpdateRunningStatus(const std::vector<uint64_t>& game_ids) {
384 this->VisitListWidget([=, this](QListWidgetItem* item, QWidget* item_widget) {
385 auto cover_widget = item_widget->findChild<CoverWidget*>("cover_mask");
386 cover_widget->SetRunningStatus(false);
387 });
388 this->VisitListWidget([=, this](QListWidgetItem* item, QWidget* item_widget) {
389 auto cover_widget = item_widget->findChild<CoverWidget*>("cover_mask");
390 auto game_id = item_widget->objectName().toStdString();
391 for (auto rgid : game_ids) {
392 if (std::to_string(rgid) == game_id) {
393 //LOGI("running game id: {}", rgid);
394 cover_widget->SetRunningStatus(true);
395 }
396 }
397 });
398 }
399
400 void TabGame::VisitListWidget(std::function<void(QListWidgetItem* item, QWidget* item_widget)>&& cbk) {
401 auto item_counts = list_widget_->count();

Callers 1

TabGameMethod · 0.95

Calls 2

VisitListWidgetMethod · 0.95
to_stringFunction · 0.85

Tested by

no test coverage detected