Loading...
Searching...
No Matches
BALL::VIEW::HelpViewer Class Reference
Visualisation » Modular Widgets

`#include <BALL/VIEW/WIDGETS/helpViewer.h>`

Inheritance diagram for BALL::VIEW::HelpViewer:

## Public Slots

virtual void | showHelp ()
| Show default page.
void | enterWhatsThisMode ()
void | exitWhatsThisMode ()
bool | eventFilter (QObject *obj, QEvent *e)
| Event filter for the whats this mode.
Public Slots inherited from BALL::VIEW::DockWidget
virtual void | dropEvent (QDropEvent *e)
virtual void | dragEnterEvent (QDragEnterEvent *e)
virtual void | showGuestContextMenu (const QPoint &)

## Public Member Functions

| HelpViewer (QWidget *parent, const char *name=0)
virtual | ~HelpViewer ()
virtual void | initializeWidget (MainControl &main_control)
virtual void | onNotify (Message *message)
virtual void | showHelp (const String &URL)
virtual void | showHelp (const String &URL, String entry)
void | setDefaultPage (const String &url)
const String & | getDefaultPage () const
void | setProject (const String &project)
String | getProject () const
void | setBaseDirectory (const String &dir)
const String & | getBaseDirectory () const
virtual void | registerForHelpSystem (const QObject *object, const String &docu_entry)
| Register a widget for showing its documentation.
void | unregisterForHelpSystem (const QObject *object)
| Unregister a widget for showing its documentation.
bool | showHelpFor (const QObject *object)
| Show the documentation entry for a given widget.
bool | showDocumentationForObject ()
| Show documentation for object under cursor.
bool | hasHelpFor (const QObject *object) const
| Check wheter we have a documentation entry for a given object.
String | getHelpEntryFor (const QObject *object) const
| Get help entry for widget.
void | setWhatsThisEnabled (bool state)
bool | isWhatsThisEnabled () const
void | showDocumentationFor (const String &classname, const String &member)
Public Member Functions inherited from BALL::VIEW::DockWidget
| DockWidget (QWidget *parent, const char *title=0)
| Use this constructor!
virtual | ~DockWidget ()
void | setGuest (QWidget &guest)
virtual void | fetchPreferences (INIFile &inifile)
virtual void | writePreferences (INIFile &inifile)
virtual void | setWidgetVisible (bool state)
| For usage with Python:
QGridLayout * | getGuestLayout ()
Public Member Functions inherited from BALL::VIEW::ModularWidget
| ModularWidget (const char *name="<ModularWidget>")
| ModularWidget (const ModularWidget &widget)
virtual | ~ModularWidget ()
virtual void | destroy ()
virtual void | clear ()
virtual void | checkMenu (MainControl &main_control)
QAction * | insertMenuEntry (Position parent_id, const QString &name, const QObject *receiver=0, const char *slot=0, const String &description="", QKeySequence accel=QKeySequence(), const QString &menu_hint=QString(""), UIOperationMode::OperationMode minimal_mode=UIOperationMode::MODE_ALL)
BALL_DEPRECATED void | setMenuHelp (QAction *, const String &)
virtual void | addToolBarEntries (QToolBar *main_tb)
void | setIcon (QAction *action, const String &filename, bool add_to_main_toolbar=true)
virtual void | initializePreferencesTab (Preferences &preferences)
virtual void | finalizePreferencesTab (Preferences &preferences)
virtual void | applyPreferences ()
bool | lockComposites ()
bool | unlockComposites ()
| Unlock the Composites.
MainControl * | getMainControl () const
virtual void | setStatusbarText (const String &text, bool important=false)
virtual void | setStatusbarText (const QString &text, bool important=false)
String | getWorkingDir ()
| Implemented for convenience.
void | setWorkingDir (const String &dir)
| Implemented for convenience.
FragmentDB & | getFragmentDB () const
virtual void | dump (std::ostream &s=std::cout, Size depth=0) const
void | setWorkingDirFromFilename_ (String filename)
virtual void | finalizeWidget (MainControl &main_control)
virtual bool | canHandle (const String &) const
virtual bool | openFile (const String &)
Public Member Functions inherited from BALL::Embeddable
| Embeddable (const String &identifier="<Embeddable>")
| Embeddable (const Embeddable &embeddable)
virtual | ~Embeddable ()
void | setIdentifier (const String &identifier)
const String & | getIdentifier () const
void | unregisterThis ()
virtual void | registerThis ()
Public Member Functions inherited from BALL::VIEW::ConnectionObject
| ConnectionObject ()
virtual | ~ConnectionObject ()
void | registerConnectionObject (ConnectionObject &object)
void | unregisterConnectionObject (ConnectionObject &object)
bool | isConnectionObjectRegistered (const ConnectionObject &object)
ConnectionObject * | getParent () const
ConnectionObject * | getRoot ()
virtual bool | isValid () const

## Protected Member Functions

void | collectClasses_ ()
Protected Member Functions inherited from BALL::VIEW::DockWidget
| DockWidget ()
| DockWidget (const DockWidget &)
void | notify_ (Message *message)
void | notify_ (Message &message)
void | onNotify_ (Message *message)

## Protected Attributes

String | project_
String | default_page_
String | base_dir_
MyTextBrowser * | browser_
bool | whats_this_mode_
bool | ignore_event_
bool | whats_this_
QAction * | whats_action_
HashMap< const QObject *, String > | docu_entries_
StringHashMap< String > | classes_to_files_
Protected Attributes inherited from BALL::VIEW::DockWidget
QWidget * | container_
QWidget * | guest_
QGridLayout * | layout_
QAction * | window_menu_entry_
bool | show_window_enty_
bool | default_visible_
QList< QAction * > | main_toolbar_actions_

## Additional Inherited Members

Public Types inherited from BALL::Embeddable
typedef std::vector< Embeddable * > | EmbeddableVector
static void | registerWidget (ModularWidget *mwidget)
static void | registerInstance_ (const std::type_info &type, const Embeddable *instance)
static void | unregisterInstance_ (const Embeddable *instance)
static Size | countInstances_ (const std::type_info &type)
static Embeddable * | getInstance_ (const std::type_info &type, Position index)
static Embeddable * | getInstance_ (const std::type_info &type, const String &identifier)

## Detailed Description

DockWidget to show online help texts e.g. the BALLView documentation The documentation for BALLView was written in the HTML format, such that it either be used online from the project's website or inside the program itself. To obtain help for individual elements in the graphical user interface a special mode was added. In the "Help" menu the entry "Whats this?" will switch into this mode and transform the mouse cursor into a question mark. While the "Whats this?" mode is active a left mouse click on any widget will open the corresponding help entry in the documentation. (If no help entry for that widget exists nothing will happen.) To leave the "Whats this?" mode just press the right mouse button or press the "Escape" key. As an alternative for this approach the "F1" key will popup the documentation for the current widget under the mouse cursor.
To show a specific help page, just call ModularWidget::showHelp(String) or send a ShowHelpMessage. Per default the HelpViewer looks for index.html in $BALL_DATA_PATH/../doc/BALLView . You can change this behavior by using setDefaultDir() and setDefaultPage(). Links to pages on the WWW wont work! QWidgets and menu entries can be registered with a link into the HTML documentation. See registerWidgetForHelpSystem. The implemention for opening the documentation per "Whats this?" menu entry and the hotkey "F1" is also done here.

Deprecated
  Help system has been removed. This class will also be removed in the next release.

Definition at line 62 of file helpViewer.h.

## Constructor & Destructor Documentation

## HelpViewer()

BALL::VIEW::HelpViewer::HelpViewer | ( | QWidget * | parent,
|  | const char * | name = 0 )

## ~HelpViewer()

virtual BALL::VIEW::HelpViewer::~HelpViewer | ( |  | ) |

virtual

## Member Function Documentation

## collectClasses_()

void BALL::VIEW::HelpViewer::collectClasses_ | ( |  | ) |

protected

## enterWhatsThisMode

void BALL::VIEW::HelpViewer::enterWhatsThisMode | ( |  | ) |

slot

## eventFilter

bool BALL::VIEW::HelpViewer::eventFilter | ( | QObject * | obj,
|  | QEvent * | e )

slot

Event filter for the whats this mode.

## exitWhatsThisMode

void BALL::VIEW::HelpViewer::exitWhatsThisMode | ( |  | ) |

slot

## getBaseDirectory()

const String & BALL::VIEW::HelpViewer::getBaseDirectory | ( |  | ) | const

## getDefaultPage()

const String & BALL::VIEW::HelpViewer::getDefaultPage | ( |  | ) | const

## getHelpEntryFor()

String BALL::VIEW::HelpViewer::getHelpEntryFor | ( | const QObject * | object | ) | const

Get help entry for widget.

## getProject()

String BALL::VIEW::HelpViewer::getProject | ( |  | ) | const

inline

Definition at line 105 of file helpViewer.h.

## hasHelpFor()

bool BALL::VIEW::HelpViewer::hasHelpFor | ( | const QObject * | object | ) | const

Check wheter we have a documentation entry for a given object.

## initializeWidget()

virtual void BALL::VIEW::HelpViewer::initializeWidget | ( | MainControl & | main_control | ) |

virtual

Setup the menu entry

Reimplemented from BALL::VIEW::DockWidget.

## isWhatsThisEnabled()

bool BALL::VIEW::HelpViewer::isWhatsThisEnabled | ( |  | ) | const

inline

Definition at line 135 of file helpViewer.h.

## onNotify()

virtual void BALL::VIEW::HelpViewer::onNotify | ( | Message * | message | ) |

virtual

Handles messages sent by other registered ConnectionObject objects. Filters for SceneMessage and sets the Camera appropriate or updates the visualization.

Parameters

  message | the pointer to the message that should be processed

See also
  ConnectionObject
  Message

Reimplemented from BALL::VIEW::ConnectionObject.

## registerForHelpSystem()

virtual void BALL::VIEW::HelpViewer::registerForHelpSystem | ( | const QObject * | object,
|  | const String & | docu_entry )

virtual

Register a widget for showing its documentation.

Reimplemented from BALL::VIEW::ModularWidget.

## setBaseDirectory()

void BALL::VIEW::HelpViewer::setBaseDirectory | ( | const String & | dir | ) |

## setDefaultPage()

void BALL::VIEW::HelpViewer::setDefaultPage | ( | const String & | url | ) |

## setProject()

void BALL::VIEW::HelpViewer::setProject | ( | const String & | project | ) |

inline

Definition at line 102 of file helpViewer.h.

## setWhatsThisEnabled()

void BALL::VIEW::HelpViewer::setWhatsThisEnabled | ( | bool | state | ) |

inline

Definition at line 132 of file helpViewer.h.

## showDocumentationFor()

void BALL::VIEW::HelpViewer::showDocumentationFor | ( | const String & | classname,
|  | const String & | member )

## showDocumentationForObject()

bool BALL::VIEW::HelpViewer::showDocumentationForObject | ( |  | ) |

Show documentation for object under cursor.

## showHelp [1/3]

virtual void BALL::VIEW::HelpViewer::showHelp | ( |  | ) |

virtual slot

Show default page.

## showHelp() [2/3]

virtual void BALL::VIEW::HelpViewer::showHelp | ( | const String & |  | ) |

virtual

Deprecated
  Help system has been removed. This function will also be removed in the next release.

Reimplemented from BALL::VIEW::ModularWidget.

## showHelp() [3/3]

virtual void BALL::VIEW::HelpViewer::showHelp | ( | const String & | URL,
|  | String | entry )

virtual

## showHelpFor()

bool BALL::VIEW::HelpViewer::showHelpFor | ( | const QObject * | object | ) |

Show the documentation entry for a given widget.

## unregisterForHelpSystem()

void BALL::VIEW::HelpViewer::unregisterForHelpSystem | ( | const QObject * | object | ) |

Unregister a widget for showing its documentation.

## Member Data Documentation

## base_dir_

String BALL::VIEW::HelpViewer::base_dir_

protected

Definition at line 160 of file helpViewer.h.

## browser_

MyTextBrowser* BALL::VIEW::HelpViewer::browser_

protected

Definition at line 161 of file helpViewer.h.

## classes_to_files_

StringHashMap<String> BALL::VIEW::HelpViewer::classes_to_files_

protected

Definition at line 168 of file helpViewer.h.

## default_page_

String BALL::VIEW::HelpViewer::default_page_

protected

Definition at line 159 of file helpViewer.h.

## docu_entries_

HashMap<const QObject*, String> BALL::VIEW::HelpViewer::docu_entries_

protected

Definition at line 167 of file helpViewer.h.

## ignore_event_

bool BALL::VIEW::HelpViewer::ignore_event_

protected

Definition at line 163 of file helpViewer.h.

## project_

String BALL::VIEW::HelpViewer::project_

protected

Definition at line 158 of file helpViewer.h.

## whats_action_

QAction* BALL::VIEW::HelpViewer::whats_action_

protected

Definition at line 165 of file helpViewer.h.

## whats_this_

bool BALL::VIEW::HelpViewer::whats_this_

protected

Definition at line 164 of file helpViewer.h.

## whats_this_mode_

bool BALL::VIEW::HelpViewer::whats_this_mode_

protected

Definition at line 162 of file helpViewer.h.