# eric3.Project.ProjectBrowser

Module implementing the project browser part of the eric3 UI.

### Classes

PBrowser | Baseclass implementing common functionality for the various browsers.
ProjectBrowser | Class implementing the project browser part of the eric3 UI.
ProjectBrowserDirectory | Class implementig a BrowserNode that represents a directory.
ProjectBrowserSimpleDir | Class implementing a small wrapper around BrowserNode.
ProjectFormsBrowser | A class used to display the forms part of the project.
ProjectInterfacesBrowser | A class used to display the interfaces (IDL) part of the project.
ProjectOthersBrowser | A class used to display the parts of the project, that don't fit the other categories.
ProjectSourcesBrowser | A class used to display the Sources part of the project.
ProjectTranslationsBrowser | A class used to display the translations part of the project.

### Functions

None

## PBrowser

Baseclass implementing common functionality for the various browsers.

### Derived from

Browser

### Methods

PBrowser | Constructor
createPopupMenus | Private overloaded method to generate the popup menu.
findItem | Reimplemented method
findParentNode | Private method used to find or create the parent node.
handleCollapseAllDirs | Protected slot to handle the 'Collapse all directories' menu action.
handleExpandAllDirs | Protected slot to handle the 'Expand all directories' menu action.
handleNewProject | Private slot to handle the newProject signal.
handleProjectClosed | Private slot to handle the projectClosed signal.
handleProjectOpened | Private slot to handle the projectOpened signal.
handleRemove | Private method to remove a file or files from the project.
handleRemoveDir | Private method to remove a (single) directory from the project.
handleSelectLocalDirEntries | Private slot to handle the select local directories context menu entries
handleSelectLocalEntries | Private slot to handle the select local files context menu entries
handleSelectVCSDirEntries | Private slot to handle the select VCS directories context menu entries
handleSelectVCSEntries | Private slot to handle the select VCS files context menu entries
handleShowPopupMenu | Slot called before the context menu is shown.
handleShowPopupMenuDir | Slot called before the context menu is shown.
handleShowPopupMenuDirMulti | Slot called before the context menu is shown.
handleShowPopupMenuMulti | Slot called before the context menu (multiple selections) is shown.
nodeAdded | Public method used to perform common operations on a new node.
populateTree | Private method used to populate the listview.
rebuildTree | Protected method to rebuild the tree.
removeNode | Private method to remove a parent (dir) node, if it doesn't have any children.
selectEntries | Private method to select entries based on their VCS status.
selectFile | Public method to highlight a node given its filename.
updateVCSStatus | Private method used to set the vcs status of a node.

### PBrowser (Constructor)

PBrowser(project, pdataKey, parent=None)

Constructor

project
  reference to the project object
pdataKey
  key of the filelist the browser object is handling (string)
parent
  parent widget of this browser

### PBrowser.createPopupMenus

createPopupMenus()

Private overloaded method to generate the popup menu.

### PBrowser.findItem

findItem(text, column, node=None)

Reimplemented method

It is used to find a specific item with text in column, that is a child of node. If node is None, a child of the QListView is searched.

text
  text to search for (string or QString)
column
  index of column to search in (int)
node
  start point of the search

Returns:
  the found item

### PBrowser.findParentNode

findParentNode(fn, dontSplit=0)

Private method used to find or create the parent node.

fn
  filename to use for the search
dontSplit
  flag to indicate, that no path splitting should be performed

Returns:
  tuple of two values giving the parent node and the shortened filename

### PBrowser.handleCollapseAllDirs

handleCollapseAllDirs()

Protected slot to handle the 'Collapse all directories' menu action.

### PBrowser.handleExpandAllDirs

handleExpandAllDirs()

Protected slot to handle the 'Expand all directories' menu action.

### PBrowser.handleNewProject

handleNewProject()

Private slot to handle the newProject signal.

### PBrowser.handleProjectClosed

handleProjectClosed()

Private slot to handle the projectClosed signal.

### PBrowser.handleProjectOpened

handleProjectOpened()

Private slot to handle the projectOpened signal.

### PBrowser.handleRemove

handleRemove()

Private method to remove a file or files from the project.

### PBrowser.handleRemoveDir

handleRemoveDir()

Private method to remove a (single) directory from the project.

### PBrowser.handleSelectLocalDirEntries

handleSelectLocalDirEntries()

Private slot to handle the select local directories context menu entries

### PBrowser.handleSelectLocalEntries

handleSelectLocalEntries()

Private slot to handle the select local files context menu entries

### PBrowser.handleSelectVCSDirEntries

handleSelectVCSDirEntries()

Private slot to handle the select VCS directories context menu entries

### PBrowser.handleSelectVCSEntries

handleSelectVCSEntries()

Private slot to handle the select VCS files context menu entries

### PBrowser.handleShowPopupMenu

handleShowPopupMenu(menu)

Slot called before the context menu is shown.

It enables/disables the VCS menu entries depending on the overall VCS status and the file status.

menu
  reference to the menu to be shown

### PBrowser.handleShowPopupMenuDir

handleShowPopupMenuDir(menu)

Slot called before the context menu is shown.

It enables/disables the VCS menu entries depending on the overall VCS status and the directory status.

menu
  reference to the menu to be shown

### PBrowser.handleShowPopupMenuDirMulti

handleShowPopupMenuDirMulti(menu)

Slot called before the context menu is shown.

It enables/disables the VCS menu entries depending on the overall VCS status and the directory status.

menu
  reference to the menu to be shown

### PBrowser.handleShowPopupMenuMulti

handleShowPopupMenuMulti(menu)

Slot called before the context menu (multiple selections) is shown.

It enables/disables the VCS menu entries depending on the overall VCS status and the files status.

menu
  reference to the menu to be shown

### PBrowser.nodeAdded

nodeAdded(node, name)

Public method used to perform common operations on a new node.

node
  node to work on
name
  filename belonging to this node

### PBrowser.populateTree

populateTree()

Private method used to populate the listview.

### PBrowser.rebuildTree

rebuildTree()

Protected method to rebuild the tree.

### PBrowser.removeNode

removeNode(node)

Private method to remove a parent (dir) node, if it doesn't have any children.

node
  node to remove

### PBrowser.selectEntries

selectEntries(local=1, filter=None)

Private method to select entries based on their VCS status.

local
  flag indicating local (i.e. non VCS controlled) file/directory entries should be selected (boolean)
filter
  list of class to check against

### PBrowser.selectFile

selectFile(fn)

Public method to highlight a node given its filename.

fn
  filename of file to be highlighted (string or QString)

### PBrowser.updateVCSStatus

updateVCSStatus(node, name)

Private method used to set the vcs status of a node.

node
  node to work on
name
  filename belonging to this node

Up

## ProjectBrowser

Class implementing the project browser part of the eric3 UI.

It generates a widget with four tabs. The individual tabs contain the project sources browser, the project forms browser, the project translations browser and a browser for stuff that doesn't fit these categories.

#### Signals

editorSaved(string)
  emitted after an editor has been saved

### Derived from

E3TabWidget

### Methods

ProjectBrowser | Constructor
getProjectBrowsers | Public method to get references to the individual project browsers.
handleEditorChanged | Public slot to handle the captionChanged signal.
handleEditorSaved | Public slot to handle the editorSaved signal.
handleNewProject | Private slot to handle the newProject signal.
handleProjectClosed | Private slot to handle the projectClosed signal.
handleProjectOpened | Private slot to handle the projectOpened signal.
handleProjectPropertiesChanged | Private slot to handle the projectPropertiesChanged signal.
setSourcesIcon | Private method to set the right icon for the sources browser tab.

### ProjectBrowser (Constructor)

ProjectBrowser(project, qtdir, qt4dir, parent=None, embeddedBrowser=1)

Constructor

project
  reference to the project object
qtdir
  Qt installation directory (string)
parent
  parent widget (QWidget)
embeddedBrowser
  flag indicating whether the file browser should be included. This flag is set to 0 by those layouts, that have the file browser in a separate window or embedded in the project browser instead

### ProjectBrowser.getProjectBrowsers

getProjectBrowsers()

Public method to get references to the individual project browsers.

Returns:
  list of references to project browsers

### ProjectBrowser.handleEditorChanged

handleEditorChanged(fn)

Public slot to handle the captionChanged signal.

fn
  The filename of the saved files. (string or QString)

### ProjectBrowser.handleEditorSaved

handleEditorSaved(fn)

Public slot to handle the editorSaved signal.

It simply reemits it.

fn
  The filename of the saved files. (string or QString)

### ProjectBrowser.handleNewProject

handleNewProject()

Private slot to handle the newProject signal.

### ProjectBrowser.handleProjectClosed

handleProjectClosed()

Private slot to handle the projectClosed signal.

### ProjectBrowser.handleProjectOpened

handleProjectOpened()

Private slot to handle the projectOpened signal.

### ProjectBrowser.handleProjectPropertiesChanged

handleProjectPropertiesChanged()

Private slot to handle the projectPropertiesChanged signal.

### ProjectBrowser.setSourcesIcon

setSourcesIcon()

Private method to set the right icon for the sources browser tab.

Up

## ProjectBrowserDirectory

Class implementig a BrowserNode that represents a directory.

### Derived from

BrowserDirectory

### Methods

ProjectBrowserDirectory | Constructor
compare | Private method to compare two items.
setOpen | Slot called to open/close the directory node.

### ProjectBrowserDirectory (Constructor)

ProjectBrowserDirectory(parent, dinfo, after, full=1, bold=0, vcs=None)

Constructor

parent
  the parent Browser or BrowserNode
dinfo
  name of the directory (string or QString)
after
  the sibling this node is position after or None, if this is the first child
full
  flag indicating whether the full pathname of the directory should be displayed
bold
  flag indicating whether the directory name should be displayed in bold
vcs
  if a vcs object is given, the VCS status of the files contained in the directory is displayed

### ProjectBrowserDirectory.compare

compare(item, col, ascending)

Private method to compare two items.

### ProjectBrowserDirectory.setOpen

setOpen(o)

Slot called to open/close the directory node.

o
  flag indicating the open status (boolean)

Up

## ProjectBrowserSimpleDir

Class implementing a small wrapper around BrowserNode.

It sets a pixmap depending on the open state.

### Derived from

BrowserNode

### Methods

ProjectBrowserSimpleDir | Constructor
compare | Private method to compare two items.
dirName | Public method returning the name of this directory.
fileName | Public method returning the name of this directory.
setOpen | Slot called to open/close the tree node.

### ProjectBrowserSimpleDir (Constructor)

ProjectBrowserSimpleDir(parent, text, path="")

Constructor

parent
  parent widget of this item (QListView or QListViewItem)
text
  text to be displayed (string or QString)
path
  path of the directory (string or QString)

### ProjectBrowserSimpleDir.compare

compare(item, col, ascending)

Private method to compare two items.

### ProjectBrowserSimpleDir.dirName

dirName()

Public method returning the name of this directory.

Returns:
  directory name (string)

### ProjectBrowserSimpleDir.fileName

fileName()

Public method returning the name of this directory.

Returns:
  directory name (string)

### ProjectBrowserSimpleDir.setOpen

setOpen(o)

Slot called to open/close the tree node.

It sets the pixmap displayed next to the tree node depending of the open status of the node.

o
  flag indicating the open status (boolean)

Up

## ProjectFormsBrowser

A class used to display the forms part of the project.

Via the context menu that is displayed by a right click the user can select various actions on the selected file.

#### Signals

appendStderr(string)
  emitted after something was received from a QProcess on stderr
appendStdout(string)
  emitted after something was received from a QProcess on stdout
closeSourceWindow(string)
  emitted after a file has been removed/deleted from the project
projectSourceAdded(string)
  emitted after a compile finished successfully
pythonFile(string)
  emitted to open a forms file in an editor
trpreview(string list)
  emitted to preview form files in the translations previewer
uipreview(string)
  emitted to preview a forms file

### Derived from

PBrowser

### Methods

ProjectFormsBrowser | Constructor
__itemsHaveDesignerHeaderFiles | Private method to check, if items contain designer header files.
createPopupMenus | Private overloaded method to generate the popup menu.
handleAddFormFiles | Private method to add form files to the project.
handleAddFormsDirectory | Private method to add source files of a directory to the project.
handleCompile | Private method to compile a form to a python file.
handleCompileAll | Private method to compile all forms to python files.
handleCompileChangedForms | Public method to compile all changed forms to python files.
handleCompileSelected | Private method to compile selected forms to python files.
handleCompileUI | Privat method to compile a .ui file to a .py/.rb file.
handleCompileUIDone | Private slot to handle the processExit signal of the pyuic/rbuic process.
handleContextMenu | Private slot to show the context menu of the listview.
handleDelete | Private method to delete a file from the project.
handleNewForm | Private slot to handle the New Form menu action.
handleOpen | Private slot to handle the Open menu action.
handleOpenEditor | Private slot to handle the Open in Editor menu action.
handlePopupMenu | Private slot called by the pyMenu aboutToShow signal.
handlePopupMenuDir | Private slot called by the dirMenu aboutToShow signal.
handlePopupMenuDirMulti | Private slot called by the dirMultiMenu aboutToShow signal.
handlePopupMenuMulti | Private slot called by the multiMenu aboutToShow signal.
handleProjectFormAdded | Private slot to handle the projectFormAdded signal.
handleRename | Private method to rename a file of the project.
handleStderr | Private slot to handle the readyReadStderr signal of the pyuic/rbuic process.
handleStdout | Private slot to handle the readyReadStdout signal of the pyuic/rbuic process.
handleSubclass | Private method to generate a subclass for the form.
handleTRPreview | Private slot to handle the Preview translations action.
handleUIPreview | Private slot to handle the Preview menu action.

### ProjectFormsBrowser (Constructor)

ProjectFormsBrowser(project, qtdir, qt4dir, parent=None)

Constructor

project
  reference to the project object
qtdir
  path of the Qt installation directory (string)
qt4dir
  path of the Qt4 installation directory (string)
parent
  parent widget of this browser (QWidget)

### ProjectFormsBrowser.__itemsHaveDesignerHeaderFiles

__itemsHaveDesignerHeaderFiles(items)

Private method to check, if items contain designer header files.

items
  items to check (list of QListViewItems)

Returns:
  flag indicating designer header files were found (boolean)

### ProjectFormsBrowser.createPopupMenus

createPopupMenus()

Private overloaded method to generate the popup menu.

### ProjectFormsBrowser.handleAddFormFiles

handleAddFormFiles()

Private method to add form files to the project.

### ProjectFormsBrowser.handleAddFormsDirectory

handleAddFormsDirectory()

Private method to add source files of a directory to the project.

### ProjectFormsBrowser.handleCompile

handleCompile()

Private method to compile a form to a python file.

### ProjectFormsBrowser.handleCompileAll

handleCompileAll()

Private method to compile all forms to python files.

### ProjectFormsBrowser.handleCompileChangedForms

handleCompileChangedForms()

Public method to compile all changed forms to python files.

### ProjectFormsBrowser.handleCompileSelected

handleCompileSelected()

Private method to compile selected forms to python files.

### ProjectFormsBrowser.handleCompileUI

handleCompileUI(fn, noDialog = 0, progress = None, subclass = 0)

Privat method to compile a .ui file to a .py/.rb file.

fn
  filename of the .ui file to be compiled
noDialog
  flag indicating silent operations
progress
  reference to the progress dialog
subclass
  flag indicating, if a subclass generation is to be done

Returns:
  reference to the compile process (QProcess)

### ProjectFormsBrowser.handleCompileUIDone

handleCompileUIDone()

Private slot to handle the processExit signal of the pyuic/rbuic process.

### ProjectFormsBrowser.handleContextMenu

handleContextMenu(itm, coord, col)

Private slot to show the context menu of the listview.

itm
  the selected listview item (QListViewItem)
coord
  the position of the mouse pointer (QPoint)
col
  the column of the mouse pointer (int)

### ProjectFormsBrowser.handleDelete

handleDelete()

Private method to delete a file from the project.

### ProjectFormsBrowser.handleNewForm

handleNewForm()

Private slot to handle the New Form menu action.

### ProjectFormsBrowser.handleOpen

handleOpen()

Private slot to handle the Open menu action.

This uses the projects UI type to determine the Qt Designer version to use.

### ProjectFormsBrowser.handleOpenEditor

handleOpenEditor()

Private slot to handle the Open in Editor menu action.

### ProjectFormsBrowser.handlePopupMenu

handlePopupMenu()

Private slot called by the pyMenu aboutToShow signal.

### ProjectFormsBrowser.handlePopupMenuDir

handlePopupMenuDir()

Private slot called by the dirMenu aboutToShow signal.

### ProjectFormsBrowser.handlePopupMenuDirMulti

handlePopupMenuDirMulti()

Private slot called by the dirMultiMenu aboutToShow signal.

### ProjectFormsBrowser.handlePopupMenuMulti

handlePopupMenuMulti()

Private slot called by the multiMenu aboutToShow signal.

### ProjectFormsBrowser.handleProjectFormAdded

handleProjectFormAdded(fn)

Private slot to handle the projectFormAdded signal.

fn
  Filename of the added forms file. (QString)

### ProjectFormsBrowser.handleRename

handleRename()

Private method to rename a file of the project.

### ProjectFormsBrowser.handleStderr

handleStderr()

Private slot to handle the readyReadStderr signal of the pyuic/rbuic process.

### ProjectFormsBrowser.handleStdout

handleStdout()

Private slot to handle the readyReadStdout signal of the pyuic/rbuic process.

### ProjectFormsBrowser.handleSubclass

handleSubclass()

Private method to generate a subclass for the form.

### ProjectFormsBrowser.handleTRPreview

handleTRPreview()

Private slot to handle the Preview translations action.

### ProjectFormsBrowser.handleUIPreview

handleUIPreview()

Private slot to handle the Preview menu action.

Up

## ProjectInterfacesBrowser

A class used to display the interfaces (IDL) part of the project.

Via the context menu that is displayed by a right click the user can select various actions on the selected file.

#### Signals

appendStderr(string)
  emitted after something was received from a QProcess on stderr
appendStdout(string)
  emitted after something was received from a QProcess on stdout
closeSourceWindow(string)
  emitted after a file has been removed/deleted from the project
projectSourceAdded(string)
  emitted after a compile finished successfully

### Derived from

PBrowser

### Methods

ProjectInterfacesBrowser | Constructor
createPopupMenus | Private overloaded method to generate the popup menu.
handleAddInterfaceFiles | Private method to add interface files to the project.
handleAddInterfacesDirectory | Private method to add source files of a directory to the project.
handleCompile | Private method to compile an interface to python.
handleCompileAll | Private method to compile all interfaces to python.
handleCompileIDL | Privat method to compile a .idl file to python.
handleCompileIDLDone | Private slot to handle the processExit signal of the omniidl process.
handleCompileSelected | Private method to compile all interfaces to python.
handleContextMenu | Private slot to show the context menu of the listview.
handleDelete | Private method to delete a file from the project.
handlePopupMenu | Private slot called by the pyMenu aboutToShow signal.
handlePopupMenuDir | Private slot called by the dirMenu aboutToShow signal.
handlePopupMenuDirMulti | Private slot called by the dirMultiMenu aboutToShow signal.
handlePopupMenuMulti | Private slot called by the multiMenu aboutToShow signal.
handleProjectInterfaceAdded | Private slot to handle the projectInterfaceAdded signal.
handleRename | Private method to rename a file of the project.
handleStderr | Private slot to handle the readyReadStderr signal of the omniidl process.
handleStdout | Private slot to handle the readyReadStdout signal of the omniidl process.

### ProjectInterfacesBrowser (Constructor)

ProjectInterfacesBrowser(project, parent=None)

Constructor

project
  reference to the project object
parent
  parent widget of this browser (QWidget)

### ProjectInterfacesBrowser.createPopupMenus

createPopupMenus()

Private overloaded method to generate the popup menu.

### ProjectInterfacesBrowser.handleAddInterfaceFiles

handleAddInterfaceFiles()

Private method to add interface files to the project.

### ProjectInterfacesBrowser.handleAddInterfacesDirectory

handleAddInterfacesDirectory()

Private method to add source files of a directory to the project.

### ProjectInterfacesBrowser.handleCompile

handleCompile()

Private method to compile an interface to python.

### ProjectInterfacesBrowser.handleCompileAll

handleCompileAll()

Private method to compile all interfaces to python.

### ProjectInterfacesBrowser.handleCompileIDL

handleCompileIDL(fn, noDialog = 0, progress = None)

Privat method to compile a .idl file to python.

fn
  filename of the .idl file to be compiled
noDialog
  flag indicating silent operations
progress
  reference to the progress dialog

Returns:
  reference to the compile process (QProcess)

### ProjectInterfacesBrowser.handleCompileIDLDone

handleCompileIDLDone()

Private slot to handle the processExit signal of the omniidl process.

### ProjectInterfacesBrowser.handleCompileSelected

handleCompileSelected()

Private method to compile all interfaces to python.

### ProjectInterfacesBrowser.handleContextMenu

handleContextMenu(itm, coord, col)

Private slot to show the context menu of the listview.

itm
  the selected listview item (QListViewItem)
coord
  the position of the mouse pointer (QPoint)
col
  the column of the mouse pointer (int)

### ProjectInterfacesBrowser.handleDelete

handleDelete()

Private method to delete a file from the project.

### ProjectInterfacesBrowser.handlePopupMenu

handlePopupMenu()

Private slot called by the pyMenu aboutToShow signal.

### ProjectInterfacesBrowser.handlePopupMenuDir

handlePopupMenuDir()

Private slot called by the dirMenu aboutToShow signal.

### ProjectInterfacesBrowser.handlePopupMenuDirMulti

handlePopupMenuDirMulti()

Private slot called by the dirMultiMenu aboutToShow signal.

### ProjectInterfacesBrowser.handlePopupMenuMulti

handlePopupMenuMulti()

Private slot called by the multiMenu aboutToShow signal.

### ProjectInterfacesBrowser.handleProjectInterfaceAdded

handleProjectInterfaceAdded(fn)

Private slot to handle the projectInterfaceAdded signal.

fn
  Filename of the interface file (QString)

### ProjectInterfacesBrowser.handleRename

handleRename()

Private method to rename a file of the project.

### ProjectInterfacesBrowser.handleStderr

handleStderr()

Private slot to handle the readyReadStderr signal of the omniidl process.

### ProjectInterfacesBrowser.handleStdout

handleStdout()

Private slot to handle the readyReadStdout signal of the omniidl process.

Up

## ProjectOthersBrowser

A class used to display the parts of the project, that don't fit the other categories.

Via the context menu that is displayed by a right click the user can select various actions on the selected file or directory.

#### Signals

closeSourceWindow(string)
  emitted after a file has been removed/deleted from the project
pythonFile(string)
  emitted to open a file

### Derived from

PBrowser

### Methods

ProjectOthersBrowser | Constructor
addNode | Public slot to add a node to this browser.
createPopupMenus | Private overloaded method to generate the popup menu.
handleCollapseAllDirs | Protected slot to handle the 'Collapse all directories' menu action.
handleContextMenu | Private slot to show the context menu of the listview.
handleDelete | Private method to delete the selected entry from the OTHERS project data area.
handleExpandAllDirs | Protected slot to handle the 'Expand all directories' menu action.
handleOpen | Private slot to handle the open popup menu entry.
handlePopupMenu | Private slot called by the menu aboutToShow signal.
handlePopupMenuMulti | Private slot called by the multiMenu aboutToShow signal.
handleRemove | Private slot to remove the selected entry from the OTHERS project data area.
handleRename | Private method to rename a file of the project.
handleShowPopupMenu | Slot called before the context menu is shown.
handleShowPopupMenuMulti | Slot called before the context menu (multiple selections) is shown.

### ProjectOthersBrowser (Constructor)

ProjectOthersBrowser(project, parent=None)

Constructor

project
  reference to the project object
parent
  parent widget of this browser (QWidget)

### ProjectOthersBrowser.addNode

addNode(name)

Public slot to add a node to this browser.

name
  filename or directory of this node

### ProjectOthersBrowser.createPopupMenus

createPopupMenus()

Private overloaded method to generate the popup menu.

### ProjectOthersBrowser.handleCollapseAllDirs

handleCollapseAllDirs()

Protected slot to handle the 'Collapse all directories' menu action.

### ProjectOthersBrowser.handleContextMenu

handleContextMenu(itm, coord, col)

Private slot to show the context menu of the listview.

itm
  the selected item (QListViewItem)
coord
  the position of the mouse cursor (QPoint)
col
  the column of the mouse cursor (int)

### ProjectOthersBrowser.handleDelete

handleDelete()

Private method to delete the selected entry from the OTHERS project data area.

### ProjectOthersBrowser.handleExpandAllDirs

handleExpandAllDirs()

Protected slot to handle the 'Expand all directories' menu action.

### ProjectOthersBrowser.handleOpen

handleOpen()

Private slot to handle the open popup menu entry.

### ProjectOthersBrowser.handlePopupMenu

handlePopupMenu()

Private slot called by the menu aboutToShow signal.

### ProjectOthersBrowser.handlePopupMenuMulti

handlePopupMenuMulti()

Private slot called by the multiMenu aboutToShow signal.

### ProjectOthersBrowser.handleRemove

handleRemove()

Private slot to remove the selected entry from the OTHERS project data area.

### ProjectOthersBrowser.handleRename

handleRename()

Private method to rename a file of the project.

### ProjectOthersBrowser.handleShowPopupMenu

handleShowPopupMenu(menu)

Slot called before the context menu is shown.

It enables/disables the VCS menu entries depending on the overall VCS status and the file status.

menu
  Reference to the popup menu (QPopupMenu)

### ProjectOthersBrowser.handleShowPopupMenuMulti

handleShowPopupMenuMulti(menu)

Slot called before the context menu (multiple selections) is shown.

It enables/disables the VCS menu entries depending on the overall VCS status and the files status.

menu
  reference to the menu to be shown

Up

## ProjectSourcesBrowser

A class used to display the Sources part of the project.

Via the context menu that is displayed by a right click the user can select various actions on the selected file.

#### Signals

closeSourceWindow(string)
  emitted after a file has been removed/deleted from the project

### Derived from

PBrowser

### Methods

ProjectSourcesBrowser | Constructor
createPopupMenus | Private overloaded method to generate the popup menu.
createPythonPopupMenus | Privat method to generate the popup menus for a Python project.
createRubyPopupMenus | Privat method to generate the popup menus for a Ruby project.
getOpenChildren | Private method to get a list of open siblings of QListViewItem itm.
handleAddSourceDirectory | Private method to add source files of a directory to the project.
handleAddSourceFiles | Private method to add a source file to the project.
handleApplicationDiagram | Private method to handle the application diagram context menu action.
handleClassDiagram | Private method to handle the class diagram context menu action.
handleCodeCoverage | Private method to handle the code coverage context menu action.
handleCodeMetrics | Private method to handle the code metrics context menu action.
handleContextMenu | Private slot to show the context menu of the listview.
handleCyclopsReport | Private method to handle the show cyclops report context menu action.
handleDelete | Private method to delete a file from the project.
handleEditorSaved | Public slot to handle the editorSaved signal.
handleImportsDiagram | Private method to handle the imports diagram context menu action.
handlePackageDiagram | Private method to handle the package diagram context menu action.
handlePopupMenu | Private slot called by the pyMenu aboutToShow signal.
handlePopupMenuDir | Private slot called by the dirMenu aboutToShow signal.
handlePopupMenuDirMulti | Private slot called by the dirMultiMenu aboutToShow signal.
handlePopupMenuMulti | Private slot called by the multiMenu aboutToShow signal.
handleProfileData | Private method to handle the show profile data context menu action.
handleProjectClosed | Private slot to handle the projectClosed signal.
handleProjectSourceAdded | Private slot to handle the projectSourceAdded signal.
handlePyLint | Private method to handle the syntax check context menu action.
handleRemoveCyclopsReport | Private method to handle the Remove Cyclops report context menu action.
handleRename | Private method to rename a file of the project.
handleShowShowMenu | Private slot called before the show menu is shown.
handleSyntaxCheck | Private method to handle the syntax check context menu action.
handleTabnanny | Private method to handle the tabnanny context menu action.
setOpenChildren | Private method to find a child of a node and open it.

### ProjectSourcesBrowser (Constructor)

ProjectSourcesBrowser(project, parent=None)

Constructor

project
  reference to the project object
parent
  parent widget of this browser (QWidget)

### ProjectSourcesBrowser.createPopupMenus

createPopupMenus()

Private overloaded method to generate the popup menu.

### ProjectSourcesBrowser.createPythonPopupMenus

createPythonPopupMenus()

Privat method to generate the popup menus for a Python project.

### ProjectSourcesBrowser.createRubyPopupMenus

createRubyPopupMenus()

Privat method to generate the popup menus for a Ruby project.

### ProjectSourcesBrowser.getOpenChildren

getOpenChildren(itm)

Private method to get a list of open siblings of QListViewItem itm.

Returns:
  list of open siblings

### ProjectSourcesBrowser.handleAddSourceDirectory

handleAddSourceDirectory()

Private method to add source files of a directory to the project.

### ProjectSourcesBrowser.handleAddSourceFiles

handleAddSourceFiles()

Private method to add a source file to the project.

### ProjectSourcesBrowser.handleApplicationDiagram

handleApplicationDiagram()

Private method to handle the application diagram context menu action.

### ProjectSourcesBrowser.handleClassDiagram

handleClassDiagram()

Private method to handle the class diagram context menu action.

### ProjectSourcesBrowser.handleCodeCoverage

handleCodeCoverage()

Private method to handle the code coverage context menu action.

### ProjectSourcesBrowser.handleCodeMetrics

handleCodeMetrics()

Private method to handle the code metrics context menu action.

### ProjectSourcesBrowser.handleContextMenu

handleContextMenu(itm, coord, col)

Private slot to show the context menu of the listview.

itm
  the selected listview item (QListViewItem)
coord
  the position of the mouse pointer (QPoint)
col
  the column of the mouse pointer (int)

### ProjectSourcesBrowser.handleCyclopsReport

handleCyclopsReport()

Private method to handle the show cyclops report context menu action.

### ProjectSourcesBrowser.handleDelete

handleDelete()

Private method to delete a file from the project.

### ProjectSourcesBrowser.handleEditorSaved

handleEditorSaved(fn)

Public slot to handle the editorSaved signal.

fn
  filename of the file that was saved

### ProjectSourcesBrowser.handleImportsDiagram

handleImportsDiagram()

Private method to handle the imports diagram context menu action.

### ProjectSourcesBrowser.handlePackageDiagram

handlePackageDiagram()

Private method to handle the package diagram context menu action.

### ProjectSourcesBrowser.handlePopupMenu

handlePopupMenu()

Private slot called by the pyMenu aboutToShow signal.

### ProjectSourcesBrowser.handlePopupMenuDir

handlePopupMenuDir()

Private slot called by the dirMenu aboutToShow signal.

### ProjectSourcesBrowser.handlePopupMenuDirMulti

handlePopupMenuDirMulti()

Private slot called by the dirMultiMenu aboutToShow signal.

### ProjectSourcesBrowser.handlePopupMenuMulti

handlePopupMenuMulti()

Private slot called by the multiMenu aboutToShow signal.

### ProjectSourcesBrowser.handleProfileData

handleProfileData()

Private method to handle the show profile data context menu action.

### ProjectSourcesBrowser.handleProjectClosed

handleProjectClosed()

Private slot to handle the projectClosed signal.

### ProjectSourcesBrowser.handleProjectSourceAdded

handleProjectSourceAdded(fn)

Private slot to handle the projectSourceAdded signal.

fn
  filename of the file that was added (string)

### ProjectSourcesBrowser.handlePyLint

handlePyLint()

Private method to handle the syntax check context menu action.

### ProjectSourcesBrowser.handleRemoveCyclopsReport

handleRemoveCyclopsReport()

Private method to handle the Remove Cyclops report context menu action.

### ProjectSourcesBrowser.handleRename

handleRename()

Private method to rename a file of the project.

### ProjectSourcesBrowser.handleShowShowMenu

handleShowShowMenu()

Private slot called before the show menu is shown.

### ProjectSourcesBrowser.handleSyntaxCheck

handleSyntaxCheck()

Private method to handle the syntax check context menu action.

### ProjectSourcesBrowser.handleTabnanny

handleTabnanny()

Private method to handle the tabnanny context menu action.

### ProjectSourcesBrowser.setOpenChildren

setOpenChildren(itm, childstring)

Private method to find a child of a node and open it.

itm
  the node to check
childstring
  displaytext to search for (QString)

Returns:
  flag indicating success

Up

## ProjectTranslationsBrowser

A class used to display the translations part of the project.

Via the context menu that is displayed by a right click the user can select various actions on the selected file.

#### Signals

appendStderr(string)
  emitted after something was received from a QProcess on stderr
appendStdout(string)
  emitted after something was received from a QProcess on stdout
closeSourceWindow(string)
  emitted after a file has been removed/deleted from the project
linguistFile(string)
  emitted to open a translation file with Qt-Linguist
pythonFile(string)
  emitted to open a translation file in an editor
trpreview(string list)
  emitted to preview form files in the translations previewer

### Derived from

PBrowser

### Methods

ProjectTranslationsBrowser | Constructor
createPopupMenus | Private overloaded method to generate the popup menu.
generateTSFile | Private method used to run pyludate to generate the .ts files.
handleContextMenu | Private slot to show the context menu of the listview.
handleDelete | Private method to delete a translation file from the project.
handleGenerateTSFileDone | Private slot to handle the processExit signal of the pylupdate/lrelease process.
handleGeneration | Private method to generate the translation files (.ts) for Qt Linguist.
handleGenerationAll | Private method to generate the translation files (.ts) for Qt Linguist.
handleGenerationObsolete | Private method to generate the translation files (.ts) for Qt Linguist.
handleGenerationObsoleteAll | Private method to generate the translation files (.ts) for Qt Linguist.
handleOpenEditor | Private slot to handle the Open in Editor menu action.
handlePopupMenu | Private slot called by the pyMenu aboutToShow signal.
handlePopupMenuDir | Private slot called by the dirMenu aboutToShow signal.
handlePopupMenuMulti | Private slot called by the multiMenu aboutToShow signal.
handleProjectLanguageAdded | Private slot to handle the projectLanguageAdded signal.
handleProjectPropertiesChanged | Private slot to handle the projectPropertiesChanged signal.
handleRelease | Private method to release the translation files (.qm).
handleReleaseAll | Private method to release the translation files (.qm).
handleReleaseTSFileDone | Private slot to handle the processExit signal of the pylupdate/lrelease process.
handleRemove | Private method to remove a translation from the project.
handleStderr | Private slot to handle the readyReadStderr signal of the pylupdate/lrelease process.
handleStdout | Private slot to handle the readyReadStdout signal of the pylupdate/lrelease process.
handleTRPreview | Private slot to handle the Preview translations action.
releaseTSFile | Private method to run lrelease to release the translation files (.qm).
writeTempProjectFile | Private method to write a temporary project file suitable for pylupdate and lrelease.

### ProjectTranslationsBrowser (Constructor)

ProjectTranslationsBrowser(project, qtdir, qt4dir, parent=None)

Constructor

project
  reference to the project object
qtdir
  path of the Qt installation directory (string)
qt4dir
  path of the Qt4 installation directory (string)
parent
  parent widget of this browser (QWidget)

### ProjectTranslationsBrowser.createPopupMenus

createPopupMenus()

Private overloaded method to generate the popup menu.

### ProjectTranslationsBrowser.generateTSFile

generateTSFile(noobsolete = 0, generateAll=1)

Private method used to run pyludate to generate the .ts files.

noobsolete
  flag indicating whether obsolete entries should be kept (boolean)
generateAll
  flag indicating whether all translations should be generated (boolean)

### ProjectTranslationsBrowser.handleContextMenu

handleContextMenu(itm, coord, col)

Private slot to show the context menu of the listview.

itm
  the selected listview item (QListViewItem)
coord
  the position of the mouse pointer (QPoint)
col
  the column of the mouse pointer (int)

### ProjectTranslationsBrowser.handleDelete

handleDelete()

Private method to delete a translation file from the project.

### ProjectTranslationsBrowser.handleGenerateTSFileDone

handleGenerateTSFileDone()

Private slot to handle the processExit signal of the pylupdate/lrelease process.

### ProjectTranslationsBrowser.handleGeneration

handleGeneration()

Private method to generate the translation files (.ts) for Qt Linguist.

All obsolete strings are removed from the .ts file.

### ProjectTranslationsBrowser.handleGenerationAll

handleGenerationAll()

Private method to generate the translation files (.ts) for Qt Linguist.

All obsolete strings are removed from the .ts file.

### ProjectTranslationsBrowser.handleGenerationObsolete

handleGenerationObsolete()

Private method to generate the translation files (.ts) for Qt Linguist.

Obsolete strings are kept.

### ProjectTranslationsBrowser.handleGenerationObsoleteAll

handleGenerationObsoleteAll()

Private method to generate the translation files (.ts) for Qt Linguist.

Obsolete strings are kept.

### ProjectTranslationsBrowser.handleOpenEditor

handleOpenEditor()

Private slot to handle the Open in Editor menu action.

### ProjectTranslationsBrowser.handlePopupMenu

handlePopupMenu()

Private slot called by the pyMenu aboutToShow signal.

### ProjectTranslationsBrowser.handlePopupMenuDir

handlePopupMenuDir()

Private slot called by the dirMenu aboutToShow signal.

### ProjectTranslationsBrowser.handlePopupMenuMulti

handlePopupMenuMulti()

Private slot called by the multiMenu aboutToShow signal.

### ProjectTranslationsBrowser.handleProjectLanguageAdded

handleProjectLanguageAdded(fn)

Private slot to handle the projectLanguageAdded signal.

fn
  Filename of the added language file (string)

### ProjectTranslationsBrowser.handleProjectPropertiesChanged

handleProjectPropertiesChanged()

Private slot to handle the projectPropertiesChanged signal.

### ProjectTranslationsBrowser.handleRelease

handleRelease()

Private method to release the translation files (.qm).

### ProjectTranslationsBrowser.handleReleaseAll

handleReleaseAll()

Private method to release the translation files (.qm).

### ProjectTranslationsBrowser.handleReleaseTSFileDone

handleReleaseTSFileDone()

Private slot to handle the processExit signal of the pylupdate/lrelease process.

### ProjectTranslationsBrowser.handleRemove

handleRemove()

Private method to remove a translation from the project.

### ProjectTranslationsBrowser.handleStderr

handleStderr()

Private slot to handle the readyReadStderr signal of the pylupdate/lrelease process.

### ProjectTranslationsBrowser.handleStdout

handleStdout()

Private slot to handle the readyReadStdout signal of the pylupdate/lrelease process.

### ProjectTranslationsBrowser.handleTRPreview

handleTRPreview()

Private slot to handle the Preview translations action.

### ProjectTranslationsBrowser.releaseTSFile

releaseTSFile(generateAll=0)

Private method to run lrelease to release the translation files (.qm).

generateAll
  flag indicating whether all translations should be released (boolean)

### ProjectTranslationsBrowser.writeTempProjectFile

writeTempProjectFile(langs=[])

Private method to write a temporary project file suitable for pylupdate and lrelease.

langs
  list of languages to include in the process. An empty list (default) means that all translations should be included. (list of BrowserFile)

Returns:
  flag indicating success

Up