It defines the interface to be implemented by specific
viewmanager classes and all common methods.
Methods
|
|
|
|
__init__
|
__init__ (
self,
ui,
dbs,
)
Constructor
Arguments
- ui
- reference to the main user interface
- dbs
- reference to the debug server object
|
|
activeWindow
|
activeWindow ( self )
Private method to return the active (i.e. current) window.
Returns
reference to the active editor
|
|
addView
|
addView (
self,
win,
fn=None,
)
Private method to add a view (i.e. window)
Arguments
- win
- editor window to be added
- fn
- filename of this editor
|
|
canCascade
|
canCascade ( self )
Public method to signal if cascading of managed windows is available.
Returns
flag indicating cascading of windows is available
|
|
canTile
|
canTile ( self )
Public method to signal if tiling of managed windows is available.
Returns
flag indicating tiling of windows is available
|
|
cascade
|
cascade ( self )
Public method to cascade the managed windows.
|
|
checkActions
|
checkActions (
self,
editor,
setSb=1,
)
Private slot to check some actions for their enable/disable status and set the statusbar info.
Arguments
- editor
- editor window
- setSb
- flag indicating an update of the status bar is wanted (boolean)
|
|
checkDirty
|
checkDirty ( self, editor )
Private method to check dirty status and open a message window.
Arguments
- editor
- editor window to check
Returns
flag indicating successful reset of the dirty flag (boolean)
|
|
closeEditor
|
closeEditor ( self, editor )
Private method to close an editor window.
Arguments
- editor
- editor window to be closed
Returns
flag indicating success (boolean)
|
|
closeViewManager
|
closeViewManager ( self )
Public method to shutdown the viewmanager.
If it cannot close all editor windows, it aborts the shutdown process.
Returns
flag indicating success (boolean)
|
|
displayPythonFile
|
displayPythonFile (
self,
fn,
lineno=None,
)
Public slot to display a file in an editor.
Arguments
- fn
- name of file to be opened
- lineno
- line number to place the cursor at
|
|
getActiveName
|
getActiveName ( self )
Public method to retrieve the filename of the active window.
Returns
filename of active window (string)
|
|
getEditor
|
getEditor ( self, fn )
Private method to return the editor displaying the given file.
If there is no editor with the given file, a new editor window is
created.
Arguments
- fn
- filename to look for
Returns
tuple of two values giving a flag indicating a new window creation and
a reference to the editor displaying this file
|
|
getOpenFilenames
|
getOpenFilenames ( self )
Public method returning a list of the filenames of all editors.
Returns
list of all opened filenames (list of strings)
|
|
getSRHistory
|
getSRHistory ( self, key )
Private method to get the search or replace history list.
Arguments
- key
- list to return (must be
search or replace )
Returns
the requested history list (QStringList)
|
|
getWord
|
getWord (
self,
text,
index,
)
Private method to get the word at a position.
Arguments
- text
- text to look at (string or QString)
- index
- position to look at (int)
Returns
the word at that position
|
|
handleBreakpoint
|
handleBreakpoint (
self,
fn,
line,
state=Qt.LeftButton,
cond=None,
)
Public method to set or reset a breakpoint programatically.
Arguments
- fn
- filename of the breakpoint operation (string)
- line
- line number of the breakpoint operation (int)
- state
- mouse button state (combination of Qt.LeftButton
and Qt.ShiftButton)
- cond
- condition for the breakpoint (string or QString)
|
|
handleClearRecent
|
handleClearRecent ( self )
Private method to clear the recent files menu.
|
|
handleClose
|
handleClose ( self )
Public method to close the current window.
Returns
flag indicating success (boolean)
|
|
handleCloseAll
|
handleCloseAll ( self )
Private method to close all editor windows via file menu.
|
|
handleCloseWindow
|
handleCloseWindow ( self, fn )
Public method to close an arbitrary source editor.
Arguments
- fn
- filename of editor to be closed
Returns
flag indicating success (boolean)
|
|
handleConvertEOL
|
handleConvertEOL ( self )
Private method to handle the convert line end characters action.
|
|
handleEditComment
|
handleEditComment ( self )
Private method to handle the comment action.
|
|
handleEditCopy
|
handleEditCopy ( self )
Private method to handle the copy action.
|
|
handleEditCut
|
handleEditCut ( self )
Private method to handle the cut action.
|
|
handleEditDelete
|
handleEditDelete ( self )
Private method to handle the delete action.
|
|
handleEditDeselectAll
|
handleEditDeselectAll ( self )
Private method to handle the select all action.
|
|
handleEditIndent
|
handleEditIndent ( self )
Private method to handle the indent action.
|
|
handleEditPaste
|
handleEditPaste ( self )
Private method to handle the paste action.
|
|
handleEditRedo
|
handleEditRedo ( self )
Private method to handle the redo action.
|
|
handleEditSelectAll
|
handleEditSelectAll ( self )
Private method to handle the select all action.
|
|
handleEditSelectBrace
|
handleEditSelectBrace ( self )
Private method to handle the select to brace action.
|
|
handleEditUncomment
|
handleEditUncomment ( self )
Private method to handle the uncomment action.
|
|
handleEditUndo
|
handleEditUndo ( self )
Private method to handle the undo action.
|
|
handleEditUnindent
|
handleEditUnindent ( self )
Private method to handle the unindent action.
|
|
handleEditorOpened
|
handleEditorOpened ( self )
Private slot to handle the editorOpened signal.
|
|
handleEditorSaved
|
handleEditorSaved ( self, fn )
Public slot to handle the editorSaved signal.
It simply reemits the signal.
Arguments
- fn
- filename of the saved editor
|
|
handleExit
|
handleExit ( self )
Public method to handle the debugged program terminating.
|
|
handleGoto
|
handleGoto ( self )
Private method to handle the goto action.
|
|
handleGotoBrace
|
handleGotoBrace ( self )
Private method to handle the goto brace action.
|
|
handleLastEditorClosed
|
handleLastEditorClosed ( self )
Private slot to handle the lastEditorClosed signal.
|
|
handleModificationStatusChanged
|
handleModificationStatusChanged (
self,
m,
editor,
)
Private slot to handle the modificationStatusChanged signal.
Arguments
- m
- flag indicating the modification status (boolean)
- editor
- editor window changed
|
|
handleNewProject
|
handleNewProject ( self )
Public slot to handle the NewProject signal.
|
|
handleOpen
|
handleOpen ( self, prog=None )
Public slot to open a Python (or other) file.
Arguments
- prog
- name of file to be opened (string or QString)
|
|
handleOpenRecent
|
handleOpenRecent ( self, idx )
Private method to open a file from the list of rencently opened files.
Arguments
- idx
- index of the selected entry (int)
|
|
handlePreferencesChanged
|
handlePreferencesChanged ( self )
Public slot to handle the preferencesChanged signal.
This method performs the following actions
|
|
handleProjectClosed
|
handleProjectClosed ( self )
Public slot to handle the projectClosed signal.
|
|
handleProjectOpened
|
handleProjectOpened ( self )
Public slot to handle the projectOpened signal.
|
|
handlePythonFile
|
handlePythonFile (
self,
pyfn,
lineno=None,
)
Public method to handle the user selecting a file for display.
Arguments
- pyfn
- name of file to be opened
- lineno
- line number to place the cursor at
|
|
handleReplace
|
handleReplace ( self )
Private method to handle the replace action.
|
|
handleResetUI
|
handleResetUI ( self )
Public slot to handle the resetUI signal.
|
|
handleSearch
|
handleSearch ( self )
Private method to handle the search action.
|
|
handleSearchFiles
|
handleSearchFiles ( self )
Private method to handle the search in files action.
|
|
handleShowRecentMenu
|
handleShowRecentMenu ( self )
Private method to set up recent files menu.
|
|
handleShowWindowMenu
|
handleShowWindowMenu ( self, windowMenu )
Private method to set up the viewmanager part of the Window menu.
Arguments
- windowMenu
- reference to the window menu
|
|
handleToggleAll
|
handleToggleAll ( self )
Private method to handle the toggle all folds action.
|
|
handleToggleCurrent
|
handleToggleCurrent ( self )
Private method to handle the toggle current fold action.
|
|
handleZoom
|
handleZoom ( self )
Private method to handle the zoom action.
|
|
handleZoomIn
|
handleZoomIn ( self )
Private method to handle the zoom in action.
|
|
handleZoomOut
|
handleZoomOut ( self )
Private method to handle the zoom out action.
|
|
initActions
|
initActions ( self )
Public method defining the user interface actions.
|
|
initEditActions
|
initEditActions ( self )
Private method defining the user interface actions for the edit commands.
|
|
initEditMenu
|
initEditMenu ( self )
Public method to create the Edit menu
Returns
the generated menu
|
|
initEditToolbar
|
initEditToolbar ( self )
Public method to create the Edit toolbar
Returns
the generated toolbar
|
|
initFileActions
|
initFileActions ( self )
Private method defining the user interface actions for file handling.
|
|
initFileMenu
|
initFileMenu ( self )
Public method to create the File menu.
Returns
the generated menu
|
|
initFileToolbar
|
initFileToolbar ( self )
Public method to create the File toolbar.
Returns
the generated toolbar
|
|
initSearchActions
|
initSearchActions ( self )
Private method defining the user interface actions for the search commands.
|
|
initSearchMenu
|
initSearchMenu ( self )
Public method to create the Search menu
Returns
the generated menu
|
|
initSearchToolbar
|
initSearchToolbar ( self )
Public method to create the Search toolbar
Returns
the generated toolbar
|
|
initViewActions
|
initViewActions ( self )
Private method defining the user interface actions for the view commands.
|
|
initViewMenu
|
initViewMenu ( self )
Public method to create the View menu
Returns
the generated menu
|
|
initViewToolbar
|
initViewToolbar ( self )
Public method to create the View toolbar
Returns
the generated toolbar
|
|
initWindowActions
|
initWindowActions ( self )
Define the user interface actions for window handling.
|
|
newEditor
|
newEditor ( self )
Public slot to generate a new empty editor.
|
|
printCurrentEditor
|
printCurrentEditor ( self )
Public slot to print the contents of the current editor.
|
|
printCurrentEditorSel
|
printCurrentEditorSel ( self )
Public slot to print the selection of the current editor.
|
|
removeAllViews
|
removeAllViews ( self )
Private method to remove all views (i.e. windows)
|
|
removeView
|
removeView ( self, win )
Private method to remove a view (i.e. window)
Arguments
- win
- editor window to be removed
|
|
saveAllEditors
|
saveAllEditors ( self )
Public slot to save the contents of all editors.
|
|
saveAsCurrentEditor
|
saveAsCurrentEditor ( self )
Public slot to save the contents of the current editor to a new file.
|
|
saveCurrentEditor
|
saveCurrentEditor ( self )
Public slot to save the contents of the current editor.
|
|
saveCurrentEditorToProject
|
saveCurrentEditorToProject ( self )
Public slot to save the contents of the current editor to the current project.
|
|
saveEditor
|
saveEditor ( self, fn )
Public method to save a named editor file.
Arguments
- fn
- filename of editor to be saved (string)
Returns
flag indicating success (boolean)
|
|
setEditorName
|
setEditorName (
self,
editor,
newName,
)
Change the displayed name of the editor.
Arguments
- editor
- editor window to be changed
- newName
- new name to be shown (string or QString)
|
|
setFileLine
|
setFileLine (
self,
fn,
line,
error=0,
)
Public method to update the user interface when the current program or line changes.
Arguments
- fn
- filename of editor to update (string)
- line
- line number to highlight (int)
- error
- flag indicating an error highlight (boolean)
|
|
setSbFile
|
setSbFile (
self,
fn=None,
line=None,
pos=None,
)
Private method to set the file info in the status bar.
Arguments
- fn
- filename to display (string)
- line
- line number to display (int)
- pos
- character position to display (int)
|
|
setSbInfo
|
setSbInfo (
self,
sbFile,
sbLine,
sbPos,
sbWritable,
)
Public method to transfer statusbar info from the user interface to viewmanager.
Arguments
- sbFile
- reference to the file part of the statusbar
- sbLine
- reference to the line number part of the statusbar
- sbPos
- reference to the character position part of the statusbar
- sbWritable
- reference to the writability indicator part of the statusbar
|
|
showView
|
showView (
self,
win,
fn=None,
)
Private method to show a view (i.e. window)
Arguments
- win
- editor window to be shown
- fn
- filename of this editor
|
|
textForFind
|
textForFind ( self )
Private method to determine the selection or the current word for the next find operation.
Returns
selection or current word (QString)
|
|
tile
|
tile ( self )
Public method to tile the managed windows.
|
|
toggleWindow
|
toggleWindow ( self, w )
Private method to toggle a workspace window.
Arguments
- w
- editor window to be toggled
|
|
unhighlight
|
unhighlight ( self, current=0 )
Public method to switch off all highlights.
Arguments
- current
- flag indicating only the current editor should be unhighlighted
(boolean)
|