Developer Documentation

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Slots | Signals | Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
HelpBrowser Class Reference

`#include <OpenFlipper/widgets/helpWidget/helpBrowser.hh>`

Inheritance diagram for HelpBrowser:

## 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...

## Detailed Description

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.

## Constructor & Destructor Documentation

HelpBrowser::HelpBrowser | ( | QHelpEngine * | _helpEngine,
|  | QWidget * | parent = `0`
| ) |  |

Constructor.

Sets up a new help widget which works on the given help engine

Parameters

  _helpEngine | QHelpEngine
  parent | Parent widget

Definition at line 61 of file helpBrowser.cc.

## Member Function Documentation

void HelpBrowser::backward | ( |  | ) |
| slot

Show last page stored in the history.

Definition at line 213 of file helpBrowser.cc.

void HelpBrowser::forward | ( |  | ) |
| slot

Show next page stored in the history.

Definition at line 222 of file helpBrowser.cc.

QUrl HelpBrowser::getCurrentDir | ( | const QUrl & | _url | ) |
| private

Extract path from URL.

Removes the filename part from the url and returns only the directory component

Parameters

  _url | Input url

Returns
  Path

Definition at line 189 of file helpBrowser.cc.

bool HelpBrowser::isBackwardAvailable | ( |  | ) |

Checks if we visited other pages before.

Returns
  Did we visit pages before to which we can jump back? (History)

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.

Returns
  is a page stored in the forward list?

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

Parameters

  _type | Ignored
  _name | A filename in the help system that should be loaded (image, html document)

Returns
  The loaded resource

Definition at line 143 of file helpBrowser.cc.

void HelpBrowser::open | ( | const QUrl & | _url,
|  | bool | _skipSave = `false`
| ) |  |
| slot

Opens a new url from the help system in the browser.

Parameters

  _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.

void HelpBrowser::rememberHistory | ( | const QUrl & | _url | ) |
| private slot

Adds a new page to the history.

Parameters

  _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

Parameters

  _url | relative URL which will be resolved

Returns
  absolute url

Definition at line 112 of file helpBrowser.cc.

void HelpBrowser::updateNameSpaceAndFolder | ( | const QUrl & | _url | ) |
| 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.

Parameters

  _url | The url that should be analyzed

Definition at line 77 of file helpBrowser.cc.

## Member Data Documentation

QString HelpBrowser::currentNameSpace_
| 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.

QString HelpBrowser::currentVirtualFolder_
| 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.

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

- OpenFlipper/widgets/helpWidget/helpBrowser.hh
- OpenFlipper/widgets/helpWidget/helpBrowser.cc