eric4.Project.ProjectFormsBrowser

Module implementing a class used to display the forms part of the project.

Classes

ProjectFormsBrowser A class used to display the forms part of the project.

Functions

None


ProjectFormsBrowser

A class used to display the forms part of the project.

Signals

appendStderr(string)
emitted after something was received from a QProcess on stderr
appendStdout(string)
emitted after something was received from a QProcess on stdout
closeSourceWindow(string)
emitted after a file has been removed/deleted from the project
sourceFile(string)
emitted to open a forms file in an editor
trpreview(string list)
emitted to preview form files in the translations previewer
uipreview(string)
emitted to preview a forms file

Derived from

ProjectBaseBrowser

Methods

ProjectFormsBrowser Constructor
__TRPreview Private slot to handle the Preview translations action.
__UIPreview Private slot to handle the Preview menu action.
__addFormFiles Private method to add form files to the project.
__addFormsDirectory Private method to add form files of a directory to the project.
__compileAllForms Private method to compile all forms to source files.
__compileForm Private method to compile a form to a source file.
__compileSelectedForms Private method to compile selected forms to source files.
__compileUI Privat method to compile a .ui file to a .py/.rb file.
__compileUIDone Private slot to handle the finished signal of the pyuic/rbuic process.
__deleteFile Private method to delete a form file from the project.
__generateDialogCode Private method to generate dialog code for the form (Qt4 only)
__generateSubclass Private method to generate a subclass for the form (Qt3 only).
__itemsHaveDesignerHeaderFiles Private method to check, if items contain designer header files.
__newForm Private slot to handle the New Form menu action.
__openFile Private slot to handle the Open menu action.
__openFileInEditor Private slot to handle the Open in Editor menu action.
__readStderr Private slot to handle the readyReadStandardError signal of the pyuic/rbuic process.
__readStdout Private slot to handle the readyReadStandardOutput signal of the pyuic/rbuic process.
__showPopupMenu Private slot called by the menu aboutToShow signal.
__showPopupMenuDir Private slot called by the dirMenu aboutToShow signal.
__showPopupMenuDirMulti Private slot called by the dirMultiMenu aboutToShow signal.
__showPopupMenuMulti Private slot called by the multiMenu aboutToShow signal.
_createPopupMenus Protected overloaded method to generate the popup menu.
_showContextMenu Protected slot to show the context menu.
compileChangedForms Public method to compile all changed forms to source files.

ProjectFormsBrowser (Constructor)

ProjectFormsBrowser(project, qtdir, qt4dir, parent = None)

Constructor

project
reference to the project object
qtdir
path of the Qt installation directory (string)
qt4dir
path of the Qt4 installation directory (string)
parent
parent widget of this browser (QWidget)

ProjectFormsBrowser.__TRPreview

__TRPreview()

Private slot to handle the Preview translations action.

ProjectFormsBrowser.__UIPreview

__UIPreview()

Private slot to handle the Preview menu action.

ProjectFormsBrowser.__addFormFiles

__addFormFiles()

Private method to add form files to the project.

ProjectFormsBrowser.__addFormsDirectory

__addFormsDirectory()

Private method to add form files of a directory to the project.

ProjectFormsBrowser.__compileAllForms

__compileAllForms()

Private method to compile all forms to source files.

ProjectFormsBrowser.__compileForm

__compileForm()

Private method to compile a form to a source file.

ProjectFormsBrowser.__compileSelectedForms

__compileSelectedForms()

Private method to compile selected forms to source files.

ProjectFormsBrowser.__compileUI

__compileUI(fn, noDialog = False, progress = None, subclass = False)

Privat method to compile a .ui file to a .py/.rb file.

fn
filename of the .ui file to be compiled
noDialog
flag indicating silent operations
progress
reference to the progress dialog
subclass
flag indicating, if a subclass generation is to be done
Returns:
reference to the compile process (QProcess)

ProjectFormsBrowser.__compileUIDone

__compileUIDone(exitCode, exitStatus)

Private slot to handle the finished signal of the pyuic/rbuic process.

exitCode
exit code of the process (integer)
exitStatus
exit status of the process (QProcess.ExitStatus)

ProjectFormsBrowser.__deleteFile

__deleteFile()

Private method to delete a form file from the project.

ProjectFormsBrowser.__generateDialogCode

__generateDialogCode()

Private method to generate dialog code for the form (Qt4 only)

ProjectFormsBrowser.__generateSubclass

__generateSubclass()

Private method to generate a subclass for the form (Qt3 only).

ProjectFormsBrowser.__itemsHaveDesignerHeaderFiles

__itemsHaveDesignerHeaderFiles(items)

Private method to check, if items contain designer header files.

items
items to check (list of ProjectBrowserFileItems)
Returns:
flag indicating designer header files were found (boolean)

ProjectFormsBrowser.__newForm

__newForm()

Private slot to handle the New Form menu action.

ProjectFormsBrowser.__openFile

__openFile()

Private slot to handle the Open menu action.

This uses the projects UI type to determine the Qt Designer version to use.

ProjectFormsBrowser.__openFileInEditor

__openFileInEditor()

Private slot to handle the Open in Editor menu action.

ProjectFormsBrowser.__readStderr

__readStderr()

Private slot to handle the readyReadStandardError signal of the pyuic/rbuic process.

ProjectFormsBrowser.__readStdout

__readStdout()

Private slot to handle the readyReadStandardOutput signal of the pyuic/rbuic process.

ProjectFormsBrowser.__showPopupMenu

__showPopupMenu()

Private slot called by the menu aboutToShow signal.

ProjectFormsBrowser.__showPopupMenuDir

__showPopupMenuDir()

Private slot called by the dirMenu aboutToShow signal.

ProjectFormsBrowser.__showPopupMenuDirMulti

__showPopupMenuDirMulti()

Private slot called by the dirMultiMenu aboutToShow signal.

ProjectFormsBrowser.__showPopupMenuMulti

__showPopupMenuMulti()

Private slot called by the multiMenu aboutToShow signal.

ProjectFormsBrowser._createPopupMenus

_createPopupMenus()

Protected overloaded method to generate the popup menu.

ProjectFormsBrowser._showContextMenu

_showContextMenu(coord)

Protected slot to show the context menu.

coord
the position of the mouse pointer (QPoint)

ProjectFormsBrowser.compileChangedForms

compileChangedForms()

Public method to compile all changed forms to source files.

Up