Developer Documentation
|
a class which provides an link generator for WhatsThisMessages linking to the user doc If you have an QAction pointer called action, you can call: More...
#include <OpenFlipper/BasePlugin/WhatsThisGenerator.hh>
Public Member Functions | |
WhatsThisGenerator (const QString &_plugin_name) | |
QString | generateLink (const QString &_ref="", const QString &_site="index.html") const |
generates a clickable link to the documentation for whatsThis Messages More... | |
void | setWhatsThis (QAction *_action, const QString &_msg, const QString &_ref="", const QString &_site="index.html") const |
sets a whatsThis Message plus link to the doc for the given QAction More... | |
Private Attributes | |
const QString | plugin_name_ |
a class which provides an link generator for WhatsThisMessages linking to the user doc If you have an QAction pointer called action, you can call:
This message "Hello" will be shown when somebody call this action in WhatsThisMode.
WhatsThisGenerator provides functions linking to the user documentation. e.g. assume that whatsThisGen is a valid WhatsThisGenerator object
The code above will change the output for WhatsThisMessages to: "Hello Click here for more information" where "Click here for more information" is a link which will call the index.html (default parameter) of the plugin which you have to specify in the constructor of WhatsThisGenerator.
You can also use the WhatsThisGenerator to set the WhatsThisMessage:
It has the same effect and options like the code above and is shorter.
Definition at line 65 of file WhatsThisGenerator.hh.
|
explicit |
Constructor for the whatsThisGenerator initializing the plugin name.
_plugin_name | the name of the plugin which is used |
Definition at line 50 of file WhatsThisGenerator.cc.
QString WhatsThisGenerator::generateLink | ( | const QString & | _ref = "" , |
const QString & | _site = "index.html" |
||
) | const |
generates a clickable link to the documentation for whatsThis Messages
_ref | gives the section in the documentation for the action. The help-browser will jump into the section. An example: _jump = "Cube" in PrimitiveGenerator refs to the section "Cube" in the Documentation and the help Browser. |
_site | gives the documentation site (html-site) which you want to open. Default is the site "index.html". You need this parameter if you have more than one site in your plugin documentation and want to refer on one of this. |
Definition at line 65 of file WhatsThisGenerator.cc.
void WhatsThisGenerator::setWhatsThis | ( | QAction * | _action, |
const QString & | _msg, | ||
const QString & | _ref = "" , |
||
const QString & | _site = "index.html" |
||
) | const |
sets a whatsThis Message plus link to the doc for the given QAction
_action | action where the message should appear. |
_msg | help message for the user. This is the default Whatsthis Text which you set with QAction::setWhatsThis |
_ref | gives the section in the documentation for the action. The help-browser will jump into the section. An example: _jump = "Cube" in PrimitiveGenerator refs to the section "Cube" in the Documentation and the help Browser. |
_site | gives the documentation site (html-site) which you want to open. Default is the site "index.html". You need this parameter if you have more than one site in your plugin documentation and want to refer on one of this. |
Definition at line 89 of file WhatsThisGenerator.cc.