Пример #1
0
void ProjectDirModel::refresh(const QModelIndex &index) {
  if (!index.isValid()) return;
  DvDirModelNode *node = getNode(index);
  if (!node) return;
  emit layoutAboutToBeChanged();
  emit beginRemoveRows(index, 0, node->getChildCount());
  node->refreshChildren();
  emit endRemoveRows();
  emit layoutChanged();
}
void ExportSceneDvDirModel::refresh(const QModelIndex &index)
{
	DvDirModelNode *node;
	if (!index.isValid())
		node = m_root;
	else
		node = getNode(index);
	if (!node)
		return;
	emit layoutAboutToBeChanged();
	emit beginRemoveRows(index, 0, node->getChildCount());
	node->refreshChildren();
	emit endRemoveRows();
	emit layoutChanged();
}