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

Method slotRefresh

App/Client/Recent/FrmRecent.cpp:240–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

238}
239
240void CFrmRecent::slotRefresh()
241{
242 if(!m_pModel) return;
243 m_pModel->refresh(m_ParameterApp.GetRecentMenuMaxCount() << 1);
244
245 //以下设置列宽函数必须要数据加载完成后使用,才能应用
246 //See: https://blog.csdn.net/qq_40450386/article/details/86083759
247 m_pTableView->resizeColumnsToContents(); //设置所有列宽度自适应内容
248
249 QItemSelectionModel* pSelect = m_pTableView->selectionModel();
250 QModelIndexList lstIndex;
251 if(pSelect)
252 lstIndex = pSelect->selectedRows();
253 if(m_pModel->rowCount() > 0 && lstIndex.isEmpty())
254 {
255 m_pTableView->selectRow(0);
256 }
257 return;
258}
259
260int CFrmRecent::InsertItem(COperate *c, QString& szFile)
261{

Callers

nothing calls this directly

Calls 4

GetRecentMenuMaxCountMethod · 0.80
refreshMethod · 0.45
rowCountMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected