eric4.ViewManager.ViewManager

Module implementing the viewmanager base class.

Global Attributes

None

Classes

QuickSearchLineEdit Class implementing a line edit that reacts to newline and cancel commands.
ViewManager Base class inherited by all specific viewmanager classes.

Functions

None


QuickSearchLineEdit

Class implementing a line edit that reacts to newline and cancel commands.

Signals

escPressed()
emitted after the cancel command was activated
gotFocus()
emitted when the focus is changed to this widget
returnPressed()
emitted after a newline command was activated

Derived from

QLineEdit

Class Attributes

None

Class Methods

None

Methods

editorCommand Public method to perform an editor command.
focusInEvent Re-implemented to record the current editor widget.
keyPressEvent Re-implemented to handle the press of the ESC key.

Static Methods

None

QuickSearchLineEdit.editorCommand

editorCommand(cmd)

Public method to perform an editor command.

cmd
the scintilla command to be performed

QuickSearchLineEdit.focusInEvent

focusInEvent(evt)

Re-implemented to record the current editor widget.

evt
focus event (QFocusEvent)

QuickSearchLineEdit.keyPressEvent

keyPressEvent(evt)

Re-implemented to handle the press of the ESC key.

evt
key event (QKeyPressEvent)
Up


ViewManager

Base class inherited by all specific viewmanager classes.

It defines the interface to be implemented by specific viewmanager classes and all common methods.

Signals

bookmarkToggled(editor)
emitted when a bookmark is toggled.
breakpointToggled(editor)
emitted when a breakpoint is toggled.
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
editorClosed(string)
emitted just before an editor window gets closed
editorClosedEd(editor)
emitted just before an editor window gets closed
editorOpened(string)
emitted after an editor window was opened
editorOpenedEd(editor)
emitted after an editor window was opened
editorSaved(string)
emitted after an editor window was saved
lastEditorClosed
emitted after the last editor window was closed

Derived from

QObject

Class Attributes

None

Class Methods

None

Methods

ViewManager Constructor
__addBookmarked Private method to add the current file to the list of bookmarked files.
__autosave Private slot to save the contents of all editors automatically.
__bookmarkSelected Private method to handle the bookmark selected signal.
__bookmarkToggled Private slot to handle the bookmarkToggled signal.
__breakpointToggled Private slot to handle the breakpointToggled signal.
__clearAllBookmarks Private method to handle the clear all bookmarks action.
__clearAllSyntaxErrors Private method to handle the clear all syntax errors action.
__clearBookmarked Private method to clear the bookmarked files menu.
__clearRecent Private method to clear the recent files menu.
__connectEditor Private method to establish all editor connections.
__convertEOL Private method to handle the convert line end characters action.
__coverageMarkersShown Private slot to handle the coverageMarkersShown signal.
__cursorChanged Private slot to handle the cursorChanged signal.
__editAutoComplete Private method to handle the autocomplete action.
__editAutoCompleteFromAPIs Private method to handle the autocomplete from APIs action.
__editAutoCompleteFromAll Private method to handle the autocomplete from All action.
__editAutoCompleteFromDoc Private method to handle the autocomplete from document action.
__editBookmarked Private method to edit the list of bookmarked files.
__editBoxComment Private method to handle the box comment action.
__editComment Private method to handle the comment action.
__editCopy Private method to handle the copy action.
__editCut Private method to handle the cut action.
__editDelete Private method to handle the delete action.
__editDeselectAll Private method to handle the select all action.
__editIndent Private method to handle the indent action.
__editPaste Private method to handle the paste action.
__editRedo Private method to handle the redo action.
__editRevert Private method to handle the revert action.
__editSelectAll Private method to handle the select all action.
__editSelectBrace Private method to handle the select to brace action.
__editShowCallTips Private method to handle the calltips action.
__editSmartIndent Private method to handle the smart indent action
__editStreamComment Private method to handle the stream comment action.
__editUncomment Private method to handle the uncomment action.
__editUndo Private method to handle the undo action.
__editUnindent Private method to handle the unindent action.
__editorAutoCompletionAPIsAvailable Private method to handle the availability of API autocompletion signal.
__editorCommand Private method to send an editor command to the active window.
__editorConfigChanged Private method to handle changes of an editors configuration (e.g.
__editorOpened Private slot to handle the editorOpened signal.
__editorSaved Private slot to handle the editorSaved signal.
__enableSpellingActions Private method to set the enabled state of the spelling actions.
__exportMenuTriggered Private method to handle the selection of an export format.
__findFileName Private method to handle the search for file action.
__goto Private method to handle the goto action.
__gotoBrace Private method to handle the goto brace action.
__gotoSyntaxError Private method to handle the goto syntax error action.
__initBookmarkActions Private method defining the user interface actions for the bookmarks commands.
__initContextMenuExporters Private method used to setup the Exporters sub menu.
__initEditActions Private method defining the user interface actions for the edit commands.
__initFileActions Private method defining the user interface actions for file handling.
__initMacroActions Private method defining the user interface actions for the macro commands.
__initSearchActions Private method defining the user interface actions for the search commands.
__initSpellingActions Private method to initialize the spell checking actions.
__initViewActions Private method defining the user interface actions for the view commands.
__lastEditorClosed Private slot to handle the lastEditorClosed signal.
__loadRecent Private method to load the recently opened filenames.
__macroDelete Private method to handle the delete macro action.
__macroLoad Private method to handle the load macro action.
__macroRun Private method to handle the run macro action.
__macroSave Private method to handle the save macro action.
__macroStartRecording Private method to handle the start macro recording action.
__macroStopRecording Private method to handle the stop macro recording action.
__newLineBelow Private method to insert a new line below the current one even if cursor is not at the end of the line.
__nextBookmark Private method to handle the next bookmark action.
__nextTask Private method to handle the next task action.
__nextUncovered Private method to handle the next uncovered action.
__openSourceFile Private method to open a file from the list of rencently opened files.
__previousBookmark Private method to handle the previous bookmark action.
__previousTask Private method to handle the previous task action.
__previousUncovered Private method to handle the previous uncovered action.
__quickSearch Private slot to handle the incremental quick search.
__quickSearchEnter Private slot to handle the incremental quick search return pressed (jump back to text)
__quickSearchEscape Private slot to handle the incremental quick search escape pressed (jump back to text)
__quickSearchExtend Private method to handle the quicksearch extend action.
__quickSearchFocusIn Private method to handle a focus in signal of the quicksearch lineedit.
__quickSearchInEditor Private slot to perform a quick search.
__quickSearchMarkOccurrences Private method to mark all occurrences of the search text.
__quickSearchPrev Private slot to handle the quickFindPrev toolbutton action.
__quickSearchSetEditColors Private method to set the quick search edit colors.
__quickSearchText Private slot to handle the textChanged signal of the quicksearch edit.
__replace Private method to handle the replace action.
__replaceFiles Private method to handle the replace in files action.
__saveRecent Private method to save the list of recently opened filenames.
__search Private method to handle the search action.
__searchClearMarkers Private method to clear the search markers of the active window.
__searchFiles Private method to handle the search in files action.
__setAutoSpellChecking Private slot to set the automatic spell checking of all editors.
__setSbFile Private method to set the file info in the status bar.
__shortenEmptyLines Private method to handle the shorten empty lines action.
__showBookmarkMenu Private method to set up the bookmark menu.
__showBookmarkedMenu Private method to set up bookmarked files menu.
__showBookmarksMenu Private method to handle the show bookmarks menu signal.
__showFileMenu Private method to set up the file menu.
__showRecentMenu Private method to set up recent files menu.
__spellCheck Private slot to perform a spell check of the current editor.
__splitOrientation Private method to handle the split orientation action.
__splitView Private method to handle the split view action.
__taskMarkersUpdated Protected slot to handle the syntaxerrorToggled signal.
__toggleAll Private method to handle the toggle all folds action.
__toggleAllChildren Private method to handle the toggle all folds (including children) action.
__toggleBookmark Private method to handle the toggle bookmark action.
__toggleCurrent Private method to handle the toggle current fold action.
__zoom Private method to handle the zoom action.
__zoomIn Private method to handle the zoom in action.
__zoomOut Private method to handle the zoom out action.
_addView Protected method to add a view (i.e.
_checkActions Protected slot to check some actions for their enable/disable status and set the statusbar info.
_getOpenFileFilter Protected method to return the active filename filter for a file open dialog.
_getOpenStartDir Protected method to return the starting directory for a file open dialog.
_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.
addToExtrasMenu Public method to add some actions to the extras menu.
addToRecentList Public slot to add a filename to the list of recently opened files.
appFocusChanged Public method to handle the global change of focus.
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.
checkAllDirty Public method to check the dirty status of all editors.
checkDirty Public method to check dirty status and open a message window.
cloneEditor Public method to clone an editor displaying the given document.
closeAllWindows Private method to close all editor windows via file menu.
closeCurrentWindow Public method to close the current window.
closeEditor Public method to close an editor window.
closeEditorWindow Public method to close an arbitrary source editor.
closeViewManager Public method to shutdown the viewmanager.
closeWindow Public method to close an arbitrary source editor.
editorsCheckFocusInEnabled Public method returning the flag indicating editors should perform focus in checks.
enableEditorsCheckFocusIn Public method to set a flag enabling the editors to perform focus in checks.
eventFilter Public method called to filter an event.
exit Public method to handle the debugged program terminating.
getAPIsManager Public method to get a reference to the APIs manager.
getActions Public method to get a list of all actions.
getActiveName Public method to retrieve the filename of the active window.
getEditor Public method to return the editor displaying the given file.
getMostRecent Public method to get the most recently opened file.
getOpenEditor Public method to return the editor displaying the given file.
getOpenEditorCount Public method to return the count of editors displaying the given file.
getOpenEditors Public method to get references to all open editors.
getOpenEditorsCount Public method to get the number of open editors.
getOpenFilenames Public method returning a list of the filenames of all editors.
getSRHistory Public method to get the search or replace history list.
handleResetUI Public slot to handle the resetUI signal.
initActions Public method defining the user interface actions.
initBookmarkMenu Public method to create the Bookmark menu
initBookmarkToolbar Public method to create the Bookmark toolbar
initEditMenu Public method to create the Edit menu
initEditToolbar Public method to create the Edit toolbar
initFileMenu Public method to create the File menu.
initFileToolbar Public method to create the File toolbar.
initMacroMenu Public method to create the Macro menu
initSearchToolbars Public method to create the Search toolbars
initSpellingToolbar Public method to create the Spelling toolbar
initViewMenu Public method to create the View menu
initViewToolbar Public method to create the View toolbar
newEditor Public slot to generate a new empty editor.
newEditorView Public method to create a new editor displaying the given document.
newProject Public slot to handle the NewProject signal.
nextSplit Public slot used to move to the next split.
openFiles Public slot to open some files.
openSourceFile Public slot to display a file in an editor.
preferencesChanged Public slot to handle the preferencesChanged signal.
prevSplit Public slot used to move to the previous split.
printCurrentEditor Public slot to print the contents of the current editor.
printEditor Public slot to print an editor.
printPreviewCurrentEditor Public slot to show a print preview of the current editor.
projectClosed Public slot to handle the projectClosed signal.
projectFileRenamed Public slot to handle the projectFileRenamed signal.
projectLexerAssociationsChanged Public slot to handle changes of the project lexer associations.
projectOpened Public slot to handle the projectOpened signal.
removeSplit Public method used to remove the current split view.
saveAllEditors Public slot to save the contents of all editors.
saveAsCurrentEditor Public slot to save the contents of the current editor to a new file.
saveAsEditorEd Public slot to save the contents of an editor to a new file.
saveCurrentEditor Public slot to save the contents of the current editor.
saveCurrentEditorToProject Public slot to save the contents of the current editor to the current project.
saveEditor Public method to save a named editor file.
saveEditorEd Public slot to save the contents of an editor.
saveEditorToProjectEd Public slot to save the contents of an editor to the current project.
saveEditorsList Public slot to save a list of editors.
setEditorName Public method to change the displayed name of the editor.
setFileLine Public method to update the user interface when the current program or line changes.
setReferences Public method to set some references needed later on.
setSbInfo Public method to transfer statusbar info from the user interface to viewmanager.
setSplitOrientation Public method used to set the orientation of the split view.
showDebugSource Public method to open the given file and highlight the given line in it.
showWindowMenu Public method to set up the viewmanager part of the Window menu.
textForFind Public method to determine the selection or the current word for the next find operation.
tile Public method to tile the managed windows.
unhighlight Public method to switch off all highlights.

Static Methods

None

ViewManager (Constructor)

ViewManager()

Constructor

ui
reference to the main user interface
dbs
reference to the debug server object

ViewManager.__addBookmarked

__addBookmarked()

Private method to add the current file to the list of bookmarked files.

ViewManager.__autosave

__autosave()

Private slot to save the contents of all editors automatically.

Only named editors will be saved by the autosave timer.

ViewManager.__bookmarkSelected

__bookmarkSelected(act)

Private method to handle the bookmark selected signal.

act
reference to the action that triggered (QAction)

ViewManager.__bookmarkToggled

__bookmarkToggled(editor)

Private slot to handle the bookmarkToggled signal.

It checks some bookmark actions and reemits the signal.

editor
editor that sent the signal

ViewManager.__breakpointToggled

__breakpointToggled(editor)

Private slot to handle the breakpointToggled signal.

It simply reemits the signal.

editor
editor that sent the signal

ViewManager.__clearAllBookmarks

__clearAllBookmarks()

Private method to handle the clear all bookmarks action.

ViewManager.__clearAllSyntaxErrors

__clearAllSyntaxErrors()

Private method to handle the clear all syntax errors action.

ViewManager.__clearBookmarked

__clearBookmarked()

Private method to clear the bookmarked files menu.

ViewManager.__clearRecent

__clearRecent()

Private method to clear the recent files menu.

ViewManager.__connectEditor

__connectEditor(editor)

Private method to establish all editor connections.

editor
reference to the editor object to be connected

ViewManager.__convertEOL

__convertEOL()

Private method to handle the convert line end characters action.

ViewManager.__coverageMarkersShown

__coverageMarkersShown(shown)

Private slot to handle the coverageMarkersShown signal.

shown
flag indicating whether the markers were shown or cleared

ViewManager.__cursorChanged

__cursorChanged(fn, line, pos)

Private slot to handle the cursorChanged signal.

It emits the signal cursorChanged with parameter editor.

fn
filename (string)
line
line number of the cursor (int)
pos
position in line of the cursor (int)

ViewManager.__editAutoComplete

__editAutoComplete()

Private method to handle the autocomplete action.

ViewManager.__editAutoCompleteFromAPIs

__editAutoCompleteFromAPIs()

Private method to handle the autocomplete from APIs action.

ViewManager.__editAutoCompleteFromAll

__editAutoCompleteFromAll()

Private method to handle the autocomplete from All action.

ViewManager.__editAutoCompleteFromDoc

__editAutoCompleteFromDoc()

Private method to handle the autocomplete from document action.

ViewManager.__editBookmarked

__editBookmarked()

Private method to edit the list of bookmarked files.

ViewManager.__editBoxComment

__editBoxComment()

Private method to handle the box comment action.

ViewManager.__editComment

__editComment()

Private method to handle the comment action.

ViewManager.__editCopy

__editCopy()

Private method to handle the copy action.

ViewManager.__editCut

__editCut()

Private method to handle the cut action.

ViewManager.__editDelete

__editDelete()

Private method to handle the delete action.

ViewManager.__editDeselectAll

__editDeselectAll()

Private method to handle the select all action.

ViewManager.__editIndent

__editIndent()

Private method to handle the indent action.

ViewManager.__editPaste

__editPaste()

Private method to handle the paste action.

ViewManager.__editRedo

__editRedo()

Private method to handle the redo action.

ViewManager.__editRevert

__editRevert()

Private method to handle the revert action.

ViewManager.__editSelectAll

__editSelectAll()

Private method to handle the select all action.

ViewManager.__editSelectBrace

__editSelectBrace()

Private method to handle the select to brace action.

ViewManager.__editShowCallTips

__editShowCallTips()

Private method to handle the calltips action.

ViewManager.__editSmartIndent

__editSmartIndent()

Private method to handle the smart indent action

ViewManager.__editStreamComment

__editStreamComment()

Private method to handle the stream comment action.

ViewManager.__editUncomment

__editUncomment()

Private method to handle the uncomment action.

ViewManager.__editUndo

__editUndo()

Private method to handle the undo action.

ViewManager.__editUnindent

__editUnindent()

Private method to handle the unindent action.

ViewManager.__editorAutoCompletionAPIsAvailable

__editorAutoCompletionAPIsAvailable(available)

Private method to handle the availability of API autocompletion signal.

ViewManager.__editorCommand

__editorCommand(cmd)

Private method to send an editor command to the active window.

cmd
the scintilla command to be sent

ViewManager.__editorConfigChanged

__editorConfigChanged()

Private method to handle changes of an editors configuration (e.g. language).

ViewManager.__editorOpened

__editorOpened()

Private slot to handle the editorOpened signal.

ViewManager.__editorSaved

__editorSaved(fn)

Private slot to handle the editorSaved signal.

It simply reemits the signal.

fn
filename of the saved editor

ViewManager.__enableSpellingActions

__enableSpellingActions()

Private method to set the enabled state of the spelling actions.

ViewManager.__exportMenuTriggered

__exportMenuTriggered(act)

Private method to handle the selection of an export format.

act
reference to the action that was triggered (QAction)

ViewManager.__findFileName

__findFileName()

Private method to handle the search for file action.

ViewManager.__goto

__goto()

Private method to handle the goto action.

ViewManager.__gotoBrace

__gotoBrace()

Private method to handle the goto brace action.

ViewManager.__gotoSyntaxError

__gotoSyntaxError()

Private method to handle the goto syntax error action.

ViewManager.__initBookmarkActions

__initBookmarkActions()

Private method defining the user interface actions for the bookmarks commands.

ViewManager.__initContextMenuExporters

__initContextMenuExporters()

Private method used to setup the Exporters sub menu.

ViewManager.__initEditActions

__initEditActions()

Private method defining the user interface actions for the edit commands.

ViewManager.__initFileActions

__initFileActions()

Private method defining the user interface actions for file handling.

ViewManager.__initMacroActions

__initMacroActions()

Private method defining the user interface actions for the macro commands.

ViewManager.__initSearchActions

__initSearchActions()

Private method defining the user interface actions for the search commands.

ViewManager.__initSpellingActions

__initSpellingActions()

Private method to initialize the spell checking actions.

ViewManager.__initViewActions

__initViewActions()

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

ViewManager.__lastEditorClosed

__lastEditorClosed()

Private slot to handle the lastEditorClosed signal.

ViewManager.__loadRecent

__loadRecent()

Private method to load the recently opened filenames.

ViewManager.__macroDelete

__macroDelete()

Private method to handle the delete macro action.

ViewManager.__macroLoad

__macroLoad()

Private method to handle the load macro action.

ViewManager.__macroRun

__macroRun()

Private method to handle the run macro action.

ViewManager.__macroSave

__macroSave()

Private method to handle the save macro action.

ViewManager.__macroStartRecording

__macroStartRecording()

Private method to handle the start macro recording action.

ViewManager.__macroStopRecording

__macroStopRecording()

Private method to handle the stop macro recording action.

ViewManager.__newLineBelow

__newLineBelow()

Private method to insert a new line below the current one even if cursor is not at the end of the line.

ViewManager.__nextBookmark

__nextBookmark()

Private method to handle the next bookmark action.

ViewManager.__nextTask

__nextTask()

Private method to handle the next task action.

ViewManager.__nextUncovered

__nextUncovered()

Private method to handle the next uncovered action.

ViewManager.__openSourceFile

__openSourceFile(act)

Private method to open a file from the list of rencently opened files.

act
reference to the action that triggered (QAction)

ViewManager.__previousBookmark

__previousBookmark()

Private method to handle the previous bookmark action.

ViewManager.__previousTask

__previousTask()

Private method to handle the previous task action.

ViewManager.__previousUncovered

__previousUncovered()

Private method to handle the previous uncovered action.

ViewManager.__quickSearch

__quickSearch()

Private slot to handle the incremental quick search.

ViewManager.__quickSearchEnter

__quickSearchEnter()

Private slot to handle the incremental quick search return pressed (jump back to text)

ViewManager.__quickSearchEscape

__quickSearchEscape()

Private slot to handle the incremental quick search escape pressed (jump back to text)

ViewManager.__quickSearchExtend

__quickSearchExtend()

Private method to handle the quicksearch extend action.

ViewManager.__quickSearchFocusIn

__quickSearchFocusIn()

Private method to handle a focus in signal of the quicksearch lineedit.

ViewManager.__quickSearchInEditor

__quickSearchInEditor(again, back)

Private slot to perform a quick search.

again
flag indicating a repeat of the last search (boolean)
back
flag indicating a backwards search operation (boolean)

Author(s): Maciek Fijalkowski, 2005-07-23

ViewManager.__quickSearchMarkOccurrences

__quickSearchMarkOccurrences(txt)

Private method to mark all occurrences of the search text.

txt
text to search for (QString)

ViewManager.__quickSearchPrev

__quickSearchPrev()

Private slot to handle the quickFindPrev toolbutton action.

ViewManager.__quickSearchSetEditColors

__quickSearchSetEditColors(error)

Private method to set the quick search edit colors.

error
flag indicating an error (boolean)

ViewManager.__quickSearchText

__quickSearchText()

Private slot to handle the textChanged signal of the quicksearch edit.

ViewManager.__replace

__replace()

Private method to handle the replace action.

ViewManager.__replaceFiles

__replaceFiles()

Private method to handle the replace in files action.

ViewManager.__saveRecent

__saveRecent()

Private method to save the list of recently opened filenames.

ViewManager.__search

__search()

Private method to handle the search action.

ViewManager.__searchClearMarkers

__searchClearMarkers()

Private method to clear the search markers of the active window.

ViewManager.__searchFiles

__searchFiles()

Private method to handle the search in files action.

ViewManager.__setAutoSpellChecking

__setAutoSpellChecking()

Private slot to set the automatic spell checking of all editors.

ViewManager.__setSbFile

__setSbFile(fn = None, line = None, pos = None, encoding = None, language = None, eol = None)

Private method to set the file info in the status bar.

fn
filename to display (string)
line
line number to display (int)
pos
character position to display (int)
encoding
encoding name to display (string)
language
language to display (string)
eol
eol indicator to display (string)

ViewManager.__shortenEmptyLines

__shortenEmptyLines()

Private method to handle the shorten empty lines action.

ViewManager.__showBookmarkMenu

__showBookmarkMenu()

Private method to set up the bookmark menu.

ViewManager.__showBookmarkedMenu

__showBookmarkedMenu()

Private method to set up bookmarked files menu.

ViewManager.__showBookmarksMenu

__showBookmarksMenu()

Private method to handle the show bookmarks menu signal.

ViewManager.__showFileMenu

__showFileMenu()

Private method to set up the file menu.

ViewManager.__showRecentMenu

__showRecentMenu()

Private method to set up recent files menu.

ViewManager.__spellCheck

__spellCheck()

Private slot to perform a spell check of the current editor.

ViewManager.__splitOrientation

__splitOrientation(checked)

Private method to handle the split orientation action.

ViewManager.__splitView

__splitView()

Private method to handle the split view action.

ViewManager.__taskMarkersUpdated

__taskMarkersUpdated(editor)

Protected slot to handle the syntaxerrorToggled signal.

It checks some syntax error actions and reemits the signal.

editor
editor that sent the signal

ViewManager.__toggleAll

__toggleAll()

Private method to handle the toggle all folds action.

ViewManager.__toggleAllChildren

__toggleAllChildren()

Private method to handle the toggle all folds (including children) action.

ViewManager.__toggleBookmark

__toggleBookmark()

Private method to handle the toggle bookmark action.

ViewManager.__toggleCurrent

__toggleCurrent()

Private method to handle the toggle current fold action.

ViewManager.__zoom

__zoom()

Private method to handle the zoom action.

ViewManager.__zoomIn

__zoomIn()

Private method to handle the zoom in action.

ViewManager.__zoomOut

__zoomOut()

Private method to handle the zoom out action.

ViewManager._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)
Raises RuntimeError:
Not implemented

ViewManager._checkActions

_checkActions(editor, setSb = True)

Protected slot to check some actions for their enable/disable status and set the statusbar info.

editor
editor window
setSb
flag indicating an update of the status bar is wanted (boolean)

ViewManager._getOpenFileFilter

_getOpenFileFilter()

Protected method to return the active filename filter for a file open dialog.

The appropriate filename filter is determined by file extension of the currently active editor.

Returns:
name of the filename filter (QString) or None

ViewManager._getOpenStartDir

_getOpenStartDir()

Protected method to return the starting directory for a file open dialog.

The appropriate starting directory is calculated using the following search order, until a match is found:
1: Directory of currently active editor
2: Directory of currently active Project
3: CWD

Returns:
name of directory to start (string) or None

ViewManager._initWindowActions

_initWindowActions()

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

Raises RuntimeError:
Not implemented

ViewManager._modificationStatusChanged

_modificationStatusChanged(m, editor)

Protected slot to handle the modificationStatusChanged signal.

m
flag indicating the modification status (boolean)
editor
editor window changed
Raises RuntimeError:
Not implemented

ViewManager._removeAllViews

_removeAllViews()

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

Raises RuntimeError:
Not implemented

ViewManager._removeView

_removeView(win)

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

win
editor window to be removed
Raises RuntimeError:
Not implemented

ViewManager._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
Raises RuntimeError:
Not implemented

ViewManager._syntaxErrorToggled

_syntaxErrorToggled(editor)

Protected slot to handle the syntaxerrorToggled signal.

It checks some syntax error actions and reemits the signal.

editor
editor that sent the signal

ViewManager.activeWindow

activeWindow()

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

Returns:
reference to the active editor
Raises RuntimeError:
Not implemented

ViewManager.addSplit

addSplit()

Public method used to split the current view.

ViewManager.addToExtrasMenu

addToExtrasMenu(menu)

Public method to add some actions to the extras menu.

ViewManager.addToRecentList

addToRecentList(fn)

Public slot to add a filename to the list of recently opened files.

fn
name of the file to be added

ViewManager.appFocusChanged

appFocusChanged(old, now)

Public method to handle the global change of focus.

old
reference to the widget loosing focus (QWidget)
now
reference to the widget gaining focus (QWidget)

ViewManager.canCascade

canCascade()

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

Returns:
flag indicating cascading of windows is available
Raises RuntimeError:
Not implemented

ViewManager.canSplit

canSplit()

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

Returns:
flag indicating splitting of the view is available.

ViewManager.canTile

canTile()

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

Returns:
flag indicating tiling of windows is available
Raises RuntimeError:
Not implemented

ViewManager.cascade

cascade()

Public method to cascade the managed windows.

Raises RuntimeError:
Not implemented

ViewManager.checkAllDirty

checkAllDirty()

Public method to check the dirty status of all editors.

Returns:
flag indicating successful reset of all dirty flags (boolean)

ViewManager.checkDirty

checkDirty(editor, autosave = False)

Public method to check dirty status and open a message window.

editor
editor window to check
autosave
flag indicating that the file should be saved automatically (boolean)
Returns:
flag indicating successful reset of the dirty flag (boolean)

ViewManager.cloneEditor

cloneEditor(caller, filetype, fn)

Public method to clone an editor displaying the given document.

caller
reference to the editor calling this method
filetype
type of the source file (string)
fn
filename of this view
Returns:
reference to the new editor object (Editor.Editor)

ViewManager.closeAllWindows

closeAllWindows()

Private method to close all editor windows via file menu.

ViewManager.closeCurrentWindow

closeCurrentWindow()

Public method to close the current window.

Returns:
flag indicating success (boolean)

ViewManager.closeEditor

closeEditor(editor)

Public method to close an editor window.

editor
editor window to be closed
Returns:
flag indicating success (boolean)

ViewManager.closeEditorWindow

closeEditorWindow(editor)

Public method to close an arbitrary source editor.

editor
editor to be closed

ViewManager.closeViewManager

closeViewManager()

Public method to shutdown the viewmanager.

If it cannot close all editor windows, it aborts the shutdown process.

Returns:
flag indicating success (boolean)

ViewManager.closeWindow

closeWindow(fn)

Public method to close an arbitrary source editor.

fn
filename of editor to be closed
Returns:
flag indicating success (boolean)

ViewManager.editorsCheckFocusInEnabled

editorsCheckFocusInEnabled()

Public method returning the flag indicating editors should perform focus in checks.

Returns:
flag indicating focus in checks should be performed (boolean)

ViewManager.enableEditorsCheckFocusIn

enableEditorsCheckFocusIn(enabled)

Public method to set a flag enabling the editors to perform focus in checks.

enabled
flag indicating focus in checks should be performed (boolean)

ViewManager.eventFilter

eventFilter(object, event)

Public method called to filter an event.

object
object, that generated the event (QObject)
event
the event, that was generated by object (QEvent)
Returns:
flag indicating if event was filtered out

ViewManager.exit

exit()

Public method to handle the debugged program terminating.

ViewManager.getAPIsManager

getAPIsManager()

Public method to get a reference to the APIs manager.

Returns:
the APIs manager object (eric4.QScintilla.APIsManager)

ViewManager.getActions

getActions(type)

Public method to get a list of all actions.

type
string denoting the action set to get. It must be one of "edit", "file", "search", "view", "window", "macro" or "bookmark"
Returns:
list of all actions (list of E4Action)

ViewManager.getActiveName

getActiveName()

Public method to retrieve the filename of the active window.

Returns:
filename of active window (string)

ViewManager.getEditor

getEditor(fn, filetype = "")

Public method to return the editor displaying the given file.

If there is no editor with the given file, a new editor window is created.

fn
filename to look for
filetype
type of the source file (string)
Returns:
tuple of two values giving a flag indicating a new window creation and a reference to the editor displaying this file

ViewManager.getMostRecent

getMostRecent()

Public method to get the most recently opened file.

Returns:
path of the most recently opened file (string)

ViewManager.getOpenEditor

getOpenEditor(fn)

Public method to return the editor displaying the given file.

fn
filename to look for
Returns:
a reference to the editor displaying this file or None, if no editor was found

ViewManager.getOpenEditorCount

getOpenEditorCount(fn)

Public method to return the count of editors displaying the given file.

fn
filename to look for
Returns:
count of editors displaying this file (integer)

ViewManager.getOpenEditors

getOpenEditors()

Public method to get references to all open editors.

Returns:
list of references to all open editors (list of QScintilla.editor)

ViewManager.getOpenEditorsCount

getOpenEditorsCount()

Public method to get the number of open editors.

Returns:
number of open editors (integer)

ViewManager.getOpenFilenames

getOpenFilenames()

Public method returning a list of the filenames of all editors.

Returns:
list of all opened filenames (list of strings)

ViewManager.getSRHistory

getSRHistory(key)

Public method to get the search or replace history list.

key
list to return (must be 'search' or 'replace')
Returns:
the requested history list (QStringList)

ViewManager.handleResetUI

handleResetUI()

Public slot to handle the resetUI signal.

ViewManager.initActions

initActions()

Public method defining the user interface actions.

ViewManager.initBookmarkMenu

initBookmarkMenu()

Public method to create the Bookmark menu

Returns:
the generated menu

ViewManager.initBookmarkToolbar

initBookmarkToolbar(toolbarManager)

Public method to create the Bookmark toolbar

toolbarManager
reference to a toolbar manager object (E4ToolBarManager)
Returns:
the generated toolbar

ViewManager.initEditMenu

initEditMenu()

Public method to create the Edit menu

Returns:
the generated menu

ViewManager.initEditToolbar

initEditToolbar(toolbarManager)

Public method to create the Edit toolbar

toolbarManager
reference to a toolbar manager object (E4ToolBarManager)
Returns:
the generated toolbar

ViewManager.initFileMenu

initFileMenu()

Public method to create the File menu.

Returns:
the generated menu

ViewManager.initFileToolbar

initFileToolbar(toolbarManager)

Public method to create the File toolbar.

toolbarManager
reference to a toolbar manager object (E4ToolBarManager)
Returns:
the generated toolbar

ViewManager.initMacroMenu

initMacroMenu()

Public method to create the Macro menu

Returns:
the generated menu

ViewManager.initSearchToolbars

initSearchToolbars(toolbarManager)

Public method to create the Search toolbars

toolbarManager
reference to a toolbar manager object (E4ToolBarManager)
Returns:
a tuple of the generated toolbar (search, quicksearch)

ViewManager.initSpellingToolbar

initSpellingToolbar(toolbarManager)

Public method to create the Spelling toolbar

toolbarManager
reference to a toolbar manager object (E4ToolBarManager)
Returns:
the generated toolbar

ViewManager.initViewMenu

initViewMenu()

Public method to create the View menu

Returns:
the generated menu

ViewManager.initViewToolbar

initViewToolbar(toolbarManager)

Public method to create the View toolbar

toolbarManager
reference to a toolbar manager object (E4ToolBarManager)
Returns:
the generated toolbar

ViewManager.newEditor

newEditor()

Public slot to generate a new empty editor.

ViewManager.newEditorView

newEditorView(fn, caller, filetype = "")

Public method to create a new editor displaying the given document.

fn
filename of this view
caller
reference to the editor calling this method
filetype
type of the source file (string)

ViewManager.newProject

newProject()

Public slot to handle the NewProject signal.

ViewManager.nextSplit

nextSplit()

Public slot used to move to the next split.

ViewManager.openFiles

openFiles(prog = None)

Public slot to open some files.

prog
name of file to be opened (string or QString)

ViewManager.openSourceFile

openSourceFile(fn, lineno = None, filetype = "", selection = None)

Public slot to display a file in an editor.

fn
name of file to be opened
lineno
line number to place the cursor at
filetype
type of the source file (string)
selection
tuple (start, end) of an area to be selected

ViewManager.preferencesChanged

preferencesChanged()

Public slot to handle the preferencesChanged signal.

This method performs the following actions

ViewManager.prevSplit

prevSplit()

Public slot used to move to the previous split.

ViewManager.printCurrentEditor

printCurrentEditor()

Public slot to print the contents of the current editor.

ViewManager.printEditor

printEditor(editor)

Public slot to print an editor.

editor
editor to be printed

ViewManager.printPreviewCurrentEditor

printPreviewCurrentEditor()

Public slot to show a print preview of the current editor.

ViewManager.projectClosed

projectClosed()

Public slot to handle the projectClosed signal.

ViewManager.projectFileRenamed

projectFileRenamed(oldfn, newfn)

Public slot to handle the projectFileRenamed signal.

oldfn
old filename of the file (string)
newfn
new filename of the file (string)

ViewManager.projectLexerAssociationsChanged

projectLexerAssociationsChanged()

Public slot to handle changes of the project lexer associations.

ViewManager.projectOpened

projectOpened()

Public slot to handle the projectOpened signal.

ViewManager.removeSplit

removeSplit()

Public method used to remove the current split view.

Returns:
Flag indicating successful deletion

ViewManager.saveAllEditors

saveAllEditors()

Public slot to save the contents of all editors.

ViewManager.saveAsCurrentEditor

saveAsCurrentEditor()

Public slot to save the contents of the current editor to a new file.

ViewManager.saveAsEditorEd

saveAsEditorEd(ed)

Public slot to save the contents of an editor to a new file.

ed
editor to be saved

ViewManager.saveCurrentEditor

saveCurrentEditor()

Public slot to save the contents of the current editor.

ViewManager.saveCurrentEditorToProject

saveCurrentEditorToProject()

Public slot to save the contents of the current editor to the current project.

ViewManager.saveEditor

saveEditor(fn)

Public method to save a named editor file.

fn
filename of editor to be saved (string)
Returns:
flag indicating success (boolean)

ViewManager.saveEditorEd

saveEditorEd(ed)

Public slot to save the contents of an editor.

ed
editor to be saved
Returns:
flag indicating success (boolean)

ViewManager.saveEditorToProjectEd

saveEditorToProjectEd(ed)

Public slot to save the contents of an editor to the current project.

ed
editor to be saved

ViewManager.saveEditorsList

saveEditorsList(editors)

Public slot to save a list of editors.

editors
list of editors to be saved

ViewManager.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)
Raises RuntimeError:
Not implemented

ViewManager.setFileLine

setFileLine(fn, line, error = False, syntaxError = False)

Public method to update the user interface when the current program or line changes.

fn
filename of editor to update (string)
line
line number to highlight (int)
error
flag indicating an error highlight (boolean)
syntaxError
flag indicating a syntax error

ViewManager.setReferences

setReferences(ui, dbs)

Public method to set some references needed later on.

ui
reference to the main user interface
dbs
reference to the debug server object

ViewManager.setSbInfo

setSbInfo(sbFile, sbLine, sbPos, sbWritable, sbEncoding, sbLanguage, sbEol)

Public method to transfer statusbar info from the user interface to viewmanager.

sbFile
reference to the file part of the statusbar (E4SqueezeLabelPath)
sbLine
reference to the line number part of the statusbar (QLabel)
sbPos
reference to the character position part of the statusbar (QLabel)
sbWritable
reference to the writability indicator part of the statusbar (QLabel)
sbEncoding
reference to the encoding indicator part of the statusbar (QLabel)
sbLanguage
reference to the language indicator part of the statusbar (QLabel)
sbEol
reference to the eol indicator part of the statusbar (QLabel)

ViewManager.setSplitOrientation

setSplitOrientation(orientation)

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

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

ViewManager.showDebugSource

showDebugSource(fn, line)

Public method to open the given file and highlight the given line in it.

fn
filename of editor to update (string)
line
line number to highlight (int)

ViewManager.showWindowMenu

showWindowMenu(windowMenu)

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

windowMenu
reference to the window menu
Raises RuntimeError:
Not implemented

ViewManager.textForFind

textForFind(getCurrentWord = True)

Public method to determine the selection or the current word for the next find operation.

getCurrentWord
flag indicating to return the current word, if no selected text was found (boolean)
Returns:
selection or current word (QString)

ViewManager.tile

tile()

Public method to tile the managed windows.

Raises RuntimeError:
Not implemented

ViewManager.unhighlight

unhighlight(current = False)

Public method to switch off all highlights.

current
flag indicating only the current editor should be unhighlighted (boolean)
Up