class KTreeWidgetSearchLine |
|
|
This class makes it easy to add a search line for filtering the items in listviews based on a simple text search. No changes to the application other than instantiating this class with appropriate QTreeWidgets should be needed. |
|
Constructs a KTreeWidgetSearchLine with treeWidget being the QTreeWidget to be filtered. If treeWidget is null then the widget will be disabled until listviews are set with setTreeWidget(), setTreeWidgets() or added with addTreeWidget(). |
|
Constructs a KTreeWidgetSearchLine with treeWidgets being the list of pointers to QTreeWidgets to be filtered. If treeWidgets is empty then the widget will be disabled until listviews are set with setTreeWidget(), setTreeWidgets() or added with addTreeWidget(). |
|
When the timer started with queueSearch() expires this slot is called. If there has been another timer started then this slot does nothing. However if there are no other pending searches this starts the list view search. See also queueSearch() |
|
Adds a QTreeWidget to the list of listviews filtered by this search line. If treeWidget is null then the widget will be disabled. See also treeWidget(), setTreeWidgets(), removeTreeWidget() |
|
Checks columns in all listviews and decides whether choosing columns to filter on makes any sense. Returns false if either of the following is true: * there are no listviews connected, * the listviews have different numbers of columns, * the listviews have only one column, * the listviews differ in column labels. Otherwise it returns true. See also setSearchColumns() |
|
Returns true if the search is case sensitive. This defaults to false. See also setCaseSensitive() |
|
Connects signals of this listview to the appropriate slots of the search line. |
|
Re-implemented for internal reasons. API not affected. |
|
Disconnects signals of a listviews from the search line. |
|
Returns true if item matches the search pattern. This will be evaluated based on the value of caseSensitive(). This can be overridden in subclasses to implement more complicated matching schemes. |
|
If this is true (the default) then the parents of matched items will also be shown. See also setKeepParentsVisible() |
|
When keys are pressed a new search string is created and a timer is activated. The most recent search is activated when this timer runs out if another key has not yet been pressed. This method makes search - the most recent search and starts the timer. Together with activateSearch() this makes it such that searches are not started until there is a short break in the users typing. See also activateSearch() |
|
Removes a QTreeWidget from the list of listviews filtered by this search line. Does nothing if treeWidget is 0 or is not filtered by the quick search line. See also listVew(), setTreeWidgets(), addTreeWidget() |
|
Returns the current list of columns that will be searched. If the returned list is empty all visible columns will be searched. See also setSearchColumns |
|
Make the search case sensitive or case insensitive. See also caseSenstivity() |
|
When a search is active on a list that's organized into a tree view if a parent or ancesestor of an item is does not match the search then it will be hidden and as such so too will any children that match. If this is set to true (the default) then the parents of matching items will be shown. See also keepParentsVisible |
|
Sets the list of columns to be searched. The default is to search all, visible columns which can be restored by passing columns as an empty list. If listviews to be filtered have different numbers or labels of columns this method has no effect. See also searchColumns |
|
Sets the QTreeWidget that is filtered by this search line, replacing any previously filtered listviews. If treeWidget is null then the widget will be disabled. See also treeWidget(), setTreeWidgets() |
|
Sets QTreeWidgets that are filtered by this search line, replacing any previously filtered listviews. If treeWidgets is empty then the widget will be disabled. See also treeWidgets(), addTreeWidget(), setTreeWidget() |
|
Returns the listview that is currently filtered by the search. If there are multiple listviews filtered, it returns 0. See also setTreeWidget(), treeWidgets() |
|
Returns the list of pointers to listviews that are currently filtered by the search. See also setTreeWidgets(), addTreeWidget(), treeWidget() |
|
Updates search to only make visible the items that match pattern. If s is null then the line edit's text will be used. |
|
Updates search to only make visible appropriate items in treeWidget. If treeWidget is null then nothing is done. |