# eric6.Project.Project

Module implementing the project management functionality.

### Global Attributes

None

### Classes

Project | Class implementing the project management functionality.

### Functions

None

## Project

Class implementing the project management functionality.

### Signals

completeRepopulateItem(str)
  emitted after an item of the model was repopulated
designerFile(str)
  emitted to open a found designer file
directoryRemoved(str)
  emitted after a directory has been removed from the project
dirty(int)
  emitted when the dirty state changes
lexerAssociationsChanged()
  emitted after the lexer associations have been changed
linguistFile(str)
  emitted to open a found translation file
newProject()
  emitted after a new project was generated
newProjectHooks()
  emitted after a new project was generated but before the newProject() signal is sent
prepareRepopulateItem(str)
  emitted before an item of the model is repopulated
projectAboutToBeCreated()
  emitted just before the project will be created
projectChanged()
  emitted to signal a change of the project
projectClosed()
  emitted after a project was closed
projectClosedHooks()
  emitted after a project file was closed but before the projectClosed() signal is sent
projectFileRenamed(str, str)
  emitted after a file of the project has been renamed
projectFormAdded(str)
  emitted after a new form was added
projectFormCompiled(str)
  emitted after a form was compiled
projectFormRemoved(str)
  emitted after a form was removed
projectInterfaceAdded(str)
  emitted after a new IDL file was added
projectInterfaceRemoved(str)
  emitted after a IDL file was removed
projectLanguageAdded(str)
  emitted after a new language was added
projectLanguageAddedByCode(str)
  emitted after a new language was added. The language code is sent by this signal.
projectLanguageRemoved(str)
  emitted after a language was removed
projectOpened()
  emitted after a project file was read
projectOpenedHooks()
  emitted after a project file was read but before the projectOpened() signal is sent
projectOthersAdded(str)
  emitted after a file or directory was added to the OTHERS project data area
projectOthersRemoved(str)
  emitted after a file was removed from the OTHERS project data area
projectPropertiesChanged()
  emitted after the project properties were changed
projectResourceAdded(str)
  emitted after a new resource file was added
projectResourceRemoved(str)
  emitted after a resource was removed
projectSourceAdded(str)
  emitted after a new source file was added
projectSourceRemoved(str)
  emitted after a source was removed
reinitVCS()
  emitted after the VCS has been reinitialized
showMenu(str, QMenu)
  emitted when a menu is about to be shown. The name of the menu and a reference to the menu are given.
sourceFile(str)
  emitted after a project file was read to open the main script
vcsStatusMonitorStatus(str, str)
  emitted to signal the status of the monitoring thread (ok, nok, op, off) and a status message

### Derived from

QObject

### Class Attributes

eols

### Class Methods

None

### Methods

Project | Constructor
__addRecursiveDirectory | Private method used to add all files of a directory tree.
__addSingleDirectory | Private method used to add all files of a single directory to the project.
__binaryTranslationFile | Private method to calculate the filename of the binary translations file given the name of the raw translations file.
__checkFilesExist | Private method to check, if the files in a list exist.
__checkProjectFileGroup | Private method to check, if a file is in a specific file group of the project.
__closeAllWindows | Private method to close all project related windows.
__createSnapshotSource | Private method to create a snapshot plugin version.
__createZipDirEntries | Private method to create dir entries in the zip file.
__deleteDebugProperties | Private method to delete the project debugger properties file (.e4d).
__deleteSession | Private method to delete the session file.
__doSearchNewFiles | Private method to search for new files in the project directory.
__initData | Private method to initialize the project data part.
__initDebugProperties | Private method to initialize the debug properties.
__initProjectTypes | Private method to initialize the list of supported project types.
__loadDiagram | Private slot to load a diagram from file.
__loadRecent | Private method to load the recently opened project filenames.
__openRecent | Private method to open a project from the list of rencently opened projects.
__pluginCreateArchives | Private slot to create eric6 plugin archives.
__pluginCreatePkgList | Private slot to create a PKGLIST file needed for archive file creation.
__pluginCreateSnapshotArchives | Private slot to create eric6 plugin archive snapshot releases.
__pluginExtractVersion | Private method to extract the version number entry.
__pluginVersionToTuple | Private method to convert a plug-in version string into a version tuple.
__readDebugProperties | Private method to read in the project debugger properties file (.e4d).
__readProject | Private method to read in a project (.e4p) file.
__readSession | Private method to read in the project session file (.e5s or .e4s).
__readTasks | Private method to read in the project tasks file (.e6t).
__readUserProperties | Private method to read in the user specific project file (.e4q).
__reorganizeFiles | Private method to reorganize files stored in the project.
__saveRecent | Private method to save the list of recently opened filenames.
__searchNewFiles | Private slot used to handle the search new files action.
__searchProjectFile | Private slot to show the Find Project File dialog.
__showCodeCoverage | Private slot used to show the code coverage information for the project files.
__showCodeMetrics | Private slot used to calculate some code metrics for the project files.
__showContextMenuApiDoc | Private slot called before the apidoc menu is shown.
__showContextMenuChecks | Private slot called before the checks menu is shown.
__showContextMenuDebugger | Private slot called before the Debugger menu is shown.
__showContextMenuGraphics | Private slot called before the graphics menu is shown.
__showContextMenuPackagers | Private slot called before the packagers menu is shown.
__showContextMenuRecent | Private method to set up the recent projects menu.
__showContextMenuSession | Private slot called before the Session menu is shown.
__showContextMenuShow | Private slot called before the show menu is shown.
__showContextMenuVCS | Private slot called before the vcs menu is shown.
__showDebugProperties | Private slot to display the debugger properties dialog.
__showFiletypeAssociations | Private slot to display the filetype association dialog.
__showLexerAssociations | Private slot to display the lexer association dialog.
__showMenu | Private method to set up the project menu.
__showProfileData | Private slot used to show the profiling information for the project.
__showProperties | Private slot to display the properties dialog.
__showUserProperties | Private slot to display the user specific properties dialog.
__sourceExtensions | Private method to get the source extensions of a programming language.
__statusMonitorStatus | Private method to receive the status monitor status.
__syncRecent | Private method to synchronize the list of recently opened projects with the central store.
__vcsStatusChanged | Private slot to handle a change of the overall VCS status.
__writeDebugProperties | Private method to write the project debugger properties file (.e4d).
__writeProject | Private method to save the project infos to a project file.
__writeSession | Private method to write the session data to an XML file (.e5s).
__writeUserProperties | Private method to write the project data to an XML file.
addDirectory | Public method used to add all files of a directory to the project.
addE5Actions | Public method to add actions to the list of actions.
addFiles | Public slot used to add files to the project.
addIdlDir | Public slot to add all IDL interfaces of a directory to the current project.
addIdlFiles | Public slot to add IDL interfaces to the current project.
addLanguage | Public slot used to add a language to the project.
addOthersDir | Public slot to add a directory to the OTHERS project data.
addOthersFiles | Public slot to add files to the OTHERS project data.
addResourceDir | Public slot to add all Qt resource files of a directory to the current project.
addResourceFiles | Public slot to add Qt resources to the current project.
addSourceDir | Public slot to add all source files of a directory to the current project.
addSourceFiles | Public slot to add source files to the current project.
addToOthers | Public method to add a file/directory to the OTHERS project data.
addUiDir | Public slot to add all forms of a directory to the current project.
addUiFiles | Public slot to add forms to the current project.
appendFile | Public method to append a file to the project.
checkAllScriptsDirty | Public method to check all scripts belonging to the project for their dirty status.
checkDirty | Public method to check dirty status and open a message window.
checkLanguageFiles | Public slot to check the language files after a release process.
checkVCSStatus | Public method to wake up the VCS status monitor thread.
clearHistories | Public method to clear the project related histories.
clearRecent | Public method to clear the recent projects menu.
clearStatusMonitorCachedState | Public method to clear the cached VCS state of a file/directory.
closeProject | Public slot to close the current project.
copyDirectory | Public slot to copy a directory.
createNewProject | Public slot to built a new project.
createProjectManagementDir | Public method to create the project management directory.
deleteDirectory | Public slot to delete a directory from the project directory.
deleteFile | Public slot to delete a file from the project directory.
deleteLanguageFile | Public slot to delete a translation from the project directory.
getAbsolutePath | Public method to convert a project relative file path to an absolute file path.
getAbsoluteUniversalPath | Public method to convert a project relative file path with universal separators to an absolute file path.
getActions | Public method to get a list of all actions.
getData | Public method to get data out of the project data store.
getDebugProperty | Public method to retrieve a debugger property.
getDebuggerFilters | Public method to get the debugger filters for a programming language.
getDefaultSourceExtension | Public method to get the default extension for the project's programming language.
getEditorLexerAssoc | Public method to retrieve a lexer association.
getEolString | Public method to get the EOL-string to be used by the project.
getFiles | Public method to get all files starting with a common prefix.
getHash | Public method to get the project hash.
getMainScript | Public method to return the main script filename.
getMenu | Public method to get a reference to the main menu or a submenu.
getModel | Public method to get a reference to the project browser model.
getMostRecent | Public method to get the most recently opened project.
getProgrammingLanguages | Public method to get the programming languages supported by project.
getProjectAuthor | Public method to get the author of the project.
getProjectAuthorEmail | Public method to get the email address of the project author.
getProjectDescription | Public method to get the description of the project.
getProjectDictionaries | Public method to get the names of the project specific dictionaries.
getProjectFile | Public method to get the path of the project file.
getProjectFiles | Public method to get the file entries of the given type.
getProjectLanguage | Public method to get the project's programming language.
getProjectManagementDir | Public method to get the path of the management directory.
getProjectName | Public method to get the name of the project.
getProjectPath | Public method to get the project path.
getProjectSpellLanguage | Public method to get the project's programming language.
getProjectType | Public method to get the type of the project.
getProjectTypes | Public method to get the list of supported project types.
getProjectVersion | Public mehod to get the version number of the project.
getRelativePath | Public method to convert a file path to a project relative file path.
getRelativeUniversalPath | Public method to convert a file path to a project relative file path with universal separators.
getSources | Public method to return the source script files.
getStatusMonitorAutoUpdate | Public method to retrieve the status of the auto update function.
getStatusMonitorInterval | Public method to get the monitor interval.
getTranslationPattern | Public method to get the translation pattern.
getVcs | Public method to get a reference to the VCS object.
handleApplicationDiagram | Public method to handle the application diagram context menu action.
handlePreferencesChanged | Public slot used to handle the preferencesChanged signal.
hasEntry | Public method to check the project for a file.
hasProjectType | Public method to check, if a project type is already registered.
initActions | Public slot to initialize the project related actions.
initFileTypes | Public method to initialize the filetype associations with default values.
initMenu | Public slot to initialize the project menu.
initToolbars | Public slot to initialize the project toolbar and the basic VCS toolbar.
initVCS | Public method used to instantiate a vcs system.
isDebugPropertiesLoaded | Public method to return the status of the debug properties.
isDirty | Public method to return the dirty state.
isJavaScriptProject | Public method to check, if this project is a JavaScript project.
isMixedLanguageProject | Public method to check, if this is a mixed language project.
isOpen | Public method to return the opened state.
isProjectFile | Public method used to check, if the passed in filename belongs to the project.
isProjectForm | Public method used to check, if the passed in filename belongs to the project forms.
isProjectInterface | Public method used to check, if the passed in filename belongs to the project interfaces.
isProjectResource | Public method used to check, if the passed in filename belongs to the project resources.
isProjectSource | Public method used to check, if the passed in filename belongs to the project sources.
isPy2Project | Public method to check, if this project is a Python2 project.
isPy3Project | Public method to check, if this project is a Python3 project.
isPythonProject | Public method to check, if this project is a Python2 or Python3 project.
isRubyProject | Public method to check, if this project is a Ruby project.
moveDirectory | Public slot to move a directory.
newProjectAddFiles | Public method to add files to a new project.
openProject | Public slot to open a project.
othersAdded | Public slot to be called, if something was added to the OTHERS project data area.
registerProjectType | Public method to register a project type.
removeDirectory | Public slot to remove a directory from the project.
removeE5Actions | Public method to remove actions from the list of actions.
removeFile | Public slot to remove a file from the project.
removeLanguageFile | Public slot to remove a translation from the project.
renameFile | Public slot to rename a file of the project.
renameFileInPdata | Public method to rename a file in the pdata structure.
renameMainScript | Public method to rename the main script.
reopenProject | Public slot to reopen the current project.
repopulateItem | Public slot to repopulate a named item.
saveAllScripts | Public method to save all scripts belonging to the project.
saveProject | Public slot to save the current project.
saveProjectAs | Public slot to save the current project to a different file.
setData | Public method to store data in the project data store.
setDbgInfo | Public method to set the debugging information.
setDirty | Public method to set the dirty state.
setStatusMonitorAutoUpdate | Public method to enable the auto update function.
setStatusMonitorInterval | Public method to se the interval of the VCS status monitor thread.
setTranslationPattern | Public method to set the translation pattern.
startStatusMonitor | Public method to start the VCS status monitor thread.
startswithProjectPath | Public method to check, if a path starts with the project path.
stopStatusMonitor | Public method to stop the VCS status monitor thread.
unregisterProjectType | Public method to unregister a project type.
updateFileTypes | Public method to update the filetype associations with new default values.
useSystemEol | Public method to check, if the project uses the system eol setting.
vcsSoftwareAvailable | Public method to check, if some supported VCS software is available to the IDE.
writeTasks | Public method to write the tasks data to an XML file (.e6t).

### Static Methods

None

#### Project (Constructor)

Project(parent=None, filename=None)

Constructor

parent
  parent widget (usually the ui object) (QWidget)
filename
  optional filename of a project file to open (string)

#### Project.__addRecursiveDirectory

__addRecursiveDirectory(filetype, source, target)

Private method used to add all files of a directory tree.

The tree is rooted at source to another one rooted at target. This method decents down to the lowest subdirectory.

filetype
  type of files to add (string)
source
  source directory (string)
target
  target directory (string)

#### Project.__addSingleDirectory

__addSingleDirectory(filetype, source, target, quiet=False)

Private method used to add all files of a single directory to the project.

filetype
  type of files to add (string)
source
  source directory (string)
target
  target directory (string)
quiet
  flag indicating quiet operations (boolean)

#### Project.__binaryTranslationFile

__binaryTranslationFile(langFile)

Private method to calculate the filename of the binary translations file given the name of the raw translations file.

langFile
  name of the raw translations file (string)

Returns:
  name of the binary translations file (string)

#### Project.__checkFilesExist

__checkFilesExist(index)

Private method to check, if the files in a list exist.

The files in the indicated list are checked for existance in the filesystem. Non existant files are removed from the list and the dirty state of the project is changed accordingly.

index
  key of the list to be checked (string)

#### Project.__checkProjectFileGroup

__checkProjectFileGroup(fn, group)

Private method to check, if a file is in a specific file group of the project.

fn
  filename to be checked (string)
group
  group to check (string)

Returns:
  flag indicating membership (boolean)

#### Project.__closeAllWindows

__closeAllWindows()

Private method to close all project related windows.

#### Project.__createSnapshotSource

__createSnapshotSource(filename)

Private method to create a snapshot plugin version.

The version entry in the plugin module is modified to signify a snapshot version. This method appends the string "-snapshot-" and date indicator to the version string.

filename
  name of the plugin file to modify (string)

Returns:
  modified source (bytes), snapshot version string (string)

#### Project.__createZipDirEntries

__createZipDirEntries(path, zipFile)

Private method to create dir entries in the zip file.

path
  name of the directory entry to create (string)
zipFile
  open ZipFile object (zipfile.ZipFile)

#### Project.__deleteDebugProperties

__deleteDebugProperties()

Private method to delete the project debugger properties file (.e4d).

#### Project.__deleteSession

__deleteSession()

Private method to delete the session file.

#### Project.__doSearchNewFiles

__doSearchNewFiles(AI=True, onUserDemand=False)

Private method to search for new files in the project directory.

If new files were found, it shows a dialog listing these files and gives the user the opportunity to select the ones he wants to include. If 'Automatic Inclusion' is enabled, the new files are automatically added to the project.

AI
  flag indicating whether the automatic inclusion should be honoured (boolean)
onUserDemand
  flag indicating whether this method was requested by the user via a menu action (boolean)

#### Project.__initData

__initData()

Private method to initialize the project data part.

#### Project.__initDebugProperties

__initDebugProperties()

Private method to initialize the debug properties.

#### Project.__initProjectTypes

__initProjectTypes()

Private method to initialize the list of supported project types.

#### Project.__loadDiagram

__loadDiagram()

Private slot to load a diagram from file.

#### Project.__loadRecent

__loadRecent()

Private method to load the recently opened project filenames.

#### Project.__openRecent

__openRecent(act)

Private method to open a project from the list of rencently opened projects.

act
  reference to the action that triggered (QAction)

#### Project.__pluginCreateArchives

__pluginCreateArchives(snapshot=False)

Private slot to create eric6 plugin archives.

snapshot
  flag indicating snapshot archives (boolean)

#### Project.__pluginCreatePkgList

__pluginCreatePkgList()

Private slot to create a PKGLIST file needed for archive file creation.

#### Project.__pluginCreateSnapshotArchives

__pluginCreateSnapshotArchives()

Private slot to create eric6 plugin archive snapshot releases.

#### Project.__pluginExtractVersion

__pluginExtractVersion(filename)

Private method to extract the version number entry.

filename
  name of the plugin file (string)

Returns:
  version string (string)

#### Project.__pluginVersionToTuple

__pluginVersionToTuple(versionStr)

Private method to convert a plug-in version string into a version tuple.

versionStr (str)
  version string to be converted

Returns:
  version info as a tuple

Return Type:
  tuple of int and str

#### Project.__readDebugProperties

__readDebugProperties(quiet=False)

Private method to read in the project debugger properties file (.e4d).

quiet
  flag indicating quiet operations. If this flag is true, no errors are reported.

#### Project.__readProject

__readProject(fn)

Private method to read in a project (.e4p) file.

fn
  filename of the project file to be read (string)

Returns:
  flag indicating success

#### Project.__readSession

__readSession(quiet=False, indicator="")

Private method to read in the project session file (.e5s or .e4s).

quiet
  flag indicating quiet operations. If this flag is true, no errors are reported.
indicator=
  indicator string (string)

#### Project.__readTasks

__readTasks()

Private method to read in the project tasks file (.e6t).

#### Project.__readUserProperties

__readUserProperties()

Private method to read in the user specific project file (.e4q).

#### Project.__reorganizeFiles

__reorganizeFiles()

Private method to reorganize files stored in the project.

#### Project.__saveRecent

__saveRecent()

Private method to save the list of recently opened filenames.

#### Project.__searchNewFiles

__searchNewFiles()

Private slot used to handle the search new files action.

#### Project.__searchProjectFile

__searchProjectFile()

Private slot to show the Find Project File dialog.

#### Project.__showCodeCoverage

__showCodeCoverage()

Private slot used to show the code coverage information for the project files.

#### Project.__showCodeMetrics

__showCodeMetrics()

Private slot used to calculate some code metrics for the project files.

#### Project.__showContextMenuApiDoc

__showContextMenuApiDoc()

Private slot called before the apidoc menu is shown.

#### Project.__showContextMenuChecks

__showContextMenuChecks()

Private slot called before the checks menu is shown.

#### Project.__showContextMenuDebugger

__showContextMenuDebugger()

Private slot called before the Debugger menu is shown.

#### Project.__showContextMenuGraphics

__showContextMenuGraphics()

Private slot called before the graphics menu is shown.

#### Project.__showContextMenuPackagers

__showContextMenuPackagers()

Private slot called before the packagers menu is shown.

#### Project.__showContextMenuRecent

__showContextMenuRecent()

Private method to set up the recent projects menu.

#### Project.__showContextMenuSession

__showContextMenuSession()

Private slot called before the Session menu is shown.

#### Project.__showContextMenuShow

__showContextMenuShow()

Private slot called before the show menu is shown.

#### Project.__showContextMenuVCS

__showContextMenuVCS()

Private slot called before the vcs menu is shown.

#### Project.__showDebugProperties

__showDebugProperties()

Private slot to display the debugger properties dialog.

#### Project.__showFiletypeAssociations

__showFiletypeAssociations()

Private slot to display the filetype association dialog.

#### Project.__showLexerAssociations

__showLexerAssociations()

Private slot to display the lexer association dialog.

#### Project.__showMenu

__showMenu()

Private method to set up the project menu.

#### Project.__showProfileData

__showProfileData()

Private slot used to show the profiling information for the project.

#### Project.__showProperties

__showProperties()

Private slot to display the properties dialog.

#### Project.__showUserProperties

__showUserProperties()

Private slot to display the user specific properties dialog.

#### Project.__sourceExtensions

__sourceExtensions(language)

Private method to get the source extensions of a programming language.

language
  programming language (string)

Returns:
  source extensions (list of string)

#### Project.__statusMonitorStatus

__statusMonitorStatus(status, statusMsg)

Private method to receive the status monitor status.

It simply reemits the received status.

status
  status of the monitoring thread (string, ok, nok or off)
statusMsg
  explanotory text for the signaled status (string)

#### Project.__syncRecent

__syncRecent()

Private method to synchronize the list of recently opened projects with the central store.

#### Project.__vcsStatusChanged

__vcsStatusChanged()

Private slot to handle a change of the overall VCS status.

#### Project.__writeDebugProperties

__writeDebugProperties(quiet=False)

Private method to write the project debugger properties file (.e4d).

quiet
  flag indicating quiet operations. If this flag is true, no errors are reported.

#### Project.__writeProject

__writeProject(fn=None)

Private method to save the project infos to a project file.

fn
  optional filename of the project file to be written (string). If fn is None, the filename stored in the project object is used. This is the 'save' action. If fn is given, this filename is used instead of the one in the project object. This is the 'save as' action.

Returns:
  flag indicating success

#### Project.__writeSession

__writeSession(quiet=False, indicator="")

Private method to write the session data to an XML file (.e5s).

quiet
  flag indicating quiet operations. If this flag is true, no errors are reported.
indicator=
  indicator string (string)

#### Project.__writeUserProperties

__writeUserProperties()

Private method to write the project data to an XML file.

#### Project.addDirectory

addDirectory(fileTypeFilter=None, startdir=None)

Public method used to add all files of a directory to the project.

fileTypeFilter
  filter to be used by the add directory dialog (string out of source, form, resource, interface, others)
startdir
  start directory for the selection dialog (string)

#### Project.addE5Actions

addE5Actions(actions)

Public method to add actions to the list of actions.

actions
  list of actions (list of E5Action)

#### Project.addFiles

addFiles(fileTypeFilter=None, startdir=None)

Public slot used to add files to the project.

fileTypeFilter
  filter to be used by the add file dialog (string out of source, form, resource, interface, others)
startdir
  start directory for the selection dialog

#### Project.addIdlDir

addIdlDir()

Public slot to add all IDL interfaces of a directory to the current project.

#### Project.addIdlFiles

addIdlFiles()

Public slot to add IDL interfaces to the current project.

#### Project.addLanguage

addLanguage()

Public slot used to add a language to the project.

#### Project.addOthersDir

addOthersDir()

Public slot to add a directory to the OTHERS project data.

#### Project.addOthersFiles

addOthersFiles()

Public slot to add files to the OTHERS project data.

#### Project.addResourceDir

addResourceDir()

Public slot to add all Qt resource files of a directory to the current project.

#### Project.addResourceFiles

addResourceFiles()

Public slot to add Qt resources to the current project.

#### Project.addSourceDir

addSourceDir()

Public slot to add all source files of a directory to the current project.

#### Project.addSourceFiles

addSourceFiles()

Public slot to add source files to the current project.

#### Project.addToOthers

addToOthers(fn)

Public method to add a file/directory to the OTHERS project data.

fn
  file name or directory name to add (string)

#### Project.addUiDir

addUiDir()

Public slot to add all forms of a directory to the current project.

#### Project.addUiFiles

addUiFiles()

Public slot to add forms to the current project.

#### Project.appendFile

appendFile(fn, isSourceFile=False, updateModel=True)

Public method to append a file to the project.

fn
  filename to be added to the project (string)
isSourceFile
  flag indicating that this is a source file even if it doesn't have the source extension (boolean)
updateModel
  flag indicating an update of the model is requested (boolean)

#### Project.checkAllScriptsDirty

checkAllScriptsDirty(reportSyntaxErrors=False)

Public method to check all scripts belonging to the project for their dirty status.

reportSyntaxErrors=
  flag indicating special reporting for syntax errors (boolean)

Returns:
  flag indicating success (boolean)

#### Project.checkDirty

checkDirty()

Public method to check dirty status and open a message window.

Returns:
  flag indicating whether this operation was successful (boolean)

#### Project.checkLanguageFiles

checkLanguageFiles()

Public slot to check the language files after a release process.

#### Project.checkVCSStatus

checkVCSStatus()

Public method to wake up the VCS status monitor thread.

#### Project.clearHistories

clearHistories()

Public method to clear the project related histories.

#### Project.clearRecent

clearRecent()

Public method to clear the recent projects menu.

#### Project.clearStatusMonitorCachedState

clearStatusMonitorCachedState(name)

Public method to clear the cached VCS state of a file/directory.

name
  name of the entry to be cleared (string)

#### Project.closeProject

closeProject(reopen=False, noSave=False)

Public slot to close the current project.

reopen=
  flag indicating a reopening of the project (boolean)
noSave=
  flag indicating to not perform save actions (boolean)

Returns:
  flag indicating success (boolean)

#### Project.copyDirectory

copyDirectory(olddn, newdn)

Public slot to copy a directory.

olddn
  original directory name (string)
newdn
  new directory name (string)

#### Project.createNewProject

createNewProject()

Public slot to built a new project.

This method displays the new project dialog and initializes the project object with the data entered.

#### Project.createProjectManagementDir

createProjectManagementDir()

Public method to create the project management directory.

It does nothing, if it already exists.

#### Project.deleteDirectory

deleteDirectory(dn)

Public slot to delete a directory from the project directory.

dn
  directory name to be removed from the project

Returns:
  flag indicating success (boolean)

#### Project.deleteFile

deleteFile(fn)

Public slot to delete a file from the project directory.

fn
  filename to be deleted from the project

Returns:
  flag indicating success (boolean)

#### Project.deleteLanguageFile

deleteLanguageFile(langFile)

Public slot to delete a translation from the project directory.

langFile
  the translation file to be removed (string)

#### Project.getAbsolutePath

getAbsolutePath(fn)

Public method to convert a project relative file path to an absolute file path.

fn
  file or directory name to convert (string)

Returns:
  absolute path (string)

#### Project.getAbsoluteUniversalPath

getAbsoluteUniversalPath(fn)

Public method to convert a project relative file path with universal separators to an absolute file path.

fn
  file or directory name to convert (string)

Returns:
  absolute path (string)

#### Project.getActions

getActions()

Public method to get a list of all actions.

Returns:
  list of all actions (list of E5Action)

#### Project.getData

getData(category, key)

Public method to get data out of the project data store.

category
  category of the data to get (string, one of PROJECTTYPESPECIFICDATA, CHECKERSPARMS, PACKAGERSPARMS, DOCUMENTATIONPARMS or OTHERTOOLSPARMS)
key
  key of the data entry to get (string).

Returns:
  a copy of the requested data or None

#### Project.getDebugProperty

getDebugProperty(key)

Public method to retrieve a debugger property.

key
  key of the property (string)

Returns:
  value of the property

#### Project.getDebuggerFilters

getDebuggerFilters(language)

Public method to get the debugger filters for a programming language.

language (str)
  programming language

Returns:
  filter string

Return Type:
  str

#### Project.getDefaultSourceExtension

getDefaultSourceExtension()

Public method to get the default extension for the project's programming language.

Returns:
  default extension (including the dot) (string)

#### Project.getEditorLexerAssoc

getEditorLexerAssoc(filename)

Public method to retrieve a lexer association.

filename
  filename used to determine the associated lexer language (string)

Returns:
  the requested lexer language (string)

#### Project.getEolString

getEolString()

Public method to get the EOL-string to be used by the project.

Returns:
  eol string (string)

#### Project.getFiles

getFiles(start)

Public method to get all files starting with a common prefix.

start
  prefix (string)

Returns:
  list of files starting with a common prefix (list of strings)

#### Project.getHash

getHash()

Public method to get the project hash.

Returns:
  project hash as a hex string (string)

#### Project.getMainScript

getMainScript(normalized=False)

Public method to return the main script filename.

normalized
  flag indicating a normalized filename is wanted (boolean)

Returns:
  filename of the projects main script (string)

#### Project.getMenu

getMenu(menuName)

Public method to get a reference to the main menu or a submenu.

menuName
  name of the menu (string)

Returns:
  reference to the requested menu (QMenu) or None

#### Project.getModel

getModel()

Public method to get a reference to the project browser model.

Returns:
  reference to the project browser model (ProjectBrowserModel)

#### Project.getMostRecent

getMostRecent()

Public method to get the most recently opened project.

Returns:
  path of the most recently opened project (string)

#### Project.getProgrammingLanguages

getProgrammingLanguages()

Public method to get the programming languages supported by project.

Returns:
  list of supported programming languages (list of string)

#### Project.getProjectAuthor

getProjectAuthor()

Public method to get the author of the project.

Returns:
  author name

Return Type:
  str

#### Project.getProjectAuthorEmail

getProjectAuthorEmail()

Public method to get the email address of the project author.

Returns:
  project author email

Return Type:
  str

#### Project.getProjectDescription

getProjectDescription()

Public method to get the description of the project.

Returns:
  project description

Return Type:
  str

#### Project.getProjectDictionaries

getProjectDictionaries()

Public method to get the names of the project specific dictionaries.

Returns:
  tuple of two strings giving the absolute path names of the project specific word and exclude list

#### Project.getProjectFile

getProjectFile()

Public method to get the path of the project file.

Returns:
  path of the project file (string)

#### Project.getProjectFiles

getProjectFiles(fileType, normalized=False)

Public method to get the file entries of the given type.

fileType (str)
  project file type (one of SOURCES, FORMS, RESOURCES, INTERFACES, OTHERS, TRANSLATIONS)
normalized (boolean)
  flag indicating normalized file names are wanted

Returns:
  list of file names

Return Type:
  list of str

Raises ValueError:
  raised when an unsupported file type is given

#### Project.getProjectLanguage

getProjectLanguage()

Public method to get the project's programming language.

Returns:
  programming language (string)

#### Project.getProjectManagementDir

getProjectManagementDir()

Public method to get the path of the management directory.

Returns:
  path of the management directory (string)

#### Project.getProjectName

getProjectName()

Public method to get the name of the project.

The project name is determined from the name of the project file.

Returns:
  name of the project (string)

#### Project.getProjectPath

getProjectPath()

Public method to get the project path.

Returns:
  project path (string)

#### Project.getProjectSpellLanguage

getProjectSpellLanguage()

Public method to get the project's programming language.

Returns:
  programming language (string)

#### Project.getProjectType

getProjectType()

Public method to get the type of the project.

Returns:
  UI type of the project (string)

#### Project.getProjectTypes

getProjectTypes(progLanguage="")

Public method to get the list of supported project types.

progLanguage
  programming language to get project types for (string)

Returns:
  reference to the dictionary of project types.

#### Project.getProjectVersion

getProjectVersion()

Public mehod to get the version number of the project.

Returns:
  version number

Return Type:
  str

#### Project.getRelativePath

getRelativePath(path)

Public method to convert a file path to a project relative file path.

path
  file or directory name to convert (string)

Returns:
  project relative path or unchanged path, if path doesn't belong to the project (string)

#### Project.getRelativeUniversalPath

getRelativeUniversalPath(path)

Public method to convert a file path to a project relative file path with universal separators.

path
  file or directory name to convert (string)

Returns:
  project relative path or unchanged path, if path doesn't belong to the project (string)

#### Project.getSources

getSources(normalized=False)

Public method to return the source script files.

normalized
  flag indicating a normalized filename is wanted (boolean)

Returns:
  list of the projects scripts (list of string)

#### Project.getStatusMonitorAutoUpdate

getStatusMonitorAutoUpdate()

Public method to retrieve the status of the auto update function.

Returns:
  status of the auto update function (boolean)

#### Project.getStatusMonitorInterval

getStatusMonitorInterval()

Public method to get the monitor interval.

Returns:
  interval in seconds (integer)

#### Project.getTranslationPattern

getTranslationPattern()

Public method to get the translation pattern.

Returns:
  translation pattern (string)

#### Project.getVcs

getVcs()

Public method to get a reference to the VCS object.

Returns:
  reference to the VCS object

#### Project.handleApplicationDiagram

handleApplicationDiagram()

Public method to handle the application diagram context menu action.

#### Project.handlePreferencesChanged

handlePreferencesChanged()

Public slot used to handle the preferencesChanged signal.

#### Project.hasEntry

hasEntry(fn)

Public method to check the project for a file.

fn
  filename to be checked (string)

Returns:
  flag indicating, if the project contains the file (boolean)

#### Project.hasProjectType

hasProjectType(type_, progLanguage="")

Public method to check, if a project type is already registered.

type_
  internal type designator (string)
progLanguage
  programming language of the project type (string)

Returns:
  flag indicating presence of the project type (boolean)

#### Project.initActions

initActions()

Public slot to initialize the project related actions.

#### Project.initFileTypes

initFileTypes()

Public method to initialize the filetype associations with default values.

#### Project.initMenu

initMenu()

Public slot to initialize the project menu.

Returns:
  the menu generated (QMenu)

#### Project.initToolbars

initToolbars(toolbarManager)

Public slot to initialize the project toolbar and the basic VCS toolbar.

toolbarManager
  reference to a toolbar manager object (E5ToolBarManager)

Returns:
  tuple of the generated toolbars (tuple of two QToolBar)

#### Project.initVCS

initVCS(vcsSystem=None, nooverride=False)

Public method used to instantiate a vcs system.

vcsSystem
  type of VCS to be used (string)
nooverride
  flag indicating to ignore an override request (boolean)

Returns:
  a reference to the vcs object

#### Project.isDebugPropertiesLoaded

isDebugPropertiesLoaded()

Public method to return the status of the debug properties.

Returns:
  load status of debug properties (boolean)

#### Project.isDirty

isDirty()

Public method to return the dirty state.

Returns:
  dirty state (boolean)

#### Project.isJavaScriptProject

isJavaScriptProject()

Public method to check, if this project is a JavaScript project.

Returns:
  flag indicating a JavaScript project (boolean)

#### Project.isMixedLanguageProject

isMixedLanguageProject()

Public method to check, if this is a mixed language project.

Returns:
  flag indicating a mixed language project

Return Type:
  bool

#### Project.isOpen

isOpen()

Public method to return the opened state.

Returns:
  open state (boolean)

#### Project.isProjectFile

isProjectFile(fn)

Public method used to check, if the passed in filename belongs to the project.

fn
  filename to be checked (string)

Returns:
  flag indicating membership (boolean)

#### Project.isProjectForm

isProjectForm(fn)

Public method used to check, if the passed in filename belongs to the project forms.

fn
  filename to be checked (string)

Returns:
  flag indicating membership (boolean)

#### Project.isProjectInterface

isProjectInterface(fn)

Public method used to check, if the passed in filename belongs to the project interfaces.

fn
  filename to be checked (string)

Returns:
  flag indicating membership (boolean)

#### Project.isProjectResource

isProjectResource(fn)

Public method used to check, if the passed in filename belongs to the project resources.

fn
  filename to be checked (string)

Returns:
  flag indicating membership (boolean)

#### Project.isProjectSource

isProjectSource(fn)

Public method used to check, if the passed in filename belongs to the project sources.

fn
  filename to be checked (string)

Returns:
  flag indicating membership (boolean)

#### Project.isPy2Project

isPy2Project()

Public method to check, if this project is a Python2 project.

Returns:
  flag indicating a Python2 project (boolean)

#### Project.isPy3Project

isPy3Project()

Public method to check, if this project is a Python3 project.

Returns:
  flag indicating a Python3 project (boolean)

#### Project.isPythonProject

isPythonProject()

Public method to check, if this project is a Python2 or Python3 project.

Returns:
  flag indicating a Python project (boolean)

#### Project.isRubyProject

isRubyProject()

Public method to check, if this project is a Ruby project.

Returns:
  flag indicating a Ruby project (boolean)

#### Project.moveDirectory

moveDirectory(olddn, newdn)

Public slot to move a directory.

olddn
  old directory name (string)
newdn
  new directory name (string)

#### Project.newProjectAddFiles

newProjectAddFiles(mainscript)

Public method to add files to a new project.

mainscript
  name of the mainscript (string)

#### Project.openProject

openProject(fn=None, restoreSession=True, reopen=False)

Public slot to open a project.

fn
  optional filename of the project file to be read
restoreSession
  flag indicating to restore the project session (boolean)
reopen=
  flag indicating a reopening of the project (boolean)

#### Project.othersAdded

othersAdded(fn, updateModel=True)

Public slot to be called, if something was added to the OTHERS project data area.

fn
  filename or directory name added (string)
updateModel
  flag indicating an update of the model is requested (boolean)

#### Project.registerProjectType

registerProjectType(type_, description, fileTypeCallback=None, binaryTranslationsCallback=None, lexerAssociationCallback=None, progLanguages=None)

Public method to register a project type.

type_
  internal type designator to be registered (string)
description
  more verbose type name (display string) (string)
fileTypeCallback=
  reference to a method returning a dictionary of filetype associations.
binaryTranslationsCallback=
  reference to a method returning the name of the binary translation file given the name of the raw translation file
lexerAssociationCallback=
  reference to a method returning the lexer type to be used for syntax highlighting given the name of a file
progLanguages=
  programming languages supported by the project type (list of string)

#### Project.removeDirectory

removeDirectory(dn)

Public slot to remove a directory from the project.

The directory is not deleted from the project directory.

dn
  directory name to be removed from the project

#### Project.removeE5Actions

removeE5Actions(actions)

Public method to remove actions from the list of actions.

actions
  list of actions (list of E5Action)

#### Project.removeFile

removeFile(fn, updateModel=True)

Public slot to remove a file from the project.

The file is not deleted from the project directory.

fn
  filename to be removed from the project
updateModel
  flag indicating an update of the model is requested (boolean)

#### Project.removeLanguageFile

removeLanguageFile(langFile)

Public slot to remove a translation from the project.

The translation file is not deleted from the project directory.

langFile
  the translation file to be removed (string)

#### Project.renameFile

renameFile(oldfn, newfn=None)

Public slot to rename a file of the project.

oldfn
  old filename of the file (string)
newfn
  new filename of the file (string)

Returns:
  flag indicating success

#### Project.renameFileInPdata

renameFileInPdata(oldname, newname, isSourceFile=False)

Public method to rename a file in the pdata structure.

oldname
  old filename (string)
newname
  new filename (string)
isSourceFile
  flag indicating that this is a source file even if it doesn't have the source extension (boolean)

#### Project.renameMainScript

renameMainScript(oldfn, newfn)

Public method to rename the main script.

oldfn
  old filename (string)
newfn
  new filename of the main script (string)

#### Project.reopenProject

reopenProject()

Public slot to reopen the current project.

#### Project.repopulateItem

repopulateItem(fullname)

Public slot to repopulate a named item.

fullname
  full name of the item to repopulate (string)

#### Project.saveAllScripts

saveAllScripts(reportSyntaxErrors=False)

Public method to save all scripts belonging to the project.

reportSyntaxErrors=
  flag indicating special reporting for syntax errors (boolean)

Returns:
  flag indicating success (boolean)

#### Project.saveProject

saveProject()

Public slot to save the current project.

Returns:
  flag indicating success

#### Project.saveProjectAs

saveProjectAs()

Public slot to save the current project to a different file.

Returns:
  flag indicating success (boolean)

#### Project.setData

setData(category, key, data)

Public method to store data in the project data store.

category
  category of the data to get (string, one of PROJECTTYPESPECIFICDATA, CHECKERSPARMS, PACKAGERSPARMS, DOCUMENTATIONPARMS or OTHERTOOLSPARMS)
key
  key of the data entry to get (string).
data
  data to be stored

Returns:
  flag indicating success (boolean)

#### Project.setDbgInfo

setDbgInfo(interpreter, argv, wd, env, excReporting, excList, excIgnoreList, autoClearShell, tracePython=None, autoContinue=None)

Public method to set the debugging information.

interpreter
  interpreter to be used (string)
argv
  command line arguments to be used (string)
wd
  working directory (string)
env
  environment setting (string)
excReporting
  flag indicating the highlighting of exceptions
excList
  list of exceptions to be highlighted (list of strings)
excIgnoreList
  list of exceptions to be ignored (list of strings)
autoClearShell
  flag indicating, that the interpreter window should be cleared (boolean)
tracePython=
  flag to indicate if the Python library should be traced as well (boolean)
autoContinue=
  flag indicating, that the debugger should not stop at the first executable line (boolean)

#### Project.setDirty

setDirty(b)

Public method to set the dirty state.

It emits the signal dirty(int).

b
  dirty state (boolean)

#### Project.setStatusMonitorAutoUpdate

setStatusMonitorAutoUpdate(auto)

Public method to enable the auto update function.

auto
  status of the auto update function (boolean)

#### Project.setStatusMonitorInterval

setStatusMonitorInterval(interval)

Public method to se the interval of the VCS status monitor thread.

interval
  status monitor interval in seconds (integer)

#### Project.setTranslationPattern

setTranslationPattern(pattern)

Public method to set the translation pattern.

pattern (str)
  translation pattern

#### Project.startStatusMonitor

startStatusMonitor()

Public method to start the VCS status monitor thread.

#### Project.startswithProjectPath

startswithProjectPath(path)

Public method to check, if a path starts with the project path.

path
  path to be checked (string)

Returns:
  flag indicating that the path starts with the project path (boolean)

#### Project.stopStatusMonitor

stopStatusMonitor()

Public method to stop the VCS status monitor thread.

#### Project.unregisterProjectType

unregisterProjectType(type_)

Public method to unregister a project type.

type_
  internal type designator to be unregistered (string)

#### Project.updateFileTypes

updateFileTypes()

Public method to update the filetype associations with new default values.

#### Project.useSystemEol

useSystemEol()

Public method to check, if the project uses the system eol setting.

Returns:
  flag indicating the usage of system eol (boolean)

#### Project.vcsSoftwareAvailable

vcsSoftwareAvailable()

Public method to check, if some supported VCS software is available to the IDE.

Returns:
  flag indicating availability of VCS software (boolean)

#### Project.writeTasks

writeTasks()

Public method to write the tasks data to an XML file (.e6t).

Up