eric4.MultiProject.MultiProject

Module implementing the multi project management functionality.

Global Attributes

None

Classes

MultiProject Class implementing the project management functionality.

Functions

None


MultiProject

Class implementing the project management functionality.

Signals

dirty(int)
emitted when the dirty state changes
multiProjectClosed()
emitted after a multi project was closed
multiProjectOpened()
emitted after a multi project file was read
multiProjectPropertiesChanged()
emitted after the multi project properties were changed
newMultiProject()
emitted after a new multi project was generated
projectAdded(project data dict)
emitted after a project entry has been added
projectDataChanged(project data dict)
emitted after a project entry has been changed
projectOpened(filename)
emitted after the project has been opened
projectRemoved(project data dict)
emitted after a project entry has been removed
showMenu(string, QMenu)
emitted when a menu is about to be shown. The name of the menu and a reference to the menu are given.

Derived from

QObject

Class Attributes

None

Class Methods

None

Methods

MultiProject Constructor
__checkFilesExist Private method to check, if the files in a list exist.
__clearRecent Private method to clear the recent multi projects menu.
__initData Private method to initialize the multi project data part.
__loadRecent Private method to load the recently opened multi project filenames.
__openMasterProject Public slot to open the master project.
__openRecent Private method to open a multi project from the list of rencently opened multi projects.
__readMultiProject Private method to read in a multi project (.e4m, .e4mz) file.
__readXMLMultiProject Private method to read the multi project data from an XML file.
__saveRecent Private method to save the list of recently opened filenames.
__showContextMenuRecent Private method to set up the recent multi projects menu.
__showMenu Private method to set up the multi project menu.
__showProperties Private slot to display the properties dialog.
__syncRecent Private method to synchronize the list of recently opened multi projects with the central store.
__writeMultiProject Private method to save the multi project infos to a multi project file.
__writeXMLMultiProject Private method to write the multi project data to an XML file.
addE4Actions Public method to add actions to the list of actions.
addProject Public slot used to add files to the project.
changeProjectProperties Public method to change the data of a project entry.
checkDirty Public method to check the dirty status and open a message window.
closeMultiProject Public slot to close the current multi project.
getActions Public method to get a list of all actions.
getDependantProjectFiles Public method to get the filenames of the dependant projects.
getMasterProjectFile Public method to get the filename of the master project.
getMenu Public method to get a reference to the main menu or a submenu.
getMostRecent Public method to get the most recently opened multiproject.
getMultiProjectFile Public method to get the path of the multi project file.
getMultiProjectPath Public method to get the multi project path.
getProject Public method to get a reference to a project entry.
getProjects Public method to get all project entries.
initActions Public slot to initialize the multi project related actions.
initMenu Public slot to initialize the multi project menu.
initToolbar Public slot to initialize the multi project toolbar.
isDirty Public method to return the dirty state.
isOpen Public method to return the opened state.
newMultiProject Public slot to build a new multi project.
openMultiProject Public slot to open a multi project.
openProject Public slot to open a project.
removeE4Actions Public method to remove actions from the list of actions.
removeProject Public slot to remove a project from the multi project.
saveMultiProject Public slot to save the current multi project.
saveMultiProjectAs Public slot to save the current multi project to a different file.
setDirty Public method to set the dirty state.

Static Methods

None

MultiProject (Constructor)

MultiProject(project, parent = None, filename = None)

Constructor

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

MultiProject.__checkFilesExist

__checkFilesExist()

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

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

MultiProject.__clearRecent

__clearRecent()

Private method to clear the recent multi projects menu.

MultiProject.__initData

__initData()

Private method to initialize the multi project data part.

MultiProject.__loadRecent

__loadRecent()

Private method to load the recently opened multi project filenames.

MultiProject.__openMasterProject

__openMasterProject(reopen = True)

Public slot to open the master project.

reopen
flag indicating, that the master project should be reopened, if it has been opened already (boolean)

MultiProject.__openRecent

__openRecent(act)

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

act
reference to the action that triggered (QAction)

MultiProject.__readMultiProject

__readMultiProject(fn)

Private method to read in a multi project (.e4m, .e4mz) file.

fn
filename of the multi project file to be read (string or QString)
Returns:
flag indicating success

MultiProject.__readXMLMultiProject

__readXMLMultiProject(fn, validating)

Private method to read the multi project data from an XML file.

fn
filename of the multi project file to be read (string or QString)
validating
flag indicating a validation of the XML file is requested (boolean)
Returns:
flag indicating success

MultiProject.__saveRecent

__saveRecent()

Private method to save the list of recently opened filenames.

MultiProject.__showContextMenuRecent

__showContextMenuRecent()

Private method to set up the recent multi projects menu.

MultiProject.__showMenu

__showMenu()

Private method to set up the multi project menu.

MultiProject.__showProperties

__showProperties()

Private slot to display the properties dialog.

MultiProject.__syncRecent

__syncRecent()

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

MultiProject.__writeMultiProject

__writeMultiProject(fn = None)

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

fn
optional filename of the multi project file to be written. If fn is None, the filename stored in the multi project object is used. This is the 'save' action. If fn is given, this filename is used instead of the one in the multi project object. This is the 'save as' action.
Returns:
flag indicating success

MultiProject.__writeXMLMultiProject

__writeXMLMultiProject(fn = None)

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

fn
the filename of the multi project file (string)

MultiProject.addE4Actions

addE4Actions(actions)

Public method to add actions to the list of actions.

actions
list of actions (list of E4Action)

MultiProject.addProject

addProject(startdir = None)

Public slot used to add files to the project.

startdir
start directory for the selection dialog

MultiProject.changeProjectProperties

changeProjectProperties(pro)

Public method to change the data of a project entry.

pro
dictionary with the project data

MultiProject.checkDirty

checkDirty()

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

Returns:
flag indicating whether this operation was successful

MultiProject.closeMultiProject

closeMultiProject()

Public slot to close the current multi project.

Returns:
flag indicating success (boolean)

MultiProject.getActions

getActions()

Public method to get a list of all actions.

Returns:
list of all actions (list of E4Action)

MultiProject.getDependantProjectFiles

getDependantProjectFiles()

Public method to get the filenames of the dependant projects.

Returns:
names of the dependant project files (list of strings)

MultiProject.getMasterProjectFile

getMasterProjectFile()

Public method to get the filename of the master project.

Returns:
name of the master project file (string)

MultiProject.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

MultiProject.getMostRecent

getMostRecent()

Public method to get the most recently opened multiproject.

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

MultiProject.getMultiProjectFile

getMultiProjectFile()

Public method to get the path of the multi project file.

Returns:
path of the multi project file (string)

MultiProject.getMultiProjectPath

getMultiProjectPath()

Public method to get the multi project path.

Returns:
multi project path (string)

MultiProject.getProject

getProject(fn)

Public method to get a reference to a project entry.

fn
filename of the project to be removed from the multi project
Returns:
dictionary containing the project data

MultiProject.getProjects

getProjects()

Public method to get all project entries.

MultiProject.initActions

initActions()

Public slot to initialize the multi project related actions.

MultiProject.initMenu

initMenu()

Public slot to initialize the multi project menu.

Returns:
the menu generated (QMenu)

MultiProject.initToolbar

initToolbar(toolbarManager)

Public slot to initialize the multi project toolbar.

toolbarManager
reference to a toolbar manager object (E4ToolBarManager)
Returns:
the toolbar generated (QToolBar)

MultiProject.isDirty

isDirty()

Public method to return the dirty state.

Returns:
dirty state (boolean)

MultiProject.isOpen

isOpen()

Public method to return the opened state.

Returns:
open state (boolean)

MultiProject.newMultiProject

newMultiProject()

Public slot to build a new multi project.

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

MultiProject.openMultiProject

openMultiProject(fn = None, openMaster = True)

Public slot to open a multi project.

fn
optional filename of the multi project file to be read
openMaster
flag indicating, that the master project should be opened depending on the configuration(boolean)

MultiProject.openProject

openProject(filename)

Public slot to open a project.

filename
filename of the project file (string)

MultiProject.removeE4Actions

removeE4Actions(actions)

Public method to remove actions from the list of actions.

actions
list of actions (list of E4Action)

MultiProject.removeProject

removeProject(fn)

Public slot to remove a project from the multi project.

fn
filename of the project to be removed from the multi project

MultiProject.saveMultiProject

saveMultiProject()

Public slot to save the current multi project.

Returns:
flag indicating success

MultiProject.saveMultiProjectAs

saveMultiProjectAs()

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

Returns:
flag indicating success

MultiProject.setDirty

setDirty(b)

Public method to set the dirty state.

It emits the signal dirty(int).

b
dirty state (boolean)
Up