# eric4.Project.ProjectBrowser

Module implementing the project browser part of the eric4 UI.

### Global Attributes

None

### Classes

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

### Functions

None

## ProjectBrowser

Class implementing the project browser part of the eric4 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

E4TabWidget

### 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.
getProjectBrowser | Public method to get a reference to the named project browser.
getProjectBrowsers | Public method to get references to the individual project browsers.
handleEditorChanged | Public slot to handle the editorChanged signal.
handlePreferencesChanged | Public slot used to handle the preferencesChanged signal.
showEvent | Protected method handleing the show event.

### Static Methods

None

#### ProjectBrowser (Constructor)

ProjectBrowser(project, parent = None, embeddedBrowser = True)

Constructor

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

#### ProjectBrowser.__currentChanged

__currentChanged(index)

Private slot to handle the currentChanged(int) signal.

#### 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.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, others".

Returns:
  reference to the requested browser or None

#### 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 editorChanged signal.

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

#### ProjectBrowser.handlePreferencesChanged

handlePreferencesChanged()

Public slot used to handle the preferencesChanged signal.

#### ProjectBrowser.showEvent

showEvent(evt)

Protected method handleing the show event.

evt
  show event to handle (QShowEvent)

Up