Documentation/Source/eric5.Project.ProjectResourcesBrowser.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
permissions
-rw-r--r--

Corrected a bunch of source docu issues.

<!DOCTYPE html>
<html><head>
<title>eric5.Project.ProjectResourcesBrowser</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.ProjectResourcesBrowser</h1>
<p>
Module implementing a class used to display the resources part of the project.
</p>
<h3>Global Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Classes</h3>
<table>
<tr>
<td><a href="#ProjectResourcesBrowser">ProjectResourcesBrowser</a></td>
<td>A class used to display the resources part of the project.</td>
</tr>
</table>
<h3>Functions</h3>
<table>
<tr><td>None</td></tr>
</table>
<hr /><hr />
<a NAME="ProjectResourcesBrowser" ID="ProjectResourcesBrowser"></a>
<h2>ProjectResourcesBrowser</h2>
<p>
    A class used to display the resources 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>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 resources file in an editor
</dd>
</dl>
<h3>Derived from</h3>
ProjectBaseBrowser
<h3>Class Attributes</h3>
<table>
<tr><td>RCFilenameFormatPython</td></tr><tr><td>RCFilenameFormatRuby</td></tr>
</table>
<h3>Class Methods</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#ProjectResourcesBrowser.__init__">ProjectResourcesBrowser</a></td>
<td>Constructor</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__addResourceFiles">__addResourceFiles</a></td>
<td>Private method to add resource files to the project.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__addResourcesDirectory">__addResourcesDirectory</a></td>
<td>Private method to add resource files of a directory to the project.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__checkResourcesNewer">__checkResourcesNewer</a></td>
<td>Private method to check, if any file referenced in a resource file is newer than a given time.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__compileAllResources">__compileAllResources</a></td>
<td>Private method to compile all resources to source files.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__compileQRC">__compileQRC</a></td>
<td>Private method to compile a .qrc file to a .py file.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__compileQRCDone">__compileQRCDone</a></td>
<td>Private slot to handle the finished signal of the compile process.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__compileResource">__compileResource</a></td>
<td>Private method to compile a resource to a source file.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__compileSelectedResources">__compileSelectedResources</a></td>
<td>Private method to compile selected resources to source files.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__deleteFile">__deleteFile</a></td>
<td>Private method to delete a resource file from the project.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__newResource">__newResource</a></td>
<td>Private slot to handle the New Resource menu action.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__openFile">__openFile</a></td>
<td>Private slot to handle the Open menu action.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__readStderr">__readStderr</a></td>
<td>Private slot to handle the readyReadStandardError signal of the pyrcc4/rbrcc process.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__readStdout">__readStdout</a></td>
<td>Private slot to handle the readyReadStandardOutput signal of the pyrcc4/rbrcc process.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__showContextMenu">__showContextMenu</a></td>
<td>Private slot called by the menu aboutToShow signal.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__showContextMenuBack">__showContextMenuBack</a></td>
<td>Private slot called by the backMenu aboutToShow signal.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__showContextMenuDir">__showContextMenuDir</a></td>
<td>Private slot called by the dirMenu aboutToShow signal.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__showContextMenuDirMulti">__showContextMenuDirMulti</a></td>
<td>Private slot called by the dirMultiMenu aboutToShow signal.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__showContextMenuMulti">__showContextMenuMulti</a></td>
<td>Private slot called by the multiMenu aboutToShow signal.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser._contextMenuRequested">_contextMenuRequested</a></td>
<td>Protected slot to show the context menu.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser._createPopupMenus">_createPopupMenus</a></td>
<td>Protected overloaded method to generate the popup menu.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser._initHookMethods">_initHookMethods</a></td>
<td>Protected method to initialize the hooks dictionary.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser._openItem">_openItem</a></td>
<td>Protected slot to handle the open popup menu entry.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.compileChangedResources">compileChangedResources</a></td>
<td>Public method to compile all changed resources to source files.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.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="ProjectResourcesBrowser.__init__" ID="ProjectResourcesBrowser.__init__"></a>
<h4>ProjectResourcesBrowser (Constructor)</h4>
<b>ProjectResourcesBrowser</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="ProjectResourcesBrowser.__addResourceFiles" ID="ProjectResourcesBrowser.__addResourceFiles"></a>
<h4>ProjectResourcesBrowser.__addResourceFiles</h4>
<b>__addResourceFiles</b>(<i></i>)
<p>
        Private method to add resource files to the project.
</p><a NAME="ProjectResourcesBrowser.__addResourcesDirectory" ID="ProjectResourcesBrowser.__addResourcesDirectory"></a>
<h4>ProjectResourcesBrowser.__addResourcesDirectory</h4>
<b>__addResourcesDirectory</b>(<i></i>)
<p>
        Private method to add resource files of a directory to the project.
</p><a NAME="ProjectResourcesBrowser.__checkResourcesNewer" ID="ProjectResourcesBrowser.__checkResourcesNewer"></a>
<h4>ProjectResourcesBrowser.__checkResourcesNewer</h4>
<b>__checkResourcesNewer</b>(<i>filename, mtime</i>)
<p>
        Private method to check, if any file referenced in a resource
        file is newer than a given time.
</p><dl>
<dt><i>filename</i></dt>
<dd>
filename of the resource file (string)
</dd><dt><i>mtime</i></dt>
<dd>
modification time to check against
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
flag indicating some file is newer (boolean)
</dd>
</dl><a NAME="ProjectResourcesBrowser.__compileAllResources" ID="ProjectResourcesBrowser.__compileAllResources"></a>
<h4>ProjectResourcesBrowser.__compileAllResources</h4>
<b>__compileAllResources</b>(<i></i>)
<p>
        Private method to compile all resources to source files.
</p><a NAME="ProjectResourcesBrowser.__compileQRC" ID="ProjectResourcesBrowser.__compileQRC"></a>
<h4>ProjectResourcesBrowser.__compileQRC</h4>
<b>__compileQRC</b>(<i>fn, noDialog=False, progress=None</i>)
<p>
        Private method to compile a .qrc file to a .py 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="ProjectResourcesBrowser.__compileQRCDone" ID="ProjectResourcesBrowser.__compileQRCDone"></a>
<h4>ProjectResourcesBrowser.__compileQRCDone</h4>
<b>__compileQRCDone</b>(<i>exitCode, exitStatus</i>)
<p>
        Private slot to handle the finished signal of the compile 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="ProjectResourcesBrowser.__compileResource" ID="ProjectResourcesBrowser.__compileResource"></a>
<h4>ProjectResourcesBrowser.__compileResource</h4>
<b>__compileResource</b>(<i></i>)
<p>
        Private method to compile a resource to a source file.
</p><a NAME="ProjectResourcesBrowser.__compileSelectedResources" ID="ProjectResourcesBrowser.__compileSelectedResources"></a>
<h4>ProjectResourcesBrowser.__compileSelectedResources</h4>
<b>__compileSelectedResources</b>(<i></i>)
<p>
        Private method to compile selected resources to source files.
</p><a NAME="ProjectResourcesBrowser.__deleteFile" ID="ProjectResourcesBrowser.__deleteFile"></a>
<h4>ProjectResourcesBrowser.__deleteFile</h4>
<b>__deleteFile</b>(<i></i>)
<p>
        Private method to delete a resource file from the project.
</p><a NAME="ProjectResourcesBrowser.__newResource" ID="ProjectResourcesBrowser.__newResource"></a>
<h4>ProjectResourcesBrowser.__newResource</h4>
<b>__newResource</b>(<i></i>)
<p>
        Private slot to handle the New Resource menu action.
</p><a NAME="ProjectResourcesBrowser.__openFile" ID="ProjectResourcesBrowser.__openFile"></a>
<h4>ProjectResourcesBrowser.__openFile</h4>
<b>__openFile</b>(<i></i>)
<p>
        Private slot to handle the Open menu action.
</p><a NAME="ProjectResourcesBrowser.__readStderr" ID="ProjectResourcesBrowser.__readStderr"></a>
<h4>ProjectResourcesBrowser.__readStderr</h4>
<b>__readStderr</b>(<i></i>)
<p>
        Private slot to handle the readyReadStandardError signal of the
        pyrcc4/rbrcc process.
</p><a NAME="ProjectResourcesBrowser.__readStdout" ID="ProjectResourcesBrowser.__readStdout"></a>
<h4>ProjectResourcesBrowser.__readStdout</h4>
<b>__readStdout</b>(<i></i>)
<p>
        Private slot to handle the readyReadStandardOutput signal of the
        pyrcc4/rbrcc process.
</p><a NAME="ProjectResourcesBrowser.__showContextMenu" ID="ProjectResourcesBrowser.__showContextMenu"></a>
<h4>ProjectResourcesBrowser.__showContextMenu</h4>
<b>__showContextMenu</b>(<i></i>)
<p>
        Private slot called by the menu aboutToShow signal.
</p><a NAME="ProjectResourcesBrowser.__showContextMenuBack" ID="ProjectResourcesBrowser.__showContextMenuBack"></a>
<h4>ProjectResourcesBrowser.__showContextMenuBack</h4>
<b>__showContextMenuBack</b>(<i></i>)
<p>
        Private slot called by the backMenu aboutToShow signal.
</p><a NAME="ProjectResourcesBrowser.__showContextMenuDir" ID="ProjectResourcesBrowser.__showContextMenuDir"></a>
<h4>ProjectResourcesBrowser.__showContextMenuDir</h4>
<b>__showContextMenuDir</b>(<i></i>)
<p>
        Private slot called by the dirMenu aboutToShow signal.
</p><a NAME="ProjectResourcesBrowser.__showContextMenuDirMulti" ID="ProjectResourcesBrowser.__showContextMenuDirMulti"></a>
<h4>ProjectResourcesBrowser.__showContextMenuDirMulti</h4>
<b>__showContextMenuDirMulti</b>(<i></i>)
<p>
        Private slot called by the dirMultiMenu aboutToShow signal.
</p><a NAME="ProjectResourcesBrowser.__showContextMenuMulti" ID="ProjectResourcesBrowser.__showContextMenuMulti"></a>
<h4>ProjectResourcesBrowser.__showContextMenuMulti</h4>
<b>__showContextMenuMulti</b>(<i></i>)
<p>
        Private slot called by the multiMenu aboutToShow signal.
</p><a NAME="ProjectResourcesBrowser._contextMenuRequested" ID="ProjectResourcesBrowser._contextMenuRequested"></a>
<h4>ProjectResourcesBrowser._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="ProjectResourcesBrowser._createPopupMenus" ID="ProjectResourcesBrowser._createPopupMenus"></a>
<h4>ProjectResourcesBrowser._createPopupMenus</h4>
<b>_createPopupMenus</b>(<i></i>)
<p>
        Protected overloaded method to generate the popup menu.
</p><a NAME="ProjectResourcesBrowser._initHookMethods" ID="ProjectResourcesBrowser._initHookMethods"></a>
<h4>ProjectResourcesBrowser._initHookMethods</h4>
<b>_initHookMethods</b>(<i></i>)
<p>
        Protected method to initialize the hooks dictionary.
</p><p>
        Supported hook methods are:
        <ul>
        <li>compileResource: takes filename as parameter</li>
        <li>compileAllResources: takes list of filenames as parameter</li>
        <li>compileChangedResources: takes list of filenames as parameter</li>
        <li>compileSelectedResources: takes list of all form filenames as
            parameter</li>
        <li>newResource: takes full directory path of new file as
            parameter</li>
        </ul>
</p><p>
        <b>Note</b>: Filenames are relative to the project directory, if not
        specified differently.
</p><a NAME="ProjectResourcesBrowser._openItem" ID="ProjectResourcesBrowser._openItem"></a>
<h4>ProjectResourcesBrowser._openItem</h4>
<b>_openItem</b>(<i></i>)
<p>
        Protected slot to handle the open popup menu entry.
</p><a NAME="ProjectResourcesBrowser.compileChangedResources" ID="ProjectResourcesBrowser.compileChangedResources"></a>
<h4>ProjectResourcesBrowser.compileChangedResources</h4>
<b>compileChangedResources</b>(<i></i>)
<p>
        Public method to compile all changed resources to source files.
</p><a NAME="ProjectResourcesBrowser.handlePreferencesChanged" ID="ProjectResourcesBrowser.handlePreferencesChanged"></a>
<h4>ProjectResourcesBrowser.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