Documentation/Source/eric5.Project.ProjectFormsBrowser.html

Sun, 18 May 2014 14:13:09 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 18 May 2014 14:13:09 +0200
changeset 3591
2f2a4a76dd22
parent 3018
70924c0bdaf1
child 3848
df49a5ab1c9c
permissions
-rw-r--r--

Corrected a bunch of source docu issues.

<!DOCTYPE html>
<html><head>
<title>eric5.Project.ProjectFormsBrowser</title>
<meta charset="UTF-8">
<style>
body {
    background: #EDECE6;
    margin: 0em 1em 10em 1em;
    color: black;
}

h1 { color: white; background: #85774A; }
h2 { color: white; background: #85774A; }
h3 { color: white; background: #9D936E; }
h4 { color: white; background: #9D936E; }
    
a { color: #BA6D36; }

</style>
</head>
<body><a NAME="top" ID="top"></a>
<h1>eric5.Project.ProjectFormsBrowser</h1>
<p>
Module implementing a class used to display the forms part of the project.
</p>
<h3>Global Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Classes</h3>
<table>
<tr>
<td><a href="#ProjectFormsBrowser">ProjectFormsBrowser</a></td>
<td>A class used to display the forms part of the project.</td>
</tr>
</table>
<h3>Functions</h3>
<table>
<tr><td>None</td></tr>
</table>
<hr /><hr />
<a NAME="ProjectFormsBrowser" ID="ProjectFormsBrowser"></a>
<h2>ProjectFormsBrowser</h2>
<p>
    A class used to display the forms part of the project.
</p><h3>Signals</h3>
<dl>
<dt>appendStderr(str)</dt>
<dd>
emitted after something was received from
        a QProcess on stderr
</dd><dt>closeSourceWindow(str)</dt>
<dd>
emitted after a file has been
        removed/deleted from the project
</dd><dt>menusAboutToBeCreated()</dt>
<dd>
emitted when the context menus are about to
        be created. This is the right moment to add or remove hook methods.
</dd><dt>showMenu(str, QMenu)</dt>
<dd>
emitted when a menu is about to be shown. The
        name of the menu and a reference to the menu are given.
</dd><dt>sourceFile(str)</dt>
<dd>
emitted to open a forms file in an editor
</dd><dt>trpreview(list of str)</dt>
<dd>
emitted to preview form files in the
        translations previewer
</dd><dt>uipreview(str)</dt>
<dd>
emitted to preview a forms file
</dd>
</dl>
<h3>Derived from</h3>
ProjectBaseBrowser
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Class Methods</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#ProjectFormsBrowser.__init__">ProjectFormsBrowser</a></td>
<td>Constructor</td>
</tr><tr>
<td><a href="#ProjectFormsBrowser.__TRPreview">__TRPreview</a></td>
<td>Private slot to handle the Preview translations action.</td>
</tr><tr>
<td><a href="#ProjectFormsBrowser.__UIPreview">__UIPreview</a></td>
<td>Private slot to handle the Preview menu action.</td>
</tr><tr>
<td><a href="#ProjectFormsBrowser.__addFormFiles">__addFormFiles</a></td>
<td>Private method to add form files to the project.</td>
</tr><tr>
<td><a href="#ProjectFormsBrowser.__addFormsDirectory">__addFormsDirectory</a></td>
<td>Private method to add form files of a directory to the project.</td>
</tr><tr>
<td><a href="#ProjectFormsBrowser.__compileAllForms">__compileAllForms</a></td>
<td>Private method to compile all forms to source files.</td>
</tr><tr>
<td><a href="#ProjectFormsBrowser.__compileForm">__compileForm</a></td>
<td>Private method to compile a form to a source file.</td>
</tr><tr>
<td><a href="#ProjectFormsBrowser.__compileSelectedForms">__compileSelectedForms</a></td>
<td>Private method to compile selected forms to source files.</td>
</tr><tr>
<td><a href="#ProjectFormsBrowser.__compileUI">__compileUI</a></td>
<td>Private method to compile a .ui file to a .py/.rb file.</td>
</tr><tr>
<td><a href="#ProjectFormsBrowser.__compileUIDone">__compileUIDone</a></td>
<td>Private slot to handle the finished signal of the pyuic/rbuic process.</td>
</tr><tr>
<td><a href="#ProjectFormsBrowser.__deleteFile">__deleteFile</a></td>
<td>Private method to delete a form file from the project.</td>
</tr><tr>
<td><a href="#ProjectFormsBrowser.__generateDialogCode">__generateDialogCode</a></td>
<td>Private method to generate dialog code for the form (Qt4 only).</td>
</tr><tr>
<td><a href="#ProjectFormsBrowser.__newForm">__newForm</a></td>
<td>Private slot to handle the New Form menu action.</td>
</tr><tr>
<td><a href="#ProjectFormsBrowser.__newUiForm">__newUiForm</a></td>
<td>Private slot to handle the New Form menu action for Qt-related projects.</td>
</tr><tr>
<td><a href="#ProjectFormsBrowser.__openFile">__openFile</a></td>
<td>Private slot to handle the Open menu action.</td>
</tr><tr>
<td><a href="#ProjectFormsBrowser.__openFileInEditor">__openFileInEditor</a></td>
<td>Private slot to handle the Open in Editor menu action.</td>
</tr><tr>
<td><a href="#ProjectFormsBrowser.__readStderr">__readStderr</a></td>
<td>Private slot to handle the readyReadStandardError signal of the pyuic/rbuic process.</td>
</tr><tr>
<td><a href="#ProjectFormsBrowser.__readStdout">__readStdout</a></td>
<td>Private slot to handle the readyReadStandardOutput signal of the pyuic/rbuic process.</td>
</tr><tr>
<td><a href="#ProjectFormsBrowser.__showContextMenu">__showContextMenu</a></td>
<td>Private slot called by the menu aboutToShow signal.</td>
</tr><tr>
<td><a href="#ProjectFormsBrowser.__showContextMenuBack">__showContextMenuBack</a></td>
<td>Private slot called by the backMenu aboutToShow signal.</td>
</tr><tr>
<td><a href="#ProjectFormsBrowser.__showContextMenuDir">__showContextMenuDir</a></td>
<td>Private slot called by the dirMenu aboutToShow signal.</td>
</tr><tr>
<td><a href="#ProjectFormsBrowser.__showContextMenuDirMulti">__showContextMenuDirMulti</a></td>
<td>Private slot called by the dirMultiMenu aboutToShow signal.</td>
</tr><tr>
<td><a href="#ProjectFormsBrowser.__showContextMenuMulti">__showContextMenuMulti</a></td>
<td>Private slot called by the multiMenu aboutToShow signal.</td>
</tr><tr>
<td><a href="#ProjectFormsBrowser._contextMenuRequested">_contextMenuRequested</a></td>
<td>Protected slot to show the context menu.</td>
</tr><tr>
<td><a href="#ProjectFormsBrowser._createPopupMenus">_createPopupMenus</a></td>
<td>Protected overloaded method to generate the popup menu.</td>
</tr><tr>
<td><a href="#ProjectFormsBrowser._initHookMethods">_initHookMethods</a></td>
<td>Protected method to initialize the hooks dictionary.</td>
</tr><tr>
<td><a href="#ProjectFormsBrowser._openItem">_openItem</a></td>
<td>Protected slot to handle the open popup menu entry.</td>
</tr><tr>
<td><a href="#ProjectFormsBrowser.compileChangedForms">compileChangedForms</a></td>
<td>Public method to compile all changed forms to source files.</td>
</tr><tr>
<td><a href="#ProjectFormsBrowser.handlePreferencesChanged">handlePreferencesChanged</a></td>
<td>Public slot used to handle the preferencesChanged signal.</td>
</tr>
</table>
<h3>Static Methods</h3>
<table>
<tr><td>None</td></tr>
</table>
<a NAME="ProjectFormsBrowser.__init__" ID="ProjectFormsBrowser.__init__"></a>
<h4>ProjectFormsBrowser (Constructor)</h4>
<b>ProjectFormsBrowser</b>(<i>project, parent=None</i>)
<p>
        Constructor
</p><dl>
<dt><i>project</i></dt>
<dd>
reference to the project object
</dd><dt><i>parent</i></dt>
<dd>
parent widget of this browser (QWidget)
</dd>
</dl><a NAME="ProjectFormsBrowser.__TRPreview" ID="ProjectFormsBrowser.__TRPreview"></a>
<h4>ProjectFormsBrowser.__TRPreview</h4>
<b>__TRPreview</b>(<i></i>)
<p>
        Private slot to handle the Preview translations action.
</p><a NAME="ProjectFormsBrowser.__UIPreview" ID="ProjectFormsBrowser.__UIPreview"></a>
<h4>ProjectFormsBrowser.__UIPreview</h4>
<b>__UIPreview</b>(<i></i>)
<p>
        Private slot to handle the Preview menu action.
</p><a NAME="ProjectFormsBrowser.__addFormFiles" ID="ProjectFormsBrowser.__addFormFiles"></a>
<h4>ProjectFormsBrowser.__addFormFiles</h4>
<b>__addFormFiles</b>(<i></i>)
<p>
        Private method to add form files to the project.
</p><a NAME="ProjectFormsBrowser.__addFormsDirectory" ID="ProjectFormsBrowser.__addFormsDirectory"></a>
<h4>ProjectFormsBrowser.__addFormsDirectory</h4>
<b>__addFormsDirectory</b>(<i></i>)
<p>
        Private method to add form files of a directory to the project.
</p><a NAME="ProjectFormsBrowser.__compileAllForms" ID="ProjectFormsBrowser.__compileAllForms"></a>
<h4>ProjectFormsBrowser.__compileAllForms</h4>
<b>__compileAllForms</b>(<i></i>)
<p>
        Private method to compile all forms to source files.
</p><a NAME="ProjectFormsBrowser.__compileForm" ID="ProjectFormsBrowser.__compileForm"></a>
<h4>ProjectFormsBrowser.__compileForm</h4>
<b>__compileForm</b>(<i></i>)
<p>
        Private method to compile a form to a source file.
</p><a NAME="ProjectFormsBrowser.__compileSelectedForms" ID="ProjectFormsBrowser.__compileSelectedForms"></a>
<h4>ProjectFormsBrowser.__compileSelectedForms</h4>
<b>__compileSelectedForms</b>(<i></i>)
<p>
        Private method to compile selected forms to source files.
</p><a NAME="ProjectFormsBrowser.__compileUI" ID="ProjectFormsBrowser.__compileUI"></a>
<h4>ProjectFormsBrowser.__compileUI</h4>
<b>__compileUI</b>(<i>fn, noDialog=False, progress=None</i>)
<p>
        Private method to compile a .ui file to a .py/.rb file.
</p><dl>
<dt><i>fn</i></dt>
<dd>
filename of the .ui file to be compiled
</dd><dt><i>noDialog</i></dt>
<dd>
flag indicating silent operations
</dd><dt><i>progress</i></dt>
<dd>
reference to the progress dialog
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
reference to the compile process (QProcess)
</dd>
</dl><a NAME="ProjectFormsBrowser.__compileUIDone" ID="ProjectFormsBrowser.__compileUIDone"></a>
<h4>ProjectFormsBrowser.__compileUIDone</h4>
<b>__compileUIDone</b>(<i>exitCode, exitStatus</i>)
<p>
        Private slot to handle the finished signal of the pyuic/rbuic process.
</p><dl>
<dt><i>exitCode</i></dt>
<dd>
exit code of the process (integer)
</dd><dt><i>exitStatus</i></dt>
<dd>
exit status of the process (QProcess.ExitStatus)
</dd>
</dl><a NAME="ProjectFormsBrowser.__deleteFile" ID="ProjectFormsBrowser.__deleteFile"></a>
<h4>ProjectFormsBrowser.__deleteFile</h4>
<b>__deleteFile</b>(<i></i>)
<p>
        Private method to delete a form file from the project.
</p><a NAME="ProjectFormsBrowser.__generateDialogCode" ID="ProjectFormsBrowser.__generateDialogCode"></a>
<h4>ProjectFormsBrowser.__generateDialogCode</h4>
<b>__generateDialogCode</b>(<i></i>)
<p>
        Private method to generate dialog code for the form (Qt4 only).
</p><a NAME="ProjectFormsBrowser.__newForm" ID="ProjectFormsBrowser.__newForm"></a>
<h4>ProjectFormsBrowser.__newForm</h4>
<b>__newForm</b>(<i></i>)
<p>
        Private slot to handle the New Form menu action.
</p><a NAME="ProjectFormsBrowser.__newUiForm" ID="ProjectFormsBrowser.__newUiForm"></a>
<h4>ProjectFormsBrowser.__newUiForm</h4>
<b>__newUiForm</b>(<i>path</i>)
<p>
        Private slot to handle the New Form menu action for Qt-related
        projects.
</p><dl>
<dt><i>path</i></dt>
<dd>
full directory path for the new form file (string)
</dd>
</dl><a NAME="ProjectFormsBrowser.__openFile" ID="ProjectFormsBrowser.__openFile"></a>
<h4>ProjectFormsBrowser.__openFile</h4>
<b>__openFile</b>(<i></i>)
<p>
        Private slot to handle the Open menu action.
</p><a NAME="ProjectFormsBrowser.__openFileInEditor" ID="ProjectFormsBrowser.__openFileInEditor"></a>
<h4>ProjectFormsBrowser.__openFileInEditor</h4>
<b>__openFileInEditor</b>(<i></i>)
<p>
        Private slot to handle the Open in Editor menu action.
</p><a NAME="ProjectFormsBrowser.__readStderr" ID="ProjectFormsBrowser.__readStderr"></a>
<h4>ProjectFormsBrowser.__readStderr</h4>
<b>__readStderr</b>(<i></i>)
<p>
        Private slot to handle the readyReadStandardError signal of the
        pyuic/rbuic process.
</p><a NAME="ProjectFormsBrowser.__readStdout" ID="ProjectFormsBrowser.__readStdout"></a>
<h4>ProjectFormsBrowser.__readStdout</h4>
<b>__readStdout</b>(<i></i>)
<p>
        Private slot to handle the readyReadStandardOutput signal of the
        pyuic/rbuic process.
</p><a NAME="ProjectFormsBrowser.__showContextMenu" ID="ProjectFormsBrowser.__showContextMenu"></a>
<h4>ProjectFormsBrowser.__showContextMenu</h4>
<b>__showContextMenu</b>(<i></i>)
<p>
        Private slot called by the menu aboutToShow signal.
</p><a NAME="ProjectFormsBrowser.__showContextMenuBack" ID="ProjectFormsBrowser.__showContextMenuBack"></a>
<h4>ProjectFormsBrowser.__showContextMenuBack</h4>
<b>__showContextMenuBack</b>(<i></i>)
<p>
        Private slot called by the backMenu aboutToShow signal.
</p><a NAME="ProjectFormsBrowser.__showContextMenuDir" ID="ProjectFormsBrowser.__showContextMenuDir"></a>
<h4>ProjectFormsBrowser.__showContextMenuDir</h4>
<b>__showContextMenuDir</b>(<i></i>)
<p>
        Private slot called by the dirMenu aboutToShow signal.
</p><a NAME="ProjectFormsBrowser.__showContextMenuDirMulti" ID="ProjectFormsBrowser.__showContextMenuDirMulti"></a>
<h4>ProjectFormsBrowser.__showContextMenuDirMulti</h4>
<b>__showContextMenuDirMulti</b>(<i></i>)
<p>
        Private slot called by the dirMultiMenu aboutToShow signal.
</p><a NAME="ProjectFormsBrowser.__showContextMenuMulti" ID="ProjectFormsBrowser.__showContextMenuMulti"></a>
<h4>ProjectFormsBrowser.__showContextMenuMulti</h4>
<b>__showContextMenuMulti</b>(<i></i>)
<p>
        Private slot called by the multiMenu aboutToShow signal.
</p><a NAME="ProjectFormsBrowser._contextMenuRequested" ID="ProjectFormsBrowser._contextMenuRequested"></a>
<h4>ProjectFormsBrowser._contextMenuRequested</h4>
<b>_contextMenuRequested</b>(<i>coord</i>)
<p>
        Protected slot to show the context menu.
</p><dl>
<dt><i>coord</i></dt>
<dd>
the position of the mouse pointer (QPoint)
</dd>
</dl><a NAME="ProjectFormsBrowser._createPopupMenus" ID="ProjectFormsBrowser._createPopupMenus"></a>
<h4>ProjectFormsBrowser._createPopupMenus</h4>
<b>_createPopupMenus</b>(<i></i>)
<p>
        Protected overloaded method to generate the popup menu.
</p><a NAME="ProjectFormsBrowser._initHookMethods" ID="ProjectFormsBrowser._initHookMethods"></a>
<h4>ProjectFormsBrowser._initHookMethods</h4>
<b>_initHookMethods</b>(<i></i>)
<p>
        Protected method to initialize the hooks dictionary.
</p><p>
        Supported hook methods are:
        <ul>
        <li>compileForm: takes filename as parameter</li>
        <li>compileAllForms: takes list of filenames as parameter</li>
        <li>compileSelectedForms: takes list of filenames as parameter</li>
        <li>compileChangedForms: takes list of filenames as parameter</li>
        <li>generateDialogCode: takes filename as parameter</li>
        <li>newForm: takes full directory path of new file as parameter</li>
        <li>open: takes a filename as parameter</li>
        </ul>
</p><p>
        <b>Note</b>: Filenames are relative to the project directory, if not
        specified differently.
</p><a NAME="ProjectFormsBrowser._openItem" ID="ProjectFormsBrowser._openItem"></a>
<h4>ProjectFormsBrowser._openItem</h4>
<b>_openItem</b>(<i></i>)
<p>
        Protected slot to handle the open popup menu entry.
</p><a NAME="ProjectFormsBrowser.compileChangedForms" ID="ProjectFormsBrowser.compileChangedForms"></a>
<h4>ProjectFormsBrowser.compileChangedForms</h4>
<b>compileChangedForms</b>(<i></i>)
<p>
        Public method to compile all changed forms to source files.
</p><a NAME="ProjectFormsBrowser.handlePreferencesChanged" ID="ProjectFormsBrowser.handlePreferencesChanged"></a>
<h4>ProjectFormsBrowser.handlePreferencesChanged</h4>
<b>handlePreferencesChanged</b>(<i></i>)
<p>
        Public slot used to handle the preferencesChanged signal.
</p>
<div align="right"><a href="#top">Up</a></div>
<hr />
</body></html>

eric ide

mercurial