--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Documentation/Source/eric4.UI.Browser.html Mon Dec 28 16:18:43 2009 +0000 @@ -0,0 +1,370 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' +'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> +<html><head> +<title>eric4.UI.Browser</title> +<style> +body { + background:white; + margin: 0em 1em 10em 1em; + color: black; +} + +h1 { color: white; background: #4FA4FF; } +h2 { color: white; background: #4FA4FF; } +h3 { color: white; background: #00557F; } +h4 { color: white; background: #00557F; } + +a { color: #AA5500; } + +</style> +</head> +<body><a NAME="top" ID="top"></a> +<h1>eric4.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 /> +<a NAME="Browser" ID="Browser"></a> +<h2>Browser</h2> +<p> + Class used to display a file system tree. +</p><p> + Via the context menu that + is displayed by a right click the user can select various actions on + the selected file. +</p><h4>Signals</h4> +<dl> +<dt>designerFile(string)</dt> +<dd> +emitted to open a Qt-Designer file +</dd><dt>linguistFile(string)</dt> +<dd> +emitted to open a Qt-Linguist (*.ts) file +</dd><dt>multiProjectFile(string)</dt> +<dd> +emitted to open an eric4 multi project file +</dd><dt>pixmapEditFile(string)</dt> +<dd> +emitted to edit a pixmap file +</dd><dt>pixmapFile(string)</dt> +<dd> +emitted to open a pixmap file +</dd><dt>projectFile(string)</dt> +<dd> +emitted to open an eric4 project file +</dd><dt>sourceFile(string, int, string)</dt> +<dd> +emitted to open a Python file at a line +</dd><dt>svgFile(string)</dt> +<dd> +emitted to open a SVG file +</dd><dt>trpreview(string list)</dt> +<dd> +emitted to preview a Qt-Linguist (*.qm) file +</dd><dt>unittestOpen(string)</dt> +<dd> +emitted to open a Python file for a unittest +</dd> +</dl> +<h3>Derived from</h3> +QTreeView +<h3>Class Attributes</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> +<td><a href="#Browser.__addAsToplevelDir">__addAsToplevelDir</a></td> +<td>Private slot to handle the Add as toplevel directory popup menu entry.</td> +</tr><tr> +<td><a href="#Browser.__configure">__configure</a></td> +<td>Private method to open the configuration dialog.</td> +</tr><tr> +<td><a href="#Browser.__createPopupMenus">__createPopupMenus</a></td> +<td>Private method to generate the various popup menus.</td> +</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> +<td><a href="#Browser.__newToplevelDir">__newToplevelDir</a></td> +<td>Private slot to handle the New toplevel directory popup menu entry.</td> +</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> +<td><a href="#Browser.__replaceInDirectory">__replaceInDirectory</a></td> +<td>Private slot to handle the Find&Replace in directory popup menu entry.</td> +</tr><tr> +<td><a href="#Browser._contextMenuRequested">_contextMenuRequested</a></td> +<td>Protected slot to show the context menu of the listview.</td> +</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> +<td><a href="#Browser._editPixmap">_editPixmap</a></td> +<td>Protected slot to handle the open in icon editor popup menu entry.</td> +</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> +<td><a href="#Browser._openItem">_openItem</a></td> +<td>Protected slot to handle the open popup menu entry.</td> +</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> +<td><a href="#Browser._resort">_resort</a></td> +<td>Protected slot to resort the tree.</td> +</tr><tr> +<td><a href="#Browser.getSelectedItems">getSelectedItems</a></td> +<td>Public method to get the selected items.</td> +</tr><tr> +<td><a href="#Browser.getSelectedItemsCount">getSelectedItemsCount</a></td> +<td>Public method to get the count of items selected.</td> +</tr><tr> +<td><a href="#Browser.getSelectedItemsCountCategorized">getSelectedItemsCountCategorized</a></td> +<td>Public method to get a categorized count of selected items.</td> +</tr><tr> +<td><a href="#Browser.handlePreferencesChanged">handlePreferencesChanged</a></td> +<td>Public slot used to handle the preferencesChanged signal.</td> +</tr><tr> +<td><a href="#Browser.handleProgramChange">handleProgramChange</a></td> +<td>Public slot to handle the programChange signal.</td> +</tr><tr> +<td><a href="#Browser.handleUnittest">handleUnittest</a></td> +<td>Public slot to handle the unittest popup menu entry.</td> +</tr><tr> +<td><a href="#Browser.layoutDisplay">layoutDisplay</a></td> +<td>Public slot to perform a layout operation.</td> +</tr><tr> +<td><a href="#Browser.mouseDoubleClickEvent">mouseDoubleClickEvent</a></td> +<td>Protected method of QAbstractItemView.</td> +</tr><tr> +<td><a href="#Browser.saveToplevelDirs">saveToplevelDirs</a></td> +<td>Public slot to save the toplevel directories.</td> +</tr><tr> +<td><a href="#Browser.wantedItem">wantedItem</a></td> +<td>Public method to check type of an item.</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> +<dt><i>parent</i></dt> +<dd> +parent widget (QWidget) +</dd> +</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.__configure" ID="Browser.__configure"></a> +<h4>Browser.__configure</h4> +<b>__configure</b>(<i></i>) +<p> + Private method to open the configuration dialog. +</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> +<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> +<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.__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> +<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._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> +<dt><i>coord</i></dt> +<dd> +the position of the mouse pointer (QPoint) +</dd> +</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> +<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._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._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> +<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> +<dt><i>index</i></dt> +<dd> +index of item (QModelIndex) +</dd> +</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.getSelectedItems" ID="Browser.getSelectedItems"></a> +<h4>Browser.getSelectedItems</h4> +<b>getSelectedItems</b>(<i>filter=None</i>) +<p> + Public method to get the selected items. +</p><dl> +<dt><i>filter</i></dt> +<dd> +list of classes to check against +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +list of selected items (list of BroweserItem) +</dd> +</dl><a NAME="Browser.getSelectedItemsCount" ID="Browser.getSelectedItemsCount"></a> +<h4>Browser.getSelectedItemsCount</h4> +<b>getSelectedItemsCount</b>(<i>filter=None</i>) +<p> + Public method to get the count of items selected. +</p><dl> +<dt><i>filter</i></dt> +<dd> +list of classes to check against +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +count of items selected (integer) +</dd> +</dl><a NAME="Browser.getSelectedItemsCountCategorized" ID="Browser.getSelectedItemsCountCategorized"></a> +<h4>Browser.getSelectedItemsCountCategorized</h4> +<b>getSelectedItemsCountCategorized</b>(<i>filter=None</i>) +<p> + Public method to get a categorized count of selected items. +</p><dl> +<dt><i>filter</i></dt> +<dd> +list of classes to check against +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +a dictionary containing the counts of items belonging + to the individual filter classes. The keys of the dictionary + are the unicode representation of the classes given in the + filter (i.e. unicode(filterClass)). The dictionary contains + an additional entry with key "sum", that stores the sum of + all selected entries fulfilling the filter criteria. +</dd> +</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> +<h4>Browser.handleProgramChange</h4> +<b>handleProgramChange</b>(<i>fn</i>) +<p> + Public slot to handle the programChange signal. +</p><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.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> +<h4>Browser.mouseDoubleClickEvent</h4> +<b>mouseDoubleClickEvent</b>(<i>mouseEvent</i>) +<p> + Protected method of QAbstractItemView. +</p><p> + Reimplemented to disable expanding/collapsing + of items when double-clicking. Instead the double-clicked entry is opened. +</p><dl> +<dt><i>mouseEvent</i></dt> +<dd> +the mouse event (QMouseEvent) +</dd> +</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> +<h4>Browser.wantedItem</h4> +<b>wantedItem</b>(<i>itm, filter=None</i>) +<p> + Public method to check type of an item. +</p><dl> +<dt><i>itm</i></dt> +<dd> +the item to check (BrowserItem) +</dd><dt><i>filter</i></dt> +<dd> +list of classes to check against +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +flag indicating item is a valid type (boolean) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /> +</body></html> \ No newline at end of file