lyx_mirror/src/frontends/qt4
Peter Kümmel 9862ca834e move getSecond to frontend_helpers.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20044 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-04 18:35:58 +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 fix thinko 2007-09-03 06:11:51 +00:00
ButtonController.h Fix scons for Andre's patch, add a missing header file 2007-09-03 20:13:26 +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 rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
EmptyTable.cpp
EmptyTable.h
FileDialog.cpp
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 rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +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 rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiBibitem.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiBibtex.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiBibtex.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiBox.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiBox.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiBranch.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiBranch.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiBranches.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiBranches.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiChanges.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiChanges.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiCharacter.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiCharacter.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiCitation.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiCitation.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiClipboard.cpp
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 rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiDialog.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiDialog.h merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiDialogView.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiDialogView.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiDocument.cpp move getSecond to frontend_helpers.h 2007-09-04 18:35:58 +00:00
GuiDocument.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiEmbeddedFiles.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiEmbeddedFiles.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiErrorList.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiErrorList.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiERT.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiERT.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiExternal.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiExternal.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiFloat.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiFloat.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +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 rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
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 move getSecond to frontend_helpers.h 2007-09-04 18:35:58 +00:00
GuiGraphics.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +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 rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiInclude.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiIndex.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiIndex.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +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 rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiListings.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiLog.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiLog.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiMathMatrix.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiMathMatrix.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiMenubar.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiMenubar.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiNomencl.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiNomencl.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiNote.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiNote.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +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 rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiParagraph.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiPopupMenu.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiPopupMenu.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiPrefs.cpp move getSecond to frontend_helpers.h 2007-09-04 18:35:58 +00:00
GuiPrefs.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiPrint.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiPrint.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiRef.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiRef.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiSearch.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiSearch.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiSelection.cpp
GuiSelection.h
GuiSelectionManager.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiSelectionManager.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiSendto.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiSendto.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +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 rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiSpellchecker.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiSpellchecker.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiTabular.cpp lil' cleanup 2007-09-04 18:08:51 +00:00
GuiTabular.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiTabularCreate.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiTabularCreate.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiTexinfo.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiTexinfo.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiThesaurus.cpp merge ButtonController and its view (Qt2BC in this case) 2007-09-03 05:59:32 +00:00
GuiThesaurus.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiToc.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiToc.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +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 rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiURL.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiView.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiView.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiViewSource.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiViewSource.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiVSpace.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiVSpace.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiWorkArea.cpp Merge QController into individual dialogs. Also various cleanup 2007-08-31 22:16:11 +00:00
GuiWorkArea.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiWrap.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiWrap.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +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
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 rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
TocWidget.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +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.