2001-08-19 13:25:15 +00:00
|
|
|
This file contains some do's and dont's for the Qt2 frontend.
|
|
|
|
|
2001-08-28 01:27:35 +00:00
|
|
|
Random crashes
|
|
|
|
--------------
|
|
|
|
|
|
|
|
Both xforms and Qt use X error handlers which collide - if you get
|
|
|
|
crashes, try lyx -sync, which seems to help.
|
|
|
|
|
2001-08-25 03:00:19 +00:00
|
|
|
General rules
|
|
|
|
-------------
|
|
|
|
|
|
|
|
Every editable field that affects the state of the dialog contents
|
|
|
|
from LyX's point of view should connect its xxxChanged() signal to
|
|
|
|
a the dialog's changed_adaptor() slot, which in turn should call
|
|
|
|
form_->changed(). If you are using a more complicated thing anyway,
|
|
|
|
then remember to call form_->changed() at the end (if it has changed !)
|
|
|
|
|
|
|
|
Every non-trivial widget should have a tooltip. If you don't know
|
2001-08-25 20:04:15 +00:00
|
|
|
what to write, write "FIXME", and it can fixed later. Don't be afraid
|
2001-08-29 02:29:26 +00:00
|
|
|
to use QWhatsThis too, but this must be done in the derived class's
|
|
|
|
constructor, and use _("...").
|
2001-08-25 03:00:19 +00:00
|
|
|
|
|
|
|
If necessary, you should override Qt2Base::isValid() for determining the validity
|
|
|
|
of the current dialog's contents.
|
|
|
|
|
|
|
|
OK/Apply/Restore/Close should be connected in the derived class's constructor
|
|
|
|
to call form_->slotOK() etc. Refer to close/cancel as close in the source.
|
|
|
|
|
2001-08-26 00:29:39 +00:00
|
|
|
Override update_contents() to update the dialog, not update(), and build_dialog(),
|
|
|
|
not build(). Only these functions may change dialog widgets that may emit changed()
|
|
|
|
during initialisation, to prevent the button controller from changing its state.
|
2001-08-25 20:04:15 +00:00
|
|
|
|
|
|
|
Never call buttoncontroller functions directly from dialogs. In general, you
|
|
|
|
should use Qt2Base::changed() in all circumstances. However, if you must call
|
|
|
|
the buttoncontroller, make sure to respect Qt2Base::updating_
|
|
|
|
|
2001-08-19 13:25:15 +00:00
|
|
|
Don't #undef emit - #include "QtLyXView.h" instead
|
|
|
|
|
|
|
|
Naming conventions
|
|
|
|
------------------
|
|
|
|
|
|
|
|
QFoo.[Ch] The file that interacts with the controller
|
|
|
|
QFooDialog.[Ch] The implementation of the dialog, derived from the generated files
|
|
|
|
ui/QFooDialog.ui The designer file
|
|
|
|
ui/QFooDialogBase.[Ch] Generated files from QFooDialog.ui
|
|
|
|
|
|
|
|
slots should be named e.g. slotFooClicked(), slotFooSelected(), where foo is the name
|
|
|
|
of the widget.
|
|
|
|
|
|
|
|
Widgets should be named like "fooXX", where XX is one of the following
|
|
|
|
widget types :
|
|
|
|
|
|
|
|
CB - check box
|
2001-08-25 03:00:19 +00:00
|
|
|
CO - combo box
|
2001-08-23 21:21:50 +00:00
|
|
|
ED - line edit
|
|
|
|
LA - label
|
2001-08-19 13:25:15 +00:00
|
|
|
ML -
|
|
|
|
PB - push button
|
|
|
|
(FIXME: complete this)
|
|
|
|
|
|
|
|
|
|
|
|
Dialog Maintainer MVC conversion
|
|
|
|
----------------------------------------------
|
2001-08-26 03:20:52 +00:00
|
|
|
About John Done
|
|
|
|
Bibtex John Done
|
2001-08-26 18:49:33 +00:00
|
|
|
Character Edwin Done
|
2001-08-25 03:00:19 +00:00
|
|
|
Citation Kalle Done
|
|
|
|
Document Kalle Waiting for MVC
|
2001-08-26 18:49:33 +00:00
|
|
|
Error John Done
|
2001-08-23 21:21:50 +00:00
|
|
|
Index Kalle Done
|
2001-08-25 03:00:19 +00:00
|
|
|
Paragraph Edwin Waiting for MVC
|
2001-08-19 13:25:15 +00:00
|
|
|
Print Edwin
|
2001-08-26 00:29:39 +00:00
|
|
|
Ref Kalle Done
|
2001-08-19 13:25:15 +00:00
|
|
|
Search Edwin
|
|
|
|
Splash Edwin
|
2001-08-25 03:00:19 +00:00
|
|
|
Tabular Waiting for MVC
|
2001-08-19 13:25:15 +00:00
|
|
|
TabularCreate Edwin
|
|
|
|
Toc Kalle
|
2001-08-26 00:29:39 +00:00
|
|
|
Url Kalle Done
|