eric3.UI.UserInterface

Module implementing the main user interface.

Classes

Redirector Helper class used to redirect stdout and stderr to the log window
UserInterface Class implementing the main user interface.

Functions

None

Redirector

Helper class used to redirect stdout and stderr to the log window

Signals

appendStderr(string)
emitted to write data to stderr logger
appendStdout(string)
emitted to write data to stdout logger

Derived from

QObject

Methods

Redirector Constructor
bufferedWrite Private method returning number of characters to write.
flush Public method used to flush the buffered data.
nWrite Private method used to write data.
write Public method used to write data.

Redirector (Constructor)

Redirector(stderr)

Constructor

stderr
flag indicating stderr is being redirected

Redirector.bufferedWrite

bufferedWrite()

Private method returning number of characters to write.

Returns:
number of characters buffered or length of buffered line

Redirector.flush

flush()

Public method used to flush the buffered data.

Redirector.nWrite

nWrite(n)

Private method used to write data.

n
max numebr of bytes to write

Redirector.write

write(s)

Public method used to write data.

s
data to be written (it must support the str-method)

Up

UserInterface

Class implementing the main user interface.

Signals

appendStderr(string)
emitted to write data to stderr logger
appendStdout(string)
emitted to write data to stdout logger
preferencesChanged()
emitted after the preferences were changed

Derived from

QMainWindow

Methods

UserInterface Constructor
closeEvent Private event handler for the close event.
createDockWindow Private method to create a dock window with common properties.
getActions Public method to get a list of all actions.
getDebugServer Public method to retrieve the debug server object.
getDebugger Public method to retrieve the debugger object
getProject Public method to retrieve the project object.
getRefactoring Public method to retrieve the refactoring object
getViewManager Public method to retrieve the viewmanager object.
getWizards Public method to retrieve the wizards object
handleAbout Private slot to handle the About dialog.
handleAboutQt Private slot to handle the About Qt dialog.
handleAssistant Private slot to start the Qt-Assistant executable.
handleConfigShortcuts Private slot to configure the keyboard shortcuts.
handleDeleteScript Public method to delete a script.
handleDesigner Private slot to start the Qt-Designer executable.
handleEditorOpened Public slot to handle the editorOpened signal.
handleEricDoc Private slot to show the Eric documentation.
handleExecuteDocumentAsScript Private slot to handle the execute document as script menu action.
handleExecuteScript Public method to execute a script.
handleExportShortcuts Private slot to export the keyboard shortcuts.
handleFirstScriptAdded Private slot to handle the firstScriptAdded signal
handleHelpViewer Private slot to start an empty help viewer.
handleImportShortcuts Private slot to import the keyboard shortcuts.
handleLastEditorClosed Public slot to handle the lastEditorClosed signal.
handleLastScriptDeleted Private slot to handle the lastScriptDeleted signal
handleLineUpTBs Private slot to handle the line up toolbars menu entry.
handleLinguist Private slot to start the Qt-Linguist executable.
handleLoadScript Private slot to handle the load script menu action.
handleLogViewer Private slot to handle the toggle of the Log Viewer window.
handleNewProject Public slot to handle the NewProject signal.
handlePixmap Private slot to show a pixmap in a dialog.
handlePreferences Private slot to set the preferences.
handleProgramChange Public slot to handle the programChange signal.
handleProjectBrowser Private slot to handle the toggle of the Project Browser window.
handleProjectClosed Public slot to handle the projectClosed signal.
handleProjectOpened Public slot to handle the projectOpened signal.
handlePythonDoc Private slot to show the Python documentation.
handleQtDoc Private slot to show the Qt documentation.
handleQuit Private method to quit the application.
handleReportBug Private slot to handle the Report Bug dialog.
handleSBV Private slot to handle the toggle of the Shell/Browser/Variables window.
handleShell Private slot to handle the toggle of the Shell window .
handleShowToolbarsMenu Private slot to display the Toolbars menu.
handleShowToolsMenu Private slot to display the Tools menu.
handleShowWindowMenu Private slot to display the Window menu.
handleTBMenu Private method to handle the toggle of a toolbar.
handleToolExecute Private slot to execute a particular tool.
handleToolExited Private slot to handle the processExited signal of a tool process.
handleToolStderr Private slot to handle the readyReadStderr signal of a tool process.
handleToolStdout Private slot to handle the readyReadStdout signal of a tool process.
handleToolsConfiguration Private slot to handle the tools configuration menu entry.
handleUnittest Private slot for displaying the unittest dialog.
handleVersions Private slot to handle the Versions dialog.
initActions Private method to define the user interface actions.
initEricDocAction Private slot to initialize the action to show the eric3 documentation.
initMenus Private slot to create the menus.
initPythonDocAction Private slot to initilize the action to show the Python documentation.
initQtDocAction Private slot to initilize the action to show the Qt documentation.
initStatusbar Private slot to set up the status bar.
initToolbars Private slot to create the toolbars.
launchHelpViewer Private slot to start the help viewer.
processArgs Public method to process the command line args passed to the UI.
setWindowCaption Private method to set the caption of the Main Window.
setupDockWindow Private method to configure the dock window created with createDockWindow().
showLogTab Public method to show a particular Log-Viewer tab.
shutdown Private method to perform all neccessary steps to close down the IDE.
toggleWindow Private method to toggle a workspace editor window.

UserInterface (Constructor)

UserInterface(loc, splash)

Constructor

loc
locale to be used by the UI (string)
splash
reference to the splashscreen (UI.SplashScreen.SplashScreen)

UserInterface.closeEvent

closeEvent(event)

Private event handler for the close event.

This event handler saves the preferences.

event
close event (QCloseEvent)

UserInterface.createDockWindow

createDockWindow()

Private method to create a dock window with common properties.

Returns:
the generated dock window (QDockWindow)

UserInterface.getActions

getActions()

Public method to get a list of all actions.

Returns:
list of all actions (list of QAction)

UserInterface.getDebugServer

getDebugServer()

Public method to retrieve the debug server object.

Returns:
reference to the debug server object

UserInterface.getDebugger

getDebugger()

Public method to retrieve the debugger object

Returns:
reference to the debug UI object

UserInterface.getProject

getProject()

Public method to retrieve the project object.

Returns:
reference to the project object

UserInterface.getRefactoring

getRefactoring()

Public method to retrieve the refactoring object

Returns:
reference to the refactoring object

UserInterface.getViewManager

getViewManager()

Public method to retrieve the viewmanager object.

Returns:
reference to the viewmanager object

UserInterface.getWizards

getWizards()

Public method to retrieve the wizards object

Returns:
reference to the wizards object

UserInterface.handleAbout

handleAbout()

Private slot to handle the About dialog.

UserInterface.handleAboutQt

handleAboutQt()

Private slot to handle the About Qt dialog.

UserInterface.handleAssistant

handleAssistant()

Private slot to start the Qt-Assistant executable.

UserInterface.handleConfigShortcuts

handleConfigShortcuts()

Private slot to configure the keyboard shortcuts.

UserInterface.handleDeleteScript

handleDeleteScript()

Public method to delete a script.

UserInterface.handleDesigner

handleDesigner(fn=None)

Private slot to start the Qt-Designer executable.

fn
filename of the form to be opened

UserInterface.handleEditorOpened

handleEditorOpened()

Public slot to handle the editorOpened signal.

UserInterface.handleEricDoc

handleEricDoc()

Private slot to show the Eric documentation.

UserInterface.handleExecuteDocumentAsScript

handleExecuteDocumentAsScript()

Private slot to handle the execute document as script menu action.

UserInterface.handleExecuteScript

handleExecuteScript()

Public method to execute a script.

UserInterface.handleExportShortcuts

handleExportShortcuts()

Private slot to export the keyboard shortcuts.

UserInterface.handleFirstScriptAdded

handleFirstScriptAdded()

Private slot to handle the firstScriptAdded signal

UserInterface.handleHelpViewer

handleHelpViewer()

Private slot to start an empty help viewer.

UserInterface.handleImportShortcuts

handleImportShortcuts()

Private slot to import the keyboard shortcuts.

UserInterface.handleLastEditorClosed

handleLastEditorClosed()

Public slot to handle the lastEditorClosed signal.

UserInterface.handleLastScriptDeleted

handleLastScriptDeleted()

Private slot to handle the lastScriptDeleted signal

UserInterface.handleLineUpTBs

handleLineUpTBs()

Private slot to handle the line up toolbars menu entry.

UserInterface.handleLinguist

handleLinguist(fn=None)

Private slot to start the Qt-Linguist executable.

fn
filename of the translation file to be opened

UserInterface.handleLoadScript

handleLoadScript()

Private slot to handle the load script menu action.

UserInterface.handleLogViewer

handleLogViewer()

Private slot to handle the toggle of the Log Viewer window.

UserInterface.handleNewProject

handleNewProject()

Public slot to handle the NewProject signal.

UserInterface.handlePixmap

handlePixmap(fn)

Private slot to show a pixmap in a dialog.

UserInterface.handlePreferences

handlePreferences()

Private slot to set the preferences.

UserInterface.handleProgramChange

handleProgramChange(fn)

Public slot to handle the programChange signal.

This primarily is here to set the currentProg variable.

fn
filename to be set as current prog (string)

UserInterface.handleProjectBrowser

handleProjectBrowser()

Private slot to handle the toggle of the Project Browser window.

UserInterface.handleProjectClosed

handleProjectClosed()

Public slot to handle the projectClosed signal.

UserInterface.handleProjectOpened

handleProjectOpened()

Public slot to handle the projectOpened signal.

UserInterface.handlePythonDoc

handlePythonDoc()

Private slot to show the Python documentation.

UserInterface.handleQtDoc

handleQtDoc()

Private slot to show the Qt documentation.

UserInterface.handleQuit

handleQuit()

Private method to quit the application.

UserInterface.handleReportBug

handleReportBug()

Private slot to handle the Report Bug dialog.

UserInterface.handleSBV

handleSBV()

Private slot to handle the toggle of the Shell/Browser/Variables window.

UserInterface.handleShell

handleShell()

Private slot to handle the toggle of the Shell window .

UserInterface.handleShowToolbarsMenu

handleShowToolbarsMenu()

Private slot to display the Toolbars menu.

UserInterface.handleShowToolsMenu

handleShowToolsMenu()

Private slot to display the Tools menu.

UserInterface.handleShowWindowMenu

handleShowWindowMenu()

Private slot to display the Window menu.

UserInterface.handleTBMenu

handleTBMenu(idx)

Private method to handle the toggle of a toolbar.

idx
index of the selected toolbar (integer)

UserInterface.handleToolExecute

handleToolExecute(idx)

Private slot to execute a particular tool.

idx
index into the list of configured tools

UserInterface.handleToolExited

handleToolExited()

Private slot to handle the processExited signal of a tool process.

UserInterface.handleToolStderr

handleToolStderr()

Private slot to handle the readyReadStderr signal of a tool process.

UserInterface.handleToolStdout

handleToolStdout()

Private slot to handle the readyReadStdout signal of a tool process.

UserInterface.handleToolsConfiguration

handleToolsConfiguration()

Private slot to handle the tools configuration menu entry.

UserInterface.handleUnittest

handleUnittest(prog=None)

Private slot for displaying the unittest dialog.

prog
the python program to be opened

UserInterface.handleVersions

handleVersions()

Private slot to handle the Versions dialog.

UserInterface.initActions

initActions()

Private method to define the user interface actions.

UserInterface.initEricDocAction

initEricDocAction()

Private slot to initialize the action to show the eric3 documentation.

UserInterface.initMenus

initMenus()

Private slot to create the menus.

UserInterface.initPythonDocAction

initPythonDocAction()

Private slot to initilize the action to show the Python documentation.

UserInterface.initQtDocAction

initQtDocAction()

Private slot to initilize the action to show the Qt documentation.

UserInterface.initStatusbar

initStatusbar()

Private slot to set up the status bar.

UserInterface.initToolbars

initToolbars()

Private slot to create the toolbars.

UserInterface.launchHelpViewer

launchHelpViewer(home)

Private slot to start the help viewer.

home
filename of to be shown

UserInterface.processArgs

processArgs(args)

Public method to process the command line args passed to the UI.

args
list of files to open
The args are processed one at a time, if the arg ends in .py, the file is opened in the text editor. Once the last .py file is reached, any arguments after that are considered debug arguments to the program for the debugger. (The assumption being that you are launching eric3 to debug a script that takes args.). All files prior to the last .py encountered are opened in the text editor, unless the argument ends in .e3p or .e3pz, then it is opened as a project file.

UserInterface.setWindowCaption

setWindowCaption(project=None)

Private method to set the caption of the Main Window.

project
project name to be displayed (string or QString)

UserInterface.setupDockWindow

setupDockWindow(dock, where, widget, caption)

Private method to configure the dock window created with createDockWindow().

caption
caption of the dock window (string or QString)
dock
the dock window (QDockWindow)
where
dock area to be docked to (QDockArea)
widget
widget to be shown in the dock window (QWidget)

UserInterface.showLogTab

showLogTab(tabname)

Public method to show a particular Log-Viewer tab.

tabname
string naming the tab to be shown (string)

UserInterface.shutdown

shutdown()

Private method to perform all neccessary steps to close down the IDE.

Returns:
flag indicating success

UserInterface.toggleWindow

toggleWindow(w)

Private method to toggle a workspace editor window.

w
reference to the workspace editor window

Up