Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QHelpEngineCore Class Reference

The QHelpEngineCore class provides the core functionality of the help system. More...

#include <qhelpenginecore.h>

+ Inheritance diagram for QHelpEngineCore:
+ Collaboration diagram for QHelpEngineCore:

Signals

void setupStarted ()
 This signal is emitted when setup is started.
 
void setupFinished ()
 This signal is emitted when the setup is complete.
 
void warning (const QString &msg)
 This signal is emitted when a non critical error occurs.
 
void currentFilterChanged (const QString &newFilter)
 
void readersAboutToBeInvalidated ()
 
- Signals inherited from QObject
void destroyed (QObject *=nullptr)
 This signal is emitted immediately before the object obj is destroyed, after any instances of QPointer have been notified, and cannot be blocked.
 
void objectNameChanged (const QString &objectName, QPrivateSignal)
 This signal is emitted after the object's name has been changed.
 

Public Member Functions

 QHelpEngineCore (const QString &collectionFile, QObject *parent=nullptr)
 Constructs a new core help engine with a parent.
 
virtual ~QHelpEngineCore ()
 Destructs the help engine.
 
bool isReadOnly () const
 
void setReadOnly (bool enable)
 
QHelpFilterEnginefilterEngine () const
 
bool setupData ()
 Sets up the help engine by processing the information found in the collection file and returns true if successful; otherwise returns false.
 
QString collectionFile () const
 
void setCollectionFile (const QString &fileName)
 
bool copyCollectionFile (const QString &fileName)
 Creates the file fileName and copies all contents from the current collection file into the newly created file, and returns true if successful; otherwise returns false.
 
bool registerDocumentation (const QString &documentationFileName)
 Registers the Qt compressed help file (.qch) contained in the file documentationFileName.
 
bool unregisterDocumentation (const QString &namespaceName)
 Unregisters the Qt compressed help file (.qch) identified by its namespaceName from the help collection.
 
QString documentationFileName (const QString &namespaceName)
 Returns the absolute file name of the Qt compressed help file (.qch) identified by the namespaceName.
 
QStringList registeredDocumentations () const
 Returns a list of all registered Qt compressed help files of the current collection file.
 
QByteArray fileData (const QUrl &url) const
 Returns the data of the file specified by url.
 
QStringList customFilters () const
 
bool removeCustomFilter (const QString &filterName)
 
bool addCustomFilter (const QString &filterName, const QStringList &attributes)
 
QStringList filterAttributes () const
 
QStringList filterAttributes (const QString &filterName) const
 
QString currentFilter () const
 the name of the custom filter currently applied.
 
void setCurrentFilter (const QString &filterName)
 
QList< QStringListfilterAttributeSets (const QString &namespaceName) const
 
QList< QUrlfiles (const QString namespaceName, const QStringList &filterAttributes, const QString &extensionFilter={})
 
QList< QUrlfiles (const QString namespaceName, const QString &filterName, const QString &extensionFilter={})
 Returns a list of files contained in the Qt compressed help file for namespaceName.
 
QUrl findFile (const QUrl &url) const
 Returns the corrected URL for the url that may refer to a different namespace defined by the virtual folder defined as a part of the url.
 
QList< QHelpLinkdocumentsForIdentifier (const QString &id) const
 
QList< QHelpLinkdocumentsForIdentifier (const QString &id, const QString &filterName) const
 
QList< QHelpLinkdocumentsForKeyword (const QString &keyword) const
 
QList< QHelpLinkdocumentsForKeyword (const QString &keyword, const QString &filterName) const
 
bool removeCustomValue (const QString &key)
 Removes the key from the settings section in the collection file.
 
QVariant customValue (const QString &key, const QVariant &defaultValue={}) const
 Returns the value assigned to the key.
 
bool setCustomValue (const QString &key, const QVariant &value)
 Save the value under the key.
 
QString error () const
 Returns a description of the last error that occurred.
 
void setAutoSaveFilter (bool save)
 
bool autoSaveFilter () const
 
void setUsesFilterEngine (bool uses)
 
bool usesFilterEngine () const
 
- Public Member Functions inherited from QObject
Q_INVOKABLE QObject (QObject *parent=nullptr)
 Constructs an object with parent object parent.
 
virtual ~QObject ()
 Destroys the object, deleting all its child objects.
 
virtual bool event (QEvent *event)
 This virtual function receives events to an object and should return true if the event e was recognized and processed.
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 Filters events if this object has been installed as an event filter for the watched object.
 
QString objectName () const
 
Q_WEAK_OVERLOAD void setObjectName (const QString &name)
 Sets the object's name to name.
 
void setObjectName (QAnyStringView name)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
QBindable< QStringbindableObjectName ()
 
bool isWidgetType () const
 Returns true if the object is a widget; otherwise returns false.
 
bool isWindowType () const
 Returns true if the object is a window; otherwise returns false.
 
bool isQuickItemType () const
 Returns true if the object is a QQuickItem; otherwise returns false.
 
bool signalsBlocked () const noexcept
 Returns true if signals are blocked; otherwise returns false.
 
bool blockSignals (bool b) noexcept
 If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it).
 
QThreadthread () const
 Returns the thread in which the object lives.
 
bool moveToThread (QThread *thread QT6_DECL_NEW_OVERLOAD_TAIL)
 Changes the thread affinity for this object and its children and returns true on success.
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 This is an overloaded function that will start a timer of type timerType and a timeout of interval milliseconds.
 
int startTimer (std::chrono::nanoseconds time, Qt::TimerType timerType=Qt::CoarseTimer)
 
void killTimer (int id)
 Kills the timer with timer identifier, id.
 
void killTimer (Qt::TimerId id)
 
template<typename T >
findChild (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 Returns the child of this object that can be cast into type T and that is called name, or \nullptr if there is no such object.
 
template<typename T >
QList< T > findChildren (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects.
 
template<typename T >
findChild (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename T >
QList< T > findChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
const QObjectListchildren () const
 Returns a list of child objects.
 
void setParent (QObject *parent)
 Makes the object a child of parent.
 
void installEventFilter (QObject *filterObj)
 Installs an event filter filterObj on this object.
 
void removeEventFilter (QObject *obj)
 Removes an event filter object obj from this object.
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
 
bool disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const
 
bool disconnect (const QObject *receiver, const char *member=nullptr) const
 
void dumpObjectTree () const
 Dumps a tree of children to the debug output.
 
void dumpObjectInfo () const
 Dumps information about signal connections, etc.
 
bool setProperty (const char *name, const QVariant &value)
 Sets the value of the object's name property to value.
 
bool setProperty (const char *name, QVariant &&value)
 
QVariant property (const char *name) const
 Returns the value of the object's name property.
 
QList< QByteArraydynamicPropertyNames () const
 
QBindingStoragebindingStorage ()
 
const QBindingStoragebindingStorage () const
 
QObjectparent () const
 Returns a pointer to the parent object.
 
bool inherits (const char *classname) const
 Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false.
 

Static Public Member Functions

static QString namespaceName (const QString &documentationFileName)
 Returns the namespace name defined for the Qt compressed help file (.qch) specified by its documentationFileName.
 
static QVariant metaData (const QString &documentationFileName, const QString &name)
 Returns the meta data for the Qt compressed help file documentationFileName.
 
- Static Public Member Functions inherited from QObject
static QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 \threadsafe
 
static QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::ContextTypeForFunctor< Func2 >::ContextType *context, Func2 &&slot, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 &&slot)
 
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 \threadsafe
 
static bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member)
 
static bool disconnect (const QMetaObject::Connection &)
 Disconnect a connection.
 
template<typename Func1 , typename Func2 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot)
 
template<typename Func1 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero)
 

Properties

bool autoSaveFilter
 whether QHelpEngineCore is in auto save filter mode or not.
 
QString collectionFile
 the absolute file name of the collection file currently used.
 
bool readOnly
 whether the help engine is read-only.
 
- Properties inherited from QObject
QString objectName
 the name of this object
 

Additional Inherited Members

- Public Slots inherited from QObject
void deleteLater ()
 \threadsafe
 
- Protected Member Functions inherited from QObject
QObjectsender () const
 Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns \nullptr.
 
int senderSignalIndex () const
 
int receivers (const char *signal) const
 Returns the number of receivers connected to the signal.
 
bool isSignalConnected (const QMetaMethod &signal) const
 
virtual void timerEvent (QTimerEvent *event)
 This event handler can be reimplemented in a subclass to receive timer events for the object.
 
virtual void childEvent (QChildEvent *event)
 This event handler can be reimplemented in a subclass to receive child events.
 
virtual void customEvent (QEvent *event)
 This event handler can be reimplemented in a subclass to receive custom events.
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
 QObject (QObjectPrivate &dd, QObject *parent=nullptr)
 
- Protected Attributes inherited from QObject
QScopedPointer< QObjectDatad_ptr
 

Detailed Description

The QHelpEngineCore class provides the core functionality of the help system.

Since
4.4 \inmodule QtHelp

Before the help engine can be used, it must be initialized by calling setupData(). At the beginning of the setup process the signal setupStarted() is emitted. From this point on until the signal setupFinished() is emitted, is the help data in an undefined meaning unusable state.

The core help engine can be used to perform different tasks. By calling documentsForIdentifier() the engine returns URLs specifying the file locations inside the help system. The actual file data can then be retrieved by calling fileData().

The help engine can contain any number of custom filters. The management of the filters, including adding new filters, changing filter definitions, or removing existing filters, is done through the QHelpFilterEngine class, which can be accessed by the filterEngine() method.

Note
QHelpFilterEngine replaces the older filter API that is deprecated since Qt 5.13. Call setUsesFilterEngine() with true to enable the new functionality.

The core help engine has two modes: \list

  • Read-only mode, where the help collection file is not changed unless explicitly requested. This also works if the collection file is in a read-only location, and is the default.
  • Fully writable mode, which requires the help collection file to be writable. \endlist The mode can be changed by calling setReadOnly() method, prior to calling setupData().

The help engine also offers the possibility to set and read values in a persistent way comparable to ini files or Windows registry entries. For more information see setValue() or value().

This class does not offer any GUI components or functionality for indices or contents. If you need one of those use QHelpEngine instead.

Definition at line 24 of file qhelpenginecore.h.

Constructor & Destructor Documentation

◆ QHelpEngineCore()

QHelpEngineCore::QHelpEngineCore ( const QString & collectionFile,
QObject * parent = nullptr )
explicit

Constructs a new core help engine with a parent.

The help engine uses the information stored in the collectionFile to provide help. If the collection file does not exist yet, it'll be created.

Definition at line 165 of file qhelpenginecore.cpp.

◆ ~QHelpEngineCore()

QHelpEngineCore::~QHelpEngineCore ( )
virtual

Destructs the help engine.

Definition at line 183 of file qhelpenginecore.cpp.

Member Function Documentation

◆ addCustomFilter()

bool QHelpEngineCore::addCustomFilter ( const QString & filterName,
const QStringList & attributes )
Deprecated

QHelpFilterEngine::setFilterData() should be used instead.

Adds the new custom filter filterName. The filter attributes are specified by attributes. If the filter already exists, its attribute set is replaced. The function returns true if the operation succeeded, otherwise it returns false.

See also
customFilters(), removeCustomFilter()
Deprecated

QHelpFilterEngine::setFilterData() should be used instead.

Adds the new custom filter filterName. The filter attributes are specified by attributes. If the filter already exists, its attribute set is replaced. The function returns true if the operation succeeded, otherwise it returns false.

See also
customFilters(), removeCustomFilter()

Definition at line 400 of file qhelpenginecore.cpp.

◆ autoSaveFilter()

bool QHelpEngineCore::autoSaveFilter ( ) const

Definition at line 751 of file qhelpenginecore.cpp.

◆ collectionFile()

QString QHelpEngineCore::collectionFile ( ) const

Definition at line 197 of file qhelpenginecore.cpp.

◆ copyCollectionFile()

bool QHelpEngineCore::copyCollectionFile ( const QString & fileName)

Creates the file fileName and copies all contents from the current collection file into the newly created file, and returns true if successful; otherwise returns false.

The copying process makes sure that file references to Qt Collection files ({.qch}) files are updated accordingly.

Definition at line 278 of file qhelpenginecore.cpp.

◆ currentFilter()

QString QHelpEngineCore::currentFilter ( ) const

the name of the custom filter currently applied.

Deprecated
Since
4.5

QHelpFilterEngine::activeFilter() should be used instead.

Setting this property will save the new custom filter permanently in the help collection file. To set a custom filter without saving it permanently, disable the auto save filter mode.

See also
autoSaveFilter()
Deprecated
Since
4.5

QHelpFilterEngine::activeFilter() should be used instead.

Setting this property will save the new custom filter permanently in the help collection file. To set a custom filter without saving it permanently, disable the auto save filter mode.

See also
autoSaveFilter()

Definition at line 468 of file qhelpenginecore.cpp.

◆ currentFilterChanged

void QHelpEngineCore::currentFilterChanged ( const QString & newFilter)
signal
Deprecated

QHelpFilterEngine::filterActivated() should be used instead.

This signal is emitted when the current filter is changed to newFilter.

Deprecated

QHelpFilterEngine::filterActivated() should be used instead.

This signal is emitted when the current filter is changed to newFilter.

◆ customFilters()

QStringList QHelpEngineCore::customFilters ( ) const
Deprecated

QHelpFilterEngine::filters() should be used instead.

Returns a list of custom filters.

See also
addCustomFilter(), removeCustomFilter()
Deprecated

QHelpFilterEngine::filters() should be used instead.

Returns a list of custom filters.

See also
addCustomFilter(), removeCustomFilter()

Definition at line 381 of file qhelpenginecore.cpp.

◆ customValue()

QVariant QHelpEngineCore::customValue ( const QString & key,
const QVariant & defaultValue = {} ) const

Returns the value assigned to the key.

If the requested key does not exist, the specified defaultValue is returned.

See also
setCustomValue(), removeCustomValue()

Definition at line 689 of file qhelpenginecore.cpp.

◆ documentationFileName()

QString QHelpEngineCore::documentationFileName ( const QString & namespaceName)

Returns the absolute file name of the Qt compressed help file (.qch) identified by the namespaceName.

If there is no Qt compressed help file with the specified namespace registered, an empty string is returned.

See also
namespaceName()

Definition at line 339 of file qhelpenginecore.cpp.

◆ documentsForIdentifier() [1/2]

QList< QHelpLink > QHelpEngineCore::documentsForIdentifier ( const QString & id) const
Since
5.15

Returns a list of all the document links found for the id. The returned list contents depend on the current filter, and therefore only the keywords registered for the current filter will be returned.

Definition at line 614 of file qhelpenginecore.cpp.

◆ documentsForIdentifier() [2/2]

QList< QHelpLink > QHelpEngineCore::documentsForIdentifier ( const QString & id,
const QString & filterName ) const
Since
5.15

Returns a list of the document links found for the id, filtered by filterName. The returned list contents depend on the passed filter, and therefore only the keywords registered for this filter will be returned. If you want to get all results unfiltered, pass empty string as filterName.

Definition at line 628 of file qhelpenginecore.cpp.

◆ documentsForKeyword() [1/2]

QList< QHelpLink > QHelpEngineCore::documentsForKeyword ( const QString & keyword) const
Since
5.15

Returns a list of all the document links found for the keyword. The returned list contents depend on the current filter, and therefore only the keywords registered for the current filter will be returned.

Definition at line 645 of file qhelpenginecore.cpp.

◆ documentsForKeyword() [2/2]

QList< QHelpLink > QHelpEngineCore::documentsForKeyword ( const QString & keyword,
const QString & filterName ) const
Since
5.15

Returns a list of the document links found for the keyword, filtered by filterName. The returned list contents depend on the passed filter, and therefore only the keywords registered for this filter will be returned. If you want to get all results unfiltered, pass empty string as filterName.

Definition at line 659 of file qhelpenginecore.cpp.

◆ error()

QString QHelpEngineCore::error ( ) const

Returns a description of the last error that occurred.

Definition at line 730 of file qhelpenginecore.cpp.

◆ fileData()

QByteArray QHelpEngineCore::fileData ( const QUrl & url) const

Returns the data of the file specified by url.

If the file does not exist, an empty QByteArray is returned.

See also
findFile()

Definition at line 600 of file qhelpenginecore.cpp.

◆ files() [1/2]

QList< QUrl > QHelpEngineCore::files ( const QString namespaceName,
const QString & filterName,
const QString & extensionFilter = {} )

Returns a list of files contained in the Qt compressed help file for namespaceName.

The files can be filtered by filterName as well as by their extension extensionFilter (for example, 'html').

Definition at line 543 of file qhelpenginecore.cpp.

Referenced by PRESUBMIT_test_mocks.MockInputApi::AffectedFiles().

+ Here is the caller graph for this function:

◆ files() [2/2]

QList< QUrl > QHelpEngineCore::files ( const QString namespaceName,
const QStringList & filterAttributes,
const QString & extensionFilter = {} )
Deprecated

files() should be used instead.

Returns a list of files contained in the Qt compressed help file namespaceName. The files can be filtered by filterAttributes as well as by their extension extensionFilter (e.g. 'html').

Deprecated

files() should be used instead.

Returns a list of files contained in the Qt compressed help file namespaceName. The files can be filtered by filterAttributes as well as by their extension extensionFilter (e.g. 'html').

Definition at line 517 of file qhelpenginecore.cpp.

Referenced by PRESUBMIT_test_mocks.MockInputApi::AffectedFiles().

+ Here is the caller graph for this function:

◆ filterAttributes() [1/2]

QStringList QHelpEngineCore::filterAttributes ( ) const
Deprecated

QHelpFilterEngine::availableComponents() should be used instead.

Returns a list of all defined filter attributes.

Deprecated

QHelpFilterEngine::availableComponents() should be used instead.

Returns a list of all defined filter attributes.

Definition at line 432 of file qhelpenginecore.cpp.

◆ filterAttributes() [2/2]

QStringList QHelpEngineCore::filterAttributes ( const QString & filterName) const
Deprecated

QHelpFilterEngine::filterData() should be used instead.

Returns a list of filter attributes used by the custom filter filterName.

Deprecated

QHelpFilterEngine::filterData() should be used instead.

Returns a list of filter attributes used by the custom filter filterName.

Definition at line 447 of file qhelpenginecore.cpp.

◆ filterAttributeSets()

QList< QStringList > QHelpEngineCore::filterAttributeSets ( const QString & namespaceName) const
Deprecated

QHelpFilterEngine::filterData() should be used instead.

Returns a list of filter attributes for the different filter sections defined in the Qt compressed help file with the given namespace namespaceName.

Deprecated

QHelpFilterEngine::filterData() should be used instead.

Returns a list of filter attributes for the different filter sections defined in the Qt compressed help file with the given namespace namespaceName.

Definition at line 501 of file qhelpenginecore.cpp.

◆ filterEngine()

QHelpFilterEngine * QHelpEngineCore::filterEngine ( ) const
Since
5.13

Returns the filter engine associated with this help engine. The filter engine allows for adding, changing, and removing existing filters for this help engine. To use the engine you also have to call \l setUsesFilterEngine() set to true.

Definition at line 245 of file qhelpenginecore.cpp.

◆ findFile()

QUrl QHelpEngineCore::findFile ( const QUrl & url) const

Returns the corrected URL for the url that may refer to a different namespace defined by the virtual folder defined as a part of the url.

If the virtual folder matches the namespace of the url, the method just checks if the file exists and returns the same url. When the virtual folder doesn't match the namespace of the url, it tries to find the best matching namespace according to the active filter. When the namespace is found, it returns the corrected URL if the file exists, otherwise it returns an invalid URL.

Definition at line 574 of file qhelpenginecore.cpp.

◆ isReadOnly()

bool QHelpEngineCore::isReadOnly ( ) const

Definition at line 223 of file qhelpenginecore.cpp.

◆ metaData()

QVariant QHelpEngineCore::metaData ( const QString & documentationFileName,
const QString & name )
static

Returns the meta data for the Qt compressed help file documentationFileName.

If there is no data available for name, an invalid QVariant() is returned. The meta data is defined when creating the Qt compressed help file and cannot be modified later. Common meta data includes e.g. the author of the documentation.

Definition at line 717 of file qhelpenginecore.cpp.

◆ namespaceName()

QString QHelpEngineCore::namespaceName ( const QString & documentationFileName)
static

Returns the namespace name defined for the Qt compressed help file (.qch) specified by its documentationFileName.

If the file is not valid, an empty string is returned.

See also
documentationFileName()

Definition at line 292 of file qhelpenginecore.cpp.

◆ readersAboutToBeInvalidated

void QHelpEngineCore::readersAboutToBeInvalidated ( )
signal

◆ registerDocumentation()

bool QHelpEngineCore::registerDocumentation ( const QString & documentationFileName)

Registers the Qt compressed help file (.qch) contained in the file documentationFileName.

One compressed help file, uniquely identified by its namespace can only be registered once. True is returned if the registration was successful, otherwise false.

See also
unregisterDocumentation(), error()

Definition at line 311 of file qhelpenginecore.cpp.

◆ registeredDocumentations()

QStringList QHelpEngineCore::registeredDocumentations ( ) const

Returns a list of all registered Qt compressed help files of the current collection file.

The returned names are the namespaces of the registered Qt compressed help files (.qch).

Definition at line 361 of file qhelpenginecore.cpp.

◆ removeCustomFilter()

bool QHelpEngineCore::removeCustomFilter ( const QString & filterName)
Deprecated

QHelpFilterEngine::removeFilter() should be used instead.

Returns true if the filter filterName was removed successfully, otherwise false.

See also
addCustomFilter(), customFilters()
Deprecated

QHelpFilterEngine::removeFilter() should be used instead.

Returns true if the filter filterName was removed successfully, otherwise false.

See also
addCustomFilter(), customFilters()

Definition at line 418 of file qhelpenginecore.cpp.

◆ removeCustomValue()

bool QHelpEngineCore::removeCustomValue ( const QString & key)

Removes the key from the settings section in the collection file.

Returns true if the value was removed successfully, otherwise false.

See also
customValue(), setCustomValue()

Definition at line 676 of file qhelpenginecore.cpp.

◆ setAutoSaveFilter()

void QHelpEngineCore::setAutoSaveFilter ( bool save)

Definition at line 746 of file qhelpenginecore.cpp.

◆ setCollectionFile()

void QHelpEngineCore::setCollectionFile ( const QString & fileName)

Definition at line 202 of file qhelpenginecore.cpp.

◆ setCurrentFilter()

void QHelpEngineCore::setCurrentFilter ( const QString & filterName)

Definition at line 482 of file qhelpenginecore.cpp.

◆ setCustomValue()

bool QHelpEngineCore::setCustomValue ( const QString & key,
const QVariant & value )

Save the value under the key.

If the key already exist, the value will be overwritten. Returns true if the value was saved successfully, otherwise false.

See also
customValue(), removeCustomValue()

Definition at line 703 of file qhelpenginecore.cpp.

◆ setReadOnly()

void QHelpEngineCore::setReadOnly ( bool enable)

Definition at line 228 of file qhelpenginecore.cpp.

◆ setupData()

bool QHelpEngineCore::setupData ( )

Sets up the help engine by processing the information found in the collection file and returns true if successful; otherwise returns false.

By calling the function, the help engine is forced to initialize itself immediately. Most of the times, this function does not have to be called explicitly because getter functions which depend on a correctly set up help engine do that themselves.

Note
{qsqlite4.dll} needs to be deployed with the application as the help system uses the sqlite driver when loading help collections.

Definition at line 264 of file qhelpenginecore.cpp.

◆ setupFinished

void QHelpEngineCore::setupFinished ( )
signal

This signal is emitted when the setup is complete.

◆ setupStarted

void QHelpEngineCore::setupStarted ( )
signal

This signal is emitted when setup is started.

◆ setUsesFilterEngine()

void QHelpEngineCore::setUsesFilterEngine ( bool uses)
Since
5.13

Enables or disables the new filter engine functionality inside the help engine, according to the passed uses parameter.

See also
filterEngine()

Definition at line 764 of file qhelpenginecore.cpp.

◆ unregisterDocumentation()

bool QHelpEngineCore::unregisterDocumentation ( const QString & namespaceName)

Unregisters the Qt compressed help file (.qch) identified by its namespaceName from the help collection.

Returns true on success, otherwise false.

See also
registerDocumentation(), error()

Definition at line 325 of file qhelpenginecore.cpp.

◆ usesFilterEngine()

bool QHelpEngineCore::usesFilterEngine ( ) const
Since
5.13

Returns whether the help engine uses the new filter functionality.

See also
filterEngine()

Definition at line 776 of file qhelpenginecore.cpp.

◆ warning

void QHelpEngineCore::warning ( const QString & msg)
signal

This signal is emitted when a non critical error occurs.

The warning message is stored in msg.

Property Documentation

◆ autoSaveFilter

bool QHelpEngineCore::autoSaveFilter
readwrite

whether QHelpEngineCore is in auto save filter mode or not.

Since
4.5

If QHelpEngineCore is in auto save filter mode, the current filter is automatically saved when it is changed by the QHelpFilterEngine::setActiveFilter() function. The filter is saved persistently in the help collection file.

By default, this mode is on.

Definition at line 27 of file qhelpenginecore.h.

◆ collectionFile

QString QHelpEngineCore::collectionFile
readwrite

the absolute file name of the collection file currently used.

Since
4.5

Setting this property leaves the help engine in an invalid state. It is important to invoke setupData() or any getter function in order to setup the help engine again.

Definition at line 28 of file qhelpenginecore.h.

◆ readOnly

bool QHelpEngineCore::readOnly
readwrite

whether the help engine is read-only.

Since
6.0

In read-only mode, the user can use the help engine with a collection file installed in a read-only location. In this case, some functionality won't be accessible, like registering additional documentation, filter editing, or any action that would require changes to the collection file. Setting it to false enables the full functionality of the help engine.

By default, this property is true.

Definition at line 29 of file qhelpenginecore.h.


The documentation for this class was generated from the following files: