lyx_mirror/src/frontends/qt2
John Levon eb74119baf bugs 854, bug 855
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6016 a592a061-630c-0410-9148-cb99ea01b6c8
2003-02-02 02:11:28 +00:00
..
moc simplify and distcheck ready 2003-01-13 10:39:18 +00:00
ui Michael's fix to my patch ;-) 2003-01-26 22:37:12 +00:00
.cvsignore The big renaming. Yowser. 2001-08-19 13:25:15 +00:00
Alert_pimpl.C further qt_ vs. _ fix 2002-12-18 23:26:21 +00:00
BulletsModule.C fix crash on custom bullet cancel 2002-12-18 14:13:16 +00:00
BulletsModule.h fix bullet stuff. bullets are now shown and packages are again included (which bug was this?) 2002-12-16 22:24:33 +00:00
bulletstrings.C ws changes 2002-12-01 22:59:25 +00:00
bulletstrings.h setting bullets now work in dialog. preview is rotten. 2002-11-12 10:12:06 +00:00
ChangeLog bugs 854, bug 855 2003-02-02 02:11:28 +00:00
Dialogs2.C Fix Helge's index bugs. 2003-01-31 13:50:21 +00:00
Dialogs_impl.h remove preamble dialog from the qt frontend 2003-01-13 09:57:15 +00:00
Dialogs.C remove preamble dialog from the qt frontend 2003-01-13 09:57:15 +00:00
emptytable.C the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
emptytable.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
FileDialog_private.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
FileDialog_private.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
FileDialog.C (J��rgen Spitzm��ller): implement a BrowseDir capablility in the File Dialog. 2003-01-14 21:51:34 +00:00
iconpalette.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
iconpalette.h fix some connectinos hopefully 2002-12-07 18:09:39 +00:00
io_callback.C the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
io_callback.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
lengthcombo.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
lengthcombo.h graphics fixes from herbert and me 2002-11-17 11:24:08 +00:00
lyx_gui.C Michael's text fixes 2003-01-23 16:23:43 +00:00
LyXKeySymFactory.C the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
LyXScreenFactory.C the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
Makefile.am simplify and distcheck ready 2003-01-13 10:39:18 +00:00
Makefile.dialogs simplify and distcheck ready 2003-01-13 10:39:18 +00:00
Menubar_pimpl.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
Menubar_pimpl.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QAbout.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QAbout.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QAboutDialog.C the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QAboutDialog.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QBibitem.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QBibitem.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QBibitemDialog.C the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QBibitemDialog.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QBibtex.C Juergen's URL patch, a couple of other fixes 2003-01-04 21:42:59 +00:00
QBibtex.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QBibtexDialog.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QBibtexDialog.h Juergen's last bibtex patch 2002-12-17 17:28:04 +00:00
QBrowseBox.C ws changes 2002-12-01 22:59:25 +00:00
QBrowseBox.h ws changes 2002-12-01 22:59:25 +00:00
QCharacter.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QCharacter.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QCharacterDialog.C the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QCharacterDialog.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QCitation.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QCitation.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QCitationDialog.C small fix to citation dialog 2003-01-02 15:24:42 +00:00
QCitationDialog.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
qcoloritem.C ws changes 2002-12-01 22:59:25 +00:00
qcoloritem.h ws changes 2002-12-01 22:59:25 +00:00
QCommandBuffer.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QCommandBuffer.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QCommandEdit.C the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QCommandEdit.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QContentPane.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QContentPane.h Patch from Philippe Elie for making mouse wheel do 2002-10-21 04:46:26 +00:00
QDelimiterDialog.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QDelimiterDialog.h fix some connectinos hopefully 2002-12-07 18:09:39 +00:00
QDocument.C Michael's text fixes 2003-01-23 16:23:43 +00:00
QDocument.h fix bug 490 from Juergen S 2002-12-04 02:57:14 +00:00
QDocumentDialog.C jurgen's improvements to the doc dialog in qt 2003-01-16 10:56:49 +00:00
QDocumentDialog.h jurgen's improvements to the doc dialog in qt 2003-01-16 10:56:49 +00:00
QError.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QError.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QErrorDialog.C the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QErrorDialog.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QERT.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QERT.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QERTDialog.C the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QERTDialog.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QExternal.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QExternal.h ws changes 2002-12-01 22:59:25 +00:00
QExternalDialog.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QExternalDialog.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QFloat.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QFloat.h Lots and lots of little trivial bits. 2002-09-24 13:57:09 +00:00
QFloatDialog.C the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QFloatDialog.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
qfont_loader.C Minor bits 'n' bobs from Michael, J�rgen and Jean-Marc. 2003-01-06 14:02:24 +00:00
qfont_loader.h widthcache ting 2002-12-11 00:22:37 +00:00
qfont_metrics.C widthcache ting 2002-12-11 00:22:37 +00:00
qfontexample.C ws changes 2002-12-01 22:59:25 +00:00
qfontexample.h ws changes 2002-12-01 22:59:25 +00:00
QGraphics.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QGraphics.h QGraphics fixes 2002-11-07 00:21:28 +00:00
QGraphicsDialog.C Michael's text fixes 2003-01-23 16:23:43 +00:00
QGraphicsDialog.h QGraphics fixes 2002-11-07 00:21:28 +00:00
qgridview.C simplify and distcheck ready 2003-01-13 10:39:18 +00:00
qgridview.h ws changes 2002-12-01 22:59:25 +00:00
QInclude.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QInclude.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QIncludeDialog.C another fix 2002-12-03 05:27:19 +00:00
QIncludeDialog.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QIndex.C (Juergen Spitzmueller): fix activation state of the OK button when first 2003-01-15 22:05:20 +00:00
QIndex.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QIndexDialog.C Minor bits 'n' bobs from Michael, J�rgen and Jean-Marc. 2003-01-06 14:02:24 +00:00
QIndexDialog.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QLImage.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QLImage.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
qlkey.h key4.diff 2002-12-12 13:46:06 +00:00
QLog.C Michael's text fixes 2003-01-23 16:23:43 +00:00
QLog.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QLogDialog.C the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QLogDialog.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QLPainter.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QLPainter.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QLPopupMenu.C remove preamble and tooltips menu entries on qt2; small compile fix 2002-12-18 14:24:32 +00:00
QLPopupMenu.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QLPrintDialog.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QLPrintDialog.h rename QPrintDialog to avoid name conflict 2002-10-30 19:47:15 +00:00
QLyXKeySym.C Michael's text fixes 2003-01-23 16:23:43 +00:00
QLyXKeySym.h encodings patch + default win pos 2003-01-05 22:38:42 +00:00
QMath.C Fix symbol insert. 2002-10-28 16:43:58 +00:00
QMath.h Fix symbol insert. 2002-10-28 16:43:58 +00:00
QMathDialog.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QMathDialog.h fix some connectinos hopefully 2002-12-07 18:09:39 +00:00
QMathMatrixDialog.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QMathMatrixDialog.h Fix symbol insert. 2002-10-28 16:43:58 +00:00
QMinipage.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QMinipage.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QMinipageDialog.C the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QMinipageDialog.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QParagraph.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QParagraph.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QParagraphDialog.C the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QParagraphDialog.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QPrefs.C bugs 854, bug 855 2003-02-02 02:11:28 +00:00
QPrefs.h ws changes 2002-12-01 22:59:25 +00:00
QPrefsDialog.C bugs 854, bug 855 2003-02-02 02:11:28 +00:00
QPrefsDialog.h ws changes 2002-12-01 22:59:25 +00:00
QPrint.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QPrint.h rename QPrintDialog to avoid name conflict 2002-10-30 19:47:15 +00:00
QRef.C fix from Alfredo 2002-12-19 01:10:41 +00:00
QRef.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QRefDialog.C the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QRefDialog.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
qscreen.C the string -> char patch 2002-11-27 10:30:28 +00:00
qscreen.h Lots and lots of little trivial bits. 2002-09-24 13:57:09 +00:00
QSearch.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QSearch.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QSearchDialog.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QSearchDialog.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QSendto.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QSendto.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QSendtoDialog.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QSendtoDialog.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
qsetborder.C ws changes 2002-12-01 22:59:25 +00:00
qsetborder.h ws changes 2002-12-01 22:59:25 +00:00
QShowFile.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QShowFile.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QShowFileDialog.C the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QShowFileDialog.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QSpellchecker.C alfredo's qspellcheck fix 2003-01-13 09:17:12 +00:00
QSpellchecker.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QSpellcheckerDialog.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QSpellcheckerDialog.h spellchecker fix for dekel's bug 2002-12-12 21:07:20 +00:00
Qt2Base.C fix bug 850 (fix confirmed by John) 2003-02-02 00:48:38 +00:00
Qt2Base.h fix bug 850 (fix confirmed by John) 2003-02-02 00:48:38 +00:00
Qt2BC.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
Qt2BC.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
qt_helpers.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
qt_helpers.h The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QTabular.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QTabular.h ws changes 2002-12-01 22:59:25 +00:00
QTabularCreate.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QTabularCreate.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QTabularCreateDialog.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QTabularCreateDialog.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QTabularDialog.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QTabularDialog.h ws changes 2002-12-01 22:59:25 +00:00
QTexinfo.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QTexinfo.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QTexinfoDialog.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QTexinfoDialog.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QThesaurus.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QThesaurus.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QThesaurusDialog.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QThesaurusDialog.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QtLyXView.h Lots and lots of little trivial bits. 2002-09-24 13:57:09 +00:00
QToc.C Minor bits 'n' bobs from Michael, J�rgen and Jean-Marc. 2003-01-06 14:02:24 +00:00
QToc.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QTocDialog.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QTocDialog.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
qttableview.C small changes 2002-11-04 00:15:56 +00:00
qttableview.h support for Qt3 2001-12-01 02:24:28 +00:00
QtView.C encodings patch + default win pos 2003-01-05 22:38:42 +00:00
QtView.h encodings patch + default win pos 2003-01-05 22:38:42 +00:00
QURL.C (Juergen Spitzmueller): fix activation state of the OK button when first 2003-01-15 22:05:20 +00:00
QURL.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QURLDialog.C the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QURLDialog.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QVCLog.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QVCLog.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QVCLogDialog.C the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QVCLogDialog.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QWorkArea.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QWorkArea.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QWrap.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
QWrap.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QWrapDialog.C the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
QWrapDialog.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
README The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
Timeout_pimpl.C Lots and lots of little trivial bits. 2002-09-24 13:57:09 +00:00
Timeout_pimpl.h the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00
Toolbar_pimpl.C The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
Toolbar_pimpl.h The big Qt toqstr/fromqstr patch. 2002-12-17 20:37:13 +00:00
WorkAreaFactory.C the qtclean-2 patch with some very small changes 2002-10-20 01:48:28 +00:00

This file contains some do's and dont's for the Qt2 frontend.

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
what to write, write "FIXME", and it can fixed later. Don't be afraid
to use QWhatsThis too, but this must be done in the derived class's
constructor, and use _("..."). Non-trivial means that things like "OK"
/must not/ have a tooltip.
 
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.
 
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.

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_

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 
CO - combo box
ED - line edit
LA - label
ML -
PB - push button
(FIXME: complete this)

 
Stuff to be aware of
--------------------

The connect statement in Qt is a macro and its arguments does not follow
the C++ standard as it should. Using the construct "Type const &" as
argument will lead to runtime-errors, use "const Type &" instead.

ex.

--right--

	connect(list, SIGNAL(selected(const QString &)),
		this, SLOT(complete_selected(const QString &)));

--wrong--

	connect(list, SIGNAL(selected(QString const &)),
		this, SLOT(complete_selected(QString const &)));

Qt, Unicode, and LyX
--------------------

LyX isn't unicoded yet. But you should follow these simple rules :

o Use qt_() not _() in code
o Use fromqstr and toqstr NOT .latin1() / .c_str()

Using these functions (in qt_helpers.h) will make sure we use
the right locale for converting to Qt's QString, which is unicode.