lyx_mirror/src/frontends/qt4
André Pönitz 7bf090853f fix make dist
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19958 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-31 18:30:23 +00:00
..
ui Embedding feature patch 3: basic gui support 2007-08-31 15:42:35 +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
ChangeLog move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
CheckedLineEdit.cpp Rename .C ==> .cpp for files in src/frontends/qt4, part two 2007-04-26 03:53:51 +00:00
CheckedLineEdit.h Rename .C ==> .cpp for files in src/frontends/qt4, part two 2007-04-26 03:53:51 +00:00
ColorCache.cpp I guess Windows folks are not too happy with files named color.h and Color.h 2007-04-26 19:21:38 +00:00
ColorCache.h rename LColor into Color 2007-04-26 17:34:20 +00:00
Dialogs.cpp Embedding feature patch 3: basic gui support 2007-08-31 15:42:35 +00:00
DockView.h * added WidgetFlags argument to DockView to set Qt::Drawer flag where needed 2007-05-29 11:38:28 +00:00
EmptyTable.cpp Whitespace cleanup 2007-05-28 22:27:45 +00:00
EmptyTable.h Rename .C ==> .cpp for files in src/frontends/qt4, part two 2007-04-26 03:53:51 +00:00
FileDialog.cpp add comment and ling to bug 3907. 2007-07-03 08:23:04 +00:00
FloatPlacement.cpp Whitespace cleanup 2007-05-28 22:27:45 +00:00
FloatPlacement.h fix building with automake; break scons, cmake and qmake 2007-08-11 15:48:15 +00:00
GuiAbout.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiAbout.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiApplication.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiApplication.h New 'Save all on shutdown or cancel' feature from Stephan Witt. 2007-08-27 06:35:24 +00:00
GuiBibitem.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiBibitem.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiBibtex.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiBibtex.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiBox.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiBox.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiBranch.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiBranch.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiBranches.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiBranches.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiChanges.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiChanges.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiCharacter.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiCharacter.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiCitation.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiCitation.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiCitationDialog.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiCitationDialog.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiClipboard.cpp fix unicode decomposition (bugs 3313 and 3498): 2007-07-05 14:45:00 +00:00
GuiClipboard.h
GuiCommandBuffer.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiCommandBuffer.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiCommandEdit.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiCommandEdit.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiDelimiterDialog.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiDelimiterDialog.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiDialogView.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiDialogView.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiDocument.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiDocument.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiEmbeddedFiles.cpp Embedding feature patch 3: basic gui support 2007-08-31 15:42:35 +00:00
GuiEmbeddedFiles.h Embedding feature patch 3: basic gui support 2007-08-31 15:42:35 +00:00
GuiErrorList.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiErrorList.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiERT.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiERT.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiExternal.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiExternal.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiFloat.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiFloat.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiFloatDialog.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiFloatDialog.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiFontExample.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiFontExample.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiFontLoader.cpp * workaround for Qt not selecting a Times font on Mac with Qt 4.3.0. As soon as the 2007-06-04 12:10:30 +00:00
GuiFontLoader.h Whitespace cleanup 2007-05-28 22:27:45 +00:00
GuiFontMetrics.cpp Optimisation: don't search twice the hash tables. 2007-08-13 13:56:54 +00:00
GuiFontMetrics.h Optimisation: don't search twice the hash tables. 2007-08-13 13:56:54 +00:00
GuiGraphics.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiGraphics.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiGraphicsDialog.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiGraphicsDialog.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiGraphicsUi.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiImage.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiImage.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiImplementation.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiImplementation.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiInclude.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiInclude.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiIndex.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiIndex.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiKeySymbol.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiKeySymbol.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiListings.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiListings.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiLog.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiLog.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiMathMatrixDialog.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiMathMatrixDialog.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiMenubar.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiMenubar.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiNomencl.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiNomencl.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiNote.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiNote.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiPainter.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiPainter.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiParagraph.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiParagraph.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiPopupMenu.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiPopupMenu.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiPrefs.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiPrefs.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiPrint.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiPrint.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiPrintDialog.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiPrintDialog.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiRef.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiRef.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiSearch.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiSearch.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiSelection.cpp fix unicode decomposition (bugs 3313 and 3498): 2007-07-05 14:45:00 +00:00
GuiSelection.h code cosmetics whitespace, unneeded lyx:: qualification, indentation, unneeded destructors and the like 2007-04-25 16:39:21 +00:00
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 move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiSendto.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +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 move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiShowFile.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiSpellchecker.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiSpellchecker.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiTabular.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiTabular.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiTabularCreate.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiTabularCreate.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiTexinfo.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiTexinfo.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiThesaurus.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiThesaurus.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiToc.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiToc.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiToolbar.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiToolbar.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiURLDialog.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiURLDialog.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +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 move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiViewSource.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiVSpace.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiVSpace.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiWorkArea.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiWorkArea.h The BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas: 2007-08-21 07:33:46 +00:00
GuiWrap.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiWrap.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
IconPalette.cpp xpm -> png 2007-08-30 20:09:12 +00:00
IconPalette.h * Get rid the of the QWidgetAction subclass and use homebrew tearoff widget: 2007-06-21 09:51:50 +00:00
InsertTableWidget.cpp Rename .C ==> .cpp for files in src, part one 2007-04-26 04:41:58 +00:00
InsertTableWidget.h Whitespace cleanup 2007-05-28 22:27:45 +00:00
LengthCombo.cpp rename/merge LyXLength related stuff 2007-04-28 12:58:49 +00:00
LengthCombo.h rename/merge LyXLength related stuff 2007-04-28 12:58:49 +00:00
LyXFileDialog.cpp Whitespace cleanup 2007-05-28 22:27:45 +00:00
LyXFileDialog.h Rename .C ==> .cpp for files in src/frontends/qt4, part two 2007-04-26 03:53:51 +00:00
Makefile.am fix make dist 2007-08-31 18:30:23 +00:00
PanelStack.cpp single depth for preference items, 2007-08-30 14:22:56 +00:00
PanelStack.h Rename .C ==> .cpp for files in src/frontends/qt4, part two 2007-04-26 03:53:51 +00:00
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
Qt2BC.cpp Rename .C ==> .cpp for files in src/frontends/qt4, part two 2007-04-26 03:53:51 +00:00
Qt2BC.h code cosmetics whitespace, unneeded lyx:: qualification, indentation, unneeded destructors and the like 2007-04-25 16:39:21 +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 renaming in frontends/qt4/ui: s/Q//g 2007-04-24 08:56:28 +00:00
socket_callback.cpp Rename .C ==> .cpp for files in src/frontends/qt4, part two 2007-04-26 03:53:51 +00:00
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
UrlView.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
UrlView.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
Validator.cpp Whitespace cleanup 2007-05-28 22:27:45 +00:00
Validator.h Whitespace cleanup 2007-05-28 22:27:45 +00:00

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.