# eric7.Project.ProjectBrowser

Module implementing the project browser part of the eric UI.

### Global Attributes

None

### Classes

ProjectBrowser | Class implementing the project browser part of the eric UI.

### Functions

None

## ProjectBrowser

Class implementing the project browser part of the eric UI.

It generates a widget with up to seven tabs. The individual tabs contain the project sources browser, the project forms browser, the project resources browser, the project translations browser, the project interfaces (IDL) browser and a browser for stuff, that doesn't fit these categories. Optionally it contains an additional tab with the file system browser.

### Derived from

EricTabWidget

### Class Attributes

None

### Class Methods

None

### Methods

ProjectBrowser | Constructor
__currentChanged | Private slot to handle the currentChanged(int) signal.
__newProject | Private slot to handle the newProject signal.
__projectClosed | Private slot to handle the projectClosed signal.
__projectOpened | Private slot to handle the projectOpened signal.
__projectPropertiesChanged | Private slot to handle the projectPropertiesChanged signal.
__setBrowsersAvailable | Private method to add selected browsers to the project browser.
__setSourcesIcon | Private method to set the right icon for the sources browser tab.
__vcsStateChanged | Private slot to handle a change in the vcs state.
__vcsStatusIndicatorClicked | Private slot to react upon clicks on the VCS indicator LED.
getProjectBrowser | Public method to get a reference to the named project browser.
getProjectBrowserNames | Public method to get the names of the various project browsers.
getProjectBrowsers | Public method to get references to the individual project browsers.
handleEditorChanged | Public slot to handle the editorChanged signal.
handleEditorLineChanged | Public slot to handle the editorLineChanged signal.
handlePreferencesChanged | Public slot used to handle the preferencesChanged signal.

### Static Methods

None

#### ProjectBrowser (Constructor)

ProjectBrowser(project, parent=None)

Constructor

project
  reference to the project object
parent
  parent widget (QWidget)

#### ProjectBrowser.__currentChanged

__currentChanged(index)

Private slot to handle the currentChanged(int) signal.

index
  index of the tab (integer)

#### ProjectBrowser.__newProject

__newProject()

Private slot to handle the newProject signal.

#### ProjectBrowser.__projectClosed

__projectClosed()

Private slot to handle the projectClosed signal.

#### ProjectBrowser.__projectOpened

__projectOpened()

Private slot to handle the projectOpened signal.

#### ProjectBrowser.__projectPropertiesChanged

__projectPropertiesChanged()

Private slot to handle the projectPropertiesChanged signal.

#### ProjectBrowser.__setBrowsersAvailable

__setBrowsersAvailable(browserFlags)

Private method to add selected browsers to the project browser.

browserFlags
  flags indicating the browsers to add (integer)

#### ProjectBrowser.__setSourcesIcon

__setSourcesIcon()

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

#### ProjectBrowser.__vcsStateChanged

__vcsStateChanged(state)

Private slot to handle a change in the vcs state.

state
  new vcs state (string)

#### ProjectBrowser.__vcsStatusIndicatorClicked

__vcsStatusIndicatorClicked(pos)

Private slot to react upon clicks on the VCS indicator LED.

pos
  position of the click (QPoint)

#### ProjectBrowser.getProjectBrowser

getProjectBrowser(name)

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

name
  name of the requested project browser (string). Valid names are "sources, forms, resources, translations, interfaces, protocols, others".

Return:
  reference to the requested browser or None

#### ProjectBrowser.getProjectBrowserNames

getProjectBrowserNames()

Public method to get the names of the various project browsers.

Return:
  list of project browser names (list of string)

#### ProjectBrowser.getProjectBrowsers

getProjectBrowsers()

Public method to get references to the individual project browsers.

Return:
  list of references to project browsers

#### ProjectBrowser.handleEditorChanged

handleEditorChanged(fn)

Public slot to handle the editorChanged signal.

fn
  filename of the changed file (string)

#### ProjectBrowser.handleEditorLineChanged

handleEditorLineChanged(fn, lineno)

Public slot to handle the editorLineChanged signal.

fn
  filename of the changed file (string)
lineno
  one based line number of the item (integer)

#### ProjectBrowser.handlePreferencesChanged

handlePreferencesChanged()

Public slot used to handle the preferencesChanged signal.

Up