lyx_mirror/src/frontends/qt4
Richard Heck 7575ad159b Revert "Do not crash is release mode if we stumble across an unrealized font."
This reverts commit c560e6b3a6.

I did not mean to comit the changes to the gmo files.
2016-07-18 12:59:32 -04:00
..
ui UI for save_transient_properties 2016-07-12 11:27:11 +01:00
.gitignore
Action.cpp Compilation fix for windows 2015-07-16 09:48:57 +02:00
Action.h
BulletsModule.cpp
BulletsModule.h
ButtonController.cpp Replace foreach with for 2016-06-12 19:17:33 +01:00
ButtonController.h
ButtonPolicy.cpp
ButtonPolicy.h
CategorizedCombo.cpp Accessibility of document class combo box (#10035) 2016-07-08 13:27:06 +02:00
CategorizedCombo.h
CMakeLists.txt Add Qt's Svg module to the list of used modules. This is required to allow the use of e.g. the QSvgRenderer class. 2015-05-19 22:46:26 +02:00
ColorCache.cpp
ColorCache.h
CustomizedWidgets.cpp ShortcutWidget: override shortcuts in the way they are meant to be (#10075) 2016-05-20 19:14:35 +01:00
CustomizedWidgets.h ShortcutWidget: override shortcuts in the way they are meant to be (#10075) 2016-05-20 19:14:35 +01:00
Dialog.cpp If there is an inset at cursor, connect the dialog with that, not the containing one 2015-05-26 19:33:07 +02:00
Dialog.h
DialogView.h
DockView.h
EmptyTable.cpp sign. 2015-05-02 11:38:46 +02:00
EmptyTable.h sign. 2015-05-02 11:38:46 +02:00
FancyLineEdit.cpp Fix a number of other uninitialized members. 2016-06-11 23:59:55 -04:00
FancyLineEdit.h
FileDialog.cpp #9245 replace Q_WS_MACX with Q_OS_MAC - the Q_OS_MAC macro is usable with Qt4 and Qt5. 2014-08-25 20:08:59 +02:00
FileDialog.h Forbid wrong compiler generated copy constructors 2015-09-20 19:43:06 +02:00
FindAndReplace.cpp Rationalise includes 2016-07-04 02:42:17 +02:00
FindAndReplace.h
FloatPlacement.cpp Initialize a bunch of uninitialized members. It does not seem to 2016-06-11 23:39:43 -04:00
FloatPlacement.h Add more Float tags to allow to disable wide and sideways feature 2015-05-22 18:59:17 +02:00
GuiAbout.cpp Always present Qt version info in LyX About dialog - not for developer version only 2016-06-19 11:53:20 +02:00
GuiAbout.h
GuiAlert.cpp Add missing breaks 2015-09-12 19:58:15 +02:00
GuiApplication.cpp Prioritize the shortcuts from the work areas 2016-07-14 20:50:10 +01:00
GuiApplication.h Prioritize the shortcuts from the work areas 2016-07-14 20:50:10 +01:00
GuiBibitem.cpp Improve read-only mode of InsetParams derived dialogs 2015-03-30 14:44:11 +02:00
GuiBibitem.h No need for default argument 2015-04-02 16:32:04 +02:00
GuiBibtex.cpp Assure we use docstring. 2015-11-16 08:21:53 +01:00
GuiBibtex.h
GuiBox.cpp Replace foreach with for 2016-06-12 19:17:33 +01:00
GuiBox.h Fix up GuiBox (use proper data/view separation and clean up) 2015-05-16 11:27:13 +02:00
GuiBranch.cpp Introduce "inverted" branch insets: These are branches whose content 2016-07-11 23:56:32 -04:00
GuiBranch.h Implement checkWidgets in the remaining InsetParamsWidget derived dialogs. 2015-04-02 17:03:08 +02:00
GuiBranches.cpp Fix cppcheck variable scope warnings 2015-09-20 10:42:35 +02:00
GuiBranches.h
GuiChanges.cpp GuiChanges: provide feedback when there are no more changes 2016-05-29 17:55:42 -04:00
GuiChanges.h GuiChanges: provide feedback when there are no more changes 2016-05-29 17:55:42 -04:00
GuiCharacter.cpp Factor out multiply used ColorSorter. 2015-11-16 08:19:16 +01:00
GuiCharacter.h Use view/data separation for GuiCharacter colors, which makes it possible to sort the colors 2015-05-17 17:15:01 +02:00
GuiCitation.cpp Fix a number of other uninitialized members. 2016-06-11 23:59:55 -04:00
GuiCitation.h Decrease height of citation dialog by using a QToolBox 2015-07-30 10:09:21 +02:00
GuiClipboard.cpp amend 660a43ec 2016-05-07 01:53:04 +01:00
GuiClipboard.h Remove using directives from headers 2016-06-26 18:22:59 +02:00
GuiCommandBuffer.cpp Make command buffer icons same size as QLineEdit height 2016-06-26 16:58:18 +02:00
GuiCommandBuffer.h Auto feature for minibuffer toolbar 2015-07-15 17:41:09 +02:00
GuiCommandEdit.cpp Auto feature for minibuffer toolbar 2015-07-15 17:41:09 +02:00
GuiCommandEdit.h Auto feature for minibuffer toolbar 2015-07-15 17:41:09 +02:00
GuiCompare.cpp Ammend 20addbbf 2016-01-24 13:05:51 -05:00
GuiCompare.h
GuiCompareHistory.cpp
GuiCompareHistory.h
GuiCompleter.cpp Consistency of ellipses across the UI 2015-10-05 21:16:16 +01:00
GuiCompleter.h
GuiDelimiter.cpp GuiDelimiters: display at least (and at most?) 4 columns 2016-05-31 00:14:13 +01:00
GuiDelimiter.h
GuiDialog.cpp
GuiDialog.h
GuiDocument.cpp LaTeX highlighter: make at a letter in the user preamble 2016-07-15 17:51:18 +01:00
GuiDocument.h GuiDocument: some polishing of the list of modules. 2016-07-03 17:28:46 +02:00
GuiErrorList.cpp Simplify BufferParams::bufferFormat() 2016-07-11 11:18:55 +02:00
GuiErrorList.h Button for showing PDF if compilation error 2015-04-04 13:13:19 -04:00
GuiERT.cpp Implement checkWidgets in the remaining InsetParamsWidget derived dialogs. 2015-04-02 17:03:08 +02:00
GuiERT.h Implement checkWidgets in the remaining InsetParamsWidget derived dialogs. 2015-04-02 17:03:08 +02:00
GuiExternal.cpp Remove relative units from bounding box 2015-07-18 16:41:52 +02:00
GuiExternal.h
GuiFontExample.cpp
GuiFontExample.h
GuiFontLoader.cpp Revert "Do not crash is release mode if we stumble across an unrealized font." 2016-07-18 12:59:32 -04:00
GuiFontLoader.h
GuiFontMetrics.cpp Avoid endless loop when the window is too narrow 2016-03-03 18:08:11 +01:00
GuiFontMetrics.h Do not use a static variable as QTextLayout cache 2015-12-16 10:34:43 +01:00
GuiGraphics.cpp Fix a number of other uninitialized members. 2016-06-11 23:59:55 -04:00
GuiGraphics.h Fix aspectratio UI 2015-01-04 10:05:42 +01:00
GuiGraphicsUi.h
GuiHSpace.cpp HSpace/VSpace: use a _signed_ length validator in the dialogs. 2015-06-26 13:19:12 +02:00
GuiHSpace.h Fix enabling/disabling in InsetParams derived dialogs (#9541) 2015-05-11 11:35:02 +02:00
GuiHyperlink.cpp Improve read-only mode of InsetParams derived dialogs 2015-03-30 14:44:11 +02:00
GuiHyperlink.h No need for default argument 2015-04-02 16:32:04 +02:00
GuiIdListModel.cpp
GuiIdListModel.h
GuiImage.cpp Use bilinear filtering when resizing graphics 2016-05-20 21:19:31 +01:00
GuiImage.h
GuiInclude.cpp Remove unused variables found by cppcheck 2015-09-20 21:39:59 +02:00
GuiInclude.h
GuiIndex.cpp
GuiIndex.h
GuiIndices.cpp Fix cppcheck variable scope warnings 2015-09-20 10:42:35 +02:00
GuiIndices.h GuiIndices: Improve widget disabling and account for read only status 2015-06-03 16:54:54 +02:00
GuiInfo.cpp GuiInfo: implement checkWidgets. 2015-04-01 10:07:20 +02:00
GuiInfo.h No need for default argument 2015-04-02 16:32:04 +02:00
GuiKeySymbol.cpp Prioritize the shortcuts from the work areas 2016-07-14 20:50:10 +01:00
GuiKeySymbol.h Prioritize the shortcuts from the work areas 2016-07-14 20:50:10 +01:00
GuiLabel.cpp Improve read-only mode of InsetParams derived dialogs 2015-03-30 14:44:11 +02:00
GuiLabel.h No need for default argument 2015-04-02 16:32:04 +02:00
GuiLine.cpp Improve read-only mode of InsetParams derived dialogs 2015-03-30 14:44:11 +02:00
GuiLine.h No need for default argument 2015-04-02 16:32:04 +02:00
GuiListings.cpp This is the result of an audit of all static variables, looking 2014-04-21 11:51:57 -04:00
GuiListings.h
GuiLog.cpp Improved fix for #9966 2016-04-15 11:49:04 +02:00
GuiLog.h Amend fd4d23b4 2016-01-12 21:25:34 +00:00
GuiMathMatrix.cpp Fix bug #9153 (Using mathpanel to insert matrix creates extra space on top) 2014-06-06 16:14:24 +02:00
GuiMathMatrix.h
GuiNomenclature.cpp Improve read-only mode of InsetParams derived dialogs 2015-03-30 14:44:11 +02:00
GuiNomenclature.h No need for default argument 2015-04-02 16:32:04 +02:00
GuiNote.cpp
GuiNote.h
GuiPainter.cpp Painter: Add a line style to disable antialiasing 2016-07-03 17:28:46 +02:00
GuiPainter.h Allow automatic text direction in Painter::text() 2016-05-31 11:52:30 +02:00
GuiParagraph.cpp GuiParagraph: Fix remaining glitch when entering custom line spread 2015-06-13 12:31:03 +02:00
GuiParagraph.h
GuiPhantom.cpp
GuiPhantom.h
GuiPrefs.cpp Better error message when try to bind a Hidden LFUN 2016-07-14 20:53:12 +01:00
GuiPrefs.h ShortcutPrefs: hide empty lfuns for which there is already a binding 2016-05-31 00:14:13 +01:00
GuiPrintindex.cpp
GuiPrintindex.h
GuiPrintNomencl.cpp Fix enabling/disabling in InsetParams derived dialogs (#9541) 2015-05-11 11:35:02 +02:00
GuiPrintNomencl.h No need for default argument 2015-04-02 16:32:04 +02:00
GuiProgress.cpp Ammend 20addbbf 2016-01-24 13:05:51 -05:00
GuiProgress.h On Linux show in crash message box the backtrace 2014-06-14 11:25:25 +02:00
GuiProgressView.cpp Missing headers 2016-06-09 19:16:44 +01:00
GuiProgressView.h
GuiRef.cpp Fix typo, and also check if string is null. 2016-06-18 18:33:45 -04:00
GuiRef.h
GuiSearch.cpp Style 2014-02-04 10:37:29 +01:00
GuiSearch.h
GuiSelection.cpp Use the cached value GuiSelection::selection_supported_ 2014-04-29 15:17:15 +02:00
GuiSelection.h
GuiSelectionManager.cpp
GuiSelectionManager.h
GuiSendto.cpp Initialize GuiSendto::format_ in constructor 2016-06-09 16:44:56 +02:00
GuiSendto.h
GuiSetBorder.cpp Disable setting vertical lines when using a formal table 2015-11-02 15:58:40 +01:00
GuiSetBorder.h
GuiShowFile.cpp
GuiShowFile.h
GuiSpellchecker.cpp Rename Cursor::setSelection(bool) to selection(bool) 2016-05-29 17:55:46 -04:00
GuiSpellchecker.h
GuiSymbols.cpp Fix perf issue when displaying the symbols gui (#9968) 2016-03-13 07:19:13 +00:00
GuiSymbols.h
GuiTabular.cpp Initialize some GuiTabular members in constructor 2016-06-09 16:38:32 +02:00
GuiTabular.h Fix enabling/disabling in InsetParams derived dialogs (#9541) 2015-05-11 11:35:02 +02:00
GuiTabularCreate.cpp Use EmptyTable widget in TabularCreate dialog. 2015-05-01 18:11:57 +02:00
GuiTabularCreate.h
GuiTexinfo.cpp Replace foreach with for 2016-06-12 19:17:33 +01:00
GuiTexinfo.h
GuiThesaurus.cpp
GuiThesaurus.h
GuiToc.cpp TocWidget: fix an erroneous collapse and optimise updates based on profiling 2016-05-31 00:14:13 +01:00
GuiToc.h
GuiToolbar.cpp Auto feature for minibuffer toolbar 2015-07-15 17:41:09 +02:00
GuiToolbar.h Simplify the code for "auto" toolbars handling 2015-06-18 15:51:53 +02:00
GuiView.cpp Add feedback in status bar when zooming 2016-07-18 17:03:54 +02:00
GuiView.h remove unused declaration 2016-06-25 20:32:07 +02:00
GuiViewSource.cpp Rationalise includes 2016-07-04 02:42:17 +02:00
GuiViewSource.h Rationalise includes 2016-07-04 02:42:17 +02:00
GuiVSpace.cpp HSpace/VSpace: use a _signed_ length validator in the dialogs. 2015-06-26 13:19:12 +02:00
GuiVSpace.h Implement checkWidgets in the remaining InsetParamsWidget derived dialogs. 2015-04-02 17:03:08 +02:00
GuiWorkArea_Private.h This patch does two closely related things. 2016-06-27 18:16:35 -04:00
GuiWorkArea.cpp Prioritize the shortcuts from the work areas 2016-07-14 20:50:10 +01:00
GuiWorkArea.h Prioritize the shortcuts from the work areas 2016-07-14 20:50:10 +01:00
GuiWrap.cpp
GuiWrap.h
IconPalette.cpp
IconPalette.h
InGuiThread.cpp
InGuiThread.h Add a check to please coverity. 2016-06-12 00:12:03 -04:00
InsertTableWidget.cpp Compilation fix for windows 2015-07-16 09:48:57 +02:00
InsertTableWidget.h
InsetParamsDialog.cpp Disable Apply button in InsetParams dialogs if there is no inset to apply to. 2015-11-19 15:48:49 +01:00
InsetParamsDialog.h
InsetParamsWidget.cpp Fix warning 2015-03-31 17:08:04 +02:00
InsetParamsWidget.h Improve read-only mode of InsetParams derived dialogs 2015-03-30 14:44:11 +02:00
LaTeXHighlighter.cpp LaTeX highlighter: make at a letter in the user preamble 2016-07-15 17:51:18 +01:00
LaTeXHighlighter.h LaTeX highlighter: make at a letter in the user preamble 2016-07-15 17:51:18 +01:00
LayoutBox.cpp Remove that pesky broken window that pops up with Qt5 when saving preferences 2016-06-12 19:17:33 +01:00
LayoutBox.h Forbid wrong compiler generated copy constructors 2015-09-20 19:43:06 +02:00
LengthCombo.cpp Remove relative units from bounding box 2015-07-18 16:41:52 +02:00
LengthCombo.h Remove relative units from bounding box 2015-07-18 16:41:52 +02:00
LyXFileDialog.cpp Fix file dialogs with Qt 5.2.0 and later. 2013-12-24 17:21:56 +01:00
LyXFileDialog.h
LyXToolBox.cpp LyXToolBox: a QToolBox with minimum size management 2016-05-29 17:55:41 -04:00
LyXToolBox.h Fix compilation with qt5 2016-05-28 17:42:32 -04:00
Makefile.am Line breaks in tooltips 2016-07-03 17:28:45 +02:00
Menus.cpp Replace support/shared_ptr.h and boost::shared_ptr with std::shared_ptr 2016-06-09 15:21:39 +01:00
Menus.h Forbid wrong compiler generated copy constructors 2015-09-20 19:43:06 +02:00
PanelStack.cpp Replace foreach with for 2016-06-12 19:17:33 +01:00
PanelStack.h
qt_helpers.cpp Line breaks in tooltips 2016-07-03 17:28:45 +02:00
qt_helpers.h Line breaks in tooltips 2016-07-03 17:28:45 +02:00
qt_i18n.h
README
TocModel.cpp Remove tooltips from the data of Toc Items 2016-07-03 17:28:46 +02:00
TocModel.h Remove tooltips from the data of Toc Items 2016-07-03 17:28:46 +02:00
TocWidget.cpp Make oultliner icons same size as the toolbar icons 2016-06-26 16:53:00 +02:00
TocWidget.h TocWidget: fix an erroneous collapse and optimise updates based on profiling 2016-05-31 00:14:13 +01:00
Toolbars.cpp Simplifications, mainly removal of boost::function and useless std::bind 2016-07-03 01:39:32 +02:00
Toolbars.h Auto feature for minibuffer toolbar 2015-07-15 17:41:09 +02:00
ToolTipFormatter.cpp Line breaks in tooltips 2016-07-03 17:28:45 +02:00
ToolTipFormatter.h Line breaks in tooltips 2016-07-03 17:28:45 +02:00
Validator.cpp Fix problems with immediate apply and length validators 2015-05-20 19:13:12 +02:00
Validator.h Fix problems with immediate apply and length validators 2015-05-20 19:13:12 +02: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.