MCPcopy Create free account
hub / github.com/KangLin/RabbitRemoteControl / slotAddToFavorite

Method slotAddToFavorite

App/Client/FrmActive.cpp:243–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241}
242
243void CFrmActive::slotAddToFavorite()
244{
245 QItemSelectionModel* pSelect = m_pTableView->selectionModel();
246 QModelIndexList lstIndex = pSelect->selectedRows();
247 foreach(auto index, lstIndex)
248 {
249 if(!index.isValid()) continue;
250 QVariant v = m_pModel->item(index.row(), m_nId)->data();
251 COperate* c = v.value<COperate*>();
252 if(!c) continue;
253 QString szName = c->Name();
254 QIcon icon = c->Icon();
255 QString szDescription = c->Description();
256 QString szFile = c->GetSettingsFile();
257 emit sigAddToFavorite(szFile, szName, szDescription, icon);
258 }
259}

Callers 1

foreachFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected