QHelpFilterEngine¶
The
QHelpFilterEngine
class provides a filtered view of the help contents. More…
New in version 5.13.
Synopsis¶
Functions¶
def
activeFilter
()def
availableComponents
()def
availableVersions
()def
filterData
(filterName)def
filters
()def
indices
()def
indices
(filterName)def
namespaceToComponent
()def
namespaceToVersion
()def
namespacesForFilter
(filterName)def
removeFilter
(filterName)def
setActiveFilter
(filterName)def
setFilterData
(filterName, filterData)
Signals¶
def
filterActivated
(newFilter)
Detailed Description¶
The filter engine allows the management of filters associated with a
QHelpEngineCore
instance. The help engine internally creates an instance of the filter engine, which can be accessed by callingfilterEngine()
. Therefore, the public constructor of this class is disabled.The filters are identified by a filter name string. Filter details are described by the
QHelpFilterData
class.The filter engine allows for adding new filters and changing the existing filters’ data through the
setFilterData()
method. An existing filter can be removed through theremoveFilter()
method.Out of the registered filters one can be marked as the active one. The active filter will be used by the associated help engine for returning filtered results of many different functions, such as content, index, or search results. If no filter is marked active, the help engine returns the full results list available.
The active filter is returned by
activeFilter()
and it can be changed bysetActiveFilter()
.See also
- class PySide2.QtHelp.QHelpFilterEngine(helpEngine)¶
- param helpEngine:
Constructs the filter engine for
helpEngine
.
- PySide2.QtHelp.QHelpFilterEngine.activeFilter()¶
- Return type:
str
Returns the name of the currently active filter.
See also
- PySide2.QtHelp.QHelpFilterEngine.availableComponents()¶
- Return type:
list of strings
Returns the list of all available components defined in all registered documentation files.
- PySide2.QtHelp.QHelpFilterEngine.availableVersions()¶
- Return type:
Returns the list of all available versions defined in all registered documentation files.
- PySide2.QtHelp.QHelpFilterEngine.filterActivated(newFilter)¶
- Parameters:
newFilter – str
- PySide2.QtHelp.QHelpFilterEngine.filterData(filterName)¶
- Parameters:
filterName – str
- Return type:
Returns the filter details associated with
filterName
.See also
- PySide2.QtHelp.QHelpFilterEngine.filters()¶
- Return type:
list of strings
Returns the list of all filter names defined inside the filter engine.
- PySide2.QtHelp.QHelpFilterEngine.indices()¶
- Return type:
list of strings
Returns a sorted list of available indices. The returned list contents depend on the active filter, and therefore only the indices registered for the active filter will be returned.
- PySide2.QtHelp.QHelpFilterEngine.indices(filterName)
- Parameters:
filterName – str
- Return type:
list of strings
Returns a sorted list of available indices, filtered by
filterName
. The returned list contents depend on the passed filter, and therefore only the indices registered for this filter will be returned. If you want to get all available indices unfiltered, pass empty string asfilterName
.
- PySide2.QtHelp.QHelpFilterEngine.namespaceToComponent()¶
- Return type:
Returns the map of all the available namespaces as keys together with their associated components as values.
- PySide2.QtHelp.QHelpFilterEngine.namespaceToVersion()¶
- Return type:
Returns the map of all the available namespaces as keys together with their associated versions as values.
- PySide2.QtHelp.QHelpFilterEngine.namespacesForFilter(filterName)¶
- Parameters:
filterName – str
- Return type:
list of strings
Returns the list of all registered documentation namespaces that match the filter identified by
filterName
.
- PySide2.QtHelp.QHelpFilterEngine.removeFilter(filterName)¶
- Parameters:
filterName – str
- Return type:
bool
Removes the filter identified by
filterName
.Returns
true
if removing the filter succeeded, otherwise returnsfalse
.
- PySide2.QtHelp.QHelpFilterEngine.setActiveFilter(filterName)¶
- Parameters:
filterName – str
- Return type:
bool
Changes the currently active filter to
filterName
.Returns
true
if changing the filter succeeded, otherwise returnsfalse
.See also
- PySide2.QtHelp.QHelpFilterEngine.setFilterData(filterName, filterData)¶
- Parameters:
filterName – str
filterData –
PySide2.QtHelp.QHelpFilterData
- Return type:
bool
Changes the existing filter details of the filter identified by
filterName
tofilterData
. If the filter does not exist, a new filter is created.Returns
true
if setting the filter succeeded, otherwise returnsfalse
.See also
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.