Developer Documentation
|
#include <OpenFlipper/widgets/helpWidget/helpBrowser.hh>
Public Slots | |
void | open (const QString &_url) |
void | open (const QUrl &_url, bool _skipSave=false) |
Opens a new url from the help system in the browser. More... | |
void | backward () |
Show last page stored in the history. More... | |
void | forward () |
Show next page stored in the history. More... | |
Signals | |
void | historyChanged (const QUrl &) |
Public Member Functions | |
HelpBrowser (QHelpEngine *_helpEngine, QWidget *parent=0) | |
Constructor. More... | |
virtual | ~HelpBrowser () |
Destructor. | |
QVariant | loadResource (int _type, const QUrl &_name) |
re implementation of the load resource function of the text browser More... | |
bool | isBackwardAvailable () |
Checks if we visited other pages before. More... | |
bool | isForwardAvailable () |
Checks if the back button was pressed and we can go forward to the next page. More... | |
QUrl | resolveUrl (const QUrl &_url) |
resolves relative urls to absolute More... | |
Private Slots | |
void | rememberHistory (const QUrl &_url) |
Adds a new page to the history. More... | |
Private Member Functions | |
QUrl | getCurrentDir (const QUrl &_url) |
Extract path from URL. More... | |
void | updateNameSpaceAndFolder (const QUrl &_url) |
updateNameSpaceAndFolder More... | |
Private Attributes | |
QHelpEngine * | helpEngine_ |
The help engine the widget is working on. | |
QList< QUrl > | visitedPages_ |
History of the visited pages. | |
int | currentPage_ |
Current position in the history. | |
QString | currentVirtualFolder_ |
The currently active virtual folder. More... | |
QString | currentNameSpace_ |
The currently active namespace. More... | |
This class implements OpenFlippers help browser. The QtHelp files are loaded at startup into the help engine which is passed to this widget.
Definition at line 77 of file helpBrowser.hh.
HelpBrowser::HelpBrowser | ( | QHelpEngine * | _helpEngine, |
QWidget * | parent = 0 |
||
) |
Constructor.
Sets up a new help widget which works on the given help engine
_helpEngine | QHelpEngine |
parent | Parent widget |
Definition at line 61 of file helpBrowser.cc.
|
slot |
Show last page stored in the history.
Definition at line 213 of file helpBrowser.cc.
|
slot |
Show next page stored in the history.
Definition at line 222 of file helpBrowser.cc.
|
private |
Extract path from URL.
Removes the filename part from the url and returns only the directory component
_url | Input url |
Definition at line 189 of file helpBrowser.cc.
bool HelpBrowser::isBackwardAvailable | ( | ) |
Checks if we visited other pages before.
Definition at line 208 of file helpBrowser.cc.
bool HelpBrowser::isForwardAvailable | ( | ) |
Checks if the back button was pressed and we can go forward to the next page.
Definition at line 203 of file helpBrowser.cc.
QVariant HelpBrowser::loadResource | ( | int | _type, |
const QUrl & | _name | ||
) |
re implementation of the load resource function of the text browser
This function loads a resource from the help system. It also handles jumping to another namespace via relative links in the url
_type | Ignored |
_name | A filename in the help system that should be loaded (image, html document) |
Definition at line 143 of file helpBrowser.cc.
|
slot |
Opens a new url from the help system in the browser.
_url | URL that should be opened |
_skipSave | Flag if the URL should be saved in the history |
Definition at line 162 of file helpBrowser.cc.
|
privateslot |
Adds a new page to the history.
_url | URL of the new page |
Definition at line 93 of file helpBrowser.cc.
QUrl HelpBrowser::resolveUrl | ( | const QUrl & | _url | ) |
resolves relative urls to absolute
_url | relative URL which will be resolved |
Definition at line 112 of file helpBrowser.cc.
|
private |
updateNameSpaceAndFolder
This function takes the url and extracts the virtual namespace and folder information which are stored in the variables. These variables are used to find the corresponding images.
_url | The url that should be analyzed |
Definition at line 77 of file helpBrowser.cc.
|
private |
The currently active namespace.
QT manages the different help files for the plugins with different name spaces. This variable will always hold the currently active one.
Definition at line 203 of file helpBrowser.hh.
|
private |
The currently active virtual folder.
QT manages the different help files for the plugins in different virtual folders. This variable will always hold the currently active one.
Definition at line 196 of file helpBrowser.hh.