--- a/eric6/Documentation/Source/eric6.Project.QuickFindFileDialog.html Wed Sep 25 19:40:31 2019 +0200 +++ b/eric6/Documentation/Source/eric6.Project.QuickFindFileDialog.html Wed Sep 25 19:42:44 2019 +0200 @@ -18,48 +18,62 @@ </style> </head> -<body><a NAME="top" ID="top"></a> +<body> +<a NAME="top" ID="top"></a> <h1>eric6.Project.QuickFindFileDialog</h1> + <p> Module implementing a quick search for files. -</p><p> +</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 /> +<hr /> +<hr /> <a NAME="QuickFindFileDialog" ID="QuickFindFileDialog"></a> <h2>QuickFindFileDialog</h2> + <p> Class implementing the Quick Find File by Name Dialog. -</p><p> +</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> +</p> +<h3>Signals</h3> <dl> + <dt>designerFile(str)</dt> <dd> emitted to open a Qt-Designer file -</dd><dt>linguistFile(str)</dt> +</dd> +<dt>linguistFile(str)</dt> <dd> emitted to open a Qt translation file -</dd><dt>sourceFile(str)</dt> +</dd> +<dt>sourceFile(str)</dt> <dd> emitted to open a file in the editor </dd> @@ -67,217 +81,288 @@ <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> +</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> +</tr> +<tr> <td><a href="#QuickFindFileDialog.__openFile">__openFile</a></td> <td>Private slot to open a file.</td> -</tr><tr> +</tr> +<tr> <td><a href="#QuickFindFileDialog.__searchFile">__searchFile</a></td> <td>Private slot to handle the search.</td> -</tr><tr> +</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> +</tr> +<tr> <td><a href="#QuickFindFileDialog.eventFilter">eventFilter</a></td> <td>Public method to handle event for another object.</td> -</tr><tr> +</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> +</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> +</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> +</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> +</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> +</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> +</p> +<dl> + <dt><i>project</i> (Project)</dt> <dd> reference to the project object -</dd><dt><i>parent</i> (QWidget)</dt> +</dd> +<dt><i>parent</i> (QWidget)</dt> <dd> parent widget of this dialog </dd> -</dl><a NAME="QuickFindFileDialog.__generateLocations" ID="QuickFindFileDialog.__generateLocations"></a> +</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> +</p> +<dl> <dt>Returns:</dt> <dd> yields set of files in our project... </dd> -</dl><dl> +</dl> +<dl> <dt>Return Type:</dt> <dd> str </dd> -</dl><a NAME="QuickFindFileDialog.__openFile" ID="QuickFindFileDialog.__openFile"></a> +</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> +</p> +<p> It emits the signal sourceFile or designerFile depending on the file extension. -</p><dl> +</p> +<dl> + <dt><i>itm</i> (QTreeWidgetItem)</dt> <dd> item to be opened </dd> -</dl><dl> +</dl> +<dl> <dt>Returns:</dt> <dd> flag indicating a file was opened </dd> -</dl><dl> +</dl> +<dl> <dt>Return Type:</dt> <dd> bool </dd> -</dl><a NAME="QuickFindFileDialog.__searchFile" ID="QuickFindFileDialog.__searchFile"></a> +</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> +</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> +</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> +<dt><i>searchTerm</i> (str)</dt> <dd> search term to be searched for </dd> -</dl><dl> +</dl> +<dl> <dt>Returns:</dt> <dd> sorted subset of items which match searchTerm in relevance order (i.e. the most likely match first) </dd> -</dl><dl> +</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> +</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> +</p> +<dl> + <dt><i>source</i> (QObject)</dt> <dd> object to handle events for -</dd><dt><i>event</i> (QEvent)</dt> +</dd> +<dt><i>event</i> (QEvent)</dt> <dd> event to handle </dd> -</dl><dl> +</dl> +<dl> <dt>Returns:</dt> <dd> flag indicating that the event was handled </dd> -</dl><dl> +</dl> +<dl> <dt>Return Type:</dt> <dd> bool </dd> -</dl><a NAME="QuickFindFileDialog.on_buttonBox_clicked" ID="QuickFindFileDialog.on_buttonBox_clicked"></a> +</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> +</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> +</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> +</p> +<dl> + <dt><i>current</i></dt> <dd> current item (QTreeWidgetItem) -</dd><dt><i>previous</i></dt> +</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> +</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> +</p> +<p> It emits the signal sourceFile or designerFile depending on the file extension. -</p><dl> +</p> +<dl> + <dt><i>itm</i></dt> <dd> the double clicked listview item (QTreeWidgetItem) -</dd><dt><i>column</i></dt> +</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> +</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> +</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> +</p> +<dl> + <dt><i>text</i></dt> <dd> (ignored) </dd> -</dl><a NAME="QuickFindFileDialog.show" ID="QuickFindFileDialog.show"></a> +</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>