# eric6.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

bookmarkToggled(Editor)
  emitted when a bookmark is toggled.
breakpointToggled(Editor)
  emitted when a breakpoint is toggled.
changeCaption(str)
  emitted if a change of the caption is necessary
checkActions(Editor)
  emitted when some actions should be checked for their status
cursorChanged(Editor)
  emitted after the cursor position of the active window has changed
editorChanged(str)
  emitted when the current editor has changed
editorChangedEd(Editor)
  emitted when the current editor has changed
editorClosed(str)
  emitted just before an editor window gets closed
editorClosedEd(Editor)
  emitted just before an editor window gets closed
editorLanguageChanged(Editor)
  emitted to signal a change of an editors language
editorLineChanged(str,int)
  emitted to signal a change of an editor's current line (line is given one based)
editorOpened(str)
  emitted after an editor window was opened
editorOpenedEd(Editor)
  emitted after an editor window was opened
editorRenamed(str)
  emitted after an editor was renamed
editorRenamedEd(Editor)
  emitted after an editor was renamed
editorSaved(str)
  emitted after an editor window was saved
editorSavedEd(Editor)
  emitted after an editor window was saved
editorTextChanged(Editor)
  emitted to signal a change of an editor's text
lastEditorClosed()
  emitted after the last editor window was closed
previewStateChanged(bool)
  emitted to signal a change in the preview state
syntaxerrorToggled(Editor)
  emitted when a syntax error is toggled.

### Derived from

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 editor.
__contextMenuCloseAll | Private method to close all editors.
__contextMenuCloseOthers | Private method to close the other editors.
__contextMenuCopyPathToClipboard | Private method to copy the file name of the selected editor to the clipboard.
__contextMenuOpenRejections | Private slot to open a rejections file associated with the selected editor.
__contextMenuPrintFile | Private method to print the selected editor.
__contextMenuSave | Private method to save the selected editor.
__contextMenuSaveAll | Private method to save all editors.
__contextMenuSaveAs | Private method to save the selected editor to a new file.
__currentChanged | Private slot to handle the currentChanged signal.
__cursorLineChanged | Private slot to handle a change of the current editor's cursor line.
__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.
_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 | Public method called to filter the event queue.
getSplitOrientation | Public method to get the orientation of the split view.
mainWidget | Public method to return a reference to the main Widget of a specific view manager subclass.
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 | Public method to 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)

#### 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 (string)
editor
  Editor to update the caption for

#### Listspace.__contextMenuClose

__contextMenuClose()

Private method to close the selected editor.

#### Listspace.__contextMenuCloseAll

__contextMenuCloseAll()

Private method to close all editors.

#### Listspace.__contextMenuCloseOthers

__contextMenuCloseOthers()

Private method to close the other editors.

#### Listspace.__contextMenuCopyPathToClipboard

__contextMenuCopyPathToClipboard()

Private method to copy the file name of the selected editor to the clipboard.

#### Listspace.__contextMenuOpenRejections

__contextMenuOpenRejections()

Private slot to open a rejections file associated with the selected editor.

#### Listspace.__contextMenuPrintFile

__contextMenuPrintFile()

Private method to print the selected editor.

#### Listspace.__contextMenuSave

__contextMenuSave()

Private method to save the selected editor.

#### Listspace.__contextMenuSaveAll

__contextMenuSaveAll()

Private method to save all editors.

#### Listspace.__contextMenuSaveAs

__contextMenuSaveAs()

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

#### Listspace.__currentChanged

__currentChanged(index)

Private slot to handle the currentChanged signal.

index
  index of the current editor

#### Listspace.__cursorLineChanged

__cursorLineChanged(lineno)

Private slot to handle a change of the current editor's cursor line.

lineno
  line number of the current editor's cursor (zero based)

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

point
  position to open the menu at (QPoint)

#### Listspace.__showSelectedView

__showSelectedView(row)

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

row
  row number of the item clicked on (integer)

#### Listspace._addView

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

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

win
  editor assembly to be added
fn
  filename of this editor (string)
noName
  name to be used for an unnamed editor (string)
next
  flag indicating to add the view next to the current view (bool)

#### 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 assembly to be shown
fn
  filename of this editor (string)

#### 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)

Public 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.getSplitOrientation

getSplitOrientation()

Public method to get the orientation of the split view.

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

#### Listspace.mainWidget

mainWidget()

Public method to return a reference to the main Widget of a specific view manager subclass.

Returns:
  reference to the main widget

Return Type:
  QWidget

#### 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)

Public method to change the displayed name of the editor.

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

#### 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 | Public method to add a new widget.
currentWidget | Public method to get a reference to the current editor.
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 | Public method to remove a widget.
setCurrentIndex | Public method to set the current widget by its index.
setCurrentWidget | Public method to set the current widget.

### Static Methods

None

#### StackedWidget (Constructor)

StackedWidget(parent)

Constructor

parent
  parent widget (QWidget)

#### StackedWidget.addWidget

addWidget(assembly)

Public method to add a new widget.

assembly
  editor assembly object to be added (QScintilla.EditorAssembly.EditorAssembly)

#### StackedWidget.currentWidget

currentWidget()

Public method to get a reference to the current editor.

Returns:
  reference to the current 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)

Public method to remove a widget.

widget
  widget to be removed (QWidget)

#### StackedWidget.setCurrentIndex

setCurrentIndex(index)

Public method to set the current widget by its index.

index
  index of widget to be made current (integer)

#### StackedWidget.setCurrentWidget

setCurrentWidget(widget)

Public method to set the current widget.

widget
  widget to be made current (QWidget)

Up