Logo Search packages:      
Sourcecode: qelectrotech version File versions  Download package

ProjectView * QETDiagramEditor::viewForFile ( const QString &  filepath  )  const

Parameters:
filepath Un chemin de fichier Note : si filepath est une chaine vide, cette methode retourne 0.
Returns:
le ProjectView editant le fichier filepath, ou 0 si ce fichier n'est pas edite par cet editeur de schemas.

Definition at line 1265 of file qetdiagrameditor.cpp.

References openedProjects().

Referenced by openAndAddProject().

                                                                        {
      if (filepath.isEmpty()) return(0);
      
      QString searched_can_file_path = QFileInfo(filepath).canonicalFilePath();
      foreach (ProjectView *project_view, openedProjects()) {
            QString project_can_file_path = QFileInfo(project_view -> project() -> filePath()).canonicalFilePath();
            if (project_can_file_path == searched_can_file_path) {
                  return(project_view);
            }
      }
      return(0);
}


Generated by  Doxygen 1.6.0   Back to index