# eric4.ViewManager.Tabview

Module implementing a tabbed viewmanager class.

### Classes

TabWidget | Class implementing a custimized TabWidget.
Tabview | Class implementing a tabbed viewmanager class embedded in a splitter.

### Functions

None

## TabWidget

Class implementing a custimized TabWidget.

### Derived from

E4TabWidget

### Methods

TabWidget | Constructor
__captionChange | Private method to handle Caption change signals from the editor.
__closeButtonClicked | Private method to handle the press of the close button.
__contextMenuClose | Private method to close the selected tab.
__contextMenuCloseAll | Private method to close all tabs.
__contextMenuMoveLeft | Private method to move a tab one position to the left.
__contextMenuMoveRight | Private method to move a tab one position to the right.
__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.
__contextMenuSaveToProject | Private method to save the selected tab to the current project.
__initMenu | Private method to initialize the tab context menu.
__showContextMenu | Private slot to show the tab context menu.
addTab | Overwritten method to add a new tab.
currentWidget | Overridden method to return a reference to the current page.
hasEditor | Public method to check for an editor.
hasEditors | Public method to test, if any editor is managed.
removeWidget | Public method to remove a widget.
showIndicator | Public slot to set the indicator on or off.

#### TabWidget (Constructor)

TabWidget(vm)

Constructor

vm
  view manager widget (Tabview)

#### TabWidget.__captionChange

__captionChange(cap, editor)

Private method to handle Caption change signals from the editor.

Updates the listview text to reflect the new caption information.

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

#### TabWidget.__closeButtonClicked

__closeButtonClicked()

Private method to handle the press of the close button.

#### TabWidget.__contextMenuClose

__contextMenuClose()

Private method to close the selected tab.

#### TabWidget.__contextMenuCloseAll

__contextMenuCloseAll()

Private method to close all tabs.

#### TabWidget.__contextMenuMoveLeft

__contextMenuMoveLeft()

Private method to move a tab one position to the left.

#### TabWidget.__contextMenuMoveRight

__contextMenuMoveRight()

Private method to move a tab one position to the right.

#### TabWidget.__contextMenuPrintFile

__contextMenuPrintFile()

Private method to print the selected tab.

#### TabWidget.__contextMenuSave

__contextMenuSave()

Private method to save the selected tab.

#### TabWidget.__contextMenuSaveAll

__contextMenuSaveAll()

Private method to save all tabs.

#### TabWidget.__contextMenuSaveAs

__contextMenuSaveAs()

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

#### TabWidget.__contextMenuSaveToProject

__contextMenuSaveToProject()

Private method to save the selected tab to the current project.

#### TabWidget.__initMenu

__initMenu()

Private method to initialize the tab context menu.

#### TabWidget.__showContextMenu

__showContextMenu(coord, index)

Private slot to show the tab context menu.

coord
  the position of the mouse pointer (QPoint)
index
  index of the tab the menu is requested for (integer)

#### TabWidget.addTab

addTab(editor, title)

Overwritten method to add a new tab.

editor
  the editor object to be added (QScintilla.Editor.Editor)
title
  title for the new tab (string or QString)

#### TabWidget.currentWidget

currentWidget()

Overridden method to return a reference to the current page.

Returns:
  reference to the current page (QWidget)

#### TabWidget.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 tab widget.

#### TabWidget.hasEditors

hasEditors()

Public method to test, if any editor is managed.

Returns:
  flag indicating editors are managed

#### TabWidget.removeWidget

removeWidget(object)

Public method to remove a widget.

object
  object to be removed (QWidget)

#### TabWidget.showIndicator

showIndicator(on)

Public slot to set the indicator on or off.

on
  flag indicating the dtate of the indicator (boolean)

Up

## Tabview

Class implementing a tabbed viewmanager class embedded in a splitter.

#### Signals

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

### Derived from

QSplitter, ViewManager

### Methods

Tabview | Constructor
__currentChanged | Private slot to handle the currentChanged signal.
_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.
nextSplit | Public slot used to move to the next split.
preferencesChanged | Public slot to handle the preferencesChanged signal.
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.

#### Tabview (Constructor)

Tabview(parent, ui, dbs)

Constructor

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

#### Tabview.__currentChanged

__currentChanged(index)

Private slot to handle the currentChanged signal.

index
  index of the current tab

#### Tabview._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)

#### Tabview._initWindowActions

_initWindowActions()

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

#### Tabview._modificationStatusChanged

_modificationStatusChanged(m, editor)

Protected slot to handle the modificationStatusChanged signal.

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

#### Tabview._removeAllViews

_removeAllViews()

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

#### Tabview._removeView

_removeView(win)

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

win
  editor window to be removed

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

#### Tabview._syntaxErrorToggled

_syntaxErrorToggled(editor)

Protected slot to handle the syntaxerrorToggled signal.

editor
  editor that sent the signal

#### Tabview.activeWindow

activeWindow()

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

Returns:
  reference to the active editor

#### Tabview.addSplit

addSplit()

Public method used to split the current view.

#### Tabview.canCascade

canCascade()

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

Returns:
  flag indicating cascading of windows is available

#### Tabview.canSplit

canSplit()

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

Returns:
  flag indicating splitting of the view is available.

#### Tabview.canTile

canTile()

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

Returns:
  flag indicating tiling of windows is available

#### Tabview.cascade

cascade()

Public method to cascade the managed windows.

#### Tabview.eventFilter

eventFilter(watched, event)

Public method called to filter the event queue.

watched
  the QObject being watched
event
  the event that occurred

Returns:
  always False

#### Tabview.nextSplit

nextSplit()

Public slot used to move to the next split.

#### Tabview.preferencesChanged

preferencesChanged()

Public slot to handle the preferencesChanged signal.

#### Tabview.prevSplit

prevSplit()

Public slot used to move to the previous split.

#### Tabview.removeSplit

removeSplit()

Public method used to remove the current split view.

Returns:
  flag indicating successfull removal

#### Tabview.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 or QString)

#### Tabview.setSplitOrientation

setSplitOrientation(orientation)

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

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

#### Tabview.showWindowMenu

showWindowMenu(windowMenu)

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

windowMenu
  reference to the window menu

#### Tabview.tile

tile()

Public method to tile the managed windows.

Up