--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/eric7/Documentation/Source/eric7.Project.QuickFindFileDialog.html Mon May 24 11:19:57 2021 +0200 @@ -0,0 +1,371 @@ +<!DOCTYPE html> +<html><head> +<title>eric7.Project.QuickFindFileDialog</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>eric7.Project.QuickFindFileDialog</h1> + +<p> +Module implementing a quick search for files. +</p> +<p> +This is basically the FindFileNameDialog modified to support faster +interactions. +</p> +<h3>Global Attributes</h3> + +<table> +<tr><td>None</td></tr> +</table> +<h3>Classes</h3> + +<table> + +<tr> +<td><a href="#QuickFindFileDialog">QuickFindFileDialog</a></td> +<td>Class implementing the Quick Find File by Name Dialog.</td> +</tr> +</table> +<h3>Functions</h3> + +<table> +<tr><td>None</td></tr> +</table> +<hr /> +<hr /> +<a NAME="QuickFindFileDialog" ID="QuickFindFileDialog"></a> +<h2>QuickFindFileDialog</h2> + +<p> + Class implementing the Quick Find File by Name Dialog. +</p> +<p> + This dialog provides a slightly more streamlined behaviour + than the standard FindFileNameDialog in that it tries to + match any name in the project against (fragmentary) bits of + file names. +</p> +<h3>Signals</h3> +<dl> + +<dt>designerFile(str)</dt> +<dd> +emitted to open a Qt-Designer file +</dd> +<dt>linguistFile(str)</dt> +<dd> +emitted to open a Qt translation file +</dd> +<dt>sourceFile(str)</dt> +<dd> +emitted to open a file in the editor +</dd> +</dl> +<h3>Derived from</h3> +QWidget, Ui_QuickFindFile +<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="#QuickFindFileDialog.__init__">QuickFindFileDialog</a></td> +<td>Constructor</td> +</tr> +<tr> +<td><a href="#QuickFindFileDialog.__generateLocations">__generateLocations</a></td> +<td>Private method to generate a set of locations that can be searched.</td> +</tr> +<tr> +<td><a href="#QuickFindFileDialog.__openFile">__openFile</a></td> +<td>Private slot to open a file.</td> +</tr> +<tr> +<td><a href="#QuickFindFileDialog.__searchFile">__searchFile</a></td> +<td>Private slot to handle the search.</td> +</tr> +<tr> +<td><a href="#QuickFindFileDialog.__sortedMatches">__sortedMatches</a></td> +<td>Private method to find the subset of items which match a search term.</td> +</tr> +<tr> +<td><a href="#QuickFindFileDialog.eventFilter">eventFilter</a></td> +<td>Public method to handle event for another object.</td> +</tr> +<tr> +<td><a href="#QuickFindFileDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> +<td>Private slot called by a button of the button box clicked.</td> +</tr> +<tr> +<td><a href="#QuickFindFileDialog.on_fileList_currentItemChanged">on_fileList_currentItemChanged</a></td> +<td>Private slot handling a change of the current item.</td> +</tr> +<tr> +<td><a href="#QuickFindFileDialog.on_fileList_itemActivated">on_fileList_itemActivated</a></td> +<td>Private slot to handle the double click on a file item.</td> +</tr> +<tr> +<td><a href="#QuickFindFileDialog.on_fileNameEdit_returnPressed">on_fileNameEdit_returnPressed</a></td> +<td>Private slot to handle enter being pressed on the file name edit box.</td> +</tr> +<tr> +<td><a href="#QuickFindFileDialog.on_fileNameEdit_textChanged">on_fileNameEdit_textChanged</a></td> +<td>Private slot to handle the textChanged signal of the file name edit.</td> +</tr> +<tr> +<td><a href="#QuickFindFileDialog.show">show</a></td> +<td>Public method to enable/disable the project checkbox.</td> +</tr> +</table> +<h3>Static Methods</h3> + +<table> +<tr><td>None</td></tr> +</table> + +<a NAME="QuickFindFileDialog.__init__" ID="QuickFindFileDialog.__init__"></a> +<h4>QuickFindFileDialog (Constructor)</h4> +<b>QuickFindFileDialog</b>(<i>project, parent=None</i>) + +<p> + Constructor +</p> +<dl> + +<dt><i>project</i> (Project)</dt> +<dd> +reference to the project object +</dd> +<dt><i>parent</i> (QWidget)</dt> +<dd> +parent widget of this dialog +</dd> +</dl> +<a NAME="QuickFindFileDialog.__generateLocations" ID="QuickFindFileDialog.__generateLocations"></a> +<h4>QuickFindFileDialog.__generateLocations</h4> +<b>__generateLocations</b>(<i></i>) + +<p> + Private method to generate a set of locations that can be searched. +</p> +<dl> +<dt>Yield:</dt> +<dd> +set of files in our project +</dd> +</dl> +<dl> +<dt>Yield Type:</dt> +<dd> +str +</dd> +</dl> +<a NAME="QuickFindFileDialog.__openFile" ID="QuickFindFileDialog.__openFile"></a> +<h4>QuickFindFileDialog.__openFile</h4> +<b>__openFile</b>(<i>itm=None</i>) + +<p> + Private slot to open a file. +</p> +<p> + It emits the signal sourceFile or designerFile depending on the + file extension. +</p> +<dl> + +<dt><i>itm</i> (QTreeWidgetItem)</dt> +<dd> +item to be opened +</dd> +</dl> +<dl> +<dt>Return:</dt> +<dd> +flag indicating a file was opened +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +bool +</dd> +</dl> +<a NAME="QuickFindFileDialog.__searchFile" ID="QuickFindFileDialog.__searchFile"></a> +<h4>QuickFindFileDialog.__searchFile</h4> +<b>__searchFile</b>(<i></i>) + +<p> + Private slot to handle the search. +</p> +<a NAME="QuickFindFileDialog.__sortedMatches" ID="QuickFindFileDialog.__sortedMatches"></a> +<h4>QuickFindFileDialog.__sortedMatches</h4> +<b>__sortedMatches</b>(<i>items, searchTerm</i>) + +<p> + Private method to find the subset of items which match a search term. +</p> +<dl> + +<dt><i>items</i> (list of str)</dt> +<dd> +list of items to be scanned for the search term +</dd> +<dt><i>searchTerm</i> (str)</dt> +<dd> +search term to be searched for +</dd> +</dl> +<dl> +<dt>Return:</dt> +<dd> +sorted subset of items which match searchTerm in + relevance order (i.e. the most likely match first) +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +list of tuple of bool, int and str +</dd> +</dl> +<a NAME="QuickFindFileDialog.eventFilter" ID="QuickFindFileDialog.eventFilter"></a> +<h4>QuickFindFileDialog.eventFilter</h4> +<b>eventFilter</b>(<i>source, event</i>) + +<p> + Public method to handle event for another object. +</p> +<dl> + +<dt><i>source</i> (QObject)</dt> +<dd> +object to handle events for +</dd> +<dt><i>event</i> (QEvent)</dt> +<dd> +event to handle +</dd> +</dl> +<dl> +<dt>Return:</dt> +<dd> +flag indicating that the event was handled +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +bool +</dd> +</dl> +<a NAME="QuickFindFileDialog.on_buttonBox_clicked" ID="QuickFindFileDialog.on_buttonBox_clicked"></a> +<h4>QuickFindFileDialog.on_buttonBox_clicked</h4> +<b>on_buttonBox_clicked</b>(<i>button</i>) + +<p> + Private slot called by a button of the button box clicked. +</p> +<dl> + +<dt><i>button</i></dt> +<dd> +button that was clicked (QAbstractButton) +</dd> +</dl> +<a NAME="QuickFindFileDialog.on_fileList_currentItemChanged" ID="QuickFindFileDialog.on_fileList_currentItemChanged"></a> +<h4>QuickFindFileDialog.on_fileList_currentItemChanged</h4> +<b>on_fileList_currentItemChanged</b>(<i>current, previous</i>) + +<p> + Private slot handling a change of the current item. +</p> +<dl> + +<dt><i>current</i></dt> +<dd> +current item (QTreeWidgetItem) +</dd> +<dt><i>previous</i></dt> +<dd> +prevoius current item (QTreeWidgetItem) +</dd> +</dl> +<a NAME="QuickFindFileDialog.on_fileList_itemActivated" ID="QuickFindFileDialog.on_fileList_itemActivated"></a> +<h4>QuickFindFileDialog.on_fileList_itemActivated</h4> +<b>on_fileList_itemActivated</b>(<i>itm, column</i>) + +<p> + Private slot to handle the double click on a file item. +</p> +<p> + It emits the signal sourceFile or designerFile depending on the + file extension. +</p> +<dl> + +<dt><i>itm</i></dt> +<dd> +the double clicked listview item (QTreeWidgetItem) +</dd> +<dt><i>column</i></dt> +<dd> +column that was double clicked (integer) (ignored) +</dd> +</dl> +<a NAME="QuickFindFileDialog.on_fileNameEdit_returnPressed" ID="QuickFindFileDialog.on_fileNameEdit_returnPressed"></a> +<h4>QuickFindFileDialog.on_fileNameEdit_returnPressed</h4> +<b>on_fileNameEdit_returnPressed</b>(<i></i>) + +<p> + Private slot to handle enter being pressed on the file name edit box. +</p> +<a NAME="QuickFindFileDialog.on_fileNameEdit_textChanged" ID="QuickFindFileDialog.on_fileNameEdit_textChanged"></a> +<h4>QuickFindFileDialog.on_fileNameEdit_textChanged</h4> +<b>on_fileNameEdit_textChanged</b>(<i>text</i>) + +<p> + Private slot to handle the textChanged signal of the file name edit. +</p> +<dl> + +<dt><i>text</i></dt> +<dd> +(ignored) +</dd> +</dl> +<a NAME="QuickFindFileDialog.show" ID="QuickFindFileDialog.show"></a> +<h4>QuickFindFileDialog.show</h4> +<b>show</b>(<i></i>) + +<p> + Public method to enable/disable the project checkbox. +</p> +<div align="right"><a href="#top">Up</a></div> +<hr /> +</body></html> \ No newline at end of file