[Developers] Creating your own HTML user help
Bert Bril
Bert.Bril at opendtect.org
Tue Sep 19 12:59:11 CEST 2006
Hi,
The following support answer may be of interest to you:
> Can you explain how the Help screens work for a dialogue? I see from
> the code that I need to add a line such as
>>
>> : uiDialog(p,uiDialog::Setup("Well Markers",
>> "Define marker properties",
>> "107.1.1"));
A good idea is to look at the way the example 'uiSeisIOSimple' plugin
handles this. In OpendTect, click File-Import-Seismic-Simple File. Click
on help. The help you see is coming from a separate subdirectory in the
data/ directory, 'extraDoc'. In the code at
plugins/uiSeisIOSimple/uiseisiosimple.cc you'll see the help spec:
imp ? "extra:103.0.1" : "extra:103.0.2"
The 'extra:' here corresponds to the 'extra' in the 'extraDoc' directory
name. That's how the help system gets to the right directory. Thus, make
a subdirectory starting with a chosen name and 'Doc'.
Then if you look in the data/extraDoc directory, you'll see two files
that you need to fill. These make it possible for OpnedTect to jump into
an HTML file:
WindowLinkTable.txt Window ID -> symbolic link name
LinkFileTable.txt symbolic link name -> actual HTML file name
OpendTect will start the help viewer with the HTML file and the link
name, and thus you can make help pop up at an anchor in the HTML file.
Note that help is now appearing in the rather shabby Qt help viewer.
Nanne is currently putting Qt4 underneath OpendTect, and at the same
time we can then throw the help into the user's default HTML browser -
which means that all URLs will work. At this point in time you can
specify real external URLs in your HTML text, but the Qt viewer doesn't
do anything with them.
In terms of distribution, you can simply add data/mynameDoc to your
plugin distribution, just like you're already putting things like .alo
files, plugins, init scripts etc. in there.
/Bert
--
-- Bert Bril / OpendTect developer at dGB
-- Nijverheidstraat 11-2, 7511 JM Enschede, The Netherlands
-- mailto:Bert.Bril at opendtect.org , http://opendtect.org
-- Tel: +31 534315155 , Fax: +31 534315104
More information about the Developers
mailing list