KDE TechBase
  • Page
  • Discussion
  • Edit
  • History
KDE TechBase is a Wiki - You can help! Please contribute! Questions?
Please ask development related questions in the KDE Community Forum.

Development/Architecture/KDE4/Providing Online Help

< Development | Architecture | KDE4

Languages: عربي | Asturianu | Català | Česky | Kaszëbsczi | Dansk | Deutsch | English | Esperanto | Español | فارسی | Suomi | Français | Galego | Italiano | 日本語 | 한국어 | Norwegian | Polski | Português Brasileiro | Română | Русский | Svenska | Slovenščina | српски | Українська | 简体中文 | 繁體中文

KDE Architecture - Providing online help

Making a program easy and intuitive to use involves a wide range of facilities which are usually called online help. Online help has several, partially conflicting goals: on the one, it should give the user answers to the question "How can I do a certain task?", on the other hand it should help the user exploring the application and finding features he doesn't yet know about. It is important to recognize that this can only be achieved by offering several levels of help:

  • Tooltips are tiny labels that pop up over user interface elements when the mouse remains there longer. They are especially important for tool- bars, where icons are not always sufficient to explain the purpose of a button.
  • "What's this?" help is usually a longer and richer explanation of a widget or a menu item. It is also more clunky to use: In dialogs, it can be invoked in two ways: either by pressing Shift-F1 or by clicking on the question mark in the title bar (where the support of the latter depends on the window manager). The mouse pointer then turns into an arrow with a question mark, and the help window appears when a user interfact element has been clicked. "What's this?" help for menu items is usually activated by a button in the toolbar which contains an arrow and a question mark.
    The problem with this approach is that the user can't see whether a widget provides help or not. When the user activates the question mark button and doesn't get any help window when clicking on a user interface element, he will get frustrated very quickly.

    The advantage of "What's this?" help windows as provided by Qt and KDE is that they can contain rich text, i.e. the may contain different fonts, bold and italic text and even images and tables.
QWhatsThis screenshot
  • Finally, every program should have a manual. A manual is normally viewed in khelpcenter by activating the help menu. That means, a complete additional application pops up and diverts the user from his work. Consequently, consulting the manual should only be necessary if other facilities like tooltips and what's this help are not sufficient. Of course, a manual has the advantage that it does not explain single, isolated aspects of the user interface. Instead, it can explain aspects of the application in a greater context. Manuals for KDE are written using the DocBook markup language.

From the programmer's point of view, Qt provides an easy to use API for online help. To assign a tooltip to widget, simply use its setToolTip() method.
Invalid language argument, "cppqt3", select one from the list:
actionscript3
ocaml-brief
dcs
cfdg
gnuplot
whitespace
lisp
cpp
xml
ocaml
prolog
reg
diff
css
providex
pixelbender
xpp
applescript
thinbasic
c
d
caddcl
freebasic
lolcode
actionscript
cpp-qt
dos
dot
sas
cmake
winbatch
hq9plus
abap
cadlisp
oobas
delphi
rebol
haskell
ruby
povray
progress
kixtart
purebasic
oberon2
email
groovy
oracle11
pascal
c_mac
lsl2
vbnet
tcl
tsql
make
cppqt
apache
matlab
sql
php-brief
klonec
lua
text
scala
m68k
bf
html4strict
autoit
scilab
autohotkey
sdlbasic
fo
oracle8
glsl
smarty
lscript
robots
io
xorg_conf
typoscript
python
visualfoxpro
nsis
z80
ada
gml
cobol
smalltalk
bibtex
csharp
apt_sources
mirc
po
gdb_backtrace
eiffel
modula3
vb
basic4gl
objc
whois
lotusformulas
genero
java
qbasic
vim
verilog
gettext
mxml
pic16
idl
klonecpp
vhdl
plsql
asm
asp
per
visualprolog
javascript
rails
php
awk
mysql
latex
powershell
locobasic
blitzbasic
erlang
bnf
java5
teraterm
intercal
mpasm
ini
boo
bash
inno
cfm
fortran
rsplus
perl
cil
scheme
lotusscript
avisynth
properties

If the menu bars and tool bars are created using the action pattern, the string used as tooltip is derived from the first argument of the KAction constructor:


Invalid language argument, "cppqt3", select one from the list:
actionscript3
ocaml-brief
dcs
cfdg
gnuplot
whitespace
lisp
cpp
xml
ocaml
prolog
reg
diff
css
providex
pixelbender
xpp
applescript
thinbasic
c
d
caddcl
freebasic
lolcode
actionscript
cpp-qt
dos
dot
sas
cmake
winbatch
hq9plus
abap
cadlisp
oobas
delphi
rebol
haskell
ruby
povray
progress
kixtart
purebasic
oberon2
email
groovy
oracle11
pascal
c_mac
lsl2
vbnet
tcl
tsql
make
cppqt
apache
matlab
sql
php-brief
klonec
lua
text
scala
m68k
bf
html4strict
autoit
scilab
autohotkey
sdlbasic
fo
oracle8
glsl
smarty
lscript
robots
io
xorg_conf
typoscript
python
visualfoxpro
nsis
z80
ada
gml
cobol
smalltalk
bibtex
csharp
apt_sources
mirc
po
gdb_backtrace
eiffel
modula3
vb
basic4gl
objc
whois
lotusformulas
genero
java
qbasic
vim
verilog
gettext
mxml
pic16
idl
klonecpp
vhdl
plsql
asm
asp
per
visualprolog
javascript
rails
php
awk
mysql
latex
powershell
locobasic
blitzbasic
erlang
bnf
java5
teraterm
intercal
mpasm
ini
boo
bash
inno
cfm
fortran
rsplus
perl
cil
scheme
lotusscript
avisynth
properties

Here it is also possible to assign a text which is shown in the status bar when the respective menu item is highlighted:


Invalid language argument, "cppqt3", select one from the list:
actionscript3
ocaml-brief
dcs
cfdg
gnuplot
whitespace
lisp
cpp
xml
ocaml
prolog
reg
diff
css
providex
pixelbender
xpp
applescript
thinbasic
c
d
caddcl
freebasic
lolcode
actionscript
cpp-qt
dos
dot
sas
cmake
winbatch
hq9plus
abap
cadlisp
oobas
delphi
rebol
haskell
ruby
povray
progress
kixtart
purebasic
oberon2
email
groovy
oracle11
pascal
c_mac
lsl2
vbnet
tcl
tsql
make
cppqt
apache
matlab
sql
php-brief
klonec
lua
text
scala
m68k
bf
html4strict
autoit
scilab
autohotkey
sdlbasic
fo
oracle8
glsl
smarty
lscript
robots
io
xorg_conf
typoscript
python
visualfoxpro
nsis
z80
ada
gml
cobol
smalltalk
bibtex
csharp
apt_sources
mirc
po
gdb_backtrace
eiffel
modula3
vb
basic4gl
objc
whois
lotusformulas
genero
java
qbasic
vim
verilog
gettext
mxml
pic16
idl
klonecpp
vhdl
plsql
asm
asp
per
visualprolog
javascript
rails
php
awk
mysql
latex
powershell
locobasic
blitzbasic
erlang
bnf
java5
teraterm
intercal
mpasm
ini
boo
bash
inno
cfm
fortran
rsplus
perl
cil
scheme
lotusscript
avisynth
properties

The API for "What's this?' help is very similar. In dialogs, use the following code:


Invalid language argument, "cppqt3", select one from the list:
actionscript3
ocaml-brief
dcs
cfdg
gnuplot
whitespace
lisp
cpp
xml
ocaml
prolog
reg
diff
css
providex
pixelbender
xpp
applescript
thinbasic
c
d
caddcl
freebasic
lolcode
actionscript
cpp-qt
dos
dot
sas
cmake
winbatch
hq9plus
abap
cadlisp
oobas
delphi
rebol
haskell
ruby
povray
progress
kixtart
purebasic
oberon2
email
groovy
oracle11
pascal
c_mac
lsl2
vbnet
tcl
tsql
make
cppqt
apache
matlab
sql
php-brief
klonec
lua
text
scala
m68k
bf
html4strict
autoit
scilab
autohotkey
sdlbasic
fo
oracle8
glsl
smarty
lscript
robots
io
xorg_conf
typoscript
python
visualfoxpro
nsis
z80
ada
gml
cobol
smalltalk
bibtex
csharp
apt_sources
mirc
po
gdb_backtrace
eiffel
modula3
vb
basic4gl
objc
whois
lotusformulas
genero
java
qbasic
vim
verilog
gettext
mxml
pic16
idl
klonecpp
vhdl
plsql
asm
asp
per
visualprolog
javascript
rails
php
awk
mysql
latex
powershell
locobasic
blitzbasic
erlang
bnf
java5
teraterm
intercal
mpasm
ini
boo
bash
inno
cfm
fortran
rsplus
perl
cil
scheme
lotusscript
avisynth
properties

For menu items, use
Invalid language argument, "cppqt3", select one from the list:
actionscript3
ocaml-brief
dcs
cfdg
gnuplot
whitespace
lisp
cpp
xml
ocaml
prolog
reg
diff
css
providex
pixelbender
xpp
applescript
thinbasic
c
d
caddcl
freebasic
lolcode
actionscript
cpp-qt
dos
dot
sas
cmake
winbatch
hq9plus
abap
cadlisp
oobas
delphi
rebol
haskell
ruby
povray
progress
kixtart
purebasic
oberon2
email
groovy
oracle11
pascal
c_mac
lsl2
vbnet
tcl
tsql
make
cppqt
apache
matlab
sql
php-brief
klonec
lua
text
scala
m68k
bf
html4strict
autoit
scilab
autohotkey
sdlbasic
fo
oracle8
glsl
smarty
lscript
robots
io
xorg_conf
typoscript
python
visualfoxpro
nsis
z80
ada
gml
cobol
smalltalk
bibtex
csharp
apt_sources
mirc
po
gdb_backtrace
eiffel
modula3
vb
basic4gl
objc
whois
lotusformulas
genero
java
qbasic
vim
verilog
gettext
mxml
pic16
idl
klonecpp
vhdl
plsql
asm
asp
per
visualprolog
javascript
rails
php
awk
mysql
latex
powershell
locobasic
blitzbasic
erlang
bnf
java5
teraterm
intercal
mpasm
ini
boo
bash
inno
cfm
fortran
rsplus
perl
cil
scheme
lotusscript
avisynth
properties

The invocation of khelpcenter is encapsulated in the KToolInvocation class. In order to show the manual of your application, just use the static method:


Invalid language argument, "cppqt3", select one from the list:
actionscript3
ocaml-brief
dcs
cfdg
gnuplot
whitespace
lisp
cpp
xml
ocaml
prolog
reg
diff
css
providex
pixelbender
xpp
applescript
thinbasic
c
d
caddcl
freebasic
lolcode
actionscript
cpp-qt
dos
dot
sas
cmake
winbatch
hq9plus
abap
cadlisp
oobas
delphi
rebol
haskell
ruby
povray
progress
kixtart
purebasic
oberon2
email
groovy
oracle11
pascal
c_mac
lsl2
vbnet
tcl
tsql
make
cppqt
apache
matlab
sql
php-brief
klonec
lua
text
scala
m68k
bf
html4strict
autoit
scilab
autohotkey
sdlbasic
fo
oracle8
glsl
smarty
lscript
robots
io
xorg_conf
typoscript
python
visualfoxpro
nsis
z80
ada
gml
cobol
smalltalk
bibtex
csharp
apt_sources
mirc
po
gdb_backtrace
eiffel
modula3
vb
basic4gl
objc
whois
lotusformulas
genero
java
qbasic
vim
verilog
gettext
mxml
pic16
idl
klonecpp
vhdl
plsql
asm
asp
per
visualprolog
javascript
rails
php
awk
mysql
latex
powershell
locobasic
blitzbasic
erlang
bnf
java5
teraterm
intercal
mpasm
ini
boo
bash
inno
cfm
fortran
rsplus
perl
cil
scheme
lotusscript
avisynth
properties

This displays the first page with the table of contents. When you want to display only a certain section of the manual, you can give an additional argument to invokeHelp() determining the anchor which the browser jumps to.


Initial Author: Bernd Gehrmann

Retrieved from "http://techbase.kde.org/Development/Architecture/KDE4/Providing_Online_Help"
Categories: KDE4 | Architecture

Navigation

  • Home
  • Help
  • Recent changes

Sections

  • Getting started
  • Development
  • Schedules
  • Policies
  • Contribute
  • Projects

Toolbox

  • What links here
  • Related changes
  • Special pages
  • Printable version
  • Permanent link

Personal tools

  • 38.107.191.96
  • Talk for this IP
  • Log in / create account
  • Login with OpenID
Creative Commons License SA 3.0 as well as the GNU Free Documentation License 1.2
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal