void ProjectDvDirModelRootNode::refreshChildren() {
  m_childrenValid = true;
  if (m_children.empty()) {
    TProjectManager *pm = TProjectManager::instance();
    std::vector<TFilePath> projectRoots;
    pm->getProjectRoots(projectRoots);

    int i;
    for (i = 0; i < (int)projectRoots.size(); i++) {
      TFilePath projectRoot = projectRoots[i];
      std::wstring rootDir  = projectRoot.getWideString();
      ProjectDvDirModelSpecialFileFolderNode *projectRootNode =
          new ProjectDvDirModelSpecialFileFolderNode(
              this, L"Project root (" + rootDir + L")", projectRoot);
      projectRootNode->setPixmap(svgToPixmap(":Resources/projects.svg"));
      addChild(projectRootNode);
    }

    // SVN Repository
    QList<SVNRepository> repositories =
        VersionControl::instance()->getRepositories();
    int count = repositories.size();
    for (int i = 0; i < count; i++) {
      SVNRepository repo = repositories.at(i);

      ProjectDvDirModelSpecialFileFolderNode *node =
          new ProjectDvDirModelSpecialFileFolderNode(
              this, repo.m_name.toStdWString(),
              TFilePath(repo.m_localPath.toStdWString()));
      node->setPixmap(svgToPixmap(":Resources/vcroot.svg"));
      addChild(node);
    }
  }
}
void ExportSceneDvDirModelRootNode::refreshChildren()
{
	m_childrenValid = true;
	m_children.clear();
	//if(m_children.empty())
	//{
	TProjectManager *pm = TProjectManager::instance();
	std::vector<TFilePath> projectRoots;
	pm->getProjectRoots(projectRoots);

	int i;
	for (i = 0; i < (int)projectRoots.size(); i++) {
		TFilePath projectRoot = projectRoots[i];
		ExportSceneDvDirModelSpecialFileFolderNode *projectRootNode =
			new ExportSceneDvDirModelSpecialFileFolderNode(this, L"Project root", projectRoot);
		projectRootNode->setPixmap(QPixmap(":Resources/projects.png"));
		m_projectRootNodes.push_back(projectRootNode);
		addChild(projectRootNode);
	}

	TFilePath sandboxProjectPath = pm->getSandboxProjectFolder();
	m_sandboxProjectNode =
		new ExportSceneDvDirModelProjectNode(this, sandboxProjectPath);
	addChild(m_sandboxProjectNode);

	// SVN Repository
	QList<SVNRepository> repositories = VersionControl::instance()->getRepositories();
	int count = repositories.size();
	for (int i = 0; i < count; i++) {
		SVNRepository repo = repositories.at(i);

		ExportSceneDvDirModelSpecialFileFolderNode *node =
			new ExportSceneDvDirModelSpecialFileFolderNode(this, repo.m_name.toStdWString(), TFilePath(repo.m_localPath.toStdWString()));
		node->setPixmap(QPixmap(":Resources/vcroot.png"));
		addChild(node);
	}
	//}
}