BALL::VIEW::HelpViewer Class Reference
[Modular Widgets]

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

Inheritance diagram for BALL::VIEW::HelpViewer:
Inheritance graph
[legend]

List of all members.

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 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 StringgetDefaultPage () const
void setProject (const String &project)
String getProject () const
void setBaseDirectory (const String &dir)
const StringgetBaseDirectory () 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)

Protected Member Functions

void collectClasses_ ()

Protected Attributes

String project_
String default_page_
String base_dir_
MyTextBrowserbrowser_
bool whats_this_mode_
bool ignore_event_
bool whats_this_
QActionwhats_action_
HashMap< const QObject *, Stringdocu_entries_
StringHashMap< Stringclasses_to_files_

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.

Definition at line 66 of file helpViewer.h.


Constructor & Destructor Documentation

BALL::VIEW::HelpViewer::HelpViewer ( QWidget parent,
const char *  name = 0 
)
virtual BALL::VIEW::HelpViewer::~HelpViewer (  )  [virtual]

Member Function Documentation

void BALL::VIEW::HelpViewer::collectClasses_ (  )  [protected]
void BALL::VIEW::HelpViewer::enterWhatsThisMode (  )  [slot]
bool BALL::VIEW::HelpViewer::eventFilter ( QObject obj,
QEvent e 
) [slot]

Event filter for the whats this mode.

void BALL::VIEW::HelpViewer::exitWhatsThisMode (  )  [slot]
const String& BALL::VIEW::HelpViewer::getBaseDirectory (  )  const
const String& BALL::VIEW::HelpViewer::getDefaultPage (  )  const
String BALL::VIEW::HelpViewer::getHelpEntryFor ( const QObject object  )  const

Get help entry for widget.

String BALL::VIEW::HelpViewer::getProject (  )  const [inline]

Definition at line 109 of file helpViewer.h.

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

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

virtual void BALL::VIEW::HelpViewer::initializeWidget ( MainControl main_control  )  [virtual]

Setup the menu entry

Reimplemented from BALL::VIEW::DockWidget.

bool BALL::VIEW::HelpViewer::isWhatsThisEnabled (  )  const [inline]

Definition at line 139 of file helpViewer.h.

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.

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::DockWidget.

void BALL::VIEW::HelpViewer::setBaseDirectory ( const String dir  ) 
void BALL::VIEW::HelpViewer::setDefaultPage ( const String url  ) 
void BALL::VIEW::HelpViewer::setProject ( const String project  )  [inline]

Definition at line 106 of file helpViewer.h.

void BALL::VIEW::HelpViewer::setWhatsThisEnabled ( bool  state  )  [inline]

Definition at line 136 of file helpViewer.h.

void BALL::VIEW::HelpViewer::showDocumentationFor ( const String classname,
const String member 
)
bool BALL::VIEW::HelpViewer::showDocumentationForObject (  ) 

Show documentation for object under cursor.

virtual void BALL::VIEW::HelpViewer::showHelp (  )  [virtual, slot]

Show default page.

virtual void BALL::VIEW::HelpViewer::showHelp ( const String URL,
String  entry 
) [virtual]
virtual void BALL::VIEW::HelpViewer::showHelp ( const String URL  )  [virtual]

Reimplemented from BALL::VIEW::ModularWidget.

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

Show the documentation entry for a given widget.

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

Unregister a widget for showing its documentation.


Member Data Documentation

Definition at line 164 of file helpViewer.h.

Definition at line 165 of file helpViewer.h.

Definition at line 172 of file helpViewer.h.

Definition at line 163 of file helpViewer.h.

Definition at line 171 of file helpViewer.h.

Definition at line 167 of file helpViewer.h.

Definition at line 162 of file helpViewer.h.

Definition at line 169 of file helpViewer.h.

Definition at line 168 of file helpViewer.h.

Definition at line 166 of file helpViewer.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Generated by  doxygen 1.6.3