BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 <QtGui/QTextBrowser>
15 
16 namespace BALL
17 {
18  namespace VIEW
19  {
20 
22  : public QTextBrowser
23  {
24  Q_OBJECT
25 
26  public:
27 
28  MyTextBrowser(QWidget* parent, const char* name = 0);
29 
30  public slots:
31 
32 // void setBackwardAvailable(bool b);
33 
34 // void setForwardAvailable(bool b);
35 
36  protected:
37 
38 // virtual QMenu* createPopupMenu(const QPoint& pos);
39 
40  bool forward_, backward_;
41  };
42 
67  : public DockWidget
68  {
69  Q_OBJECT
70 
71  public:
72 
74 
75 
76  HelpViewer(QWidget* parent, const char* name = 0);
77 
79  virtual ~HelpViewer();
80 
83  virtual void initializeWidget(MainControl& main_control);
84 
91  virtual void onNotify(Message *message);
92 
94  virtual void showHelp(const String& URL);
95 
97  virtual void showHelp(const String& URL, String entry);
98 
100  void setDefaultPage(const String& url);
101 
103  const String& getDefaultPage() const;
104 
106  void setProject(const String& project) { project_ = project;}
107 
109  String getProject() const { return project_;}
110 
112  void setBaseDirectory(const String& dir);
113 
115  const String& getBaseDirectory() const;
116 
118  virtual void registerForHelpSystem(const QObject* object, const String& docu_entry);
119 
121  void unregisterForHelpSystem(const QObject* object);
122 
124  bool showHelpFor(const QObject* object);
125 
127  bool showDocumentationForObject();
128 
130  bool hasHelpFor(const QObject* object) const;
131 
133  String getHelpEntryFor(const QObject* object) const;
134 
136  void setWhatsThisEnabled(bool state) { whats_this_ = state;}
137 
139  bool isWhatsThisEnabled() const {return whats_this_;}
140 
142  void showDocumentationFor(const String& classname, const String& member);
143 
144  public slots:
145 
147  virtual void showHelp();
148 
150  void enterWhatsThisMode();
151 
153  void exitWhatsThisMode();
154 
156  bool eventFilter(QObject* obj, QEvent* e);
157 
158  protected:
159 
160  void collectClasses_();
161 
169  QAction* whats_action_;
170 
173  };
174 
175 } } // namespaces
176 
177 #endif // BALL_VIEW_WIDGETS_HELPVIEWER_H
HashMap< const QObject *, String > docu_entries_
Definition: helpViewer.h:171
#define BALL_VIEW_EXPORT
Definition: COMMON/global.h:52
MyTextBrowser * browser_
Definition: helpViewer.h:165
#define BALL_EMBEDDABLE(TYPE, BASE)
Definition: embeddable.h:31
void setProject(const String &project)
Definition: helpViewer.h:106
bool isWhatsThisEnabled() const
Definition: helpViewer.h:139
String getProject() const
Definition: helpViewer.h:109
StringHashMap< String > classes_to_files_
Definition: helpViewer.h:172
void setWhatsThisEnabled(bool state)
Definition: helpViewer.h:136