User Tools

Site Tools


DzHelpMgr

Manager responsible for the help documentation.

More...

Inherits :

Methods

DAZ Script
voidbrowseToIdentifier ( String identifier )
voidbrowseToKeyword ( String keyword )
voidbrowseToPage ( String page )
voidbrowseToUrl ( String url )
ArrayfindFilterAttributes ( String name )
StringfindIdentifierUrl ( String id )
StringfindKeywordUrl ( String keyword )
StringgetDescription ( String label )
ArraygetFilterAttributes ( Number which )
StringgetFilterName ( Number which )
StringgetGroup ( String label )
ArraygetGroups ()
ArraygetHelpItemLabels ()
StringgetHelpString ( String label )
StringgetHelpStringReplacement ( String group, String key )
ArraygetHelpStringReplacementGroups ()
ArraygetHelpStringReplacementKeys ( String group )
StringgetIdentifier ( Number which )
StringgetIdentifierUrl ( Number which )
StringgetKeyword ( Number which )
StringgetKeywordUrl ( Number which )
NumbergetNumFilters ()
NumbergetNumIdentifiers ()
NumbergetNumKeywords ()
StringgetStatusTip ( String label )
StringgetToolTip ( String label )
BooleanhasHelpItem ( String label )
BooleanisHelpItemUsed ( String label )
BooleanremoveHelpItem ( String label )
BooleanrenameHelpItem ( String oldLabel, String newLabel )
DzErrorsaveHelpItems ( String filename, Array groups=[], Array labels=[] )
voidsetDescription ( String label, String description )
voidsetGroup ( String label, String group )
voidsetHelpItem ( String label, String group, String description, String toolTip, String statusTip, String helpString )
voidsetHelpString ( String label, String helpString )
voidsetHelpStringReplacement ( String group, String key, String value )
voidsetStatusTip ( String label, String statusTip )
voidsetToolTip ( String label, String toolTip )
voidupdateHelp ( QWidget widget )
voidupdateHelp ( DzAction action )

Detailed Description

This class manages help documentation for the application.

There is only one instance of this manager in an application. This instance is created and owned by DzApp. Request the instance via DzApp::getHelpMgr().

See Also:

Methods


void : browseToIdentifier( String identifier )

Opens the help browser at the given identifier.

Parameter(s):

  • identifier - The identifier to browse to.

void : browseToKeyword( String keyword )

Opens the help browser at the given keyword.

Parameter(s):

  • keyword - The keyword to browse to.

void : browseToPage( String page )

Opens the spacified page in the help browser.

Parameter(s):


void : browseToUrl( String url )

Opens the help browser at the given url.

Parameter(s):

  • url - The URL of the page to browse to.

Array : findFilterAttributes( String name )

Parameter(s):

  • name - The name of the help filter to get the attributes of.

Return Value:

  • The list of attributes for the help filter help keyword (if any), otherwise an empty list.

String : findIdentifierUrl( String id )

Parameter(s):

  • id - The help identifier to find the associated URL for.

Return Value:

  • The URL associated with the help identifier (if any), otherwise an empty URL.

String : findKeywordUrl( String keyword )

Parameter(s):

  • keyword - The keyword to find the associated URL for.

Return Value:

  • The URL associated with the help keyword (if any), otherwise an empty URL.

String : getDescription( String label )

Parameter(s):

  • label - The label of the help item.

Return Value:

  • The description for the help item named label (if any), otherwise an empty string.

Array : getFilterAttributes( Number which )

Parameter(s):

  • which - The index of the help filter attributes to return.

Return Value:

  • The list of attributes for the help filter at the given index (if valid), otherwise an empty list.

String : getFilterName( Number which )

Parameter(s):

  • which - The index of the help filter to return.

Return Value:

  • The name of the help filter at the given index (if valid), otherwise an empty string.

String : getGroup( String label )

Parameter(s):

  • label - The label of the help item.

Return Value:

  • The group for the help item named label (if any), otherwise an empty string.

Array : getGroups()

Return Value:

  • A list of the groups for the help items (if any), otherwise an empty list.

Since:

  • 4.11.0.151

Array : getHelpItemLabels()

Return Value:

  • A list of labels for all help items (if any), otherwise an empty list.

String : getHelpString( String label )

Parameter(s):

  • label - The label of the help item.

Return Value:

  • The whats this help string text for the help item named label (if any), otherwise an empty string.

String : getHelpStringReplacement( String group, String key )

Parameter(s):

  • group - The group name of the replacement text; must match the group name of the help item where the replacement will be used.
  • key - The key for the replacement text; must match the regular expression: [:/-_.a-zA-Z0-9]+.

Return Value:

  • The help string replacement text (if any), otherwise an empty string.

Since:

  • 4.11.0.359

Array : getHelpStringReplacementGroups()

Return Value:

  • A list of the help string replacement groups (if any), otherwise an empty list.

Since:

  • 4.11.0.359

Array : getHelpStringReplacementKeys( String group )

Parameter(s):

  • group - The group name of the replacement text; expected to be the group name of the help item where the replacement will be used.

Return Value:

  • A list of help string replacement keys in the specified group (if any), otherwise an empty list.

Since:

  • 4.11.0.359

String : getIdentifier( Number which )

Parameter(s):

  • which - The index of the help identifier to return.

Return Value:

  • The help identifier at the given index (if valid), otherwise an empty string.

String : getIdentifierUrl( Number which )

Parameter(s):

  • which - The index of the help identifier URL to return.

Return Value:

  • The URL associated with the help identifier at the given index (if valid), otherwise an empty URL.

String : getKeyword( Number which )

Parameter(s):

  • which - The index of the help keyword to return.

Return Value:

  • The help keyword at the given index (if valid), otherwise an empty string.

String : getKeywordUrl( Number which )

Parameter(s):

  • which - The index of the help keyword URL to return.

Return Value:

  • The URL associated with the help keyword at the given index (if any), otherwise an empty URL.

Number : getNumFilters()

Return Value:

  • The number of help filters.

Number : getNumIdentifiers()

Return Value:

  • The number of help identifiers.

Number : getNumKeywords()

Return Value:

  • The number of help keywords.

String : getStatusTip( String label )

Parameter(s):

  • label - The label of the help item.

Return Value:

  • The status tip text for the help item named label (if any), otherwise an empty string.

String : getToolTip( String label )

Parameter(s):

  • label - The label of the help item.

Return Value:

  • The tool tip text for the help item named label (if any), otherwise an empty string.

Boolean : hasHelpItem( String label )

Parameter(s):

  • label - The label of the help item.

Return Value:

  • true if a help item with the given label exists, otherwise false.

Boolean : isHelpItemUsed( String label )

Parameter(s):

  • label - The label of the help item.

Return Value:

  • true if a help item with the given label is used, otherwise false.

Boolean : removeHelpItem( String label )

Removes the help item with the given label.

Parameter(s):

  • label - The label of the help item to remove.

Return Value:

  • true if label was removed, otherwise false.

Boolean : renameHelpItem( String oldLabel, String newLabel )

Changes the name for the help item with the given label.

Parameter(s):

  • oldLabel - The label of the help item to rename.
  • newLabel - The new label of the help item.

Return Value:

  • true if oldLabel was renamed, otherwise false.

DzError : saveHelpItems( String filename, Array groups=[], Array labels=[] )

Save the inline help to the specified path.

Parameter(s):

  • path - The path to save to.
  • groups - The list of groups of items to include; an empty list (default) does not filter which groups to allow.
  • labels - The list of labels of items to include; an empty list (default) does not filter which labels to allow.

Return Value:

  • DZ_NO_ERROR on success, otherwise an appropriate error code.

Attention:

  • If path ends in a filename (has a file extension), a single file is saved - see saveHelpItemsFile(). If path has no file extension, it is treated as a directory path and a file named after each group in groups is saved. If any group is an empty string, for the purposes of generating a filename, it will be replaced with a single underscore ('_') character.

Since:

  • 4.11.0.151

void : setDescription( String label, String description )

Sets the description for the help item with the given label. If a help item does not exist, one will be created.

Parameter(s):

  • label - The label of the help item to set the values of.
  • description - The string to set the description of the help item to.

void : setGroup( String label, String group )

Sets the group for the help item with the given label. If a help item does not exist, one will be created.

Parameter(s):

  • label - The label of the help item to set the values of.
  • group - The string to set the group of the help item to.

void : setHelpItem( String label, String group, String description, String toolTip, String statusTip, String helpString )

Sets the values for the help item with the given label. If a help item does not exist, one will be created.

Parameter(s):

  • label - The label of the help item to set the values of.
  • description - The string to set the description of the help item to.
  • toolTip - The string to set the tool tip of the help item to.
  • statusTip - The string to set the status tip of the help item to.
  • helpString - The string to set the whats this help string of the help item to.

void : setHelpString( String label, String helpString )

Sets the whats this help string for the help item with the given label. If a help item does not exist, one will be created.

Parameter(s):

  • label - The label of the help item to set the values of.
  • helpString - The string to set the whats this help string of the help item to.

void : setHelpStringReplacement( String group, String key, String value )

Sets a key / value pair for a help string replacement in the specified group.

Parameter(s):

  • group - The group name of the replacement text; must match the group name of the help item where the replacement will be used.
  • key - The key for the replacement text; must match the regular expression: [:/-_.a-zA-Z0-9]+.
  • value - The replacement text.

Attention:

  • When the help string (i.e., toolTip, statusTip, whatsThis) for a widget/action is registered (i.e., during startup) or updated, a regular expression is used to capture a specific pattern within the help string that is used to perform a lookup into a table of replacement strings. If an entry for the captured portion of the pattern is found in the replacement string table, in the same group as the help item for that widget/action, the pattern in the help string is replaced by the found string before being assigned to the widget/action. The pattern expected is loosely based on the “Mustache” syntax - that is, two opening curly braces (i.e., "{{"), followed by one or more specific characters, followed by two closing curly braces (i.e., "}}").

See Also:

Since:

  • 4.11.0.359

void : setStatusTip( String label, String statusTip )

Sets the status tip for the help item with the given label. If a help item does not exist, one will be created.

Parameter(s):

  • label - The label of the help item to set the values of.
  • statusTip - The string to set the status tip of the help item to.

void : setToolTip( String label, String toolTip )

Sets the tool tip for the help item with the given label. If a help item does not exist, one will be created.

Parameter(s):

  • label - The label of the help item to set the values of.
  • toolTip - The string to set the tool tip of the help item to.

void : updateHelp( QWidget widget )

Called to update the inline help for a widget.

Parameter(s):

  • widget - The widget to update help for.

void : updateHelp( DzAction action )

Called to update the inline help for an action.

Parameter(s):

  • action - The action to update help for.