lyx_mirror/src/frontends/qt4
André Pönitz 212386be8a merge ButtonController and its view (Qt2BC in this case)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20018 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-03 05:59:32 +00:00
..
ui get rid of (cyg)win path panel in prefs by moving it to the latex panel 2007-09-02 20:17:36 +00:00
Action.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
Action.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
alert_pimpl.cpp fix building with automake; break scons, cmake and qmake 2007-08-11 15:48:15 +00:00
BulletsModule.cpp Fix ambiguity in translation 2007-08-31 11:09:46 +00:00
BulletsModule.h fix building with automake; break scons, cmake and qmake 2007-08-11 15:48:15 +00:00
ButtonController.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
ButtonController.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
ChangeLog move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
ColorCache.cpp
ColorCache.h
Dialogs.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
DockView.h
EmptyTable.cpp
EmptyTable.h
FileDialog.cpp add comment and ling to bug 3907. 2007-07-03 08:23:04 +00:00
FloatPlacement.cpp
FloatPlacement.h fix building with automake; break scons, cmake and qmake 2007-08-11 15:48:15 +00:00
GuiAbout.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiAbout.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiApplication.cpp Merge QController into individual dialogs. Also various cleanup 2007-08-31 22:16:11 +00:00
GuiApplication.h Merge QController into individual dialogs. Also various cleanup 2007-08-31 22:16:11 +00:00
GuiBibitem.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiBibitem.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiBibtex.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiBibtex.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiBox.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiBox.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiBranch.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiBranch.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiBranches.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiBranches.h Merge QController into individual dialogs. Also various cleanup 2007-08-31 22:16:11 +00:00
GuiChanges.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiChanges.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiCharacter.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiCharacter.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiCitation.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiCitation.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiClipboard.cpp fix unicode decomposition (bugs 3313 and 3498): 2007-07-05 14:45:00 +00:00
GuiClipboard.h Merge QController into individual dialogs. Also various cleanup 2007-08-31 22:16:11 +00:00
GuiCommandBuffer.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiCommandBuffer.h Merge QController into individual dialogs. Also various cleanup 2007-08-31 22:16:11 +00:00
GuiCommandEdit.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiCommandEdit.h Merge QController into individual dialogs. Also various cleanup 2007-08-31 22:16:11 +00:00
GuiDelimiter.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiDelimiter.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiDialog.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiDialog.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiDialogView.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiDialogView.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiDocument.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiDocument.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiEmbeddedFiles.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiEmbeddedFiles.h Embedding dialog: use two buttons (will have more) for the actions 2007-09-01 20:48:51 +00:00
GuiErrorList.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiErrorList.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiERT.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiERT.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiExternal.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiExternal.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiFloat.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiFloat.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiFontExample.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiFontExample.h Merge QController into individual dialogs. Also various cleanup 2007-08-31 22:16:11 +00:00
GuiFontLoader.cpp
GuiFontLoader.h
GuiFontMetrics.cpp Optimisation: don't search twice the hash tables. 2007-08-13 13:56:54 +00:00
GuiFontMetrics.h Merge QController into individual dialogs. Also various cleanup 2007-08-31 22:16:11 +00:00
GuiGraphics.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiGraphics.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiGraphicsUi.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiImage.cpp Merge QController into individual dialogs. Also various cleanup 2007-08-31 22:16:11 +00:00
GuiImage.h Merge QController into individual dialogs. Also various cleanup 2007-08-31 22:16:11 +00:00
GuiImplementation.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiImplementation.h Merge QController into individual dialogs. Also various cleanup 2007-08-31 22:16:11 +00:00
GuiInclude.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiInclude.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiIndex.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiIndex.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiKeySymbol.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiKeySymbol.h Merge QController into individual dialogs. Also various cleanup 2007-08-31 22:16:11 +00:00
GuiListings.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiListings.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiLog.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiLog.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiMathMatrix.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiMathMatrix.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiMenubar.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiMenubar.h Merge QController into individual dialogs. Also various cleanup 2007-08-31 22:16:11 +00:00
GuiNomencl.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiNomencl.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiNote.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiNote.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiPainter.cpp comment out debug info. 2007-09-01 09:26:37 +00:00
GuiPainter.h Merge QController into individual dialogs. Also various cleanup 2007-08-31 22:16:11 +00:00
GuiParagraph.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiParagraph.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiPopupMenu.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiPopupMenu.h Merge QController into individual dialogs. Also various cleanup 2007-08-31 22:16:11 +00:00
GuiPrefs.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiPrefs.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiPrint.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiPrint.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiRef.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiRef.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiSearch.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiSearch.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiSelection.cpp fix unicode decomposition (bugs 3313 and 3498): 2007-07-05 14:45:00 +00:00
GuiSelection.h
GuiSelectionManager.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiSelectionManager.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiSendto.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiSendto.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiSetBorder.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiSetBorder.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiShowFile.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiShowFile.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiSpellchecker.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiSpellchecker.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiTabular.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiTabular.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiTabularCreate.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiTabularCreate.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiTexinfo.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiTexinfo.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiThesaurus.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiThesaurus.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiToc.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiToc.h Merge QController into individual dialogs. Also various cleanup 2007-08-31 22:16:11 +00:00
GuiToolbar.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiToolbar.h Merge QController into individual dialogs. Also various cleanup 2007-08-31 22:16:11 +00:00
GuiURL.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiURL.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiView.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiView.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiViewSource.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiViewSource.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiVSpace.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiVSpace.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiWorkArea.cpp Merge QController into individual dialogs. Also various cleanup 2007-08-31 22:16:11 +00:00
GuiWorkArea.h The BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas: 2007-08-21 07:33:46 +00:00
GuiWrap.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiWrap.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
IconPalette.cpp xpm -> png 2007-08-30 20:09:12 +00:00
IconPalette.h
InsertTableWidget.cpp
InsertTableWidget.h
LengthCombo.cpp
LengthCombo.h
LyXFileDialog.cpp
LyXFileDialog.h
Makefile.am merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
PanelStack.cpp single depth for preference items, 2007-08-30 14:22:56 +00:00
PanelStack.h
pch.h
qlkey.h * src/frontends/qt4/qlkey.h: add AltGr as modifier key (fix bug 4026) 2007-07-18 16:52:52 +00:00
qt_helpers.cpp Get rid of a few warnings. 2007-08-10 20:14:54 +00:00
qt_helpers.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
README
socket_callback.cpp
socket_callback.h
TocModel.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
TocModel.h
TocWidget.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
TocWidget.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
Validator.cpp
Validator.h

This file contains some do's and dont's for the Qt4 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.

moc is incredibly stupid and sometimes you need a fully qualified
"std::string" for .connect() statements to work. Be very, very careful.

Remember to check tab order on a dialog (third icon, with blue bars in designer).

Remember to check sensible resizing behaviour on a dialog.

Remember to use Edit->Check Accelerators

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_

Naming conventions
------------------

QFoo.[Ch]              The file that interacts with the controller
QFooDialog.[Ch]        The implementation of the dialog, derived from the generated files
ui/FooDialog.ui       The designer file
ui/FooDialogBase.[Ch] Generated files from FooDialog.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
GB - group box
LA - label
LC - LengthCombo
LV - QListView
ML - QTextBrowser
PB - push button
RB - radio button
SB - spin box
SL - slider
TE - text edit
TW - tree widget (FIXME: also TV in some files)


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 uses a different encoding (UCS4) than Qt (UTF16), therefore there are a
number of conversion functions in qt_helpers.[Ch]. Read the doxygen
documentation for details when to use which function.

Additionally, you should follow these simple rules :

o Use qt_() not _() in code
o Use the conversion functions of qt_helpers.h, NOT .latin1() / .c_str() etc.