# eric4.Plugins.ViewManagerPlugins.Listspace.Listspace

Module implementing the listspace viewmanager class.

### Global Attributes

None

### Classes

Listspace | Class implementing the listspace viewmanager class.
StackedWidget | Class implementing a custimized StackedWidget.

### Functions

None

## Listspace

Class implementing the listspace viewmanager class.

### Signals

changeCaption(string)
  emitted if a change of the caption is necessary
editorChanged(string)
  emitted when the current editor has changed

### Derived from

QSplitter, ViewManager

### Class Attributes

None

### Class Methods

None

### Methods

Listspace | Constructor
__captionChange | Private method to handle caption change signals from the editor.
__contextMenuClose | Private method to close the selected tab.
__contextMenuCloseAll | Private method to close all tabs.
__contextMenuPrintFile | Private method to print the selected tab.
__contextMenuSave | Private method to save the selected tab.
__contextMenuSaveAll | Private method to save all tabs.
__contextMenuSaveAs | Private method to save the selected tab to a new file.
__currentChanged | Private slot to handle the currentChanged signal.
__initMenu | Private method to initialize the viewlist context menu.
__showMenu | Private slot to handle the customContextMenuRequested signal of the viewlist.
__showSelectedView | Private slot called to show a view selected in the list by a mouse click.
_addView | Protected method to add a view (i.e.
_initWindowActions | Protected method to define the user interface actions for window handling.
_modificationStatusChanged | Protected slot to handle the modificationStatusChanged signal.
_removeAllViews | Protected method to remove all views (i.e.
_removeView | Protected method to remove a view (i.e.
_showView | Protected method to show a view (i.e.
_syntaxErrorToggled | Protected slot to handle the syntaxerrorToggled signal.
activeWindow | Public method to return the active (i.e.
addSplit | Public method used to split the current view.
canCascade | Public method to signal if cascading of managed windows is available.
canSplit | public method to signal if splitting of the view is available.
canTile | Public method to signal if tiling of managed windows is available.
cascade | Public method to cascade the managed windows.
eventFilter | Method called to filter the event queue.
nextSplit | Public slot used to move to the next split.
prevSplit | Public slot used to move to the previous split.
removeSplit | Public method used to remove the current split view.
setEditorName | Change the displayed name of the editor.
setSplitOrientation | Public method used to set the orientation of the split view.
showWindowMenu | Public method to set up the viewmanager part of the Window menu.
tile | Public method to tile the managed windows.

### Static Methods

None

#### Listspace (Constructor)

Listspace(parent)

Constructor

parent
  parent widget (QWidget)
ui
  reference to the main user interface
dbs
  reference to the debug server object

#### Listspace.__captionChange

__captionChange(cap, editor)

Private method to handle caption change signals from the editor.

Updates the listwidget text to reflect the new caption information.

cap
  Caption for the editor
editor
  Editor to update the caption for

#### Listspace.__contextMenuClose

__contextMenuClose()

Private method to close the selected tab.

#### Listspace.__contextMenuCloseAll

__contextMenuCloseAll()

Private method to close all tabs.

#### Listspace.__contextMenuPrintFile

__contextMenuPrintFile()

Private method to print the selected tab.

#### Listspace.__contextMenuSave

__contextMenuSave()

Private method to save the selected tab.

#### Listspace.__contextMenuSaveAll

__contextMenuSaveAll()

Private method to save all tabs.

#### Listspace.__contextMenuSaveAs

__contextMenuSaveAs()

Private method to save the selected tab to a new file.

#### Listspace.__currentChanged

__currentChanged(index)

Private slot to handle the currentChanged signal.

index
  index of the current editor

#### Listspace.__initMenu

__initMenu()

Private method to initialize the viewlist context menu.

#### Listspace.__showMenu

__showMenu(point)

Private slot to handle the customContextMenuRequested signal of the viewlist.

#### Listspace.__showSelectedView

__showSelectedView(itm)

Private slot called to show a view selected in the list by a mouse click.

itm
  item clicked on (QListWidgetItem)

#### Listspace._addView

_addView(win, fn = None, noName = "")

Protected method to add a view (i.e. window)

win
  editor window to be added
fn
  filename of this editor
noName
  name to be used for an unnamed editor (string or QString)

#### Listspace._initWindowActions

_initWindowActions()

Protected method to define the user interface actions for window handling.

#### Listspace._modificationStatusChanged

_modificationStatusChanged(m, editor)

Protected slot to handle the modificationStatusChanged signal.

m
  flag indicating the modification status (boolean)
editor
  editor window changed

#### Listspace._removeAllViews

_removeAllViews()

Protected method to remove all views (i.e. windows)

#### Listspace._removeView

_removeView(win)

Protected method to remove a view (i.e. window)

win
  editor window to be removed

#### Listspace._showView

_showView(win, fn = None)

Protected method to show a view (i.e. window)

win
  editor window to be shown
fn
  filename of this editor

#### Listspace._syntaxErrorToggled

_syntaxErrorToggled(editor)

Protected slot to handle the syntaxerrorToggled signal.

editor
  editor that sent the signal

#### Listspace.activeWindow

activeWindow()

Public method to return the active (i.e. current) window.

Returns:
  reference to the active editor

#### Listspace.addSplit

addSplit()

Public method used to split the current view.

#### Listspace.canCascade

canCascade()

Public method to signal if cascading of managed windows is available.

Returns:
  flag indicating cascading of windows is available

#### Listspace.canSplit

canSplit()

public method to signal if splitting of the view is available.

Returns:
  flag indicating splitting of the view is available.

#### Listspace.canTile

canTile()

Public method to signal if tiling of managed windows is available.

Returns:
  flag indicating tiling of windows is available

#### Listspace.cascade

cascade()

Public method to cascade the managed windows.

#### Listspace.eventFilter

eventFilter(watched, event)

Method called to filter the event queue.

watched
  the QObject being watched
event
  the event that occurred

Returns:
  flag indicating, if we handled the event

#### Listspace.nextSplit

nextSplit()

Public slot used to move to the next split.

#### Listspace.prevSplit

prevSplit()

Public slot used to move to the previous split.

#### Listspace.removeSplit

removeSplit()

Public method used to remove the current split view.

Returns:
  flag indicating successfull removal

#### Listspace.setEditorName

setEditorName(editor, newName)

Change the displayed name of the editor.

editor
  editor window to be changed
newName
  new name to be shown (string or QString)

#### Listspace.setSplitOrientation

setSplitOrientation(orientation)

Public method used to set the orientation of the split view.

orientation
  orientation of the split (Qt.Horizontal or Qt.Vertical)

#### Listspace.showWindowMenu

showWindowMenu(windowMenu)

Public method to set up the viewmanager part of the Window menu.

windowMenu
  reference to the window menu

#### Listspace.tile

tile()

Public method to tile the managed windows.

Up

## StackedWidget

Class implementing a custimized StackedWidget.

### Derived from

QStackedWidget

### Class Attributes

None

### Class Methods

None

### Methods

StackedWidget | Constructor
addWidget | Overwritten method to add a new widget.
firstEditor | Public method to retrieve the first editor in the list of managed editors.
hasEditor | Public method to check for an editor.
nextTab | Public slot used to show the next tab.
prevTab | Public slot used to show the previous tab.
removeWidget | Overwritten method to remove a widget.
setCurrentIndex | Overwritten method to set the current widget by its index.
setCurrentWidget | Overwritten method to set the current widget.

### Static Methods

None

#### StackedWidget (Constructor)

StackedWidget(parent)

Constructor

parent
  parent widget (QWidget)

#### StackedWidget.addWidget

addWidget(editor)

Overwritten method to add a new widget.

editor
  the editor object to be added (QScintilla.Editor.Editor)

#### StackedWidget.firstEditor

firstEditor()

Public method to retrieve the first editor in the list of managed editors.

Returns:
  first editor in list (QScintilla.Editor.Editor)

#### StackedWidget.hasEditor

hasEditor(editor)

Public method to check for an editor.

editor
  editor object to check for

Returns:
  flag indicating, whether the editor to be checked belongs to the list of editors managed by this stacked widget.

#### StackedWidget.nextTab

nextTab()

Public slot used to show the next tab.

#### StackedWidget.prevTab

prevTab()

Public slot used to show the previous tab.

#### StackedWidget.removeWidget

removeWidget(widget)

Overwritten method to remove a widget.

widget
  widget to be removed (QWidget)

#### StackedWidget.setCurrentIndex

setCurrentIndex(index)

Overwritten method to set the current widget by its index.

index
  index of widget to be made current (integer)

#### StackedWidget.setCurrentWidget

setCurrentWidget(widget)

Overwritten method to set the current widget.

widget
  widget to be made current (QWidget)

Up