class QHelpFilterEngine#

The QHelpFilterEngine class provides a filtered view of the help contents. More

Inheritance diagram of PySide6.QtHelp.QHelpFilterEngine

Synopsis#

Methods#

Signals#

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

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 calling filterEngine() . 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 the removeFilter() 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 by setActiveFilter() .

See also

QHelpEngineCore

__init__(helpEngine)#
Parameters:

helpEngineQHelpEngineCore

activeFilter()#
Return type:

str

Returns the name of the currently active filter.

availableComponents()#
Return type:

list of strings

Returns the list of all available components defined in all registered documentation files.

availableVersions()#
Return type:

.list of QVersionNumber

Returns the list of all available versions defined in all registered documentation files.

filterActivated(newFilter)#
Parameters:

newFilter – str

This signal is emitted when the active filter is set. newFilter specifies the name of the filter.

filterData(filterName)#
Parameters:

filterName – str

Return type:

QHelpFilterData

Returns the filter details associated with filterName.

See also

setFilterData()

filters()#
Return type:

list of strings

Returns the list of all filter names defined inside the filter engine.

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.

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 as filterName.

namespaceToComponent()#
Return type:

Dictionary with keys of type .QString and values of type QString.

Returns the map of all the available namespaces as keys together with their associated components as values.

namespaceToVersion()#
Return type:

Dictionary with keys of type .QString and values of type QVersionNumber.

Returns the map of all the available namespaces as keys together with their associated versions as values.

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.

removeFilter(filterName)#
Parameters:

filterName – str

Return type:

bool

Removes the filter identified by filterName.

Returns true if removing the filter succeeded, otherwise returns false.

setActiveFilter(filterName)#
Parameters:

filterName – str

Return type:

bool

Changes the currently active filter to filterName.

Returns true if changing the filter succeeded, otherwise returns false.

See also

activeFilter()

setFilterData(filterName, filterData)#
Parameters:
Return type:

bool

Changes the existing filter details of the filter identified by filterName to filterData. If the filter does not exist, a new filter is created.

Returns true if setting the filter succeeded, otherwise returns false.

See also

filterData()