BALL 1.5.0
Loading...
Searching...
No Matches
helpViewer.h
Go to the documentation of this file.
1// -*- Mode: C++; tab-width: 2; -*-
2// vi: set ts=2:
3//
4// $Id: helpViewer.h,v 1.2.18.1 2007/03/25 21:26:21 oliver Exp $
5//
6
7#ifndef BALL_VIEW_WIDGETS_HELPVIEWER_H
8#define BALL_VIEW_WIDGETS_HELPVIEWER_H
9
10#ifndef BALL_VIEW_WIDGETS_DOCKWIDGET_H
12#endif
13
14#include <QtWidgets/QTextBrowser>
15
16namespace BALL
17{
18 namespace VIEW
19 {
20
25 : public QTextBrowser
26 {
27 Q_OBJECT
28
29 public:
30
31 MyTextBrowser(QWidget* parent, const char* name = 0);
32
33 protected:
34
35 bool forward_, backward_;
36 };
37
63 : public DockWidget
64 {
65 Q_OBJECT
66
67 public:
68
70
71
72 HelpViewer(QWidget* parent, const char* name = 0);
73
75 virtual ~HelpViewer();
76
79 virtual void initializeWidget(MainControl& main_control);
80
87 virtual void onNotify(Message *message);
88
90 virtual void showHelp(const String& URL);
91
93 virtual void showHelp(const String& URL, String entry);
94
96 void setDefaultPage(const String& url);
97
99 const String& getDefaultPage() const;
100
102 void setProject(const String& project) { project_ = project;}
103
105 String getProject() const { return project_;}
106
108 void setBaseDirectory(const String& dir);
109
111 const String& getBaseDirectory() const;
112
114 virtual void registerForHelpSystem(const QObject* object, const String& docu_entry);
115
117 void unregisterForHelpSystem(const QObject* object);
118
120 bool showHelpFor(const QObject* object);
121
124
126 bool hasHelpFor(const QObject* object) const;
127
129 String getHelpEntryFor(const QObject* object) const;
130
132 void setWhatsThisEnabled(bool state) { whats_this_ = state;}
133
135 bool isWhatsThisEnabled() const {return whats_this_;}
136
138 void showDocumentationFor(const String& classname, const String& member);
139
140 public Q_SLOTS:
141
143 virtual void showHelp();
144
147
150
152 bool eventFilter(QObject* obj, QEvent* e);
153
154 protected:
155
157
166
169 };
170
171} } // namespaces
172
173#endif // BALL_VIEW_WIDGETS_HELPVIEWER_H
#define BALL_EMBEDDABLE(TYPE, BASE)
Definition embeddable.h:31
HashMap class based on the STL map (containing serveral convenience functions)
MyTextBrowser(QWidget *parent, const char *name=0)
StringHashMap< String > classes_to_files_
Definition helpViewer.h:168
const String & getBaseDirectory() const
void showDocumentationFor(const String &classname, const String &member)
bool showHelpFor(const QObject *object)
Show the documentation entry for a given widget.
virtual void registerForHelpSystem(const QObject *object, const String &docu_entry)
Register a widget for showing its documentation.
bool showDocumentationForObject()
Show documentation for object under cursor.
void setWhatsThisEnabled(bool state)
Definition helpViewer.h:132
virtual void showHelp()
Show default page.
HashMap< const QObject *, String > docu_entries_
Definition helpViewer.h:167
void unregisterForHelpSystem(const QObject *object)
Unregister a widget for showing its documentation.
bool isWhatsThisEnabled() const
Definition helpViewer.h:135
String getProject() const
Definition helpViewer.h:105
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 setBaseDirectory(const String &dir)
MyTextBrowser * browser_
Definition helpViewer.h:161
bool eventFilter(QObject *obj, QEvent *e)
Event filter for the whats this mode.
#define BALL_DEPRECATED
#define BALL_VIEW_EXPORT