1 This file contains some do's and dont's for the Qt2 frontend.
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 !)
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 _("...").
17 If necessary, you should override Qt2Base::isValid() for determining the validity
18 of the current dialog's contents.
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.
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.
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_
31 Don't #undef emit - #include "QtLyXView.h" instead
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
41 slots should be named e.g. slotFooClicked(), slotFooSelected(), where foo is the name
44 Widgets should be named like "fooXX", where XX is one of the following
53 (FIXME: complete this)
56 Dialog Maintainer MVC conversion
57 ----------------------------------------------
63 Document Kalle Waiting for MVC
72 Paragraph Edwin Waiting to be updated
77 Spellchecker John Done
79 Tabular Waiting for MVC
80 TabularCreate Edwin Done
82 Toc Kalle Waiting to be updated