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

QTabWidget

### Methods

TabWidget | Constructor
addTab | Overwritten method to add a new tab.
currentPage | Overridden method to return a reference to the current page.
eventFilter | Private method called to filter an event of our tabbar.
handleCaptionChange | Private method to handle Caption change signals from the editor.
handleContextClose | Private method to close the selected tab.
handleContextCloseAll | Private method to close all tabs.
handleContextPrintFile | Private method to print the selected tab.
handleContextSave | Private method to save the selected tab.
handleContextSaveAll | Private method to save all tabs.
handleContextSaveAs | Private method to save the selected tab to a new file.
handleContextSaveToProject | Private method to save the selected tab to the current project.
handleCurrentChanged | Private slot called by the currentChanged signal.
handleShowMenu | Private slot to handle the aboutToShow signal of the tab context menu.
hasEditor | Public method to check for an editor.
hasEditors | Public method to test, if any editor is managed.
initMenu | Private method to initialize the tab context menu.
nextTab | Public slot used to show the next tab.
prevTab | Public slot used to show the previous tab.
removePage | Overwritten method to remove a page.
showIndicator | Public slot to set the indicator on or off.
showPage | Overridden method to show a tab.

### TabWidget (Constructor)

TabWidget(parent)

Constructor

parent
  parent widget (QWidget)

### 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, QString or QTab)

### TabWidget.currentPage

currentPage()

Overridden method to return a reference to the current page.

Returns:
  reference to the current page (QWidget)

### TabWidget.eventFilter

eventFilter(object, event)

Private method called to filter an event of our tabbar.

object
  object, that generated the event (QObject)
event
  the event, that was generated by object (QEvent)

Returns:
  flag indicating if event was filtered out

### TabWidget.handleCaptionChange

handleCaptionChange(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.handleContextClose

handleContextClose()

Private method to close the selected tab.

### TabWidget.handleContextCloseAll

handleContextCloseAll()

Private method to close all tabs.

### TabWidget.handleContextPrintFile

handleContextPrintFile()

Private method to print the selected tab.

### TabWidget.handleContextSave

handleContextSave()

Private method to save the selected tab.

### TabWidget.handleContextSaveAll

handleContextSaveAll()

Private method to save all tabs.

### TabWidget.handleContextSaveAs

handleContextSaveAs()

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

### TabWidget.handleContextSaveToProject

handleContextSaveToProject()

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

### TabWidget.handleCurrentChanged

handleCurrentChanged()

Private slot called by the currentChanged signal.

### TabWidget.handleShowMenu

handleShowMenu()

Private slot to handle the aboutToShow signal of the tab context menu.

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

initMenu()

Private method to initialize the tab context menu.

### TabWidget.nextTab

nextTab()

Public slot used to show the next tab.

### TabWidget.prevTab

prevTab()

Public slot used to show the previous tab.

### TabWidget.removePage

removePage(object)

Overwritten method to remove a page.

object
  object to be removed (QObject)

### TabWidget.showIndicator

showIndicator(on)

Public slot to set the indicator on or off.

on
  flag indicating the dtate of the indicator (boolean)

### TabWidget.showPage

showPage(editor)

Overridden method to show a tab.

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

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
activeWindow | Private method to return the active (i.e. current) window.
addSplit | Public method used to split the current view.
addView | Private method to add a view (i.e. window)
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.
handleCurrentChanged | Private slot to handle the currentChanged signal.
handleModificationStatusChanged | Private slot to handle the modificationStatusChanged signal.
handleShowWindowMenu | Private method to set up the viewmanager part of the Window menu.
handleSyntaxErrorToggled | Private slot to handle the syntaxerrorToggled signal.
initViewActions | Protected method defining the user interface actions for the view commands.
initWindowActions | Define the user interface actions for window handling.
nextTab | Private slot used to show the next tab of the current tabwidget.
prevTab | Private slot used to show the previous tab of the current tabwidget.
removeAllViews | Private method to remove all views (i.e. windows)
removeSplit | Public method used to remove the current split view.
removeView | Private method to remove a view (i.e. window)
setEditorName | Change the displayed name of the editor.
setSplitOrientation | Public method used to set the orientation of the split view.
showView | Private method to show a view (i.e. window)
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.activeWindow

activeWindow()

Private 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.addView

addView(win, fn=None)

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

win
  editor window to be added
fn
  filename of this editor

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

Method called to filter the event queue.

watched
  the QObject being watched
event
  the event that occurred

Returns:
  always 0

### Tabview.handleCurrentChanged

handleCurrentChanged(editor)

Private slot to handle the currentChanged signal.

editor
  selected editor window

### Tabview.handleModificationStatusChanged

handleModificationStatusChanged(m, editor)

Private slot to handle the modificationStatusChanged signal.

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

### Tabview.handleShowWindowMenu

handleShowWindowMenu(windowMenu)

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

windowMenu
  reference to the window menu

### Tabview.handleSyntaxErrorToggled

handleSyntaxErrorToggled(editor)

Private slot to handle the syntaxerrorToggled signal.

editor
  editor that sent the signal

### Tabview.initViewActions

initViewActions()

Protected method defining the user interface actions for the view commands.

### Tabview.initWindowActions

initWindowActions()

Define the user interface actions for window handling.

### Tabview.nextTab

nextTab()

Private slot used to show the next tab of the current tabwidget.

### Tabview.prevTab

prevTab()

Private slot used to show the previous tab of the current tabwidget.

### Tabview.removeAllViews

removeAllViews()

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

### Tabview.removeSplit

removeSplit()

Public method used to remove the current split view.

Returns:
  flag indicating successfull removal

### Tabview.removeView

removeView(win)

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

win
  editor window to be removed

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

### Tabview.setSplitOrientation

setSplitOrientation(orientation)

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

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

### Tabview.showView

showView(win, fn=None)

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

win
  editor window to be shown
fn
  filename of this editor

### Tabview.tile

tile()

Public method to tile the managed windows.

Up