]> git.lyx.org Git - lyx.git/blob - src/frontends/kde/dlg/README
iA smaller KDE fix + remove l10n menu bindings
[lyx.git] / src / frontends / kde / dlg / README
1 These files are generated with qtarch-1.4-6 which can be downloaded
2 from 
3
4 http://qtarch.sourceforge.net/
5
6 Currently you also need this patch : 
7 http://www.movement.uklinux.net/patches/lyx/qtarch-1.4.6.diff
8  
9 Note this is *not* the latest version, as they only support Qt 2.0.
10
11 You should compile in the KDE module when you compile qtarch-1.4.
12 For me this was just a case of a make in the module/kde/ directory,
13 and then you can add the .so library file in the qtarch GUI.
14
15 The files in this and the kde/ directory have the following naming
16 scheme :
17
18 random.dlg         - the dlg file for qtarch
19 FormRandom.[Ch]    - LyX's notion of the dialog, real implementation modified
20                      via functions only
21 randomdlg.[Ch]     - Derived Qt class, edited by hand. The interface between widgets
22                      and LyX FormRandom file
23 randomdlgdata.[Ch] - qtarch-generated files, not to be touched by human hands
24
25 The class names are FormRandom, RandomDialog, and RandomDialogData
26
27 Note that the .dlg files have no entries for the derived class header and source 
28 filenames. This is because these files have to be edited by hand and should only
29 be generated once (and they belong in the parent directory, not dlg/). The
30 className field, though, has a special meaning. If it is blank, then qtarch
31 will assume there is no derived class defined at all. Currently this has the effect
32 of making mapped variables public access. If there is a name, then it assumes that
33 a derived class exists, and leaves mapped variables protected. It's done like
34 this to avoid the rat's nest of friend declarations and un-necessary derived classes.
35
36 Some tips and guidelines for qtarch and the KDE frontend :
37
38 o the default button should be the one that causes least harm, unless
39   the action can be undone. So Print should default to cancel, whereas
40   insert index entry can be undone, so should default to OK
41
42 o the dialog should derive from QWidget (set in Properties)
43
44 o the dialog should always have the gettext option set
45
46 o give every widget a name - useful for the geometry layouts later
47
48 o don't bother setting min/max sizes for anything, but do set the size Hint
49   stuff appropriately. e.g. QLineEdit's should have a max height specified by
50   size Hint, but variable width
51
52 o if you map a variable make it the same as the widget name
53
54 o radio groups are done automagically based on positioning
55  
56 o grid units are 5 pixels
57
58 o set alignment before placing a widget inside a layout, it doesn't seem to
59   update properly. Alternatively you can just edit the .dlg file directly
60
61 o push buttons are arranged symmetrically across the dialog e.g.  
62   <1 stretch> <button> <2 stretch> <button> <2 stretch> <button> <1 stretch>
63
64 o for GroupBox and similar, you set the children in the layout manager
65  
66 o do the geometry layouts last. you cannot alter the geometry of widgets
67   whilst they're being managed which makes any settings a pain, which
68   are useful mainly while editing the dialog in qtarch
69   
70 o when doing layout, add all the layouts before any of the widgets otherwise
71   qtarch has a tendency to get confused
72
73 o qtarch often produces code that initialises stuff in the wrong order. 
74   This is nasty, but usually dumps core so is noticable. Either way, the 
75   cheesy perl script checkinitorder.pl will verify the produced files for 
76   you - if it complains you need to hack the .dlg file to re-arrange the order.
77
78         - jbl