Tue, 24 Oct 2017 19:09:09 +0200
Changed the logic of the two web browsers in order to put new downloads at the top of the list of downloads and add the download date and time to the shown info.
<!DOCTYPE html> <html><head> <title>eric6.MultiProject.MultiProjectBrowser</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>eric6.MultiProject.MultiProjectBrowser</h1> <p> Module implementing the multi project browser. </p> <h3>Global Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Classes</h3> <table> <tr> <td><a href="#MultiProjectBrowser">MultiProjectBrowser</a></td> <td>Class implementing the multi project browser.</td> </tr> </table> <h3>Functions</h3> <table> <tr><td>None</td></tr> </table> <hr /><hr /> <a NAME="MultiProjectBrowser" ID="MultiProjectBrowser"></a> <h2>MultiProjectBrowser</h2> <p> Class implementing the multi project browser. </p> <h3>Derived from</h3> QTreeWidget <h3>Class Attributes</h3> <table> <tr><td>ProjectFileNameRole</td></tr><tr><td>ProjectUidRole</td></tr> </table> <h3>Class Methods</h3> <table> <tr><td>None</td></tr> </table> <h3>Methods</h3> <table> <tr> <td><a href="#MultiProjectBrowser.__init__">MultiProjectBrowser</a></td> <td>Constructor</td> </tr><tr> <td><a href="#MultiProjectBrowser.__addNewProject">__addNewProject</a></td> <td>Private method to add a new project entry.</td> </tr><tr> <td><a href="#MultiProjectBrowser.__addProject">__addProject</a></td> <td>Private method to add a project to the list.</td> </tr><tr> <td><a href="#MultiProjectBrowser.__configure">__configure</a></td> <td>Private method to open the configuration dialog.</td> </tr><tr> <td><a href="#MultiProjectBrowser.__contextMenuRequested">__contextMenuRequested</a></td> <td>Private slot to show the context menu.</td> </tr><tr> <td><a href="#MultiProjectBrowser.__createPopupMenu">__createPopupMenu</a></td> <td>Private method to create the popup menu.</td> </tr><tr> <td><a href="#MultiProjectBrowser.__findCategoryItem">__findCategoryItem</a></td> <td>Private method to find the item for a category.</td> </tr><tr> <td><a href="#MultiProjectBrowser.__findProjectItem">__findProjectItem</a></td> <td>Private method to search a specific project item.</td> </tr><tr> <td><a href="#MultiProjectBrowser.__multiProjectClosed">__multiProjectClosed</a></td> <td>Private slot to handle the closing of a multi project.</td> </tr><tr> <td><a href="#MultiProjectBrowser.__multiProjectOpened">__multiProjectOpened</a></td> <td>Private slot to handle the opening of a multi project.</td> </tr><tr> <td><a href="#MultiProjectBrowser.__newMultiProject">__newMultiProject</a></td> <td>Private slot to handle the creation of a new multi project.</td> </tr><tr> <td><a href="#MultiProjectBrowser.__openItem">__openItem</a></td> <td>Private slot to open a project.</td> </tr><tr> <td><a href="#MultiProjectBrowser.__projectAdded">__projectAdded</a></td> <td>Private slot to handle the addition of a project to the multi project.</td> </tr><tr> <td><a href="#MultiProjectBrowser.__projectClosed">__projectClosed</a></td> <td>Private slot to handle the closing of a project.</td> </tr><tr> <td><a href="#MultiProjectBrowser.__projectDataChanged">__projectDataChanged</a></td> <td>Private slot to handle the change of a project of the multi project.</td> </tr><tr> <td><a href="#MultiProjectBrowser.__projectOpened">__projectOpened</a></td> <td>Private slot to handle the opening of a project.</td> </tr><tr> <td><a href="#MultiProjectBrowser.__projectRemoved">__projectRemoved</a></td> <td>Private slot to handle the removal of a project from the multi project.</td> </tr><tr> <td><a href="#MultiProjectBrowser.__removeProject">__removeProject</a></td> <td>Private method to handle the Remove context menu entry.</td> </tr><tr> <td><a href="#MultiProjectBrowser.__setItemData">__setItemData</a></td> <td>Private method to set the data of a project item.</td> </tr><tr> <td><a href="#MultiProjectBrowser.__showProjectProperties">__showProjectProperties</a></td> <td>Private method to show the data of a project entry.</td> </tr> </table> <h3>Static Methods</h3> <table> <tr><td>None</td></tr> </table> <a NAME="MultiProjectBrowser.__init__" ID="MultiProjectBrowser.__init__"></a> <h4>MultiProjectBrowser (Constructor)</h4> <b>MultiProjectBrowser</b>(<i>multiProject, project, parent=None</i>) <p> Constructor </p><dl> <dt><i>multiProject</i> (MultiProject)</dt> <dd> reference to the multi project object </dd><dt><i>project</i> (Project)</dt> <dd> reference to the project object </dd><dt><i>parent</i> (QWidget)</dt> <dd> parent widget </dd> </dl><a NAME="MultiProjectBrowser.__addNewProject" ID="MultiProjectBrowser.__addNewProject"></a> <h4>MultiProjectBrowser.__addNewProject</h4> <b>__addNewProject</b>(<i></i>) <p> Private method to add a new project entry. </p><a NAME="MultiProjectBrowser.__addProject" ID="MultiProjectBrowser.__addProject"></a> <h4>MultiProjectBrowser.__addProject</h4> <b>__addProject</b>(<i>project</i>) <p> Private method to add a project to the list. </p><dl> <dt><i>project</i></dt> <dd> reference to the project data dictionary </dd> </dl><a NAME="MultiProjectBrowser.__configure" ID="MultiProjectBrowser.__configure"></a> <h4>MultiProjectBrowser.__configure</h4> <b>__configure</b>(<i></i>) <p> Private method to open the configuration dialog. </p><a NAME="MultiProjectBrowser.__contextMenuRequested" ID="MultiProjectBrowser.__contextMenuRequested"></a> <h4>MultiProjectBrowser.__contextMenuRequested</h4> <b>__contextMenuRequested</b>(<i>coord</i>) <p> Private 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="MultiProjectBrowser.__createPopupMenu" ID="MultiProjectBrowser.__createPopupMenu"></a> <h4>MultiProjectBrowser.__createPopupMenu</h4> <b>__createPopupMenu</b>(<i></i>) <p> Private method to create the popup menu. </p><a NAME="MultiProjectBrowser.__findCategoryItem" ID="MultiProjectBrowser.__findCategoryItem"></a> <h4>MultiProjectBrowser.__findCategoryItem</h4> <b>__findCategoryItem</b>(<i>category</i>) <p> Private method to find the item for a category. </p><dl> <dt><i>category</i></dt> <dd> category to search for (string) </dd> </dl><dl> <dt>Returns:</dt> <dd> reference to the category item or None, if there is no such item (QTreeWidgetItem or None) </dd> </dl><a NAME="MultiProjectBrowser.__findProjectItem" ID="MultiProjectBrowser.__findProjectItem"></a> <h4>MultiProjectBrowser.__findProjectItem</h4> <b>__findProjectItem</b>(<i>project</i>) <p> Private method to search a specific project item. </p><dl> <dt><i>project</i></dt> <dd> reference to the project data dictionary </dd> </dl><dl> <dt>Returns:</dt> <dd> reference to the item (QTreeWidgetItem) or None </dd> </dl><a NAME="MultiProjectBrowser.__multiProjectClosed" ID="MultiProjectBrowser.__multiProjectClosed"></a> <h4>MultiProjectBrowser.__multiProjectClosed</h4> <b>__multiProjectClosed</b>(<i></i>) <p> Private slot to handle the closing of a multi project. </p><a NAME="MultiProjectBrowser.__multiProjectOpened" ID="MultiProjectBrowser.__multiProjectOpened"></a> <h4>MultiProjectBrowser.__multiProjectOpened</h4> <b>__multiProjectOpened</b>(<i></i>) <p> Private slot to handle the opening of a multi project. </p><a NAME="MultiProjectBrowser.__newMultiProject" ID="MultiProjectBrowser.__newMultiProject"></a> <h4>MultiProjectBrowser.__newMultiProject</h4> <b>__newMultiProject</b>(<i></i>) <p> Private slot to handle the creation of a new multi project. </p><a NAME="MultiProjectBrowser.__openItem" ID="MultiProjectBrowser.__openItem"></a> <h4>MultiProjectBrowser.__openItem</h4> <b>__openItem</b>(<i>itm=None</i>) <p> Private slot to open a project. </p><dl> <dt><i>itm</i></dt> <dd> reference to the project item to be opened (QTreeWidgetItem) </dd> </dl><a NAME="MultiProjectBrowser.__projectAdded" ID="MultiProjectBrowser.__projectAdded"></a> <h4>MultiProjectBrowser.__projectAdded</h4> <b>__projectAdded</b>(<i>project</i>) <p> Private slot to handle the addition of a project to the multi project. </p><dl> <dt><i>project</i></dt> <dd> reference to the project data dictionary </dd> </dl><a NAME="MultiProjectBrowser.__projectClosed" ID="MultiProjectBrowser.__projectClosed"></a> <h4>MultiProjectBrowser.__projectClosed</h4> <b>__projectClosed</b>(<i></i>) <p> Private slot to handle the closing of a project. </p><a NAME="MultiProjectBrowser.__projectDataChanged" ID="MultiProjectBrowser.__projectDataChanged"></a> <h4>MultiProjectBrowser.__projectDataChanged</h4> <b>__projectDataChanged</b>(<i>project</i>) <p> Private slot to handle the change of a project of the multi project. </p><dl> <dt><i>project</i></dt> <dd> reference to the project data dictionary </dd> </dl><a NAME="MultiProjectBrowser.__projectOpened" ID="MultiProjectBrowser.__projectOpened"></a> <h4>MultiProjectBrowser.__projectOpened</h4> <b>__projectOpened</b>(<i></i>) <p> Private slot to handle the opening of a project. </p><a NAME="MultiProjectBrowser.__projectRemoved" ID="MultiProjectBrowser.__projectRemoved"></a> <h4>MultiProjectBrowser.__projectRemoved</h4> <b>__projectRemoved</b>(<i>project</i>) <p> Private slot to handle the removal of a project from the multi project. </p><dl> <dt><i>project</i></dt> <dd> reference to the project data dictionary </dd> </dl><a NAME="MultiProjectBrowser.__removeProject" ID="MultiProjectBrowser.__removeProject"></a> <h4>MultiProjectBrowser.__removeProject</h4> <b>__removeProject</b>(<i></i>) <p> Private method to handle the Remove context menu entry. </p><a NAME="MultiProjectBrowser.__setItemData" ID="MultiProjectBrowser.__setItemData"></a> <h4>MultiProjectBrowser.__setItemData</h4> <b>__setItemData</b>(<i>itm, project</i>) <p> Private method to set the data of a project item. </p><dl> <dt><i>itm</i></dt> <dd> reference to the item to be set (QTreeWidgetItem) </dd><dt><i>project</i></dt> <dd> reference to the project data dictionary </dd> </dl><a NAME="MultiProjectBrowser.__showProjectProperties" ID="MultiProjectBrowser.__showProjectProperties"></a> <h4>MultiProjectBrowser.__showProjectProperties</h4> <b>__showProjectProperties</b>(<i></i>) <p> Private method to show the data of a project entry. </p> <div align="right"><a href="#top">Up</a></div> <hr /> </body></html>