--- a/eric6/Documentation/Source/eric6.UI.Browser.html Wed Sep 25 19:40:31 2019 +0200 +++ b/eric6/Documentation/Source/eric6.UI.Browser.html Wed Sep 25 19:42:44 2019 +0200 @@ -18,88 +18,113 @@ </style> </head> -<body><a NAME="top" ID="top"></a> +<body> +<a NAME="top" ID="top"></a> <h1>eric6.UI.Browser</h1> + <p> Module implementing a browser with class browsing capabilities. </p> <h3>Global Attributes</h3> + <table> <tr><td>None</td></tr> </table> <h3>Classes</h3> + <table> + <tr> <td><a href="#Browser">Browser</a></td> <td>Class used to display a file system tree.</td> </tr> </table> <h3>Functions</h3> + <table> <tr><td>None</td></tr> </table> -<hr /><hr /> +<hr /> +<hr /> <a NAME="Browser" ID="Browser"></a> <h2>Browser</h2> + <p> Class used to display a file system tree. -</p><p> +</p> +<p> Via the context menu that is displayed by a right click the user can select various actions on the selected file. -</p><h3>Signals</h3> +</p> +<h3>Signals</h3> <dl> + <dt>binaryFile(filename)</dt> <dd> emitted to open a file as binary (str) -</dd><dt>designerFile(filename)</dt> +</dd> +<dt>designerFile(filename)</dt> <dd> emitted to open a Qt-Designer file (str) -</dd><dt>linguistFile(filename)</dt> +</dd> +<dt>linguistFile(filename)</dt> <dd> emitted to open a Qt-Linguist (*.ts) file (str) -</dd><dt>multiProjectFile(filename)</dt> +</dd> +<dt>multiProjectFile(filename)</dt> <dd> emitted to open an eric multi project file (str) -</dd><dt>pixmapEditFile(filename)</dt> +</dd> +<dt>pixmapEditFile(filename)</dt> <dd> emitted to edit a pixmap file (str) -</dd><dt>pixmapFile(filename)</dt> +</dd> +<dt>pixmapFile(filename)</dt> <dd> emitted to open a pixmap file (str) -</dd><dt>projectFile(filename)</dt> +</dd> +<dt>projectFile(filename)</dt> <dd> emitted to open an eric project file (str) -</dd><dt>sourceFile(filename)</dt> +</dd> +<dt>sourceFile(filename)</dt> <dd> emitted to open a Python file at a line (str) -</dd><dt>sourceFile(filename, lineno)</dt> +</dd> +<dt>sourceFile(filename, lineno)</dt> <dd> emitted to open a Python file at a line (str, int) -</dd><dt>sourceFile(filename, lineno, type)</dt> +</dd> +<dt>sourceFile(filename, lineno, type)</dt> <dd> emitted to open a Python file at a line giving an explicit file type (str, int, str) -</dd><dt>sourceFile(filename, linenos)</dt> +</dd> +<dt>sourceFile(filename, linenos)</dt> <dd> emitted to open a Python file giving a list of lines(str, list) -</dd><dt>svgFile(filename)</dt> +</dd> +<dt>svgFile(filename)</dt> <dd> emitted to open a SVG file (str) -</dd><dt>trpreview(filenames)</dt> +</dd> +<dt>trpreview(filenames)</dt> <dd> emitted to preview Qt-Linguist (*.qm) files (list of str) -</dd><dt>trpreview(filenames, ignore)</dt> +</dd> +<dt>trpreview(filenames, ignore)</dt> <dd> emitted to preview Qt-Linguist (*.qm) files indicating whether non-existent files shall be ignored (list of str, bool) -</dd><dt>unittestOpen(filename)</dt> +</dd> +<dt>unittestOpen(filename)</dt> <dd> emitted to open a Python file for a unit test (str) @@ -108,294 +133,397 @@ <h3>Derived from</h3> QTreeView <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="#Browser.__init__">Browser</a></td> <td>Constructor</td> -</tr><tr> +</tr> +<tr> <td><a href="#Browser.__addAsToplevelDir">__addAsToplevelDir</a></td> <td>Private slot to handle the Add as toplevel directory popup menu entry.</td> -</tr><tr> +</tr> +<tr> <td><a href="#Browser.__createPopupMenus">__createPopupMenus</a></td> <td>Private method to generate the various popup menus.</td> -</tr><tr> +</tr> +<tr> <td><a href="#Browser.__findInDirectory">__findInDirectory</a></td> <td>Private slot to handle the Find in directory popup menu entry.</td> -</tr><tr> +</tr> +<tr> <td><a href="#Browser.__newToplevelDir">__newToplevelDir</a></td> <td>Private slot to handle the New toplevel directory popup menu entry.</td> -</tr><tr> +</tr> +<tr> <td><a href="#Browser.__refreshDirectory">__refreshDirectory</a></td> <td>Private slot to refresh a directory entry.</td> -</tr><tr> +</tr> +<tr> <td><a href="#Browser.__removeToplevel">__removeToplevel</a></td> <td>Private slot to handle the Remove from toplevel popup menu entry.</td> -</tr><tr> +</tr> +<tr> <td><a href="#Browser.__replaceInDirectory">__replaceInDirectory</a></td> <td>Private slot to handle the Find&Replace in directory popup menu entry.</td> -</tr><tr> +</tr> +<tr> <td><a href="#Browser.__showMimeType">__showMimeType</a></td> <td>Private slot to show the mime type of the selected entry.</td> -</tr><tr> +</tr> +<tr> <td><a href="#Browser._contextMenuRequested">_contextMenuRequested</a></td> <td>Protected slot to show the context menu of the listview.</td> -</tr><tr> +</tr> +<tr> <td><a href="#Browser._copyToClipboard">_copyToClipboard</a></td> <td>Protected method to copy the text shown for an entry to the clipboard.</td> -</tr><tr> +</tr> +<tr> <td><a href="#Browser._editPixmap">_editPixmap</a></td> <td>Protected slot to handle the open in icon editor popup menu entry.</td> -</tr><tr> +</tr> +<tr> <td><a href="#Browser._gotoAttribute">_gotoAttribute</a></td> <td>Protected slot to handle the selection of the goto menu.</td> -</tr><tr> +</tr> +<tr> <td><a href="#Browser._init">_init</a></td> <td>Protected method to perform initialization tasks common to this base class and all derived classes.</td> -</tr><tr> +</tr> +<tr> <td><a href="#Browser._keyboardSearchType">_keyboardSearchType</a></td> <td>Protected method to check, if the item is of the correct type.</td> -</tr><tr> +</tr> +<tr> <td><a href="#Browser._openHexEditor">_openHexEditor</a></td> <td>Protected slot to handle the open in hex editor popup menu entry.</td> -</tr><tr> +</tr> +<tr> <td><a href="#Browser._openItem">_openItem</a></td> <td>Protected slot to handle the open popup menu entry.</td> -</tr><tr> +</tr> +<tr> <td><a href="#Browser._resizeColumns">_resizeColumns</a></td> <td>Protected slot to resize the view when items get expanded or collapsed.</td> -</tr><tr> +</tr> +<tr> <td><a href="#Browser._resort">_resort</a></td> <td>Protected slot to resort the tree.</td> -</tr><tr> +</tr> +<tr> <td><a href="#Browser._showGotoMenu">_showGotoMenu</a></td> <td>Protected slot to prepare the goto submenu of the attribute menu.</td> -</tr><tr> +</tr> +<tr> <td><a href="#Browser.getSelectedItems">getSelectedItems</a></td> <td>Public method to get the selected items.</td> -</tr><tr> +</tr> +<tr> <td><a href="#Browser.getSelectedItemsCount">getSelectedItemsCount</a></td> <td>Public method to get the count of items selected.</td> -</tr><tr> +</tr> +<tr> <td><a href="#Browser.getSelectedItemsCountCategorized">getSelectedItemsCountCategorized</a></td> <td>Public method to get a categorized count of selected items.</td> -</tr><tr> +</tr> +<tr> <td><a href="#Browser.handleInterpreterChanged">handleInterpreterChanged</a></td> <td>Public slot to handle a change of the debug client's interpreter.</td> -</tr><tr> +</tr> +<tr> <td><a href="#Browser.handlePreferencesChanged">handlePreferencesChanged</a></td> <td>Public slot used to handle the preferencesChanged signal.</td> -</tr><tr> +</tr> +<tr> <td><a href="#Browser.handleProgramChange">handleProgramChange</a></td> <td>Public slot to handle the programChange signal.</td> -</tr><tr> +</tr> +<tr> <td><a href="#Browser.handleUnittest">handleUnittest</a></td> <td>Public slot to handle the unittest popup menu entry.</td> -</tr><tr> +</tr> +<tr> <td><a href="#Browser.keyboardSearch">keyboardSearch</a></td> <td>Public function to search the tree via the keyboard.</td> -</tr><tr> +</tr> +<tr> <td><a href="#Browser.layoutDisplay">layoutDisplay</a></td> <td>Public slot to perform a layout operation.</td> -</tr><tr> +</tr> +<tr> <td><a href="#Browser.mouseDoubleClickEvent">mouseDoubleClickEvent</a></td> <td>Protected method of QAbstractItemView.</td> -</tr><tr> +</tr> +<tr> <td><a href="#Browser.saveToplevelDirs">saveToplevelDirs</a></td> <td>Public slot to save the toplevel directories.</td> -</tr><tr> +</tr> +<tr> <td><a href="#Browser.wantedItem">wantedItem</a></td> <td>Public method to check type of an item.</td> </tr> </table> <h3>Static Methods</h3> + <table> <tr><td>None</td></tr> </table> + <a NAME="Browser.__init__" ID="Browser.__init__"></a> <h4>Browser (Constructor)</h4> <b>Browser</b>(<i>parent=None</i>) + <p> Constructor -</p><dl> +</p> +<dl> + <dt><i>parent</i></dt> <dd> parent widget (QWidget) </dd> -</dl><a NAME="Browser.__addAsToplevelDir" ID="Browser.__addAsToplevelDir"></a> +</dl> +<a NAME="Browser.__addAsToplevelDir" ID="Browser.__addAsToplevelDir"></a> <h4>Browser.__addAsToplevelDir</h4> <b>__addAsToplevelDir</b>(<i></i>) + <p> Private slot to handle the Add as toplevel directory popup menu entry. -</p><a NAME="Browser.__createPopupMenus" ID="Browser.__createPopupMenus"></a> +</p> +<a NAME="Browser.__createPopupMenus" ID="Browser.__createPopupMenus"></a> <h4>Browser.__createPopupMenus</h4> <b>__createPopupMenus</b>(<i></i>) + <p> Private method to generate the various popup menus. -</p><a NAME="Browser.__findInDirectory" ID="Browser.__findInDirectory"></a> +</p> +<a NAME="Browser.__findInDirectory" ID="Browser.__findInDirectory"></a> <h4>Browser.__findInDirectory</h4> <b>__findInDirectory</b>(<i></i>) + <p> Private slot to handle the Find in directory popup menu entry. -</p><a NAME="Browser.__newToplevelDir" ID="Browser.__newToplevelDir"></a> +</p> +<a NAME="Browser.__newToplevelDir" ID="Browser.__newToplevelDir"></a> <h4>Browser.__newToplevelDir</h4> <b>__newToplevelDir</b>(<i></i>) + <p> Private slot to handle the New toplevel directory popup menu entry. -</p><a NAME="Browser.__refreshDirectory" ID="Browser.__refreshDirectory"></a> +</p> +<a NAME="Browser.__refreshDirectory" ID="Browser.__refreshDirectory"></a> <h4>Browser.__refreshDirectory</h4> <b>__refreshDirectory</b>(<i></i>) + <p> Private slot to refresh a directory entry. -</p><a NAME="Browser.__removeToplevel" ID="Browser.__removeToplevel"></a> +</p> +<a NAME="Browser.__removeToplevel" ID="Browser.__removeToplevel"></a> <h4>Browser.__removeToplevel</h4> <b>__removeToplevel</b>(<i></i>) + <p> Private slot to handle the Remove from toplevel popup menu entry. -</p><a NAME="Browser.__replaceInDirectory" ID="Browser.__replaceInDirectory"></a> +</p> +<a NAME="Browser.__replaceInDirectory" ID="Browser.__replaceInDirectory"></a> <h4>Browser.__replaceInDirectory</h4> <b>__replaceInDirectory</b>(<i></i>) + <p> Private slot to handle the Find&Replace in directory popup menu entry. -</p><a NAME="Browser.__showMimeType" ID="Browser.__showMimeType"></a> +</p> +<a NAME="Browser.__showMimeType" ID="Browser.__showMimeType"></a> <h4>Browser.__showMimeType</h4> <b>__showMimeType</b>(<i></i>) + <p> Private slot to show the mime type of the selected entry. -</p><a NAME="Browser._contextMenuRequested" ID="Browser._contextMenuRequested"></a> +</p> +<a NAME="Browser._contextMenuRequested" ID="Browser._contextMenuRequested"></a> <h4>Browser._contextMenuRequested</h4> <b>_contextMenuRequested</b>(<i>coord</i>) + <p> Protected slot to show the context menu of the listview. -</p><dl> +</p> +<dl> + <dt><i>coord</i></dt> <dd> the position of the mouse pointer (QPoint) </dd> -</dl><a NAME="Browser._copyToClipboard" ID="Browser._copyToClipboard"></a> +</dl> +<a NAME="Browser._copyToClipboard" ID="Browser._copyToClipboard"></a> <h4>Browser._copyToClipboard</h4> <b>_copyToClipboard</b>(<i></i>) + <p> Protected method to copy the text shown for an entry to the clipboard. -</p><a NAME="Browser._editPixmap" ID="Browser._editPixmap"></a> +</p> +<a NAME="Browser._editPixmap" ID="Browser._editPixmap"></a> <h4>Browser._editPixmap</h4> <b>_editPixmap</b>(<i></i>) + <p> Protected slot to handle the open in icon editor popup menu entry. -</p><a NAME="Browser._gotoAttribute" ID="Browser._gotoAttribute"></a> +</p> +<a NAME="Browser._gotoAttribute" ID="Browser._gotoAttribute"></a> <h4>Browser._gotoAttribute</h4> <b>_gotoAttribute</b>(<i>act</i>) + <p> Protected slot to handle the selection of the goto menu. -</p><dl> +</p> +<dl> + <dt><i>act</i></dt> <dd> reference to the action (E5Action) </dd> -</dl><a NAME="Browser._init" ID="Browser._init"></a> +</dl> +<a NAME="Browser._init" ID="Browser._init"></a> <h4>Browser._init</h4> <b>_init</b>(<i></i>) + <p> Protected method to perform initialization tasks common to this base class and all derived classes. -</p><a NAME="Browser._keyboardSearchType" ID="Browser._keyboardSearchType"></a> +</p> +<a NAME="Browser._keyboardSearchType" ID="Browser._keyboardSearchType"></a> <h4>Browser._keyboardSearchType</h4> <b>_keyboardSearchType</b>(<i>item</i>) + <p> Protected method to check, if the item is of the correct type. -</p><dl> +</p> +<dl> + <dt><i>item</i> (BrowserItem)</dt> <dd> reference to the item </dd> -</dl><dl> +</dl> +<dl> <dt>Returns:</dt> <dd> flag indicating a correct type </dd> -</dl><dl> +</dl> +<dl> <dt>Return Type:</dt> <dd> bool </dd> -</dl><a NAME="Browser._openHexEditor" ID="Browser._openHexEditor"></a> +</dl> +<a NAME="Browser._openHexEditor" ID="Browser._openHexEditor"></a> <h4>Browser._openHexEditor</h4> <b>_openHexEditor</b>(<i></i>) + <p> Protected slot to handle the open in hex editor popup menu entry. -</p><a NAME="Browser._openItem" ID="Browser._openItem"></a> +</p> +<a NAME="Browser._openItem" ID="Browser._openItem"></a> <h4>Browser._openItem</h4> <b>_openItem</b>(<i></i>) + <p> Protected slot to handle the open popup menu entry. -</p><a NAME="Browser._resizeColumns" ID="Browser._resizeColumns"></a> +</p> +<a NAME="Browser._resizeColumns" ID="Browser._resizeColumns"></a> <h4>Browser._resizeColumns</h4> <b>_resizeColumns</b>(<i>index</i>) + <p> Protected slot to resize the view when items get expanded or collapsed. -</p><dl> +</p> +<dl> + <dt><i>index</i></dt> <dd> index of item (QModelIndex) </dd> -</dl><a NAME="Browser._resort" ID="Browser._resort"></a> +</dl> +<a NAME="Browser._resort" ID="Browser._resort"></a> <h4>Browser._resort</h4> <b>_resort</b>(<i></i>) + <p> Protected slot to resort the tree. -</p><a NAME="Browser._showGotoMenu" ID="Browser._showGotoMenu"></a> +</p> +<a NAME="Browser._showGotoMenu" ID="Browser._showGotoMenu"></a> <h4>Browser._showGotoMenu</h4> <b>_showGotoMenu</b>(<i></i>) + <p> Protected slot to prepare the goto submenu of the attribute menu. -</p><a NAME="Browser.getSelectedItems" ID="Browser.getSelectedItems"></a> +</p> +<a NAME="Browser.getSelectedItems" ID="Browser.getSelectedItems"></a> <h4>Browser.getSelectedItems</h4> <b>getSelectedItems</b>(<i>filterList=None</i>) + <p> Public method to get the selected items. -</p><dl> +</p> +<dl> + <dt><i>filterList</i></dt> <dd> list of classes to check against </dd> -</dl><dl> +</dl> +<dl> <dt>Returns:</dt> <dd> list of selected items (list of BroweserItem) </dd> -</dl><a NAME="Browser.getSelectedItemsCount" ID="Browser.getSelectedItemsCount"></a> +</dl> +<a NAME="Browser.getSelectedItemsCount" ID="Browser.getSelectedItemsCount"></a> <h4>Browser.getSelectedItemsCount</h4> <b>getSelectedItemsCount</b>(<i>filterList=None</i>) + <p> Public method to get the count of items selected. -</p><dl> +</p> +<dl> + <dt><i>filterList</i></dt> <dd> list of classes to check against </dd> -</dl><dl> +</dl> +<dl> <dt>Returns:</dt> <dd> count of items selected (integer) </dd> -</dl><a NAME="Browser.getSelectedItemsCountCategorized" ID="Browser.getSelectedItemsCountCategorized"></a> +</dl> +<a NAME="Browser.getSelectedItemsCountCategorized" ID="Browser.getSelectedItemsCountCategorized"></a> <h4>Browser.getSelectedItemsCountCategorized</h4> <b>getSelectedItemsCountCategorized</b>(<i>filterList=None</i>) + <p> Public method to get a categorized count of selected items. -</p><dl> +</p> +<dl> + <dt><i>filterList</i></dt> <dd> list of classes to check against </dd> -</dl><dl> +</dl> +<dl> <dt>Returns:</dt> <dd> a dictionary containing the counts of items belonging @@ -405,83 +533,114 @@ an additional entry with key "sum", that stores the sum of all selected entries fulfilling the filter criteria. </dd> -</dl><a NAME="Browser.handleInterpreterChanged" ID="Browser.handleInterpreterChanged"></a> +</dl> +<a NAME="Browser.handleInterpreterChanged" ID="Browser.handleInterpreterChanged"></a> <h4>Browser.handleInterpreterChanged</h4> <b>handleInterpreterChanged</b>(<i>interpreter</i>) + <p> Public slot to handle a change of the debug client's interpreter. -</p><dl> +</p> +<dl> + <dt><i>interpreter</i></dt> <dd> interpreter of the debug client (string) </dd> -</dl><a NAME="Browser.handlePreferencesChanged" ID="Browser.handlePreferencesChanged"></a> +</dl> +<a NAME="Browser.handlePreferencesChanged" ID="Browser.handlePreferencesChanged"></a> <h4>Browser.handlePreferencesChanged</h4> <b>handlePreferencesChanged</b>(<i></i>) + <p> Public slot used to handle the preferencesChanged signal. -</p><a NAME="Browser.handleProgramChange" ID="Browser.handleProgramChange"></a> +</p> +<a NAME="Browser.handleProgramChange" ID="Browser.handleProgramChange"></a> <h4>Browser.handleProgramChange</h4> <b>handleProgramChange</b>(<i>fn</i>) + <p> Public slot to handle the programChange signal. -</p><dl> +</p> +<dl> + <dt><i>fn</i></dt> <dd> file name (string) </dd> -</dl><a NAME="Browser.handleUnittest" ID="Browser.handleUnittest"></a> +</dl> +<a NAME="Browser.handleUnittest" ID="Browser.handleUnittest"></a> <h4>Browser.handleUnittest</h4> <b>handleUnittest</b>(<i></i>) + <p> Public slot to handle the unittest popup menu entry. -</p><a NAME="Browser.keyboardSearch" ID="Browser.keyboardSearch"></a> +</p> +<a NAME="Browser.keyboardSearch" ID="Browser.keyboardSearch"></a> <h4>Browser.keyboardSearch</h4> <b>keyboardSearch</b>(<i>search</i>) + <p> Public function to search the tree via the keyboard. -</p><dl> +</p> +<dl> + <dt><i>search</i> (str)</dt> <dd> the character entered via the keyboard </dd> -</dl><a NAME="Browser.layoutDisplay" ID="Browser.layoutDisplay"></a> +</dl> +<a NAME="Browser.layoutDisplay" ID="Browser.layoutDisplay"></a> <h4>Browser.layoutDisplay</h4> <b>layoutDisplay</b>(<i></i>) + <p> Public slot to perform a layout operation. -</p><a NAME="Browser.mouseDoubleClickEvent" ID="Browser.mouseDoubleClickEvent"></a> +</p> +<a NAME="Browser.mouseDoubleClickEvent" ID="Browser.mouseDoubleClickEvent"></a> <h4>Browser.mouseDoubleClickEvent</h4> <b>mouseDoubleClickEvent</b>(<i>mouseEvent</i>) + <p> Protected method of QAbstractItemView. -</p><p> +</p> +<p> Reimplemented to disable expanding/collapsing of items when double-clicking. Instead the double-clicked entry is opened. -</p><dl> +</p> +<dl> + <dt><i>mouseEvent</i></dt> <dd> the mouse event (QMouseEvent) </dd> -</dl><a NAME="Browser.saveToplevelDirs" ID="Browser.saveToplevelDirs"></a> +</dl> +<a NAME="Browser.saveToplevelDirs" ID="Browser.saveToplevelDirs"></a> <h4>Browser.saveToplevelDirs</h4> <b>saveToplevelDirs</b>(<i></i>) + <p> Public slot to save the toplevel directories. -</p><a NAME="Browser.wantedItem" ID="Browser.wantedItem"></a> +</p> +<a NAME="Browser.wantedItem" ID="Browser.wantedItem"></a> <h4>Browser.wantedItem</h4> <b>wantedItem</b>(<i>itm, filterList=None</i>) + <p> Public method to check type of an item. -</p><dl> +</p> +<dl> + <dt><i>itm</i></dt> <dd> the item to check (BrowserItem) -</dd><dt><i>filterList</i></dt> +</dd> +<dt><i>filterList</i></dt> <dd> list of classes to check against </dd> -</dl><dl> +</dl> +<dl> <dt>Returns:</dt> <dd> flag indicating item is a valid type (boolean)