QHelpFilterSettingsWidget 类

QHelpFilterSettingsWidget 类提供允许创建、编辑和移除过滤的 Widget。 更多...

头: #include <QHelpFilterSettingsWidget>
qmake: QT += help
Since: Qt 5.15
继承: QWidget

该类在 Qt 5.15 引入。

公共函数

QHelpFilterSettingsWidget (QWidget * parent = nullptr)
virtual ~QHelpFilterSettingsWidget ()
bool applySettings (QHelpFilterEngine * filterEngine ) const
void readSettings (const QHelpFilterEngine * filterEngine )
void setAvailableComponents (const QStringList & components )
void setAvailableVersions (const QList<QVersionNumber> & versions )

详细描述

The instance of QHelpFilterSettingsWidget may be a part of a preferences dialog. Before showing the dialog, setAvailableComponents () 和 setAvailableVersions () should be called, otherwise the filter settings widget will only offer a creation of empty filters, which wouldn't be useful. In addition, readSettings should also be called to fill up the filter settings widget with the list of filters already stored in the filter engine. The creation of new filters, modifications to existing filters and removal of unneeded filters are handled by the widget automatically. If you want to store the current state of the widget and apply it to the filter engine e.g. after the user clicked the apply button - call applySettings ().

成员函数文档编制

QHelpFilterSettingsWidget:: QHelpFilterSettingsWidget ( QWidget * parent = nullptr)

Constructs a filter settings widget with parent 作为父级 Widget。

[虚拟] QHelpFilterSettingsWidget:: ~QHelpFilterSettingsWidget ()

Destroys the filter settings widget.

bool QHelpFilterSettingsWidget:: applySettings ( QHelpFilterEngine * filterEngine ) const

Writes the filter settings, currently presented in this filter settings widget, to the filterEngine . The old settings stored in the filter engine will be overwritten.

void QHelpFilterSettingsWidget:: readSettings (const QHelpFilterEngine * filterEngine )

Reads the filter settings stored inside filterEngine and sets up this filter settings widget accordingly.

void QHelpFilterSettingsWidget:: setAvailableComponents (const QStringList & components )

Sets the list of all available components to components .

另请参阅 QHelpFilterEngine::availableComponents ().

void QHelpFilterSettingsWidget:: setAvailableVersions (const QList < QVersionNumber > & versions )

Sets the list of all available version numbers to versions .

另请参阅 QHelpFilterEngine::availableVersions ().