Loading...
Searching...
No Matches
helpViewer.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
// $Id: helpViewer.h,v 1.2.18.1 2007/03/25 21:26:21 oliver Exp $
//
#ifndef BALL_VIEW_WIDGETS_HELPVIEWER_H
#define BALL_VIEW_WIDGETS_HELPVIEWER_H
#ifndef BALL_VIEW_WIDGETS_DOCKWIDGET_H
# include <BALL/VIEW/WIDGETS/dockWidget.h>
#endif
#include <QtWidgets/QTextBrowser>
namespace BALL
{
namespace VIEW
{
class BALL_DEPRECATED BALL_VIEW_EXPORT MyTextBrowser
: public QTextBrowser
{
Q_OBJECT
public:
MyTextBrowser(QWidget* parent, const char* name = 0);
protected:
bool forward_, backward_;
};
class BALL_DEPRECATED BALL_VIEW_EXPORT HelpViewer
: public DockWidget
{
Q_OBJECT
public:
BALL_EMBEDDABLE(HelpViewer, DockWidget)
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) { project_ = project;}
String getProject() const { return project_;}
void setBaseDirectory(const String& dir);
const String& getBaseDirectory() const;
virtual void registerForHelpSystem(const QObject* object, const String& docu_entry);
void unregisterForHelpSystem(const QObject* object);
bool showHelpFor(const QObject* object);
bool showDocumentationForObject();
bool hasHelpFor(const QObject* object) const;
String getHelpEntryFor(const QObject* object) const;
void setWhatsThisEnabled(bool state) { whats_this_ = state;}
bool isWhatsThisEnabled() const {return whats_this_;}
void showDocumentationFor(const String& classname, const String& member);
public Q_SLOTS:
virtual void showHelp();
void enterWhatsThisMode();
void exitWhatsThisMode();
bool eventFilter(QObject* obj, QEvent* e);
protected:
void collectClasses_();
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_;
};
} } // namespaces
#endif // BALL_VIEW_WIDGETS_HELPVIEWER_H
BALL_DEPRECATED
#define BALL_DEPRECATED
Definition COMMON/global.h:64
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition COMMON/global.h:52
BALL::HashMap
HashMap class based on the STL map (containing serveral convenience functions).
Definition hashMap.h:74
BALL::StringHashMap
Definition stringHashMap.h:42
BALL::String
Definition string.h:57
BALL::VIEW::DockWidget::DockWidget
DockWidget(QWidget *parent, const char *title=0)
Use this constructor!
BALL::VIEW::HelpViewer::classes_to_files_
StringHashMap< String > classes_to_files_
Definition helpViewer.h:168
BALL::VIEW::HelpViewer::getDefaultPage
const String & getDefaultPage() const
BALL::VIEW::HelpViewer::getBaseDirectory
const String & getBaseDirectory() const
BALL::VIEW::HelpViewer::showDocumentationFor
void showDocumentationFor(const String &classname, const String &member)
BALL::VIEW::HelpViewer::setProject
void setProject(const String &project)
Definition helpViewer.h:102
BALL::VIEW::HelpViewer::collectClasses_
void collectClasses_()
BALL::VIEW::HelpViewer::exitWhatsThisMode
void exitWhatsThisMode()
BALL::VIEW::HelpViewer::showHelpFor
bool showHelpFor(const QObject *object)
Show the documentation entry for a given widget.
BALL::VIEW::HelpViewer::HelpViewer
HelpViewer(QWidget *parent, const char *name=0)
BALL::VIEW::HelpViewer::registerForHelpSystem
virtual void registerForHelpSystem(const QObject *object, const String &docu_entry)
Register a widget for showing its documentation.
BALL::VIEW::HelpViewer::showDocumentationForObject
bool showDocumentationForObject()
Show documentation for object under cursor.
BALL::VIEW::HelpViewer::setWhatsThisEnabled
void setWhatsThisEnabled(bool state)
Definition helpViewer.h:132
BALL::VIEW::HelpViewer::onNotify
virtual void onNotify(Message *message)
BALL::VIEW::HelpViewer::showHelp
virtual void showHelp()
Show default page.
BALL::VIEW::HelpViewer::docu_entries_
HashMap< const QObject *, String > docu_entries_
Definition helpViewer.h:167
BALL::VIEW::HelpViewer::unregisterForHelpSystem
void unregisterForHelpSystem(const QObject *object)
Unregister a widget for showing its documentation.
BALL::VIEW::HelpViewer::ignore_event_
bool ignore_event_
Definition helpViewer.h:163
BALL::VIEW::HelpViewer::isWhatsThisEnabled
bool isWhatsThisEnabled() const
Definition helpViewer.h:135
BALL::VIEW::HelpViewer::whats_this_mode_
bool whats_this_mode_
Definition helpViewer.h:162
BALL::VIEW::HelpViewer::getProject
String getProject() const
Definition helpViewer.h:105
BALL::VIEW::HelpViewer::hasHelpFor
bool hasHelpFor(const QObject *object) const
Check wheter we have a documentation entry for a given object.
BALL::VIEW::HelpViewer::getHelpEntryFor
String getHelpEntryFor(const QObject *object) const
Get help entry for widget.
BALL::VIEW::HelpViewer::project_
String project_
Definition helpViewer.h:158
BALL::VIEW::HelpViewer::showHelp
virtual void showHelp(const String &URL)
BALL::VIEW::HelpViewer::setBaseDirectory
void setBaseDirectory(const String &dir)
BALL::VIEW::HelpViewer::whats_action_
QAction * whats_action_
Definition helpViewer.h:165
BALL::VIEW::HelpViewer::enterWhatsThisMode
void enterWhatsThisMode()
BALL::VIEW::HelpViewer::browser_
MyTextBrowser * browser_
Definition helpViewer.h:161
BALL::VIEW::HelpViewer::whats_this_
bool whats_this_
Definition helpViewer.h:164
BALL::VIEW::HelpViewer::base_dir_
String base_dir_
Definition helpViewer.h:160
BALL::VIEW::HelpViewer::default_page_
String default_page_
Definition helpViewer.h:159
BALL::VIEW::HelpViewer::initializeWidget
virtual void initializeWidget(MainControl &main_control)
BALL::VIEW::HelpViewer::eventFilter
bool eventFilter(QObject *obj, QEvent *e)
Event filter for the whats this mode.
BALL::VIEW::HelpViewer::setDefaultPage
void setDefaultPage(const String &url)
BALL::VIEW::MainControl
Definition mainControl.h:118
BALL::VIEW::Message
Definition message.h:53
BALL::VIEW::MyTextBrowser
Definition helpViewer.h:26
BALL::VIEW::MyTextBrowser::MyTextBrowser
MyTextBrowser(QWidget *parent, const char *name=0)
BALL::VIEW::MyTextBrowser::backward_
bool backward_
Definition helpViewer.h:35
BALL::VIEW::MyTextBrowser::forward_
bool forward_
Definition helpViewer.h:35
QEvent
QObject
QTextBrowser
QWidget
dockWidget.h
BALL_EMBEDDABLE
#define BALL_EMBEDDABLE(TYPE, BASE)
Definition embeddable.h:31
BALL::VIEW
Definition constraints.h:35
BALL
Definition constants.h:13