| 202 | m_pModel->removeRows(0, m_pModel->rowCount()); |
| 203 | m_pAddToFavorite->setEnabled(m_Operates.size() > 0); |
| 204 | foreach(auto c, m_Operates) { |
| 205 | QList<QStandardItem*> lstItem; |
| 206 | QStandardItem* pName = new QStandardItem(c->Icon(), c->Name()); |
| 207 | pName->setToolTip(c->Description()); |
| 208 | lstItem << pName; |
| 209 | QStandardItem* pProtocol = new QStandardItem(c->Protocol()); |
| 210 | lstItem << pProtocol; |
| 211 | QStandardItem* pType = new QStandardItem(c->GetTypeName()); |
| 212 | lstItem << pType; |
| 213 | QStandardItem* pId = new QStandardItem(c->Id()); |
| 214 | QVariant v; |
| 215 | v.setValue(c); |
| 216 | pId->setData(v); |
| 217 | lstItem << pId; |
| 218 | m_pModel->appendRow(lstItem); |
| 219 | } |
| 220 | |
| 221 | //以下设置列宽函数必须要数据加载完成后使用,才能应用 |
| 222 | //See: https://blog.csdn.net/qq_40450386/article/details/86083759 |
nothing calls this directly
no test coverage detected