lyx_mirror/src/frontends/qt4
Enrico Forestieri e5cb4fc10f Fix crash with old versions (earlier than 2.2.92) of fontconfig.
* src/frontends/qt4/GuiFontLoader.{cpp,h}
	(GuiFontLoader::GuiFontLoader): don't store font IDs anymore,
	as we are not going to clean up after ourselves.
	(GuiFontLoader::~GuiFontLoader): make it virtual again and
	do nothing (avoids a crash with fontconfig < 2.2.92).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20246 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-12 19:07:22 +00:00
..
ui Helge's wrapfig patch: 2007-09-09 23:47:22 +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 less functions 2007-09-11 17:06:15 +00:00
ColorCache.cpp
ColorCache.h
Dialogs.cpp fix outline dialog for non-Mac platform. 2007-09-09 20:51:04 +00:00
DockView.h cosmetics 2007-09-11 18:33:42 +00:00
EmptyTable.cpp Whitespace cleanup 2007-05-28 22:27:45 +00:00
EmptyTable.h
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 make Controller a standalone class. 2007-09-08 21:16:54 +00:00
GuiAbout.h simplify About dialog 2007-09-05 22:54:47 +00:00
GuiApplication.cpp the fun begins.... 2007-09-05 20:33:29 +00:00
GuiApplication.h the fun begins.... 2007-09-05 20:33:29 +00:00
GuiBibitem.cpp cosmetics 2007-09-11 18:33:42 +00:00
GuiBibitem.h cosmetics 2007-09-11 18:33:42 +00:00
GuiBibtex.cpp cosmetics 2007-09-11 18:33:42 +00:00
GuiBibtex.h cosmetics 2007-09-11 18:33:42 +00:00
GuiBox.cpp remove unnneded #include 2007-09-11 22:31:24 +00:00
GuiBox.h cosmetics 2007-09-11 18:33:42 +00:00
GuiBranch.cpp cosmetics 2007-09-11 18:33:42 +00:00
GuiBranch.h cosmetics 2007-09-11 18:33:42 +00:00
GuiBranches.cpp the fun begins.... 2007-09-05 20:33:29 +00:00
GuiBranches.h the fun begins.... 2007-09-05 20:33:29 +00:00
GuiChanges.cpp cosmetics 2007-09-11 18:33:42 +00:00
GuiChanges.h cosmetics 2007-09-11 18:33:42 +00:00
GuiCharacter.cpp shuffle stuff around 2007-09-11 21:27:57 +00:00
GuiCharacter.h shuffle stuff around 2007-09-11 21:27:57 +00:00
GuiCitation.cpp cosmetics 2007-09-11 18:33:42 +00:00
GuiCitation.h cosmetics 2007-09-11 18:33:42 +00:00
GuiClipboard.cpp shuffle stuff around 2007-09-11 21:27:57 +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 the fun begins.... 2007-09-05 20:33:29 +00:00
GuiCommandEdit.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiCommandEdit.h the fun begins.... 2007-09-05 20:33:29 +00:00
GuiDelimiter.cpp cosmetics 2007-09-11 18:33:42 +00:00
GuiDelimiter.h cosmetics 2007-09-11 18:33:42 +00:00
GuiDialog.cpp cosmetics 2007-09-11 18:33:42 +00:00
GuiDialog.h cosmetics 2007-09-11 18:33:42 +00:00
GuiDocument.cpp remove unnneded #include 2007-09-11 22:31:24 +00:00
GuiDocument.h cosmetics 2007-09-11 18:33:42 +00:00
GuiEmbeddedFiles.cpp shuffle stuff around 2007-09-11 21:27:57 +00:00
GuiEmbeddedFiles.h shuffle some frontend stuff around. merge controller(base) and "Kernel". Make frontend::Dialog pure virtual 2007-09-10 22:32:59 +00:00
GuiErrorList.cpp cosmetics 2007-09-11 18:33:42 +00:00
GuiErrorList.h cosmetics 2007-09-11 18:33:42 +00:00
GuiERT.cpp cosmetics 2007-09-11 18:33:42 +00:00
GuiERT.h cosmetics 2007-09-11 18:33:42 +00:00
GuiExternal.cpp cosmetics 2007-09-11 18:33:42 +00:00
GuiExternal.h cosmetics 2007-09-11 18:33:42 +00:00
GuiFloat.cpp cosmetics 2007-09-11 18:33:42 +00:00
GuiFloat.h cosmetics 2007-09-11 18:33:42 +00:00
GuiFontExample.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiFontExample.h the fun begins.... 2007-09-05 20:33:29 +00:00
GuiFontLoader.cpp Fix crash with old versions (earlier than 2.2.92) of fontconfig. 2007-09-12 19:07:22 +00:00
GuiFontLoader.h Fix crash with old versions (earlier than 2.2.92) of fontconfig. 2007-09-12 19:07:22 +00:00
GuiFontMetrics.cpp Optimisation: don't search twice the hash tables. 2007-08-13 13:56:54 +00:00
GuiFontMetrics.h the fun begins.... 2007-09-05 20:33:29 +00:00
GuiGraphics.cpp remove unnneded #include 2007-09-11 22:31:24 +00:00
GuiGraphics.h cosmetics 2007-09-11 18:33:42 +00:00
GuiGraphicsUi.h move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiImage.cpp shuffle stuff around 2007-09-11 21:27:57 +00:00
GuiImage.h the fun begins.... 2007-09-05 20:33:29 +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 cosmetics 2007-09-11 18:33:42 +00:00
GuiInclude.h cosmetics 2007-09-11 18:33:42 +00:00
GuiIndex.cpp cosmetics 2007-09-11 18:33:42 +00:00
GuiIndex.h cosmetics 2007-09-11 18:33:42 +00:00
GuiKeySymbol.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiKeySymbol.h the fun begins.... 2007-09-05 20:33:29 +00:00
GuiListings.cpp shuffle stuff around 2007-09-11 21:27:57 +00:00
GuiListings.h cosmetics 2007-09-11 18:33:42 +00:00
GuiLog.cpp cosmetics 2007-09-11 18:33:42 +00:00
GuiLog.h cosmetics 2007-09-11 18:33:42 +00:00
GuiMathMatrix.cpp cosmetics 2007-09-11 18:33:42 +00:00
GuiMathMatrix.h cosmetics 2007-09-11 18:33:42 +00:00
GuiMenubar.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiMenubar.h the fun begins.... 2007-09-05 20:33:29 +00:00
GuiNomencl.cpp cosmetics 2007-09-11 18:33:42 +00:00
GuiNomencl.h cosmetics 2007-09-11 18:33:42 +00:00
GuiNote.cpp cosmetics 2007-09-11 18:33:42 +00:00
GuiNote.h cosmetics 2007-09-11 18:33:42 +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 cosmetics 2007-09-11 18:33:42 +00:00
GuiParagraph.h cosmetics 2007-09-11 18:33:42 +00:00
GuiPopupMenu.cpp resuscitate menus 2007-09-05 11:55:03 +00:00
GuiPopupMenu.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiPrefs.cpp remove unnneded #include 2007-09-11 22:31:24 +00:00
GuiPrefs.h cosmetics 2007-09-11 18:33:42 +00:00
GuiPrint.cpp cosmetics 2007-09-11 18:33:42 +00:00
GuiPrint.h cosmetics 2007-09-11 18:33:42 +00:00
GuiRef.cpp cosmetics 2007-09-11 18:33:42 +00:00
GuiRef.h cosmetics 2007-09-11 18:33:42 +00:00
GuiSearch.cpp cosmetics 2007-09-11 18:33:42 +00:00
GuiSearch.h cosmetics 2007-09-11 18:33:42 +00:00
GuiSelection.cpp fix unicode decomposition (bugs 3313 and 3498): 2007-07-05 14:45:00 +00:00
GuiSelection.h
GuiSelectionManager.cpp the fun begins.... 2007-09-05 20:33:29 +00:00
GuiSelectionManager.h the fun begins.... 2007-09-05 20:33:29 +00:00
GuiSendto.cpp cosmetics 2007-09-11 18:33:42 +00:00
GuiSendto.h cosmetics 2007-09-11 18:33:42 +00:00
GuiSetBorder.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiSetBorder.h the fun begins.... 2007-09-05 20:33:29 +00:00
GuiShowFile.cpp cosmetics 2007-09-11 18:33:42 +00:00
GuiShowFile.h cosmetics 2007-09-11 18:33:42 +00:00
GuiSpellchecker.cpp cosmetics 2007-09-11 18:33:42 +00:00
GuiSpellchecker.h cosmetics 2007-09-11 18:33:42 +00:00
GuiTabular.cpp shuffle stuff around 2007-09-11 21:27:57 +00:00
GuiTabular.h cosmetics 2007-09-11 18:33:42 +00:00
GuiTabularCreate.cpp cosmetics 2007-09-11 18:33:42 +00:00
GuiTabularCreate.h cosmetics 2007-09-11 18:33:42 +00:00
GuiTexinfo.cpp shuffle stuff around 2007-09-11 21:27:57 +00:00
GuiTexinfo.h cosmetics 2007-09-11 18:33:42 +00:00
GuiThesaurus.cpp cosmetics 2007-09-11 18:33:42 +00:00
GuiThesaurus.h cosmetics 2007-09-11 18:33:42 +00:00
GuiToc.cpp remove recursive call 2007-09-08 21:00:03 +00:00
GuiToc.h Restore docked outline widget. Warning: still instable! 2007-09-08 17:28:14 +00:00
GuiToolbar.cpp move our stuff off the Q* namespace 2007-08-31 05:53:55 +00:00
GuiToolbar.h the fun begins.... 2007-09-05 20:33:29 +00:00
GuiURL.cpp cosmetics 2007-09-11 18:33:42 +00:00
GuiURL.h cosmetics 2007-09-11 18:33:42 +00:00
GuiView.cpp rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiView.h the fun begins.... 2007-09-05 20:33:29 +00:00
GuiViewSource.cpp connect to the right slots... 2007-09-09 12:06:37 +00:00
GuiViewSource.h header cleanup. 2007-09-08 16:36:53 +00:00
GuiVSpace.cpp shuffle stuff around 2007-09-11 21:27:57 +00:00
GuiVSpace.h cosmetics 2007-09-11 18:33:42 +00:00
GuiWorkArea.cpp shuffle stuff around 2007-09-11 21:27:57 +00:00
GuiWorkArea.h rename a few view functions from foo() to fooView() 2007-09-03 20:28:26 +00:00
GuiWrap.cpp shuffle stuff around 2007-09-11 21:27:57 +00:00
GuiWrap.h cosmetics 2007-09-11 18:33:42 +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
InsertTableWidget.h Whitespace cleanup 2007-05-28 22:27:45 +00:00
LengthCombo.cpp
LengthCombo.h
LyXFileDialog.cpp remove Dialog::title_, direct setting the title works as well. 2007-09-10 19:02:11 +00:00
LyXFileDialog.h
Makefile.am remove duplicated entry 2007-09-10 18:09:37 +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 shuffle stuff around 2007-09-11 21:27:57 +00:00
qt_helpers.h cosmetics 2007-09-11 18:33:42 +00:00
README the fun begins.... 2007-09-05 20:33:29 +00:00
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 Restore docked outline widget. Warning: still instable! 2007-09-08 17:28:14 +00:00
TocWidget.h Restore docked outline widget. Warning: still instable! 2007-09-08 17:28:14 +00:00
Validator.cpp shuffle some frontend stuff around. merge controller(base) and "Kernel". Make frontend::Dialog pure virtual 2007-09-10 22:32:59 +00:00
Validator.h shuffle some frontend stuff around. merge controller(base) and "Kernel". Make frontend::Dialog pure virtual 2007-09-10 22:32:59 +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
changed(). If you are using a more complicated thing anyway,
then remember to call 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 needs 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. This is
usually done by adding a top-level layout to the dialog in Designer.

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 slotOK() etc. Refer to close/cancel as close in the
source.

Override update_contents() to update the dialog, not update().  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.{cpp,h}     The file that interacts with the controller _and_
the implementation of the dialog, derived from the generated files
ui/FooDialog.ui  The designer file
ui_FooDialog.h   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)


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

LyX uses a different encoding (UCS4) than Qt (UTF16), therefore there are a
number of conversion functions in qt_helpers.{cpp,h}. 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.