]> git.lyx.org Git - features.git/blob - src/frontends/qt2/README
ref dialog, more updates (BC stuff should now be OK along with the coming
[features.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 (e.g. the index dialog)
15  
16 If necessary, you should override Qt2Base::isValid() for determining the validity
17 of the current dialog's contents.
18  
19 OK/Apply/Restore/Close should be connected in the derived class's constructor
20 to call form_->slotOK() etc. Refer to close/cancel as close in the source.
21  
22 Override update_contents() to update the dialog, not update(), and build_dialog(),
23 not build(). Only these functions may change dialog widgets that may emit changed()
24 during initialisation, to prevent the button controller from changing its state.
25
26 Never call buttoncontroller functions directly from dialogs. In general, you
27 should use Qt2Base::changed() in all circumstances. However, if you must call
28 the buttoncontroller, make sure to respect Qt2Base::updating_
29
30 Don't #undef emit - #include "QtLyXView.h" instead
31  
32 Naming conventions
33 ------------------
34
35 QFoo.[Ch]              The file that interacts with the controller
36 QFooDialog.[Ch]        The implementation of the dialog, derived from the generated files
37 ui/QFooDialog.ui       The designer file
38 ui/QFooDialogBase.[Ch] Generated files from QFooDialog.ui
39  
40 slots should be named e.g. slotFooClicked(), slotFooSelected(), where foo is the name
41 of the widget.
42  
43 Widgets should be named like "fooXX", where XX is one of the following
44 widget types :
45
46 CB - check box 
47 CO - combo box
48 ED - line edit
49 LA - label
50 ML -
51 PB - push button
52 (FIXME: complete this)
53
54  
55 Dialog          Maintainer      MVC conversion
56 ----------------------------------------------
57 Character       Edwin
58 Citation        Kalle           Done
59 Document        Kalle           Waiting for MVC
60 Index           Kalle           Done
61 Paragraph       Edwin           Waiting for MVC
62 Print           Edwin
63 Ref             Kalle           Done
64 Search          Edwin
65 Splash          Edwin
66 Tabular                         Waiting for MVC
67 TabularCreate   Edwin
68 Toc             Kalle
69 Url             Kalle           Done