BALL
1.4.2
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
BALL
VIEW
WIDGETS
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
11
# include <
BALL/VIEW/WIDGETS/dockWidget.h
>
12
#endif
13
14
#include <QtGui/QTextBrowser>
15
16
namespace
BALL
17
{
18
namespace
VIEW
19
{
20
21
class
BALL_VIEW_EXPORT
MyTextBrowser
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
66
class
BALL_VIEW_EXPORT
HelpViewer
67
:
public
DockWidget
68
{
69
Q_OBJECT
70
71
public
:
72
73
BALL_EMBEDDABLE
(
HelpViewer
,
DockWidget
)
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
162
String
project_
;
163
String
default_page_
;
164
String
base_dir_
;
165
MyTextBrowser
*
browser_
;
166
bool
whats_this_mode_
;
167
bool
ignore_event_
;
168
bool
whats_this_
;
169
QAction*
whats_action_
;
170
171
HashMap<const QObject*, String>
docu_entries_
;
172
StringHashMap<String>
classes_to_files_
;
173
};
174
175
} }
// namespaces
176
177
#endif // BALL_VIEW_WIDGETS_HELPVIEWER_H
Generated by
1.8.3.1