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