ACF $AcfVersion:0$
Public Member Functions | List of all members
idoc::IHelpInfoProvider Class Referenceabstract

Allow to show help document to specified object or text. More...

#include <IHelpInfoProvider.h>

Inheritance diagram for idoc::IHelpInfoProvider:
istd::IPolymorphic idoc::IHelpFileProvider idoc::IHelpViewer iqtdoc::CDoxygenHelpFileProviderComp iqtdoc::CStaticHelpFileProviderComp iqtdoc::CHtmlHelpGuiComp iqtdoc::CHtmlHelpViewerComp

Public Member Functions

virtual double GetHelpQuality (const QString &contextText, const istd::IPolymorphic *contextObjectPtr) const =0
 Get quality of help information for specified context and/or object.
 
- Public Member Functions inherited from istd::IPolymorphic
virtual ~IPolymorphic ()
 

Detailed Description

Allow to show help document to specified object or text.

Provides a quality metric for help availability. This interface is the base for help system components and allows checking if help is available for a given context before attempting to display it.

The quality value (0.0 to 1.0) indicates how relevant and specific the help content is for the given context:

Usage Example
idoc::IHelpInfoProvider* helpProvider = GetHelpProvider();
// Check help quality for a text context
QString context = "MainWindow";
double quality = helpProvider->GetHelpQuality(context, nullptr);
if (quality > 0.0) {
qDebug() << "Help available with quality:" << quality;
}
// Check help for an object
istd::IPolymorphic* obj = GetCurrentObject();
quality = helpProvider->GetHelpQuality("", obj);
// Only show help if good quality is available
if (quality >= 0.7) {
// High quality help available, display it
}
Allow to show help document to specified object or text.
virtual double GetHelpQuality(const QString &contextText, const istd::IPolymorphic *contextObjectPtr) const =0
Get quality of help information for specified context and/or object.
Base interface for all used interfaces and implementations.
See also
IHelpViewer, IHelpFileProvider

Definition at line 53 of file IHelpInfoProvider.h.

Member Function Documentation

◆ GetHelpQuality()

virtual double idoc::IHelpInfoProvider::GetHelpQuality ( const QString &  contextText,
const istd::IPolymorphic contextObjectPtr 
) const
pure virtual

Get quality of help information for specified context and/or object.

Parameters
contextTextText describing the help context (e.g., class name, topic).
contextObjectPtrOptional pointer to object needing help.
Returns
Quality of help represented as value in range [0, 1].
  • 0 means there is no usable help
  • 1 means good context-specific help is available
  • Values in between indicate partial or generic help availability

Either contextText or contextObjectPtr can be provided, or both. The help provider uses these to determine if relevant help exists.

Implemented in iqtdoc::CDoxygenHelpFileProviderComp, iqtdoc::CHtmlHelpGuiComp, iqtdoc::CHtmlHelpViewerComp, and iqtdoc::CStaticHelpFileProviderComp.


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