]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/README
fix typo that put too many include paths for most people
[lyx.git] / src / frontends / qt2 / README
1 This file contains some do's and dont's for the Qt2 frontend.
2
3 Random crashes
4 --------------
5
6 Both xforms and Qt use X error handlers which collide - if you get
7 crashes, try lyx -sync, which seems to help.
8  
9 General rules
10 -------------
11
12 Every editable field that affects the state of the dialog contents
13 from LyX's point of view should connect its xxxChanged() signal to
14 a the dialog's changed_adaptor() slot, which in turn should call
15 form_->changed(). If you are using a more complicated thing anyway,
16 then remember to call form_->changed() at the end (if it has changed !)
17  
18 Every non-trivial widget should have a tooltip. If you don't know
19 what to write, write "FIXME", and it can fixed later. Don't be afraid
20 to use QWhatsThis too, but this must be done in the derived class's
21 constructor, and use _("...").
22  
23 If necessary, you should override Qt2Base::isValid() for determining the validity
24 of the current dialog's contents.
25  
26 OK/Apply/Restore/Close should be connected in the derived class's constructor
27 to call form_->slotOK() etc. Refer to close/cancel as close in the source.
28  
29 Override update_contents() to update the dialog, not update(), and build_dialog(),
30 not build(). Only these functions may change dialog widgets that may emit changed()
31 during initialisation, to prevent the button controller from changing its state.
32
33 Never call buttoncontroller functions directly from dialogs. In general, you
34 should use Qt2Base::changed() in all circumstances. However, if you must call
35 the buttoncontroller, make sure to respect Qt2Base::updating_
36
37 Don't #undef emit - #include "QtLyXView.h" instead
38  
39 Naming conventions
40 ------------------
41
42 QFoo.[Ch]              The file that interacts with the controller
43 QFooDialog.[Ch]        The implementation of the dialog, derived from the generated files
44 ui/QFooDialog.ui       The designer file
45 ui/QFooDialogBase.[Ch] Generated files from QFooDialog.ui
46  
47 slots should be named e.g. slotFooClicked(), slotFooSelected(), where foo is the name
48 of the widget.
49  
50 Widgets should be named like "fooXX", where XX is one of the following
51 widget types :
52
53 CB - check box 
54 CO - combo box
55 ED - line edit
56 LA - label
57 ML -
58 PB - push button
59 (FIXME: complete this)
60
61  
62 Dialog          Maintainer      MVC conversion
63 ----------------------------------------------
64 About           John            Done
65 Bibitem         John            Done
66 Bibtex          John            Done
67 Character       Edwin           Done
68 Citation        Kalle           Done
69 Document        Kalle           Waiting for MVC
70 ERT             John            Done
71 Error           John            Done 
72 External        John            Done 
73 Graphics        John            Done
74 Include         John            Done 
75 Index           Kalle           Done
76 Log             John            Done
77 Minipage        John            Done 
78 Paragraph       Edwin           Waiting for MVC
79 Preamble        John            Done
80 Print           Edwin           Done
81 Ref             Kalle           Done
82 Search          Edwin           Done
83 Spellchecker    John            Done
84 Splash          Edwin
85 Tabular                         Waiting for MVC
86 TabularCreate   Edwin           Done
87 Thesaurus       John            Done
88 Toc             Kalle           Waiting to be updated
89 Url             Kalle           Done
90 VCLog           John            Done